ALIYUN::ROCKETMQ::Instance类型用于创建标准版实例。

语法

{
  "Type": "ALIYUN::ROCKETMQ::Instance",
  "Properties": {
    "Remark": String,
    "InstanceName": String
  }
}

属性

属性名称 类型 必须 允许更新 描述 约束
Remark String 备注 最大长度为128个字符。
InstanceName String 实例名称 长度为3~64个字符,可以包含中文、英文、数字、短横线(-)以及下划线(_)。

返回值

Fn::GetAtt

  • InstanceId:实例ID。
  • InstanceType:实例类型,1表示标准版。

示例

JSON格式

{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Resources": {
    "Instance": {
      "Type": "ALIYUN::ROCKETMQ::Instance",
      "Properties": {
        "Remark": {
          "Ref": "Remark"
        },
        "InstanceName": {
          "Ref": "InstanceName"
        }
      }
    }
  },
  "Parameters": {
    "Remark": {
      "Type": "String",
      "Description": "The remark of instance."
    },
    "InstanceName": {
      "MinLength": 3,
      "Type": "String",
      "Description": "The name of the instance, which contains 3 to 64 characters in Chinese or English.",
      "MaxLength": 64
    }
  },
  "Outputs": {
    "InstanceId": {
      "Description": "Instance ID created",
      "Value": {
        "Fn::GetAtt": [
          "Instance",
          "InstanceId"
        ]
      }
    },
    "InstanceType": {
      "Description": "Instance Type",
      "Value": {
        "Fn::GetAtt": [
          "Instance",
          "InstanceType"
        ]
      }
    }
  }
}

YAML格式

ROSTemplateFormatVersion: '2015-09-01'
Resources:
  Instance:
    Type: 'ALIYUN::ROCKETMQ::Instance'
    Properties:
      Remark:
        Ref: Remark
      InstanceName:
        Ref: InstanceName
Parameters:
  Remark:
    Type: String
    Description: The remark of instance.
  InstanceName:
    MinLength: 3
    Type: String
    Description: >-
      The name of the instance, which contains 3 to 64 characters in Chinese or
      English.
    MaxLength: 64
Outputs:
  InstanceId:
    Description: Instance ID created
    Value:
      'Fn::GetAtt':
        - Instance
        - InstanceId
  InstanceType:
    Description: Instance Type
    Value:
      'Fn::GetAtt':
        - Instance
        - InstanceType