Put Action
    • PDF

    Put Action

    • PDF

    Article summary

    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

    ParametersRequirement statusTypeRestrictionsDescription
    packageNameYesstringStrings 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
    actionNameYesstringStrings of up to 50 characters consisting of English letters, numbers, hyphens (-), and underscores (_)Action name

    Request parameters

    Parameter nameRequirement statusTypeRestrictionsDescription
    platformNostring(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"
        }
    }
    
    
    ItemRequirement statusTypeRestrictionsDescription
    descriptionNostringStrings up to 3000 bytesAction description
    webNobooleantrue/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-httpNobooleantrue/false- HTTP raw text availability
    - If web is set to false, only false is allowed
    custom-optionsNobooleantrue/false- Header option setting
    - If web is set to false, only false is allowed
    parametersNoobjectJSON 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.timeoutYesnumberMIN 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.memoryYesnumber( 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.kindYesstring( 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.binaryYesboolean- 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.codeYesstring- Source code
    - If you plan to directly enter the code, escape process is required
    exec.mainYesstringEnter function name to be executed within the code
    vpcNo- Enter vpc information to be connected
    - Enter only when platform is vpc
    vpc.vpcNoNonumberEnter vpc No. to be connected
    vpc.subnetNoNonumberEnter subnet No. to be connected

    Sequence Action

    {
        "description" : "string",
        "web" : "boolean",
        "exec": {
            "kind": "string",
            "components": [
              "string"
            ]
        }
    }
    
    ItemRequirement statusTypeRestrictionsDescription
    descriptionNostringStrings up to 3000 bytesAction description
    webNobooleantrue/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.kindYesstringsequenceWhen creating a sequence action, enter it as a sequence
    exec.componentsYesstring arrayWhen connecting an action that does not belong to a package in the form of "{packageName}/{actionName}", enter - in the packageNameEnter 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"
            }
        }
    }
    
    ItemTypeDescriptionRemarks
    content.namestringAction name
    content.pathstringAction path
    content.descriptionstringAction description
    content.parametersobjectDefault parameters of the action
    content.resourceIdstringAction resourceId
    content.webbooleanWeb action setting
    content.raw-httpbooleanHTTP raw text availability
    content.custom-optionsbooleanHeader option setting
    content.exec.binarybooleanFile binary status of the code
    content.exec.codestringSource code
    content.exec.kindstringLanguage in use
    content.exec.mainstringFunction to be executed within the code
    content.limits.memorynumberSize of the memory that is allocated to the action container
    content.limits.timeoutnumberMaximum time limit for which the action can be run
    content.vpcvpc informationAppears only when the platform is vpc
    content.vpc.vpcNonumberConnected vpc No
    content.vpc.vpcNonumberConnected subnet No

    Sequence Action

    {
        "content": {
            "name": "string",
            "path": "string",
            "description": "string",
            "resourceId": "string",
            "web": "boolean",
            "exec": {
                "kind": "string",
                "components": [
                  "string"
                ]
            }
        }
    }
    
    ItemTypeDescriptionRemarks
    content.namestringAction name
    content.pathstringAction path
    content.descriptionstringAction description
    content.resourceIdstringAction resourceId
    content.webbooleanWeb action setting
    content.exec.kindstringSequence action
    content.exec.componentsstring arrayConnected action list

    Was this article helpful?

    What's Next
    Changing your password will log you out immediately. Use the new password to log back in.
    First name must have atleast 2 characters. Numbers and special characters are not allowed.
    Last name must have atleast 1 characters. Numbers and special characters are not allowed.
    Enter a valid email
    Enter a valid password
    Your profile has been successfully updated.