Skip to main content

database_accounts_keys

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

Overview

Namedatabase_accounts_keys
TypeResource
Idazure.cosmos_db.database_accounts_keys

Fields

NameDatatypeDescription
primaryMasterKeystringBase 64 encoded value of the primary read-write key.
primaryReadonlyMasterKeystringBase 64 encoded value of the primary read-only key.
secondaryMasterKeystringBase 64 encoded value of the secondary read-write key.
secondaryReadonlyMasterKeystringBase 64 encoded value of the secondary read-only key.

Methods

NameAccessible byRequired ParamsDescription
listSELECTaccountName, resourceGroupName, subscriptionIdLists the access keys for the specified Azure Cosmos DB database account.

SELECT examples

Lists the access keys for the specified Azure Cosmos DB database account.

SELECT
primaryMasterKey,
primaryReadonlyMasterKey,
secondaryMasterKey,
secondaryReadonlyMasterKey
FROM azure.cosmos_db.database_accounts_keys
WHERE accountName = '{{ accountName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}';