create
    • PDF

    create

    • PDF

    記事の要約

    VPC環境で利用できます。

    AIワークスペースを作成します。

    リクエスト

    リクエストパラメータ

    パラメータ名要否タイプ制約事項説明
    accountIdYESString最大22文字まで入力- アカウント識別子 UUID(base62)
    - accountIdは、Accountsの getList APIを通じて取得可能
    nameYESString- 最大15文字まで入力
    - 先頭は英小文字、その他は英小文字/数字/ハイフン(-)で構成
    - ハイフンの連続使用はできず、末尾はハイフン(-)不可
    AIワークスペース名
    descriptionNOString最大255文字まで入力AIワークスペースの説明
    configurationYESAiAppTypeSpecAiAppTypeSpecのデータタイプ
    - AI Workspacesの getConfigurationList APIを通じて参照可能

    リクエストヘッダ

    共通ガイド参照

    リクエストボディ

    • JSON
        {
            "accountId": "string",
            "configuration": {
                "data": {
                "input": [
                    {
                    "hdfs": "string",
                    "path": "string"
                    }
                ],
                "output": [
                    {
                    "hdfs": "string",
                    "overwrite": true,
                    "path": "string"
                    }
                ]
                },
                "docker": {
                "args": "string",
                "command": "string",
                "env": {
                    "additionalProp1": "string",
                    "additionalProp2": "string",
                    "additionalProp3": "string"
                },
                "exposeTcpPorts": [
                    0
                ],
                "image": "string",
                "workdir": "string"
                },
                "name": "string",
                "queueName": "gpu",
                "resource": {
                "cpuCount": 0,
                "gpuCount": 0,
                "gpuModel": "T4",
                "memoryMb": 0
                },
                "userPackageUri": "string"
            },
            "description": "string",
            "name": "string"
        }
      
    • XML
        <?xml version="1.0" encoding="UTF-8"?>
        <CreateAiWorkspaceRequest>
            <accountId>string</accountId>
            <configuration>
                <data>
                    <input>
                        <hdfs>string</hdfs>
                        <path>string</path>
                    </input>
                    <output>
                        <hdfs>string</hdfs>
                        <overwrite>true</overwrite>
                        <path>string</path>
                    </output>
                </data>
                <docker>
                    <args>string</args>
                    <command>string</command>
                    <env>
                        <additionalProp>string</additionalProp>
                    </env>
                    <exposeTcpPorts>0</exposeTcpPorts>
                    <image>string</image>
                    <workdir>string</workdir>
                </docker>
                <name>string</name>
                <queueName>gpu</queueName>
                <resource>
                    <cpuCount>0</cpuCount>
                    <gpuCount>0</gpuCount>
                    <gpuModel>T4</gpuModel>
                    <memoryMb>0</memoryMb>
                </resource>
                <userPackageUri>string</userPackageUri>
            </configuration>
            <description>string</description>
            <name>string</name>
        </CreateAiWorkspaceRequest>
      

    レスポンス

    レスポンスボディ

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

    エラーコード

    DataForest概要参照

    リクエスト例

    • HTTP
      POST https://df.apigw.ntruss.com/api/v2/aiworkspaces/create
      HOST: df.apigw.ntruss.com
      Content-Type: application/json
      x-ncp-apigw-signature-v2: Azm1WBMWDgEONUCUbsVkB4tRIpc053uOHU8bitbQRtU=
      x-ncp-apigw-timestamp: 1658898041497
      x-ncp-iam-access-key: 17F9A6E9F72BD92ED94B
      
      {
          "accountId": "6COytUeFj7b8eOhq2L5zL",
          "configuration": {
          "data": {
          "input": [
              {
          "hdfs": "string",
          "path": "string"
              }
          ],
          "output": [
              {
          "hdfs": "string",
          "overwrite": true,
          "path": "string"
              }
          ]
         },
          "docker": {
              "command": "ls",
              "image": "tensorflow:r2.3.1-py3",
              "workdir": "/root/"
          },
          "name": "test",
          "queueName": "gpu",
          "resource": {
          "cpuCount": 1,
          "gpuCount": 1,
          "gpuModel": "T4",
          "memoryMb": 1024
          },
          "userPackageUri": "string"
      },
          "description":"test",
          "name": "api-test"
      }
      
    • BASH
      curl -X POST "https://df.apigw.ntruss.com/api/v2/aiworkspaces/create"
      -H "accept: application/json" 
      -H "Content-Type: application/json"
      -H "x-ncp-iam-access-key: F5O55GOTR4CqYJqPDnCu" 
      -H "x-ncp-apigw-timestamp: 1685670008615" 
      -H "x-ncp-apigw-signature-v2: uirGHd38qFol18U2cS+oM8USE9GAvOqBoixLrUv8ePw=" 
      -d "{ \"accountId\": \"2mUVZaHseGadiNFAg5MHjk\", \"configuration\": { \"data\": {\"input\": [\{\"hdfs\": \"string\",\"path\": \"string\"\}\],\"output\": [\{\"hdfs\": \"string\",\"overwrite\": true,\"path\": \"string\"\}\] }, \"docker\": {\"command\": \"ls\",\"image\": \"tensorflow:r2.3.1-py3\",\"workdir\": \"/root/\" }, \"name\": \"test\", \"queueName\": \"gpu\", \"resource\": {\"cpuCount\": 1,\"gpuCount\": 1,\"gpuModel\": \"T4\",\"memoryMb\": 1024 }, \"userPackageUri\": \"string\" },\t\"description\":\"test\", \"name\": \"api-test\"}"
      

    レスポンス例

    • HTTP

      HTTP StatusDescription
      200OK
    • BASH

      {
      "success": true,
      "id": "YPIolVXWcPTcCs9dNi89Gn"
      }
      

    エラーコードの例

    • BASH
      {
          "message": "invalid request parameter (configuration.docker.image, 'tensorflow/r2.3.1-py3'). \"^(dataforest/)?([a-z0-9._-]{1,30}):([a-z0-9._-]{1,20})$\"と一致する必要があります",
          "success": false
      }
      

    この記事は役に立ちましたか?

    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.