PolicyInsightsExtensions.TriggerPolicyStateEvaluation Method

Definition

Overloads

TriggerPolicyStateEvaluation(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
TriggerPolicyStateEvaluation(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

TriggerPolicyStateEvaluation(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 Azure.ResourceManager.ArmOperation TriggerPolicyStateEvaluation (this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default);
static member TriggerPolicyStateEvaluation : Azure.ResourceManager.Resources.ResourceGroupResource * Azure.WaitUntil * System.Threading.CancellationToken -> Azure.ResourceManager.ArmOperation
<Extension()>
Public Function TriggerPolicyStateEvaluation (resourceGroupResource As ResourceGroupResource, waitUntil As WaitUntil, Optional cancellationToken As CancellationToken = Nothing) As 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

TriggerPolicyStateEvaluation(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 Azure.ResourceManager.ArmOperation TriggerPolicyStateEvaluation (this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default);
static member TriggerPolicyStateEvaluation : Azure.ResourceManager.Resources.SubscriptionResource * Azure.WaitUntil * System.Threading.CancellationToken -> Azure.ResourceManager.ArmOperation
<Extension()>
Public Function TriggerPolicyStateEvaluation (subscriptionResource As SubscriptionResource, waitUntil As WaitUntil, Optional cancellationToken As CancellationToken = Nothing) As 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