Deletes a vhost.

Note: Before you call the DeleteVirtualHost API operation to delete a vhost, make sure that all exchanges and queues deployed under this vhost are deleted.

Request parameters

Parameter Type Required Example Description
Action String Yes DeleteVirtualHost

The operation that you want to perform.

Set the value to DeleteVirtualHost.

InstanceId String Yes amqp-cn-v0h1kb9nu***

The ID of the instance.

RegionId String Yes cn-hangzhou

The ID of the region.

VirtualHost String Yes test

The name of the vhost.

Response parameters

Parameter Type Example Description
RequestId String 4311050D-BD63-48F9-822B-947A75A1***

The ID of the request.

Examples

Sample requests

http(s)://[Endpoint]/?Action=DeleteVirtualHost
&InstanceId=amqp-cn-v0h1kb9nu***
&RegionId=cn-hangzhou
&VirtualHost=test
&<Common request parameters>

Sample success responses

XML format

<DeleteVirtualHostResponse>
      <RequestId>4311050D-BD63-48F9-822B-947A75A1***</RequestId>
</DeleteVirtualHostResponse>

JSON format

{
    "RequestId": "4311050D-BD63-48F9-822B-947A75A1***"
}

Error codes

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