ncloud_functions_create_action
Create or update a Cloud Functions action with runtime, type, code, and VPC settings. Supports basic, web, and sequence actions, custom images, and dry-run preview.
Instructions
Create or update a Cloud Functions action (PUT /ncf/api/v2, API v2.1 — idempotent; the same call updates an existing action). type selects the action kind and CANNOT be changed after creation: basic (default) | web | sequence | sequence-web. basic/web: exec_kind, exec_code and exec_main are required; limits_timeout/limits_memory default to 60000 ms / 128 MB; on platform=vpc the action MUST be attached to a VPC + Subnet (vpc_no, subnet_no). sequence/sequence-web: pass exec_components as ['{packageName}/{actionName}', ...] (use '-' for unpackaged actions); exec_kind is forced to 'sequence'. Runtimes (exec_kind): nodejs:22, python:3.13, java, java:21, swift:3.1.1, php:7.3, go:1.19, dotnet:2.2, custom image. Deprecated since 2025-09-18 and refused for NEW actions: nodejs:6, nodejs:8, nodejs:12, nodejs:16, python:3.6, python:3.7, python:3.11, php:7.1, go:1.11. java/dotnet accept only base64 binaries (.jar / .zip) with exec_binary=true. 'custom image' requires exec_imageUri ('{registryName}/{imageName}:{tag}'). Use dryRun=true to see the exact request without calling the API.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| type | No | Action type (query parameter). Cannot be changed once created. | basic |
| dryRun | No | Preview the request without calling the API | |
| vpc_no | No | VPC number to attach (REQUIRED for basic/web on platform=vpc; see ncloud_list_vpcs) | |
| platform | No | Platform (default: vpc). Singapore/Japan regions support vpc only. | vpc |
| raw_http | No | web types only: pass the raw HTTP request to the action (sent as 'raw-http') | |
| exec_code | No | Source code (exec_binary=false) or base64-encoded file (exec_binary=true). Required for basic/web unless exec_kind is 'custom image'. | |
| exec_kind | No | Runtime, e.g. 'python:3.13', 'nodejs:22', 'java:21', 'custom image'. Ignored for sequence types (forced to 'sequence'). Supported: nodejs:22, python:3.13, java, java:21, swift:3.1.1, php:7.3, go:1.19, dotnet:2.2, custom image | |
| exec_main | No | Entry function name, e.g. 'main'. Required for basic/web. | |
| subnet_no | No | Subnet number to attach (REQUIRED for basic/web on platform=vpc; see ncloud_list_subnets) | |
| actionName | Yes | Action name: 1-50 chars of letters, digits, '-' and '_'; must not start with '-'; unique across packages/actions/triggers | |
| parameters | No | Default parameters as a {key: value} JSON object (basic/web only). Precedence: runtime params > trigger params > action params > package params. | |
| description | No | Description (0-3000 bytes) | |
| exec_binary | No | true if exec_code is a base64-encoded file (required for java/dotnet: .jar / .zip) | |
| packageName | No | Package name ('-' = unpackaged action) | - |
| exec_imageUri | No | Custom Image runtime only: '{registryName}/{imageName}:{tag}' (tag defaults to latest) | |
| limits_memory | No | Memory in MB: 128 | 256 | 512 | 1024 (default 128). basic/web only. | |
| custom_options | No | web types only: let the action set HTTP response headers (sent as 'custom-options') | |
| limits_timeout | No | Max execution time in ms, 500-300000 (default 60000). basic/web only. | |
| exec_components | No | sequence/sequence-web only: actions to run in order, each '{packageName}/{actionName}' | |
| allowDeprecatedRuntime | No | Send a deprecated exec_kind anyway (the API is documented to refuse new actions on them) |