Reconfigure a Container

Modify a container's config. You must submit an entire config object, as it is updated atomically. Updating the config of a running container will cause it to restart.

Requires the containers-update permission.

Arguments
  • action
    string

    Set to reconfigure to reconfigure the container.

  • contents
    object

    Data required to create the task.

    Show child fields

Returns

Returns a Task Descriptor Object, otherwise returns an Error.

POST /v1/containers/5b9c2a77b6393d0001eb45fd/tasks

Example Request
$ curl https://api.cycle.io/v1/containers/5b9c2a77b6393d0001eb45fd/tasks \
-H
"Authorization: Bearer API_KEY"
\
-H
"X-HUB-ID: HUB_ID"
\
-H 'Content-Type: application/json' \
-d '{"action":"reconfigure","contents":{"network":{"public":"enable","hostname":"test-container","ports":["9000:3000"]},"deploy":{"instances":1,"constraints":{"node":{"tags":{"any":[],"all":[]}},"secrets":[],"containers":[]}},"integrations":{"lets_encrypt":{"enable":false}}}}' \
-X POST
Example Response
{
"data": {
"action": "reconfigure",
"job_id": "5d01b9b3db2ab00001508cd8"
}
}