ALIYUN::ARMS::AlertContact类型用于创建报警联系人。

语法

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

属性

属性名称类型必须允许更新描述约束
DingRobotWebhookUrlString钉钉机器人Webhook URL。 钉钉机器人安全设置中的自定义关键词请填写“报警”。
EmailString报警联系人邮箱
PhoneNumString报警联系人手机号码邮箱地址、手机号码和钉钉机器人Webhook URL这三种联系方式必须至少填写一种。
RegionIdString地域ID。默认为资源栈的地域ID。取值:
  • cn-qingdao
  • cn-beijing
  • cn-shanghai
  • cn-hangzhou
  • cn-shenzhen
  • cn-hongkong
  • ap-southeast-1
SystemNocBoolean是否接收系统通知
ContactNameString报警联系人姓名

返回值

Fn::GetAtt

ContactId:报警联系人ID。

示例

  • YAML格式

    ROSTemplateFormatVersion: '2015-09-01'
    Resources:
      AlertContact:
        Type: ALIYUN::ARMS::AlertContact
        Properties:
          ContactName: DemoContact
          Email: DemoContact@163.com
          RegionId:
            Ref: ALIYUN::Region
    Outputs:
      ContactId:
        Description: The ID of the alert contact that you created.
        Value:
          Fn::GetAtt:
            - AlertContact
            - ContactId
  • JSON格式

    {
      "ROSTemplateFormatVersion": "2015-09-01",
      "Resources": {
        "AlertContact": {
          "Type": "ALIYUN::ARMS::AlertContact",
          "Properties": {
            "ContactName": "DemoContact",
            "Email": "DemoContact@163.com",
            "RegionId": {
              "Ref": "ALIYUN::Region"
            }
          }
        }
      },
      "Outputs": {
        "ContactId": {
          "Description": "The ID of the alert contact that you created.",
          "Value": {
            "Fn::GetAtt": [
              "AlertContact",
              "ContactId"
            ]
          }
        }
      }
    }