Scaleway logo
Commands

Documentation for `scw container`

The CLI documentation pages are currently under construction

The content is up to date. We're making improvements to the site over the next few weeks for a better experience.

This API allows you to manage your Serverless Containers.

Container management commands

Container management commands.

Create a new container in a namespace.

Name must be unique inside the given namespace.

Usage:

TerminalCode
scw container container create [arg=value ...]

Arguments:

NameDescriptionArgument Specifications
namespace-idUnique ID of the namespace the container belongs to.Required
nameContainer name.Required
environment-variables.{key}Environment variables of the container.
secret-environment-variables.{key}Secret environment variables of the container.
min-scaleMinimum number of instances to scale the container to.
max-scaleMaximum number of instances to scale the container to.
memory-limit-bytesMemory limit of the container in bytes.
mvcpu-limitCPU limit of the container in mvCPU.
timeoutProcessing time limit for the container.
privacyPrivacy policy of the container.Default: public
One of: unknown_privacy, public, private
descriptionContainer description.
imageImage reference (e.g. "rg.fr-par.scw.cloud/my-registry-namespace/image").Required
protocolProtocol the container uses.Default: http1
One of: unknown_protocol, http1, h2c
portPort the container listens on.Default: 8080
https-connections-onlyIf true, it will allow only HTTPS connections to access your container to prevent it from being triggered by insecure connections (HTTP).Default: false
sandboxExecution environment of the container.Default: v2
One of: unknown_sandbox, v1, v2
local-storage-limit-bytesLocal storage limit of the container (in bytes).
scaling-option.concurrent-requests-thresholdScale 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-thresholdScale 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-thresholdScale 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-thresholdNumber of consecutive failures before considering the container as unhealthy
liveness-probe.intervalTime interval between checks.
liveness-probe.timeoutDuration before the check times out.
liveness-probe.tcpPerform TCP check on the container.
liveness-probe.http.pathHTTP path to perform the check on.
startup-probe.failure-thresholdNumber of consecutive failures before considering the container as unhealthy
startup-probe.intervalTime interval between checks.
startup-probe.timeoutDuration before the check times out.
startup-probe.tcpPerform TCP check on the container.
startup-probe.http.pathHTTP path to perform the check on.
tags.{index}Tags of the Serverless Container.
private-network-idID of the Private Network the container is connected to.
command.{index}Container command
args.{index}Container arguments
enable-private-endpointWhether to allow incoming traffic from the Private Networks within the VPC.
enable-default-public-endpointWhether default public endpoint is enabled or not.
regionRegion to target. If none is passed will use default region from the configDefault: fr-par
One of: fr-par, nl-ams, pl-waw, it-mil

Delete the container associated with the specified ID.

It also deletes in cascade any resource linked to the container (crons, tokens, etc.).

This action cannot be undone.

Usage:

TerminalCode
scw container container delete <container-id ...> [arg=value ...]

Arguments:

NameDescriptionArgument Specifications
container-idUUID of the container to delete.Required
regionRegion to target. If none is passed will use default region from the configDefault: fr-par
One of: fr-par, nl-ams, pl-waw, it-mil

Get the container associated with the specified ID.

Get the container associated with the specified ID.

Usage:

TerminalCode
scw container container get <container-id ...> [arg=value ...]

Arguments:

NameDescriptionArgument Specifications
container-idUUID of the container to getRequired
regionRegion to target. If none is passed will use default region from the configDefault: fr-par
One of: fr-par, nl-ams, pl-waw, it-mil

Get the private endpoint certificate authority.

When enabling private endpoints for your containers, you need to trust this CA to establish HTTPS connections to them.

Usage:

TerminalCode
scw container container get-private-endpoint-ca [arg=value ...]

Arguments:

NameDescriptionArgument Specifications
regionRegion to target. If none is passed will use default region from the configDefault: fr-par
One of: fr-par, nl-ams, pl-waw, it-mil

List all containers the caller can access (read permission).

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:

TerminalCode
scw container container list [arg=value ...]

Arguments:

NameDescriptionArgument Specifications
order-byOne of: created_at_asc, created_at_desc, name_asc, name_desc
project-id
namespace-id
name
organization-id
regionRegion to target. If none is passed will use default region from the configDefault: fr-par
One of: fr-par, nl-ams, pl-waw, it-mil, all

Show container logs

Display the logs of a container from the last 2 hours

Usage:

TerminalCode
scw container container logs <container-id ...> [arg=value ...]

Arguments:

