All Products
Search
Document Center

Resource Orchestration Service:ALIYUN::ARMS::AlertContact

Last Updated:Aug 09, 2024

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

ContactName

String

Yes

Yes

The name of the alert contact.

None.

DingRobotWebhookUrl

String

No

Yes

The webhook URL of the 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 phone number of the alert contact.

You must specify at least one of the following properties: Email, PhoneNum, and DingRobotWebhookUrl.

RegionId

String

No

No

The region ID. By default, the region ID of the stack is used.

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.

Return values

Fn::GetAtt

ContactId: the ID of the alert contact.

Examples

Note

You must change the masked values of properties, such as the Email property, based on your business requirements.

YAML format

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

JSON format

{
  "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"
        ]
      }
    }
  }
}