你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

AlertRuleCollection 类

定义

一个表示 集合及其操作的 AlertRuleResource 类。 AlertRuleResource集合中的每个都将属于 的同一ResourceGroupResource实例。 若要获取 AlertRuleCollection 实例,请从 实例 ResourceGroupResource调用 GetAlertRules 方法。

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)
继承
AlertRuleCollection
实现

构造函数

AlertRuleCollection()

初始化 类的新实例 AlertRuleCollection 进行模拟。

属性

Client

获取 ArmClient 创建自的此资源客户端。

(继承自 ArmCollection)
Diagnostics

获取此资源客户端的诊断选项。

(继承自 ArmCollection)
Endpoint

获取此资源客户端的基 URI。

(继承自 ArmCollection)
Id

获取资源标识符。

(继承自 ArmCollection)
Pipeline

获取此资源客户端的管道。

(继承自 ArmCollection)

方法

CreateOrUpdate(WaitUntil, String, AlertRuleData, CancellationToken)

创建或更新经典指标警报规则。

  • 请求路径/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Insights/alertrules/{ruleName}
  • 操作IdAlertRules_CreateOrUpdate
CreateOrUpdateAsync(WaitUntil, String, AlertRuleData, CancellationToken)

创建或更新经典指标警报规则。

  • 请求路径/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Insights/alertrules/{ruleName}
  • 操作IdAlertRules_CreateOrUpdate
Exists(String, CancellationToken)

检查 Azure 中是否存在资源。

  • 请求路径/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Insights/alertrules/{ruleName}
  • 操作IdAlertRules_Get
ExistsAsync(String, CancellationToken)

检查 Azure 中是否存在资源。

  • 请求路径/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Insights/alertrules/{ruleName}
  • 操作IdAlertRules_Get
Get(String, CancellationToken)

获取经典指标警报规则

  • 请求路径/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Insights/alertrules/{ruleName}
  • 操作IdAlertRules_Get
GetAll(CancellationToken)

列出资源组中的经典指标警报规则。

  • 请求路径/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Insights/alertrules
  • 操作IdAlertRules_ListByResourceGroup
GetAllAsync(CancellationToken)

列出资源组中的经典指标警报规则。

  • 请求路径/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Insights/alertrules
  • 操作IdAlertRules_ListByResourceGroup
GetAsync(String, CancellationToken)

获取经典指标警报规则

  • 请求路径/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Insights/alertrules/{ruleName}
  • 操作IdAlertRules_Get
TryGetApiVersion(ResourceType, String)

获取 API 版本替代(如果已为当前客户端选项设置)。

(继承自 ArmCollection)

显式接口实现

IAsyncEnumerable<AlertRuleResource>.GetAsyncEnumerator(CancellationToken)

返回一个异步循环访问集合的枚举器。

IEnumerable.GetEnumerator()

返回循环访问集合的枚举数。

IEnumerable<AlertRuleResource>.GetEnumerator()

返回一个循环访问集合的枚举器。

适用于