az storage container-rm
Manage Azure containers using the Microsoft.Storage resource provider.
Commands
Name | Description | Type | Status |
---|---|---|---|
az storage container-rm create |
Create a new container under the specified storage account. |
Core | GA |
az storage container-rm delete |
Delete the specified container under its account. |
Core | GA |
az storage container-rm exists |
Check for the existence of a container. |
Core | GA |
az storage container-rm list |
List all containers under the specified storage account. |
Core | GA |
az storage container-rm migrate-vlw |
Migrate a blob container from container level WORM to object level immutability enabled container. |
Core | Preview |
az storage container-rm show |
Show the properties for a specified container. |
Core | GA |
az storage container-rm update |
Update the properties for a container. |
Core | GA |
az storage container-rm create
Create a new container under the specified storage account.
az storage container-rm create --name
--storage-account
[--default-encryption-scope]
[--deny-encryption-scope-override {false, true}]
[--enable-vlw {false, true}]
[--fail-on-exist]
[--metadata]
[--public-access {blob, container, off}]
[--resource-group]
[--root-squash {AllSquash, NoRootSquash, RootSquash}]
Examples
Create a new container under the specified storage account.
az storage container-rm create --storage-account myaccount --name mycontainer
Create a new container with metadata and public-access as blob under the specified storage account(account id).
az storage container-rm create --storage-account myaccountid --name mycontainer --public-access blob --metada key1=value1 key2=value2
Required Parameters
The container name.
The name or ID of the storage account.
Optional Parameters
Default the container to use specified encryption scope for all writes.
Block override of encryption scope from the container default.
The object level immutability property of the container. The property is immutable and can only be set to true at the container creation time. Existing containers must undergo a migration process.
Throw an exception if the container already exists.
Metadata in space-separated key=value pairs. This overwrites any existing metadata.
Specify whether data in the container may be accessed publicly.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Enable NFSv3 squash on blob container.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
az storage container-rm delete
Delete the specified container under its account.
az storage container-rm delete [--ids]
[--name]
[--resource-group]
[--storage-account]
[--subscription]
[--yes]
Examples
Delete the specified container under its account.
az storage container-rm delete --storage-account myAccount --name mycontainer
Delete the specified container under its account(account id).
az storage container-rm delete --storage-account myaccountid --name mycontainer
Delete the specified container by resource id.
az storage container-rm delete --ids mycontainerid
Optional Parameters
One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.
The container name.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
The name or ID of the storage account.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Do not prompt for confirmation.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
az storage container-rm exists
Check for the existence of a container.
az storage container-rm exists [--ids]
[--name]
[--resource-group]
[--storage-account]
[--subscription]
Examples
Check for the existence of a container under the specified storage account.
az storage container-rm exists --storage-account myaccount --name mycontainer
Check for the existence of a container under the specified storage account(account id).
az storage container-rm exists --storage-account myaccountid --name mycontainer
Check for the existence of a container by resource id.
az storage container-rm exists --ids mycontainerid
Optional Parameters
One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.
The container name.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
The name or ID of the storage account.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
az storage container-rm list
List all containers under the specified storage account.
az storage container-rm list --storage-account
[--include-deleted]
[--resource-group]
Examples
List all containers under the specified storage account.
az storage container-rm list --storage-account myaccount
List all containers under the specified storage account(account id).
az storage container-rm list --storage-account myaccountid
List all containers under the specified storage account, including deleted ones.
az storage container-rm list --storage-account myaccount --include-deleted
Required Parameters
The name or ID of the storage account.
Optional Parameters
Include soft deleted containers when specified.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
az storage container-rm migrate-vlw
This command is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
Migrate a blob container from container level WORM to object level immutability enabled container.
az storage container-rm migrate-vlw [--ids]
[--name]
[--no-wait]
[--resource-group]
[--storage-account]
[--subscription]
Examples
Migrate a blob container from container level WORM to object level immutability enabled container.
az storage container-rm migrate-vlw -n mycontainer --storage-account myaccount -g myresourcegroup
Migrate a blob container from container level WORM to object level immutability enabled container without waiting.
az storage container-rm migrate-vlw -n mycontainer --storage-account myaccount -g myresourcegroup --no-wait
az storage container-rm show -n mycontainer --storage-account myaccount -g myresourcegroup --query immutableStorageWithVersioning.migrationState
Optional Parameters
One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.
The container name.
Do not wait for the long-running operation to finish.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
The name or ID of the storage account.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
az storage container-rm show
Show the properties for a specified container.
az storage container-rm show [--ids]
[--name]
[--resource-group]
[--storage-account]
[--subscription]
Examples
Show the properties for a container under the specified storage account.
az storage container-rm show --storage-account myaccount --name mycontainer
Show the properties for a container under the specified storage account(account id).
az storage container-rm show --storage-account myaccountid --name mycontainer
Show the properties for a container by resource id.
az storage container-rm show --ids mycontainerid
Optional Parameters
One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.
The container name.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
The name or ID of the storage account.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
az storage container-rm update
Update the properties for a container.
az storage container-rm update [--add]
[--force-string]
[--ids]
[--metadata]
[--name]
[--public-access {blob, container, off}]
[--remove]
[--resource-group]
[--root-squash {AllSquash, NoRootSquash, RootSquash}]
[--set]
[--storage-account]
[--subscription]
Examples
Update the public access level to 'blob' for a container under the specified storage account.
az storage container-rm update --storage-account myaccount --name mycontainer --public-access blob
Update the metadata for a container under the specified storage account(account id).
az storage container-rm update --storage-account myaccountid --name mycontainer --metadata newkey1=newvalue1 newkey2=newvalue2
Update the public access level for a container by resource id.
az storage container-rm update --ids mycontainerid --public-access blob
Optional Parameters
Add an object to a list of objects by specifying a path and key value pairs. Example: --add property.listProperty <key=value, string or JSON string>
.
When using 'set' or 'add', preserve string literals instead of attempting to convert to JSON.
One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.
Metadata in space-separated key=value pairs. This overwrites any existing metadata.
The container name.
Specify whether data in the container may be accessed publicly.
Remove a property or an element from a list. Example: --remove property.list <indexToRemove>
OR --remove propertyToRemove
.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Enable NFSv3 squash on blob container.
Update an object by specifying a property path and value to set. Example: --set property1.property2=<value>
.
The name or ID of the storage account.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.