Κοινή χρήση μέσω


az grafana notification-channel

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 notification-channel command. Learn more about extensions.

Commands to manage notification channels of an instance.

As part of legacy alerting, this command group will be deprecated in a future release.

Commands

Name Description Type Status
az grafana notification-channel create

Create a notification channel.

Extension GA
az grafana notification-channel delete

Delete a notification channel.

Extension GA
az grafana notification-channel list

List all notification channels of an instance.

Extension GA
az grafana notification-channel show

Get the details of a notification channel.

Extension GA
az grafana notification-channel test

Test a notification channel.

Extension GA
az grafana notification-channel update

Update a notification channel.

Extension GA

az grafana notification-channel create

Create a notification channel.

az grafana notification-channel create --definition
                                       --name
                                       [--api-key]
                                       [--resource-group]

Examples

create a notification channel for Teams

az grafana notification-channel create -n MyGrafana --definition '{
  "name": "Teams",
  "settings": {
    "uploadImage": true,
    "url": "https://webhook.office.com/IncomingWebhook/"
   },
  "type": "teams"
}'

Required Parameters

--definition

Json string with notification channel definition, or a path to a file with such content.

--name -n

Name of the Azure Managed Grafana.

Optional Parameters

--api-key --token -t

Api key or service account token, a randomly generated string used to interact with Grafana endpoint; if missing, CLI will use current logged-in user's credentials.

--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 notification-channel delete

Delete a notification channel.

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

Required Parameters

--name -n

Name of the Azure Managed Grafana.

--notification-channel

Id, uid which can identify a data source. CLI will search in the order of id, and uid, till finds a match.

Optional Parameters

--api-key --token -t

Api key or service account token, a randomly generated string used to interact with Grafana endpoint; if missing, CLI will use current logged-in user's credentials.

--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 notification-channel list

List all notification channels of an instance.

az grafana notification-channel list --name
                                     [--api-key]
                                     [--resource-group]
                                     [--short]

Required Parameters

--name -n

Name of the Azure Managed Grafana.

Optional Parameters

--api-key --token -t

Api key or service account token, a randomly generated string used to interact with Grafana endpoint; if missing, CLI will use current logged-in user's credentials.

--resource-group -g

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

--short

List notification channels in short format.

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 grafana notification-channel show

Get the details of a notification channel.

az grafana notification-channel show --name
                                     --notification-channel
                                     [--api-key]
                                     [--resource-group]

Required Parameters

--name -n

Name of the Azure Managed Grafana.

--notification-channel

Id, uid which can identify a data source. CLI will search in the order of id, and uid, till finds a match.

Optional Parameters

--api-key --token -t

Api key or service account token, a randomly generated string used to interact with Grafana endpoint; if missing, CLI will use current logged-in user's credentials.

--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 notification-channel test

Test a notification channel.

az grafana notification-channel test --name
                                     --notification-channel
                                     [--api-key]
                                     [--resource-group]

Required Parameters

--name -n

Name of the Azure Managed Grafana.

--notification-channel

Id, uid which can identify a data source. CLI will search in the order of id, and uid, till finds a match.

Optional Parameters

--api-key --token -t

Api key or service account token, a randomly generated string used to interact with Grafana endpoint; if missing, CLI will use current logged-in user's credentials.

--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 notification-channel update

Update a notification channel.

az grafana notification-channel update --definition
                                       --name
                                       --notification-channel
                                       [--api-key]
                                       [--resource-group]

Required Parameters

--definition

Json string with notification channel definition, or a path to a file with such content.

--name -n

Name of the Azure Managed Grafana.

--notification-channel

Id, uid which can identify a data source. CLI will search in the order of id, and uid, till finds a match.

Optional Parameters

--api-key --token -t

Api key or service account token, a randomly generated string used to interact with Grafana endpoint; if missing, CLI will use current logged-in user's credentials.

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