ALIYUN::CMS::Contact类型用于创建报警联系人。

语法

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

属性

属性名称 类型 必须 允许更新 描述 约束
Describe String 描述详情
ContactName String 报警联系人姓名 长度为2~40个字符,以中英文字符开头,可包含中文字符、英文字符、数字、英文句点(.)和下划线(_)。
Channels Map 联系方式 至少添加手机号码、邮箱、钉钉机器人、旺旺中的一种联系方式。

Channels语法

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

Channels属性

属性名称 类型 必须 允许更新 描述 约束
Mail String Email地址 添加或者修改的Email会收到一个激活链接,激活之后对应Email才会被加到联系人中。
AliIM String 旺旺联系方式
DingWebHook String 钉钉机器人Webhook
SMS String 手机号码、短信或者电话联系方式 添加或者修改的手机号码会收到一个激活链接, 激活之后才会被加到联系人中。

返回值

Fn::GetAtt

ContactName:报警联系人姓名。

示例

JSON格式

{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "Describe": {
      "Type": "String",
      "Description": "The description of the alert contact."
    },
    "ContactName": {
      "Type": "String",
      "Description": "The name of the alarm contact."
    },
    "Channels": {
      "Type": "Json"
    }
  },
  "Resources": {
    "Contact": {
      "Type": "ALIYUN::CMS::Contact",
      "Properties": {
        "Describe": {
          "Ref": "Describe"
        },
        "ContactName": {
          "Ref": "ContactName"
        },
        "Channels": {
          "Ref": "Channels"
        }
      }
    }
  },
  "Outputs": {
    "ContactName": {
      "Description": "The name of the alarm contact.",
      "Value": {
        "Fn::GetAtt": [
          "Contact",
          "ContactName"
        ]
      }
    }
  }
}

YAML格式

ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  Describe:
    Type: String
    Description: The description of the alert contact.
  ContactName:
    Type: String
    Description: The name of the alarm contact.
  Channels:
    Type: Json
Resources:
  Contact:
    Type: 'ALIYUN::CMS::Contact'
    Properties:
      Describe:
        Ref: Describe
      ContactName:
        Ref: ContactName
      Channels:
        Ref: Channels
Outputs:
  ContactName:
    Description: The name of the alarm contact.
    Value:
      'Fn::GetAtt':
        - Contact
        - ContactName