ALIYUN::ResourceManager::MessageContact

更新时间:
复制为 MD 格式

ALIYUN::ResourceManager::MessageContact类型用于添加消息通知联系人。

语法

{
  "Type": "ALIYUN::ResourceManager::MessageContact",
  "Properties": {
    "EmailAddress": String,
    "MessageTypes": List,
    "MessageContactName": String,
    "Title": String,
    "PhoneNumber": String
  }
}

属性

属性名称

类型

必须

允许更新

描述

约束

EmailAddress

String

联系人的邮箱地址。

MessageContactName

String

联系人的名称。

名称必须在资源目录中唯一。名称长度必须为212个字符,且只能包含字母。

MessageTypes

List

联系人接收的消息类型。

Title

String

联系人的职位。

取值:*

  • TechnicalDirector

  • MaintenanceDirector

  • ProjectDirector

  • ProjectDirector

  • CEO

  • Other

PhoneNumber

String

联系人的手机号码。

返回值

Fn::GetAtt

  • CreateTime:消息联系人的创建时间。

  • MessageContactId:消息联系人的ID。

  • MessageTypes:联系人接收的消息类型。

  • Title:联系人的职位。

  • PhoneNumber:联系人的手机号码。

  • MessageContactName:联系人的名称。

  • EmailAddress:联系人的邮箱地址。

示例

ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  MessageTypes:
    Description:
      en: The types of messages received by the contact.
    Required: true
    Type: Json
    AssociationProperty: List[Parameter]
    AssociationPropertyMetadata:
      Parameter:
        Type: String
        Description:
          en: |-
            The type of the message received by the contact. Valid values:
            * ServiceMessage.
            * FaultMessage.
            * AccountExpenses.
            * SecurityMessage.
            * ActivityMessage.
            * ProductMessage.
        AllowedValues:
          - ServiceMessage
          - FaultMessage
          - AccountExpenses
          - SecurityMessage
          - ActivityMessage
          - ProductMessage
        Default: Null
        Required: false
  MessageContactName:
    Type: String
    Description:
      en: The name of the contact. The name must be unique in your resource directory. The name must be 2 to 12 characters in length and can contain only letters.
    MinLength: 2
    MaxLength: 12
    Required: true
  EmailAddress:
    Type: String
    Description:
      en: The email address of the contact.
    Required: true
  PhoneNumber:
    Type: String
    Description:
      en: The mobile phone number of the contact.
    Default: Null
    Required: false
  Title:
    Type: String
    Description:
      en: |-
        The job title of the contact. Valid values:
        * FinanceDirector.
        * TechnicalDirector.
        * MaintenanceDirector.
        * CEO.
        * ProjectDirector.
        * Other.
    AllowedValues:
      - TechnicalDirector
      - MaintenanceDirector
      - ProjectDirector
      - ProjectDirector
      - CEO
      - Other
    Required: true
Resources:
  ExtensionResource:
    Type: ALIYUN::ResourceManager::MessageContact
    Properties:
      MessageTypes:
        Ref: MessageTypes
      MessageContactName:
        Ref: MessageContactName
      EmailAddress:
        Ref: EmailAddress
      PhoneNumber:
        Ref: PhoneNumber
      Title:
        Ref: Title
Outputs:
  Title:
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - Title
    Description: The job title of the contact.
  MessageContactName:
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - MessageContactName
    Description: The name of the contact.
  MessageContactId:
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - MessageContactId
    Description: The ID of Message Contact.
  MessageTypes:
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - MessageTypes
    Description: The types of messages received by the contact.
  EmailAddress:
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - EmailAddress
    Description: The email address of the contact.
  PhoneNumber:
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - PhoneNumber
    Description: The mobile phone number of the contact.
  CreateTime:
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - CreateTime
    Description: Creation time of Message Contact.
{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "MessageTypes": {
      "Description": {
        "en": "The types of messages received by the contact."
      },
      "Required": true,
      "Type": "Json",
      "AssociationProperty": "List[Parameter]",
      "AssociationPropertyMetadata": {
        "Parameter": {
          "Type": "String",
          "Description": {
            "en": "The type of the message received by the contact. Valid values:\n* ServiceMessage.\n* FaultMessage.\n* AccountExpenses.\n* SecurityMessage.\n* ActivityMessage.\n* ProductMessage."
          },
          "AllowedValues": [
            "ServiceMessage",
            "FaultMessage",
            "AccountExpenses",
            "SecurityMessage",
            "ActivityMessage",
            "ProductMessage"
          ],
          "Default": null,
          "Required": false
        }
      }
    },
    "MessageContactName": {
      "Type": "String",
      "Description": {
        "en": "The name of the contact. The name must be unique in your resource directory. The name must be 2 to 12 characters in length and can contain only letters."
      },
      "MinLength": 2,
      "MaxLength": 12,
      "Required": true
    },
    "EmailAddress": {
      "Type": "String",
      "Description": {
        "en": "The email address of the contact."
      },
      "Required": true
    },
    "PhoneNumber": {
      "Type": "String",
      "Description": {
        "en": "The mobile phone number of the contact."
      },
      "Default": null,
      "Required": false
    },
    "Title": {
      "Type": "String",
      "Description": {
        "en": "The job title of the contact. Valid values:\n* FinanceDirector.\n* TechnicalDirector.\n* MaintenanceDirector.\n* CEO.\n* ProjectDirector.\n* Other."
      },
      "AllowedValues": [
        "TechnicalDirector",
        "MaintenanceDirector",
        "ProjectDirector",
        "ProjectDirector",
        "CEO",
        "Other"
      ],
      "Required": true
    }
  },
  "Resources": {
    "ExtensionResource": {
      "Type": "ALIYUN::ResourceManager::MessageContact",
      "Properties": {
        "MessageTypes": {
          "Ref": "MessageTypes"
        },
        "MessageContactName": {
          "Ref": "MessageContactName"
        },
        "EmailAddress": {
          "Ref": "EmailAddress"
        },
        "PhoneNumber": {
          "Ref": "PhoneNumber"
        },
        "Title": {
          "Ref": "Title"
        }
      }
    }
  },
  "Outputs": {
    "Title": {
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "Title"
        ]
      },
      "Description": "The job title of the contact."
    },
    "MessageContactName": {
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "MessageContactName"
        ]
      },
      "Description": "The name of the contact."
    },
    "MessageContactId": {
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "MessageContactId"
        ]
      },
      "Description": "The ID of Message Contact."
    },
    "MessageTypes": {
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "MessageTypes"
        ]
      },
      "Description": "The types of messages received by the contact."
    },
    "EmailAddress": {
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "EmailAddress"
        ]
      },
      "Description": "The email address of the contact."
    },
    "PhoneNumber": {
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "PhoneNumber"
        ]
      },
      "Description": "The mobile phone number of the contact."
    },
    "CreateTime": {
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "CreateTime"
        ]
      },
      "Description": "Creation time of Message Contact."
    }
  }
}