Put Action
    • PDF

    Put Action

    • 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

    ParameterRequirement statusTypeRestrictionsDescription
    packageNameYesstringString 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.
    actionNameYesstringString 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 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"
        }
    }
    
    
    ItemRequirement statusTypeRestrictionsDescription
    descriptionNostringString within 3000 bytesAction description
    webNoBooleantrue/falseWeb action settings
    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
    parametersNoJSON 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.timeoutYesnumberMIN 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.memoryYesnumber( 128 | 256 | 512 )The size of the memory that is allocated to the action container (default: 256)
    exec.kindYesstring( 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.binaryYesboolean- 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.codeYesstring- Source code
    - If you plan to directly enter code, then escape process is required
    exec.mainYesstringEnter function name to be executed within the code
    vpcNo- Enter vpc information to be connected
    - Input 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
    descriptionNostringString within 3000 bytesAction description
    webNoBooleantrue/falseWeb action settings
    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 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"
            }
        }
    }
    
    ItemTypeDescriptionRemarks
    content.namestringAction name
    content.pathstringAction path
    content.descriptionstringAction description
    content.parametersobjectDefault parameter of the action
    content.resourceIdstringAction resourceId
    content.webbooleanWeb action settings
    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.memorynumberThe size of the memory that is allocated to the action container
    content.limits.timeoutnumberThe maximum 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 settings
    content.exec.kindstringSequence action
    content.exec.componentsstring arrayLinked 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.