POST
/
cloud
/
v1
/
caas
/
{project_id}
/
{region_id}
/
containers
curl --request POST \
  --url https://api.gcore.com/cloud/v1/caas/{project_id}/{region_id}/containers \
  --header 'APIKey: <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"
  },
  "name": "nginx",
  "pull_secret": "my-secret",
  "scale": {
    "max": 2,
    "min": 1
  },
  "timeout": 5
}'
{
  "tasks": [
    "d478ae29-dedc-4869-82f0-96104425f565"
  ]
}

Authorizations

APIKey
string
header
required

API key for authentication.

Path Parameters

project_id
integer
required

Project id

Examples:

1

region_id
integer
required

Region id

Examples:

1

Body

application/json

Response

200 - application/json

OK

The response is of type object.