Put Action
  • PDF

Put Action

  • PDF

The latest service changes have not yet been reflected in this content. We will update the content as soon as possible. Please refer to the Korean version for information on the latest updates.

Overview

Creates and edits an action.

Request

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 Required Type Limits Description
packageName Yes string Up to 50 characters are allowed, using alphabets, numbers, -, or _ Name of the package. If you want to create an action that's not contained in the package, enter - for the packageName.
actionName Yes string Up to 50 characters are allowed, using alphabets, numbers, -, or _ Name of the action

Request Parameters

Parameter Required Type Restrictions Description
platform No string (classic | vpc) Platform type. It is 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"
    }
}

Property Required Type Limits Description
description No string String up to 3000 bytes Description of the action
web No Boolean true/false Web action setting
raw-http No Boolean true/false HTTP raw text availability. If web-export is false, then only false is allowed.
custom-options No Boolean true/false Header option setting. If web-export is false, only false is allowed.
parameters Yes JSON format. {"key" : "value"} format Sets the default parameter of the action.
The top priority for application is placed on the parameter delivered at the time of execution, followed by the default parameter of the action, and the parameter of the package, in the descending order.
limits.timeout Yes number MIN 500 MAX 300000 The maximum time period during which the action can be run. The action is forcibly terminated when the timeout is exceeded. It is represented in ms and the default value is 60000 ms.
limits.memory Yes number ( 128 | 256 | 512 ) The size of the memory that is allocated to the action container. The default is 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 | java | go:1.11 | dotnet:2.2) Language in use.
exec.binary Yes boolean Set to false when write the code directly, or true when upload the file binary. If the language is java or dotnet, only file binaries are allowed. Java can be registered only in the form of compressed * .jar file, and in the case of .net (dotnet), it can be uploaded only in the form of compressed file (* .zip).
exec.code Yes string Source code. If you are to directly enter code, escape processing is required.
exec.main Yes string Function to be executed within the code should be entered.
vpc No Enter vpc information to connect. Only enter this when the platform is vpc.
vpc.vpcNo No number Enter vpc no. to connect.
vpc.subnetNo No number Enter subnet no. to connect.

Sequence Action

{
    "description" : "string",
    "web" : "boolean",
    "exec": {
        "kind": "string",
        "components": [
          "string"
        ]
    }
}
Property Required Type Limits Description
description No string String up to 3,000 bytes Action Description
web No Boolean true/false Web action settings
exec.kind Yes string sequence sequence action
exec.components Yes string array "{packageName}/{actionName}" format.
If you want to create an action that's not contained in the package, enter - for the packageName. Enter the action to be linked to the sequence action in the intended order.

Response

Response Body

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"
        }
    }
}
Property Type Description Note
content.name string Name of the action
content.namespace string Namespace of the user
content.description string Description of the action
content.parameters
content.resourceId string resourceId of the action
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 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. Only appears when the platform is vpc
content.vpc.vpcNo number No. of the vpc connected
content.vpc.subnetNo number No. of the subnet connected

Sequence Action

{
    "content": {
        "name": "string",
        "path": "string",
        "description": "string",
        "resourceId": "string",
        "web": "boolean",
        "exec": {
            "kind": "string",
            "components": [
              "string"
            ]
        }
    }
}
Property Type Description Note
content.name string Name of the action
content.namespace string Namespace of the user
content.description string Description of the action
content.resourceId string resourceId of the action
content.web boolean Web action setting
content.exec.kind string sequence
content.exec.components string array List of actions linked to the sequence action

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.