Overview
Create a server instance (VM).
Request
Request parameters
Parameter name | Required | Type | Restrictions | Description |
---|---|---|---|---|
serverImageProductCode | Conditional | String | Min: 1, Max: 20 | - Server image product code to determine the server image to create One of the two parameters, either serverImageProductCode or memberServerImageNo, is required. serverImageProductCodes can be obtained through the getServerImageProductList action. |
serverProductCode | No | String | Min: 1, Max: 20 | - Server specification product code to determine the specifications of the server to create serverProductCode can be obtained through the getServerProductList action. Default: Select 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). |
memberServerImageNo | Conditional | String | - Member server image number Required value when creating a server from a manually created server image One of the two parameters, either serverImageProductCode or memberServerImageNo, is required. memberServerImageNo can be obtained through the getMemberServerImageList action. |
|
serverName | No | String | Min: 3, Max: 30 | - Name of the server to create Default: NAVER Cloud Platform automatically grants it. |
serverDescription | No | String | Min: 1, Max: 1000 | Description about the server to create |
loginKeyName | No | String | Min: 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. |
isProtectServerTermination | No | Boolean | - Termination protection status It sets termination protection status when creating. Options: true | false Default: false |
|
serverCreateCount | No | Integer | Min: 1, Max: 20 | - Number of servers to create Number of servers to create at a time; it can be up to 20. Default: 1 |
serverCreateStartNo | No | Integer | - 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: If the number of server creations (serverCreateCount) is greater than 1 and the corresponding parameter value is not available, it starts from 001. |
|
feeSystemTypeCode | No | String | Min: 1, Max: 5 | - Pricing type code There are hourly pricing plan (MTRAT) and flat fee plan (FXSUM). Options: MTRAT | FXSUM Default: MTRAT |
zoneNo | No | String | - It determines the zone where the server will be created. zoneNo can be obtained through the getZoneList action. Default: It is allocated by NAVER Cloud Platform. |
|
accessControlGroupConfigurationNoList.N | No | String | Min: 0, Max: 5 | - ACG configuration number list It sets the access control group created by the user when creating. accessControlGroupConfigurationNo can be obtained through the getAccessControlGroupList action. Default: default ACG e.g., accessControlGroupConfigurationNoList.1=39995 |
userData | No | String | Min: 1, Max: 21847 | - User data It sets the data script to be run when the server is booted for the first time. userData receives a script string as a parameter. The userData value is returned only when a specific instance is queried through the getServerInstanceList action. Base64 encoding and URL encoding are required before inserting the userData value. If the Base64-encoded result is not URL-encoded again, a signature invalid error occurs. If two parameters, user data (userData) and initialization script number (initScriptNo), are passed together, only the initialization script is executed. |
initScriptNo | No | String | - 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, user data (userData) and initialization script number (initScriptNo), are passed together, only the initialization script is executed. initScriptNo can be obtained through the getInitScriptList action. |
|
raidTypeName | Conditional | String | - RAID type name The raidTypeName value must be entered to create bare metal server raidTypeName can be obtained through the getRaidList action. |
|
instanceTagList.N.tagKey | No | String | - It sets tag key of the instance to create. instanceTagList.1.tagKey=sugar |
|
instanceTagList.N.tagValue | No | String | - The tag value of the instance to create instanceTagList.1.tagValue=salt |
|
isVaccineInstall | No | Boolean | - Anti-virus installation status can be set. Only for bare metal Windows Server The default value is true. |
|
blockDevicePartitionList.N.mountPoint | No | String | Enter 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. Depending on the OS type, certain keywords such as /root, /bin, and /dev may not be available. |
- Mount point It designates partitions when creating bare metal servers. Partitions may not be supported, depending on the server specifications. |
blockDevicePartitionList.N.partitionSize | No | String | Min: 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. |
responseFormatType | No | String | - Response result's format type Options: xml | json Default: xml |
Response
Response body
Examples
Request example
GET {SERVER_API_URL}/createServerInstances
?serverImageProductCode=SPSW0LINUX000032
&serverProductCode=SPSVRSTAND000004
Response example
<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>
Errors
Errors that may occur while using this action are listed below. For more information about common errors, see NAVER Cloud Platform API.
HTTP Response Code | Return code | Return message |
---|---|---|
400 | 10300 | Instance name is already in use. please use other name. |
400 | 10702 | You are not allowed to create server of spec with selected image. |
400 | 10706 | The starting number or the number of servers cannot be entered because the combination makes more than 3 digits. |
400 | 10707 | More than 20 servers are unable to be created at a time. |
400 | 10710 | Not found login key. |
400 | 10711 | Invalid fee system. |
400 | 10712 | Not found product. Please check your input product. |
400 | 10714 | Paid license software products can be purchased for a fee only server. |
400 | 10715 | MSSQL software product not be able to create a contract of hourly rate. |
400 | 10716 | Cannot create VDS(Virtual Dedicated Server) with specific price plan. |
400 | 10721 | Can not use global internet line. Please contract customer service center. |
400 | 10722 | This type of product is not available on the global internet line. |
400 | 10724 | The server image contains additional storage so you can't create a server. Additional storage is not available for Micro Server. |
400 | 10800 | This name is already in use. |
400 | 23003 | Since entire return of previous server has yet to be completed, new server cannot be created. Please try again after completing returning process. |
400 | 23006 | You cannot request for server return and creation at the same time. Please make one request at a time. |
400 | 24110 | The input parameter server image number is invalid. |
400 | 24111 | The input parameter zone number is invalid. |
400 | 24124 | The input parameter ACG configuration number is invalid. |
400 | 24300 | The length constraints of the parameter description (memo) were violated. The minimum length is 0 byte, the maximum, 1,000 bytes. |
400 | 24301 | The length constraints of the parameter userData were violated. The minimum length is 0 byte, the maximum, 21,847 bytes. |
400 | 24302 | UserData is not base64-encoded. |
400 | 25038 | Currently the server image is not existing normally. |
400 | 25040 | Unable to create server since server image is being manipulated or the server is being created from. |