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.
$ spawnctl update data-container <ContainerName_Or_ContainerID> --lifetime <LifetimeDurationString>
In this tutorial we will create a Data Container with an unlimited lifetime, then update it to expire in 2 hours.
Create a Data Container from a Data Image.
$ spawnctl create data-container --image dev Data container 'dev-rambbomj' 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-containers NAME CONTAINER ID REVISION STATUS MESSAGE ENGINE CREATED EXPIRES AT dev-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 2h Container: 'dev-rambbomj' updated!
Verify that the lifetime of the container has been updated
$ spawnctl get data-containers NAME CONTAINER ID REVISION STATUS MESSAGE ENGINE CREATED EXPIRES AT dev-rambbomj 10001 rev.0 2 Running PostgreSQL 1 minute ago 2 hours from now