ClientEncryptionKeyResource Class

  • java.lang.Object
    • com.azure.resourcemanager.cosmos.models.ClientEncryptionKeyResource

Implements

public class ClientEncryptionKeyResource
implements JsonSerializable<ClientEncryptionKeyResource>

Cosmos DB client encryption key resource object.

Constructor Summary

Constructor Description
ClientEncryptionKeyResource()

Creates an instance of ClientEncryptionKeyResource class.

Method Summary

Modifier and Type Method and Description
String encryptionAlgorithm()

Get the encryptionAlgorithm property: Encryption algorithm that will be used along with this client encryption key to encrypt/decrypt data.

static ClientEncryptionKeyResource fromJson(JsonReader jsonReader)

Reads an instance of ClientEncryptionKeyResource from the JsonReader.

String id()

Get the id property: Name of the ClientEncryptionKey.

KeyWrapMetadata keyWrapMetadata()

Get the keyWrapMetadata property: Metadata for the wrapping provider that can be used to unwrap the wrapped client encryption key.

JsonWriter toJson(JsonWriter jsonWriter)
void validate()

Validates the instance.

ClientEncryptionKeyResource withEncryptionAlgorithm(String encryptionAlgorithm)

Set the encryptionAlgorithm property: Encryption algorithm that will be used along with this client encryption key to encrypt/decrypt data.

ClientEncryptionKeyResource withId(String id)

Set the id property: Name of the ClientEncryptionKey.

ClientEncryptionKeyResource withKeyWrapMetadata(KeyWrapMetadata keyWrapMetadata)

Set the keyWrapMetadata property: Metadata for the wrapping provider that can be used to unwrap the wrapped client encryption key.

ClientEncryptionKeyResource withWrappedDataEncryptionKey(byte[] wrappedDataEncryptionKey)

Set the wrappedDataEncryptionKey property: Wrapped (encrypted) form of the key represented as a byte array.

byte[] wrappedDataEncryptionKey()

Get the wrappedDataEncryptionKey property: Wrapped (encrypted) form of the key represented as a byte array.

Methods inherited from java.lang.Object

Constructor Details

ClientEncryptionKeyResource

public ClientEncryptionKeyResource()

Creates an instance of ClientEncryptionKeyResource class.

Method Details

encryptionAlgorithm

public String encryptionAlgorithm()

Get the encryptionAlgorithm property: Encryption algorithm that will be used along with this client encryption key to encrypt/decrypt data.

Returns:

the encryptionAlgorithm value.

fromJson

public static ClientEncryptionKeyResource fromJson(JsonReader jsonReader)

Reads an instance of ClientEncryptionKeyResource from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of ClientEncryptionKeyResource if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.

Throws:

IOException

- If an error occurs while reading the ClientEncryptionKeyResource.

id

public String id()

Get the id property: Name of the ClientEncryptionKey.

Returns:

the id value.

keyWrapMetadata

public KeyWrapMetadata keyWrapMetadata()

Get the keyWrapMetadata property: Metadata for the wrapping provider that can be used to unwrap the wrapped client encryption key.

Returns:

the keyWrapMetadata value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

validate

public void validate()

Validates the instance.

withEncryptionAlgorithm

public ClientEncryptionKeyResource withEncryptionAlgorithm(String encryptionAlgorithm)

Set the encryptionAlgorithm property: Encryption algorithm that will be used along with this client encryption key to encrypt/decrypt data.

Parameters:

encryptionAlgorithm - the encryptionAlgorithm value to set.

Returns:

the ClientEncryptionKeyResource object itself.

withId

public ClientEncryptionKeyResource withId(String id)

Set the id property: Name of the ClientEncryptionKey.

Parameters:

id - the id value to set.

Returns:

the ClientEncryptionKeyResource object itself.

withKeyWrapMetadata

public ClientEncryptionKeyResource withKeyWrapMetadata(KeyWrapMetadata keyWrapMetadata)

Set the keyWrapMetadata property: Metadata for the wrapping provider that can be used to unwrap the wrapped client encryption key.

Parameters:

keyWrapMetadata - the keyWrapMetadata value to set.

Returns:

the ClientEncryptionKeyResource object itself.

withWrappedDataEncryptionKey

public ClientEncryptionKeyResource withWrappedDataEncryptionKey(byte[] wrappedDataEncryptionKey)

Set the wrappedDataEncryptionKey property: Wrapped (encrypted) form of the key represented as a byte array.

Parameters:

wrappedDataEncryptionKey - the wrappedDataEncryptionKey value to set.

Returns:

the ClientEncryptionKeyResource object itself.

wrappedDataEncryptionKey

public byte[] wrappedDataEncryptionKey()

Get the wrappedDataEncryptionKey property: Wrapped (encrypted) form of the key represented as a byte array.

Returns:

the wrappedDataEncryptionKey value.

Applies to