PATCH
/
cloud
/
v1
/
caas
/
{project_id}
/
{region_id}
/
containers
/
{container_name}
Update container
curl --request PATCH \
  --url https://api.gcore.com/cloud/v1/caas/{project_id}/{region_id}/containers/{container_name} \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '{
  "commands": "python3 app.py -m test",
  "description": "My first container",
  "envs": {
    "ENVIRONMENT_VARIABLE": "value 2",
    "ENV_VAR": "value 1"
  },
  "flavor": "250mCPU-512MiB",
  "image": "nginx:latest",
  "is_api_key_auth": false,
  "is_disabled": false,
  "listening_port": 80,
  "logging": {
    "destination_region_id": 1,
    "enabled": true,
    "retention_policy": {
      "period": 45
    },
    "topic_name": "my-log-name"
  },
  "pull_secret": "my-secret",
  "scale": {
    "max": 2,
    "min": 1
  },
  "timeout": 5
}'
{
  "tasks": [
    "d478ae29-dedc-4869-82f0-96104425f565"
  ]
}

Authorizations

Authorization
string
header
required

API key for authentication. Make sure to include the word apikey, followed by a single space and then your token. Example: apikey 1234$abcdef

Path Parameters

project_id
integer
required

Project id

Examples:

1

region_id
integer
required

Region id

Examples:

1

container_name
string
required

Container name

Examples:

"my-container"

Body

application/json
commands
string | null

Container's commands

Examples:

"python3 app.py -m test"

description
string | null

Container description

Maximum length: 255
Examples:

"My first container"

envs
object | null

Container environment variables

Examples:
{
"ENVIRONMENT_VARIABLE": "value 2",
"ENV_VAR": "value 1"
}
flavor
string | null

Container flavor

Examples:

"250mCPU-512MiB"

image
string | null

Container image

Maximum length: 230
Examples:

"nginx:latest"

is_api_key_auth
boolean | null

Enable/Disable api key authentication. Enable api key is temporarily disabled. As a result, using CaaS with authorization is currently not supported.

Examples:

false

is_disabled
boolean | null

Set to true if container is disabled

Examples:

false

listening_port
integer | null

Container listening port

Required range: 1 <= x <= 65535
Examples:

80

logging
object | null

Logging configuration

Examples:
{
"destination_region_id": 1,
"enabled": true,
"retention_policy": { "period": 45 },
"topic_name": "my-log-name"
}
{ "enabled": false }
pull_secret
string | null

Image pull secret

Examples:

"my-secret"

scale
object | null

Container autoscaling

Examples:
{ "max": 2, "min": 1 }
timeout
integer | null

Container timeout in seconds

Required range: 0 <= x <= 180
Examples:

5

Response

200 - application/json

OK

tasks
string[]
required

List of task IDs

Examples:
["d478ae29-dedc-4869-82f0-96104425f565"]