Skip to main content

account_keys

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

Overview

Nameaccount_keys
TypeResource
Idazure.batch.account_keys

Fields

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

Methods

NameAccessible byRequired ParamsDescription
getSELECTaccountName, resourceGroupName, 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.

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 accountName = '{{ accountName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}';