Skip to main content

accounts_keys

Creates, updates, deletes, gets or lists an accounts_keys resource.

Overview

Nameaccounts_keys
TypeResource
Idazure.cognitive_services.accounts_keys

Fields

The following fields are returned by SELECT queries:

Returns with a response body containing the subscription keys for the resource: key1
The first API key for authentication when client calls the API endpoint.

key2
The second API key for authentication when client calls the API endpoint.

NameDatatypeDescription
key1stringGets the value of key 1.
key2stringGets the value of key 2.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
listselectresourceGroupName, accountName, subscriptionIdLists the account keys for the specified Cognitive Services account.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
accountNamestringThe name of Cognitive Services account.
resourceGroupNamestringThe name of the resource group. The name is case insensitive.
subscriptionIdstringThe ID of the target subscription.

SELECT examples

Lists the account keys for the specified Cognitive Services account.

SELECT
key1,
key2
FROM azure.cognitive_services.accounts_keys
WHERE resourceGroupName = '{{ resourceGroupName }}' -- required
AND accountName = '{{ accountName }}' -- required
AND subscriptionId = '{{ subscriptionId }}' -- required
;