createServerInstances

Prev Next

Available in VPC

Overview

Create a server instance (VM).

Request

To create a server instance (VM) of the XEN/RHV/KVM hypervisor type, use serverImageNo and serverSpecCode.
In addition, using serverImageProductCode and serverProductCode allows you to create only server instances (VMs) of the XEN/RHV hypervisor type.

Request parameters

Parameter name Required Type Restrictions Description
regionCode No String - Region code
Determine the Region in which the server instance will be created.
You can obtain regionCode through the getRegionList action.
Default: Select the first Region of the getRegionList search results.
memberServerImageInstanceNo Conditional String - Member server image instance number
Entered when creating a server from a manually created server image.
Either the member server image instance number (memberServerImageInstanceNo) or the server image product code (serverImageProductCode) must be entered.
memberServerImageInstanceNo can be obtained through the getMemberServerImageInstanceList action.
serverImageProductCode Conditional String - Server image product code
Entered when creating a server using a new server image.
Either the member server image instance number (memberServerImageInstanceNo) or the server image product code (serverImageProductCode) must be entered.
serverImageProductCode can be obtained through the getServerImageProductList action.
serverImageNo Conditional String - Server image number
Entered when creating a server using a new server image.
Member server image instance number (memberServerImageInstanceNo) and server image product code (serverImageProductCode) can't be used at the same time
serverImageNo can be obtained through the getServerImageList action.
vpcNo Yes String - VPC number
Determine the VPC where the server instance will be created.
You can obtain vpcNo through the getVpcList action.
subnetNo Yes String - Subnet number
Determine the subnet of default network interface in the server instance to be created.
subnetNo can be obtained through the getSubnetList action.
serverProductCode No String - Server product code
Determine the specifications of the server to be created.
serverProductCode can be obtained through the getServerProductList action.
Default: Selected as the minimum specifications The minimum specifications are determined in the following order:
1. determined in the order of memory (1), CPU (2), default block storage size (3), and disk type (NET) (4).
serverSpecCode Conditional String - Server specification code
Determine the specifications of the server to be created.
serverSpecCode can be obtained through the getServerSpecList action.
Available when using serverImageNo
Default: Selected as the minimum specifications The minimum specifications are determined in the following order:
1. determined in the order of memory (1), CPU (2), default block storage size (3), and disk type (NET) (4).
isEncryptedBaseBlockStorageVolume No Boolean - Encryption status of the default block storage volume
For RHV server image products, it decides the encryption status of the default block storage.
Options: true | false
Default: false
feeSystemTypeCode No String - Pricing plan type code
Determine the pricing plan of the server that you'll create.
Options: MTRAT (hourly plan/pay-as-you-go plan) | FXSUM (monthly plan/flat rate plan)
Default: MTRAT
serverCreateCount No Integer Min: 1, Max: 10 - Number of servers to be created
Determine the number of servers to be created.
Default: 1
serverCreateStartNo No Integer Min: 0, Max: 999
The sum of the number of servers to create and the server creation starting number can't exceed 1000.
- Server creation starting number
If the number of servers to create is greater than 1, a serial number is attached to the server name. In this case, you can decide the starting number of the serial number.
Default: 1
serverName No String Min: 3, Max: 30
Only lowercase English letters, numbers, and "-" are allowed, and it must start with an English letter.
It must end with an English letter or number.
- Server name
Default: NAVER Cloud Platform automatically grants it.
networkInterfaceList.N.networkInterfaceOrder Yes Integer Min: 0, Max: 2 - Network interface order
Determine the network interface order to be assigned to the created server.
The device name (eth0, eth1, etc.) is determined in the corresponding order.
There must be one default network interface.
Enter 0 to set it as the default network interface.
Up to 3 network interfaces can be assigned.
networkInterfaceList.N.networkInterfaceNo Conditional String - Network interface number
If you want to add a network interface that you have created yourself, enter the network interface number.
networkInterfaceNo can be obtained through the getNetworkInterfaceList action.
networkInterfaceList.N.subnetNo Conditional String - Subnet number of the network interface
Determine the subnet of the new network interface to be created or the subnet of the existing network interface to be added.
If it is the default network interface, it is automatically assigned.
subnetNo can be obtained through the getSubnetList action.
networkInterfaceList.N.ip No String - IP address of the network interface
You can manually enter the IP address to assign to the network interface when creating a new network interface.
It must be within the IP address range of the subnet where the network interface will be created.
The 0th to 5th and the last IP addresses of the subnet can't be used, and the duplicate IP address in the subnet range can't be used.
Default: The IP addresses that satisfy the conditions are assigned sequentially.
networkInterfaceList.N.accessControlGroupNoList.N Conditional List<String> - List of the ACG numbers to be applied to the network interface
Determine which ACG to apply when creating a new network interface.
Up to 3 ACGs can be applied.
accessControlGroupNo can be obtained through the getAccessControlGroupList action.
Example) accessControlGroupNoList.1=1234&accessControlGroupNoList.2=2345
placementGroupNo No String - Physical placement group number
Determine the physical placement group the server instance belongs to.
placementGroupNo can be obtained through the getPlacementGroupList action.
isProtectServerTermination No Boolean - Termination protection status
You can prevent accidental termination by setting the termination protection status when creating a server.
Options: true | false
Default: false
serverDescription No String Min: 0, Max: 1000 Bytes Description of the server to be created
initScriptNo No String - Initialization script number
When the server is booted for the first time, the initialization script set by the user can be run.
initScriptNo can be obtained through the getInitScriptList action.
loginKeyName No String - Login key name
Determine a key that encrypts and decrypts the password when accessing server instances.
loginKeyName can be obtained through the getLoginKeyList action.
Default: Use the name of the most recently created login key.
associateWithPublicIp No Boolean - Whether a public IP is assigned when creating a server
A new public IP can be created and assigned when creating a server.
It can only be assigned when the subnet type is public subnet, and is only valid when the number of servers to create is 1.
The assignment will be completed successfully when the server is created and in the "Running" status.
The public IP requested is charged while you own it. When it is not used, it is recommended to terminate it.
Options: true | false
Default: false
raidTypeName Conditional String - RAID type name
raidTypeName is required to create BareMetal servers.
raidTypeName can be obtained through the getRaidList action.
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.
blockStorageMappingList.N.order No Integer Min: 20 GiB - Created storage order
Determine the order of created storage.
Only KVM is available.
blockStorageMappingList.N.snapshotInstanceNo No String - Created storage snapshot number
When creating from a snapshot
Only KVM is available.
blockStorageMappingList.N.blockStorageSize No String - Created storage size
Determine the created storage size.
Only KVM is available.
blockStorageMappingList.N.blockStorageName No String - Created storage name
Determine the created storage name.
Only KVM is available.
blockStorageMappingList.N.blockStorageVolumeTypeCode No String - Created storage volume type code
Determine the created storage volume type.
Only KVM is available.
blockStorageMappingList.N.encrypted No String - Created storage encryption status
Determine the encryption status of created storage.
Only KVM is available.
fabricClusterPoolNo No String - Specify GPU Fabric cluster pool.
Only KVM GPU is available.
fabricClusterPoolNo can be obtained through the getFabricClusterPoolList action.
responseFormatType No String - Format type of the response result
Options: xml | json
Default: xml

