You need to create an Azure resource to store data in Azure Table storage.
Which command should you run?
Click on the arrows to vote for the correct answer
A. B. C. D.D
https://docs.microsoft.com/en-us/cli/azure/storage/container?view=azure-cli-latestThe correct answer is D. az storage container create
.
Explanation:
Azure Table storage is a NoSQL key-value store that allows you to store large amounts of structured data. To store data in Azure Table storage, you need to create a storage account and then create a container within that account. You can use the Azure CLI command az storage container create
to create a container in Azure Table storage.
Here's how you can create a container using the Azure CLI:
Install the Azure CLI on your local machine.
Open a command prompt or terminal window.
Log in to your Azure account using the Azure CLI. Run the following command and follow the prompts:
az login
Create a storage account using the following command. Replace <resource-group-name>
and <storage-account-name>
with your own values:
luaaz storage account create \ --name <storage-account-name> \ --resource-group <resource-group-name> \ --location <location> \ --sku Standard_LRS \ --kind StorageV2
This command creates a new storage account in the specified resource group and location. The --sku
parameter specifies the performance tier of the storage account, and --kind
specifies the type of storage account.
Once you have created a storage account, you can create a container within that account using the following command:
luaaz storage container create \ --name <container-name> \ --account-name <storage-account-name> \ --account-key <storage-account-key>
Replace <container-name>
, <storage-account-name>
, and <storage-account-key>
with your own values. The <storage-account-key>
is a secret key that provides access to the storage account.
After running the command, you should see output similar to the following:
json{ "created": true }
This indicates that the container was created successfully.
In summary, to create an Azure resource to store data in Azure Table storage, you need to create a storage account using the az storage account create
command, and then create a container within that account using the az storage container create
command.