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

az storage context-cache

管理上下文缓存。

命令

名称 说明 类型 Status
az storage context-cache check-name

检查上下文缓存资源名称的可用性。

Core GA
az storage context-cache container

管理上下文缓存容器。

Core GA
az storage context-cache container create

在上下文缓存中创建容器。

Core GA
az storage context-cache container delete

从上下文缓存中删除一个容器。

Core GA
az storage context-cache container list

在上下文缓存中列出所有容器。

Core GA
az storage context-cache container show

在上下文缓存中获取一个容器。

Core GA
az storage context-cache container update

在上下文缓存中更新容器。

Core GA
az storage context-cache container wait

将 CLI 置于等待状态,直到满足条件。

Core GA
az storage context-cache create

创建上下文缓存。

Core GA
az storage context-cache delete

删除上下文缓存。

Core GA
az storage context-cache identity

管理标识。

Core GA
az storage context-cache identity assign

分配用户或系统托管标识。

Core GA
az storage context-cache identity remove

删除用户或系统托管标识。

Core GA
az storage context-cache identity show

显示托管标识的详细信息。

Core GA
az storage context-cache identity wait

将 CLI 置于等待状态,直到满足条件。

Core GA
az storage context-cache list

按订阅列表上下文缓存。

Core GA
az storage context-cache show

获取上下文缓存。

Core GA
az storage context-cache update

更新上下文缓存。

Core GA
az storage context-cache wait

将 CLI 置于等待状态,直到满足条件。

Core GA

az storage context-cache check-name

检查上下文缓存资源名称的可用性。

az storage context-cache check-name --name
                                    [--acquire-policy-token]
                                    [--change-reference]
                                    [--type {Microsoft.Storage/contextCaches}]

示例

检查上下文缓存名称是否可用

az storage context-cache check-name --name mycontextcache

必需参数

--name

上下文缓存资源的名称用于检查可用性。

属性 值
参数组: Body Arguments

可选参数

以下参数是可选的,但根据上下文,命令可能需要一个或多个参数才能成功执行。

--acquire-policy-token

为此资源操作自动获取Azure Policy令牌。

属性 值
参数组: Global Policy Arguments
--change-reference

此资源操作的相关更改引用 ID。

属性 值
参数组: Global Policy Arguments
--type

用于检查可用性的上下文缓存资源类型。

属性 值
参数组: Body Arguments
默认值: Microsoft.Storage/contextCaches
接受的值: Microsoft.Storage/contextCaches
全局参数
--debug

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

属性 值
默认值: False
--help -h

显示此帮助消息并退出。

--only-show-errors

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

属性 值
默认值: False
--output -o

输出格式。

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

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

--subscription

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

--verbose

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

属性 值
默认值: False

az storage context-cache create

创建上下文缓存。

az storage context-cache create --account-kind {DataZone, Global, Regional}
                                --context-cache-name --name
                                --resource-group
                                [--acquire-policy-token]
                                [--change-reference]
                                [--description]
                                [--encryption]
                                [--identity]
                                [--location]
                                [--no-wait {0, 1, f, false, n, no, t, true, y, yes}]
                                [--tags]

示例

使用系统分配的标识创建上下文缓存

az storage context-cache create --resource-group testrg --name testaccount --location eastus --identity "{type:SystemAssigned}" --account-kind Regional --description "Test Context Cache account"

必需参数

--account-kind

那种用来确定存储拓扑的账户。

属性 值
参数组: Properties Arguments
接受的值: DataZone, Global, Regional
--context-cache-name --name -n

上下文缓存的名称。

--resource-group -g

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

可选参数

以下参数是可选的,但根据上下文,命令可能需要一个或多个参数才能成功执行。

--acquire-policy-token

为此资源操作自动获取Azure Policy令牌。

属性 值
参数组: Global Policy Arguments
--change-reference

此资源操作的相关更改引用 ID。

属性 值
参数组: Global Policy Arguments
--description

账户描述。

属性 值
参数组: Properties Arguments
--encryption

账户的加密设置。 支持速记语法、json-file 和 yaml-file。 请尝试“??” 以显示更多内容。

属性 值
参数组: Properties Arguments
--identity

分配给此资源的托管服务标识。 支持速记语法、json-file 和 yaml-file。 请尝试“??” 以显示更多内容。

属性 值
参数组: Resource Arguments
--location -l

未指定资源所在的地理位置,将使用资源组的位置。

属性 值
参数组: Resource Arguments
--no-wait

不等待长时间运行的操作完成。

属性 值
接受的值: 0, 1, f, false, n, no, t, true, y, yes
--tags

