createServerInstances
- Print
- PDF
createServerInstances
- Print
- PDF
Article summary
Did you find this summary helpful?
Thank you for your feedback
Can be used in a Classic environment.
Overview
Creates a server instance.
Description
Creates a server instance (VM).
Request parameter
Parameter name | Requirement status | Type | Restrictions | Description |
---|---|---|---|---|
serverImageProductCode | Conditional | String | Min: 1, Max: 20 | - Server image product code that determines the server image to be created It can be obtained through the getServerImageProductList action. Either the server image product code (serverImageProductCode) or member server image number (memberServerImageNo) parameter must be entered. |
serverProductCode | No | String | Min: 1, Max: 20 | - Server product code to determine the specifications of the server to be created It 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, LOCAL). |
memberServerImageNo | Conditional | String | - Required value when creating a server from a manually created server image It can be obtained through the getMemberServerImageList action. | |
serverName | No | String | Min: 3, Max: 30 | - Name of the server to be created Default: assigned by Ncloud |
serverDescription | No | String | Min: 1, Max: 1000 | Description of the server to be created |
loginKeyName | No | String | Min: 3, Max: 30 | - Name of the login key to be encrypted with the public key Default: Uses the name of the most recently created login key. |
isProtectServerTermination | No | Boolean | The termination protection status can be set when creating a server. Default: false | |
serverCreateCount | No | Integer | Min: 1, Max: 20 | - Number of servers to be created at once More than 20 servers can't be created at once Default: 1 |
serverCreateStartNo | No | Integer | When creating multiple servers at once, serial numbers are attached to the server names. You can set the starting number of the serial number. The sum of created servers and server creation start number can't exceed 1000. Default: When the number of created servers (serverCreateCount) is greater than 1, and if this parameter value does not exist, then it starts from 001. | |
feeSystemTypeCode | No | String | Min: 1, Max: 5 | - Pricing plan type code You can choose between hourly pricing plan (MTRAT) and flat rate plan (FXSUM). Default: hourly pricing plan (MTRAT) |
zoneNo | No | String | You can determine the zone in which the server is created. You can obtain it through the getZoneList action Default: assigned by NAVER Cloud Platform | |
accessControlGroupConfigurationNoList | No | List | Min: 0, Max: 5 | The ACG created by the user can be configured when creating The ACG configuration number can be obtained through the getAccessControlGroupList action. Default: default ACG number |
raidTypeName | Conditional | String | The raidTypeName value must be entered to create bare metal servers. You can obtain raidTypeName through the getRaidList action. | |
userData | No | String | Min: 1, Max: 21847 | - User data You can set 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. Other than running script strings directly, the file path where the script is saved can also be received as a parameter. E.g., file://directory1/directory2/*.sh E.g., https://{OBJECT_STORAGE_URL}/.sh |
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, 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. | |
instanceTagList.tagKey | No | String | Tag list (tag key) of the instance to create | |
instanceTagList.tagValue | No | String | Tag list (tag value) of the instance to create | |
isVaccineInstall | No | Boolean | Whether to install anti-virus can be configured (only for bare metal Windows Servers). Default: true | |
blockDevicePartitionList.N.mountPoint | No | String | Enters a mount point that starts with the "/" (root) path. The first mount point must be a "/" (root) partition. Only lowercase English letters and numbers are allowed for names under "/" (root), and they must start with a lowercase English letter. Certain keywords such as /root, /bin, and /dev can't be used, depending on the OS type. | - Mount point It can designate 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 Determines the 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 data type
- ServerInstanceList type
ServerInstanceList extends CommonResponse |
---|
private Integer totalRows; |
private List |
ServerInstance |
---|
private String serverInstanceNo; |
private String serverName; |
private String serverDescription; |
private Integer cpuCount; |
private Long memorySize; |
private Long baseBlockStorageSize; |
private CommonCode platformType; |
private String loginKeyName; |
private Boolean isFeeChargingMonitoring; |
private String publicIp; |
private String privateIp; |
private String serverImageName; |
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 portForwardingPublicIp; |
private Integer portForwardingExternalPort; |
private Integer portForwardingInternalPort; |
private Zone zone; |
private Region region; |
private CommonCode baseBlockStorageDiskType; |
private CommonCode baseBlockStorageDiskDetailType; |
private CommonCode serverInstanceType |
private String userData; |
private List |
private List |
private List |
Examples
Call
ncloud server createServerInstances --serverImageProductCode SPSW0LINUX000046 --serverProductCode SPSVRSTAND000003 --serverName ncloud-mktest
Response
{
"createServerInstancesResponse": {
"requestId": "2ea6a22a-5ad0-4848-acae-308c817b4789",
"returnCode": "0",
"returnMessage": "success",
"totalRows": 1,
"serverInstanceList": [
{
"serverInstanceNo": "397255",
"serverName": "ncloud-mktest",
"serverDescription": "",
"cpuCount": 1,
"memorySize": 2147483648,
"baseBlockStorageSize": 53687091200,
"platformType": {
"code": "LNX64",
"codeName": "Linux 64 Bit"
},
"loginKeyName": "ysw",
"isFeeChargingMonitoring": false,
"publicIp": "",
"privateIp": "10.113.245.112",
"serverImageName": "centos-7.3-64",
"serverInstanceStatus": {
"code": "INIT",
"codeName": "Server INIT State"
},
"serverInstanceOperation": {
"code": "NULL",
"codeName": "Server NULL OP"
},
"serverInstanceStatusName": "init",
"createDate": "2018-02-23T13:55:34+0900",
"uptime": "2018-02-23T13:55:34+0900",
"serverImageProductCode": "SPSW0LINUX000046",
"serverProductCode": "SPSVRSTAND000003",
"isProtectServerTermination": false,
"portForwardingPublicIp": "192.168.120.111",
"zone": {
"zoneNo": "2",
"zoneName": "KR-1",
"zoneCode": "KR-1",
"zoneDescription": "KR-1 zone",
"regionNo": "1"
},
"region": {
"regionNo": "1",
"regionCode": "KR",
"regionName": "Korea"
},
"baseBlockStorageDiskType": {
"code": "NET",
"codeName": "Network Storage"
},
"baseBlockStroageDiskDetailType": {
"code": "HDD",
"codeName": "HDD"
},
"serverInstanceType": {
"code": "STAND",
"codeName": "Standard"
},
"userData": "",
"initScriptNo": "",
"accessControlGroupList": []
}
]
}
}
<?xml version="1.0" encoding="UTF-8" ?>
<createServerInstancesResponse>
<requestId>2ea6a22a-5ad0-4848-acae-308c817b4789</requestId>
<returnCode>0</returnCode>
<returnMessage>success</returnMessage>
<totalRows>1</totalRows>
<serverInstanceList>
<serverInstanceNo>397255</serverInstanceNo>
<serverName>ncloud-mktest</serverName>
<serverDescription></serverDescription>
<cpuCount>1</cpuCount>
<memorySize>2147483648</memorySize>
<baseBlockStorageSize>53687091200</baseBlockStorageSize>
<platformType>
<code>LNX64</code>
<codeName>Linux 64 Bit</codeName>
</platformType>
<loginKeyName>ysw</loginKeyName>
<isFeeChargingMonitoring>false</isFeeChargingMonitoring>
<publicIp></publicIp>
<privateIp>10.113.245.112</privateIp>
<serverImageName>centos-7.3-64</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-02-23T13:55:34+0900</createDate>
<uptime>2018-02-23T13:55:34+0900</uptime>
<serverImageProductCode>SPSW0LINUX000046</serverImageProductCode>
<serverProductCode>SPSVRSTAND000003</serverProductCode>
<isProtectServerTermination>false</isProtectServerTermination>
<portForwardingPublicIp>192.168.120.111</portForwardingPublicIp>
<zone>
<zoneNo>2</zoneNo>
<zoneName>KR-1</zoneName>
<zoneCode>KR-1</zoneCode>
<zoneDescription>KR-1 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>
<baseBlockStroageDiskDetailType>
<code>HDD</code>
<codeName>HDD</codeName>
</baseBlockStroageDiskDetailType>
<serverInstanceType>
<code>STAND</code>
<codeName>Standard</codeName>
</serverInstanceType>
<userData></userData>
<initScriptNo></initScriptNo>
<accessControlGroupList/>
</serverInstanceList>
</createServerInstancesResponse>
Was this article helpful?