Package com.azure.cosmos.encryption
Class CosmosEncryptionDatabase
java.lang.Object
com.azure.cosmos.encryption.CosmosEncryptionDatabase
CosmosEncryptionDatabase with encryption capabilities.
-
Method Summary
Modifier and TypeMethodDescriptioncom.azure.cosmos.models.CosmosClientEncryptionKeyResponsecreateClientEncryptionKey(String clientEncryptionKeyId, String encryptionAlgorithm, com.azure.cosmos.models.EncryptionKeyWrapMetadata encryptionKeyWrapMetadata) Creates a client encryption key after subscription the operation will be performed.com.azure.cosmos.CosmosClientEncryptionKeyGets a CosmosClientEncryptionKey object without making a service callcom.azure.cosmos.CosmosDatabaseGets a CosmosDatabase.getCosmosEncryptionContainer(com.azure.cosmos.CosmosContainer container) Gets a Container with Encryption capabilitiesgetCosmosEncryptionContainer(String containerId) Gets a Container with Encryption capabilitiescom.azure.cosmos.util.CosmosPagedIterable<com.azure.cosmos.models.CosmosClientEncryptionKeyProperties>Reads all cosmos client encryption keys in a database.com.azure.cosmos.models.CosmosClientEncryptionKeyResponserewrapClientEncryptionKey(String clientEncryptionKeyId, com.azure.cosmos.models.EncryptionKeyWrapMetadata newEncryptionKeyWrapMetadata) Rewrap a cosmos client encryption key
-
Method Details
-
getClientEncryptionKey
Gets a CosmosClientEncryptionKey object without making a service call- Parameters:
id- id of the clientEncryptionKey- Returns:
- Cosmos ClientEncryptionKey
-
readAllClientEncryptionKeys
public com.azure.cosmos.util.CosmosPagedIterable<com.azure.cosmos.models.CosmosClientEncryptionKeyProperties> readAllClientEncryptionKeys()Reads all cosmos client encryption keys in a database.After subscription the operation will be performed. The
CosmosPagedIterablewill contain one or several feed response of the read cosmos client encryption keys. In case of failure theCosmosPagedIterablewill error.- Returns:
- a
CosmosPagedIterable.
-
createClientEncryptionKey
public com.azure.cosmos.models.CosmosClientEncryptionKeyResponse createClientEncryptionKey(String clientEncryptionKeyId, String encryptionAlgorithm, com.azure.cosmos.models.EncryptionKeyWrapMetadata encryptionKeyWrapMetadata) Creates a client encryption key after subscription the operation will be performed.- Parameters:
clientEncryptionKeyId- Client Encryption Key id.encryptionAlgorithm- Encryption Algorithm.encryptionKeyWrapMetadata- EncryptionKeyWrapMetadata.- Returns:
- the resource response with the created cosmos client encryption key or an error.
-
rewrapClientEncryptionKey
public com.azure.cosmos.models.CosmosClientEncryptionKeyResponse rewrapClientEncryptionKey(String clientEncryptionKeyId, com.azure.cosmos.models.EncryptionKeyWrapMetadata newEncryptionKeyWrapMetadata) Rewrap a cosmos client encryption key- Parameters:
clientEncryptionKeyId- the client encryption key properties to create.newEncryptionKeyWrapMetadata- EncryptionKeyWrapMetadata.- Returns:
- the resource response with the read client encryption key or an error.
-
getCosmosDatabase
public com.azure.cosmos.CosmosDatabase getCosmosDatabase()Gets a CosmosDatabase.- Returns:
- cosmos database
-
getCosmosEncryptionContainer
public CosmosEncryptionContainer getCosmosEncryptionContainer(com.azure.cosmos.CosmosContainer container) Gets a Container with Encryption capabilities- Parameters:
container- original container- Returns:
- container with encryption capabilities
-
getCosmosEncryptionContainer
Gets a Container with Encryption capabilities- Parameters:
containerId- original container id- Returns:
- container with encryption capabilities
-