MENU
      create

        create


        기사 요약

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

        Data Forest 앱을 생성합니다.

        요청

        요청 파라미터

        파라미터명필수 여부타입제약 사항설명
        accountIdYESString최대 22자까지 입력- 계정 식별자 UUID(base62)
        - accountId는 Accounts의 getList API를 통해서 획득 가능
        queueNameYESString- 최대 60자까지 입력
        - longlived만 사용 가능
        - YARN 큐 이름
        - 기본값: longlived
        appTypeIdYESString최대 60자까지 입력- Data Forest 앱 타입과 앱 버전
        - 예시: DEV-1.0.0
        - appTypeId는 getAppTypeIdList API를 통해서 획득 가능
        nameYESString최소 3자에서 최대 15자까지 입력앱 이름
        lifetimeYESInteger300(초) ~ 604800(초), -1(infinite)앱의 lifetime(구동시간) (단위: 초)
        descriptionNOString최대 2048자까지 입력앱 설명
        dependentIdsNOList<String>앱을 생성하기 위해 필요한 의존 앱 ID 목록
        componentsYESAppComponentRequest- AppComponentRequest 데이터 타입
        - Data Forest 앱을 구성하는 컴포넌트
        - 컴포넌트 정보는 getAppBasicSetting API를 실행하여 획득 가능

        요청 헤더

        공통 가이드 참조

        요청 바디

        • JSON
          {
              "components": [
                  {
                  "containerCount": 0,
                  "cpuCount": 0,
                  "memoryMb": 0,
                  "name": "string"
                  }
              ],
              "accountId": "string",
              "appTypeId": "string",
              "dependentIds": [
                  "string"
              ],
              "description": "string",
              "lifetime": 0,
              "name": "string",
              "queueName": "longlived"
          }
          JSON
        • XML
          <?xml version="1.0" encoding="UTF-8"?>
          <CreateAppRequest>
              <components>
                  <containerCount>0</containerCount>
                  <cpuCount>0</cpuCount>
                  <memoryMb>0</memoryMb>
                  <name>string</name>
              </components>
              <accountId>string</accountId>
              <appTypeId>string</appTypeId>
              <dependentIds>string</dependentIds>
              <description>string</description>
              <lifetime>0</lifetime>
              <name>string</name>
              <queueName>longlived</queueName>
          </CreateAppRequest>
          XML

        응답

        응답 바디

        CreateAppRequest

        • JSON
          {
          "id": "string",
          "message": "string",
          "success": true
          }
          JSON
        • XML
          <?xml version="1.0" encoding="UTF-8"?>
          <CreateAppResponse>
              <id>string</id>
              <message>string</message>
              <success>true</success>
          </CreateAppResponse>
          XML

        오류코드

        DataForest 개요 참조

        예시

        요청 예시

        • HTTP

          POST https://df.apigw.ntruss.com/api/v2/apps/create
          HOST: df.apigw.ntruss.com
          Content-Type: application/json
          x-ncp-apigw-timestamp: 1505290625682
          x-ncp-iam-access-key: D78BB444D6D3C84CA38A
          x-ncp-apigw-signature-v2: WTPItrmMIfLUk/UyUIyoQbA/z5hq9o3G8eQMolUzTEo=
          {
          "accountId": "0EUndFjwPUpehRdMm4X4Vj",
          "queueName": "longlived",
          "appTypeId": "DEV-1.0.0",
          "name": "dev24x7",
          "lifetime": 604800,
          "description": "string",
          "dependentIds": [
              "8xaHHIwgJG1cSNkIeDrr8D"
          ],
          "components": [
              {
              "name": "shell",
              "memoryMb": 2048,
              "cpuCount": 1,
              "containerCount": 1
              }
          ]
          }
          HTTP
        • BASH

          curl -X POST "https://df.apigw.ntruss.com/api/v2/apps/create" \
          -H "accept: application/json" \
          -H "Content-Type: application/json" \
          -H "x-ncp-apigw-timestamp:1505290625682" \
          -H "x-ncp-iam-access-key:D78BB444D6D3C84CA38A" \
          -H "x-ncp-apigw-signature-v2:WTPItrmMIfLUk/UyUIyoQbA/z5hq9o3G8eQMolUzTEo="
          -d '{
          "accountId": "0EUndFjwPUpehRdMm4X4Vj",
          "queueName": "longlived",
          "appTypeId": "DEV-1.0.0",
          "name": "dev24x7",
          "lifetime": 604800,
          "description": "string",
          "dependentIds": [
              "8xaHHIwgJG1cSNkIeDrr8D"
          ],
          "components": [
              {
              "name": "shell",
              "memoryMb": 2048,
              "cpuCount": 1,
              "containerCount": 1
              }
          ]
          }'
          Bash

        응답 예시

        • HTTP

          HTTP StatusDescription
          200OK
        • BASH

          {
          "success": true,
          "message": "success",
          "id": "VmYi7mOFyhNe107T2p9vDi"
          }
          JSON

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

        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.