Create a Container in Azure Blob Storage
This document guides you through the process of creating a container in Azure Blob Storage. Containers are logical groupings for your blobs.
Prerequisites
- An Azure subscription. If you don't have one, create a free account.
- A storage account. If you don't have one, follow the steps to create a storage account.
Create a Container using the Azure Portal
- Navigate to your storage account in the Azure portal.
- Under the "Data storage" section, select Containers.
- Select + Container from the toolbar.
-
In the "Create container" pane, enter a name for your container.
Important: Container names must start with a letter or number, can contain only letters, numbers, and the hyphen ('-'), and must be between 3 and 63 characters long.
-
Choose an access level for the container (e.g., Private, Blob, or Container). The default is Private.
- Private (no anonymous access): Access is restricted to authenticated users.
- Blob: Anonymous read access for blobs only, within the container.
- Container: Anonymous read access for the container and its blobs.
- Click Create.
Create a Container using Azure CLI
You can also create a container using the Azure Command-Line Interface (CLI).
First, ensure you have the Azure CLI installed and are logged in:
Then, use the following command to create a container:
Replace <container-name> with your desired container name and <your-storage-account-name> with your storage account name.
Create a Container using Azure PowerShell
You can also create a container using Azure PowerShell.
First, ensure you have the Azure PowerShell module installed and are logged in:
Then, use the following command to create a container:
Replace <container-name>, <your-storage-account-name>, and <your-storage-account-key> with your specific details. Alternatively, you can use -UseConnectedAccount for authenticated access.