public class CosmosAsyncDatabase extends Object
Modifier and Type | Method and Description |
---|---|
reactor.core.publisher.Mono<CosmosAsyncContainerResponse> |
createContainer(CosmosContainerProperties containerProperties)
Creates a document container.
|
reactor.core.publisher.Mono<CosmosAsyncContainerResponse> |
createContainer(CosmosContainerProperties containerProperties,
CosmosContainerRequestOptions options)
Creates a document container.
|
reactor.core.publisher.Mono<CosmosAsyncContainerResponse> |
createContainer(CosmosContainerProperties containerProperties,
int throughput)
Creates a document container.
|
reactor.core.publisher.Mono<CosmosAsyncContainerResponse> |
createContainer(CosmosContainerProperties containerProperties,
int throughput,
CosmosContainerRequestOptions options)
Creates a document container.
|
reactor.core.publisher.Mono<CosmosAsyncContainerResponse> |
createContainer(String id,
String partitionKeyPath)
Creates a document container.
|
reactor.core.publisher.Mono<CosmosAsyncContainerResponse> |
createContainer(String id,
String partitionKeyPath,
int throughput)
Creates a document container.
|
reactor.core.publisher.Mono<CosmosAsyncContainerResponse> |
createContainerIfNotExists(CosmosContainerProperties containerProperties)
Creates a document container if it does not exist on the service.
|
reactor.core.publisher.Mono<CosmosAsyncContainerResponse> |
createContainerIfNotExists(CosmosContainerProperties containerProperties,
int throughput)
Creates a document container if it does not exist on the service.
|
reactor.core.publisher.Mono<CosmosAsyncContainerResponse> |
createContainerIfNotExists(String id,
String partitionKeyPath)
Creates a document container if it does not exist on the service.
|
reactor.core.publisher.Mono<CosmosAsyncContainerResponse> |
createContainerIfNotExists(String id,
String partitionKeyPath,
int throughput)
Creates a document container if it does not exist on the service.
|
reactor.core.publisher.Mono<CosmosAsyncUserResponse> |
createUser(CosmosUserProperties settings)
Creates a user After subscription the operation will be performed.
|
reactor.core.publisher.Mono<CosmosAsyncDatabaseResponse> |
delete()
Deletes a database.
|
reactor.core.publisher.Mono<CosmosAsyncDatabaseResponse> |
delete(CosmosDatabaseRequestOptions options)
Deletes a database.
|
CosmosAsyncContainer |
getContainer(String id)
Gets a CosmosAsyncContainer object without making a service call
|
String |
getId()
Get the id of the CosmosAsyncDatabase
|
CosmosAsyncUser |
getUser(String id) |
CosmosContinuablePagedFlux<CosmosContainerProperties> |
queryContainers(SqlQuerySpec querySpec)
Query for cosmos containers in a cosmos database.
|
CosmosContinuablePagedFlux<CosmosContainerProperties> |
queryContainers(SqlQuerySpec querySpec,
FeedOptions options)
Query for cosmos containers in a cosmos database.
|
CosmosContinuablePagedFlux<CosmosContainerProperties> |
queryContainers(String query)
Query for cosmos containers in a cosmos database.
|
CosmosContinuablePagedFlux<CosmosContainerProperties> |
queryContainers(String query,
FeedOptions options)
Query for cosmos containers in a cosmos database.
|
CosmosContinuablePagedFlux<CosmosUserProperties> |
queryUsers(SqlQuerySpec querySpec)
Query for cosmos users in a database.
|
CosmosContinuablePagedFlux<CosmosUserProperties> |
queryUsers(SqlQuerySpec querySpec,
FeedOptions options)
Query for cosmos users in a database.
|
CosmosContinuablePagedFlux<CosmosUserProperties> |
queryUsers(String query)
Query for cosmos users in a database.
|
CosmosContinuablePagedFlux<CosmosUserProperties> |
queryUsers(String query,
FeedOptions options)
Query for cosmos users in a database.
|
reactor.core.publisher.Mono<CosmosAsyncDatabaseResponse> |
read()
Reads a database.
|
reactor.core.publisher.Mono<CosmosAsyncDatabaseResponse> |
read(CosmosDatabaseRequestOptions options)
Reads a database.
|
CosmosContinuablePagedFlux<CosmosContainerProperties> |
readAllContainers()
Reads all cosmos containers.
|
CosmosContinuablePagedFlux<CosmosContainerProperties> |
readAllContainers(FeedOptions options)
Reads all cosmos containers.
|
CosmosContinuablePagedFlux<CosmosUserProperties> |
readAllUsers()
Reads all cosmos users in a database.
|
CosmosContinuablePagedFlux<CosmosUserProperties> |
readAllUsers(FeedOptions options)
Reads all cosmos users in a database.
|
reactor.core.publisher.Mono<Integer> |
readProvisionedThroughput()
Gets the throughput of the database
|
reactor.core.publisher.Mono<Integer> |
replaceProvisionedThroughput(int requestUnitsPerSecond)
Sets throughput provisioned for a container in measurement of
Requests-per-Unit in the Azure Cosmos service.
|
reactor.core.publisher.Mono<CosmosAsyncUserResponse> |
upsertUser(CosmosUserProperties settings)
Upsert a user.
|
public String getId()
public reactor.core.publisher.Mono<CosmosAsyncDatabaseResponse> 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 reactor.core.publisher.Mono<CosmosAsyncDatabaseResponse> 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 reactor.core.publisher.Mono<CosmosAsyncDatabaseResponse> 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 responsepublic reactor.core.publisher.Mono<CosmosAsyncDatabaseResponse> 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 optionsMono
containing the single cosmos database responsepublic reactor.core.publisher.Mono<CosmosAsyncContainerResponse> 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 nullpublic reactor.core.publisher.Mono<CosmosAsyncContainerResponse> createContainer(CosmosContainerProperties containerProperties, int throughput)
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.throughput
- the throughput for the containerMono
containing the single cosmos container response with
the created container or an error.IllegalArgumentException
- thown if containerProerties are nullpublic reactor.core.publisher.Mono<CosmosAsyncContainerResponse> 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 optionsMono
containing the cosmos container response with the
created container or an error.IllegalArgumentException
- containerProperties can not be nullpublic reactor.core.publisher.Mono<CosmosAsyncContainerResponse> createContainer(CosmosContainerProperties containerProperties, int throughput, 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.throughput
- the throughput for the containeroptions
- the cosmos container request optionsMono
containing the cosmos container response with the
created container or an error.IllegalArgumentException
- containerProperties cannot be nullpublic reactor.core.publisher.Mono<CosmosAsyncContainerResponse> 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 idpartitionKeyPath
- the partition key pathMono
containing the cosmos container response with the
created container or an error.public reactor.core.publisher.Mono<CosmosAsyncContainerResponse> createContainer(String id, String partitionKeyPath, int throughput)
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 idpartitionKeyPath
- the partition key paththroughput
- the throughput for the containerMono
containing the cosmos container response with the
created container or an error.public reactor.core.publisher.Mono<CosmosAsyncContainerResponse> 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 reactor.core.publisher.Mono<CosmosAsyncContainerResponse> createContainerIfNotExists(CosmosContainerProperties containerProperties, int throughput)
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 propertiesthroughput
- the throughput for the containerMono
containing the cosmos container response with the
created or existing container or an error.public reactor.core.publisher.Mono<CosmosAsyncContainerResponse> 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 idpartitionKeyPath
- the partition key pathMono
containing the cosmos container response with the
created container or an error.public reactor.core.publisher.Mono<CosmosAsyncContainerResponse> createContainerIfNotExists(String id, String partitionKeyPath, int throughput)
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 idpartitionKeyPath
- the partition key paththroughput
- the throughput for the containerMono
containing the cosmos container response with the
created container or an error.public CosmosContinuablePagedFlux<CosmosContainerProperties> readAllContainers(FeedOptions options)
After subscription the operation will be performed. The CosmosContinuablePagedFlux
will
contain one or several feed response of the read containers. In case of
failure the CosmosContinuablePagedFlux
will error.
options
- FeedOptions
CosmosContinuablePagedFlux
containing one or several feed response pages of read
containers or an error.public CosmosContinuablePagedFlux<CosmosContainerProperties> readAllContainers()
After subscription the operation will be performed. The CosmosContinuablePagedFlux
will
contain one or several feed response of the read containers. In case of
failure the CosmosContinuablePagedFlux
will error.
CosmosContinuablePagedFlux
containing one or several feed response pages of read
containers or an error.public CosmosContinuablePagedFlux<CosmosContainerProperties> queryContainers(String query)
After subscription the operation will be performed. The CosmosContinuablePagedFlux
will
contain one or several feed response of the obtained containers. In case of
failure the CosmosContinuablePagedFlux
will error.
query
- the queryCosmosContinuablePagedFlux
containing one or several feed response pages of the
obtained containers or an error.public CosmosContinuablePagedFlux<CosmosContainerProperties> queryContainers(String query, FeedOptions options)
After subscription the operation will be performed. The CosmosContinuablePagedFlux
will
contain one or several feed response of the obtained containers. In case of
failure the CosmosContinuablePagedFlux
will error.
query
- the query.options
- the feed options.CosmosContinuablePagedFlux
containing one or several feed response pages of the
obtained containers or an error.public CosmosContinuablePagedFlux<CosmosContainerProperties> queryContainers(SqlQuerySpec querySpec)
After subscription the operation will be performed. The CosmosContinuablePagedFlux
will
contain one or several feed response of the obtained containers. In case of
failure the CosmosContinuablePagedFlux
will error.
querySpec
- the SQL query specification.CosmosContinuablePagedFlux
containing one or several feed response pages of the
obtained containers or an error.public CosmosContinuablePagedFlux<CosmosContainerProperties> queryContainers(SqlQuerySpec querySpec, FeedOptions options)
After subscription the operation will be performed. The CosmosContinuablePagedFlux
will
contain one or several feed response of the obtained containers. In case of
failure the CosmosContinuablePagedFlux
will error.
querySpec
- the SQL query specification.options
- the feed options.CosmosContinuablePagedFlux
containing one or several feed response pages of the
obtained containers or an error.public CosmosAsyncContainer getContainer(String id)
id
- id of the containerpublic reactor.core.publisher.Mono<CosmosAsyncUserResponse> createUser(CosmosUserProperties settings)
Mono
upon successful completion will contain a single resource
response with the created user. In case of failure the Mono
will
error.settings
- the cosmos user propertiesMono
containing the single resource response with the
created cosmos user or an error.public reactor.core.publisher.Mono<CosmosAsyncUserResponse> upsertUser(CosmosUserProperties settings)
Mono
upon successful completion will contain a single
resource response with the created user. In case of failure the Mono
will error.settings
- the cosmos user propertiesMono
containing the single resource response with the
upserted user or an error.public CosmosContinuablePagedFlux<CosmosUserProperties> readAllUsers()
After subscription the operation will be performed. The CosmosContinuablePagedFlux
will
contain one or several feed response of the read cosmos users. In case of
failure the CosmosContinuablePagedFlux
will error.
CosmosContinuablePagedFlux
containing one or several feed response pages of the
read cosmos users or an error.public CosmosContinuablePagedFlux<CosmosUserProperties> readAllUsers(FeedOptions options)
After subscription the operation will be performed. The CosmosContinuablePagedFlux
will
contain one or several feed response of the read cosmos users. In case of
failure the CosmosContinuablePagedFlux
will error.
options
- the feed options.CosmosContinuablePagedFlux
containing one or several feed response pages of the
read cosmos users or an error.public CosmosContinuablePagedFlux<CosmosUserProperties> queryUsers(String query)
After subscription the operation will be performed. The CosmosContinuablePagedFlux
will
contain one or several feed response of the obtained users. In case of
failure the CosmosContinuablePagedFlux
will error.
query
- query as stringCosmosContinuablePagedFlux
containing one or several feed response pages of the
obtained users or an error.public CosmosContinuablePagedFlux<CosmosUserProperties> queryUsers(String query, FeedOptions options)
After subscription the operation will be performed. The CosmosContinuablePagedFlux
will
contain one or several feed response of the obtained users. In case of
failure the CosmosContinuablePagedFlux
will error.
query
- query as stringoptions
- the feed optionsCosmosContinuablePagedFlux
containing one or several feed response pages of the
obtained users or an error.public CosmosContinuablePagedFlux<CosmosUserProperties> queryUsers(SqlQuerySpec querySpec)
After subscription the operation will be performed. The CosmosContinuablePagedFlux
will
contain one or several feed response of the obtained users. In case of
failure the CosmosContinuablePagedFlux
will error.
querySpec
- the SQL query specification.CosmosContinuablePagedFlux
containing one or several feed response pages of the
obtained users or an error.public CosmosContinuablePagedFlux<CosmosUserProperties> queryUsers(SqlQuerySpec querySpec, FeedOptions options)
After subscription the operation will be performed. The CosmosContinuablePagedFlux
will
contain one or several feed response of the obtained users. In case of
failure the CosmosContinuablePagedFlux
will error.
querySpec
- the SQL query specification.options
- the feed options.CosmosContinuablePagedFlux
containing one or several feed response pages of the
obtained users or an error.public CosmosAsyncUser getUser(String id)
public reactor.core.publisher.Mono<Integer> readProvisionedThroughput()
Mono
containing throughput or an error.public reactor.core.publisher.Mono<Integer> replaceProvisionedThroughput(int requestUnitsPerSecond)
requestUnitsPerSecond
- the cosmos container throughput, expressed in
Request Units per secondMono
containing throughput or an error.Copyright © 2020 Microsoft Corporation. All rights reserved.