SecurityCenterExtensions.GetResourceGroupSecurityAlert Method

Definition

Get an alert that is associated a resource group or a resource in a resource group <item> Mocking. To mock this method, please mock GetResourceGroupSecurityAlert(AzureLocation, String, CancellationToken) instead. </item>

public static Azure.Response<Azure.ResourceManager.SecurityCenter.ResourceGroupSecurityAlertResource> GetResourceGroupSecurityAlert(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, Azure.Core.AzureLocation ascLocation, string alertName, System.Threading.CancellationToken cancellationToken = default);
static member GetResourceGroupSecurityAlert : Azure.ResourceManager.Resources.ResourceGroupResource * Azure.Core.AzureLocation * string * System.Threading.CancellationToken -> Azure.Response<Azure.ResourceManager.SecurityCenter.ResourceGroupSecurityAlertResource>
<Extension()>
Public Function GetResourceGroupSecurityAlert (resourceGroupResource As ResourceGroupResource, ascLocation As AzureLocation, alertName As String, Optional cancellationToken As CancellationToken = Nothing) As Response(Of ResourceGroupSecurityAlertResource)

Parameters

resourceGroupResource
ResourceGroupResource

The ResourceGroupResource the method will execute against.

ascLocation
AzureLocation

The ascLocation for the resource.

alertName
String

Name of the alert object.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

Exceptions

alertName is an empty string, and was expected to be non-empty.

resourceGroupResource is null.

Applies to