Share via


AlertRuleCollection Class

Definition

A class representing a collection of AlertRuleResource and their operations. Each AlertRuleResource in the collection will belong to the same instance of ResourceGroupResource. To get an AlertRuleCollection instance call the GetAlertRules method from an instance of ResourceGroupResource.

public class AlertRuleCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable<Azure.ResourceManager.Monitor.AlertRuleResource>, System.Collections.Generic.IEnumerable<Azure.ResourceManager.Monitor.AlertRuleResource>
type AlertRuleCollection = class
    inherit ArmCollection
    interface seq<AlertRuleResource>
    interface IEnumerable
    interface IAsyncEnumerable<AlertRuleResource>
Public Class AlertRuleCollection
Inherits ArmCollection
Implements IAsyncEnumerable(Of AlertRuleResource), IEnumerable(Of AlertRuleResource)
Inheritance
AlertRuleCollection
Implements

Constructors

AlertRuleCollection()

Initializes a new instance of the AlertRuleCollection class for mocking.

Properties

Client

Gets the ArmClient this resource client was created from.

(Inherited from ArmCollection)
Diagnostics

Gets the diagnostic options for this resource client.

(Inherited from ArmCollection)
Endpoint

Gets the base uri for this resource client.

(Inherited from ArmCollection)
Id

Gets the resource identifier.

(Inherited from ArmCollection)
Pipeline

Gets the pipeline for this resource client.

(Inherited from ArmCollection)

Methods

CreateOrUpdate(WaitUntil, String, AlertRuleData, CancellationToken)

Creates or updates a classic metric alert rule.

  • Request Path: /subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Insights/alertrules/{ruleName}
  • Operation Id: AlertRules_CreateOrUpdate
  • Default Api Version: 2016-03-01
  • Resource: AlertRuleResource
CreateOrUpdateAsync(WaitUntil, String, AlertRuleData, CancellationToken)

Creates or updates a classic metric alert rule.

  • Request Path: /subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Insights/alertrules/{ruleName}
  • Operation Id: AlertRules_CreateOrUpdate
  • Default Api Version: 2016-03-01
  • Resource: AlertRuleResource
Exists(String, CancellationToken)

Checks to see if the resource exists in azure.

  • Request Path: /subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Insights/alertrules/{ruleName}
  • Operation Id: AlertRules_Get
  • Default Api Version: 2016-03-01
  • Resource: AlertRuleResource
ExistsAsync(String, CancellationToken)

Checks to see if the resource exists in azure.

  • Request Path: /subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Insights/alertrules/{ruleName}
  • Operation Id: AlertRules_Get
  • Default Api Version: 2016-03-01
  • Resource: AlertRuleResource
Get(String, CancellationToken)

Gets a classic metric alert rule

  • Request Path: /subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Insights/alertrules/{ruleName}
  • Operation Id: AlertRules_Get
  • Default Api Version: 2016-03-01
  • Resource: AlertRuleResource
GetAll(CancellationToken)

List the classic metric alert rules within a resource group.

  • Request Path: /subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Insights/alertrules
  • Operation Id: AlertRules_ListByResourceGroup
  • Default Api Version: 2016-03-01
  • Resource: AlertRuleResource
GetAllAsync(CancellationToken)

List the classic metric alert rules within a resource group.

  • Request Path: /subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Insights/alertrules
  • Operation Id: AlertRules_ListByResourceGroup
  • Default Api Version: 2016-03-01
  • Resource: AlertRuleResource
GetAsync(String, CancellationToken)

Gets a classic metric alert rule

  • Request Path: /subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Insights/alertrules/{ruleName}
  • Operation Id: AlertRules_Get
  • Default Api Version: 2016-03-01
  • Resource: AlertRuleResource
GetIfExists(String, CancellationToken)

Tries to get details for this resource from the service.

  • Request Path: /subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Insights/alertrules/{ruleName}
  • Operation Id: AlertRules_Get
  • Default Api Version: 2016-03-01
  • Resource: AlertRuleResource
GetIfExistsAsync(String, CancellationToken)

Tries to get details for this resource from the service.

  • Request Path: /subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Insights/alertrules/{ruleName}
  • Operation Id: AlertRules_Get
  • Default Api Version: 2016-03-01
  • Resource: AlertRuleResource
TryGetApiVersion(ResourceType, String)

Gets the api version override if it has been set for the current client options.

(Inherited from ArmCollection)

Explicit Interface Implementations

IAsyncEnumerable<AlertRuleResource>.GetAsyncEnumerator(CancellationToken)

Returns an enumerator that iterates asynchronously through the collection.

IEnumerable.GetEnumerator()

Returns an enumerator that iterates through a collection.

IEnumerable<AlertRuleResource>.GetEnumerator()

Returns an enumerator that iterates through the collection.

Applies to