ALIYUN::ARMS::AlertContact is used to create an alert contact.

Syntax

{
  "Type": "ALIYUN::ARMS::AlertContact",
  "Properties": {
    "DingRobotWebhookUrl": String,
    "PhoneNum": String,
    "RegionId": String,
    "SystemNoc": Boolean,
    "ContactName": String,
    "Email": String
  }
}

Properties

Property Type Required Editable Description Constraint
DingRobotWebhookUrl String No Yes The webhook URL of DingTalk chatbot. Enter alert in the custom keyword field of DingTalk chatbot security settings.
Email String No Yes The email address of the alert contact. None.
PhoneNum String No Yes The mobile phone number of the alert contact. You must specify at least one of the DingRobotWebhookUrl, Email, and PhoneNum parameters.
RegionId String No No The region ID of the alert contact. The default value of this parameter is the region ID of the stack. Valid values:
  • cn-qingdao
  • cn-beijing
  • cn-shanghai
  • cn-hangzhou
  • cn-shenzhen
  • cn-hongkong
  • ap-southeast-1
SystemNoc Boolean No Yes Specifies whether to receive system notifications. None.
ContactName String Yes Yes The name of the alert contact. None.

Response parameters

Fn::GetAtt

ContactId: the ID of the alert contact.

Examples

JSON format

{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Resources": {
    "AlertContact": {
      "Type": "ALIYUN::ARMS::AlertContact",
      "Properties": {
        "PhoneNum": {
          "Ref": "PhoneNum"
        },
        "RegionId": {
          "Ref": "RegionId"
        },
        "SystemNoc": {
          "Ref": "SystemNoc"
        },
        "DingRobotWebhookUrl": {
          "Ref": "DingRobotWebhookUrl"
        },
        "ContactName": {
          "Ref": "ContactName"
        },
        "Email": {
          "Ref": "Email"
        }
      }
    }
  },
  "Parameters": {
    "PhoneNum": {
      "Type": "String",
      "Description": "The phone number of the contact."
    },
    "RegionId": {
      "Type": "String",
      "Description": "Region ID. Default to region of stack.",
      "AllowedValues": [
        "cn-qingdao",
        "cn-beijing",
        "cn-shanghai",
        "cn-hangzhou",
        "cn-shenzhen",
        "cn-hongkong",
        "ap-southeast-1"
      ]
    },
    "SystemNoc": {
      "Type": "Boolean",
      "Description": "Specifies whether to receive system alerts.",
      "AllowedValues": [
        "True",
        "true",
        "False",
        "false"
      ]
    },
    "DingRobotWebhookUrl": {
      "Type": "String",
      "Description": "The DingTalk Chatbot address of the contact."
    },
    "ContactName": {
      "Type": "String",
      "Description": "The name of the alert contact that you want to create."
    },
    "Email": {
      "Type": "String",
      "Description": "The email address of the contact."
    }
  },
  "Outputs": {
    "ContactId": {
      "Description": "The ID of the alert contact that you created.",
      "Value": {
        "Fn::GetAtt": [
          "AlertContact",
          "ContactId"
        ]
      }
    }
  }
}

YAML format

ROSTemplateFormatVersion: '2015-09-01'
Resources:
  AlertContact:
    Type: 'ALIYUN::ARMS::AlertContact'
    Properties:
      PhoneNum:
        Ref: PhoneNum
      RegionId:
        Ref: RegionId
      SystemNoc:
        Ref: SystemNoc
      DingRobotWebhookUrl:
        Ref: DingRobotWebhookUrl
      ContactName:
        Ref: ContactName
      Email:
        Ref: Email
Parameters:
  PhoneNum:
    Type: String
    Description: The phone number of the contact.
  RegionId:
    Type: String
    Description: Region ID. Default to region of stack.
    AllowedValues:
      - cn-qingdao
      - cn-beijing
      - cn-shanghai
      - cn-hangzhou
      - cn-shenzhen
      - cn-hongkong
      - ap-southeast-1
  SystemNoc:
    Type: Boolean
    Description: Specifies whether to receive system alerts.
    AllowedValues:
      - 'True'
      - 'true'
      - 'False'
      - 'false'
  DingRobotWebhookUrl:
    Type: String
    Description: The DingTalk Chatbot address of the contact.
  ContactName:
    Type: String
    Description: The name of the alert contact that you want to create.
  Email:
    Type: String
    Description: The email address of the contact.
Outputs:
  ContactId:
    Description: The ID of the alert contact that you created.
    Value:
      'Fn::GetAtt':
        - AlertContact
        - ContactId