az storage container-rm
使用 Microsoft.Storage 资源提供程序管理 Azure 容器。
命令
名称 | 说明 | 类型 | Status |
---|---|---|---|
az storage container-rm create |
在指定的存储帐户下创建新容器。 |
Core | GA |
az storage container-rm delete |
在其帐户下删除指定的容器。 |
Core | GA |
az storage container-rm exists |
检查容器是否存在。 |
Core | GA |
az storage container-rm list |
列出指定存储帐户下的所有容器。 |
Core | GA |
az storage container-rm migrate-vlw |
将 Blob 容器从容器级别 WORM 迁移到启用了对象级别的不可变性容器。 |
Core | Preview |
az storage container-rm show |
显示指定容器的属性。 |
Core | GA |
az storage container-rm update |
更新容器的属性。 |
Core | GA |
az storage container-rm create
在指定的存储帐户下创建新容器。
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}]
示例
在指定的存储帐户下创建新容器。
az storage container-rm create --storage-account myaccount --name mycontainer
在指定的存储帐户(帐户 ID)下,使用元数据和公共访问作为 blob 创建新容器。
az storage container-rm create --storage-account myaccountid --name mycontainer --public-access blob --metada key1=value1 key2=value2
必需参数
容器名称。
存储帐户的名称或 ID。
可选参数
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
将容器默认为所有写入使用指定的加密范围。
属性 | 值 |
---|---|
Parameter group: | Encryption Policy Arguments |
阻止从容器默认值替代加密范围。
属性 | 值 |
---|---|
Parameter group: | Encryption Policy Arguments |
接受的值: | false, true |
容器的对象级别不可变性属性。 该属性是不可变的,只能在容器创建时设置为 true。 现有容器必须经历迁移过程。
属性 | 值 |
---|---|
接受的值: | false, true |
如果容器已存在,则引发异常。
属性 | 值 |
---|---|
默认值: | False |
空格分隔键值对中的元数据。 这会覆盖任何现有元数据。
指定是否可以公开访问容器中的数据。
属性 | 值 |
---|---|
接受的值: | blob, container, off |
资源组的名称。 可以使用 az configure --defaults group=<name>
配置默认组。
在 Blob 容器上启用 NFSv3 壁球。
属性 | 值 |
---|---|
接受的值: | AllSquash, NoRootSquash, RootSquash |
全局参数
提高日志记录详细程度以显示所有调试日志。
属性 | 值 |
---|---|
默认值: | False |
显示此帮助消息并退出。
仅显示错误,禁止显示警告。
属性 | 值 |
---|---|
默认值: | False |
Output format.
属性 | 值 |
---|---|
默认值: | json |
接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID
配置默认订阅。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
属性 | 值 |
---|---|
默认值: | False |
az storage container-rm delete
在其帐户下删除指定的容器。
az storage container-rm delete [--ids]
[--name]
[--resource-group]
[--storage-account]
[--subscription]
[--yes]
示例
在其帐户下删除指定的容器。
az storage container-rm delete --storage-account myAccount --name mycontainer
在其帐户(帐户 ID)下删除指定的容器。
az storage container-rm delete --storage-account myaccountid --name mycontainer
按资源 ID 删除指定的容器。
az storage container-rm delete --ids mycontainerid
可选参数
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
一个或多个资源 ID(以空格分隔)。 它应该是包含“Resource Id”参数的所有信息的完整资源 ID。 应提供 --ids 或其他“Resource Id”参数。
属性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
容器名称。
属性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
资源组的名称。 可以使用 az configure --defaults group=<name>
配置默认组。
属性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
存储帐户的名称或 ID。
属性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID
配置默认订阅。
属性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
不要提示确认。
属性 | 值 |
---|---|
默认值: | False |
全局参数
提高日志记录详细程度以显示所有调试日志。
属性 | 值 |
---|---|
默认值: | False |
显示此帮助消息并退出。
仅显示错误,禁止显示警告。
属性 | 值 |
---|---|
默认值: | False |
Output format.
属性 | 值 |
---|---|
默认值: | json |
接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
属性 | 值 |
---|---|
默认值: | False |
az storage container-rm exists
检查容器是否存在。
az storage container-rm exists [--ids]
[--name]
[--resource-group]
[--storage-account]
[--subscription]
示例
检查指定存储帐户下是否存在容器。
az storage container-rm exists --storage-account myaccount --name mycontainer
检查指定存储帐户(帐户 ID)下是否存在容器。
az storage container-rm exists --storage-account myaccountid --name mycontainer
按资源 ID 检查容器是否存在。
az storage container-rm exists --ids mycontainerid
可选参数
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
一个或多个资源 ID(以空格分隔)。 它应该是包含“Resource Id”参数的所有信息的完整资源 ID。 应提供 --ids 或其他“Resource Id”参数。
属性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
容器名称。
属性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
资源组的名称。 可以使用 az configure --defaults group=<name>
配置默认组。
属性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
存储帐户的名称或 ID。
属性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID
配置默认订阅。
属性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
全局参数
提高日志记录详细程度以显示所有调试日志。
属性 | 值 |
---|---|
默认值: | False |
显示此帮助消息并退出。
仅显示错误,禁止显示警告。
属性 | 值 |
---|---|
默认值: | False |
Output format.
属性 | 值 |
---|---|
默认值: | json |
接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
属性 | 值 |
---|---|
默认值: | False |
az storage container-rm list
列出指定存储帐户下的所有容器。
az storage container-rm list --storage-account
[--include-deleted]
[--resource-group]
示例
列出指定存储帐户下的所有容器。
az storage container-rm list --storage-account myaccount
列出指定存储帐户(帐户 ID)下的所有容器。
az storage container-rm list --storage-account myaccountid
列出指定存储帐户下的所有容器,包括已删除的容器。
az storage container-rm list --storage-account myaccount --include-deleted
必需参数
存储帐户的名称或 ID。
可选参数
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
指定时包括软删除的容器。
资源组的名称。 可以使用 az configure --defaults group=<name>
配置默认组。
全局参数
提高日志记录详细程度以显示所有调试日志。
属性 | 值 |
---|---|
默认值: | False |
显示此帮助消息并退出。
仅显示错误,禁止显示警告。
属性 | 值 |
---|---|
默认值: | False |
Output format.
属性 | 值 |
---|---|
默认值: | json |
接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID
配置默认订阅。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
属性 | 值 |
---|---|
默认值: | False |
az storage container-rm migrate-vlw
此命令处于预览阶段,正在开发中。 参考和支持级别:https://aka.ms/CLI_refstatus
将 Blob 容器从容器级别 WORM 迁移到启用了对象级别的不可变性容器。
az storage container-rm migrate-vlw [--ids]
[--name]
[--no-wait]
[--resource-group]
[--storage-account]
[--subscription]
示例
将 Blob 容器从容器级别 WORM 迁移到启用了对象级别的不可变性容器。
az storage container-rm migrate-vlw -n mycontainer --storage-account myaccount -g myresourcegroup
将 Blob 容器从容器级别 WORM 迁移到启用了对象级别的不可变性容器,而无需等待。
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
可选参数
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
一个或多个资源 ID(以空格分隔)。 它应该是包含“Resource Id”参数的所有信息的完整资源 ID。 应提供 --ids 或其他“Resource Id”参数。
属性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
容器名称。
属性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
不等待长时间运行的操作完成。
属性 | 值 |
---|---|
默认值: | False |
资源组的名称。 可以使用 az configure --defaults group=<name>
配置默认组。
属性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
存储帐户的名称或 ID。
属性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID
配置默认订阅。
属性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
全局参数
提高日志记录详细程度以显示所有调试日志。
属性 | 值 |
---|---|
默认值: | False |
显示此帮助消息并退出。
仅显示错误,禁止显示警告。
属性 | 值 |
---|---|
默认值: | False |
Output format.
属性 | 值 |
---|---|
默认值: | json |
接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
属性 | 值 |
---|---|
默认值: | False |
az storage container-rm show
显示指定容器的属性。
az storage container-rm show [--ids]
[--name]
[--resource-group]
[--storage-account]
[--subscription]
示例
显示指定存储帐户下容器的属性。
az storage container-rm show --storage-account myaccount --name mycontainer
显示指定存储帐户(帐户 ID)下容器的属性。
az storage container-rm show --storage-account myaccountid --name mycontainer
按资源 ID 显示容器的属性。
az storage container-rm show --ids mycontainerid
可选参数
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
一个或多个资源 ID(以空格分隔)。 它应该是包含“Resource Id”参数的所有信息的完整资源 ID。 应提供 --ids 或其他“Resource Id”参数。
属性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
容器名称。
属性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
资源组的名称。 可以使用 az configure --defaults group=<name>
配置默认组。
属性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
存储帐户的名称或 ID。
属性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID
配置默认订阅。
属性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
全局参数
提高日志记录详细程度以显示所有调试日志。
属性 | 值 |
---|---|
默认值: | False |
显示此帮助消息并退出。
仅显示错误,禁止显示警告。
属性 | 值 |
---|---|
默认值: | False |
Output format.
属性 | 值 |
---|---|
默认值: | json |
接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
属性 | 值 |
---|---|
默认值: | False |
az storage container-rm update
更新容器的属性。
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]
示例
将指定存储帐户下的容器的公共访问级别更新为“blob”。
az storage container-rm update --storage-account myaccount --name mycontainer --public-access blob
在指定的存储帐户(帐户 ID)下更新容器的元数据。
az storage container-rm update --storage-account myaccountid --name mycontainer --metadata newkey1=newvalue1 newkey2=newvalue2
按资源 ID 更新容器的公共访问级别。
az storage container-rm update --ids mycontainerid --public-access blob
可选参数
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
通过指定路径和键值对将对象添加到对象列表。 示例:--add property.listProperty <key=value, string or JSON string>
。
属性 | 值 |
---|---|
Parameter group: | Generic Update Arguments |
默认值: | [] |
使用“set”或“add”时,保留字符串文本,而不是尝试转换为 JSON。
属性 | 值 |
---|---|
Parameter group: | Generic Update Arguments |
默认值: | False |
一个或多个资源 ID(以空格分隔)。 它应该是包含“Resource Id”参数的所有信息的完整资源 ID。 应提供 --ids 或其他“Resource Id”参数。
属性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
空格分隔键值对中的元数据。 这会覆盖任何现有元数据。
容器名称。
属性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
指定是否可以公开访问容器中的数据。
属性 | 值 |
---|---|
接受的值: | blob, container, off |
从列表中删除属性或元素。 示例: --remove property.list <indexToRemove>
OR --remove propertyToRemove
.
属性 | 值 |
---|---|
Parameter group: | Generic Update Arguments |
默认值: | [] |
资源组的名称。 可以使用 az configure --defaults group=<name>
配置默认组。
属性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
在 Blob 容器上启用 NFSv3 壁球。
属性 | 值 |
---|---|
接受的值: | AllSquash, NoRootSquash, RootSquash |
通过指定要设置的属性路径和值来更新对象。 示例:--set property1.property2=<value>
。
属性 | 值 |
---|---|
Parameter group: | Generic Update Arguments |
默认值: | [] |
存储帐户的名称或 ID。
属性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID
配置默认订阅。
属性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
全局参数
提高日志记录详细程度以显示所有调试日志。
属性 | 值 |
---|---|
默认值: | False |
显示此帮助消息并退出。
仅显示错误,禁止显示警告。
属性 | 值 |
---|---|
默认值: | False |
Output format.
属性 | 值 |
---|---|
默认值: | json |
接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
属性 | 值 |
---|---|
默认值: | False |