az batch account keys

Manage Batch account keys.

Commands

az batch account keys list

Gets the account keys for the specified Batch account.

az batch account keys renew

Regenerates the specified account key for the Batch account.

az batch account keys list

Gets the account keys for the specified Batch account.

This operation applies only to Batch accounts created with a poolAllocationMode of 'BatchService'. If the Batch account was created with a poolAllocationMode of 'UserSubscription', clients cannot use access to keys to authenticate, and must use Azure Active Directory instead. In this case, getting the keys will fail.

az batch account keys list --name
                           --resource-group
                           [--query-examples]
                           [--subscription]

Required Parameters

--name -n

Name of the Batch account.

--resource-group -g

Name of the resource group.

Optional Parameters

--query-examples

Recommend JMESPath string for you. You can copy one of the query and paste it after --query parameter within double quotation marks to see the results. You can add one or more positional keywords so that we can give suggestions based on these key words.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

az batch account keys renew

Regenerates the specified account key for the Batch account.

az batch account keys renew --key-name {Primary, Secondary}
                            --name
                            --resource-group
                            [--subscription]

Required Parameters

--key-name

The type of account key to regenerate.

accepted values: Primary, Secondary
--name -n

Name of the Batch account.

--resource-group -g

Name of the resource group.

Optional Parameters

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.