Condividi tramite


PolicyAssignmentResource.Update Method

Definition

This operation updates a policy assignment with the given scope and name. Policy assignments apply to all resources contained within their scope. For example, when you assign a policy at resource group scope, that policy applies to all resources in the group.

  • Request Path. : /{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}.
  • Operation Id. : PolicyAssignments_Update.
  • Default Api Version. : 2025-12-01-preview.
  • Resource. : PolicyAssignmentResource.
public virtual Azure.Response<Azure.ResourceManager.Resources.Policy.PolicyAssignmentResource> Update(Azure.ResourceManager.Resources.Policy.Models.PolicyAssignmentPatch patch, System.Threading.CancellationToken cancellationToken = default);
abstract member Update : Azure.ResourceManager.Resources.Policy.Models.PolicyAssignmentPatch * System.Threading.CancellationToken -> Azure.Response<Azure.ResourceManager.Resources.Policy.PolicyAssignmentResource>
override this.Update : Azure.ResourceManager.Resources.Policy.Models.PolicyAssignmentPatch * System.Threading.CancellationToken -> Azure.Response<Azure.ResourceManager.Resources.Policy.PolicyAssignmentResource>
Public Overridable Function Update (patch As PolicyAssignmentPatch, Optional cancellationToken As CancellationToken = Nothing) As Response(Of PolicyAssignmentResource)

Parameters

patch
PolicyAssignmentPatch

Parameters for policy assignment patch request.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

Exceptions

patch is null.

Applies to