createServerInstances

Prev Next

Available in VPC

Overview

Creates server instances (VM).

Requests

Request parameters

Parameter name Requirement status Type Restrictions Description
regionCode No String - Region code
Decides the Region in which the server instance will be created
regionCode can be obtained through the getRegionList action
Default: select the first Region shown in the getRegionList search results
memberServerImageInstanceNo Conditional String - Member server image instance number
Entered when creating a server from a manually created server image
Between the member server image instance number (memberServerImageInstanceNo) and the server image product code (serverImageProductCode), 1 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
Between the memberServerImageInstanceNo and serverImageProductCode, 1 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
You cannot use it with the member server image instance number (memberServerImageInstanceNo) and the server image product code (serverImageProductCode) at the same time
serverImageNo can be obtained through the getServerImageList action
vpcNo Yes String - VPC number
Sets the VPC in which the server instance will be created
vpcNo can be obtained through the getVpcList action
subnetNo Yes String - Subnet number
Determines 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
Decides 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. memory, 2. CPU, 3. default block storage size, and 4. disk type (NET)
serverSpecCode Conditional String - Server product code
Decides the specifications of the server to be created
serverProductCode can be obtained through the getServerProductList action
serverProductCode and serverSpecCode cannot be used at the same time.
Default: selects the minimum specifications. The minimum specifications are determined in the following order:
1. memory, 2. CPU, 3. default block storage size, and 4. disk type (NET)
isEncryptedBaseBlockStorageVolume No Boolean - Enable/disable base block storage volume encryption
Base block storage encryption is available for RHV server image products
Options : true | false
Default : false
feeSystemTypeCode No String - Pricing plan code
Sets the pricing plan of the server to be created
Options: MTRAT (hourly pricing plan/pay-as-you-go plan) | FXSUM (monthly pricing plan/flat sum plan)
Default : MTRAT
serverCreateCount No Integer Min: 1, Max: 10 - Number of servers to be created
Decides 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 identifier number
If the number of servers to create is greater than 1, a serial number is attached to the server name
In such cases, the starting serial number can be set
Default : 1
serverName No String Min : 3, Max : 30
Only lowercase English letters, numbers, and "-" are allowed. It must start with a letter
It must end with an English letter or number
- Server name
Default: automatically granted by the NAVER Cloud Platform
networkInterfaceList.N.networkInterfaceOrder Yes Integer Min : 0, Max : 2 - Network interface order
Sets the order of network interfaces to be assigned to the server to be created
Device names are assigned in the order specified (eth0, eth1, etc.)
At least 1 primary network interface is required
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
Determines 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
When creating a new network interface, the IP address to be assigned can be entered directly
It must be within the IP address range of the subnet where the network interface will be created
The 0 to 5th and 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 ACG numbers to be applied to a network interface
Sets which ACG must be applied when creating a new network interface
Up to 3 ACGs can be applied
accessControlGroupNo can be obtained through the getAccessControlGroupList action
placementGroupNo No String - Physical placement group number
Sets the physical placement group to which the server instance is assigned
placementGroupNo can be obtained through the getPlacementGroupList action
isProtectServerTermination No Boolean - Server termination protection status
Enable/disable termination protection when creating a server to prevent accidental termination
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 boots for the first time, user-designated initialization script can be executed
initScriptNo can be obtained through the getInitScriptList action
loginKeyName No String - Login key name
Sets key for encrypting/decrypting the password when connecting to a server instance
loginKeyName can be obtained through the getLoginKeyList action
Default: uses the name of the most recently created login key
associateWithPublicIp No Boolean - Whether a public IP is assigned when creating a server
When you create a server, a new public IP can be created and assigned to the server
Assignable only when the subnet type is public, and valid only when the number of servers created is 1
The assignment will be completed normally when the server is in "Operating" status after server creation
Since a fee is levied against a server while in possession of a public IP, terminating when not used is best
Options : true | false
Default : false
raidTypeName Conditional String - RAID type
raidTypeName is required when creating a Bare Metal server
raidTypeName can be obtained through the getRaidList action
blockDevicePartitionList.N.mountPoint No String Enter mount point path starting with "/" (root)
First mount point must be a "/" (root) partition
Only lowercase alphanumeric characters and numbers are allowed below "/" (root) for folder/file names, and names must begin with a lowercase letter
Certain names such as /root, /bin, and /dev are prohibited depending on the OS type
- Mount point
Designates partitions when creating a Bare Metal server.
Partitions may not be supported depending on the server specifications
blockDevicePartitionList.N.partitionSize No String Min : 50 GiB - Partition size
Sets the partition size of the mount point
The sum of partition sizes cannot exceed the total capacity of the server’s storage specifications
The size of the last partition is automatically allocated according to the remaining capacity
blockStorageMappingList.N.order No Integer Min : 20 GiB - Order of created storages
Choose the order of created storages.
Available only for KVM.
blockStorageMappingList.N.snapshotInstanceNo No String - Created storage snapshot number
When creating it from a snapshot.
Available only for KVM.
blockStorageMappingList.N.blockStorageSize No String - Created storage size
Choose the created storage size.
Available only for KVM.
blockStorageMappingList.N.blockStorageName No String - Created storage name
Choose the created storage name.
Available only for KVM.
blockStorageMappingList.N.blockStorageVolumeTypeCode No String - Created storage volume type code
Choose the created storage volume type.
Available only for KVM.
blockStorageMappingList.N.encrypted No String - Whether the created storage is encrypted
Choose whether the created storage is encrypted.
Available only for KVM.

Responses

Response data type

  • ServerInstanceList type
ServerInstanceList extends CommonResponse
private Integer totalRows;
private List<ServerInstance> serverInstanceList = new ArrayList<>();
ServerInstance
private String serverInstanceNo;
private String serverName;
private String serverDescription;
private Integer cpuCount;
private Long memorySize;
private CommonCode platformType;
private String loginKeyName;
private String publicIpInstanceNo;
private String publicIp;
private CommonCode serverInstanceStatus;
private CommonCode serverInstanceOperation;
private String serverInstanceStatusName;
private Date createDate;
private Date uptime;
private String serverImageProductCode;
private String serverProductCode;
private Boolean isProtectServerTermination;
private String zoneCode;
private String regionCode;
private String vpcNo;
private String subnetNo;
private NetworkInterfaceNoList networkInterfaceNoList;
private String initScriptNo;
private CommonCode serverInstanceType;
private CommonCode baseBlockStorageDiskType;
private CommonCode baseBlockStorageDiskDetailType;
private String placementGroupNo;
private String placementGroupName;
private String memberServerImageInstanceNo;
private List<BlockDevicePartition> blockDevicePartitionList;
BlockDevicePartition
private String mountPoint;
private String partitionSize;

Examples

Request examples

ncloud vserver 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 "networkInterfaceOrder='0', accessControlGroupNoList=['***63', '***64']" "networkInterfaceOrder='1', subnetNo='***43', accessControlGroupNoList=['***63', '***64']" --placementGroupNo ***61 --isProtectServerTermination false --initScriptNo ***44 --loginKeyName test-*** --associateWithPublicIp true

Response examples

<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>