ALIYUN::CMS::EventRuleTargets类型用于添加或者修改规则的发送目标。
语法
{
  "Type": "ALIYUN::CMS::EventRuleTargets",
  "Properties": {
    "FcParameters": List,
    "WebhookParameters": List,
    "MnsParameters": List,
    "ContactParameters": List,
    "RuleName": String,
    "SlsParameters": List
  }
}属性
| 属性名称 | 类型 | 必须 | 允许更新 | 描述 | 约束 | 
| RuleName | String | 是 | 否 | 报警规则名称。 | 无 | 
| ContactParameters | List | 否 | 是 | 发送报警相关参数。 | 更多信息,请参见ContactParameters属性。 | 
| FcParameters | List | 否 | 是 | 函数计算相关参数。 | 列表最大长度为5。 更多信息,请参见FcParameters属性。 | 
| MnsParameters | List | 否 | 是 | 轻量消息队列(原 MNS) SMQ(Simple Message Queue (formerly MNS))相关参数。 | 列表最大长度为5。 更多信息,请参见MnsParameters属性。 | 
| SlsParameters | List | 否 | 是 | 日志服务相关参数。 | 列表最大长度为5。 更多信息,请参见SlsParameters属性。 | 
| WebhookParameters | List | 否 | 是 | WebHook参数。 | 列表最大长度为5。 更多信息,请参见WebhookParameters属性。 | 
FcParameters语法
"FcParameters": [
  {
    "Region": String,
    "ServiceName": String,
    "Id": String,
    "FunctionName": String
  }
]FcParameters属性
| 属性名称 | 类型 | 必须 | 允许更新 | 描述 | 约束 | 
| FunctionName | String | 否 | 是 | 函数名称。 | 无 | 
| Id | String | 否 | 是 | 添加或修改规则的对象ID。 | 无 | 
| Region | String | 否 | 是 | 函数服务对应的地域。 | 无 | 
| ServiceName | String | 否 | 是 | 函数计算服务的服务名称。 | 无 | 
WebhookParameters语法
"WebhookParameters": [
  {
    "Url": String,
    "Protocol": String,
    "Id": String,
    "Method": String
  }
]WebhookParameters属性
| 属性名称 | 类型 | 必须 | 允许更新 | 描述 | 约束 | 
| Id | String | 否 | 是 | 添加或修改规则的对象ID。 | 无 | 
| Method | String | 否 | 是 | HTTP回调的请求方法。 | 取值: 
 | 
| Protocol | String | 否 | 是 | 协议名。 | 无 | 
| Url | String | 否 | 是 | 回调的URL。 | 无 | 
MnsParameters语法
"MnsParameters": [
  {
    "Queue": String,
    "Region": String,
    "Id": String
  }
]MnsParameters属性
| 属性名称 | 类型 | 必须 | 允许更新 | 描述 | 约束 | 
| Id | String | 否 | 是 | 添加或修改规则的对象ID。 | 无 | 
| Queue | String | 否 | 是 | 队列名称。 | 无 | 
| Region | String | 否 | 是 | 轻量消息队列(原 MNS) SMQ(Simple Message Queue (formerly MNS))的地域。 | 无 | 
ContactParameters语法
"ContactParameters": [
  {
    "ContactGroupName": String,
    "Id": String,
    "Level": String
  }
]ContactParameters属性
| 属性名称 | 类型 | 必须 | 允许更新 | 描述 | 约束 | 
| ContactGroupName | String | 否 | 是 | 报警联系人分组名称。 | 无 | 
| Id | String | 否 | 是 | 添加或修改规则的对象ID。 | 无 | 
| Level | String | 否 | 是 | 报警通知级别。 | 取值: 
 | 
SlsParameters语法
"SlsParameters": [
  {
    "Project": String,
    "LogStore": String,
    "Region": String,
    "Id": String
  }
]SlsParameters属性
| 属性名称 | 类型 | 必须 | 允许更新 | 描述 | 约束 | 
| Id | String | 否 | 是 | 添加或修改规则的对象ID。 | 无 | 
| LogStore | String | 否 | 是 | 日志服务对应的日志库。 | 无 | 
| Project | String | 否 | 是 | 日志服务对应的项目。 | 无 | 
| Region | String | 否 | 是 | 日志服务对应的地域。 | 无 | 
返回值
Fn::GetAtt
无
示例
YAML格式
ROSTemplateFormatVersion: '2015-09-01'
Description: Test CMS EventRuleTargets
Parameters:
  ContactGroupName:
    Type: String
    Description: 名称为2-64个字符,以大小写字母,数字或中文开头,可包含(._-)。
    Label: 报警联系人
    ConstraintDescription: '[2, 128] English or Chinese characters'
    MinLength: 2
    MaxLength: 128
    Default: mytest
Resources:
  EventRuleTargets:
    Type: ALIYUN::CMS::EventRuleTargets
    Properties:
      ContactParameters:
        - ContactGroupName:
            Ref: ContactGroupName
          Id: '1'
          Level: '3'
      RuleName:
        Fn::Join:
          - _
          - - EventRule
            - Ref: ALIYUN::StackId
Outputs: {}
JSON
{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Description": "Test CMS EventRuleTargets",
  "Parameters": {
    "ContactGroupName": {
      "Type": "String",
      "Description": "名称为2-64个字符,以大小写字母,数字或中文开头,可包含(._-)。",
      "Label": "报警联系人",
      "ConstraintDescription": "[2, 128] English or Chinese characters",
      "MinLength": 2,
      "MaxLength": 128,
      "Default": "mytest"
    }
  },
  "Resources": {
    "EventRuleTargets": {
      "Type": "ALIYUN::CMS::EventRuleTargets",
      "Properties": {
        "ContactParameters": [
          {
            "ContactGroupName": {
              "Ref": "ContactGroupName"
            },
            "Id": "1",
            "Level": "3"
          }
        ],
        "RuleName": {
          "Fn::Join": [
            "_",
            [
              "EventRule",
              {
                "Ref": "ALIYUN::StackId"
              }
            ]
          ]
        }
      }
    }
  },
  "Outputs": {
  }
}