ALIYUN::CMS::Contact is used to create an alert contact.

Syntax

{
  "Type": "ALIYUN::CMS::Contact",
  "Properties": {
    "Describe": String,
    "ContactName": String,
    "Channels": Map
  }
}

Properties

PropertyTypeRequiredEditableDescriptionConstraint
DescribeStringYesYesThe description of the alert contact.None.
ContactNameStringYesNoThe name of the alert contact.The name must be 2 to 40 characters in length, and can contain letters, digits, periods (.), and underscores (_). The name must start with a letter.
ChannelsMapYesYesThe contact methods of the alert contact.You must add at least one of the following contact methods of alert contact: the phone number, email address, webhook URL of the DingTalk chatbot, and TradeManager ID.

Channels syntax

"Channels": {
  "Mail": String,
  "AliIM": String,
  "DingWebHook": String,
  "SMS": String
}

Channels properties

PropertyTypeRequiredEditableDescriptionConstraint
MailStringNoYesThe email address.After you add or modify an email address, the recipient receives an email that contains an activation link. The system adds the recipient to the list of alert contacts only after the recipient activates the email address.
AliIMStringNoYesThe ID of TradeManager.None.
DingWebHookStringNoYesThe webhook URL of the DingTalk chatbot.None.
SMSStringNoYesThe mobile number, text message, or landline number. After you add or modify a phone number, the recipient receives a text message that contains an activation link. The system adds the recipient to the list of alert contacts only after the recipient activates the phone number.

Return values

Fn::GetAtt

ContactName: the name of the alert contact.

Examples

  • YAML format

    ROSTemplateFormatVersion: '2015-09-01'
    Parameters: {}
    Resources:
      Contact:
        Type: ALIYUN::CMS::Contact
        Properties:
          Describe: Test Contact
          ContactName: DemoContact
          Channels:
            Mail: test@163.com
            DingWebHook: https://webhook.com
            SMS: 1631792XXXXXXX
    Outputs:
      ContactName:
        Description: The name of the alarm contact.
        Value:
          Fn::GetAtt:
            - Contact
            - ContactName
  • JSON format

    {
      "ROSTemplateFormatVersion": "2015-09-01",
      "Parameters": {
      },
      "Resources": {
        "Contact": {
          "Type": "ALIYUN::CMS::Contact",
          "Properties": {
            "Describe": "Test Contact",
            "ContactName": "DemoContact",
            "Channels": {
              "Mail": "test@163.com",
              "DingWebHook": "https://webhook.com",
              "SMS": "1631792XXXXXXX"
            }
          }
        }
      },
      "Outputs": {
        "ContactName": {
          "Description": "The name of the alarm contact.",
          "Value": {
            "Fn::GetAtt": [
              "Contact",
              "ContactName"
            ]
          }
        }
      }
    }