az acr connected-registry
使用 Azure 容器注册表管理连接的注册表资源。
命令
名称 | 说明 | 类型 | Status |
---|---|---|---|
az acr connected-registry create |
为 Azure 容器注册表创建连接的注册表。 |
Core | GA |
az acr connected-registry deactivate |
从 Azure 容器注册表停用连接的注册表。 |
Core | GA |
az acr connected-registry delete |
从 Azure 容器注册表中删除连接的注册表。 |
Core | GA |
az acr connected-registry get-settings |
检索激活连接注册表所需的信息,并创建或轮换同步令牌凭据。 |
Core | GA |
az acr connected-registry list |
列出当前父注册表下的所有已连接注册表。 |
Core | GA |
az acr connected-registry list-client-tokens |
列出与特定连接的注册表关联的所有客户端令牌。 |
Core | GA |
az acr connected-registry permissions |
跨多个连接的注册表管理存储库权限。 有关详细信息,请参阅 https://aka.ms/acr/connected-registry。 |
Core | GA |
az acr connected-registry permissions show |
显示连接的注册表同步范围映射信息。 |
Core | GA |
az acr connected-registry permissions update |
跨所有必需的连接注册表同步范围映射添加和删除存储库权限。 |
Core | GA |
az acr connected-registry show |
显示连接的注册表详细信息。 |
Core | GA |
az acr connected-registry update |
更新 Azure 容器注册表的连接注册表。 |
Core | GA |
az acr connected-registry create
为 Azure 容器注册表创建连接的注册表。
az acr connected-registry create --name
--registry
[--client-tokens]
[--gc-enabled {false, true}]
[--gc-schedule]
[--log-level]
[--mode {ReadOnly, ReadWrite}]
[--notifications]
[--parent]
[--repository]
[--resource-group]
[--sync-message-ttl]
[--sync-schedule]
[--sync-token]
[--sync-window]
[--yes]
示例
在注册表模式下创建连接注册表,访问存储库应用/hello-world 和服务/mycomponent。 它将使用正确的存储库权限创建同步令牌和范围映射。
az acr connected-registry create --registry mycloudregistry --name myconnectedregistry \
--repository "app/hello-world" "service/mycomponent"
创建仅具有读取权限的只读连接注册表并传递同步令牌
az acr connected-registry create --registry mycloudregistry --name myreadonlyacr \
--mode readonly --parent myconnectedregistry --sync-token mySyncTokenName
使用客户端令牌创建只读连接注册表,该令牌每天在午夜同步,同步窗口为 4 小时。
az acr connected-registry create -r mycloudregistry -n myreadonlyacr -p myconnectedregistry \
--repository "app/mycomponent" -m ReadOnly -s "0 12 * * *" -w PT4H \
--client-tokens myTokenName1 myTokenName2
必需参数
连接的注册表的名称。 名称长度必须介于 5 到 40 个字符之间,以字母开头,并且仅包含字母数字字符(包括“_”或“-” )。 名称在云 ACR 层次结构下必须唯一。
云 ACR 注册表的登录服务器。 必须是 FQDN 才能同时支持 Azure Stack。
可选参数
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
指定对已连接注册表中存储库的客户端访问权限。 它可以采用格式 [TOKEN_NAME01] [TOKEN_NAME02]...
指示是否启用垃圾回收。 默认启用。
属性 | 值 |
---|---|
默认值: | true |
接受的值: | false, true |
用于确定垃圾回收计划。 使用 cron 表达式来确定计划。 如果未指定,垃圾回收将设置为每天运行一次。
属性 | 值 |
---|---|
默认值: | 0 0 * * * |
设置用于在实例上进行日志记录的日志级别。 接受的日志级别为 Debug、Information、Warning、Error 和 None。
属性 | 值 |
---|---|
默认值: | Information |
确定同步时将具有的访问权限。
属性 | 值 |
---|---|
默认值: | ReadOnly |
接受的值: | ReadOnly, ReadWrite |
需要为其生成通知的项目模式列表。 使用格式“--notifications [PATTERN1 PATTERN2 ...]”。
父连接的注册表的名称。
指定需要同步到连接的注册表的存储库。 它可以采用格式 [REPO01] [REPO02]...
资源组的名称。 可以使用 az configure --defaults group=<name>
配置默认组。
确定同步消息将保留在云中的时长。 使用 ISO 8601 持续时间格式。
属性 | 值 |
---|---|
默认值: | P2D |
用于定义同步计划的可选参数。 使用 cron 表达式来确定计划。 如果未指定,则始终将实例视为联机状态,并尝试每分钟同步一次。
属性 | 值 |
---|---|
默认值: | * * * * * |
指定用于将连接的注册表与其父注册表同步的同步令牌。 它最多只有存储库权限,并且至少具有其模式所需的作。 它可以包括对多个存储库的访问。
如果存在 --sync-schedule,则为必需参数。 用于确定计划持续时间。 使用 ISO 8601 持续时间格式。
不要提示确认。
属性 | 值 |
---|---|
默认值: | False |
全局参数
提高日志记录详细程度以显示所有调试日志。
属性 | 值 |
---|---|
默认值: | 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 acr connected-registry deactivate
从 Azure 容器注册表停用连接的注册表。
az acr connected-registry deactivate --name
--registry
[--resource-group]
[--yes]
示例
停用连接的注册表“myconnectedregistry”。
az acr connected-registry deactivate -r mycloudregistry -n myconnectedregistry
必需参数
连接的注册表的名称。 名称长度必须介于 5 到 40 个字符之间,以字母开头,并且仅包含字母数字字符(包括“_”或“-” )。 名称在云 ACR 层次结构下必须唯一。
云 ACR 注册表的登录服务器。 必须是 FQDN 才能同时支持 Azure Stack。
可选参数
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 |
显示此帮助消息并退出。
仅显示错误,禁止显示警告。
属性 | 值 |
---|---|
默认值: | 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 acr connected-registry delete
从 Azure 容器注册表中删除连接的注册表。
az acr connected-registry delete --name
--registry
[--cleanup]
[--resource-group]
[--yes]
示例
从父注册表“mycloudregistry”中删除只读连接的注册表“myconnectedregistry”。
az acr connected-registry delete --registry mycloudregistry --name myconnectedregistry
删除只读连接的注册表“myconnectedregistry”,并从父注册表“mycloudregistry”同步令牌和范围映射。
az acr connected-registry delete -r mycloudregistry -n myconnectedregistry --cleanup
必需参数
连接的注册表的名称。 名称长度必须介于 5 到 40 个字符之间,以字母开头,并且仅包含字母数字字符(包括“_”或“-” )。 名称在云 ACR 层次结构下必须唯一。
云 ACR 注册表的登录服务器。 必须是 FQDN 才能同时支持 Azure Stack。
可选参数
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
它将删除同步令牌和范围映射资源。
属性 | 值 |
---|---|
默认值: | False |
资源组的名称。 可以使用 az configure --defaults group=<name>
配置默认组。
不要提示确认。
属性 | 值 |
---|---|
默认值: | False |
全局参数
提高日志记录详细程度以显示所有调试日志。
属性 | 值 |
---|---|
默认值: | 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 acr connected-registry get-settings
检索激活连接注册表所需的信息,并创建或轮换同步令牌凭据。
az acr connected-registry get-settings --name
--parent-protocol {http, https}
--registry
[--generate-password {1, 2}]
[--resource-group]
[--yes]
示例
获取在没有密码的情况下安装连接注册表所需的设置信息。
az acr connected-registry get-settings -r mycloudregistry -n myconnectedregistry --parent-protocol http
生成新的同步令牌密码 1 或轮换密码(如果已存在),并获取安装连接的注册表所需的设置信息。
az acr connected-registry get-settings -r mycloudregistry -n myconnectedregistry --generate-password 1 --parent-protocol https
必需参数
连接的注册表的名称。 名称长度必须介于 5 到 40 个字符之间,以字母开头,并且仅包含字母数字字符(包括“_”或“-” )。 名称在云 ACR 层次结构下必须唯一。
指定用于与其父级通信的协议。
属性 | 值 |
---|---|
接受的值: | http, https |
云 ACR 注册表的登录服务器。 必须是 FQDN 才能同时支持 Azure Stack。
可选参数
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
选择要生成的密码,并且需要从同步令牌中检索密码。
属性 | 值 |
---|---|
接受的值: | 1, 2 |
资源组的名称。 可以使用 az configure --defaults group=<name>
配置默认组。
不要提示确认。
属性 | 值 |
---|---|
默认值: | False |
全局参数
提高日志记录详细程度以显示所有调试日志。
属性 | 值 |
---|---|
默认值: | 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 acr connected-registry list
列出当前父注册表下的所有已连接注册表。
az acr connected-registry list --registry
[--no-children]
[--parent]
[--resource-group]
示例
以表格式列出“mycloudregistry”的所有已连接注册表。
az acr connected-registry list --registry mycloudregistry --output table
仅列出表格中展开形式的“mycloudregistry”的辅助子级。
az acr connected-registry list --registry mycloudregistry --no-children --output table
列出表内展开形式的“myconnectedregistry”的所有后代。
az acr connected-registry list -r mycloudregistry -p myconnectedregistry --output table
必需参数
云 ACR 注册表的登录服务器。 必须是 FQDN 才能同时支持 Azure Stack。
可选参数
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
用于从列表中删除所有子级。
属性 | 值 |
---|---|
默认值: | False |
父连接的注册表的名称。
资源组的名称。 可以使用 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 acr connected-registry list-client-tokens
列出与特定连接的注册表关联的所有客户端令牌。
az acr connected-registry list-client-tokens --name
--registry
[--resource-group]
示例
列出“myreadonlyacr”的所有客户端令牌。
az acr connected-registry list-client-tokens -r mycloudregistry -n myreadonlyacr -o table
必需参数
连接的注册表的名称。 名称长度必须介于 5 到 40 个字符之间,以字母开头,并且仅包含字母数字字符(包括“_”或“-” )。 名称在云 ACR 层次结构下必须唯一。
云 ACR 注册表的登录服务器。 必须是 FQDN 才能同时支持 Azure Stack。
可选参数
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 acr connected-registry show
显示连接的注册表详细信息。
az acr connected-registry show --name
--registry
[--resource-group]
示例
以表形式显示“myreadonlyacr”注册表的所有详细信息。
az acr connected-registry show --registry mycloudregistry --name myreadonlyacr --output table
必需参数
连接的注册表的名称。 名称长度必须介于 5 到 40 个字符之间,以字母开头,并且仅包含字母数字字符(包括“_”或“-” )。 名称在云 ACR 层次结构下必须唯一。
云 ACR 注册表的登录服务器。 必须是 FQDN 才能同时支持 Azure Stack。
可选参数
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 acr connected-registry update
更新 Azure 容器注册表的连接注册表。
az acr connected-registry update --name
--registry
[--add-client-tokens]
[--add-notifications]
[--gc-enabled {false, true}]
[--gc-schedule]
[--log-level]
[--remove-client-tokens]
[--remove-notifications]
[--resource-group]
[--sync-message-ttl]
[--sync-schedule]
[--sync-window]
示例
更新连接的注册表客户端令牌。
az acr connected-registry update --registry mycloudregistry --name myconnectedregistry \
--remove-client-tokens myTokenName1 --add-client-tokens myTokenName2 myTokenName3
更新连接的注册表的同步和窗口时间。
az acr connected-registry update --registry mycloudregistry --name myreadonlyacr \
--sync-schedule "0 12 * * *" --sync-window PT4H
必需参数
连接的注册表的名称。 名称长度必须介于 5 到 40 个字符之间,以字母开头,并且仅包含字母数字字符(包括“_”或“-” )。 名称在云 ACR 层次结构下必须唯一。
云 ACR 注册表的登录服务器。 必须是 FQDN 才能同时支持 Azure Stack。
可选参数
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
要添加的客户端令牌。 根据令牌 ID 使用格式“--add-client-tokens [TOKEN_NAME1 TOKEN_NAME2 ...]”。
要添加到通知列表的项目模式列表。 使用格式“--add-notifications [PATTERN1 PATTERN2 ...]”。
指示是否启用垃圾回收。 默认启用。
属性 | 值 |
---|---|
接受的值: | false, true |
用于确定垃圾回收计划。 使用 cron 表达式来确定计划。 如果未指定,垃圾回收将设置为每天运行一次。
设置用于在实例上进行日志记录的日志级别。 接受的日志级别为 Debug、Information、Warning、Error 和 None。
要删除的客户端令牌。 根据令牌 ID 使用格式“--remove-client-tokens [TOKEN_NAME1 TOKEN_NAME2 ...]”。
要从通知列表中删除的项目模式列表。 使用格式“--remove-notifications [PATTERN1 PATTERN2 ...]”。
资源组的名称。 可以使用 az configure --defaults group=<name>
配置默认组。
确定同步消息将保留在云中的时长。 使用 ISO 8601 持续时间格式。
用于定义同步计划的可选参数。 使用 cron 表达式来确定计划。 如果未指定,则始终将实例视为联机状态,并尝试每分钟同步一次。
用于确定计划持续时间。 使用 ISO 8601 持续时间格式。
全局参数
提高日志记录详细程度以显示所有调试日志。
属性 | 值 |
---|---|
默认值: | 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 |