CosmosEncryptionAsyncContainer Class
- java.
lang. Object - com.
azure. cosmos. encryption. CosmosEncryptionAsyncContainer
- com.
public final class CosmosEncryptionAsyncContainer
CosmosAsyncContainer with encryption capabilities.
Method Summary
Methods inherited from java.lang.Object
Method Details
createItem
public Mono<>
Creates an item.
After subscription the operation will be performed. The Mono upon successful completion will contain a single resource response with the created Cosmos item. In case of failure the Mono will error.
Parameters:
Returns:
createItem
public Mono<>
Creates a Cosmos item.
Parameters:
Returns:
createItem
public Mono<>
Creates an item.
After subscription the operation will be performed. The Mono upon successful completion will contain a single resource response with the created Cosmos item. In case of failure the Mono will error.
Parameters:
Returns:
deleteItem
public Mono<>
Deletes the item.
After subscription the operation will be performed. The Mono upon successful completion will contain a single Cosmos item response for the deleted item.
Parameters:
Returns:
patchItem
public Mono<>
Run patch operations on an Item.
After subscription the operation will be performed. The Mono upon successful completion will contain a single Cosmos item response with the patched item.
Parameters:
Returns:
queryItems
public CosmosPagedFlux
Query for items in the current container using a SqlQuerySpec and CosmosQueryRequestOptions.
After subscription the operation will be performed. The Flux will contain one or several feed response of the obtained items. In case of failure the CosmosPagedFlux<T> will error.
Parameters:
Returns:
queryItems
public CosmosPagedFlux
Query for items in the current container using a SqlQuerySpec.
After subscription the operation will be performed. The CosmosPagedFlux<T> will contain one or several feed response of the obtained items. In case of failure the CosmosPagedFlux<T> will error.
Parameters:
Returns:
queryItems
public CosmosPagedFlux
Query for items in the current container using a string.
After subscription the operation will be performed. The CosmosPagedFlux<T> will contain one or several feed response of the obtained items. In case of failure the CosmosPagedFlux<T> will error.
Parameters:
Returns:
queryItems
public CosmosPagedFlux
Query for items in the current container.
After subscription the operation will be performed. The CosmosPagedFlux<T> will contain one or several feed response of the obtained items. In case of failure the CosmosPagedFlux<T> will error.
Parameters:
Returns:
queryItemsOnEncryptedProperties
public CosmosPagedFlux
Query for items in the current container using a SqlQuerySpecWithEncryption.
After subscription the operation will be performed. The CosmosPagedFlux<T> will contain one or several feed response of the obtained items. In case of failure the CosmosPagedFlux<T> will error.
Parameters:
Returns:
readItem
public Mono<>
Reads an item using a configured CosmosItemRequestOptions.
After subscription the operation will be performed. The Mono upon successful completion will contain a Cosmos item response with the read item.
Parameters:
Returns:
readItem
public Mono<>
Reads an item.
After subscription the operation will be performed. The Mono upon successful completion will contain an item response with the read item.
Parameters:
Returns:
replaceItem
public Mono<>
Replaces an item with the passed in item and encrypts the requested fields.
After subscription the operation will be performed. The Mono upon successful completion will contain a single Cosmos item response with the replaced item.
Parameters:
Returns:
replaceItem
public Mono<>
Replaces an item with the passed in item and encrypts the requested fields.
After subscription the operation will be performed. The Mono upon successful completion will contain a single Cosmos item response with the replaced item.
Parameters:
Returns:
upsertItem
public Mono<>
Upserts an item.
After subscription the operation will be performed. The Mono upon successful completion will contain a single resource response with the upserted item. In case of failure the Mono will error.
Parameters:
Returns:
upsertItem
public Mono<>
Upserts an item.
After subscription the operation will be performed. The Mono upon successful completion will contain a single resource response with the upserted item. In case of failure the Mono will error.
Parameters:
Returns:
upsertItem
public Mono<>
Upserts an item.
After subscription the operation will be performed. The Mono upon successful completion will contain a single resource response with the upserted item. In case of failure the Mono will error.
Parameters:
Returns:
executeBulkOperations
public Flux<>
Executes flux of operations in Bulk.
Parameters:
Returns:
executeBulkOperations
public Flux<>
Executes flux of operations in Bulk.
Parameters:
Returns:
deleteItem
public Mono<>
Deletes an item.
After subscription the operation will be performed. The Mono upon successful completion will contain a single Cosmos item response for the deleted item.
Parameters:
Returns:
deleteItem
public Mono<>
Deletes the item.
After subscription the operation will be performed. The Mono upon successful completion will contain a single Cosmos item response for the deleted item.
Parameters:
Returns:
executeCosmosBatch
public Mono
Executes the encrypted transactional batch.
Parameters:
Returns:
If the transactional batch executes successfully, the value returned by CosmosBatchResponse#getStatusCode on the response returned will be set to 200}.
If an operation within the transactional batch fails during execution, no changes from the batch will be committed and the status of the failing operation is made available by CosmosBatchResponse#getStatusCode or by the exception. To obtain information about the operations that failed in case of some user error like conflict, not found etc, the response can be enumerated. This returns CosmosBatchOperationResult instances corresponding to each operation in the transactional batch in the order they were added to the transactional batch. For a result corresponding to an operation within the transactional batch, use CosmosBatchOperationResult#getStatusCode to access the status of the operation. If the operation was not executed or it was aborted due to the failure of another operation within the transactional batch, the value of this field will be 424; for the operation that caused the batch to abort, the value of this field will indicate the cause of failure.
If there are issues such as request timeouts, Gone, session not available, network failure or if the service somehow returns 5xx then the Mono will return error instead of CosmosBatchResponse.
Use CosmosBatchResponse#isSuccessStatusCode on the response returned to ensure that the transactional batch succeeded.
executeCosmosBatch
public Mono
Executes the encrypted transactional batch.
Parameters:
Returns:
If the transactional batch executes successfully, the value returned by CosmosBatchResponse#getStatusCode on the response returned will be set to 200}.
If an operation within the transactional batch fails during execution, no changes from the batch will be committed and the status of the failing operation is made available by CosmosBatchResponse#getStatusCode or by the exception. To obtain information about the operations that failed in case of some user error like conflict, not found etc, the response can be enumerated. This returns CosmosBatchOperationResult instances corresponding to each operation in the transactional batch in the order they were added to the transactional batch. For a result corresponding to an operation within the transactional batch, use CosmosBatchOperationResult#getStatusCode to access the status of the operation. If the operation was not executed or it was aborted due to the failure of another operation within the transactional batch, the value of this field will be 424; for the operation that caused the batch to abort, the value of this field will indicate the cause of failure.
If there are issues such as request timeouts, Gone, session not available, network failure or if the service somehow returns 5xx then the Mono will return error instead of CosmosBatchResponse.
Use CosmosBatchResponse#isSuccessStatusCode on the response returned to ensure that the transactional batch succeeded.
getCosmosAsyncContainer
public CosmosAsyncContainer getCosmosAsyncContainer()
Gets the CosmosAsyncContainer
Returns:
Applies to
Azure SDK for Java
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for