Scaleway logo
Commands

Documentation for `scw function`

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.

Function as a Service API.

Cron management commands

Cron management commands.

Create a new cron

Create a new cronjob for a function with the specified ID.

Usage:

TerminalCode
scw function cron create [arg=value ...]

Arguments:

NameDescriptionArgument Specifications
function-idUUID of the function to use the cron with
scheduleSchedule of the cron in UNIX cron format
argsArguments to use with the cron
nameName of the cron
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 an existing cron

Delete the cron associated with the specified ID.

Usage:

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

Arguments:

NameDescriptionArgument Specifications
cron-idUUID of the cron 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 cron

Get the cron associated with the specified ID.

Usage:

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

Arguments:

NameDescriptionArgument Specifications
cron-idUUID of the cron 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 crons

List all the cronjobs in a specified region.

Usage:

TerminalCode
scw function cron list [arg=value ...]

Arguments:

NameDescriptionArgument Specifications
order-byOrder of the cronsOne of: created_at_asc, created_at_desc
function-idUUID of the function
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

Update an existing cron

Update the cron associated with the specified ID.

Usage:

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

Arguments:

NameDescriptionArgument Specifications
cron-idUUID of the cron to updateRequired
function-idUUID of the function to use the cron with
scheduleSchedule of the cron in UNIX cron format
argsArguments to use with the cron
nameName of the cron
regionRegion to target. If none is passed will use default region from the configDefault: fr-par
One of: fr-par, nl-ams, pl-waw

Deploy a function

Create or fetch, upload and deploy your function

Create or fetch, upload and deploy your function

Usage:

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

Arguments:

NameDescriptionArgument Specifications
namespace-idFunction Namespace ID to deploy to
nameName of the function to deploy, will be used in namespace's name if no ID is providedRequired
runtimeRequired
One of: unknown_runtime, golang, python, python3, node8, node10, node14, node16, node17, python37, python38, python39, python310, go113, go117, go118, node18, rust165, go119, python311, php82, node19, go120, node20, go121, node22, python312, php83, go122, rust179, go123, go124, python313, rust185, php84, node24, node26, go125, go126, php85, python314, rust196
zip-filePath of the zip file that contains your codeRequired
regionRegion to target. If none is passed will use default region from the configDefault: fr-par
One of: fr-par, nl-ams, pl-waw

Domain management commands

Domain management commands.

Create a domain name binding

Create a domain name binding for the function with the specified ID.

Usage:

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

Arguments:

NameDescriptionArgument Specifications
hostnameHostname to create
function-idUUID of the function to associate the domain with
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 domain name binding

Delete a domain name binding for the function with the specified ID.

Usage:

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

Arguments:

NameDescriptionArgument Specifications
domain-idUUID of the domain 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 domain name binding

Get a domain name binding for the function with the specified ID.

Usage:

TerminalCode
scw function 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

List all domain name bindings

List all domain name bindings in a specified region.

Usage:

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

Arguments:

NameDescriptionArgument Specifications
order-byOrder of the domainsOne of: created_at_asc, created_at_desc, hostname_asc, hostname_desc
function-idUUID of the function the domain is associated with
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

Function management commands

Function management commands.

Create a new function

Create a new function in the specified region for a specified Organization or Project.

Usage:

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

Arguments:

NameDescriptionArgument Specifications
nameName of the function to createDefault: <generated>
namespace-idUUID of the namespace the function will be created in
environment-variables.{key}Environment variables of the function
min-scaleMinimum number of instances to scale the function to
max-scaleMaximum number of instances to scale the function to
runtimeRuntime to use with the functionOne of: unknown_runtime, golang, python, python3, node8, node10, node14, node16, node17, python37, python38, python39, python310, go113, go117, go118, node18, rust165, go119, python311, php82, node19, go120, node20, go121, node22, python312, php83, go122, rust179, go123, go124, python313, rust185, php84, node24, node26, go125, go126, php85, python314, rust196
memory-limitMemory limit of the function in MB
timeoutRequest processing time limit for the function
handlerHandler to use with the function
privacyPrivacy setting of the functionOne of: unknown_privacy, public, private
descriptionDescription of the function
secret-environment-variables.{index}.key
secret-environment-variables.{index}.value
http-optionConfigure how HTTP and HTTPS requests are handledDefault: enabled
One of: unknown_http_option, enabled, redirected
sandboxExecution environment of the functionOne of: unknown_sandbox, v1, v2
tags.{index}Tags of the Serverless Function
private-network-idID of the Private Network the function is connected 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

Delete a function

Delete the function associated with the specified ID.

Usage:

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

Arguments:

NameDescriptionArgument Specifications
function-idUUID of the function 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

Deploy a function

Deploy a function associated with the specified ID.

Usage:

TerminalCode
scw function function deploy <function-id ...> [arg=value ...]

Arguments:

NameDescriptionArgument Specifications
function-idUUID of the function to deployRequired
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 function

Get the function associated with the specified ID.

Usage:

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

Arguments:

NameDescriptionArgument Specifications
function-idUUID of the functionRequired
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 download URL of a function

Get a download URL for a function associated with the specified ID.

Usage:

TerminalCode
scw function function get-download-url <function-id ...> [arg=value ...]

Arguments:

NameDescriptionArgument Specifications
function-idUUID of the function to get the download URL forRequired
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 an upload URL of a function

Get an upload URL of a function associated with the specified ID.

Usage:

TerminalCode
scw function function get-upload-url <function-id ...> [arg=value ...]

Arguments:

NameDescriptionArgument Specifications
function-idUUID of the function to get the upload URL forRequired
content-lengthSize of the archive to upload in bytesRequired
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 your functions

List all your functions.

Usage:

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

