Share via


az grafana api-key

Note

This reference is part of the amg extension for the Azure CLI (version 2.61.0 or higher). The extension will automatically install the first time you run an az grafana api-key command. Learn more about extensions.

Commands to manage api keys.

Commands

Name Description Type Status
az grafana api-key create

Create a new API key.

Extension GA
az grafana api-key delete

Delete an API key.

Extension GA
az grafana api-key list

List existing API keys.

Extension GA

az grafana api-key create

Create a new API key.

az grafana api-key create --key
                          --name
                          [--resource-group]
                          [--role {Admin, Editor, Viewer}]
                          [--time-to-live]

Required Parameters

--key

Api key name.

--name -n

Name of the Azure Managed Grafana.

Optional Parameters

--resource-group -g

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

--role -r

Grafana role name.

Accepted values: Admin, Editor, Viewer
Default value: Viewer
--time-to-live

The API key life duration. For example, 1d if your key is going to last fr one day. Supported units are: s,m,h,d,w,M,y.

Default value: 1d
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 grafana api-key delete

Delete an API key.

az grafana api-key delete --key
                          --name
                          [--resource-group]

Required Parameters

--key

Id or name that identify an api-key to delete.

--name -n

Name of the Azure Managed Grafana.

Optional Parameters

--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 grafana api-key list

List existing API keys.

az grafana api-key list --name
                        [--resource-group]

Required Parameters

--name -n

Name of the Azure Managed Grafana.

Optional Parameters

--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.