Share via


MockableMonitorSubscriptionResource.GetAlertRulesAsync 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.AsyncPageable<Azure.ResourceManager.Monitor.AlertRuleResource> GetAlertRulesAsync (System.Threading.CancellationToken cancellationToken = default);
abstract member GetAlertRulesAsync : System.Threading.CancellationToken -> Azure.AsyncPageable<Azure.ResourceManager.Monitor.AlertRuleResource>
override this.GetAlertRulesAsync : System.Threading.CancellationToken -> Azure.AsyncPageable<Azure.ResourceManager.Monitor.AlertRuleResource>
Public Overridable Function GetAlertRulesAsync (Optional cancellationToken As CancellationToken = Nothing) As AsyncPageable(Of AlertRuleResource)

Parameters

cancellationToken
CancellationToken

The cancellation token to use.

Returns

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

Applies to