你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
AlertsManagementExtensions.GetServiceAlertSummary 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
重载
GetServiceAlertSummary(SubscriptionResource, SubscriptionResourceGetServiceAlertSummaryOptions, CancellationToken) |
获取按各种参数分组的警报的汇总计数 (例如按“严重性”分组将返回每个严重性) 的警报计数。
|
GetServiceAlertSummary(SubscriptionResource, AlertsSummaryGroupByField, Nullable<Boolean>, String, String, String, Nullable<MonitorServiceSourceForAlert>, Nullable<MonitorCondition>, Nullable<ServiceAlertSeverity>, Nullable<ServiceAlertState>, String, Nullable<TimeRangeFilter>, String, CancellationToken) |
获取按各种参数分组的警报的汇总计数 (例如按“严重性”分组将返回每个严重性) 的警报计数。
|
GetServiceAlertSummary(SubscriptionResource, SubscriptionResourceGetServiceAlertSummaryOptions, CancellationToken)
获取按各种参数分组的警报的汇总计数 (例如按“严重性”分组将返回每个严重性) 的警报计数。
- 请求路径/subscriptions/{subscriptionId}/providers/Microsoft.AlertsManagement/alertsSummary
- 操作IdAlerts_GetSummary
public static Azure.Response<Azure.ResourceManager.AlertsManagement.Models.ServiceAlertSummary> GetServiceAlertSummary (this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.ResourceManager.AlertsManagement.Models.SubscriptionResourceGetServiceAlertSummaryOptions options, System.Threading.CancellationToken cancellationToken = default);
static member GetServiceAlertSummary : Azure.ResourceManager.Resources.SubscriptionResource * Azure.ResourceManager.AlertsManagement.Models.SubscriptionResourceGetServiceAlertSummaryOptions * System.Threading.CancellationToken -> Azure.Response<Azure.ResourceManager.AlertsManagement.Models.ServiceAlertSummary>
<Extension()>
Public Function GetServiceAlertSummary (subscriptionResource As SubscriptionResource, options As SubscriptionResourceGetServiceAlertSummaryOptions, Optional cancellationToken As CancellationToken = Nothing) As Response(Of ServiceAlertSummary)
参数
- subscriptionResource
- SubscriptionResource
方法 SubscriptionResource 将对其执行的实例。
包含此方法的所有参数(LRO 限定符和请求上下文参数除外)的属性包。
- cancellationToken
- CancellationToken
要使用的取消标记。
返回
例外
options
为 null。
适用于
GetServiceAlertSummary(SubscriptionResource, AlertsSummaryGroupByField, Nullable<Boolean>, String, String, String, Nullable<MonitorServiceSourceForAlert>, Nullable<MonitorCondition>, Nullable<ServiceAlertSeverity>, Nullable<ServiceAlertState>, String, Nullable<TimeRangeFilter>, String, CancellationToken)
获取按各种参数分组的警报的汇总计数 (例如按“严重性”分组将返回每个严重性) 的警报计数。
- 请求路径/subscriptions/{subscriptionId}/providers/Microsoft.AlertsManagement/alertsSummary
- 操作IdAlerts_GetSummary
public static Azure.Response<Azure.ResourceManager.AlertsManagement.Models.ServiceAlertSummary> GetServiceAlertSummary (this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.ResourceManager.AlertsManagement.Models.AlertsSummaryGroupByField groupby, bool? includeSmartGroupsCount = default, string targetResource = default, string targetResourceType = default, string targetResourceGroup = default, Azure.ResourceManager.AlertsManagement.Models.MonitorServiceSourceForAlert? monitorService = default, Azure.ResourceManager.AlertsManagement.Models.MonitorCondition? monitorCondition = default, Azure.ResourceManager.AlertsManagement.Models.ServiceAlertSeverity? severity = default, Azure.ResourceManager.AlertsManagement.Models.ServiceAlertState? alertState = default, string alertRule = default, Azure.ResourceManager.AlertsManagement.Models.TimeRangeFilter? timeRange = default, string customTimeRange = default, System.Threading.CancellationToken cancellationToken = default);
static member GetServiceAlertSummary : Azure.ResourceManager.Resources.SubscriptionResource * Azure.ResourceManager.AlertsManagement.Models.AlertsSummaryGroupByField * Nullable<bool> * string * string * string * Nullable<Azure.ResourceManager.AlertsManagement.Models.MonitorServiceSourceForAlert> * Nullable<Azure.ResourceManager.AlertsManagement.Models.MonitorCondition> * Nullable<Azure.ResourceManager.AlertsManagement.Models.ServiceAlertSeverity> * Nullable<Azure.ResourceManager.AlertsManagement.Models.ServiceAlertState> * string * Nullable<Azure.ResourceManager.AlertsManagement.Models.TimeRangeFilter> * string * System.Threading.CancellationToken -> Azure.Response<Azure.ResourceManager.AlertsManagement.Models.ServiceAlertSummary>
<Extension()>
Public Function GetServiceAlertSummary (subscriptionResource As SubscriptionResource, groupby As AlertsSummaryGroupByField, Optional includeSmartGroupsCount As Nullable(Of Boolean) = Nothing, Optional targetResource As String = Nothing, Optional targetResourceType As String = Nothing, Optional targetResourceGroup As String = Nothing, Optional monitorService As Nullable(Of MonitorServiceSourceForAlert) = Nothing, Optional monitorCondition As Nullable(Of MonitorCondition) = Nothing, Optional severity As Nullable(Of ServiceAlertSeverity) = Nothing, Optional alertState As Nullable(Of ServiceAlertState) = Nothing, Optional alertRule As String = Nothing, Optional timeRange As Nullable(Of TimeRangeFilter) = Nothing, Optional customTimeRange As String = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Response(Of ServiceAlertSummary)
参数
- subscriptionResource
- SubscriptionResource
方法 SubscriptionResource 将对其执行的实例。
- groupby
- AlertsSummaryGroupByField
此参数允许按输入字段对结果集进行分组, () 支持的最多 2 个逗号分隔字段。 例如,groupby=severity 或 groupby=severity,alertstate。
- targetResource
- String
按目标资源 (筛选,这是完整的 ARM ID) 默认值为全选。
- targetResourceType
- String
按目标资源类型筛选。 默认值为“全选”。
- targetResourceGroup
- String
按目标资源组名称筛选。 默认值为“全选”。
- monitorService
- Nullable<MonitorServiceSourceForAlert>
按生成警报实例的监视服务进行筛选。 默认值为“全选”。
- monitorCondition
- Nullable<MonitorCondition>
按“已触发”或“已解决”的监视条件进行筛选。 默认值为全选。
- severity
- Nullable<ServiceAlertSeverity>
按严重性筛选。 默认值为“全选”。
- alertState
- Nullable<ServiceAlertState>
按警报实例的状态进行筛选。 默认值为全选。
- alertRule
- String
按特定警报规则进行筛选。 默认值为全选。
- timeRange
- Nullable<TimeRangeFilter>
按以下列出的值按时间范围筛选。 默认值为 1 天。
- customTimeRange
- String
按“开始时间/<结束>时间>”格式<的自定义时间范围筛选,其中时间采用 ISO-8601 格式 () ”。 允许的值在查询时间后的 30 天内。 timeRange 或 customTimeRange 都可以使用,但不能同时使用两者。 默认为无。
- cancellationToken
- CancellationToken
要使用的取消标记。