createServerInstances
    • PDF

    createServerInstances

    • PDF

    Article summary

    Can be used in a Classic environment.

    Overview

    Create server instances (VM).

    Request

    Request parameter

    Parameter nameRequirement statusTypeRestrictionsDescription
    serverImageProductCodeConditionalStringMin:1, Max:20- Server image product code to determine the server image to create
    Either one of two parameters, server image product code (serverImageProductCode) or member server image number (memberServerImageNo), is required.
    You can obtain serverImageProductCode through the getServerImageProductList action.
    serverProductCodeNoStringMin:1, Max:20- Server specification product code to determine the specifications of the server to create
    You can obtain serverProductCode through the getServerProductList action.
    Default: Selected as the minimum specifications. The minimum specifications are determined in the order of memory (1), CPU (2), default block storage size (3) and disk type (NET, LOCAL) (4).
    memberServerImageNoConditionalString- Member server image number
    Required value when creating a server from a manually created server image
    Either one of two parameters, server image product code (serverImageProductCode) or member server image number (memberServerImageNo), is required.
    You can obtain memberServerImageNo through the getMemberServerImageList action.
    serverNameNoStringMin:3, Max:30- Name of the server to create
    Default: NAVER Cloud Platform automatically grants it.
    serverDescriptionNoStringMin:1, Max:1000Description about the server to create
    loginKeyNameNoStringMin:3, Max:30- Name of the login key to encrypt with the public key
    Default: The name of the most recently created login key is used.
    isProtectServerTerminationNoBoolean- Termination protection status
    It sets termination protection status when creating.
    Options : true | false
    Default : false
    serverCreateCountNoIntegerMin:1, Max:20- Number of servers to create
    Number of servers to create at a time, it can be up to 20
    Default : 1
    serverCreateStartNoNoInteger- Server creation starting number
    Serial numbers are given to the server names when creating multiple servers at a time. It sets the starting number of the serial number.
    The sum of the number of servers created and the server creation starting number cannot exceed 1000.
    Default: It starts with 001 if serverCreateCount is greater than 1 and the corresponding parameter value doesn't exist.
    feeSystemTypeCodeNoStringMin:1, Max:5- Pricing type code
    There are hourly pricing plan (MTRAT) and flat fee plan (FXSUM).
    Options : MTRAT | FXSUM
    default : MTRAT
    zoneNoNoString- It determines the zone where the server will be created.
    You can obtain zoneNo through the getZoneList action.
    Default: It is allocated by NAVER Cloud Platform.
    accessControlGroupConfigurationNoList.NNoStringMin:0, Max:5- ACG configuration number list
    It sets the access control group created by the user when creating.
    You can obtain accessControlGroupConfigurationNo through the getAccessControlGroupList action.
    Default : default ACG
    ex) accessControlGroupConfigurationNoList.1=39995
    userDataNoStringMin:1, Max:21847- User data
    It sets the data script to be run when the server is booted for the first time.
    userData receives script strings as parameters.
    The userData value is returned only when searching specific instances through the getServerInstanceList action.
    base64 encoding and URL encoding are required before entering the userData value.
    The signature invalid error occurs if the base64-encoded result is not URL-encoded.
    If two parameters, i.e., user data (userData) and initialization script number (initScriptNo), are sent together, only the initialization script will be run.
    initScriptNoNoString- Initialization script number
    When the server is booted for the first time, the initialization script set by the user is run.
    Initialization script number of the initialization script is passed as a parameter.
    If two parameters, i.e., user data (userData) and initialization script number (initScriptNo), are sent together, only the initialization script will be run.
    You can obtain initScriptNo through the getInitScriptList action.
    raidTypeNameConditionalString- RAID type name
    The raidTypeName value must be entered to create bare metal server
    You can obtain raidTypeName through the getRaidList action.
    instanceTagList.N.tagKeyNoString- It sets tag key of the instance to create.
    instanceTagList.1.tagKey=sugar
    instanceTagList.N.tagValueNoString- The tag value of the instance to create
    instanceTagList.1.tagValue=salt
    isVaccineInstallNoBoolean- Anti-virus installation status can be set.
    Only for bare metal Windows Server
    The default value is true.
    blockDevicePartitionList.N.mountPointNoStringEnter a mount point that starts with the "/" (root) path.
    The first mount must be a "/" (root) partition.
    Only lowercase English letters and numbers are allowed for names under "/" (root), and must start with a lowercase English letter.
    Certain keywords such as /root, /bin, and /dev cannot be used, depending on the OS type.
    - Mount point
    It designates partitions when creating bare metal servers.
    Partitions may not be supported, depending on the server specifications.
    blockDevicePartitionList.N.partitionSizeNoStringMin : 50 GiB- Partition size
    It determines partition size of the mount point
    The sum of the partition sizes can't exceed the total capacity of the server specifications.
    The last partition's size is automatically allocated as the capacity remaining.

    Response

    Response body

    Examples

    Request examples

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

    Response examples

    <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>Pyeongchon zone</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>
    

    Error codes

    Errors that may occur while using this action are listed below. For more information about common errors, please refer to NAVER Cloud Platform API.

    HTTP Response CodeReturn codeReturn message
    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.

    Was this article helpful?

    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.