Share via


PolicyInsightsExtensions.TriggerPolicyStateEvaluationAsync Method

Definition

Overloads

TriggerPolicyStateEvaluationAsync(ResourceGroupResource, WaitUntil, CancellationToken)

Triggers a policy evaluation scan for all the resources under the resource group.

  • Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PolicyInsights/policyStates/latest/triggerEvaluation
  • Operation Id: PolicyStates_TriggerResourceGroupEvaluation
TriggerPolicyStateEvaluationAsync(SubscriptionResource, WaitUntil, CancellationToken)

Triggers a policy evaluation scan for all the resources under the subscription

  • Request Path: /subscriptions/{subscriptionId}/providers/Microsoft.PolicyInsights/policyStates/latest/triggerEvaluation
  • Operation Id: PolicyStates_TriggerSubscriptionEvaluation

TriggerPolicyStateEvaluationAsync(ResourceGroupResource, WaitUntil, CancellationToken)

Source:
PolicyInsightsExtensions.cs
Source:
PolicyInsightsExtensions.cs

Triggers a policy evaluation scan for all the resources under the resource group.

  • Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PolicyInsights/policyStates/latest/triggerEvaluation
  • Operation Id: PolicyStates_TriggerResourceGroupEvaluation
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 instance 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

  • Request Path: /subscriptions/{subscriptionId}/providers/Microsoft.PolicyInsights/policyStates/latest/triggerEvaluation
  • Operation Id: PolicyStates_TriggerSubscriptionEvaluation
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 instance 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