...

/

Demo: Azure Queue Storage and Containers

Demo: Azure Queue Storage and Containers

Practice some interesting CLI commands related to Azure Queue Storage and the storage containers.

We know how to create a storage queue and storage containers using Azure Portal. Here, we’ll be using CLI commands to do the same. We’ll explain how to create a storage account and then a queue inside it. After that, we’ll learn how to push a message to the queue, then pop it out, and then try out some different operations on the queue.

Resource group → Storage account → Storage queue → Enque → Deque

After storage queues, we’ll explore some operations on Azure Storage containers.

Demo: Create a storage queue

Try to wrap up most things using Azure CLI commands.

Setting up a queue

  1. Use the following command to create a new resource group for this exercise. Set queueExercise-Rg as its name.
Press + to interact
az group create --location westus --name queueExercise-Rg
  1. Now, the resource group is up and ready. Create an Azure Storage account. Here, set educativequeuestorage as its name.
Press + to interact
az storage account create -n educativequeuestorage -g queueExercise-Rg -l westus --sku Standard_LRS
  1. Now, create a storage queue in the storage account you just created. Set educativequeue as its name.
Press + to interact
az storage queue create -n educativequeue --metadata key1=value1 key2=value2 --account-name educativequeuestorage

Note: Let’s understand the above command in detail:

  • az storage queue create: This will create a storage queue.

  • n: This is for the queue ...