Available in VPC
Get the list of server specification codes provided by Server.
Syntax
The getServerProductList syntax is as follows:
./ncloud vserver getServerProductList \
--serverImageProductCode <server-product-code> | --memberServerImageInstanceNo <member-server-instance-no> \
[--zoneCode <zone-code>] \
[--productCode <product-code>] \
[--exclusionProductCode <exclusion-product-code>] \
[--generationCode <G1|G2>] \
[--regionCode <KR|SGN|JPN>] \
[--output <json|xml>]
Options
This section describes the options available when running getServerProductList.
Required options
The following options are required for getServerProductList.
| Options | Type | Required | Description |
|---|---|---|---|
--serverImageProductCode |
String | Conditional | Server image product code
|
--memberServerImageInstanceNo |
String | Conditional | My server image instance code
|
Optional options
These are the optional options for getServerProductList. Options that are not specified will use their default values.
| Options | Type | Required | Description |
|---|---|---|---|
--zoneCode |
String | Optional | Zone code
|
--productCode |
String | Optional | Server spec code to query |
--exclusionProductCode |
String | Optional | Server spec code to exclude |
--generationCode |
String | Optional | Generation code
|
Common options
For information about the options common to all vserver subcommands, see Server (VPC) options.
Examples
If the request to retrieve the server product list is successful, the identification information and specifications for each product are returned.
Command
The command example is as follows:
./ncloud vserver getServerProductList \
--serverImageProductCode SW.VSVR.OS.LNX64.ROCKY.0810.B050 \
--zoneCode KR-1 \
--productCode SVR.VSVR.STAND.C002.M008.NET.SSD.B050.G002 \
--exclusionProductCode SVR.VSVR.HICPU.C002.M004.NET.HDD.B050.G002 \
--generationCode G2 \
--regionCode KR \
--output json
Output
The output example is as follows:
{
"getServerProductListResponse": {
"totalRows": 1,
"productList": [
{
"productCode": "SVR.VSVR.STAND.C002.M008.NET.SSD.B050.G002",
"productName": "vCPU 2EA, Memory 8GB, [SSD]Disk 50GB",
"productType": {
"code": "STAND",
"codeName": "Standard"
},
"productDescription": "vCPU 2EA, Memory 8GB, [SSD]Disk 50GB",
"infraResourceType": {
"code": "VSVR",
"codeName": "Server (VPC)"
},
"cpuCount": 2,
"memorySize": 8589934592,
"baseBlockStorageSize": 53687091200,
"diskType": {
"code": "NET",
"codeName": "Network storage"
},
"generationCode": "G2"
}
],
"requestId": "e5f6a7b8-c9d0-1234-efab-567890123456",
"returnCode": "0",
"returnMessage": "success"
}
}