Skip to content

Create a new environment

POST
/api/v3/organizations/{organisation}/applications/{application}/environments

Authorizations

Parameters

Path Parameters

organisation
required
string

The organisation ID

application
required
string

The application ID

Request Body required

object
envName
required
string
minCapacity
integer
maxCapacity
integer
cloneConfigurationFrom
string
composeDefinition
object
containers
Array<object>
object
name
required

Name of the container

string
/^[a-zA-Z0-9_-]+$/
imageReference
required
object
type
required

Specifies whether the image is internal (ECR) or external (e.g., Docker Hub)

string
Allowed values: internal external
identifier
required

The image identifier. For ‘internal’ type, this is the image tag. For ‘external’ type, this is the full image name.

string
cpu

Container-level CPU units

integer
nullable
memory

Container-level memory hard limit (MiB)

integer
nullable
memoryReservation

Container-level memory soft limit (MiB)

integer
nullable
exposedPorts

List of container ports to expose

Array<integer>
nullable
mountPoints
Array<object>
nullable
object
sourceVolume
required

The name of the logical volume

string
containerPath
required

The path inside the container where the volume is mounted

string
readOnly
boolean
environment

Environment variables specific to this container

Array<object>
nullable
object
name
required

Environment variable name

string
value
required

Environment variable value

string
secrets

Secrets mapped to environment variables

Array<object>
nullable
object
name
required

The environment variable name to be set in the container

string
valueFrom
required

The key of the secret in the environment’s ‘app-secrets’ store

string
healthCheck

Container health check configuration

object
command

The command to run to determine if the container is healthy

Array<string>
interval

Time period (seconds) between health checks

integer
default: 30 >= 5 <= 300
timeout

Time period (seconds) to wait for a health check to return

integer
default: 5 >= 2 <= 60
retries

Number of times to retry a failed health check

integer
default: 3 >= 1 <= 10
startPeriod

Grace period (seconds) to ignore unhealthy checks after container starts

integer
nullable <= 300
dependsOn

Container startup dependencies

Array<object>
nullable
object
containerName
required

The name of the container this container depends on

string
condition

The condition to wait for on the dependency

string
Allowed values: START HEALTHY COMPLETE SUCCESS
command
Array<string>
nullable
entryPoint
Array<string>
nullable
workingDirectory
string
nullable
essential
boolean
default: true nullable
readonlyRootFilesystem
boolean
nullable
user
string
nullable
originProtection

Enable origin protection for all exposed ports on this container

boolean
nullable
architecture
string
taskCpu
integer
taskMemory
integer
taskRoleArn
string
minCapacity
integer
maxCapacity
integer
imageSuffix

Optional image tag suffix for cloning

string
/^[a-z0-9]([a-z0-9-]*[a-z0-9])?$/

Responses

201

The environment created

object
envName
required
string
status
string
runningCount
integer
desiredCount
integer
minCapacity
integer
maxCapacity
integer
cloneConfigurationFrom
string
imageSuffix

Image tag suffix for cloning

string
/^[a-z0-9]([a-z0-9-]*[a-z0-9])?$/
taskDefinition
object
service
object
loadBalancer
object
securityGroup
object
subnet
object
vpc
object
volumes
Array<object>
object
volumeId
string
volumeName
string
description
string
environmentEfsId
string
createdAt
string
rootDirectory
string
accessPointId
string
accessPointArn
string
cron
Array<object>
object
name
string
schedule
string
command
string

400

The environment data is invalid