client_encryption_keys
Creates, updates, deletes, gets or lists a client_encryption_keys
resource.
Overview
Name | client_encryption_keys |
Type | Resource |
Id | azure.cosmos_db.client_encryption_keys |
Fields
- vw_client_encryption_keys
- client_encryption_keys
Name | Datatype | Description |
---|---|---|
id | text | The unique resource identifier of the database account. |
name | text | The name of the database account. |
accountName | text | field from the properties object |
clientEncryptionKeyName | text | field from the properties object |
databaseName | text | field from the properties object |
resource | text | field from the properties object |
resourceGroupName | text | field from the properties object |
subscriptionId | text | field from the properties object |
type | text | The type of Azure resource. |
Name | Datatype | Description |
---|---|---|
id | string | The unique resource identifier of the database account. |
name | string | The name of the database account. |
properties | object | The properties of a ClientEncryptionKey resource |
type | string | The type of Azure resource. |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
get | SELECT | accountName, clientEncryptionKeyName, databaseName, resourceGroupName, subscriptionId | Gets the ClientEncryptionKey under an existing Azure Cosmos DB SQL database. |
list | SELECT | accountName, databaseName, resourceGroupName, subscriptionId | Lists the ClientEncryptionKeys under an existing Azure Cosmos DB SQL database. |
create_update | INSERT | accountName, clientEncryptionKeyName, databaseName, resourceGroupName, subscriptionId, data__properties | Create 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.
- vw_client_encryption_keys
- client_encryption_keys
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 }}';
SELECT
id,
name,
properties,
type
FROM azure.cosmos_db.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.
- All Properties
- Manifest
/*+ 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 }}'
;
- name: your_resource_model_name
props:
- name: properties
value:
- name: resource
value:
- name: id
value: string
- name: encryptionAlgorithm
value: string
- name: wrappedDataEncryptionKey
value: string
- name: keyWrapMetadata
value:
- name: name
value: string
- name: type
value: string
- name: value
value: string
- name: algorithm
value: string