Package com.azure.cosmos.models
Class CosmosClientEncryptionKeyProperties
java.lang.Object
com.azure.cosmos.models.CosmosClientEncryptionKeyProperties
@Beta(value=V4_14_0,
warningText="Preview API - subject to change in non-backwards compatible way")
public final class CosmosClientEncryptionKeyProperties
extends Object
Details of an encryption key for use with the Azure Cosmos DB service.
-
Constructor Summary
ConstructorDescriptionCosmosClientEncryptionKeyProperties
(String id, String encryptionAlgorithm, byte[] wrappedDataEncryptionKey, EncryptionKeyWrapMetadata encryptionKeyWrapMetadata) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionGets the encryption algorithm that will be used along with this client encryption key to encrypt/decrypt data.Gets the metadata for the wrapping provider that can be used to unwrap the wrapped client encryption key.getETag()
Get the entity tag associated with the resource.getId()
Gets the name of the resource.Get the last modified timestamp associated with the resource.byte[]
Gets the wrapped form of the client encryption key.setEncryptionAlgorithm
(String encryptionAlgorithm) Sets the encryption algorithm that will be used along with this client encryption key to encrypt/decrypt data.setEncryptionKeyWrapMetadata
(EncryptionKeyWrapMetadata encryptionKeyWrapMetadata) Sets the metadata for the wrapping provider that can be used to unwrap the wrapped client encryption key.Sets the name of the resource.setWrappedDataEncryptionKey
(byte[] wrappedDataEncryptionKey) Sets the wrapped form of the client encryption key.
-
Constructor Details
-
CosmosClientEncryptionKeyProperties
@Beta(value=V4_14_0, warningText="Preview API - subject to change in non-backwards compatible way") public CosmosClientEncryptionKeyProperties(String id, String encryptionAlgorithm, byte[] wrappedDataEncryptionKey, EncryptionKeyWrapMetadata encryptionKeyWrapMetadata) Constructor.- Parameters:
id
- Unique identifier for the client encryption key.encryptionAlgorithm
- Encryption algorithm that will be used along with this client encryption key to encrypt/decrypt data.wrappedDataEncryptionKey
- Wrapped (encrypted) form of the client encryption key.encryptionKeyWrapMetadata
- Metadata used by the configured key wrapping provider in order to unwrap the key.
-
-
Method Details
-
getEncryptionAlgorithm
@Beta(value=V4_14_0, warningText="Preview API - subject to change in non-backwards compatible way") public String getEncryptionAlgorithm()Gets the encryption algorithm that will be used along with this client encryption key to encrypt/decrypt data.- Returns:
- encryptionAlgorithm
-
setEncryptionAlgorithm
@Beta(value=V4_14_0, warningText="Preview API - subject to change in non-backwards compatible way") public CosmosClientEncryptionKeyProperties setEncryptionAlgorithm(String encryptionAlgorithm) Sets the encryption algorithm that will be used along with this client encryption key to encrypt/decrypt data.- Parameters:
encryptionAlgorithm
- the encryption algorithm that will be used along with this client encryption key to encrypt/decrypt data.- Returns:
- CosmosClientEncryptionKeyProperties
-
getWrappedDataEncryptionKey
@Beta(value=V4_14_0, warningText="Preview API - subject to change in non-backwards compatible way") public byte[] getWrappedDataEncryptionKey()Gets the wrapped form of the client encryption key.- Returns:
- wrappedDataEncryptionKey
-
setWrappedDataEncryptionKey
@Beta(value=V4_14_0, warningText="Preview API - subject to change in non-backwards compatible way") public CosmosClientEncryptionKeyProperties setWrappedDataEncryptionKey(byte[] wrappedDataEncryptionKey) Sets the wrapped form of the client encryption key.- Parameters:
wrappedDataEncryptionKey
- the wrapped form of the client encryption key.- Returns:
- CosmosClientEncryptionKeyProperties
-
getEncryptionKeyWrapMetadata
@Beta(value=V4_14_0, warningText="Preview API - subject to change in non-backwards compatible way") public EncryptionKeyWrapMetadata getEncryptionKeyWrapMetadata()Gets the metadata for the wrapping provider that can be used to unwrap the wrapped client encryption key.- Returns:
- encryptionKeyWrapMetadata
-
setEncryptionKeyWrapMetadata
@Beta(value=V4_14_0, warningText="Preview API - subject to change in non-backwards compatible way") public CosmosClientEncryptionKeyProperties setEncryptionKeyWrapMetadata(EncryptionKeyWrapMetadata encryptionKeyWrapMetadata) Sets the metadata for the wrapping provider that can be used to unwrap the wrapped client encryption key.- Parameters:
encryptionKeyWrapMetadata
- the metadata for the wrapping provider that can be used to unwrap the wrapped client encryption key.- Returns:
- CosmosClientEncryptionKeyProperties
-
getId
@Beta(value=V4_14_0, warningText="Preview API - subject to change in non-backwards compatible way") public String getId()Gets the name of the resource.- Returns:
- the name of the resource.
-
setId
@Beta(value=V4_14_0, warningText="Preview API - subject to change in non-backwards compatible way") public CosmosClientEncryptionKeyProperties setId(String id) Sets the name of the resource.- Parameters:
id
- the name of the resource.- Returns:
- the current instance of
CosmosContainerProperties
.
-
getTimestamp
@Beta(value=V4_14_0, warningText="Preview API - subject to change in non-backwards compatible way") public Instant getTimestamp()Get the last modified timestamp associated with the resource. This is only relevant when getting response from the server.- Returns:
- the timestamp.
-
getETag
@Beta(value=V4_14_0, warningText="Preview API - subject to change in non-backwards compatible way") public String getETag()Get the entity tag associated with the resource. This is only relevant when getting response from the server.- Returns:
- the e tag.
-