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

ParameterTypeRequiredExampleDescription
ActionStringYesDeleteVirtualHost

The operation that you want to perform.

Set the value to DeleteVirtualHost.

InstanceIdStringYesamqp-cn-v0h1kb9nu***

The ID of the instance.

RegionIdStringYescn-hangzhou

The ID of the region.

VirtualHostStringYestest

The name of the vhost.

Response parameters

ParameterTypeExampleDescription
RequestIdString4311050D-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.