Creates a vhost.

Request parameters

Parameter Type Required Example Description
Action String Yes CreateVirtualHost

The operation that you want to perform.

Set the value to CreateVirtualHost.

InstanceId String Yes amqp-cn-v0h1kb9n***

The ID of the instance.

RegionId String Yes cn-hangzhou

The ID of the region.

VirtualHost String Yes Demo

The name of the vhost. Description:

  • The vhost name can contain only letters, digits, hyphens (-), underscores (_), periods (.), number signs (#), forward slashes (/), and at signs (@).
  • 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 new vhost.

Response parameters

Parameter Type Example Description
RequestId String 628705FD-03EE-4ABE-BB21-E1672960***

The ID of the request.


Sample requests

&<Common request parameters>

Sample success responses

XML format


JSON format

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

Error codes

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