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+45c8d9adb5970d727cceec44a5ed61aea0016e50
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