Creates a virtual host (vhost).

Request parameters

ParameterTypeRequiredExampleDescription
ActionStringYesCreateVirtualHost

The operation that you want to perform. Set the value to

CreateVirtualHost.

InstanceIdStringYesamqp-cn-v0h1kb9n***

The ID of the instance.

VirtualHostStringYesDemo

The name of the vhost. Description:

  • The name can contain letters, digits, and the following special characters: -_.#/@
  • The vhost name must be 1 to 255 characters in length.
  • After the vhost is created, you cannot modify its name. If you want to modify its name, delete the vhost and create a vhost.

Response parameters

ParameterTypeExampleDescription
RequestIdString628705FD-03EE-4ABE-BB21-E1672960***

The ID of the request.

Examples

Sample requests

http(s)://amqp-open.cn-hangzhou.aliyuncs.com/?Action=CreateVirtualHost
&InstanceId=amqp-cn-v0h1kb9n***
&VirtualHost=Demo
&<Common request parameters>

Sample success responses

XML format

<CreateVirtualHostResponse>
      <RequestId>628705FD-03EE-4ABE-BB21-E1672960***</RequestId>
</CreateVirtualHostResponse>

JSON format

{
    "RequestId": "628705FD-03EE-4ABE-BB21-E1672960***"
}

Error codes

For a list of error codes, visit the API Error Center.