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
C#
public static System.Threading.Tasks.Task<Azure.ResourceManager.ArmOperation> TriggerPolicyStateEvaluationAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default);

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

Azure SDK for .NET Preview and Azure SDK for .NET Latest
Product Versions
Azure SDK for .NET Latest, Preview

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
C#
public static System.Threading.Tasks.Task<Azure.ResourceManager.ArmOperation> TriggerPolicyStateEvaluationAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default);

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

Azure SDK for .NET Preview and Azure SDK for .NET Latest
Product Versions
Azure SDK for .NET Latest, Preview