资源标记。 支持速记语法、json-file 和 yaml-file。 请尝试“??” 以显示更多内容。

属性 值
参数组: Resource Arguments
全局参数
--debug

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

属性 值
默认值: False
--help -h

显示此帮助消息并退出。

--only-show-errors

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

属性 值
默认值: False
--output -o

输出格式。

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

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

--subscription

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

--verbose

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

属性 值
默认值: False

az storage context-cache delete

删除上下文缓存。

az storage context-cache delete [--acquire-policy-token]
                                [--change-reference]
                                [--context-cache-name --name]
                                [--ids]
                                [--no-wait {0, 1, f, false, n, no, t, true, y, yes}]
                                [--resource-group]
                                [--subscription]
                                [--yes]

示例

删除上下文缓存

az storage context-cache delete --resource-group testrg --context-cache-name testaccount

可选参数

以下参数是可选的,但根据上下文,命令可能需要一个或多个参数才能成功执行。

--acquire-policy-token

为此资源操作自动获取Azure Policy令牌。

属性 值
参数组: Global Policy Arguments
--change-reference

此资源操作的相关更改引用 ID。

属性 值
参数组: Global Policy Arguments
--context-cache-name --name -n

上下文缓存的名称。

属性 值
参数组: Resource Id Arguments
--ids

一个或多个资源 ID(以空格分隔)。 它应该是包含“Resource Id”参数的所有信息的完整资源 ID。 应提供 --ids 或其他“Resource Id”参数。

属性 值
参数组: Resource Id Arguments
--no-wait

不等待长时间运行的操作完成。

属性 值
接受的值: 0, 1, f, false, n, no, t, true, y, yes
--resource-group -g

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

属性 值
参数组: Resource Id Arguments
--subscription

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

属性 值
参数组: Resource Id Arguments
--yes -y

不请求确认。

属性 值
默认值: False
全局参数
--debug

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

属性 值
默认值: False
--help -h

显示此帮助消息并退出。

--only-show-errors

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

属性 值
默认值: False
--output -o

输出格式。

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

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

--verbose

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

属性 值
默认值: False

az storage context-cache list

按订阅列表上下文缓存。

az storage context-cache list [--max-items]
                              [--next-token]
                              [--resource-group]

示例

按订阅列出上下文缓存

az storage context-cache list

按资源组列出上下文缓存

az storage context-cache list --resource-group testrg

可选参数

以下参数是可选的,但根据上下文,命令可能需要一个或多个参数才能成功执行。

--max-items

命令输出中要返回的项总数。 如果可用的项总数大于指定的值,则会在命令的输出中提供令牌。 若要恢复分页,请在后续命令的 --next-token 参数中提供令牌值。

属性 值
参数组: Pagination Arguments
--next-token

用于指定开始分页的位置的令牌。 这是先前截断的响应中的令牌值。

属性 值
参数组: Pagination Arguments
--resource-group -g

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

全局参数
--debug

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

属性 值
默认值: False
--help -h

显示此帮助消息并退出。

--only-show-errors

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

属性 值
默认值: False
--output -o

输出格式。

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

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

--subscription

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

--verbose

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

属性 值
默认值: False

az storage context-cache show

获取上下文缓存。

az storage context-cache show [--context-cache-name --name]
                              [--ids]
                              [--resource-group]
                              [--subscription]

示例

获取上下文缓存

az storage context-cache show --resource-group testrg --context-cache-name testaccount

可选参数

以下参数是可选的,但根据上下文,命令可能需要一个或多个参数才能成功执行。

--context-cache-name --name -n

上下文缓存的名称。

属性 值
参数组: Resource Id Arguments
--ids

一个或多个资源 ID(以空格分隔)。 它应该是包含“Resource Id”参数的所有信息的完整资源 ID。 应提供 --ids 或其他“Resource Id”参数。

属性 值
参数组: Resource Id Arguments
--resource-group -g

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

属性 值
参数组: Resource Id Arguments
--subscription

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

属性 值
参数组: Resource Id Arguments
全局参数
--debug

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

属性 值
默认值: False
--help -h

显示此帮助消息并退出。

--only-show-errors

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

属性 值
默认值: False
--output -o

输出格式。

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

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

--verbose

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

属性 值
默认值: False

az storage context-cache update

更新上下文缓存。

az storage context-cache update [--acquire-policy-token]
                                [--change-reference]
                                [--context-cache-name --name]
                                [--description]
                                [--encryption]
                                [--ids]
                                [--mi-system-assigned --system-assigned]
                                [--mi-user-assigned --user-assigned]
                                [--no-wait {0, 1, f, false, n, no, t, true, y, yes}]
                                [--resource-group]
                                [--subscription]
                                [--tags]

