全部產品
Search
文件中心

Resource Orchestration Service:ALIYUN::AMQP::VirtualHost

更新時間:Jun 15, 2024

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"
        ]
      }
    }
  }
}