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

az portal dashboard

注释

此参考是 Azure CLI(版本 2.67.0 或更高版本)门户 扩展的一部分。 该扩展将在首次运行 az portal dashboard 命令时自动安装。 了解更多关于扩展 的相关信息。

管理门户仪表板。

命令

名称 说明 类型 Status
az portal dashboard create

创建仪表板。

扩展 GA
az portal dashboard delete

删除仪表板。

扩展 GA
az portal dashboard import

从 JSON 文件导入仪表板。

扩展 GA
az portal dashboard list

列出订阅或资源组中的所有仪表板。

扩展 GA
az portal dashboard show

获取仪表板的详细信息。

扩展 GA
az portal dashboard update

更新现有仪表板。

扩展 GA

az portal dashboard create

创建仪表板。

az portal dashboard create --name
                           --resource-group
                           [--input-path]
                           [--lenses]
                           [--___location]
                           [--metadata]
                           [--tags]

示例

创建仪表板

az portal dashboard create --___location "eastus" --name "testDashboard" --resource-group "testRG" --input-path "/src/json/properties.json" --tags aKey=aValue anotherKey=anotherValue

必需参数

--name -n

仪表板的名称。

--resource-group -g

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

可选参数

--input-path

仪表板属性 JSON 文件的路径。 如果提供,则不应指定其他 Properties 参数。

--lenses

仪表板镜头。 支持速记语法、json-file 和 yaml-file。 请尝试“??” 以显示更多内容。

--___location -l

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

--metadata

仪表板元数据。 支持速记语法、json-file 和 yaml-file。 请尝试“??” 以显示更多内容。

--tags

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

全局参数
--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 portal dashboard delete

删除仪表板。

az portal dashboard delete [--ids]
                           [--name]
                           [--resource-group]
                           [--subscription]
                           [--yes]

示例

删除仪表板

az portal dashboard delete --name testDashboard --resource-group testRG

可选参数

--ids

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

--name -n

仪表板的名称。

--resource-group -g

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

--subscription

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

--yes -y

不要提示确认。

默认值: 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 portal dashboard import

从 JSON 文件导入仪表板。

az portal dashboard import --input-path
                           --name
                           --resource-group

示例

导入仪表板

az portal dashboard import -n myDashboard -g myResourceGroup --input-path /src/json/dashboard.json

必需参数

--input-path

仪表板 JSON 文件的路径。

--name -n

仪表板的名称。

--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 portal dashboard list

列出订阅或资源组中的所有仪表板。

az portal dashboard list [--max-items]
                         [--next-token]
                         [--resource-group]

示例

列出 resourceGroup 中的所有仪表板

az portal dashboard list --resource-group testRG

列出订阅中的所有仪表板

az portal dashboard list

可选参数

--max-items

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

--next-token

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

--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 portal dashboard show

获取仪表板的详细信息。

az portal dashboard show [--ids]
                         [--name]
                         [--resource-group]
                         [--subscription]

示例

获取仪表板

az portal dashboard show --name testDashboard --resource-group testRG

可选参数

--ids

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

--name -n

仪表板的名称。

--resource-group -g

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

--subscription

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

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

更新现有仪表板。

az portal dashboard update [--add]
                           [--force-string {0, 1, f, false, n, no, t, true, y, yes}]
                           [--ids]
                           [--input-path]
                           [--lenses]
                           [--metadata]
                           [--name]
                           [--remove]
                           [--resource-group]
                           [--set]
                           [--subscription]
                           [--tags]

示例

更新仪表板

az portal dashboard update --name "testDashboard" --resource-group "testRG" --input-path "/src/json/properties.json"

可选参数

--add

通过指定路径和键值对将对象添加到对象列表。 示例:--add property.listProperty <key=value, string or JSON string>

--force-string

使用“set”或“add”时,保留字符串文本,而不是尝试转换为 JSON。

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

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

--input-path

仪表板属性 JSON 文件的路径。 如果提供,则不应指定其他 Properties 参数。

--lenses

仪表板镜头。 支持速记语法、json-file 和 yaml-file。 请尝试“??” 以显示更多内容。

--metadata

仪表板元数据。 支持速记语法、json-file 和 yaml-file。 请尝试“??” 以显示更多内容。

--name -n

仪表板的名称。

--remove

从列表中删除属性或元素。 示例: --remove property.list <indexToRemove> OR --remove propertyToRemove.

--resource-group -g

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

--set

通过指定要设置的属性路径和值来更新对象。 示例:--set property1.property2=<value>

--subscription

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

--tags

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

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