createServerInstances
    • PDF

    createServerInstances

    • PDF

    Article Summary

    Classic環境で利用できます。

    概要

    サーバインスタンス(VM)を作成します。

    リクエスト

    リクエストパラメータ

    パラメータ名必須の有無タイプ制約事項説明
    serverImageProductCodeConditionalStringMin:1, Max:20- 作成するサーバイメージを決めるためのサーバイメージ商品コード
    サーバイメージ商品コード(serverImageProductCode)または会員サーバイメージ番号(memberServerImageNo)、これら2つのパラメータのうち、1つのパラメータは必須項目
    serverImageProductCodeは、getServerImageProductListアクションを通じて取得可能
    serverProductCodeNoStringMin:1, Max:20- 作成するサーバスペックを決めるためのサーバスペック商品コード
    serverProductCodeは、getServerProductListアクションを通じて取得
    デフォルト:最小スペックが選択される。最小スペックの基準は、1. メモリ 2. CPU 3. 基本ブロックストレージサイズ 4. ディスクタイプ(NET、LOCAL)順に最小スペックが選択される
    memberServerImageNoConditionalString- 会員サーバイメージ番号
    直接作成したサーバイメージからサーバを作成する際に必要な値
    サーバイメージ商品コード(serverImageProductCode)または会員サーバイメージ番号(memberServerImageNo)、これら2つのパラメータのうち、1つのパラメータは必須項目
    memberServerImageNoは、getMemberServerImageListアクションを通じて取得可能
    serverNameNoStringMin:3, Max:30- 作成するサーバの名
    デフォルト:NAVERクラウドプラットフォームが自動で付与
    serverDescriptionNoStringMin:1, Max:1000作成するサーバについての説明
    loginKeyNameNoStringMin:3, Max:30- 公開鍵で暗号化するログインキー名
    デフォルト:直近で作成されたログインキー名を使用
    isProtectServerTerminationNoBoolean- 返却保護するかどうか
    作成時に返却保護するかどうかを設定
    Options : true | false
    Default : false
    serverCreateCountNoIntegerMin:1, Max:20- サーバ作成数
    一度に作成するサーバの作成数で、最大20台まで作成できる
    Default : 1
    serverCreateStartNoNoInteger- サーバ作成の開始番号
    一度に複数台のサーバを作成する場合、サーバ名にシリアル番号が付けられる。シリアル番号の開始番号を設定
    サーバ作成数とサーバ作成開始番号の合計が1000を超えてはいけない
    デフォルト:サーバ作成数(serverCreateCount)が1より大きい場合で、このパラメータ値がない場合は001から開始
    feeSystemTypeCodeNoStringMin:1, Max:5- 料金プラン区分コード
    時間料金プラン(MTRAT)、定額料金プラン(FXSUM)が存在
    Options : MTRAT | FXSUM
    default : MTRAT
    zoneNoNoString- サーバが作成されるゾーンを決定
    zoneNoは、getZoneListアクションを通じて取得可能
    デフォルト:NAVERクラウドプラットフォームで割り当て
    accessControlGroupConfigurationNoList.NNoStringMin:0, Max:5- ACG設定番号リスト
    作成時にユーザーが作成したアクセス制御グループを設定
    accessControlGroupConfigurationNoは、getAccessControlGroupListアクションを通じて取得可能
    Default : default ACG
    ex) accessControlGroupConfigurationNoList.1=39995
    userDataNoStringMin:1, Max:21847- ユーザーデータ
    サーバの最初の起動時に実行されるデータスクリプトを設定
    userDataは、スクリプト文字列をパラメータで取得する
    userData値は、getServerInstanceListアクションを通じて特定のインスタンスを照会する場合にのみ返される
    userData値を入力する前にbase64 Encoding、URL Encodingは必須
    base64でEncodingされた結果を再度URL Encodingしないと、 signature invalidエラーが発生
    ユーザーデータ(userData)と初期化スクリプト番号(initScriptNo)の2つのパラメータを一緒に伝達すると、初期化スクリプトのみ実行される
    initScriptNoNoString- 初期化スクリプト番号
    サーバの最初の起動時、ユーザーが設定した初期化スクリプトが実行される
    初期化スクリプトの初期化スクリプト番号をパラメータで伝達する
    ユーザーデータ(userData)と初期化スクリプト番号(initScriptNo)の2つのパラメータを一緒に伝達すると、初期化スクリプトのみ実行される
    initScriptNoは、getInitScriptListアクションを通じて取得可能
    raidTypeNameConditionalString- RAID区分名
    ベアメタルサーバを作成するには、 raidTypeName値の入力が必要
    raidTypeNameは、getRaidListアクションを通じて取得可能
    instanceTagList.N.tagKeyNoString- 作成するインスタンスのタグキーを設定
    instanceTagList.1.tagKey=sugar
    instanceTagList.N.tagValueNoString- 作成するインスタンスのタグ値
    instanceTagList.1.tagValue=salt
    isVaccineInstallNoBoolean- ワクチンをインストールするかどうかを設定できる
    ベアメタルWindows Server限定
    デフォルト値はtrue
    blockDevicePartitionList.N.mountPointNoString「/」(root)パスで始まるマウントポイントを入力
    最初のマウントポイントは必ず「/」(root)パーティション
    「/」(root)の下位名称は小文字と数字のみ入力可能で、先頭文字は小文字
    OSの種類によっては/root、/bin、/devなどの特定のキーワードは使用できない
    - マウントポイント
    Bare Metalサーバを作成する場合はパーティションを指定。
    サーバスペックによってはパーティション機能がサポートされない場合がある
    blockDevicePartitionList.N.partitionSizeNoStringMin : 50 GiB- パーティションサイズ
    マウントポイントのパーティションサイズを決定
    パーティションサイズの合計はサーバスペックの全体容量を超えてはいけない
    最後のパーティションのサイズは残り容量が自動で割り当て

    レスポンス

    レスポンスボディ

    リクエスト例

    GET {SERVER_API_URL}/createServerInstances
    ?serverImageProductCode=SPSW0LINUX000032
    &serverProductCode=SPSVRSTAND000004
    

    レスポンス例

    <createServerInstancesResponse>
      <requestId>3c48425e-ace0-4556-a793-33e91029c06c</requestId>
      <returnCode>0</returnCode>
      <returnMessage>success</returnMessage>
      <totalRows>1</totalRows>
      <serverInstanceList>
        <serverInstance>
          <serverInstanceNo>1088217</serverInstanceNo>
          <serverName>s167545541a3</serverName>
          <serverDescription></serverDescription>
          <cpuCount>2</cpuCount>
          <memorySize>4294967296</memorySize>
          <baseBlockStorageSize>53687091200</baseBlockStorageSize>
          <platformType>
            <code>LNX32</code>
            <codeName>Linux 32 Bit</codeName>
          </platformType>
          <loginKeyName>test-key</loginKeyName>
          <isFeeChargingMonitoring>false</isFeeChargingMonitoring>
          <publicIp></publicIp>
          <privateIp>10.41.83.168</privateIp>
          <serverImageName>centos-6.3-32</serverImageName>
          <serverInstanceStatus>
            <code>INIT</code>
            <codeName>Server init state</codeName>
          </serverInstanceStatus>
          <serverInstanceOperation>
            <code>NULL</code>
            <codeName>Server NULL OP</codeName>
          </serverInstanceOperation>
          <serverInstanceStatusName>init</serverInstanceStatusName>
          <createDate>2018-11-27T17:42:13+0900</createDate>
          <uptime>2018-11-27T17:42:13+0900</uptime>
          <serverImageProductCode>SPSW0LINUX000032</serverImageProductCode>
          <serverProductCode>SPSVRSTAND000004</serverProductCode>
          <isProtectServerTermination>false</isProtectServerTermination>
          <portForwardingPublicIp>106.10.51.90</portForwardingPublicIp>
          <zone>
            <zoneNo>3</zoneNo>
            <zoneName>KR-2</zoneName>
            <zoneCode>KR-2</zoneCode>
            <zoneDescription>坪村ゾーン</zoneDescription>
            <regionNo>1</regionNo>
          </zone>
          <region>
            <regionNo>1</regionNo>
            <regionCode>KR</regionCode>
            <regionName>Korea</regionName>
          </region>
          <baseBlockStorageDiskType>
            <code>NET</code>
            <codeName>Network Storage</codeName>
          </baseBlockStorageDiskType>
          <baseBlockStorageDiskDetailType>
            <code>HDD</code>
            <codeName>HDD</codeName>
          </baseBlockStorageDiskDetailType>
          <serverInstanceType>
            <code>STAND</code>
            <codeName>Standard</codeName>
          </serverInstanceType>
          <userData></userData>
          <initScriptNo></initScriptNo>
          <accessControlGroupList/>
          <instanceTagList/>
        </serverInstance>
      </serverInstanceList>
    </createServerInstancesResponse>
    

    エラーコード

    以下のエラーコードは、このアクション(Action)で発生する特徴的なエラーです。共通して発生するエラーについての詳細説明は、NAVERクラウドプラットフォームAPIをご参照ください。

    HTTP Response Codeリターンコードリターンメッセージ
    40010300Instance name is already in use. please use other name.
    40010702You are not allowed to create server of spec with selected image.
    40010706The starting number or the number of servers cannot be entered because the combination makes more than 3 digits.
    40010707More than 20 servers are unable to be created at a time.
    40010710Not found login key.
    40010711Invalid fee system.
    40010712Not found product.Please check your input product.
    40010714Paid license software products can be purchased for a fee only server.
    40010715MSSQL software product not be able to create a contract of hourly rate.
    40010716Cannot create VDS(Virtual Dedicated Server) with specific price plan.
    40010721Can not use global internet line.Please contract customer service center.
    40010722This type of product is not available on the global internet line.
    40010724The server image contains additional storage so you can't create a server.Additional storage is not available for Micro Server.
    40010800This name is already in use.
    40023003Since entire return of previous server has yet to be completed, new server cannot be created.Please try again after completing returning process.
    40023006You cannot request for server return and creation at the same time.Please make one request at a time.
    40024110The input parameter server image number is invalid.
    40024111The input parameter zone number is invalid.
    40024124The input parameter ACG configuration number is invalid.
    40024300The length constraints of the parameter description (memo) were violated.The minimum length is 0 byte, the maximum, 1,000 bytes.
    40024301The length constraints of the parameter userData were violated.The minimum length is 0 byte, the maximum, 21,847 bytes.
    40024302UserData is not base64-encoded.
    40025038Currently the server image is not existing normally.
    40025040Unable to create server since server image is being manipulated or the server is being created from.

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

    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.