ALIYUN::AMQP::VirtualHost类型用于创建Vhost。
语法
{
"Type": "ALIYUN::AMQP::VirtualHost",
"Properties": {
"InstanceId": String,
"VirtualHost": String
}
}
属性
属性名称 | 类型 | 必须 | 允许更新 | 描述 | 约束 |
InstanceId | String | 是 | 否 | 实例ID。 | 无 |
VirtualHost | String | 是 | 否 | 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"
]
}
}
}
}