Table of Contents

Class ClientEncryptionKeyProperties

Namespace
Microsoft.Azure.Cosmos
Assembly
Microsoft.Azure.Cosmos.Client.dll

Details of an encryption key for use with the Azure Cosmos DB service.

public class ClientEncryptionKeyProperties : IEquatable<ClientEncryptionKeyProperties>
Inheritance
ClientEncryptionKeyProperties
Implements
Inherited Members
Extension Methods

Constructors

ClientEncryptionKeyProperties()

For mocking.

protected ClientEncryptionKeyProperties()

ClientEncryptionKeyProperties(string, string, byte[], EncryptionKeyWrapMetadata)

Initializes a new instance of ClientEncryptionKeyProperties.

public ClientEncryptionKeyProperties(string id, string encryptionAlgorithm, byte[] wrappedDataEncryptionKey, EncryptionKeyWrapMetadata encryptionKeyWrapMetadata)

Parameters

id string

Unique identifier for the client encryption key.

encryptionAlgorithm string

Encryption algorithm that will be used along with this client encryption key to encrypt/decrypt data.

wrappedDataEncryptionKey byte[]

Wrapped (encrypted) form of the client encryption key.

encryptionKeyWrapMetadata EncryptionKeyWrapMetadata

Metadata used by the configured key wrapping provider in order to unwrap the key.

Properties

CreatedTime

Gets the creation time of the resource from the Azure Cosmos DB service.

public DateTime? CreatedTime { get; }

Property Value

DateTime?

ETag

Gets the entity tag associated with the resource from the Azure Cosmos DB service.

public string ETag { get; }

Property Value

string

The entity tag associated with the resource.

Remarks

ETags are used for concurrency checking when updating resources.

EncryptionAlgorithm

Encryption algorithm that will be used along with this client encryption key to encrypt/decrypt data.

public string EncryptionAlgorithm { get; }

Property Value

string

EncryptionKeyWrapMetadata

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

public EncryptionKeyWrapMetadata EncryptionKeyWrapMetadata { get; }

Property Value

EncryptionKeyWrapMetadata

Id

The identifier of the resource.

public string Id { get; }

Property Value

string

Remarks

Every resource within an Azure Cosmos DB database account needs to have a unique identifier.

The following characters are restricted and cannot be used in the Id property: '/', '\\', '?', '#'

LastModified

Gets the last modified time stamp associated with the resource from the Azure Cosmos DB service.

public DateTime? LastModified { get; }

Property Value

DateTime?

The last modified time stamp associated with the resource.

Gets the self-link associated with the resource from the Azure Cosmos DB service.

public virtual string SelfLink { get; }

Property Value

string

The self-link associated with the resource.

A self-link is a static addressable Uri for each resource within a database account and follows the Azure Cosmos DB resource model. E.g. a self-link for a document could be dbs/db_resourceid/colls/coll_resourceid/documents/doc_resourceid

WrappedDataEncryptionKey

Wrapped form of the client encryption key.

public byte[] WrappedDataEncryptionKey { get; }

Property Value

byte[]

Methods

Equals(ClientEncryptionKeyProperties)

Compares this instance of client encryption key properties to another.

public bool Equals(ClientEncryptionKeyProperties other)

Parameters

other ClientEncryptionKeyProperties

Instance to compare with.

Returns

bool

True if properties match, else false.

Equals(object)

Compares this instance of client encryption key properties to another object.

public override bool Equals(object obj)

Parameters

obj object

Object to compare with.

Returns

bool

True if the other object is an instance of ClientEncryptionKeyProperties and the properties match, else false.

GetHashCode()

Gets a hash code for the properties of this instance to optimize comparisons.

public override int GetHashCode()

Returns

int

Hash code.