You can update your data containers to change their lifetime by using the
You can specify a lifetime for a data container via the
lifetime flag. This will automatically delete your data container after the time specified, in time duration format (number followed by a unit suffix. Valid units are "h", "m", "s").
If no value is provided, your data container will have an unlimited lifetime, and will only be deleted if you explicitly request it.
If you are an admin of your organisation, you can use the
--org command to update data-containers that are part of your organisation.
To rename an existing data container use the
In this tutorial we will create a data container with an unlimited lifetime, then update it to expire in 2 hours.
As a prerequisite you should've followed the instructions to install spawnctl and created a data image
Create a data container from a data image.$ spawnctl create data-container --image devData container 'dev-rambbomj' (10001) created!-> Host=instances.spawn.cc;Port=53223;User ID=<some_user_id>;Password=<some_password>;
You can verify your data container was properly created by running the following command.$ spawnctl get data-containersNAME CONTAINER ID REVISION STATUS MESSAGE ENGINE CREATED EXPIRES ATdev-rambbomj 10001 rev.0 2 Running PostgreSQL 1 minute ago Never
updatecommand to change the lifetime of the container to expire 2 hours from now$ spawnctl update data-container dev-rambbomj --lifetime 2hContainer: 'dev-rambbomj' updated!
Verify that the lifetime of the container has been updated$ spawnctl get data-containersNAME CONTAINER ID REVISION STATUS MESSAGE ENGINE CREATED EXPIRES ATdev-rambbomj 10001 rev.0 2 Running PostgreSQL 1 minute ago 2 hours from now