NameDescriptionArgument Specifications
container-idID of the container which logs are to be displayed
time-spanTime range for which to retrieve container logs in duration format, defaults to 2hDefault: 2h
entry-countMaximum number of log entries to be displayed
regionRegion to target. If none is passed will use default region from the configDefault: fr-par
One of: fr-par, nl-ams, pl-waw

Redeploy a container

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:

TerminalCode
scw container container redeploy <container-id ...> [arg=value ...]

Arguments:

NameDescriptionArgument Specifications
container-idID of the container to redeploy.Required
regionRegion to target. If none is passed will use default region from the configDefault: fr-par
One of: fr-par, nl-ams, pl-waw, it-mil

Update the container associated with the specified ID.

Only fields present in the request are updated; others are left untouched.

Usage:

TerminalCode
scw container container update <container-id ...> [arg=value ...]

Arguments:

NameDescriptionArgument Specifications
container-idUUID 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-scaleMinimum number of instances to scale the container to.
max-scaleMaximum number of instances to scale the container to.
memory-limit-bytesMemory limit of the container in bytes.
mvcpu-limitCPU limit of the container in mvCPU.
timeoutProcessing time limit for the container.
privacyPrivacy policy of the container.One of: unknown_privacy, public, private
descriptionContainer description.
imageImage reference (e.g. "rg.fr-par.scw.cloud/my-registry-namespace/image").
protocolProtocol the container uses.One of: unknown_protocol, http1, h2c
portPort the container listens on.
https-connection-onlyIf true, it will allow only HTTPS connections to access your container to prevent it from being triggered by insecure connections (HTTP).
sandboxExecution environment of the container.One of: unknown_sandbox, v1, v2
local-storage-limit-bytesLocal storage limit of the container (in bytes).
scaling-option.concurrent-requests-thresholdScale 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-thresholdScale 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-thresholdScale 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-thresholdNumber of consecutive failures before considering the container as unhealthy
liveness-probe.intervalTime interval between checks.
liveness-probe.timeoutDuration before the check times out.
liveness-probe.tcpPerform TCP check on the container.
liveness-probe.http.pathHTTP 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-idID of the Private Network the container is connected to.
command.{index}Container command
args.{index}Container arguments
enable-private-endpointWhether to allow incoming traffic from the Private Networks within the VPC.
enable-default-public-endpointWhether default public endpoint is enabled or not.
regionRegion to target. If none is passed will use default region from the configDefault: fr-par
One of: fr-par, nl-ams, pl-waw, it-mil

Deploy a container

Automatically build and deploy a container.

Automatically build and deploy a container.

Usage:

TerminalCode
scw container deploy [arg=value ...]

Arguments:

