AzureCosmosDbCreateEnvironment Method

Creates an environment in the database.

Definition

Namespace: MobileTrack.DataContainers.Cosmos
Assembly: MobileTrack.DataContainers (in MobileTrack.DataContainers.dll) Version: 0.8+34f1bbd8dc6b32752cfce829cbed66e15113d7ba
public Task<EnvironmentDto> CreateEnvironment(
	EnvironmentDto environment,
	UserSessionData createdBy,
	CancellationToken cancellationToken = default
)

Parameters

environment  EnvironmentDto
Environment to create
createdBy  UserSessionData
User creating the environment
cancellationToken  CancellationToken  (Optional)
Cancellation token (optional)

Return Value

TaskEnvironmentDto
Cosmos DB Object-creation Task

Implements

IAzureCosmosDbCreateEnvironment(EnvironmentDto, UserSessionData, CancellationToken)

Exceptions

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

See Also