az monitor action-group test-notifications

管理操作组测试通知。

命令

名称 说明 类型 Status
az monitor action-group test-notifications create

创建操作组测试通知。

核心 乔治亚州

az monitor action-group test-notifications create

创建操作组测试通知。

az monitor action-group test-notifications create --action-group --action-group-name
                                                  --alert-type
                                                  --resource-group
                                                  [--add-action --add-actions]
                                                  [--incident-receivers]
                                                  [--no-wait {0, 1, f, false, n, no, t, true, y, yes}]

示例

使用作组创建作组测试通知

az monitor action-group test-notifications create --action-group MyActionGroup --resource-group MyResourceGroup -a email alice alice@example.com usecommonalertsChema --alert-type budget

必需参数

--action-group --action-group-name

作组的名称。

--alert-type

支持的警报类型的值。 支持的警报类型值为:servicehealth、metricstaticthreshold、metricsdynamicthreshold、logalertv2、smartalert、webtestalert、logalertv1numresult、logalertv1metricmeasurement、resourcehealth、activitylog、budget。

--resource-group -g

资源组的名称。 可以使用 az configure --defaults group=<name>配置默认组。

可选参数

--add-action --add-actions -a

将接收方添加到作组。

    Usage:   --add-action TYPE NAME [ARG ...]


    Email:


        Format:     --add-action email NAME EMAIL_ADDRESS [usecommonalertschema]


        Example:    --add-action email bob bob@contoso.com


    SMS:


        Format:     --add-action sms NAME COUNTRY_CODE PHONE_NUMBER


        Example:    --add-action sms charli 1 5551234567


    Webhook:


        Format:     --add-action webhook NAME URI [useaadauth OBJECT_ID IDENTIFIER URI] [usecommonalertschema]


        Example:    --add-action https://www.contoso.com/alert useaadauth testobj http://identifier usecommonalertschema


    Arm Role:


        Format:     --add-action armrole NAME ROLE_ID [usecommonalertschema]


        Example:    --add-action armole owner_role 8e3af657-a8ff-443c-a75c-2fe8c4bcb635


    Azure App Push:


        Format:     --add-action azureapppush NAME EMAIL_ADDRESS


        Example:    --add-action azureapppush test_apppush bob@contoso.com


    ITSM:


        Format:     --add-action itsm NAME WORKSPACE_ID CONNECTION_ID TICKET_CONFIGURATION REGION


        Example:    --add-action itsm test_itsm test_workspace test_conn ticket_blob useast


    Automation runbook:


        Format:     --add-action automationrunbook NAME AUTOMATION_ACCOUNT_ID RUNBOOK_NAME WEBHOOK_RESOURCE_ID SERVICE_URI [isglobalrunbook] [usecommonalertschema]


        Example:    --add-action automationrunbook test_runbook test_acc test_book test_webhook test_rsrc http://example.com isglobalrunbook usecommonalertschema


    Voice:


        Format:     --add-action voice NAME COUNTRY_CODE PHONE_NUMBER


        Example:    --add-action voice charli 1 4441234567


    Logic App:


        Format:     --add-action logicapp NAME RESOURCE_ID CALLBACK_URL [usecommonalertschema]


        Example:    --add-action logicapp test_logicapp test_rsrc http://callback


    Azure Function:


        Format:     --add-action azurefunction NAME FUNCTION_APP_RESOURCE_ID FUNCTION_NAME HTTP_TRIGGER_URL [usecommonalertschema]


        Example:    --add-action azurefunction test_function test_rsrc test_func http://trigger usecommonalertschema


    Event Hub:


        Format:     --action eventhub NAME SUBSCRIPTION_ID EVENT_HUB_NAME_SPACE EVENT_HUB_NAME [usecommonalertschema]


        Example:    --action eventhub test_eventhub 5def922a-3ed4-49c1-b9fd-05ec533819a3 eventhubNameSpace testEventHubName usecommonalertschema


    Multiple actions can be specified by using more than one `--add-action` argument.


    'useaadauth', 'isglobalrunbook' and 'usecommonalertschema' are optional arguements that only need to be passed to set the respective parameter to True.


    If the 'useaadauth' argument is passed, then the OBJECT_ID and IDENTIFIER_URI values are required as well.  Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.
--incident-receivers

属于此操作组的事件接收器的列表。 支持速记语法、json-file 和 yaml-file。 请尝试“??” 以显示更多内容。

--no-wait

不等待长时间运行的操作完成。

接受的值: 0, 1, f, false, n, no, t, true, y, yes
全局参数
--debug

提高日志记录详细程度以显示所有调试日志。

--help -h

显示此帮助消息并退出。

--only-show-errors

仅显示错误,禁止显示警告。

--output -o

输出格式。

接受的值: json, jsonc, none, table, tsv, yaml, yamlc
默认值: json
--query

JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/

--subscription

订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。

--verbose

增加日志记录详细程度。 使用 --debug 获取完整的调试日志。