142k views
0 votes
Create a new Shared Access Signature (SAS) definition for a storage account using the Azure CLI command.

User Gajus
by
8.3k points

1 Answer

3 votes

Final answer:

To create a new Shared Access Signature for an Azure storage account, use the 'az storage account generate-sas' command in the Azure CLI with appropriate parameters like permissions, account name, services, resource types, and expiration time.

Step-by-step explanation:

The subject of your question is related to creating a new Shared Access Signature (SAS) for an Azure storage account using the Azure Command-Line Interface (CLI). A SAS is a secure way to provide limited access to your storage account without sharing your account keys.

To create a SAS token using the Azure CLI, you can use the az storage account generate-sas command. This command requires several parameters such as permissions, resource types, services, and an expiration time. Below is an example of how to use this command:

az storage account generate-sas \
--permissions acdlrw \
--account-name MyStorageAccount \
--services b \
--resource-types sco \
--expiry 2023-12-31T23:59:00Z
Make sure to replace the placeholder values with actual values for your specific scenario. This command generates a Signature string that you can append to the URL when accessing the storage service to ensure that the request is authorized.

User Paul Asjes
by
8.6k points

Related questions

Welcome to QAmmunity.org, where you can ask questions and receive answers from other members of our community.