IAzureCosmosDbCreateRole Method

Creates a new role in the database for a company.

Definition

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

Parameters

newRole  RoleDto
Role to be created.
createdBy  UserSessionData
User creating the role.
cancellationToken  CancellationToken  (Optional)
Cancellation token

Return Value

TaskRoleDto
Cosmos DB Object-creation Task

Exceptions

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

See Also