Compartilhar via


MockableMonitorSubscriptionResource.GetAlertRules(CancellationToken) Method

Definition

List the classic metric alert rules within a subscription.

  • Request Path: /subscriptions/{subscriptionId}/providers/Microsoft.Insights/alertrules
  • Operation Id: AlertRules_ListBySubscription
  • Default Api Version: 2016-03-01
  • Resource: AlertRuleResource
public virtual Azure.Pageable<Azure.ResourceManager.Monitor.AlertRuleResource> GetAlertRules (System.Threading.CancellationToken cancellationToken = default);
abstract member GetAlertRules : System.Threading.CancellationToken -> Azure.Pageable<Azure.ResourceManager.Monitor.AlertRuleResource>
override this.GetAlertRules : System.Threading.CancellationToken -> Azure.Pageable<Azure.ResourceManager.Monitor.AlertRuleResource>
Public Overridable Function GetAlertRules (Optional cancellationToken As CancellationToken = Nothing) As Pageable(Of AlertRuleResource)

Parameters

cancellationToken
CancellationToken

The cancellation token to use.

Returns

A collection of AlertRuleResource that may take multiple service requests to iterate over.

Applies to