Can I set a timer for droplets to auto destroy?

January 27, 2017 285 views
Deployment

hello guys,

someone told me that you can set a timer on the droplets for it to automatically destroy itself? Is this possible? if so, how?

many thanks!

1 Answer

@AidanNewin

From the DigitalOcean Control Panel, no, however, you can use the API to help you automate certain tasks.

What you'd do is create a script that connects to the API and sends a request to destroy the Droplet. How you'd go about it depends on your preferred programming language.

API Documentation: https://developers.digitalocean.com/documentation/v2/

To be more specific, this is the section you'd want to check out:

https://developers.digitalocean.com/documentation/v2/#delete-a-droplet

Have another answer? Share your knowledge.