Deleting a Virtual Host
Scenario
Methods of deleting a virtual host:
Method 1: Deleting a Virtual Host on the Console
- Log in to the management console.
- In the upper left corner, click and select a region.
Select the region where your RabbitMQ instance is.
- Click and choose Application > Distributed Message Service for RabbitMQ to open the console of DMS for RabbitMQ.
- Click an instance to go to the details page.
- In the navigation pane, choose Virtual Hosts.
- Delete virtual hosts using either of the following methods:
- Select one or more virtual hosts and click Delete Virtual Host in the upper left corner.
- In the row containing the virtual host you want to delete, click Delete.
- In the confirmation dialog box that is displayed, click Yes.
Method 2: Deleting a Virtual Host on the RabbitMQ Management UI
- Log in to the RabbitMQ management UI.
- On the top navigation bar, choose Admin.
- In the navigation tree on the right, choose Virtual Hosts.
Figure 1 Virtual Hosts page
- Click the name of the virtual host to be deleted.
Figure 2 Virtual host to be deleted
- In the Delete this vhost area, click Delete this virtual host. A confirmation dialog box is displayed.
Figure 3 Deleting a virtual host
- Click OK.
Method 3: Deleting a Virtual Host by Calling an API
- In Linux, connect to the RabbitMQ instance.
- Run the following command to delete a virtual host:
curl -i -X DELETE http://${USERNAME}:${PASSWORD}@${HOST}:${PORT}/api/vhosts/${VHOST_NAME}
Parameter description:
- USERNAME: username set when the RabbitMQ instance was created. View the username in the Connection area on the instance details page.
- PASSWORD: password set when the RabbitMQ instance was created. If you forget the password, reset it.
- HOST: IP address of the management UI. View the management UI address in the Connection area on the instance details page.
- PORT: port of the management UI. View the management UI port in the Connection area on the instance details page.
- VHOST_NAME: name of the virtual host to be deleted.
Example:
curl -i -X DELETE http://root:txxxt@192.168.1.3:15672/api/vhosts/vhost-demo
If the deletion is successful, the following information is displayed.
Figure 4 Virtual host deleted successfully
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.