Search⌘ K
AI Features

Demo: Azure Queue Storage and Containers

Explore how to automate the creation and management of Azure queue storage and storage containers using Azure CLI commands. Learn to set up resource groups, storage accounts, queues, and containers, and perform operations like enqueue, dequeue, list, and delete to effectively manage cloud resources.

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.
C++
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.
C++
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.
C++
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 ...