NameDescriptionArgument Specifications
nameName of the application (defaults to build-source's directory name)
builderBuilder image to useDefault: paketobuildpacks/builder-jammy-base:latest
run-imageRun image to useDefault: paketobuildpacks/run-jammy-base:latest
dockerfilePath to the DockerfileDefault: Dockerfile
force-builderForce the use of the builder image (even if a Dockerfile is present)Default: false
build-sourcePath to the build contextDefault: .
cacheUse cache when building the imageDefault: true
build-args.{key}Build-time variables
platformTarget platform to build for (e.g. linux/amd64, linux/arm64)
portPort to exposeDefault: 8080
namespace-idContainer Namespace ID to deploy to
regionRegion to target. If none is passed will use default region from the configDefault: fr-par
One of: fr-par, nl-ams, pl-waw, all

Domain management commands

Domain management commands.

Create a new custom domain for the container with the specified ID.

Create a new custom domain for the container with the specified ID.

Usage:

TerminalCode
scw container domain create [arg=value ...]

Arguments:

NameDescriptionArgument Specifications
container-idUnique ID of the container the domain will be assigned to.Required
hostnameDomain assigned to the container.Required
tags.{index}A list of arbitrary tags associated with the domain.
regionRegion to target. If none is passed will use default region from the configDefault: fr-par
One of: fr-par, nl-ams, pl-waw, it-mil

Delete the custom domain associated with the specified ID.

Delete the custom domain associated with the specified ID.

Usage:

TerminalCode
scw container domain delete <domain-id ...> [arg=value ...]

Arguments:

NameDescriptionArgument Specifications
domain-idUUID of the domain to delete.Required
regionRegion to target. If none is passed will use default region from the configDefault: fr-par
One of: fr-par, nl-ams, pl-waw, it-mil

Get the custom domain associated with the specified ID.

Get the custom domain associated with the specified ID.

Usage:

TerminalCode
scw container domain get <domain-id ...> [arg=value ...]

Arguments:

NameDescriptionArgument Specifications
domain-idUUID of the domain to getRequired
regionRegion to target. If none is passed will use default region from the configDefault: fr-par
One of: fr-par, nl-ams, pl-waw, it-mil

List all custom domains the caller can access (read permission).

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:

TerminalCode
scw container domain list [arg=value ...]

Arguments:

NameDescriptionArgument Specifications
order-byOne of: created_at_asc, created_at_desc, hostname_asc, hostname_desc
project-id
namespace-id
container-id
organization-id
regionRegion to target. If none is passed will use default region from the configDefault: fr-par
One of: fr-par, nl-ams, pl-waw, it-mil, all

Update the domain associated with the specified ID.

Only fields present in the request are updated; others are left untouched.

Usage:

TerminalCode
scw container domain update <domain-id ...> [arg=value ...]

Arguments:

NameDescriptionArgument Specifications
domain-idUUID of the domain to update.Required
tags.{index}A list of arbitrary tags associated with the domain.
regionRegion to target. If none is passed will use default region from the configDefault: fr-par
One of: fr-par, nl-ams, pl-waw, it-mil

Namespace management commands

Namespace management commands.

Create a new namespace.

Namespace name must be unique inside a project.

Usage:

TerminalCode
scw container namespace create [arg=value ...]

Arguments:

NameDescriptionArgument Specifications
project-idProject ID to use. If none is passed the default project ID will be used
nameNamespace name.Required
descriptionNamespace 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.
regionRegion to target. If none is passed will use default region from the configDefault: fr-par
One of: fr-par, nl-ams, pl-waw, it-mil

Delete the namespace associated with the specified ID.

It also deletes in cascade any resource inside the namespace.

This action cannot be undone.

Usage:

TerminalCode
scw container namespace delete <namespace-id ...> [arg=value ...]

Arguments:

NameDescriptionArgument Specifications
namespace-idUUID of the namespace to delete.Required
regionRegion to target. If none is passed will use default region from the configDefault: fr-par
One of: fr-par, nl-ams, pl-waw, it-mil

Get the namespace associated with the specified ID.

Get the namespace associated with the specified ID.

Usage:

TerminalCode
scw container namespace get <namespace-id ...> [arg=value ...]

Arguments:

NameDescriptionArgument Specifications
namespace-idUUID of the namespace to getRequired
regionRegion to target. If none is passed will use default region from the configDefault: fr-par
One of: fr-par, nl-ams, pl-waw, it-mil

List all namespaces the caller can access (read permission).

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:

TerminalCode
scw container namespace list [arg=value ...]

Arguments:

NameDescriptionArgument Specifications
order-byOne of: created_at_asc, created_at_desc, name_asc, name_desc
project-id
name
organization-id
regionRegion to target. If none is passed will use default region from the configDefault: fr-par
One of: fr-par, nl-ams, pl-waw, it-mil, all

Update the namespace associated with the specified ID.

Only fields present in the request are updated; others are left untouched.

Usage:

TerminalCode
scw container namespace update <namespace-id ...> [arg=value ...]

Arguments:

NameDescriptionArgument Specifications
namespace-idUUID of the namespace to update.Required
descriptionNamespace 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.
regionRegion to target. If none is passed will use default region from the configDefault: fr-par
One of: fr-par, nl-ams, pl-waw, it-mil

Token management commands

Token management commands.

Create a new revocable token

Deprecated in favor of IAM authentication.

Usage:

TerminalCode
scw container token create [arg=value ...]

Arguments:

NameDescriptionArgument Specifications
container-idUUID of the container to create the token for
namespace-idUUID of the namespace to create the token for
descriptionDescription of the token
expires-atExpiry date of the token
regionRegion to target. If none is passed will use default region from the configDefault: fr-par
One of: fr-par, nl-ams, pl-waw

Delete a token

Delete a token with a specified ID.

Usage:

TerminalCode
scw container token delete <token-id ...> [arg=value ...]

Arguments:

NameDescriptionArgument Specifications
token-idUUID of the token to deleteRequired
regionRegion to target. If none is passed will use default region from the configDefault: fr-par
One of: fr-par, nl-ams, pl-waw

Get a token

Get a token with a specified ID.

Usage:

TerminalCode
scw container token get <token-id ...> [arg=value ...]

Arguments:

NameDescriptionArgument Specifications
token-idUUID of the token to getRequired
regionRegion to target. If none is passed will use default region from the configDefault: fr-par
One of: fr-par, nl-ams, pl-waw

List all tokens

List all tokens belonging to a specified Organization or Project.

Usage:

TerminalCode
scw container token list [arg=value ...]

Arguments:

NameDescriptionArgument Specifications
order-byOrder of the tokensOne of: created_at_asc, created_at_desc
container-idUUID of the container the token belongs to
namespace-idUUID of the namespace the token belongs to
regionRegion to target. If none is passed will use default region from the configDefault: fr-par
One of: fr-par, nl-ams, pl-waw, all

Trigger management commands

Trigger management commands.

Create a new trigger for the container with the specified ID.

Create a new trigger for the container with the specified ID.

Usage:

TerminalCode
scw container trigger create [arg=value ...]

Arguments:

NameDescriptionArgument Specifications
container-idID of the container to trigger.Required
nameName of the trigger.Required
descriptionDescription of the trigger.
tags.{index}Tags of the trigger.
destination-config.http-pathThe HTTP path to send the request to (e.g., "/my-webhook-endpoint").
destination-config.http-methodThe 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.scheduleUNIX cron schedule to run job (e.g., "* * * * *").
cron-config.timezoneTimezone for the cron schedule, in tz database format (e.g., "Europe/Paris").
cron-config.bodyBody 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.regionThe region where the SQS queue is hosted (e.g., "fr-par", "nl-ams").
sqs-config.endpointEndpoint URL to use to access SQS (e.g., "https://sqs.mnq.fr-par.scaleway.comOpen in new context").
sqs-config.access-key-idThe access key for accessing the SQS queue.
sqs-config.secret-access-keyThe secret key for accessing the SQS queue.
sqs-config.queue-urlThe 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.subjectNATS subject to subscribe to (e.g., "my-subject").
nats-config.credentials-file-contentThe content of the NATS credentials file.
regionRegion to target. If none is passed will use default region from the configDefault: fr-par
One of: fr-par, nl-ams, pl-waw, it-mil

Delete the trigger associated with the specified ID.

This action cannot be undone.

Usage:

TerminalCode
scw container trigger delete <trigger-id ...> [arg=value ...]

Arguments:

NameDescriptionArgument Specifications
trigger-idID of the trigger to delete.Required
regionRegion to target. If none is passed will use default region from the configDefault: fr-par
One of: fr-par, nl-ams, pl-waw, it-mil

Get the trigger associated with the specified ID.

Get the trigger associated with the specified ID.

Usage:

TerminalCode
scw container trigger get <trigger-id ...> [arg=value ...]

Arguments:

NameDescriptionArgument Specifications
trigger-idID of the trigger to getRequired
regionRegion to target. If none is passed will use default region from the configDefault: fr-par
One of: fr-par, nl-ams, pl-waw, it-mil

List all triggers the caller can access (read permission).

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:

TerminalCode
scw container trigger list [arg=value ...]

Arguments:

NameDescriptionArgument Specifications
order-byOne of: created_at_asc, created_at_desc, name_asc, name_desc
project-id
namespace-id
container-id
trigger-typeOne of: unknown_source_type, cron, sqs, nats
organization-id
regionRegion to target. If none is passed will use default region from the configDefault: fr-par
One of: fr-par, nl-ams, pl-waw, it-mil, all

Update the trigger associated with the specified ID.

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:

TerminalCode
scw container trigger update <trigger-id ...> [arg=value ...]

Arguments:

NameDescriptionArgument Specifications
trigger-idID of the trigger to update.Required
nameName of the trigger.
descriptionDescription of the trigger.
tags.{index}Tags of the trigger.
destination-config.http-pathThe HTTP path to send the request to (e.g., "/my-webhook-endpoint").
destination-config.http-methodThe 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.scheduleUNIX cron schedule to run job (e.g., "* * * * *").
cron-config.timezoneTimezone for the cron schedule, in tz database format (e.g., "Europe/Paris").
cron-config.bodyBody 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.regionThe region where the SQS queue is hosted (e.g., "fr-par", "nl-ams").
sqs-config.endpointEndpoint URL to use to access SQS (e.g., "https://sqs.mnq.fr-par.scaleway.comOpen in new context").
sqs-config.access-key-idThe access key for accessing the SQS queue.
sqs-config.secret-access-keyThe secret key for accessing the SQS queue.
sqs-config.queue-urlThe 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.subjectNATS subject to subscribe to (e.g., "my-subject").
nats-config.credentials-file-contentThe content of the NATS credentials file.
regionRegion to target. If none is passed will use default region from the configDefault: fr-par
One of: fr-par, nl-ams, pl-waw, it-mil