public class CosmosEncryptionDatabase extends Object
Modifier and Type | Method and Description |
---|---|
CosmosClientEncryptionKeyResponse |
createClientEncryptionKey(String clientEncryptionKeyId,
String encryptionAlgorithm,
EncryptionKeyWrapMetadata encryptionKeyWrapMetadata)
Creates a client encryption key after subscription the operation will be performed.
|
CosmosClientEncryptionKey |
getClientEncryptionKey(String id)
Gets a CosmosClientEncryptionKey object without making a service call
|
CosmosDatabase |
getCosmosDatabase()
Gets a CosmosDatabase.
|
CosmosEncryptionContainer |
getCosmosEncryptionContainer(CosmosContainer container)
Gets a Container with Encryption capabilities
|
CosmosEncryptionContainer |
getCosmosEncryptionContainer(String containerId)
Gets a Container with Encryption capabilities
|
CosmosPagedIterable<CosmosClientEncryptionKeyProperties> |
readAllClientEncryptionKeys()
Reads all cosmos client encryption keys in a database.
|
CosmosClientEncryptionKeyResponse |
rewrapClientEncryptionKey(String clientEncryptionKeyId,
EncryptionKeyWrapMetadata newEncryptionKeyWrapMetadata)
Rewrap a cosmos client encryption key
|
public CosmosClientEncryptionKey getClientEncryptionKey(String id)
id
- id of the clientEncryptionKeypublic CosmosPagedIterable<CosmosClientEncryptionKeyProperties> readAllClientEncryptionKeys()
After subscription the operation will be performed. The CosmosPagedIterable
will
contain one or several feed response of the read cosmos client encryption keys. In case of
failure the CosmosPagedIterable
will error.
CosmosPagedIterable
.public CosmosClientEncryptionKeyResponse createClientEncryptionKey(String clientEncryptionKeyId, String encryptionAlgorithm, EncryptionKeyWrapMetadata encryptionKeyWrapMetadata)
clientEncryptionKeyId
- Client Encryption Key id.encryptionAlgorithm
- Encryption Algorithm.encryptionKeyWrapMetadata
- EncryptionKeyWrapMetadata.public CosmosClientEncryptionKeyResponse rewrapClientEncryptionKey(String clientEncryptionKeyId, EncryptionKeyWrapMetadata newEncryptionKeyWrapMetadata)
clientEncryptionKeyId
- the client encryption key properties to create.newEncryptionKeyWrapMetadata
- EncryptionKeyWrapMetadata.public CosmosDatabase getCosmosDatabase()
public CosmosEncryptionContainer getCosmosEncryptionContainer(CosmosContainer container)
container
- original containerpublic CosmosEncryptionContainer getCosmosEncryptionContainer(String containerId)
containerId
- original container idVisit the Azure for Java Developers site for more Java documentation, including quick starts, tutorials, and code samples.