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

az cloud

管理已注册的 Azure 云。

命令

名称 说明 类型 状态
az cloud list

列出已注册的云。

核心 GA
az cloud list-profiles

列出云支持的配置文件。

核心 GA
az cloud register

注册云。

核心 GA
az cloud set

设置活动云。

核心 GA
az cloud show

获取已注册云的详细信息。

核心 GA
az cloud unregister

注销云。

核心 GA
az cloud update

更新云的配置。

核心 GA

az cloud list

列出已注册的云。

az cloud list
全局参数
--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 cloud list-profiles

列出云支持的配置文件。

az cloud list-profiles [--name]
                       [--show-all]

可选参数

--name -n

已注册云的名称。

默认值: AzureCloud
--show-all

显示 CLI 中支持的所有可用配置文件。

默认值: False
全局参数
--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 cloud register

注册云。

注册云时,仅为其他终结点的自动检测指定资源管理器终结点。

az cloud register --name
                  [--cloud-config]
                  [--endpoint-active-directory]
                  [--endpoint-active-directory-data-lake-resource-id]
                  [--endpoint-active-directory-graph-resource-id]
                  [--endpoint-active-directory-resource-id]
                  [--endpoint-gallery]
                  [--endpoint-management]
                  [--endpoint-resource-manager]
                  [--endpoint-sql-management]
                  [--endpoint-vm-image-alias-doc]
                  [--profile {2017-03-09-profile, 2018-03-01-hybrid, 2019-03-01-hybrid, 2020-09-01-hybrid, latest}]
                  [--suffix-acr-login-server-endpoint]
                  [--suffix-azure-datalake-analytics-catalog-and-job-endpoint]
                  [--suffix-azure-datalake-store-file-system-endpoint]
                  [--suffix-keyvault-dns]
                  [--suffix-sql-server-hostname]
                  [--suffix-storage-endpoint]

示例

使用配置文件注册云

az cloud register -n MyCloud --cloud-config @"cloud.json"
("cloud.json" supports all the endpoint and suffix options in camel case or the JSON output format from `az cloud show`. See the example content below.)
{
  "endpointActiveDirectory": "https://login.microsoftonline.us",
  "suffixAcrLoginServerEndpoint": ".azurecr.us"
}
or
{
  "endpoints":{
    "activeDirectory": "https://login.microsoftonline.us"
  },
  "suffixes":{
    "acrLoginServerEndpoint": ".azurecr.us"
  }
}

必需参数

--name -n

已注册云的名称。

可选参数

--cloud-config

JSON 编码的云配置。 使用 @{file} 从文件加载。

--endpoint-active-directory

Active Directory 登录终结点。

--endpoint-active-directory-data-lake-resource-id

Data Lake 服务的 Active Directory 资源 ID。

--endpoint-active-directory-graph-resource-id

Active Directory 资源 ID。

--endpoint-active-directory-resource-id

要为其获取 AD 令牌的资源 ID。

--endpoint-gallery

模板库终结点。

--endpoint-management

管理服务终结点。

--endpoint-resource-manager

资源管理终结点。

--endpoint-sql-management

SQL Server 管理终结点。

--endpoint-vm-image-alias-doc

缓存常用虚拟机映像的文档的 URI。

--profile

要用于此云的配置文件。

接受的值: 2017-03-09-profile, 2018-03-01-hybrid, 2019-03-01-hybrid, 2020-09-01-hybrid, latest
--suffix-acr-login-server-endpoint

Azure 容器注册表登录服务器后缀。

--suffix-azure-datalake-analytics-catalog-and-job-endpoint

Data Lake Analytics 作业和目录服务 dns 后缀。

--suffix-azure-datalake-store-file-system-endpoint

Data Lake store 文件系统服务 dns 后缀。

--suffix-keyvault-dns

Key Vault 服务 DNS 后缀。

--suffix-sql-server-hostname

sql server 的 dns 后缀。

--suffix-storage-endpoint

存储帐户的终结点后缀。

全局参数
--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 cloud set

设置活动云。

az cloud set --name
             [--profile {2017-03-09-profile, 2018-03-01-hybrid, 2019-03-01-hybrid, 2020-09-01-hybrid, latest}]

示例

设置活动云。 (自动生成)

az cloud set --name MyRegisteredCloud

必需参数

--name -n

已注册云的名称。

可选参数

--profile

要用于此云的配置文件。

接受的值: 2017-03-09-profile, 2018-03-01-hybrid, 2019-03-01-hybrid, 2020-09-01-hybrid, latest
全局参数
--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 cloud show

获取已注册云的详细信息。

az cloud show [--name]

可选参数

--name -n

已注册云的名称。

默认值: AzureCloud
全局参数
--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 cloud unregister

注销云。

az cloud unregister --name

示例

注销云。 (自动生成)

az cloud unregister --name MyRegisteredCloud

必需参数

--name -n

已注册云的名称。

全局参数
--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 cloud update

更新云的配置。

az cloud update [--cloud-config]
                [--endpoint-active-directory]
                [--endpoint-active-directory-data-lake-resource-id]
                [--endpoint-active-directory-graph-resource-id]
                [--endpoint-active-directory-resource-id]
                [--endpoint-gallery]
                [--endpoint-management]
                [--endpoint-resource-manager]
                [--endpoint-sql-management]
                [--endpoint-vm-image-alias-doc]
                [--name]
                [--profile {2017-03-09-profile, 2018-03-01-hybrid, 2019-03-01-hybrid, 2020-09-01-hybrid, latest}]
                [--suffix-acr-login-server-endpoint]
                [--suffix-azure-datalake-analytics-catalog-and-job-endpoint]
                [--suffix-azure-datalake-store-file-system-endpoint]
                [--suffix-keyvault-dns]
                [--suffix-sql-server-hostname]
                [--suffix-storage-endpoint]

示例

更新云的配置。 (自动生成)

az cloud update --profile latest

可选参数

--cloud-config

JSON 编码的云配置。 使用 @{file} 从文件加载。

--endpoint-active-directory

Active Directory 登录终结点。

--endpoint-active-directory-data-lake-resource-id

Data Lake 服务的 Active Directory 资源 ID。

--endpoint-active-directory-graph-resource-id

Active Directory 资源 ID。

--endpoint-active-directory-resource-id

要为其获取 AD 令牌的资源 ID。

--endpoint-gallery

模板库终结点。

--endpoint-management

管理服务终结点。

--endpoint-resource-manager

资源管理终结点。

--endpoint-sql-management

SQL Server 管理终结点。

--endpoint-vm-image-alias-doc

缓存常用虚拟机映像的文档的 URI。

--name -n

已注册云的名称。

默认值: AzureCloud
--profile

要用于此云的配置文件。

接受的值: 2017-03-09-profile, 2018-03-01-hybrid, 2019-03-01-hybrid, 2020-09-01-hybrid, latest
--suffix-acr-login-server-endpoint

Azure 容器注册表登录服务器后缀。

--suffix-azure-datalake-analytics-catalog-and-job-endpoint

Data Lake Analytics 作业和目录服务 dns 后缀。

--suffix-azure-datalake-store-file-system-endpoint

Data Lake store 文件系统服务 dns 后缀。

--suffix-keyvault-dns

Key Vault 服务 DNS 后缀。

--suffix-sql-server-hostname

sql server 的 dns 后缀。

--suffix-storage-endpoint

存储帐户的终结点后缀。

全局参数
--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 获取完整的调试日志。