创建通知策略。
参数 | 类型 | 是否必选 | 示例值 | 描述 |
---|---|---|---|---|
Action | String | 是 | CreateNotification | 接口名称。当前 API 的名称为 CreateNotification 。 |
Version | String | 是 | 2018-01-01 | 接口版本。当前 API 的版本为 2018-01-01 。 |
Name | String | 否 | notification-demo | 通知策略名称。
|
Notifications | Array of Notify | 否 | - | 通知策略详情。 |
EffectStartAt | String | 否 | 00:00 | 通知策略生效的开始时间,格式为HH:MM ,例如:00:00。 |
EffectEndAt | String | 否 | 23:59 | 通知策略生效的截止时间,格式为 说明
|
参数 | 类型 | 是否必选 | 示例值 | 描述 |
---|---|---|---|---|
Level | String | 否 | notice | 告警通知等级,取值:
|
WebhookIds | Array of String | 否 | 18913208***4528 | Webhook 回调 ID。 |
AlertMethods | Array of String | 否 | 告警通知方式,取值:
| |
ContactGroupIds | Array of String | 否 | 145080093687100**** | 告警联系组 ID。 |
POST https://open.volcengineapi.com?Action=CreateNotification&Version=2018-01-01 Content-Type: application/json { "Name": "notification-demo", "Notifications": [ { "Level": "notice", "WebhookIds": [ "18913208***4528" ], "AlertMethods": [ "Email" ], "ContactGroupIds": [ "145080093687100****" ] } ], "EffectStartAt": "00:00", "EffectEndAt": "23:59" }
参数 | 类型 | 示例值 | 描述 |
---|---|---|---|
Data | Array of String | 189898***00 | 通知策略 ID。 |
{ "ResponseMetadata": { "Action": "CreateNotification", "Region": "cn-beijing", "Service": "Volc_Observe", "Version": "2018-01-01", "RequestId": "20230604110420****100232280022D31" }, "Result": { "Data": [ "189898***00" ] } }
本接口无特有的错误码。更多信息请参见 错误码。