Get Action

Prev Next

Classic 환경에서 이용 가능합니다.

Cloud Functions 액션을 조회합니다.

요청

요청 형식을 설명합니다. 요청 형식은 다음과 같습니다.

메서드 URI
GET /packages/{packageName}/actions/{actionName}

요청 헤더

Cloud Funtions API에서 공통으로 사용하는 헤더에 대한 자세한 내용은 Cloud Functions 공통 헤더를 참조해 주십시오.

요청 경로 파라미터

파라미터에 대한 설명은 다음과 같습니다.

필드 타입 필수 여부 설명
packageName String Required 패키지 이름
  • 패키지에 속하지 않은 액션인 경우 특수문자 '-' 입력
    • <예시> /packages/-/actions/myaction
actionName String Required 액션 이름

요청 예시

요청 예시는 다음과 같습니다.

curl --location --request GET 'https://cloudfunctions.apigw.gov-ntruss.com/api/v2/packages/package003/actions' \
--header 'Content-Type: application/json' \
--header 'x-ncp-apigw-timestamp: {Timestamp}' \
--header 'x-ncp-iam-access-key: {Sub Account Access Key}' \
--header 'x-ncp-apigw-signature-v2: {API Gateway Signature}'

응답

응답 형식을 설명합니다.

응답 바디

응답 바디에 대한 설명은 다음과 같습니다.

Basic 액션

Basic 액션의 응답 바디에 대한 설명은 다음과 같습니다.

필드 타입 필수 여부 설명
content.custom-options Boolean - 헤더 옵션 설정
  • 웹 액션만 지원
content.description String - 액션 설명
content.exec.binary Boolean - 액션 코드의 파일 바이너리 여부
content.exec.code String - 액션 소스 코드 또는 Base64-encoded 코드 파일 바이너리
content.exec.kind String - 사용 언어
content.exec.main String - 실행 함수
content.limits.memory Integer - 액션 컨테이너에 할당되는 메모리 크기
content.limits.timeout Integer - 액션이 실행될 수 있는 최대 시간
content.name String - 액션 이름
content.parameters Object - 액션의 기본 파라미터
content.path String - 액션의 Path
content.raw-http Boolean - HTTP 원문 사용 여부
  • 웹 액션만 지원
content.resourceId String - 액션의 리소스 ID
content.web Boolean - 웹 액션 설정

Sequence 액션

Sequence 액션의 응답 바디에 대한 설명은 다음과 같습니다.

필드 타입 설명
content.description String 액션 설명
content.exec.components Object[] 연결된 액션 목록
content.exec.kind String 액션 종류
  • sequence (고정 값)
content.name String 액션 이름
content.path String 액션 경로
content.resourceId String 액션의 리소스 ID
content.web Boolean 웹 액션 설정

응답 상태 코드

네이버 클라우드 플랫폼에서 공통으로 사용하는 응답 상태 코드에 대한 자세한 내용은 Ncloud API 응답 상태 코드를 참조해 주십시오.

응답 예시

응답 예시는 다음과 같습니다.

{
    "content": {
        "custom-options": false,
        "description": "Create Action",
        "exec": {
            "binary": false,
            "code": "function main(params) { \nlet name = params.name || \"World\";\nlet place = params.place || \"Naver\"; \n  return {payload:  \"abc\"};\n}",
            "kind": "nodejs:16",
            "main": "main"
        },
        "limits": {
            "memory": 128,
            "timeout": 60000
        },
        "name": "action000",
        "parameters": {
            "name": "action000"
        },
        "path": "****YBNz****/package003",
        "raw-http": false,
        "resourceId": "Sy***",
        "web": false
    }
}