Arguments:

NameDescriptionArgument Specifications
order-byOrder of the functionsOne of: created_at_asc, created_at_desc, name_asc, name_desc
namespace-idUUID of the namespace the function belongs to
nameName of the function
project-idUUID of the Project the function belongs to
organization-idUUID of the Organization the function 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

Update an existing function

Update the function associated with the specified ID.

When updating a function, the function is automatically redeployed to apply the changes. This behavior can be changed by setting the redeploy field to false in the request.

Usage:

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

Arguments:

NameDescriptionArgument Specifications
function-idUUID of the function to updateRequired
environment-variables.{key}Environment variables of the function to update
min-scaleMinimum number of instances to scale the function to
max-scaleMaximum number of instances to scale the function to
runtimeRuntime to use with the functionOne of: unknown_runtime, golang, python, python3, node8, node10, node14, node16, node17, python37, python38, python39, python310, go113, go117, go118, node18, rust165, go119, python311, php82, node19, go120, node20, go121, node22, python312, php83, go122, rust179, go123, go124, python313, rust185, php84, node24, node26, go125, go126, php85, python314, rust196
memory-limitMemory limit of the function in MB
timeoutProcessing time limit for the function
redeployRedeploy failed function
handlerHandler to use with the function
privacyPrivacy setting of the functionOne of: unknown_privacy, public, private
descriptionDescription of the function
secret-environment-variables.{index}.key
secret-environment-variables.{index}.value
http-optionConfigure how HTTP and HTTPS requests are handledOne of: unknown_http_option, enabled, redirected
sandboxExecution environment of the functionOne of: unknown_sandbox, v1, v2
tags.{index}Tags of the Serverless Function
private-network-idID of the Private Network the function is connected 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

Function namespace management commands

Function namespace management commands.

Create a new namespace

Create a new namespace in a specified Organization or Project.

Usage:

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

Arguments:

NameDescriptionArgument Specifications
nameDefault: <generated>
environment-variables.{key}Environment variables of the namespace
project-idProject ID to use. If none is passed the default project ID will be used
descriptionDescription of the namespace
secret-environment-variables.{index}.key
secret-environment-variables.{index}.value
tags.{index}Tags of the Serverless Function Namespace
activate-vpc-integration[DEPRECATED] By default, as of 2025/08/20, all namespaces are now compatible with VPC.Deprecated
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 an existing namespace

Delete the namespace associated with the specified ID.

Usage:

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

Arguments:

NameDescriptionArgument Specifications
namespace-idUUID of the namespaceRequired
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 namespace

Get the namespace associated with the specified ID.

Usage:

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

Arguments:

NameDescriptionArgument Specifications
namespace-idUUID of the namespaceRequired
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 your namespaces

List all existing namespaces in the specified region.

Usage:

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

Arguments:

NameDescriptionArgument Specifications
order-byOrder of the namespacesOne of: created_at_asc, created_at_desc, name_asc, name_desc
nameName of the namespace
project-idUUID of the Project the namespace belongs to
organization-idUUID of the Organization the namespace 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

Update an existing namespace

Update the namespace associated with the specified ID.

Usage:

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

Arguments:

NameDescriptionArgument Specifications
namespace-idUUID of the namespapceRequired
environment-variables.{key}Environment variables of the namespace
descriptionDescription of the namespace
secret-environment-variables.{index}.key
secret-environment-variables.{index}.value
tags.{index}Tags of the Serverless Function 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

Runtime management commands

Runtime management commands.

List function runtimes

List available function runtimes.

Usage:

TerminalCode
scw function runtime list [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

Token management commands

Token management commands.

Create a new revocable token

Deprecated in favor of IAM authentication.

Usage:

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

Arguments:

NameDescriptionArgument Specifications
function-idUUID of the function to associate the token with
namespace-idUUID of the namespace to associate the token with
descriptionDescription of the token
expires-atDate on which the token expires
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.

Usage:

TerminalCode
scw function 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.

Usage:

TerminalCode
scw function 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.

Usage:

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

Arguments:

NameDescriptionArgument Specifications
order-bySort order for the tokensOne of: created_at_asc, created_at_desc
function-idUUID of the function the token is associated with
namespace-idUUID of the namespace the token is associated with
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 trigger

Create a new trigger for a specified function.

Usage:

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

Arguments:

NameDescriptionArgument Specifications
nameName of the triggerRequired
function-idID of the function to triggerRequired
descriptionDescription of the trigger
scw-sqs-config.queueName of the SQS queue the trigger should listen to
scw-sqs-config.mnq-project-idID of the Messaging and Queuing project
scw-sqs-config.mnq-regionRegion in which the Messaging and Queuing project is activated.
scw-nats-config.subjectName of the NATS subject the trigger should listen to
scw-nats-config.mnq-nats-account-idID of the Messaging and Queuing NATS account
scw-nats-config.mnq-project-idID of the Messaging and Queuing project
scw-nats-config.mnq-regionRegion in which the Messaging and Queuing project is activated.
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 trigger

Delete a trigger with a specified ID.

Usage:

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

Arguments:

NameDescriptionArgument Specifications
trigger-idID of the trigger 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 trigger

Get a trigger with a specified ID.

Usage:

TerminalCode
scw function 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

List all triggers

List all triggers belonging to a specified Organization or Project.

Usage:

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

Arguments:

NameDescriptionArgument Specifications
order-byOrder in which to return resultsOne of: created_at_asc, created_at_desc
function-idID of the function the triggers belongs to
namespace-idID of the namespace the triggers belongs to
project-idProject ID to use. If none is passed the default project ID will be used
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

Update a trigger

Update a trigger with a specified ID.

Usage:

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

Arguments:

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