az storage account keys

Manage storage account keys.

Commands

az storage account keys list List the access keys or Kerberos keys (if active directory enabled) for a storage account.
az storage account keys renew Regenerate one of the access keys or Kerberos keys (if active directory enabled) for a storage account.

az storage account keys list

List the access keys or Kerberos keys (if active directory enabled) for a storage account.

az storage account keys list --account-name
[--expand-key-type {kerb}]
[--resource-group]
[--subscription]

Examples

List the access keys for a storage account.

az storage account keys list -g MyResourceGroup -n MyStorageAccount

List the access keys and Kerberos keys (if active directory enabled) for a storage account.

az storage account keys list -g MyResourceGroup -n MyStorageAccount --expand-key-type kerb

Required Parameters

--account-name -n

The storage account name.

Optional Parameters

--expand-key-type

Specify the expanded key types to be listed.

accepted values: kerb
--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--subscription

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

az storage account keys renew

Regenerate one of the access keys or Kerberos keys (if active directory enabled) for a storage account.

az storage account keys renew --account-name
--key {primary, secondary}
[--key-type {kerb}]
[--resource-group]
[--subscription]

Examples

Regenerate one of the access keys for a storage account.

az storage account keys renew -g MyResourceGroup -n MyStorageAccount --key primary

Regenerate one of the Kerberos keys for a storage account.

az storage account keys renew -g MyResourceGroup -n MyStorageAccount --key secondary --key-type kerb

Required Parameters

--account-name -n

The storage account name.

--key

The key options to regenerate.

accepted values: primary, secondary

Optional Parameters

--key-type

The key type to regenerate. If --key-type is not specified, one of access keys will be regenerated by default.

accepted values: kerb
--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--subscription

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