This API allows you to manage your Serverless Containers.
Container management commands.
Name must be unique inside the given namespace.
Usage:
scw container container create [arg=value ...]Arguments:
| Name | Description | Argument Specifications |
|---|---|---|
| namespace-id | Unique ID of the namespace the container belongs to. | Required |
| name | Container name. | Required |
| environment-variables.{key} | Environment variables of the container. | |
| secret-environment-variables.{key} | Secret environment variables of the container. | |
| min-scale | Minimum number of instances to scale the container to. | |
| max-scale | Maximum number of instances to scale the container to. | |
| memory-limit-bytes | Memory limit of the container in bytes. | |
| mvcpu-limit | CPU limit of the container in mvCPU. | |
| timeout | Processing time limit for the container. | |
| privacy | Privacy policy of the container. | Default: publicOne of: unknown_privacy, public, private |
| description | Container description. | |
| image | Image reference (e.g. "rg.fr-par.scw.cloud/my-registry-namespace/image:tag"). | Required |
| protocol | Protocol the container uses. | Default: http1One of: unknown_protocol, http1, h2c |
| port | Port the container listens on. | Default: 8080 |
| https-connections-only | If true, it will allow only HTTPS connections to access your container to prevent it from being triggered by insecure connections (HTTP). | Default: false |
| sandbox | Execution environment of the container. | Default: v2One of: unknown_sandbox, v1, v2 |
| local-storage-limit-bytes | Local storage limit of the container (in bytes). | |
| scaling-option.concurrent-requests-threshold | Scale depending on the number of concurrent requests being processed per container instance. The threshold value is the number of concurrent requests above which the container will be scaled up. | |
| scaling-option.cpu-usage-threshold | Scale depending on the CPU usage of a container instance. The threshold value is the percentage of CPU usage above which the container will be scaled up. | |
| scaling-option.memory-usage-threshold | Scale depending on the memory usage of a container instance. The threshold value is the percentage of memory usage above which the container will be scaled up. | |
| liveness-probe.failure-threshold | Number of consecutive failures before considering the container as unhealthy | |
| liveness-probe.interval | Time interval between checks. | |
| liveness-probe.timeout | Duration before the check times out. | |
| liveness-probe.tcp | Perform TCP check on the container. | |
| liveness-probe.http.path | HTTP path to perform the check on. | |
| startup-probe.failure-threshold | Number of consecutive failures before considering the container as unhealthy | |
| startup-probe.interval | Time interval between checks. | |
| startup-probe.timeout | Duration before the check times out. | |
| startup-probe.tcp | Perform TCP check on the container. | |
| startup-probe.http.path | HTTP path to perform the check on. | |
| tags.{index} | Tags of the Serverless Container. | |
| private-network-id | ID of the Private Network the container is connected to. | |
| command.{index} | Container command | |
| args.{index} | Container arguments | |
| region | Region to target. If none is passed will use default region from the config | Default: fr-parOne of: fr-par, nl-ams, pl-waw |
It also deletes in cascade any resource linked to the container (crons, tokens, etc.).
This action cannot be undone.
Usage:
scw container container delete <container-id ...> [arg=value ...]Arguments:
| Name | Description | Argument Specifications |
|---|---|---|
| container-id | UUID of the container to delete. | Required |
| region | Region to target. If none is passed will use default region from the config | Default: fr-parOne of: fr-par, nl-ams, pl-waw |
Get the container associated with the specified ID.
Usage:
scw container container get <container-id ...> [arg=value ...]Arguments:
| Name | Description | Argument Specifications |
|---|---|---|
| container-id | UUID of the container to get | Required |
| region | Region to target. If none is passed will use default region from the config | Default: fr-parOne of: fr-par, nl-ams, pl-waw |
By default, the containers listed are ordered by creation date in ascending order. This can be modified via the order_by field.
Additional parameters can be set in the query to filter, such as organization_id, project_id, and name.
Usage:
scw container container list [arg=value ...]Arguments:
| Name | Description | Argument Specifications |
|---|---|---|
| order-by | One of: created_at_asc, created_at_desc, name_asc, name_desc |
|
| project-id | ||
| namespace-id | ||
| name | ||
| organization-id | ||
| region | Region to target. If none is passed will use default region from the config | Default: fr-parOne of: fr-par, nl-ams, pl-waw, all |
Display the logs of a container from the last 2 hours
Usage:
scw container container logs <container-id ...> [arg=value ...]Arguments:
| Name | Description | Argument Specifications |
|---|---|---|
| container-id | ID of the container which logs are to be displayed | |
| time-span | Time range for which to retrieve container logs in duration format, defaults to 2h | Default: 2h |
| entry-count | Maximum number of log entries to be displayed | |
| region | Region to target. If none is passed will use default region from the config | Default: fr-parOne of: fr-par, nl-ams, pl-waw |
Performs a rollout of the container by creating new instances with the latest image version and terminating the old instances.
When using mutable registry image references (e.g. my-registry-namespace/image:tag), this endpoint can be used to force the container to use
the most recent image version available in the registry.
Usage:
scw container container redeploy <container-id ...> [arg=value ...]Arguments:
| Name | Description | Argument Specifications |
|---|---|---|
| container-id | ID of the container to redeploy. | Required |
| region | Region to target. If none is passed will use default region from the config | Default: fr-parOne of: fr-par, nl-ams, pl-waw |
Only fields present in the request are updated; others are left untouched.
Usage:
scw container container update <container-id ...> [arg=value ...]Arguments:
| Name | Description | Argument Specifications |
|---|---|---|
| container-id | UUID of the container to update. | Required |
| environment-variables.{key} | Environment variables of the container. | |
| secret-environment-variables.{key} | Secret environment variables of the container. | |
| min-scale | Minimum number of instances to scale the container to. | |
| max-scale | Maximum number of instances to scale the container to. | |
| memory-limit-bytes | Memory limit of the container in bytes. | |
| mvcpu-limit | CPU limit of the container in mvCPU. | |
| timeout | Processing time limit for the container. | |
| privacy | Privacy policy of the container. | One of: unknown_privacy, public, private |
| description | Container description. | |
| image | Image reference (e.g. "rg.fr-par.scw.cloud/my-registry-namespace/image:tag"). | |
| protocol | Protocol the container uses. | One of: unknown_protocol, http1, h2c |
| port | Port the container listens on. | |
| https-connection-only | If true, it will allow only HTTPS connections to access your container to prevent it from being triggered by insecure connections (HTTP). | |
| sandbox | Execution environment of the container. | One of: unknown_sandbox, v1, v2 |
| local-storage-limit-bytes | Local storage limit of the container (in bytes). | |
| scaling-option.concurrent-requests-threshold | Scale depending on the number of concurrent requests being processed per container instance. The threshold value is the number of concurrent requests above which the container will be scaled up. | |
| scaling-option.cpu-usage-threshold | Scale depending on the CPU usage of a container instance. The threshold value is the percentage of CPU usage above which the container will be scaled up. | |
| scaling-option.memory-usage-threshold | Scale depending on the memory usage of a container instance. The threshold value is the percentage of memory usage above which the container will be scaled up. | |
| liveness-probe.failure-threshold | Number of consecutive failures before considering the container as unhealthy | |
| liveness-probe.interval | Time interval between checks. | |
| liveness-probe.timeout | Duration before the check times out. | |
| liveness-probe.tcp | Perform TCP check on the container. | |
| liveness-probe.http.path | HTTP path to perform the check on. | |
| startup-probe.failure-threshold | ||
| startup-probe.interval | ||
| startup-probe.timeout | ||
| startup-probe.http.path | ||
| startup-probe.tcp | ||
| tags.{index} | Tags of the Serverless Container. | |
| private-network-id | ID of the Private Network the container is connected to. | |
| command.{index} | Container command | |
| args.{index} | Container arguments | |
| region | Region to target. If none is passed will use default region from the config | Default: fr-parOne of: fr-par, nl-ams, pl-waw |
Automatically build and deploy a container.
Automatically build and deploy a container.
Usage:
scw container deploy [arg=value ...]Arguments:
| Name | Description | Argument Specifications |
|---|---|---|
| name | Name of the application (defaults to build-source's directory name) | |
| builder | Builder image to use | Default: paketobuildpacks/builder-jammy-base:latest |
| run-image | Run image to use | Default: paketobuildpacks/run-jammy-base:latest |
| dockerfile | Path to the Dockerfile | Default: Dockerfile |
| force-builder | Force the use of the builder image (even if a Dockerfile is present) | Default: false |
| build-source | Path to the build context | Default: . |
| cache | Use cache when building the image | Default: true |
| build-args.{key} | Build-time variables | |
| platform | Target platform to build for (e.g. linux/amd64, linux/arm64) | |
| port | Port to expose | Default: 8080 |
| namespace-id | Container Namespace ID to deploy to | |
| region | Region to target. If none is passed will use default region from the config | Default: fr-parOne of: fr-par, nl-ams, pl-waw, all |
Domain management commands.
Create a new custom domain for the container with the specified ID.
Usage:
scw container domain create [arg=value ...]Arguments:
| Name | Description | Argument Specifications |
|---|---|---|
| container-id | Unique ID of the container the domain will be assigned to. | Required |
| hostname | Domain assigned to the container. | Required |
| tags.{index} | A list of arbitrary tags associated with the domain. | |
| region | Region to target. If none is passed will use default region from the config | Default: fr-parOne of: fr-par, nl-ams, pl-waw |
Delete the custom domain associated with the specified ID.
Usage:
scw container domain delete <domain-id ...> [arg=value ...]Arguments:
| Name | Description | Argument Specifications |
|---|---|---|
| domain-id | UUID of the domain to delete. | Required |
| region | Region to target. If none is passed will use default region from the config | Default: fr-parOne of: fr-par, nl-ams, pl-waw |
Get the custom domain associated with the specified ID.
Usage:
scw container domain get <domain-id ...> [arg=value ...]Arguments:
| Name | Description | Argument Specifications |
|---|---|---|
| domain-id | UUID of the domain to get | Required |
| region | Region to target. If none is passed will use default region from the config | Default: fr-parOne of: fr-par, nl-ams, pl-waw |
By default, the custom domains listed are ordered by creation date in ascending order. This can be modified via the order_by field.
Additional parameters can be set in the query to filter the output, such as organization_id, project_id, namespace_id, or container_id.
Usage:
scw container domain list [arg=value ...]Arguments:
| Name | Description | Argument Specifications |
|---|---|---|
| order-by | One of: created_at_asc, created_at_desc, hostname_asc, hostname_desc |
|
| project-id | ||
| namespace-id | ||
| container-id | ||
| organization-id | ||
| region | Region to target. If none is passed will use default region from the config | Default: fr-parOne of: fr-par, nl-ams, pl-waw, all |
Only fields present in the request are updated; others are left untouched.
Usage:
scw container domain update <domain-id ...> [arg=value ...]Arguments:
| Name | Description | Argument Specifications |
|---|---|---|
| domain-id | UUID of the domain to update. | Required |
| tags.{index} | A list of arbitrary tags associated with the domain. | |
| region | Region to target. If none is passed will use default region from the config | Default: fr-parOne of: fr-par, nl-ams, pl-waw |
Namespace management commands.
Namespace name must be unique inside a project.
Usage:
scw container namespace create [arg=value ...]Arguments:
| Name | Description | Argument Specifications |
|---|---|---|
| project-id | Project ID to use. If none is passed the default project ID will be used | |
| name | Namespace name. | Required |
| description | Namespace description. | |
| environment-variables.{key} | Namespace environment variables. | |
| secret-environment-variables.{key} | Namespace secret environment variables. | |
| tags.{index} | A list of arbitrary tags associated with the namespace. | |
| region | Region to target. If none is passed will use default region from the config | Default: fr-parOne of: fr-par, nl-ams, pl-waw |
It also deletes in cascade any resource inside the namespace.
This action cannot be undone.
Usage:
scw container namespace delete <namespace-id ...> [arg=value ...]Arguments:
| Name | Description | Argument Specifications |
|---|---|---|
| namespace-id | UUID of the namespace to delete. | Required |
| region | Region to target. If none is passed will use default region from the config | Default: fr-parOne of: fr-par, nl-ams, pl-waw |
Get the namespace associated with the specified ID.
Usage:
scw container namespace get <namespace-id ...> [arg=value ...]Arguments:
| Name | Description | Argument Specifications |
|---|---|---|
| namespace-id | UUID of the namespace to get | Required |
| region | Region to target. If none is passed will use default region from the config | Default: fr-parOne of: fr-par, nl-ams, pl-waw |
By default, the namespaces listed are ordered by creation date in ascending order. This can be modified via the order_by field.
Additional parameters can be set in the query to filter, such as organization_id, project_id, and name.
Usage:
scw container namespace list [arg=value ...]Arguments:
| Name | Description | Argument Specifications |
|---|---|---|
| order-by | One of: created_at_asc, created_at_desc, name_asc, name_desc |
|
| project-id | ||
| name | ||
| organization-id | ||
| region | Region to target. If none is passed will use default region from the config | Default: fr-parOne of: fr-par, nl-ams, pl-waw, all |
Only fields present in the request are updated; others are left untouched.
Usage:
scw container namespace update <namespace-id ...> [arg=value ...]Arguments:
| Name | Description | Argument Specifications |
|---|---|---|
| namespace-id | UUID of the namespace to update. | Required |
| description | Namespace description. | |
| environment-variables.{key} | Namespace environment variables. | |
| secret-environment-variables.{key} | Namespace secret environment variables. | |
| tags.{index} | A list of arbitrary tags associated with the namespace. | |
| region | Region to target. If none is passed will use default region from the config | Default: fr-parOne of: fr-par, nl-ams, pl-waw |
Token management commands.
Deprecated in favor of IAM authentication.
Usage:
scw container token create [arg=value ...]Arguments:
| Name | Description | Argument Specifications |
|---|---|---|
| container-id | UUID of the container to create the token for | |
| namespace-id | UUID of the namespace to create the token for | |
| description | Description of the token | |
| expires-at | Expiry date of the token | |
| region | Region to target. If none is passed will use default region from the config | Default: fr-parOne of: fr-par, nl-ams, pl-waw |
Delete a token with a specified ID.
Usage:
scw container token delete <token-id ...> [arg=value ...]Arguments:
| Name | Description | Argument Specifications |
|---|---|---|
| token-id | UUID of the token to delete | Required |
| region | Region to target. If none is passed will use default region from the config | Default: fr-parOne of: fr-par, nl-ams, pl-waw |
Get a token with a specified ID.
Usage:
scw container token get <token-id ...> [arg=value ...]Arguments:
| Name | Description | Argument Specifications |
|---|---|---|
| token-id | UUID of the token to get | Required |
| region | Region to target. If none is passed will use default region from the config | Default: fr-parOne of: fr-par, nl-ams, pl-waw |
List all tokens belonging to a specified Organization or Project.
Usage:
scw container token list [arg=value ...]Arguments:
| Name | Description | Argument Specifications |
|---|---|---|
| order-by | Order of the tokens | One of: created_at_asc, created_at_desc |
| container-id | UUID of the container the token belongs to | |
| namespace-id | UUID of the namespace the token belongs to | |
| region | Region to target. If none is passed will use default region from the config | Default: fr-parOne of: fr-par, nl-ams, pl-waw, all |
Trigger management commands.
Create a new trigger for the container with the specified ID.
Usage:
scw container trigger create [arg=value ...]Arguments:
| Name | Description | Argument Specifications |
|---|---|---|
| container-id | ID of the container to trigger. | Required |
| name | Name of the trigger. | Required |
| description | Description of the trigger. | |
| tags.{index} | Tags of the trigger. | |
| destination-config.http-path | The HTTP path to send the request to (e.g., "/my-webhook-endpoint"). | |
| destination-config.http-method | The HTTP method to use when sending the request (e.g., get, post, put, patch, delete). Must be specified as lowercase. | One of: unknown_http_method, get, post, put, patch, delete |
| cron-config.schedule | UNIX cron schedule to run job (e.g., "* * * * *"). | |
| cron-config.timezone | Timezone for the cron schedule, in tz database format (e.g., "Europe/Paris"). | |
| cron-config.body | Body to send to the container when the trigger is invoked. | |
| cron-config.headers.{key} | Additional headers to send to the container when the trigger is invoked. | |
| sqs-config.region | The region where the SQS queue is hosted (e.g., "fr-par", "nl-ams"). | |
| sqs-config.endpoint | Endpoint URL to use to access SQS (e.g., "https://sqs.mnq.fr-par.scaleway.com"). | |
| sqs-config.access-key-id | The access key for accessing the SQS queue. | |
| sqs-config.secret-access-key | The secret key for accessing the SQS queue. | |
| sqs-config.queue-url | The URL of the SQS queue to monitor for messages. | |
| nats-config.server-urls.{index} | The URLs of the NATS server (e.g., "nats://nats.mnq.fr-par.scaleway.com:4222"). | |
| nats-config.subject | NATS subject to subscribe to (e.g., "my-subject"). | |
| nats-config.credentials-file-content | The content of the NATS credentials file. | |
| region | Region to target. If none is passed will use default region from the config | Default: fr-parOne of: fr-par, nl-ams, pl-waw |
This action cannot be undone.
Usage:
scw container trigger delete <trigger-id ...> [arg=value ...]Arguments:
| Name | Description | Argument Specifications |
|---|---|---|
| trigger-id | ID of the trigger to delete. | Required |
| region | Region to target. If none is passed will use default region from the config | Default: fr-parOne of: fr-par, nl-ams, pl-waw |
Get the trigger associated with the specified ID.
Usage:
scw container trigger get <trigger-id ...> [arg=value ...]Arguments:
| Name | Description | Argument Specifications |
|---|---|---|
| trigger-id | ID of the trigger to get | Required |
| region | Region to target. If none is passed will use default region from the config | Default: fr-parOne of: fr-par, nl-ams, pl-waw |
By default, the triggers listed are ordered by creation date in ascending order. This can be modified via the order_by field.
Additional parameters can be set in the query to filter, such as organization_id, project_id, namespace_id, container_id or trigger_type.
Usage:
scw container trigger list [arg=value ...]Arguments:
| Name | Description | Argument Specifications |
|---|---|---|
| order-by | One of: created_at_asc, created_at_desc, name_asc, name_desc |
|
| project-id | ||
| namespace-id | ||
| container-id | ||
| trigger-type | One of: unknown_source_type, cron, sqs, nats |
|
| organization-id | ||
| region | Region to target. If none is passed will use default region from the config | Default: fr-parOne of: fr-par, nl-ams, pl-waw, all |
When updating a trigger, you cannot specify a different source type than the one already set. Only fields present in the request are updated; others are left untouched.
Usage:
scw container trigger update <trigger-id ...> [arg=value ...]Arguments:
| Name | Description | Argument Specifications |
|---|---|---|
| trigger-id | ID of the trigger to update. | Required |
| name | Name of the trigger. | |
| description | Description of the trigger. | |
| tags.{index} | Tags of the trigger. | |
| destination-config.http-path | The HTTP path to send the request to (e.g., "/my-webhook-endpoint"). | |
| destination-config.http-method | The HTTP method to use when sending the request (e.g., get, post, put, patch, delete). Must be specified as lowercase. | One of: unknown_http_method, get, post, put, patch, delete |
| cron-config.schedule | UNIX cron schedule to run job (e.g., "* * * * *"). | |
| cron-config.timezone | Timezone for the cron schedule, in tz database format (e.g., "Europe/Paris"). | |
| cron-config.body | Body to send to the container when the trigger is invoked. | |
| cron-config.headers.{key} | Additional headers to send to the container when the trigger is invoked. | |
| sqs-config.region | The region where the SQS queue is hosted (e.g., "fr-par", "nl-ams"). | |
| sqs-config.endpoint | Endpoint URL to use to access SQS (e.g., "https://sqs.mnq.fr-par.scaleway.com"). | |
| sqs-config.access-key-id | The access key for accessing the SQS queue. | |
| sqs-config.secret-access-key | The secret key for accessing the SQS queue. | |
| sqs-config.queue-url | The URL of the SQS queue to monitor for messages. | |
| nats-config.server-urls.{index} | The URLs of the NATS server (e.g., "nats://nats.mnq.fr-par.scaleway.com:4222"). | |
| nats-config.subject | NATS subject to subscribe to (e.g., "my-subject"). | |
| nats-config.credentials-file-content | The content of the NATS credentials file. | |
| region | Region to target. If none is passed will use default region from the config | Default: fr-parOne of: fr-par, nl-ams, pl-waw |