示例

更新上下文缓存说明

az storage context-cache update --resource-group MyResourceGroup --name mycontextcache --description 'Updated cache description'

可选参数

以下参数是可选的,但根据上下文,命令可能需要一个或多个参数才能成功执行。

--acquire-policy-token

为此资源操作自动获取Azure Policy令牌。

属性 值
参数组: Global Policy Arguments
--change-reference

此资源操作的相关更改引用 ID。

属性 值
参数组: Global Policy Arguments
--context-cache-name --name -n

上下文缓存的名称。

属性 值
参数组: Resource Id Arguments
--description

账户描述。

属性 值
参数组: Properties Arguments
--encryption

账户的加密设置。 支持速记语法、json-file 和 yaml-file。 请尝试“??” 以显示更多内容。

属性 值
参数组: Properties Arguments
--ids

一个或多个资源 ID(以空格分隔)。 它应该是包含“Resource Id”参数的所有信息的完整资源 ID。 应提供 --ids 或其他“Resource Id”参数。

属性 值
参数组: Resource Id Arguments
--mi-system-assigned --system-assigned

设置系统托管标识。

属性 值
参数组: Identity Arguments
--mi-user-assigned --user-assigned

设置用户托管标识。 支持速记语法、json-file 和 yaml-file。 请尝试“??” 以显示更多内容。

属性 值
参数组: Identity Arguments
--no-wait

不等待长时间运行的操作完成。

属性 值
接受的值: 0, 1, f, false, n, no, t, true, y, yes
--resource-group -g

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

属性 值
参数组: Resource Id Arguments
--subscription

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

属性 值
参数组: Resource Id Arguments
--tags

资源标记。 支持速记语法、json-file 和 yaml-file。 请尝试“??” 以显示更多内容。

属性 值
参数组: Properties Arguments
全局参数
--debug

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

属性 值
默认值: False
--help -h

显示此帮助消息并退出。

--only-show-errors

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

属性 值
默认值: False
--output -o

输出格式。

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

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

--verbose

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

属性 值
默认值: False

az storage context-cache wait

将 CLI 置于等待状态,直到满足条件。

az storage context-cache wait [--acquire-policy-token]
                              [--change-reference]
                              [--context-cache-name --name]
                              [--created]
                              [--custom]
                              [--deleted]
                              [--exists]
                              [--ids]
                              [--interval]
                              [--resource-group]
                              [--subscription]
                              [--timeout]
                              [--updated]

可选参数

以下参数是可选的,但根据上下文,命令可能需要一个或多个参数才能成功执行。

--acquire-policy-token

为此资源操作自动获取Azure Policy令牌。

属性 值
参数组: Global Policy Arguments
--change-reference

此资源操作的相关更改引用 ID。

属性 值
参数组: Global Policy Arguments
--context-cache-name --name -n

上下文缓存的名称。

属性 值
参数组: Resource Id Arguments
--created

等待在“Succeeded”中使用“provisioningState”创建。

属性 值
参数组: Wait Condition Arguments
默认值: False
--custom

等待条件满足自定义 JMESPath 查询。 例如 provisioningState!='InProgress', instanceView.statuses[?code=='PowerState/running']。

属性 值
参数组: Wait Condition Arguments
--deleted

等到删除为止。

属性 值
参数组: Wait Condition Arguments
默认值: False
--exists

等待资源存在。

属性 值
参数组: Wait Condition Arguments
默认值: False
--ids

一个或多个资源 ID(以空格分隔)。 它应该是包含“Resource Id”参数的所有信息的完整资源 ID。 应提供 --ids 或其他“Resource Id”参数。

属性 值
参数组: Resource Id Arguments
--interval

轮询间隔(以秒为单位)。

属性 值
参数组: Wait Condition Arguments
默认值: 30
--resource-group -g

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

属性 值
参数组: Resource Id Arguments
--subscription

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

属性 值
参数组: Resource Id Arguments
--timeout

请求超时(以秒为单位)。 适用于对服务的每个调用。

属性 值
参数组: Wait Condition Arguments
默认值: 3600
--updated

等到 provisioningState 更新为“Succeeded”。

属性 值
参数组: Wait Condition Arguments
默认值: False
全局参数
--debug

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

属性 值
默认值: False
--help -h

显示此帮助消息并退出。

--only-show-errors

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

属性 值
默认值: False
--output -o

输出格式。

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

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

--verbose

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

属性 值
默认值: False