Skip to main content

database_accounts_read_only_keys

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

Overview

Namedatabase_accounts_read_only_keys
TypeResource
Idazure.cosmos_db.database_accounts_read_only_keys

Fields

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

Methods

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

SELECT examples

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

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