ALIYUN::ARMS::AlertContact类型用于创建报警联系人。
语法
{
  "Type": "ALIYUN::ARMS::AlertContact",
  "Properties": {
    "DingRobotWebhookUrl": String,
    "PhoneNum": String,
    "RegionId": String,
    "SystemNoc": Boolean,
    "ContactName": String,
    "Email": String
  }
}属性
| 属性名称 | 类型 | 必须 | 允许更新 | 描述 | 约束 | 
| ContactName | String | 是 | 是 | 报警联系人姓名 | 无 | 
| DingRobotWebhookUrl | String | 否 | 是 | 钉钉机器人Webhook URL。 | 钉钉机器人安全设置中的自定义关键词请填写“报警”。 | 
| String | 否 | 是 | 报警联系人邮箱 | 无 | |
| PhoneNum | String | 否 | 是 | 报警联系人手机号码 | 邮箱地址、手机号码和钉钉机器人Webhook URL这三种联系方式必须至少填写一种。 | 
| RegionId | String | 否 | 否 | 地域ID。默认为资源栈的地域ID。 | 取值: 
 | 
| SystemNoc | Boolean | 否 | 是 | 是否接收系统通知 | 无 | 
返回值
Fn::GetAtt
ContactId:报警联系人ID。
示例
说明 
请您根据实际情况更改脱敏参数的取值,例如Email。
YAML格式
ROSTemplateFormatVersion: '2015-09-01'
Resources:
  AlertContact:
    Type: ALIYUN::ARMS::AlertContact
    Properties:
      ContactName: DemoContact
      Email: Demo****@163.com
      RegionId:
        Ref: ALIYUN::Region
Outputs:
  ContactId:
    Description: The ID of the alert contact that you created.
    Value:
      Fn::GetAtt:
        - AlertContact
        - ContactIdJSON格式
{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Resources": {
    "AlertContact": {
      "Type": "ALIYUN::ARMS::AlertContact",
      "Properties": {
        "ContactName": "DemoContact",
        "Email": "Demo****@163.com",
        "RegionId": {
          "Ref": "ALIYUN::Region"
        }
      }
    }
  },
  "Outputs": {
    "ContactId": {
      "Description": "The ID of the alert contact that you created.",
      "Value": {
        "Fn::GetAtt": [
          "AlertContact",
          "ContactId"
        ]
      }
    }
  }
}该文章对您有帮助吗?