你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
ServiceAlertCollection.GetAllAsync 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
重载
GetAllAsync(ServiceAlertCollectionGetAllOptions, CancellationToken) |
列出所有现有警报,其中可以根据多个参数 (筛选结果,例如时间范围) 。 然后,可以根据特定字段对结果进行排序,默认值为 lastModifiedDateTime。
|
GetAllAsync(String, String, String, Nullable<MonitorServiceSourceForAlert>, Nullable<MonitorCondition>, Nullable<ServiceAlertSeverity>, Nullable<ServiceAlertState>, String, String, Nullable<Boolean>, Nullable<Boolean>, Nullable<Int64>, Nullable<ListServiceAlertsSortByField>, Nullable<AlertsManagementQuerySortOrder>, String, Nullable<TimeRangeFilter>, String, CancellationToken) |
列出所有现有警报,其中可以根据多个参数 (筛选结果,例如时间范围) 。 然后,可以根据特定字段对结果进行排序,默认值为 lastModifiedDateTime。
|
GetAllAsync(ServiceAlertCollectionGetAllOptions, CancellationToken)
列出所有现有警报,其中可以根据多个参数 (筛选结果,例如时间范围) 。 然后,可以根据特定字段对结果进行排序,默认值为 lastModifiedDateTime。
- 请求路径/subscriptions/{subscriptionId}/providers/Microsoft.AlertsManagement/alerts
- 操作IdAlerts_GetAll
public virtual Azure.AsyncPageable<Azure.ResourceManager.AlertsManagement.ServiceAlertResource> GetAllAsync (Azure.ResourceManager.AlertsManagement.Models.ServiceAlertCollectionGetAllOptions options, System.Threading.CancellationToken cancellationToken = default);
abstract member GetAllAsync : Azure.ResourceManager.AlertsManagement.Models.ServiceAlertCollectionGetAllOptions * System.Threading.CancellationToken -> Azure.AsyncPageable<Azure.ResourceManager.AlertsManagement.ServiceAlertResource>
override this.GetAllAsync : Azure.ResourceManager.AlertsManagement.Models.ServiceAlertCollectionGetAllOptions * System.Threading.CancellationToken -> Azure.AsyncPageable<Azure.ResourceManager.AlertsManagement.ServiceAlertResource>
Public Overridable Function GetAllAsync (options As ServiceAlertCollectionGetAllOptions, Optional cancellationToken As CancellationToken = Nothing) As AsyncPageable(Of ServiceAlertResource)
参数
一个属性包,其中包含除 LRO 限定符和请求上下文参数以外的此方法的所有参数。
- cancellationToken
- CancellationToken
要使用的取消标记。
返回
的异步集合 ServiceAlertResource ,可能需要循环访问多个服务请求。
适用于
GetAllAsync(String, String, String, Nullable<MonitorServiceSourceForAlert>, Nullable<MonitorCondition>, Nullable<ServiceAlertSeverity>, Nullable<ServiceAlertState>, String, String, Nullable<Boolean>, Nullable<Boolean>, Nullable<Int64>, Nullable<ListServiceAlertsSortByField>, Nullable<AlertsManagementQuerySortOrder>, String, Nullable<TimeRangeFilter>, String, CancellationToken)
列出所有现有警报,其中可以根据多个参数 (筛选结果,例如时间范围) 。 然后,可以根据特定字段对结果进行排序,默认值为 lastModifiedDateTime。
- 请求路径/subscriptions/{subscriptionId}/providers/Microsoft.AlertsManagement/alerts
- 操作IdAlerts_GetAll
public virtual Azure.AsyncPageable<Azure.ResourceManager.AlertsManagement.ServiceAlertResource> GetAllAsync (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, string smartGroupId = default, bool? includeContext = default, bool? includeEgressConfig = default, long? pageCount = default, Azure.ResourceManager.AlertsManagement.Models.ListServiceAlertsSortByField? sortBy = default, Azure.ResourceManager.AlertsManagement.Models.AlertsManagementQuerySortOrder? sortOrder = default, string select = default, Azure.ResourceManager.AlertsManagement.Models.TimeRangeFilter? timeRange = default, string customTimeRange = default, System.Threading.CancellationToken cancellationToken = default);
abstract member GetAllAsync : 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 * string * Nullable<bool> * Nullable<bool> * Nullable<int64> * Nullable<Azure.ResourceManager.AlertsManagement.Models.ListServiceAlertsSortByField> * Nullable<Azure.ResourceManager.AlertsManagement.Models.AlertsManagementQuerySortOrder> * string * Nullable<Azure.ResourceManager.AlertsManagement.Models.TimeRangeFilter> * string * System.Threading.CancellationToken -> Azure.AsyncPageable<Azure.ResourceManager.AlertsManagement.ServiceAlertResource>
override this.GetAllAsync : 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 * string * Nullable<bool> * Nullable<bool> * Nullable<int64> * Nullable<Azure.ResourceManager.AlertsManagement.Models.ListServiceAlertsSortByField> * Nullable<Azure.ResourceManager.AlertsManagement.Models.AlertsManagementQuerySortOrder> * string * Nullable<Azure.ResourceManager.AlertsManagement.Models.TimeRangeFilter> * string * System.Threading.CancellationToken -> Azure.AsyncPageable<Azure.ResourceManager.AlertsManagement.ServiceAlertResource>
Public Overridable Function GetAllAsync (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 smartGroupId As String = Nothing, Optional includeContext As Nullable(Of Boolean) = Nothing, Optional includeEgressConfig As Nullable(Of Boolean) = Nothing, Optional pageCount As Nullable(Of Long) = Nothing, Optional sortBy As Nullable(Of ListServiceAlertsSortByField) = Nothing, Optional sortOrder As Nullable(Of AlertsManagementQuerySortOrder) = Nothing, Optional select As String = Nothing, Optional timeRange As Nullable(Of TimeRangeFilter) = Nothing, Optional customTimeRange As String = Nothing, Optional cancellationToken As CancellationToken = Nothing) As AsyncPageable(Of ServiceAlertResource)
参数
- targetResource
- String
按目标资源筛选 (,这是完整的 ARM ID) 默认值为全选。
- targetResourceType
- String
按目标资源类型筛选。 默认值为全选。
- targetResourceGroup
- String
按目标资源组名称进行筛选。 默认值为全选。
- monitorService
- Nullable<MonitorServiceSourceForAlert>
按生成警报实例的监视服务进行筛选。 默认值为全选。
- monitorCondition
- Nullable<MonitorCondition>
按“已触发”或“已解决”的监视条件进行筛选。 默认值为全选。
- severity
- Nullable<ServiceAlertSeverity>
按严重性筛选。 默认值为全选。
- alertState
- Nullable<ServiceAlertState>
按警报实例的状态进行筛选。 默认值为全选。
- alertRule
- String
按特定警报规则进行筛选。 默认值为全选。
- smartGroupId
- String
按智能组 ID 筛选警报列表。默认值为 none。
- sortBy
- Nullable<ListServiceAlertsSortByField>
按输入字段对查询结果进行排序,默认值为“lastModifiedDateTime”。
- sortOrder
- Nullable<AlertsManagementQuerySortOrder>
按升序或降序对查询结果进行排序。 时间字段的默认值为“desc”,其他字段的默认值为“asc”。
- select
- String
此筛选器允许选择 (逗号分隔) 字段,这些字段将成为基本部分的一部分。 这将允许仅投影必填字段,而不是获取整个内容。 默认为提取 essentials 节中的所有字段。
- timeRange
- Nullable<TimeRangeFilter>
按以下列出的值按时间范围进行筛选。 默认值为 1 天。
- customTimeRange
- String
按开始时间/<结束时间>>格式<的自定义时间范围进行筛选,其中时间采用 ISO-8601 格式 () ”。 允许的值为自查询时间起的 30 天内。 可以使用 timeRange 或 customTimeRange,但不能同时使用两者。 默认为无。
- cancellationToken
- CancellationToken
要使用的取消标记。
返回
的异步集合 ServiceAlertResource ,可能需要循环访问多个服务请求。