IAzureCosmosDbCreateRoleAssignment Method

Creates a role assignment for a scope.

Definition

Namespace: MobileTrack.DataContainers.Cosmos
Assembly: MobileTrack.DataContainers (in MobileTrack.DataContainers.dll) Version: 0.7+1dadc87dcf0a0f837e19a3ce2deb7c1cd85375d1
Task<RoleAssignmentDto> CreateRoleAssignment(
	RoleAssignmentDto newRoleAssignment,
	UserSessionData createdBy,
	CancellationToken cancellationToken = default
)

Parameters

newRoleAssignment  RoleAssignmentDto
Role assignment to created
createdBy  UserSessionData
User creating the role.
cancellationToken  CancellationToken  (Optional)
Cancellation token

Return Value

TaskRoleAssignmentDto
Cosmos DB Object-creation Task

Exceptions

UnauthorizedAccessExceptionThrown if the user createdBy did not have the correct permissions
ArgumentNullExceptionThrown if newRoleAssignment or createdBy was
ResourceInvalidStateExceptionThrown if newRoleAssignment is in an invalid state.

See Also