Partager via


ClientEncryptionPolicy Class

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

Implements

public final class ClientEncryptionPolicy
implements JsonSerializable<ClientEncryptionPolicy>

Cosmos DB client encryption policy.

Constructor Summary

Constructor Description
ClientEncryptionPolicy()

Creates an instance of ClientEncryptionPolicy class.

Method Summary

Modifier and Type Method and Description
static ClientEncryptionPolicy fromJson(JsonReader jsonReader)

Reads an instance of ClientEncryptionPolicy from the JsonReader.

List<ClientEncryptionIncludedPath> includedPaths()

Get the includedPaths property: Paths of the item that need encryption along with path-specific settings.

int policyFormatVersion()

Get the policyFormatVersion property: Version of the client encryption policy definition.

JsonWriter toJson(JsonWriter jsonWriter)
void validate()

Validates the instance.

ClientEncryptionPolicy withIncludedPaths(List<ClientEncryptionIncludedPath> includedPaths)

Set the includedPaths property: Paths of the item that need encryption along with path-specific settings.

ClientEncryptionPolicy withPolicyFormatVersion(int policyFormatVersion)

Set the policyFormatVersion property: Version of the client encryption policy definition.

Methods inherited from java.lang.Object

Constructor Details

ClientEncryptionPolicy

public ClientEncryptionPolicy()

Creates an instance of ClientEncryptionPolicy class.

Method Details

fromJson

public static ClientEncryptionPolicy fromJson(JsonReader jsonReader)

Reads an instance of ClientEncryptionPolicy from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

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

Throws:

IOException

- If the deserialized JSON object was missing any required properties.

includedPaths

public List includedPaths()

Get the includedPaths property: Paths of the item that need encryption along with path-specific settings.

Returns:

the includedPaths value.

policyFormatVersion

public int policyFormatVersion()

Get the policyFormatVersion property: Version of the client encryption policy definition. Supported versions are 1 and 2. Version 2 supports id and partition key path encryption.

Returns:

the policyFormatVersion value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

validate

public void validate()

Validates the instance.

withIncludedPaths

public ClientEncryptionPolicy withIncludedPaths(List includedPaths)

Set the includedPaths property: Paths of the item that need encryption along with path-specific settings.

Parameters:

includedPaths - the includedPaths value to set.

Returns:

the ClientEncryptionPolicy object itself.

withPolicyFormatVersion

public ClientEncryptionPolicy withPolicyFormatVersion(int policyFormatVersion)

Set the policyFormatVersion property: Version of the client encryption policy definition. Supported versions are 1 and 2. Version 2 supports id and partition key path encryption.

Parameters:

policyFormatVersion - the policyFormatVersion value to set.

Returns:

the ClientEncryptionPolicy object itself.

Applies to