Response

Response body

Examples

Request example

GET {API_URL}/createServerInstances
?regionCode=KR
&serverImageProductCode=SW.VSVR.OS.LNX64.CNTOS.0703.B050
&vpcNo=***04
&subnetNo=***43
&serverProductCode=SVR.VSVR.STAND.C002.M004.NET.SSD.B050.G001
&feeSystemTypeCode=MTRAT
&serverCreateCount=1
&serverName=test-***
&networkInterfaceList.1.networkInterfaceOrder=0
&networkInterfaceList.1.accessControlGroupNoList.1=***63
&placementGroupNo=***61
&isProtectServerTermination=false
&initScriptNo=***44
&loginKeyName=test-***
&associateWithPublicIp=true

Response example

<createServerInstancesResponse>
  <requestId>63a6fdb1-5430-417f-98a8-d20cacc83581</requestId>
  <returnCode>0</returnCode>
  <returnMessage>success</returnMessage>
  <totalRows>1</totalRows>
  <serverInstanceList>
    <serverInstance>
      <serverInstanceNo>***4299</serverInstanceNo>
      <serverName>test-***</serverName>
      <serverDescription></serverDescription>
      <cpuCount>2</cpuCount>
      <memorySize>4294967296</memorySize>
      <platformType>
        <code>LNX64</code>
        <codeName>Linux 64 Bit</codeName>
      </platformType>
      <loginKeyName>test-***</loginKeyName>
      <publicIpInstanceNo></publicIpInstanceNo>
      <publicIp></publicIp>
      <serverInstanceStatus>
        <code>INIT</code>
        <codeName>Server init state</codeName>
      </serverInstanceStatus>
      <serverInstanceOperation>
        <code>NULL</code>
        <codeName>Server NULL OP</codeName>
      </serverInstanceOperation>
      <serverInstanceStatusName>init</serverInstanceStatusName>
      <createDate>2020-08-24T09:41:23+0900</createDate>
      <uptime>2020-08-24T09:41:23+0900</uptime>
      <serverImageProductCode>SW.VSVR.OS.LNX64.CNTOS.0703.B050</serverImageProductCode>
      <serverProductCode>SVR.VSVR.STAND.C002.M004.NET.SSD.B050.G001</serverProductCode>
      <isProtectServerTermination>false</isProtectServerTermination>
      <zoneCode>KR-1</zoneCode>
      <regionCode>KR</regionCode>
      <vpcNo>***04</vpcNo>
      <subnetNo>***43</subnetNo>
      <networkInterfaceNoList>
        <networkInterfaceNo>***87</networkInterfaceNo>
      </networkInterfaceNoList>
      <initScriptNo>***44</initScriptNo>
      <serverInstanceType>
        <code>STAND</code>
        <codeName>Standard</codeName>
      </serverInstanceType>
      <baseBlockStorageDiskType>
        <code>NET</code>
        <codeName>Network Storage</codeName>
      </baseBlockStorageDiskType>
      <baseBlockStorageDiskDetailType>
        <code>SSD</code>
        <codeName>SSD</codeName>
      </baseBlockStorageDiskDetailType>
      <placementGroupNo>***61</placementGroupNo>
      <placementGroupName>test-***</placementGroupName>
    </serverInstance>
  </serverInstanceList>
</createServerInstancesResponse>