Language

MonitorExtensions.GetByAlertRule Method

Definition

Gets a list of incidents associated to an alert rule <item> Mocking. To mock this method, please mock GetByAlertRule(String, CancellationToken) instead. </item>

public static Azure.Pageable<Azure.ResourceManager.Monitor.Models.MonitorIncident> GetByAlertRule(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string ruleName, System.Threading.CancellationToken cancellationToken = default);
static member GetByAlertRule : Azure.ResourceManager.Resources.ResourceGroupResource * string * System.Threading.CancellationToken -> Azure.Pageable<Azure.ResourceManager.Monitor.Models.MonitorIncident>
<Extension()>
Public Function GetByAlertRule (resourceGroupResource As ResourceGroupResource, ruleName As String, Optional cancellationToken As CancellationToken = Nothing) As Pageable(Of MonitorIncident)

Parameters

resourceGroupResource
ResourceGroupResource

The ResourceGroupResource the method will execute against.

ruleName
String

The name of the rule.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

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

Exceptions

resourceGroupResource is null.

Applies to