你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

az storage container legal-hold

管理容器法定保留。

命令

名称 说明 类型 状态
az storage container legal-hold clear

清除法定保留标记。

核心 GA
az storage container legal-hold set

设置法定保留标记。

核心 GA
az storage container legal-hold show

获取容器的法律保留属性。

核心 GA

清除法定保留标记。

az storage container legal-hold clear --account-name
                                      --container-name
                                      --tags
                                      [--allow-protected-append-writes-all {false, true}]
                                      [--resource-group]

清除法定保留标记。

az storage container legal-hold clear --tags tag1 tag2 --container-name mycontainer --account-name mystorageccount -g MyResourceGroup
--account-name

存储帐户名称。 相关环境变量:AZURE_STORAGE_ACCOUNT。

--container-name -c

容器名称。

--tags

空格分隔标记。 每个标记应为 3 到 23 个字母数字字符,并规范化为小写。

--allow-protected-append-writes-all --w-all

启用后,可以将新块写入追加 Blob 和块 Blob,同时保持法定保留保护和符合性。 只能添加新块,任何现有块都无法修改或删除。

接受的值: false, true
--resource-group -g

资源组的名称。 可以使用 az configure --defaults group=<name> 配置默认组。

全局参数
--debug

提高日志记录详细程度以显示所有调试日志。

--help -h

显示此帮助消息并退出。

--only-show-errors

只显示错误,取消显示警告。

--output -o

输出格式。

接受的值: json, jsonc, none, table, tsv, yaml, yamlc
默认值: json
--query

JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/

--subscription

订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。

--verbose

提高日志记录详细程度。 使用 --debug 获取完整的调试日志。

设置法定保留标记。

az storage container legal-hold set --account-name
                                    --container-name
                                    --tags
                                    [--allow-protected-append-writes-all {false, true}]
                                    [--resource-group]

设置法定保留标记。

az storage container legal-hold set --tags tag1 tag2 --container-name mycontainer --account-name mystorageccount -g MyResourceGroup
--account-name

存储帐户名称。 相关环境变量:AZURE_STORAGE_ACCOUNT。

--container-name -c

容器名称。

--tags

空格分隔标记。 每个标记应为 3 到 23 个字母数字字符,并规范化为小写。

--allow-protected-append-writes-all --w-all

启用后,可以将新块写入追加 Blob 和块 Blob,同时保持法定保留保护和符合性。 只能添加新块,任何现有块都无法修改或删除。

接受的值: false, true
--resource-group -g

资源组的名称。 可以使用 az configure --defaults group=<name> 配置默认组。

全局参数
--debug

提高日志记录详细程度以显示所有调试日志。

--help -h

显示此帮助消息并退出。

--only-show-errors

只显示错误,取消显示警告。

--output -o

输出格式。

接受的值: json, jsonc, none, table, tsv, yaml, yamlc
默认值: json
--query

JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/

--subscription

订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。

--verbose

提高日志记录详细程度。 使用 --debug 获取完整的调试日志。

获取容器的法律保留属性。

az storage container legal-hold show --account-name
                                     --container-name
                                     [--resource-group]

获取容器的法律保留属性。 (自动生成)

az storage container legal-hold show --account-name mystorageccount --container-name mycontainer
--account-name

存储帐户名称。 相关环境变量:AZURE_STORAGE_ACCOUNT。

--container-name -c

容器名称。

--resource-group -g

资源组的名称。 可以使用 az configure --defaults group=<name> 配置默认组。

全局参数
--debug

提高日志记录详细程度以显示所有调试日志。

--help -h

显示此帮助消息并退出。

--only-show-errors

只显示错误,取消显示警告。

--output -o

输出格式。

接受的值: json, jsonc, none, table, tsv, yaml, yamlc
默认值: json
--query

JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/

--subscription

订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。

--verbose

提高日志记录详细程度。 使用 --debug 获取完整的调试日志。