Update data-container
Overview
You can update your Data Containers to change their lifetime by using the update
command.
Commands
$ spawnctl update data-container <ContainerName_Or_ContainerID> --lifetime <LifetimeDurationString>
Tutorial
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 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
Run the
update
command 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