Forrest logo
back to the az tool

az-storage-account:tldr:3f708

az-storage-account: Generate a shared access signature for a specific storage account.
$ az storage account generate-sas --account-name ${storage_account_name} --name ${account_name} --permissions ${sas_permissions} --expiry ${expiry_date} --services ${storage_services} --resource-types ${resource_types}
try on your machine

This command is used to generate a Shared Access Signature (SAS) for a storage account in Microsoft Azure.

  • az storage account generate-sas: This is the Azure CLI command to generate a SAS for a storage account.
  • --account-name: Specifies the name of the storage account for which the SAS is being generated. The value is typically stored in the storage_account_name variable.
  • --name: Specifies the name of the SAS. The value is usually stored in the account_name variable.
  • --permissions: Specifies the permissions granted by the SAS. The value is stored in the sas_permissions variable and can include combinations of read (r), write (w), delete (d), list (l), or add (a) permissions.
  • --expiry: Specifies the expiration date/time of the SAS. The value is stored in the expiry_date variable and should be in UTC format.
  • --services: Specifies the services to which the SAS applies. The value is stored in the storage_services variable and can include combinations of blob (b), file (f), queue (q), or table (t) services.
  • --resource-types: Specifies the types of resources the SAS can access. The value is stored in the resource_types variable and can include combinations of service (s), container (c), object (o), or share (x) types.

By running this command, a SAS will be generated based on the provided parameters, granting specific permissions on specific resources within the storage account.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the az tool