PolicyInsightsExtensions.TriggerPolicyStateEvaluationAsync Method

Definition

Overloads

Name Description
TriggerPolicyStateEvaluationAsync(ResourceGroupResource, WaitUntil, CancellationToken)

Triggers a policy evaluation scan for all the resources under the resource group. <item> Mocking. To mock this method, please mock TriggerPolicyStateEvaluationAsync(WaitUntil, CancellationToken) instead. </item>

TriggerPolicyStateEvaluationAsync(SubscriptionResource, WaitUntil, CancellationToken)

Triggers a policy evaluation scan for all the resources under the subscription <item> Mocking. To mock this method, please mock TriggerPolicyStateEvaluationAsync(WaitUntil, CancellationToken) instead. </item>

TriggerPolicyStateEvaluationAsync(ResourceGroupResource, WaitUntil, CancellationToken)

Source:
PolicyInsightsExtensions.cs
Source:
PolicyInsightsExtensions.cs

Triggers a policy evaluation scan for all the resources under the resource group. <item> Mocking. To mock this method, please mock TriggerPolicyStateEvaluationAsync(WaitUntil, CancellationToken) instead. </item>

public static System.Threading.Tasks.Task<Azure.ResourceManager.ArmOperation> TriggerPolicyStateEvaluationAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default);
static member TriggerPolicyStateEvaluationAsync : Azure.ResourceManager.Resources.ResourceGroupResource * Azure.WaitUntil * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.ResourceManager.ArmOperation>
<Extension()>
Public Function TriggerPolicyStateEvaluationAsync (resourceGroupResource As ResourceGroupResource, waitUntil As WaitUntil, Optional cancellationToken As CancellationToken = Nothing) As Task(Of ArmOperation)

Parameters

resourceGroupResource
ResourceGroupResource

The ResourceGroupResource the method will execute against.

waitUntil
WaitUntil

Completed if the method should wait to return until the long-running operation has completed on the service; Started if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

Exceptions

resourceGroupResource is null.

Applies to

TriggerPolicyStateEvaluationAsync(SubscriptionResource, WaitUntil, CancellationToken)

Source:
PolicyInsightsExtensions.cs
Source:
PolicyInsightsExtensions.cs

Triggers a policy evaluation scan for all the resources under the subscription <item> Mocking. To mock this method, please mock TriggerPolicyStateEvaluationAsync(WaitUntil, CancellationToken) instead. </item>

public static System.Threading.Tasks.Task<Azure.ResourceManager.ArmOperation> TriggerPolicyStateEvaluationAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default);
static member TriggerPolicyStateEvaluationAsync : Azure.ResourceManager.Resources.SubscriptionResource * Azure.WaitUntil * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.ResourceManager.ArmOperation>
<Extension()>
Public Function TriggerPolicyStateEvaluationAsync (subscriptionResource As SubscriptionResource, waitUntil As WaitUntil, Optional cancellationToken As CancellationToken = Nothing) As Task(Of ArmOperation)

Parameters

subscriptionResource
SubscriptionResource

The SubscriptionResource the method will execute against.

waitUntil
WaitUntil

Completed if the method should wait to return until the long-running operation has completed on the service; Started if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

Exceptions

subscriptionResource is null.

Applies to