Skip to main content

client_encryption_keys

Creates, updates, deletes, gets or lists a client_encryption_keys resource.

Overview

Nameclient_encryption_keys
TypeResource
Idazure.cosmos_db.client_encryption_keys

Fields

NameDatatypeDescription
idtextThe unique resource identifier of the database account.
nametextThe name of the database account.
accountNametextfield from the properties object
clientEncryptionKeyNametextfield from the properties object
databaseNametextfield from the properties object
resourcetextfield from the properties object
resourceGroupNametextfield from the properties object
subscriptionIdtextfield from the properties object
typetextThe type of Azure resource.

Methods

NameAccessible byRequired ParamsDescription
getSELECTaccountName, clientEncryptionKeyName, databaseName, resourceGroupName, subscriptionIdGets the ClientEncryptionKey under an existing Azure Cosmos DB SQL database.
listSELECTaccountName, databaseName, resourceGroupName, subscriptionIdLists the ClientEncryptionKeys under an existing Azure Cosmos DB SQL database.
create_updateINSERTaccountName, clientEncryptionKeyName, databaseName, resourceGroupName, subscriptionId, data__propertiesCreate or update a ClientEncryptionKey. This API is meant to be invoked via tools such as the Azure Powershell (instead of directly).

SELECT examples

Lists the ClientEncryptionKeys under an existing Azure Cosmos DB SQL database.

SELECT
id,
name,
accountName,
clientEncryptionKeyName,
databaseName,
resource,
resourceGroupName,
subscriptionId,
type
FROM azure.cosmos_db.vw_client_encryption_keys
WHERE accountName = '{{ accountName }}'
AND databaseName = '{{ databaseName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}';

INSERT example

Use the following StackQL query and manifest file to create a new client_encryption_keys resource.

/*+ create */
INSERT INTO azure.cosmos_db.client_encryption_keys (
accountName,
clientEncryptionKeyName,
databaseName,
resourceGroupName,
subscriptionId,
data__properties,
properties
)
SELECT
'{{ accountName }}',
'{{ clientEncryptionKeyName }}',
'{{ databaseName }}',
'{{ resourceGroupName }}',
'{{ subscriptionId }}',
'{{ data__properties }}',
'{{ properties }}'
;