Skip to main content

account_keys

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

Overview

Nameaccount_keys
TypeResource
Idazure.batch.account_keys

Fields

The following fields are returned by SELECT queries:

The operation was successful. The response contains the keys of the Batch account.

NameDatatypeDescription
accountNamestringThe Batch account name.
primarystringThe primary key associated with the account.
secondarystringThe secondary key associated with the account.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectresourceGroupName, accountName, subscriptionIdThis operation applies only to Batch accounts with allowedAuthenticationModes containing 'SharedKey'. If the Batch account doesn't contain 'SharedKey' in its allowedAuthenticationMode, clients cannot use shared keys to authenticate, and must use another allowedAuthenticationModes instead. In this case, getting the keys will fail.

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 the Batch account.
resourceGroupNamestringThe name of the resource group that contains the Batch account.
subscriptionIdstringThe Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000)

SELECT examples

This operation applies only to Batch accounts with allowedAuthenticationModes containing 'SharedKey'. If the Batch account doesn't contain 'SharedKey' in its allowedAuthenticationMode, clients cannot use shared keys to authenticate, and must use another allowedAuthenticationModes instead. In this case, getting the keys will fail.

SELECT
accountName,
primary,
secondary
FROM azure.batch.account_keys
WHERE resourceGroupName = '{{ resourceGroupName }}' -- required
AND accountName = '{{ accountName }}' -- required
AND subscriptionId = '{{ subscriptionId }}' -- required
;