public class CosmosDatabase extends Object
Modifier and Type | Method and Description |
---|---|
reactor.core.publisher.Mono<CosmosContainerResponse> |
createContainer(CosmosContainerProperties containerSettings)
Creates a document container.
|
reactor.core.publisher.Mono<CosmosContainerResponse> |
createContainer(CosmosContainerProperties containerSettings,
CosmosContainerRequestOptions options)
Creates a document container.
|
reactor.core.publisher.Mono<CosmosContainerResponse> |
createContainer(CosmosContainerProperties containerSettings,
int throughput)
Creates a document container.
|
reactor.core.publisher.Mono<CosmosContainerResponse> |
createContainer(CosmosContainerProperties containerSettings,
int throughput,
CosmosContainerRequestOptions options)
Creates a document container.
|
reactor.core.publisher.Mono<CosmosContainerResponse> |
createContainer(String id,
String partitionKeyPath)
Creates a document container.
|
reactor.core.publisher.Mono<CosmosContainerResponse> |
createContainer(String id,
String partitionKeyPath,
int throughput)
Creates a document container.
|
reactor.core.publisher.Mono<CosmosContainerResponse> |
createContainerIfNotExists(CosmosContainerProperties containerSettings)
Creates a document container if it does not exist on the service.
|
reactor.core.publisher.Mono<CosmosContainerResponse> |
createContainerIfNotExists(CosmosContainerProperties containerSettings,
int throughput)
Creates a document container if it does not exist on the service.
|
reactor.core.publisher.Mono<CosmosContainerResponse> |
createContainerIfNotExists(String id,
String partitionKeyPath)
Creates a document container if it does not exist on the service.
|
reactor.core.publisher.Mono<CosmosContainerResponse> |
createContainerIfNotExists(String id,
String partitionKeyPath,
int throughput)
Creates a document container if it does not exist on the service.
|
reactor.core.publisher.Mono<CosmosUserResponse> |
createUser(CosmosUserProperties settings)
Creates a user After subscription the operation will be performed.
|
reactor.core.publisher.Mono<CosmosDatabaseResponse> |
delete()
Deletes a database.
|
reactor.core.publisher.Mono<CosmosDatabaseResponse> |
delete(CosmosDatabaseRequestOptions options)
Deletes a database.
|
CosmosContainer |
getContainer(String id)
Gets a CosmosContainer object without making a service call
|
CosmosUser |
getUser(String id) |
String |
id()
Get the id of the CosmosDatabase
|
reactor.core.publisher.Flux<FeedResponse<CosmosContainerProperties>> |
queryContainers(SqlQuerySpec querySpec)
Query for cosmos containers in a cosmos database.
|
reactor.core.publisher.Flux<FeedResponse<CosmosContainerProperties>> |
queryContainers(SqlQuerySpec querySpec,
FeedOptions options)
Query for cosmos containers in a cosmos database.
|
reactor.core.publisher.Flux<FeedResponse<CosmosContainerProperties>> |
queryContainers(String query)
Query for cosmos containers in a cosmos database.
|
reactor.core.publisher.Flux<FeedResponse<CosmosContainerProperties>> |
queryContainers(String query,
FeedOptions options)
Query for cosmos containers in a cosmos database.
|
reactor.core.publisher.Flux<FeedResponse<CosmosUserProperties>> |
queryUsers(SqlQuerySpec querySpec)
Query for cosmos users in a database.
|
reactor.core.publisher.Flux<FeedResponse<CosmosUserProperties>> |
queryUsers(SqlQuerySpec querySpec,
FeedOptions options)
Query for cosmos users in a database.
|
reactor.core.publisher.Flux<FeedResponse<CosmosUserProperties>> |
queryUsers(String query)
Query for cosmos users in a database.
|
reactor.core.publisher.Flux<FeedResponse<CosmosUserProperties>> |
queryUsers(String query,
FeedOptions options)
Query for cosmos users in a database.
|
reactor.core.publisher.Mono<CosmosDatabaseResponse> |
read()
Reads a database.
|
reactor.core.publisher.Mono<CosmosDatabaseResponse> |
read(CosmosDatabaseRequestOptions options)
Reads a database.
|
reactor.core.publisher.Flux<FeedResponse<CosmosContainerProperties>> |
readAllContainers()
Reads all cosmos containers.
|
reactor.core.publisher.Flux<FeedResponse<CosmosContainerProperties>> |
readAllContainers(FeedOptions options)
Reads all cosmos containers.
|
reactor.core.publisher.Flux<FeedResponse<CosmosUserProperties>> |
readAllUsers()
Reads all cosmos users in a database.
|
reactor.core.publisher.Flux<FeedResponse<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<CosmosUserResponse> |
upsertUser(CosmosUserProperties settings)
Upsert a user.
|
public String id()
public reactor.core.publisher.Mono<CosmosDatabaseResponse> read()
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<CosmosDatabaseResponse> read(CosmosDatabaseRequestOptions options)
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<CosmosDatabaseResponse> delete()
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<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 optionsMono
containing the single cosmos database responsepublic reactor.core.publisher.Mono<CosmosContainerResponse> createContainer(CosmosContainerProperties containerSettings)
Mono
upon
successful completion will contain a cosmos container response with the
created collection. In case of failure the Mono
will error.containerSettings
- the container properties.Flux
containing the single cosmos container response with
the created container or an error.public reactor.core.publisher.Mono<CosmosContainerResponse> createContainer(CosmosContainerProperties containerSettings, int throughput)
Mono
upon
successful completion will contain a cosmos container response with the
created collection. In case of failure the Mono
will error.containerSettings
- the container properties.throughput
- the throughput for the containerFlux
containing the single cosmos container response with
the created container or an error.public reactor.core.publisher.Mono<CosmosContainerResponse> createContainer(CosmosContainerProperties containerSettings, CosmosContainerRequestOptions options)
Mono
upon
successful completion will contain a cosmos container response with the
created collection. In case of failure the Mono
will error.containerSettings
- the containerSettings.options
- the cosmos container request optionsFlux
containing the cosmos container response with the
created container or an error.public reactor.core.publisher.Mono<CosmosContainerResponse> createContainer(CosmosContainerProperties containerSettings, int throughput, CosmosContainerRequestOptions options)
Mono
upon
successful completion will contain a cosmos container response with the
created collection. In case of failure the Mono
will error.containerSettings
- the containerSettings.throughput
- the throughput for the containeroptions
- the cosmos container request optionsFlux
containing the cosmos container response with the
created container or an error.public reactor.core.publisher.Mono<CosmosContainerResponse> createContainer(String id, String partitionKeyPath)
Mono
upon
successful completion will contain a cosmos container response with the
created collection. In case of failure the Mono
will error.id
- the cosmos container idpartitionKeyPath
- the partition key pathFlux
containing the cosmos container response with the
created container or an error.public reactor.core.publisher.Mono<CosmosContainerResponse> createContainer(String id, String partitionKeyPath, int throughput)
Mono
upon
successful completion will contain a cosmos container response with the
created collection. In case of failure the Mono
will error.id
- the cosmos container idpartitionKeyPath
- the partition key paththroughput
- the throughput for the containerFlux
containing the cosmos container response with the
created container or an error.public reactor.core.publisher.Mono<CosmosContainerResponse> createContainerIfNotExists(CosmosContainerProperties containerSettings)
After subscription the operation will be performed. The Mono
upon
successful completion will contain a cosmos container response with the
created or existing collection. In case of failure the Mono
will
error.
containerSettings
- the container propertiesMono
containing the cosmos container response with the
created or existing container or an error.public reactor.core.publisher.Mono<CosmosContainerResponse> createContainerIfNotExists(CosmosContainerProperties containerSettings, 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 collection. In case of failure the Mono
will
error.
containerSettings
- 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<CosmosContainerResponse> createContainerIfNotExists(String id, String partitionKeyPath)
Mono
upon
successful completion will contain a cosmos container response with the
created collection. In case of failure the Mono
will error.id
- the cosmos container idpartitionKeyPath
- the partition key pathFlux
containing the cosmos container response with the
created container or an error.public reactor.core.publisher.Mono<CosmosContainerResponse> createContainerIfNotExists(String id, String partitionKeyPath, int throughput)
Mono
upon
successful completion will contain a cosmos container response with the
created collection. In case of failure the Mono
will error.id
- the cosmos container idpartitionKeyPath
- the partition key paththroughput
- the throughput for the containerFlux
containing the cosmos container response with the
created container or an error.public reactor.core.publisher.Flux<FeedResponse<CosmosContainerProperties>> readAllContainers(FeedOptions options)
Flux
will
contain one or several feed response of the read containers. In case of
failure the Flux
will error.options
- FeedOptions
Flux
containing one or several feed response pages of read
containers or an error.public reactor.core.publisher.Flux<FeedResponse<CosmosContainerProperties>> readAllContainers()
Flux
will
contain one or several feed response of the read containers. In case of
failure the Flux
will error.Flux
containing one or several feed response pages of read
containers or an error.public reactor.core.publisher.Flux<FeedResponse<CosmosContainerProperties>> queryContainers(String query)
Flux
will
contain one or several feed response of the obtained containers. In case of
failure the Flux
will error.query
- the queryFlux
containing one or several feed response pages of the
obtained containers or an error.public reactor.core.publisher.Flux<FeedResponse<CosmosContainerProperties>> queryContainers(String query, FeedOptions options)
Flux
will
contain one or several feed response of the obtained containers. In case of
failure the Flux
will error.query
- the query.options
- the feed options.Flux
containing one or several feed response pages of the
obtained containers or an error.public reactor.core.publisher.Flux<FeedResponse<CosmosContainerProperties>> queryContainers(SqlQuerySpec querySpec)
Flux
will
contain one or several feed response of the obtained containers. In case of
failure the Flux
will error.querySpec
- the SQL query specification.Flux
containing one or several feed response pages of the
obtained containers or an error.public reactor.core.publisher.Flux<FeedResponse<CosmosContainerProperties>> queryContainers(SqlQuerySpec querySpec, FeedOptions options)
Flux
will
contain one or several feed response of the obtained containers. In case of
failure the Flux
will error.querySpec
- the SQL query specification.options
- the feed options.Flux
containing one or several feed response pages of the
obtained containers or an error.public CosmosContainer getContainer(String id)
id
- id of the containerpublic reactor.core.publisher.Mono<CosmosUserResponse> 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<CosmosUserResponse> 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 reactor.core.publisher.Flux<FeedResponse<CosmosUserProperties>> readAllUsers()
Flux
will
contain one or several feed response of the read cosmos users. In case of
failure the Flux
will error.Flux
containing one or several feed response pages of the
read cosmos users or an error.public reactor.core.publisher.Flux<FeedResponse<CosmosUserProperties>> readAllUsers(FeedOptions options)
Flux
will
contain one or several feed response of the read cosmos users. In case of
failure the Flux
will error.options
- the feed options.Flux
containing one or several feed response pages of the
read cosmos users or an error.public reactor.core.publisher.Flux<FeedResponse<CosmosUserProperties>> queryUsers(String query)
Flux
will
contain one or several feed response of the obtained users. In case of
failure the Flux
will error.query
- query as stringFlux
containing one or several feed response pages of the
obtained users or an error.public reactor.core.publisher.Flux<FeedResponse<CosmosUserProperties>> queryUsers(String query, FeedOptions options)
Flux
will
contain one or several feed response of the obtained users. In case of
failure the Flux
will error.query
- query as stringoptions
- the feed optionsFlux
containing one or several feed response pages of the
obtained users or an error.public reactor.core.publisher.Flux<FeedResponse<CosmosUserProperties>> queryUsers(SqlQuerySpec querySpec)
Flux
will
contain one or several feed response of the obtained users. In case of
failure the Flux
will error.querySpec
- the SQL query specification.Flux
containing one or several feed response pages of the
obtained users or an error.public reactor.core.publisher.Flux<FeedResponse<CosmosUserProperties>> queryUsers(SqlQuerySpec querySpec, FeedOptions options)
Flux
will
contain one or several feed response of the obtained users. In case of
failure the Flux
will error.querySpec
- the SQL query specification.options
- the feed options.Flux
containing one or several feed response pages of the
obtained users or an error.public CosmosUser 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 © 2019. All rights reserved.