Share via


az grafana service-account

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 service-account command. Learn more about extensions.

Commands to manage service accounts.

Commands

Name Description Type Status
az grafana service-account create

Create a new service account.

Extension GA
az grafana service-account delete

Delete a service account.

Extension GA
az grafana service-account list

List existing service accounts.

Extension GA
az grafana service-account show

Get the details of a service account.

Extension GA
az grafana service-account token

Commands to manage service account tokens.

Extension GA
az grafana service-account token create

Create a new service account token.

Extension GA
az grafana service-account token delete

Delete a service account token.

Extension GA
az grafana service-account token list

List existing service account tokens.

Extension GA
az grafana service-account update

Update a service account.

Extension GA

az grafana service-account create

Create a new service account.

az grafana service-account create --name
                                  --service-account
                                  [--is-disabled {false, true}]
                                  [--resource-group]
                                  [--role {Admin, Editor, Viewer}]

Examples

Create a service account with admin role

az grafana service-account create -g myResourceGroup -n myGrafana --service-account myAccount --role admin

Required Parameters

--name -n

Name of the Azure Managed Grafana.

--service-account

Service account name.

Optional Parameters

--is-disabled

Disable the service account. default: false.

Accepted values: false, true
--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
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 service-account delete

Delete a service account.

az grafana service-account delete --name
                                  --service-account
                                  [--resource-group]

Required Parameters

--name -n

Name of the Azure Managed Grafana.

--service-account

Id or name which can identify a service account.

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 service-account list

List existing service accounts.

az grafana service-account 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.

az grafana service-account show

Get the details of a service account.

az grafana service-account show --name
                                --service-account
                                [--resource-group]

Required Parameters

--name -n

Name of the Azure Managed Grafana.

--service-account

Id or name which can identify a service account.

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 service-account update

Update a service account.

az grafana service-account update --name
                                  --service-account
                                  [--is-disabled {false, true}]
                                  [--new-name]
                                  [--resource-group]
                                  [--role {Admin, Editor, Viewer}]

Examples

disable a service account

az grafana service-account update -g myResourceGroup -n myGrafana --service-account myAccount --is-disabled true

Required Parameters

--name -n

Name of the Azure Managed Grafana.

--service-account

Id or name which can identify a service account.

Optional Parameters

--is-disabled

Disable the service account. default: false.

Accepted values: false, true
--new-name

New name of the service account.

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