共用方式為


PolicyAssignmentResource.Update Method

Definition

Overloads

Update(PolicyAssignmentPatch, CancellationToken)

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: 2022-06-01
  • Resource: PolicyAssignmentResource
Update(WaitUntil, PolicyAssignmentData, CancellationToken)

This operation creates or 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_Create

Update(PolicyAssignmentPatch, CancellationToken)

Source:
PolicyAssignmentResource.cs
Source:
PolicyAssignmentResource.cs

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: 2022-06-01
  • Resource: PolicyAssignmentResource
public virtual Azure.Response<Azure.ResourceManager.Resources.PolicyAssignmentResource> Update (Azure.ResourceManager.Resources.Models.PolicyAssignmentPatch patch, System.Threading.CancellationToken cancellationToken = default);
abstract member Update : Azure.ResourceManager.Resources.Models.PolicyAssignmentPatch * System.Threading.CancellationToken -> Azure.Response<Azure.ResourceManager.Resources.PolicyAssignmentResource>
override this.Update : Azure.ResourceManager.Resources.Models.PolicyAssignmentPatch * System.Threading.CancellationToken -> Azure.Response<Azure.ResourceManager.Resources.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

Update(WaitUntil, PolicyAssignmentData, CancellationToken)

Source:
PolicyAssignmentResource.cs
Source:
PolicyAssignmentResource.cs

This operation creates or 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_Create
public virtual Azure.ResourceManager.ArmOperation<Azure.ResourceManager.Resources.PolicyAssignmentResource> Update (Azure.WaitUntil waitUntil, Azure.ResourceManager.Resources.PolicyAssignmentData data, System.Threading.CancellationToken cancellationToken = default);
abstract member Update : Azure.WaitUntil * Azure.ResourceManager.Resources.PolicyAssignmentData * System.Threading.CancellationToken -> Azure.ResourceManager.ArmOperation<Azure.ResourceManager.Resources.PolicyAssignmentResource>
override this.Update : Azure.WaitUntil * Azure.ResourceManager.Resources.PolicyAssignmentData * System.Threading.CancellationToken -> Azure.ResourceManager.ArmOperation<Azure.ResourceManager.Resources.PolicyAssignmentResource>
Public Overridable Function Update (waitUntil As WaitUntil, data As PolicyAssignmentData, Optional cancellationToken As CancellationToken = Nothing) As ArmOperation(Of PolicyAssignmentResource)

Parameters

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.

data
PolicyAssignmentData

Parameters for the policy assignment.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

Exceptions

data is null.

Applies to