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.

This command group has been deprecated and will be removed in a future release.

Commands to manage API keys.

API keys are deprecated by Grafana Labs and will not be supported in Grafana 12 and above. Please use service accounts instead.

Commands

Name Description Type Status
az grafana api-key create

Create a new API key.

Extension Deprecated
az grafana api-key delete

Delete an API key.

Extension Deprecated
az grafana api-key list

List existing API keys.

Extension Deprecated

az grafana api-key create

Deprecated

This command is implicitly deprecated because command group 'grafana api-key' is deprecated and will be removed in a future release.

Create a new API key.

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

Examples

Create a new API key.

az grafana api-key create -g myResourceGroup -n myGrafana --key myKey

Required Parameters

--key

Api key name.

--name -n

Name of the Azure Managed Grafana.

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--resource-group -g

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

--role -r

Grafana role name.

Property Value
Default value: Viewer
Accepted values: Admin, Editor, 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.

Property Value
Default value: 1d
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--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.

Property Value
Default value: False

az grafana api-key delete

Deprecated

This command is implicitly deprecated because command group 'grafana api-key' is deprecated and will be removed in a future release.

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

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

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

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--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.

Property Value
Default value: False

az grafana api-key list

Deprecated

This command is implicitly deprecated because command group 'grafana api-key' is deprecated and will be removed in a future release.

List existing API keys.

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

Required Parameters

--name -n

Name of the Azure Managed Grafana.

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

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

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--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.

Property Value
Default value: False