Get Action

Prev Next

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

Cloud Functions 액션을 조회합니다.

요청

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

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

요청 헤더

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

요청 경로 파라미터

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

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

요청 쿼리 파라미터

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

필드 타입 필수 여부 설명
platform String Optional 플랫폼 유형
  • vpc (기본값) | classic

요청 예시

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

curl --location --request GET 'https://cloudfunctions.apigw.ntruss.com/api/v2/packages/package003/actions?platform=classic' \
--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.vpc Object VPC 정보
  • platformvpc인 경우에만 표시
content.vpc.vpcNo Integer 연결된 VPC 번호
content.vpc.subnetNo Integer 연결된 Subnet 번호
content.path String 액션 경로
content.raw-http Boolean HTTP 원문 사용 여부
  • 웹 액션 타입만 지원
content.resourceId String 액션의 리소스 ID
content.web Boolean 웹 액션 설정

Sequence 액션

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

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

응답 상태 코드

응답 상태 코드에 대한 설명은 다음과 같습니다.

HTTP 상태 코드 코드 메시지 설명
400 80302 ACTION_PLATFORM_MISMATCH 잘못된 플랫폼 파라미터
403 80002 SUB_ACC_NO_PERMISSION 리소스 조회 권한 오류
404 80301 ACTION_NOT_FOUND 액션을 찾을 수 없음

응답 예시

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

{
    "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": "****YBNzcd4Z/package003",
        "raw-http": false,
        "resourceId": "Sy***",
        "web": false
    }
}