مشاركة عبر


az portal dashboard

Note

This reference is part of the portal extension for the Azure CLI (version 2.67.0 or higher). The extension will automatically install the first time you run an az portal dashboard command. Learn more about extensions.

Manage portal dashboards.

Commands

Name Description Type Status
az portal dashboard create

Create a Dashboard.

Extension GA
az portal dashboard delete

Delete the Dashboard.

Extension GA
az portal dashboard import

Import a Dashboard from a JSON file.

Extension GA
az portal dashboard list

List all the dashboards within a subscription or a resource group.

Extension GA
az portal dashboard show

Gets details for a dashboard.

Extension GA
az portal dashboard update

Update an existing Dashboard.

Extension GA

az portal dashboard create

Create a Dashboard.

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

Examples

Create a Dashboard

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

Required Parameters

--name -n

The name of the dashboard.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Optional Parameters

--input-path

The path to the dashboard properties JSON file. If provided, no other Properties arguments should be specified.

--lenses

The dashboard lenses. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.

--location -l

The geo-location where the resource lives When not specified, the location of the resource group will be used.

--metadata

The dashboard metadata. Support json-file and yaml-file.

--tags

Resource tags. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az portal dashboard delete

Delete the Dashboard.

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

Examples

Delete a Dashboard

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

Optional Parameters

--ids

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

--name -n

The name of the dashboard.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--yes -y

Do not prompt for confirmation.

Default value: False
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az portal dashboard import

Import a Dashboard from a JSON file.

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

Examples

Import a Dashboard

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

Required Parameters

--input-path

The path to the dashboard JSON file.

--name -n

The name of the dashboard.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az portal dashboard list

List all the dashboards within a subscription or a resource group.

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

Examples

List all dashboards in a resourceGroup

az portal dashboard list --resource-group testRG

List all dashboards in a subscription

az portal dashboard list

Optional Parameters

--max-items

Total number of items to return in the command's output. If the total number of items available is more than the value specified, a token is provided in the command's output. To resume pagination, provide the token value in --next-token argument of a subsequent command.

--next-token

Token to specify where to start paginating. This is the token value from a previously truncated response.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az portal dashboard show

Gets details for a dashboard.

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

Examples

Get a Dashboard

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

Optional Parameters

--ids

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

--name -n

The name of the dashboard.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az portal dashboard update

Update an existing Dashboard.

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]

Examples

Update a Dashboard

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

Optional Parameters

--add

Add an object to a list of objects by specifying a path and key value pairs. Example: --add property.listProperty <key=value, string or JSON string>.

--force-string

When using 'set' or 'add', preserve string literals instead of attempting to convert to JSON.

Accepted values: 0, 1, f, false, n, no, t, true, y, yes
--ids

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

--input-path

The path to the dashboard properties JSON file. If provided, no other Properties arguments should be specified.

--lenses

The dashboard lenses. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.

--metadata

The dashboard metadata. Support json-file and yaml-file.

--name -n

The name of the dashboard.

--remove

Remove a property or an element from a list. Example: --remove property.list <indexToRemove> OR --remove propertyToRemove.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--set

Update an object by specifying a property path and value to set. Example: --set property1.property2=<value>.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--tags

Resource tags. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.