public class CosmosAsyncDatabase extends Object
public String getId()
public Mono<CosmosDatabaseResponse> read()
After subscription the operation will be performed. The Mono
upon
successful completion will contain a single cosmos database respone with the
read database. In case of failure the Mono
will error.
Mono
containing the single cosmos database respone with
the read database or an error.public Mono<CosmosDatabaseResponse> read(CosmosDatabaseRequestOptions options)
After subscription the operation will be performed. The Mono
upon
successful completion will contain a cosmos cosmos database respone with the
read database. In case of failure the Mono
will error.
options
- the request options.Mono
containing the single cosmos database response with
the read database or an error.public Mono<CosmosDatabaseResponse> delete()
After subscription the operation will be performed. The Mono
upon
successful completion will contain a cosmos database response with the
deleted database. In case of failure the Mono
will error.
Mono
containing the single cosmos database response.public Mono<CosmosDatabaseResponse> delete(CosmosDatabaseRequestOptions options)
After subscription the operation will be performed. The Mono
upon
successful completion will contain a cosmos database response with the
deleted database. In case of failure the Mono
will error.
options
- the request options.Mono
containing the single cosmos database response.public Mono<CosmosContainerResponse> createContainer(CosmosContainerProperties containerProperties)
After subscription the operation will be performed. The Mono
upon
successful completion will contain a cosmos container response with the
created container. In case of failure the Mono
will error.
containerProperties
- the container properties.Mono
containing the single cosmos container response with
the created container or an error.IllegalArgumentException
- containerProperties cannot be null.public Mono<CosmosContainerResponse> createContainer(CosmosContainerProperties containerProperties, ThroughputProperties throughputProperties)
After subscription the operation will be performed. The Mono
upon
successful completion will contain a cosmos container response with the
created container. In case of failure the Mono
will error.
containerProperties
- the container properties.throughputProperties
- the throughput properties for the container.Mono
containing the single cosmos container response with
the created container or an error.IllegalArgumentException
- thown if containerProerties are null.public Mono<CosmosContainerResponse> createContainer(CosmosContainerProperties containerProperties, ThroughputProperties throughputProperties, CosmosContainerRequestOptions options)
containerProperties
- the container properties.throughputProperties
- the throughput properties.options
- the request options.public Mono<CosmosContainerResponse> createContainer(CosmosContainerProperties containerProperties, CosmosContainerRequestOptions options)
After subscription the operation will be performed. The Mono
upon
successful completion will contain a cosmos container response with the
created container. In case of failure the Mono
will error.
containerProperties
- the containerProperties.options
- the cosmos container request options.Mono
containing the cosmos container response with the
created container or an error.IllegalArgumentException
- containerProperties can not be null.public Mono<CosmosContainerResponse> createContainer(String id, String partitionKeyPath)
After subscription the operation will be performed. The Mono
upon
successful completion will contain a cosmos container response with the
created container. In case of failure the Mono
will error.
id
- the cosmos container id.partitionKeyPath
- the partition key path.Mono
containing the cosmos container response with the
created container or an error.public Mono<CosmosContainerResponse> createContainer(String id, String partitionKeyPath, ThroughputProperties throughputProperties)
After subscription the operation will be performed. The Mono
upon
successful completion will contain a cosmos container response with the
created container. In case of failure the Mono
will error.
id
- the cosmos container id.partitionKeyPath
- the partition key path.throughputProperties
- the throughput properties for the container.Mono
containing the cosmos container response with the
created container or an error.public Mono<CosmosContainerResponse> createContainerIfNotExists(CosmosContainerProperties containerProperties)
After subscription the operation will be performed. The Mono
upon
successful completion will contain a cosmos container response with the
created or existing container. In case of failure the Mono
will
error.
containerProperties
- the container propertiesMono
containing the cosmos container response with the
created or existing container or an error.public Mono<CosmosContainerResponse> createContainerIfNotExists(CosmosContainerProperties containerProperties, ThroughputProperties throughputProperties)
The throughput properties will only be used if the specified container
does not exist and therefor a new container will be created.
After subscription the operation will be performed. The Mono
upon
successful completion will contain a cosmos container response with the
created or existing container. In case of failure the Mono
will
error.
containerProperties
- the container properties.throughputProperties
- the throughput properties for the container.Mono
containing the cosmos container response with the
created or existing container or an error.public Mono<CosmosContainerResponse> createContainerIfNotExists(String id, String partitionKeyPath)
After subscription the operation will be performed. The Mono
upon
successful completion will contain a cosmos container response with the
created container. In case of failure the Mono
will error.
id
- the cosmos container id.partitionKeyPath
- the partition key path.Mono
containing the cosmos container response with the
created container or an error.public Mono<CosmosContainerResponse> createContainerIfNotExists(String id, String partitionKeyPath, ThroughputProperties throughputProperties)
The throughput properties will only be used if the specified container
does not exist and therefor a new container will be created.
After subscription the operation will be performed. The Mono
upon
successful completion will contain a cosmos container response with the
created container. In case of failure the Mono
will error.
id
- the cosmos container id.partitionKeyPath
- the partition key path.throughputProperties
- the throughput properties for the container.Mono
containing the cosmos container response with the
created container or an error.public CosmosPagedFlux<CosmosContainerProperties> readAllContainers(CosmosQueryRequestOptions options)
After subscription the operation will be performed. The CosmosPagedFlux
will
contain one or several feed response of the read containers. In case of
failure the CosmosPagedFlux
will error.
options
- CosmosQueryRequestOptions
CosmosPagedFlux
containing one or several feed response pages of read
containers or an error.public CosmosPagedFlux<CosmosContainerProperties> readAllContainers()
After subscription the operation will be performed. The CosmosPagedFlux
will
contain one or several feed response of the read containers. In case of
failure the CosmosPagedFlux
will error.
CosmosPagedFlux
containing one or several feed response pages of read
containers or an error.public CosmosPagedFlux<CosmosContainerProperties> queryContainers(String query)
After subscription the operation will be performed. The CosmosPagedFlux
will
contain one or several feed response of the obtained containers. In case of
failure the CosmosPagedFlux
will error.
query
- the query.CosmosPagedFlux
containing one or several feed response pages of the
obtained containers or an error.public CosmosPagedFlux<CosmosContainerProperties> queryContainers(String query, CosmosQueryRequestOptions options)
After subscription the operation will be performed. The CosmosPagedFlux
will
contain one or several feed response of the obtained containers. In case of
failure the CosmosPagedFlux
will error.
query
- the query.options
- the query request options.CosmosPagedFlux
containing one or several feed response pages of the
obtained containers or an error.public CosmosPagedFlux<CosmosContainerProperties> queryContainers(SqlQuerySpec querySpec)
After subscription the operation will be performed. The CosmosPagedFlux
will
contain one or several feed response of the obtained containers. In case of
failure the CosmosPagedFlux
will error.
querySpec
- the SQL query specification.CosmosPagedFlux
containing one or several feed response pages of the
obtained containers or an error.public CosmosPagedFlux<CosmosContainerProperties> queryContainers(SqlQuerySpec querySpec, CosmosQueryRequestOptions options)
After subscription the operation will be performed. The CosmosPagedFlux
will
contain one or several feed response of the obtained containers. In case of
failure the CosmosPagedFlux
will error.
querySpec
- the SQL query specification.options
- the query request options.CosmosPagedFlux
containing one or several feed response pages of the
obtained containers or an error.public CosmosAsyncContainer getContainer(String id)
id
- id of the containerpublic Mono<CosmosUserResponse> createUser(CosmosUserProperties userProperties)
Mono
upon successful completion will contain a single resource
response with the created user. In case of failure the Mono
will
error.userProperties
- the cosmos user propertiesMono
containing the single resource response with the
created cosmos user or an error.@Beta(value=V4_14_0, warningText="Preview API - subject to change in non-backwards compatible way") public Mono<CosmosClientEncryptionKeyResponse> createClientEncryptionKey(CosmosClientEncryptionKeyProperties keyProperties)
Mono
upon successful completion will contain a single resource
response with the created client encryption key. In case of failure the Mono
will
error.keyProperties
- the cosmos client encryption key propertiesMono
containing the single resource response with the
created cosmos client encryption key or an error.public Mono<CosmosUserResponse> upsertUser(CosmosUserProperties userProperties)
Mono
upon successful completion will contain a single
resource response with the created user. In case of failure the Mono
will error.userProperties
- the cosmos user propertiesMono
containing the single resource response with the
upserted user or an error.public CosmosPagedFlux<CosmosUserProperties> readAllUsers()
After subscription the operation will be performed. The CosmosPagedFlux
will
contain one or several feed response of the read cosmos users. In case of
failure the CosmosPagedFlux
will error.
CosmosPagedFlux
containing one or several feed response pages of the
read cosmos users or an error.@Beta(value=V4_14_0, warningText="Preview API - subject to change in non-backwards compatible way") public CosmosAsyncClientEncryptionKey getClientEncryptionKey(String id)
id
- id of the clientEncryptionKey@Beta(value=V4_14_0, warningText="Preview API - subject to change in non-backwards compatible way") public CosmosPagedFlux<CosmosClientEncryptionKeyProperties> readAllClientEncryptionKeys()
After subscription the operation will be performed. The CosmosPagedFlux
will
contain one or several feed response of the read cosmos client encryption keys. In case of
failure the CosmosPagedFlux
will error.
CosmosPagedFlux
containing one or several feed response pages of the
read cosmos client encryption keys or an error.@Beta(value=V4_14_0, warningText="Preview API - subject to change in non-backwards compatible way") public CosmosPagedFlux<CosmosClientEncryptionKeyProperties> readAllClientEncryptionKeys(CosmosQueryRequestOptions options)
After subscription the operation will be performed. The CosmosPagedFlux
will
contain one or several feed response of the read cosmos client encryption keys. In case of
failure the CosmosPagedFlux
will error.
options
- the query request options.CosmosPagedFlux
containing one or several feed response pages of the
read cosmos client encryption keys or an error.@Beta(value=V4_14_0, warningText="Preview API - subject to change in non-backwards compatible way") public CosmosPagedFlux<CosmosClientEncryptionKeyProperties> queryClientEncryptionKeys(String query)
After subscription the operation will be performed. The CosmosPagedFlux
will
contain one or several feed response of the obtained client encryption keys. In case of
failure the CosmosPagedFlux
will error.
query
- query as string.CosmosPagedFlux
containing one or several feed response pages of the
obtained client encryption keys or an error.@Beta(value=V4_14_0, warningText="Preview API - subject to change in non-backwards compatible way") public CosmosPagedFlux<CosmosClientEncryptionKeyProperties> queryClientEncryptionKeys(String query, CosmosQueryRequestOptions options)
After subscription the operation will be performed. The CosmosPagedFlux
will
contain one or several feed response of the obtained client encryption keys. In case of
failure the CosmosPagedFlux
will error.
query
- query as string.options
- the query request options.CosmosPagedFlux
containing one or several feed response pages of the
obtained client encryption keys or an error.@Beta(value=V4_14_0, warningText="Preview API - subject to change in non-backwards compatible way") public CosmosPagedFlux<CosmosClientEncryptionKeyProperties> queryClientEncryptionKeys(SqlQuerySpec querySpec)
After subscription the operation will be performed. The CosmosPagedFlux
will
contain one or several feed response of the obtained client encryption keys. In case of
failure the CosmosPagedFlux
will error.
querySpec
- the SQL query specification.CosmosPagedFlux
containing one or several feed response pages of the
obtained client encryption keys or an error.@Beta(value=V4_14_0, warningText="Preview API - subject to change in non-backwards compatible way") public CosmosPagedFlux<CosmosClientEncryptionKeyProperties> queryClientEncryptionKeys(SqlQuerySpec querySpec, CosmosQueryRequestOptions options)
After subscription the operation will be performed. The CosmosPagedFlux
will
contain one or several feed response of the obtained client encryption keys. In case of
failure the CosmosPagedFlux
will error.
querySpec
- the SQL query specification.options
- the query request options.CosmosPagedFlux
containing one or several feed response pages of the
obtained client encryption keys or an error.public CosmosPagedFlux<CosmosUserProperties> queryUsers(String query)
After subscription the operation will be performed. The CosmosPagedFlux
will
contain one or several feed response of the obtained users. In case of
failure the CosmosPagedFlux
will error.
query
- query as string.CosmosPagedFlux
containing one or several feed response pages of the
obtained users or an error.public CosmosPagedFlux<CosmosUserProperties> queryUsers(String query, CosmosQueryRequestOptions options)
After subscription the operation will be performed. The CosmosPagedFlux
will
contain one or several feed response of the obtained users. In case of
failure the CosmosPagedFlux
will error.
query
- query as string.options
- the query request options.CosmosPagedFlux
containing one or several feed response pages of the
obtained users or an error.public CosmosPagedFlux<CosmosUserProperties> queryUsers(SqlQuerySpec querySpec)
After subscription the operation will be performed. The CosmosPagedFlux
will
contain one or several feed response of the obtained users. In case of
failure the CosmosPagedFlux
will error.
querySpec
- the SQL query specification.CosmosPagedFlux
containing one or several feed response pages of the
obtained users or an error.public CosmosPagedFlux<CosmosUserProperties> queryUsers(SqlQuerySpec querySpec, CosmosQueryRequestOptions options)
After subscription the operation will be performed. The CosmosPagedFlux
will
contain one or several feed response of the obtained users. In case of
failure the CosmosPagedFlux
will error.
querySpec
- the SQL query specification.options
- the query request options.CosmosPagedFlux
containing one or several feed response pages of the
obtained users or an error.public CosmosAsyncUser getUser(String id)
id
- the idpublic Mono<ThroughputResponse> replaceThroughput(ThroughputProperties throughputProperties)
throughputProperties
- the throughput properties.public Mono<ThroughputResponse> readThroughput()
Copyright © 2021 Microsoft Corporation. All rights reserved.