MonitorExtensions.GetMetricAlerts Method

Definition

Overloads

GetMetricAlerts(ResourceGroupResource)

Gets a collection of MetricAlertResources in the ResourceGroupResource. MockingTo mock this method, please mock GetMetricAlerts() instead.

GetMetricAlerts(SubscriptionResource, CancellationToken)

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

GetMetricAlerts(ResourceGroupResource)

Source:
MonitorExtensions.cs
Source:
MonitorExtensions.cs

Gets a collection of MetricAlertResources in the ResourceGroupResource. MockingTo mock this method, please mock GetMetricAlerts() instead.

public static Azure.ResourceManager.Monitor.MetricAlertCollection GetMetricAlerts (this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource);
static member GetMetricAlerts : Azure.ResourceManager.Resources.ResourceGroupResource -> Azure.ResourceManager.Monitor.MetricAlertCollection
<Extension()>
Public Function GetMetricAlerts (resourceGroupResource As ResourceGroupResource) As MetricAlertCollection

Parameters

resourceGroupResource
ResourceGroupResource

The ResourceGroupResource instance the method will execute against.

Returns

An object representing collection of MetricAlertResources and their operations over a MetricAlertResource.

Exceptions

resourceGroupResource is null.

Applies to

GetMetricAlerts(SubscriptionResource, CancellationToken)

Source:
MonitorExtensions.cs
Source:
MonitorExtensions.cs

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.Pageable<Azure.ResourceManager.Monitor.MetricAlertResource> GetMetricAlerts (this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default);
static member GetMetricAlerts : Azure.ResourceManager.Resources.SubscriptionResource * System.Threading.CancellationToken -> Azure.Pageable<Azure.ResourceManager.Monitor.MetricAlertResource>
<Extension()>
Public Function GetMetricAlerts (subscriptionResource As SubscriptionResource, Optional cancellationToken As CancellationToken = Nothing) As Pageable(Of MetricAlertResource)

Parameters

subscriptionResource
SubscriptionResource

The SubscriptionResource instance the method will execute against.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

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

Exceptions

subscriptionResource is null.

Applies to