共用方式為


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

Parameters

cancellationToken
CancellationToken

The cancellation token to use.

Returns

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

Applies to