ALIYUN::CMS::EventRuleTargets is used to add or modify the target to which an event rule is sent.

Syntax

{
  "Type": "ALIYUN::CMS::EventRuleTargets",
  "Properties": {
    "FcParameters": List,
    "WebhookParameters": List,
    "MnsParameters": List,
    "ContactParameters": List,
    "RuleName": String,
    "SlsParameters": List
  }
}

Properties

Name Type Required Editable Description Validity
FcParameters List No Yes The list of Function Compute parameters. The list can contain a maximum of five parameters.
WebhookParameters List No Yes The list of Webhook parameters. The list can contain a maximum of five parameters.
MnsParameters List No Yes The list of Message Service (MNS) parameters. The list can contain a maximum of five parameters.
ContactParameters List No Yes The list of contact parameters. None
RuleName String Yes No The name of the alert rule. None
SlsParameters List No Yes The list of Log Service parameters. The list can contain a maximum of five parameters.

FcParameters syntax

"FcParameters": [
  {
    "Region": String,
    "ServiceName": String,
    "Id": String,
    "FunctionName": String
  }
]

FcParameters properties

Name Type Required Editable Description Validity
Region String No Yes The region where Function Compute is deployed. None
ServiceName String No Yes The name of the Function Compute service. None
Id String No Yes The ID of the object for which to add or modify the rule. None
FunctionName String No Yes The name of the function. None

WebhookParameters syntax

"WebhookParameters": [
  {
    "Url": String,
    "Protocol": String,
    "Id": String,
    "Method": String
  }
]

WebhookParameters properties

Name Type Required Editable Description Validity
Url String No Yes The callback URL. None
Protocol String No Yes The name of the protocol. None
Id String No Yes The ID of the object for which to add or modify the rule. None
Method String No Yes The request method of the HTTP callback. Valid values: GET and POST

MnsParameters syntax

"MnsParameters": [
  {
    "Queue": String,
    "Region": String,
    "Id": String
  }
]

MnsParameters properties

Name Type Required Editable Description Validity
Queue String No Yes The name of the MNS queue. None
Region String No Yes The region where MNS is deployed. None
Id String No Yes The ID of the object for which to add or modify the rule. None

ContactParameters syntax

"ContactParameters": [
  {
    "ContactGroupName": String,
    "Id": String,
    "Level": String
  }
]

ContactParameters properties

Name Type Required Editable Description Validity
ContactGroupName String No Yes The name of the alert contact group. None
Id String No Yes The ID of the object for which to add or modify the rule. None
Level String No Yes The level of the alert notification.

Valid values: 2, 3, and 4. Notifications are sent by DingTalk or email.

SlsParameters syntax

"SlsParameters": [
  {
    "Project": String,
    "LogStore": String,
    "Region": String,
    "Id": String
  }
]

SlsParameters properties

Name Type Required Editable Description Validity
Project String No Yes The name of the Log Service project. None
LogStore String No Yes The name of the Log Service Logstore. None
Region String No Yes The region where Log Service is deployed. None
Id String No Yes The ID of the object for which to add or modify the rule. None

Examples

JSON format

{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Resources": {
    "EventRuleTargets": {
      "Type": "ALIYUN::CMS::EventRuleTargets",
      "Properties": {
        "SlsParameters": {
          "Ref": "SlsParameters"
        },
        "WebhookParameters": {
          "Ref": "WebhookParameters"
        },
        "MnsParameters": {
          "Ref": "MnsParameters"
        },
        "ContactParameters": {
          "Ref": "ContactParameters"
        },
        "RuleName": {
          "Ref": "RuleName"
        },
        "FcParameters": {
          "Ref": "FcParameters"
        }
      }
    }
  },
  "Parameters": {
    "SlsParameters": {
      "Type": "Json",
      "Description": "Parameters of SLS."
    },
    "WebhookParameters": {
      "Type": "Json",
      "Description": "Parameters of WebHook."
    },
    "MnsParameters": {
      "Type": "Json",
      "Description": "Parameters of MNS."
    },
    "ContactParameters": {
      "Type": "Json",
      "Description": "Parameters of Contact."
    },
    "RuleName": {
      "Type": "String",
      "Description": "The name of the alert rule."
    },
    "FcParameters": {
      "Type": "Json",
      "Description": "Parameters of FC."
    }
  }
}

YAML format

ROSTemplateFormatVersion: '2015-09-01'
Resources:
  EventRuleTargets:
    Type: ALIYUN::CMS::EventRuleTargets
    Properties:
      SlsParameters:
        Ref: SlsParameters
      WebhookParameters:
        Ref: WebhookParameters
      MnsParameters:
        Ref: MnsParameters
      ContactParameters:
        Ref: ContactParameters
      RuleName:
        Ref: RuleName
      FcParameters:
        Ref: FcParameters
Parameters:
  SlsParameters:
    Type: Json
    Description: Parameters of SLS.
  WebhookParameters:
    Type: Json
    Description: Parameters of WebHook.
  MnsParameters:
    Type: Json
    Description: Parameters of MNS.
  ContactParameters:
    Type: Json
    Description: Parameters of Contact.
  RuleName:
    Type: String
    Description: The name of the alert rule.
  FcParameters:
    Type: Json
    Description: Parameters of FC.