Put Action
- Print
- PDF
Put Action
- Print
- PDF
Article Summary
Share feedback
Thanks for sharing your feedback!
Overview
Creates and edits an action.
Requests
Request URL
PUT {CLOUD_FUNCTIONS_API_URL}/packages/{packageName}/actions/{actionName}
Content-Type: application/json; charset=utf-8
x-ncp-apigw-timestamp: {Timestamp}
x-ncp-iam-access-key: {Sub Account Access Key}
x-ncp-apigw-signature-v2: {API Gateway Signature}
Path Variables
Parameters | Requirement status | Type | Restrictions | Description |
---|---|---|---|---|
packageName | Yes | string | Strings of up to 50 characters consisting of English letters, numbers, hyphens (-), and underscores (_) | - Package name - When creating an action that does not belong to a package, enter a hyphen (-) in the packageName |
actionName | Yes | string | Strings of up to 50 characters consisting of English letters, numbers, hyphens (-), and underscores (_) | Action name |
Request parameters
Parameter name | Requirement status | Type | Restrictions | Description |
---|---|---|---|---|
platform | No | string | (classic | vpc) | - Platform type - Processed as default classic |
Request bodies
Basic Action
{
"description" : "string",
"web" : "boolean",
"raw-http" : "boolean",
"custom-options" : "boolean",
"parameters": {
},
"limits": {
"timeout": "number",
"memory": "number"
},
"exec": {
"kind": "string",
"code": "string",
"binary": "boolean",
"main": "string"
},
"vpc": {
"vpcNo" : "number",
"subnetNo" : "number"
}
}
Item | Requirement status | Type | Restrictions | Description |
---|---|---|---|---|
description | No | string | Strings up to 3000 bytes | Action description |
web | No | boolean | true/false | - Web action setting When editing an action, changes to the action type are restricted. The default value is applied differently depending on whether it is being created or edited, as follows: - When creating a new action: false - When editing an existing action: existing type of the action |
raw-http | No | boolean | true/false | - HTTP raw text availability - If web is set to false, only false is allowed |
custom-options | No | boolean | true/false | - Header option setting - If web is set to false, only false is allowed |
parameters | No | object | JSON format. In the form of {"key" : "value"} | Set the default parameters of the action * Parameter application priority when executing an action ** #1: Runtime parameters delivered at time of execution ** #2: Default parameters of the connected trigger ** #3: Default parameters of the action ** #4: Default parameters of the included package |
limits.timeout | Yes | number | MIN 500 MAX 300000 | - Maximum time limit for which the action can be run Forced shutdown if this time is exceeded - ms unit, default: 60000ms |
limits.memory | Yes | number | ( 128 | 256 | 512 | 1024 ) | Size of the memory that is allocated to the action container (default: 256). 1024 MB is only provided in the Korea Region |
exec.kind | Yes | string | ( swift:3.1.1 | python:3.6 | python:3.7 | python:3.11 | php:7.1 | php:7.3 | nodejs:6 | nodejs:8 | nodejs:12 | nodejs:16 | java | go:1.11 | go:1.19 | dotnet:2.2) | Language in use |
exec.binary | Yes | boolean | - If you plan to directly enter code, set to false, and if you plan to enter a file binary, set to true - If the language in use is java or dotnet, only the file binary is allowed - Java can only be registered as a compressed *.jar file, and in the case of .net (dotnet), it can only be uploaded as a *.zip file (compressed file) | |
exec.code | Yes | string | - Source code - If you plan to directly enter the code, escape process is required | |
exec.main | Yes | string | Enter function name to be executed within the code | |
vpc | No | - Enter vpc information to be connected - Enter only when platform is vpc | ||
vpc.vpcNo | No | number | Enter vpc No. to be connected | |
vpc.subnetNo | No | number | Enter subnet No. to be connected |
Sequence Action
{
"description" : "string",
"web" : "boolean",
"exec": {
"kind": "string",
"components": [
"string"
]
}
}
Item | Requirement status | Type | Restrictions | Description |
---|---|---|---|---|
description | No | string | Strings up to 3000 bytes | Action description |
web | No | boolean | true/false | - Web action setting When editing an action, changes to the action type are restricted. The default value is applied differently depending on whether it is being created or edited, as follows: - When creating a new action: false - When editing an existing action: existing type of the action |
exec.kind | Yes | string | sequence | When creating a sequence action, enter it as a sequence |
exec.components | Yes | string array | When connecting an action that does not belong to a package in the form of "{packageName}/{actionName}", enter - in the packageName | Enter the action to be connected to the sequence action in order |
Responses
Response bodies
Basic Action
{
"content": {
"name": "string",
"path": "string",
"description": "string",
"parameters": {},
"resourceId": "string",
"web": "boolean",
"raw-http": "boolean",
"custom-options": "boolean",
"exec": {
"binary": "boolean",
"code": "string",
"kind": "string",
"main": "string"
},
"limits": {
"memory": "number",
"timeout": "number"
},
"vpc" : {
"vpcNo": "number",
"subnetNo": "number"
}
}
}
Item | Type | Description | Remarks |
---|---|---|---|
content.name | string | Action name | |
content.path | string | Action path | |
content.description | string | Action description | |
content.parameters | object | Default parameters of the action | |
content.resourceId | string | Action resourceId | |
content.web | boolean | Web action setting | |
content.raw-http | boolean | HTTP raw text availability | |
content.custom-options | boolean | Header option setting | |
content.exec.binary | boolean | File binary status of the code | |
content.exec.code | string | Source code | |
content.exec.kind | string | Language in use | |
content.exec.main | string | Function to be executed within the code | |
content.limits.memory | number | Size of the memory that is allocated to the action container | |
content.limits.timeout | number | Maximum time limit for which the action can be run | |
content.vpc | vpc information | Appears only when the platform is vpc | |
content.vpc.vpcNo | number | Connected vpc No | |
content.vpc.vpcNo | number | Connected subnet No |
Sequence Action
{
"content": {
"name": "string",
"path": "string",
"description": "string",
"resourceId": "string",
"web": "boolean",
"exec": {
"kind": "string",
"components": [
"string"
]
}
}
}
Item | Type | Description | Remarks |
---|---|---|---|
content.name | string | Action name | |
content.path | string | Action path | |
content.description | string | Action description | |
content.resourceId | string | Action resourceId | |
content.web | boolean | Web action setting | |
content.exec.kind | string | Sequence action | |
content.exec.components | string array | Connected action list |
Was this article helpful?