Put Action
    • PDF

    Put Action

    • PDF

    기사 요약

    개요

    액션을 생성, 수정합니다.

    요청

    요청 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

    파라미터필수 여부타입제약 사항설명
    packageNameYesstring영문, 숫자, - , _ 으로 구성한 50자 이내의 문자열- 패키지 이름
    package에 속하지 않은 action을 생성하는 경우, packageName에 -를 입력
    actionNameYesstring영문, 숫자, - , _ 으로 구성한 50자 이내의 문자열액션 이름

    요청 바디

    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"
        }
    }
    
    항목필수 여부타입제약 사항설명
    descriptionNostring3000 bytes 이내 문자열액션 설명
    webNobooleantrue/false- 웹액션 설정
    액션을 수정하는 경우, 액션 타입의 변경이 제한됩니다.
    default value는 아래와 같이 생성/수정에 따라서 다르게 적용됩니다.
    - 새로운 액션 생성일 경우: false
    - 기존 액션 수정의 경우: 액션의 기존 타입
    raw-httpNobooleantrue/false- HTTP 원문 사용 여부
    "web" 설정이 false인 경우, false만 허용
    custom-optionsNobooleantrue/false- 헤더 옵션 설정
    "web" 설정이 false인 경우, false만 허용
    parametersNoobjectJSON 형식. {"key" : "value"}의 형태액션의 디폴트 파라미터 설정
    * 액션 실행시 파라미터 적용 우선 순위
    ** 1순위: 실행 시점에 전달되는 런타임 파라미터
    ** 2순위: 연결된 트리거의 디폴트 파라미터
    ** 3순위: 액션의 디폴트 파라미터
    ** 4순위: 포함된 패키지의 디폴트 파라미터
    limits.timeoutYesnumberMIN 500 MAX 300000- 액션이 실행될 수 있는 최대 시간
    이 시간을 초과하면 강제 종료됨
    ms 단위로, default 값은 60000ms
    limits.memoryYesnumber( 128 | 256 | 512 | 1024)액션 컨테이너에 할당되는 메모리 크기 (default 256)
    exec.kindYesstring지원 액션 런타임 ID 참조액션 런타임
    exec.binaryYesboolean코드를 직접 입력할 경우 false, 파일 바이너리를 입력할 경우 true로 설정함
    사용 언어가 java 혹은 dotnet인 경우 파일 바이너리만 허용함
    Java는 압축된 .jar 파일 형태로만 등록 가능하고, .net(dotnet)의 경우에는 압축파일(.zip) 형태로만 업로드 가능
    exec.codeYesstring- 소스 코드
    코드를 직접 입력할 경우 escape 처리가 필요
    exec.mainYesstring코드 내의 실행할 함수명 입력

    Sequence Action

    {
        "description" : "string",
        "web" : "boolean",
        "exec": {
            "kind": "string",
            "components": [
              "string"
            ]
        }
    }
    
    항목필수 여부타입제약 사항설명
    descriptionNostring3000 bytes 이내 문자열액션 설명
    webNoBooleantrue/false- 웹액션 설정
    액션을 수정하는 경우, 액션 타입의 변경이 제한됩니다.
    default value는 아래와 같이 생성/수정에 따라서 다르게 적용됩니다.
    - 새로운 액션 생성일 경우: false
    - 기존 액션 수정의 경우: 액션의 기존 타입
    exec.kindYesstringsequence시퀀스 액션을 생성하는 경우, "sequence"로 입력
    exec.componentsYesstring array"{packageName}/{actionName}" 형태 (package에 속하지 않은 action을 연결하는 경우, packageName에 -를 입력)시퀀스 액션에 연결할 액션을 순차적으로 입력

    응답

    응답 바디

    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"
            }
        }
    }
    
    항목타입설명비고
    content.namestring액션 이름
    content.pathstring액션의 path
    content.descriptionstring액션 설명
    content.parametersobject액션의 디폴트 파라미터
    content.resourceIdstring액션의 resourceId
    content.webboolean웹액션 설정
    content.raw-httpbooleanHTTP 원문 사용 여부
    content.custom-optionsboolean헤더 옵션 설정
    content.exec.binaryboolean코드의 파일 바이너리 여부
    content.exec.codestring소스 코드
    content.exec.kindstring액션 런타임
    content.exec.mainstring코드 내의 실행할 함수
    content.limits.memorynumber액션 컨테이너에 할당되는 메모리 크기
    content.limits.timeoutnumber액션이 실행될 수 있는 최대 시간

    Sequence Action

    {
        "content": {
            "name": "string",
            "path": "string",
            "description": "string",
            "resourceId": "string",
            "web": "boolean",
            "exec": {
                "kind": "string",
                "components": [
                  "string"
                ]
            }
        }
    }
    
    항목타입설명비고
    content.namestring액션 이름
    content.pathstring액션의 path
    content.descriptionstring액션 설명
    content.resourceIdstring액션의 resourceId
    content.webboolean웹액션 설정
    content.exec.kindstring시퀀스 액션
    content.exec.componentsstring array연결된 액션 리스트

    이 문서가 도움이 되었습니까?

    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.