Share via


MonitorExtensions.GetMetricAlertsAsync Method

Definition

Retrieve alert rule definitions in a subscription.

  • Request Path: /subscriptions/{subscriptionId}/providers/Microsoft.Insights/metricAlerts
  • Operation Id: MetricAlerts_ListBySubscription
  • Default Api Version: 2018-03-01
  • Resource: MetricAlertResource
public static Azure.AsyncPageable<Azure.ResourceManager.Monitor.MetricAlertResource> GetMetricAlertsAsync (this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default);
static member GetMetricAlertsAsync : Azure.ResourceManager.Resources.SubscriptionResource * System.Threading.CancellationToken -> Azure.AsyncPageable<Azure.ResourceManager.Monitor.MetricAlertResource>
<Extension()>
Public Function GetMetricAlertsAsync (subscriptionResource As SubscriptionResource, Optional cancellationToken As CancellationToken = Nothing) As AsyncPageable(Of MetricAlertResource)

Parameters

subscriptionResource
SubscriptionResource

The SubscriptionResource instance the method will execute against.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

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

Exceptions

subscriptionResource is null.

Applies to