Delete a Vultr instance template using the API, and keep a cluster-created template by promoting it to permanent first.
Deleting an instance template permanently removes it from your account. Instances that you already created from the template continue to run and remain unaffected.
This guide explains how to delete an instance template using the Vultr API.
(Optional) To keep a cluster-created template instead of deleting it, send a POST request to the Promote Instance Template endpoint. Replace {template-id} with the template's ID.
A successful request returns an HTTP 200 OK response with the template's ephemeral field now false. Promoting is one-way. A permanent template cannot be made ephemeral again.
Send a GET request to the List Instance Templates endpoint to retrieve all templates.
Note the id of the template you want to delete.
Send a DELETE request to the Delete Instance Template endpoint to delete the template. Replace {template-id} with the template's ID.
A successful deletion returns an HTTP 204 No Content response with no response body.
Send a GET request to the List Instance Templates endpoint to retrieve all templates.
Verify that the deleted template no longer appears in the list.
0 Comments
Be the first to comment and share your perspective with the community.