ALIYUN::AMQP::VirtualHost

ALIYUN::AMQP::VirtualHost类型用于创建Vhost。

语法

{
  "Type": "ALIYUN::AMQP::VirtualHost",
  "Properties": {
    "InstanceId": String,
    "VirtualHost": String
  }
}

属性

属性名称

类型

必须

允许更新

描述

约束

InstanceId

String

实例ID。

VirtualHost

String

Vhost名称。

说明:

  • Vhost名称只能包含字母、数字、短划线(-)、下划线(_)、半角句号(.)、井号(#)、正斜线(/)、at符号(@)。

  • Vhost名称长度为1~255字符。

  • 当Vhost被创建后,Vhost名称不可修改。如果您想修改名称,只能删除重建。

返回值

Fn::GetAtt

VirtualHost:Vhost名称。

示例

YAML格式

ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  InstanceId:
    Description: InstanceId
    Type: String
  VirtualHost:
    Description: The name of the virtual host.
    MaxLength: 100
    Type: String
Resources:
  AMQPVirtualHost:
    Properties:
      InstanceId:
        Ref: InstanceId
      VirtualHost:
        Ref: VirtualHost
    Type: ALIYUN::AMQP::VirtualHost
Outputs:
  VirtualHost:
    Description: The name of the virtual host.
    Value:
      Fn::GetAtt:
      - AMQPVirtualHost
      - VirtualHost

JSON格式

{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "InstanceId": {
      "Type": "String",
      "Description": "InstanceId"
    },
    "VirtualHost": {
      "Type": "String",
      "Description": "The name of the virtual host.",
      "MaxLength": 100
    }
  },
  "Resources": {
    "AMQPVirtualHost": {
      "Type": "ALIYUN::AMQP::VirtualHost",
      "Properties": {
        "InstanceId": {
          "Ref": "InstanceId"
        },
        "VirtualHost": {
          "Ref": "VirtualHost"
        }
      }
    }
  },
  "Outputs": {
    "VirtualHost": {
      "Description": "The name of the virtual host.",
      "Value": {
        "Fn::GetAtt": [
          "AMQPVirtualHost",
          "VirtualHost"
        ]
      }
    }
  }
}