Udostępnij za pośrednictwem


RoleAssignmentsClient.CreateRoleAssignmentAsync Method

Definition

Create role assignment.

public virtual System.Threading.Tasks.Task<Azure.Response<Azure.Analytics.Synapse.AccessControl.Models.RoleAssignmentDetails>> CreateRoleAssignmentAsync (string roleAssignmentId, Guid roleId, Guid principalId, string scope, string principalType = default, System.Threading.CancellationToken cancellationToken = default);
abstract member CreateRoleAssignmentAsync : string * Guid * Guid * string * string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.Analytics.Synapse.AccessControl.Models.RoleAssignmentDetails>>
override this.CreateRoleAssignmentAsync : string * Guid * Guid * string * string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.Analytics.Synapse.AccessControl.Models.RoleAssignmentDetails>>
Public Overridable Function CreateRoleAssignmentAsync (roleAssignmentId As String, roleId As Guid, principalId As Guid, scope As String, Optional principalType As String = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Response(Of RoleAssignmentDetails))

Parameters

roleAssignmentId
String

The ID of the role assignment.

roleId
Guid

Role ID of the Synapse Built-In Role.

principalId
Guid

Object ID of the AAD principal or security-group.

scope
String

Scope at which the role assignment is created.

principalType
String

Type of the principal Id: User, Group or ServicePrincipal.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

Applies to