ClientEncryptionPolicy Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
The ClientEncryptionPolicy should be initialized with policyFormatVersion 2 and "Deterministic" encryption type, if "id" property or properties which are part of partition key need to be encrypted. All partition key property values have to be JSON strings.
public sealed class ClientEncryptionPolicy
type ClientEncryptionPolicy = class
Public NotInheritable Class ClientEncryptionPolicy
- Inheritance
-
ClientEncryptionPolicy
Examples
This example shows how to create a ClientEncryptionPolicy.
Collection<ClientEncryptionIncludedPath> paths = new Collection<ClientEncryptionIncludedPath>()
{
new ClientEncryptionIncludedPath()
{
Path = partitionKeyPath,
ClientEncryptionKeyId = "key1",
EncryptionAlgorithm = "AEAD_AES_256_CBC_HMAC_SHA256",
EncryptionType = "Deterministic"
},
new ClientEncryptionIncludedPath()
{
Path = "/id",
ClientEncryptionKeyId = "key2",
EncryptionAlgorithm = "AEAD_AES_256_CBC_HMAC_SHA256",
EncryptionType = "Deterministic"
},
};
ContainerProperties setting = new ContainerProperties()
{
Id = containerName,
PartitionKeyPath = partitionKeyPath,
ClientEncryptionPolicy = new ClientEncryptionPolicy(includedPaths:paths, policyFormatVersion:2)
};
Constructors
ClientEncryptionPolicy(IEnumerable<ClientEncryptionIncludedPath>) |
Initializes a new instance of the ClientEncryptionPolicy class. The PolicyFormatVersion will be set to 1. Note: If you need to include partition key or id field paths as part of ClientEncryptionPolicy, please set PolicyFormatVersion to 2. |
ClientEncryptionPolicy(IEnumerable<ClientEncryptionIncludedPath>, Int32) |
Initializes a new instance of the ClientEncryptionPolicy class. Note: If you need to include partition key or id field paths as part of ClientEncryptionPolicy, please set PolicyFormatVersion to 2. |
Properties
IncludedPaths |
Paths of the item that need encryption along with path-specific settings. |
PolicyFormatVersion |
Version of the client encryption policy definition. |
Applies to
Azure SDK for .NET
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기