Condividi tramite


RoleManagementPolicyAssignmentCollection.CreateOrUpdateAsync Method

Definition

Create a role management policy assignment

  • Request Path: /{scope}/providers/Microsoft.Authorization/roleManagementPolicyAssignments/{roleManagementPolicyAssignmentName}
  • Operation Id: RoleManagementPolicyAssignments_Create
  • Default Api Version: 2020-10-01
  • Resource: RoleManagementPolicyAssignmentResource
public virtual System.Threading.Tasks.Task<Azure.ResourceManager.ArmOperation<Azure.ResourceManager.Authorization.RoleManagementPolicyAssignmentResource>> CreateOrUpdateAsync (Azure.WaitUntil waitUntil, string roleManagementPolicyAssignmentName, Azure.ResourceManager.Authorization.RoleManagementPolicyAssignmentData data, System.Threading.CancellationToken cancellationToken = default);
abstract member CreateOrUpdateAsync : Azure.WaitUntil * string * Azure.ResourceManager.Authorization.RoleManagementPolicyAssignmentData * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.ResourceManager.ArmOperation<Azure.ResourceManager.Authorization.RoleManagementPolicyAssignmentResource>>
override this.CreateOrUpdateAsync : Azure.WaitUntil * string * Azure.ResourceManager.Authorization.RoleManagementPolicyAssignmentData * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.ResourceManager.ArmOperation<Azure.ResourceManager.Authorization.RoleManagementPolicyAssignmentResource>>
Public Overridable Function CreateOrUpdateAsync (waitUntil As WaitUntil, roleManagementPolicyAssignmentName As String, data As RoleManagementPolicyAssignmentData, Optional cancellationToken As CancellationToken = Nothing) As Task(Of ArmOperation(Of RoleManagementPolicyAssignmentResource))

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.

roleManagementPolicyAssignmentName
String

The name of format {guid_guid} the role management policy assignment to upsert.

data
RoleManagementPolicyAssignmentData

Parameters for the role management policy assignment.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

Exceptions

roleManagementPolicyAssignmentName is an empty string, and was expected to be non-empty.

roleManagementPolicyAssignmentName or data is null.

Applies to