RoleAssignmentsOperationsExtensions.CreateAsync(IRoleAssignmentsOperations, String, String, RoleAssignmentCreateParameters, CancellationToken) Method

Definition

Creates a role assignment.

public static System.Threading.Tasks.Task<Microsoft.Azure.Management.Graph.RBAC.Fluent.Models.RoleAssignmentInner> CreateAsync (this Microsoft.Azure.Management.Graph.RBAC.Fluent.IRoleAssignmentsOperations operations, string scope, string roleAssignmentName, Microsoft.Azure.Management.Graph.RBAC.Fluent.Models.RoleAssignmentCreateParameters parameters, System.Threading.CancellationToken cancellationToken = default);
static member CreateAsync : Microsoft.Azure.Management.Graph.RBAC.Fluent.IRoleAssignmentsOperations * string * string * Microsoft.Azure.Management.Graph.RBAC.Fluent.Models.RoleAssignmentCreateParameters * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Azure.Management.Graph.RBAC.Fluent.Models.RoleAssignmentInner>
<Extension()>
Public Function CreateAsync (operations As IRoleAssignmentsOperations, scope As String, roleAssignmentName As String, parameters As RoleAssignmentCreateParameters, Optional cancellationToken As CancellationToken = Nothing) As Task(Of RoleAssignmentInner)

Parameters

operations
IRoleAssignmentsOperations

The operations group for this extension method.

scope
System.String

The scope of the role assignment to create. The scope can be any REST resource instance. For example, use '/subscriptions/{subscription-id}/' for a subscription, '/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}' for a resource group, and '/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/providers/{resource-provider}/{resource-type}/{resource-name}' for a resource.

roleAssignmentName
System.String

The name of the role assignment to create. It can be any valid GUID.

parameters
RoleAssignmentCreateParameters

Parameters for the role assignment.

cancellationToken
System.Threading.CancellationToken

The cancellation token.

Returns

System.Threading.Tasks.Task<RoleAssignmentInner>

Applies to