MonitorExtensions.GetByAlertRuleAsync Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets a list of incidents associated to an alert rule <item> Mocking. To mock this method, please mock GetByAlertRuleAsync(String, CancellationToken) instead. </item>
public static Azure.AsyncPageable<Azure.ResourceManager.Monitor.Models.MonitorIncident> GetByAlertRuleAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string ruleName, System.Threading.CancellationToken cancellationToken = default);
static member GetByAlertRuleAsync : Azure.ResourceManager.Resources.ResourceGroupResource * string * System.Threading.CancellationToken -> Azure.AsyncPageable<Azure.ResourceManager.Monitor.Models.MonitorIncident>
<Extension()>
Public Function GetByAlertRuleAsync (resourceGroupResource As ResourceGroupResource, ruleName As String, Optional cancellationToken As CancellationToken = Nothing) As AsyncPageable(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.