MonitorExtensions.GetMetricAlerts Method
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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.
|
- 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
Azure SDK for .NET Preview and Azure SDK for .NET Latest
Product | Versions |
---|---|
Azure SDK for .NET | Latest, Preview |
- 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
Azure SDK for .NET Preview and Azure SDK for .NET Latest
Product | Versions |
---|---|
Azure SDK for .NET | Latest, Preview |
Azure SDK for .NET feedback
Azure SDK for .NET is an open source project. Select a link to provide feedback: