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 --deny-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
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
Default the container to use specified encryption scope for all writes.
Property | Value |
---|---|
Parameter group: | Encryption Policy Arguments |
Block override of encryption scope from the container default.
Property | Value |
---|---|
Parameter group: | Encryption Policy Arguments |
Accepted values: | false, true |
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.
Property | Value |
---|---|
Accepted values: | false, true |
Throw an exception if the container already exists.
Property | Value |
---|---|
Default value: | False |
Metadata in space-separated key=value pairs. This overwrites any existing metadata.
Specify whether data in the container may be accessed publicly.
Property | Value |
---|---|
Accepted values: | blob, container, off |
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Enable NFSv3 squash on blob container.
Property | Value |
---|---|
Accepted values: | AllSquash, NoRootSquash, RootSquash |
Global Parameters
Increase logging verbosity to show all debug logs.
Property | Value |
---|---|
Default value: | False |
Show this help message and exit.
Only show errors, suppressing warnings.
Property | Value |
---|---|
Default value: | False |
Output format.
Property | Value |
---|---|
Default value: | json |
Accepted values: | json, jsonc, none, table, tsv, yaml, yamlc |
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.
Property | Value |
---|---|
Default value: | False |
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
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
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.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
The container name.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
The name or ID of the storage account.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
Do not prompt for confirmation.
Property | Value |
---|---|
Default value: | False |
Global Parameters
Increase logging verbosity to show all debug logs.
Property | Value |
---|---|
Default value: | False |
Show this help message and exit.
Only show errors, suppressing warnings.
Property | Value |
---|---|
Default value: | False |
Output format.
Property | Value |
---|---|
Default value: | json |
Accepted values: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath query string. See http://jmespath.org/ for more information and examples.
Increase logging verbosity. Use --debug for full debug logs.
Property | Value |
---|---|
Default value: | False |
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
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
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.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
The container name.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
The name or ID of the storage account.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
Global Parameters
Increase logging verbosity to show all debug logs.
Property | Value |
---|---|
Default value: | False |
Show this help message and exit.
Only show errors, suppressing warnings.
Property | Value |
---|---|
Default value: | False |
Output format.
Property | Value |
---|---|
Default value: | json |
Accepted values: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath query string. See http://jmespath.org/ for more information and examples.
Increase logging verbosity. Use --debug for full debug logs.
Property | Value |
---|---|
Default value: | False |
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
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
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.
Property | Value |
---|---|
Default value: | False |
Show this help message and exit.
Only show errors, suppressing warnings.
Property | Value |
---|---|
Default value: | False |
Output format.
Property | Value |
---|---|
Default value: | json |
Accepted values: | json, jsonc, none, table, tsv, yaml, yamlc |
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.
Property | Value |
---|---|
Default value: | False |
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
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
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.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
The container name.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
Do not wait for the long-running operation to finish.
Property | Value |
---|---|
Default value: | False |
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
The name or ID of the storage account.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
Global Parameters
Increase logging verbosity to show all debug logs.
Property | Value |
---|---|
Default value: | False |
Show this help message and exit.
Only show errors, suppressing warnings.
Property | Value |
---|---|
Default value: | False |
Output format.
Property | Value |
---|---|
Default value: | json |
Accepted values: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath query string. See http://jmespath.org/ for more information and examples.
Increase logging verbosity. Use --debug for full debug logs.
Property | Value |
---|---|
Default value: | False |
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
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
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.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
The container name.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
The name or ID of the storage account.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
Global Parameters
Increase logging verbosity to show all debug logs.
Property | Value |
---|---|
Default value: | False |
Show this help message and exit.
Only show errors, suppressing warnings.
Property | Value |
---|---|
Default value: | False |
Output format.
Property | Value |
---|---|
Default value: | json |
Accepted values: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath query string. See http://jmespath.org/ for more information and examples.
Increase logging verbosity. Use --debug for full debug logs.
Property | Value |
---|---|
Default value: | False |
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
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
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>
.
Property | Value |
---|---|
Parameter group: | Generic Update Arguments |
Default value: | [] |
When using 'set' or 'add', preserve string literals instead of attempting to convert to JSON.
Property | Value |
---|---|
Parameter group: | Generic Update Arguments |
Default value: | False |
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.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
Metadata in space-separated key=value pairs. This overwrites any existing metadata.
The container name.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
Specify whether data in the container may be accessed publicly.
Property | Value |
---|---|
Accepted values: | blob, container, off |
Remove a property or an element from a list. Example: --remove property.list <indexToRemove>
OR --remove propertyToRemove
.
Property | Value |
---|---|
Parameter group: | Generic Update Arguments |
Default value: | [] |
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
Enable NFSv3 squash on blob container.
Property | Value |
---|---|
Accepted values: | AllSquash, NoRootSquash, RootSquash |
Update an object by specifying a property path and value to set. Example: --set property1.property2=<value>
.
Property | Value |
---|---|
Parameter group: | Generic Update Arguments |
Default value: | [] |
The name or ID of the storage account.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
Global Parameters
Increase logging verbosity to show all debug logs.
Property | Value |
---|---|
Default value: | False |
Show this help message and exit.
Only show errors, suppressing warnings.
Property | Value |
---|---|
Default value: | False |
Output format.
Property | Value |
---|---|
Default value: | json |
Accepted values: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath query string. See http://jmespath.org/ for more information and examples.
Increase logging verbosity. Use --debug for full debug logs.
Property | Value |
---|---|
Default value: | False |