Put Action
- Print
- PDF
Put Action
- Print
- PDF
Article Summary
Overview
Creates and edits a 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
Parameter | Requirement status | Type | Restrictions | Description |
---|---|---|---|---|
packageName | Yes | string | String 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 package name. |
actionName | Yes | string | String 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 body
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 | String within 3000 bytes | Action description |
web | No | Boolean | true/false | Web action settings |
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 | JSON format. In the form of {"key" : "value"} | Set the default parameters of the action. * Parameter application priority when executing an action ** #1: the runtime parameters delivered at time of execution ** #2: the default parameters of the connected trigger ** #3: the default parameters of the action ** #4: the default parameters of the included package | |
limits.timeout | Yes | number | MIN 500 MAX 300000 | - The 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 ) | The size of the memory that is allocated to the action container (default: 256) |
exec.kind | Yes | string | ( swift:3.1.1 | python:3.6 | python:3.7 | 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, false should be set. If you plan to enter a file binary, true should be set. - 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 code, then 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 - Input 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 | String within 3000 bytes | Action description |
web | No | Boolean | true/false | Web action settings |
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 linked 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 parameter of the action | |
content.resourceId | string | Action resourceId | |
content.web | boolean | Web action settings | |
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 | The size of the memory that is allocated to the action container | |
content.limits.timeout | number | The 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 settings | |
content.exec.kind | string | Sequence action | |
content.exec.components | string array | Linked action list |
Was this article helpful?