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

语法

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

属性

属性名称类型必须允许更新描述约束
RemarkString备注。最大长度为128个字符。
InstanceNameString实例名称。长度为3~64个字符,可包含英文字母、汉字、数字、短划线(-)和下划线(_)。
TagsList标签。最多支持添加20个标签。

更多信息,请参见Tags属性

Tags语法

"Tags": [
  {
    "Key": String,
    "Value": String
  }
]  

Tags属性

属性名称类型必须允许更新描述约束
KeyString标签键。长度为1~128个字符,不能以aliyunacs:开头,不能包含http://或者https://
ValueString标签值。长度为0~128个字符,不能以aliyunacs:开头,不能包含http://或者https://

返回值

Fn::GetAtt

  • InstanceId:实例ID。
  • InstanceType:实例类型,1表示标准版。
  • HttpInternetEndpoint:HTTP公网接入点。
  • HttpInternetSecureEndpoint:HTTPS公网接入点。
  • TcpEndpoint:TCP协议接入点。
  • HttpInternalEndpoint:HTTP内网接入点。
  • InstanceName:实例名称。

示例

  • YAML格式

    ROSTemplateFormatVersion: '2015-09-01'
    Parameters: {}
    Resources:
      Instance:
        Type: ALIYUN::ROCKETMQ::Instance
        Properties:
          InstanceName: TestRocketMQ
    Outputs:
      InstanceName:
        Description: Instance name
        Value:
          Fn::GetAtt:
            - Instance
            - InstanceName
      HttpInternalEndpoint:
        Description: The internal HTTP endpoint for the Message Queue for Apache RocketMQ instance.
        Value:
          Fn::GetAtt:
            - Instance
            - HttpInternalEndpoint
      InstanceId:
        Description: Instance ID created
        Value:
          Fn::GetAtt:
            - Instance
            - InstanceId
      TcpEndpoint:
        Description: The TCP endpoint for the Message Queue for Apache RocketMQ instance.
        Value:
          Fn::GetAtt:
            - Instance
            - TcpEndpoint
      HttpInternetEndpoint:
        Description: The Internet HTTP endpoint for the Message Queue for Apache RocketMQ instance.
        Value:
          Fn::GetAtt:
            - Instance
            - HttpInternetEndpoint
      InstanceType:
        Description: Instance Type
        Value:
          Fn::GetAtt:
            - Instance
            - InstanceType
      HttpInternetSecureEndpoint:
        Description: The Internet HTTPS endpoint for the Message Queue for Apache RocketMQ instance.
        Value:
          Fn::GetAtt:
            - Instance
            - HttpInternetSecureEndpoint
  • JSON格式

    {
      "ROSTemplateFormatVersion": "2015-09-01",
      "Parameters": {
      },
      "Resources": {
        "Instance": {
          "Type": "ALIYUN::ROCKETMQ::Instance",
          "Properties": {
            "InstanceName": "TestRocketMQ"
          }
        }
      },
      "Outputs": {
        "InstanceName": {
          "Description": "Instance name",
          "Value": {
            "Fn::GetAtt": [
              "Instance",
              "InstanceName"
            ]
          }
        },
        "HttpInternalEndpoint": {
          "Description": "The internal HTTP endpoint for the Message Queue for Apache RocketMQ instance.",
          "Value": {
            "Fn::GetAtt": [
              "Instance",
              "HttpInternalEndpoint"
            ]
          }
        },
        "InstanceId": {
          "Description": "Instance ID created",
          "Value": {
            "Fn::GetAtt": [
              "Instance",
              "InstanceId"
            ]
          }
        },
        "TcpEndpoint": {
          "Description": "The TCP endpoint for the Message Queue for Apache RocketMQ instance.",
          "Value": {
            "Fn::GetAtt": [
              "Instance",
              "TcpEndpoint"
            ]
          }
        },
        "HttpInternetEndpoint": {
          "Description": "The Internet HTTP endpoint for the Message Queue for Apache RocketMQ instance.",
          "Value": {
            "Fn::GetAtt": [
              "Instance",
              "HttpInternetEndpoint"
            ]
          }
        },
        "InstanceType": {
          "Description": "Instance Type",
          "Value": {
            "Fn::GetAtt": [
              "Instance",
              "InstanceType"
            ]
          }
        },
        "HttpInternetSecureEndpoint": {
          "Description": "The Internet HTTPS endpoint for the Message Queue for Apache RocketMQ instance.",
          "Value": {
            "Fn::GetAtt": [
              "Instance",
              "HttpInternetSecureEndpoint"
            ]
          }
        }
      }
    }

更多示例,请参见创建标准版实例、创建客户端Group ID和创建Topic的组合示例:JSON示例YAML示例