az monitor action-group test-notifications

管理動作群組 test-notifications。

命令

名稱 Description 類型 狀態
az monitor action-group test-notifications create

建立動作群組 test-notifications。

核心 GA

az monitor action-group test-notifications create

建立動作群組 test-notifications。

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

範例

使用動作群組建立動作群組 test-notifications

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

將接收者新增至動作群組。 使用方式:--add-action TYPE NAME [ARG ...]電子郵件:格式: --add-action 電子郵件名稱 EMAIL_ADDRESS [usecommonalertschema] 範例: --add-action 電子郵件 bob bob@contoso.com SMS: 格式: --add-action sms NAME COUNTRY_CODE PHONE_NUMBER範例: --add-action sms charli 1 5551234567 Webhook:格式: --add-action Webhook NAME URI [useaadauth OBJECT_ID IDENTIFIER URI] [usecommonalertschema] 範例: --add-action https://www.contoso.com/alert useaadauth testobj http://identifier usecommonalertschema Arm Role: Format: --add-action armrole NAME ROLE_ID [usecommonalertschema] 範例: --add-action armole owner_role 8e3af657-a8ff-443c-a75c-2fe8c4bcb635 Azure 應用程式推送:格式:--add-action azureapppush NAME EMAIL_ADDRESS範例:--add-action azureapppush test_apppush bob@contoso.com ITSM:Format: --add-action itsm NAME WORKSPACE_ID CONNECTION_ID TICKET_CONFIGURATION REGION 範例:--add-action itsm test_itsm test_workspace test_conn ticket_blob useast Automation Runbook: 格式:--add-action automationrunbook NAME AUTOMATION_ACCOUNT_ID RUNBOOK_NAME WEBHOOK_RESOURCE_ID SERVICE_URI [isglobalrunbook] [usecommonalertschema] 範例:--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] 範例: --add-action logicapp test_logicapp test_rsrc Azure 函式: 格式: --add-action azurefunction NAME FUNCTION_APP_RESOURCE_ID FUNCTION_NAME HTTP_TRIGGER_URL http://callback [usecommonalertschema] 範例: --add-action azurefunction http://trigger test_function test_rsrc test_func usecommonalertschema 事件中樞: 格式: --action eventhub NAME SUBSCRIPTION_ID EVENT_HUB_NAME_SPACE EVENT_HUB_NAME [usecommonalertschema] 範例: --action eventhub test_eventhub5def922a-3ed4-49c1-b9fd-05ec5333819a3 eventhubName testEventHubName usecommonalertschema Multiple 動作可以使用多個 --add-action 引數來指定。 'useaadauth'、'isglobalrunbook' 和 'usecommonalertschema' 是選擇性引數,只需要傳遞才能將個別參數設定為 True。 如果傳遞 'useaadauth' 引數,則也需要OBJECT_ID和IDENTIFIER_URI值。 支援速記語法、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

訂用帳戶的名稱或識別碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID 帳戶。

--verbose

增加記錄詳細資訊。 使用 --debug 來取得完整偵錯記錄。