云应用引擎 CAE-创建事件通知规则:请求示例

时间:2024-11-14 17:12:19

请求示例

创建事件通知规则。

POST https://{endpoint}/v1/{project_id}/cae/notice-rules

{
  "api_version" : "v1",
  "kind" : "NoticeRule",
  "spec" : {
    "name" : "test",
    "event_name" : "Started",
    "scope" : {
      "type" : "environments",
      "environments" : [ "f3c12180-b34a-42d8-bb5a-12ba0a6b579e" ]
    },
    "trigger_policy" : {
      "trigger_type" : "immediately"
    },
    "notification" : {
      "protocol" : "email",
      "endpoint" : "123@example.com",
      "template" : "ZH"
    },
    "enable" : true
  }
}
support.huaweicloud.com/api-cae/CreateNoticeRule.html