Share via


ServiceAlertCollection.GetAll Method

Definition

Overloads

GetAll(ServiceAlertCollectionGetAllOptions, CancellationToken)

List all existing alerts, where the results can be filtered on the basis of multiple parameters (e.g. time range). The results can then be sorted on the basis specific fields, with the default being lastModifiedDateTime.

  • Request Path: /subscriptions/{subscriptionId}/providers/Microsoft.AlertsManagement/alerts
  • Operation Id: Alerts_GetAll
GetAll(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)

List all existing alerts, where the results can be filtered on the basis of multiple parameters (e.g. time range). The results can then be sorted on the basis specific fields, with the default being lastModifiedDateTime.

  • Request Path: /subscriptions/{subscriptionId}/providers/Microsoft.AlertsManagement/alerts
  • Operation Id: Alerts_GetAll

GetAll(ServiceAlertCollectionGetAllOptions, CancellationToken)

Source:
ServiceAlertCollection.cs
Source:
ServiceAlertCollection.cs

List all existing alerts, where the results can be filtered on the basis of multiple parameters (e.g. time range). The results can then be sorted on the basis specific fields, with the default being lastModifiedDateTime.

  • Request Path: /subscriptions/{subscriptionId}/providers/Microsoft.AlertsManagement/alerts
  • Operation Id: Alerts_GetAll
public virtual Azure.Pageable<Azure.ResourceManager.AlertsManagement.ServiceAlertResource> GetAll (Azure.ResourceManager.AlertsManagement.Models.ServiceAlertCollectionGetAllOptions options, System.Threading.CancellationToken cancellationToken = default);
abstract member GetAll : Azure.ResourceManager.AlertsManagement.Models.ServiceAlertCollectionGetAllOptions * System.Threading.CancellationToken -> Azure.Pageable<Azure.ResourceManager.AlertsManagement.ServiceAlertResource>
override this.GetAll : Azure.ResourceManager.AlertsManagement.Models.ServiceAlertCollectionGetAllOptions * System.Threading.CancellationToken -> Azure.Pageable<Azure.ResourceManager.AlertsManagement.ServiceAlertResource>
Public Overridable Function GetAll (options As ServiceAlertCollectionGetAllOptions, Optional cancellationToken As CancellationToken = Nothing) As Pageable(Of ServiceAlertResource)

Parameters

options
ServiceAlertCollectionGetAllOptions

A property bag which contains all the parameters of this method except the LRO qualifier and request context parameter.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

A collection of ServiceAlertResource that may take multiple service requests to iterate over.

Applies to

GetAll(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)

Source:
ServiceAlertCollection.cs
Source:
ServiceAlertCollection.cs

List all existing alerts, where the results can be filtered on the basis of multiple parameters (e.g. time range). The results can then be sorted on the basis specific fields, with the default being lastModifiedDateTime.

  • Request Path: /subscriptions/{subscriptionId}/providers/Microsoft.AlertsManagement/alerts
  • Operation Id: Alerts_GetAll
public virtual Azure.Pageable<Azure.ResourceManager.AlertsManagement.ServiceAlertResource> GetAll (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 GetAll : 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.Pageable<Azure.ResourceManager.AlertsManagement.ServiceAlertResource>
override this.GetAll : 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.Pageable<Azure.ResourceManager.AlertsManagement.ServiceAlertResource>
Public Overridable Function GetAll (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 Pageable(Of ServiceAlertResource)

Parameters

targetResource
String

Filter by target resource( which is full ARM ID) Default value is select all.

targetResourceType
String

Filter by target resource type. Default value is select all.

targetResourceGroup
String

Filter by target resource group name. Default value is select all.

monitorService
Nullable<MonitorServiceSourceForAlert>

Filter by monitor service which generates the alert instance. Default value is select all.

monitorCondition
Nullable<MonitorCondition>

Filter by monitor condition which is either 'Fired' or 'Resolved'. Default value is to select all.

severity
Nullable<ServiceAlertSeverity>

Filter by severity. Default value is select all.

alertState
Nullable<ServiceAlertState>

Filter by state of the alert instance. Default value is to select all.

alertRule
String

Filter by specific alert rule. Default value is to select all.

smartGroupId
String

Filter the alerts list by the Smart Group Id. Default value is none.

includeContext
Nullable<Boolean>

Include context which has contextual data specific to the monitor service. Default value is false'.

includeEgressConfig
Nullable<Boolean>

Include egress config which would be used for displaying the content in portal. Default value is 'false'.

pageCount
Nullable<Int64>

Determines number of alerts returned per page in response. Permissible value is between 1 to 250. When the "includeContent" filter is selected, maximum value allowed is 25. Default value is 25.

sortBy
Nullable<ListServiceAlertsSortByField>

Sort the query results by input field, Default value is 'lastModifiedDateTime'.

sortOrder
Nullable<AlertsManagementQuerySortOrder>

Sort the query results order in either ascending or descending. Default value is 'desc' for time fields and 'asc' for others.

select
String

This filter allows to selection of the fields(comma separated) which would be part of the essential section. This would allow to project only the required fields rather than getting entire content. Default is to fetch all the fields in the essentials section.

timeRange
Nullable<TimeRangeFilter>

Filter by time range by below listed values. Default value is 1 day.

customTimeRange
String

Filter by custom time range in the format <start-time>/<end-time> where time is in (ISO-8601 format)'. Permissible values is within 30 days from query time. Either timeRange or customTimeRange could be used but not both. Default is none.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

A collection of ServiceAlertResource that may take multiple service requests to iterate over.

Applies to