Container as a Service
Create container
Create a new container with the specified configuration.
post/cloud/v1/caas/{project_id}/{region_id}/containers
Path parameters
project_idinteger required
Project id
Example:1
Project id
region_idinteger required
Region id
Example:1
Region id
Request body
Example request
{
"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",
"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",
"timeout": 5
}Response
OK
Example response
{
"tasks": [
"d478ae29-dedc-4869-82f0-96104425f565"
]
}