Azure Storage Blobs

Manage Azure Storage Containers

This document provides detailed guidance on how to manage containers within your Azure Storage account. Containers are fundamental to organizing and accessing your blob data.

Create Container
List Containers

Creating a Container

You can create a container using the Azure portal, Azure CLI, PowerShell, or client libraries. When creating a container, you specify a name and an access policy. Container names must be globally unique within the storage account.

Example using Azure CLI:

az storage container create --name mycontainer --account-name mystorageaccount --auth-mode login

Listing Containers

To view all containers within a storage account, you can use various tools. This is useful for auditing and managing your storage resources.

Example using Azure CLI:

az storage container list --account-name mystorageaccount --auth-mode login

Managing Container Properties

Once a container is created, you can modify its properties, such as its access policy. You can also set various metadata and configurations.

Setting Access Policy:

You can update the public access level of a container after it has been created.

Example using Azure CLI to set container access to blob level:

az storage container set-permission --name mycontainer --public-access blob --account-name mystorageaccount --auth-mode login

Deleting a Container

Containers can be deleted. Be cautious, as this action is irreversible and all data within the container will be permanently lost.

Example using Azure CLI:

az storage container delete --name mycontainer --account-name mystorageaccount --auth-mode login
Important: Deleting a container is a destructive operation. Ensure you have backups or have moved critical data before proceeding.

Container Properties Overview

Property Description
Name The unique identifier for the container.
Public Access Level Controls anonymous access to blobs and containers.
Last Modified Timestamp of the last modification.
ETag Entity tag used for concurrency control.
Lease Status Indicates if the container is leased.