Available in VPC
Get the list of Cloud DB for PostgreSQL instances.
Syntax
The getCloudPostgresqlInstanceList syntax is as follows:
./ncloud vpostgresql getCloudPostgresqlInstanceList \
[--zoneCode <zone-code>] \
[--vpcNo <vpc-no>] \
[--subnetNo <subnet-no>] \
[--cloudPostgresqlServiceName <service-name>] \
[--cloudPostgresqlInstanceNoList <instance-no-list>] \
[--cloudPostgresqlServerName <server-name>] \
[--cloudPostgresqlServerInstanceNoList <server-instance-no-list>] \
[--pageNo <page-no>] \
[--pageSize <page-size>] \
[--regionCode <KR|SGN|JPN>] \
[--output <json|xml>]
Options
This section describes the options available when running getCloudPostgresqlInstanceList.
Required options
The following options are required for getCloudPostgresqlInstanceList.
| Options | Type | Required | Description |
|---|---|---|---|
--pageSize |
Integer | Conditional | Number of items per page
|
Optional options
These are the optional options for getCloudPostgresqlInstanceList. Options that are not specified will use their default values.
| Options | Type | Required | Description |
|---|---|---|---|
--zoneCode |
String | Optional | Zone code
|
--vpcNo |
String | Optional | VPC number |
--subnetNo |
String | Optional | Subnet number |
--cloudPostgresqlServiceName |
String | Optional | Cloud DB for PostgreSQL service name |
--cloudPostgresqlInstanceNoList |
List | Optional | Cloud DB for PostgreSQL instance number list
|
--cloudPostgresqlServerName |
String | Optional | Cloud DB for PostgreSQL server name |
--cloudPostgresqlServerInstanceNoList |
List | Optional | Cloud DB for PostgreSQL server instance number list
|
--pageNo |
Integer | Optional | Page number
|
Common options
For information about the options common to all vpostgresql subcommands, see Cloud DB for PostgreSQL (VPC) options.
Examples
If the request to retrieve the list of Cloud DB for PostgreSQL instances is successful, the configuration information and status of each instance are returned.
Command
The command example is as follows:
./ncloud vpostgresql getCloudPostgresqlInstanceList \
--zoneCode KR-1 \
--vpcNo 12345678 \
--subnetNo 23456789 \
--cloudPostgresqlServiceName test-pgsql \
--cloudPostgresqlInstanceNoList 34567890 \
--cloudPostgresqlServerName testpg-001-98b4 \
--cloudPostgresqlServerInstanceNoList 34567891 \
--pageNo 0 \
--pageSize 10 \
--regionCode KR \
--output json
Output
The output example is as follows:
{
"getCloudPostgresqlInstanceListResponse": {
"totalRows": 1,
"cloudPostgresqlInstanceList": [
{
"cloudPostgresqlInstanceNo": "34567890",
"cloudPostgresqlServiceName": "test-pgsql",
"cloudPostgresqlInstanceStatusName": "running",
"cloudPostgresqlInstanceStatus": {
"code": "CREAT",
"codeName": "CLOUD DATABASE (VPC) Created status"
},
"cloudPostgresqlInstanceOperation": {
"code": "NULL",
"codeName": "CLOUD DATABASE(VPC) Null OP"
},
"isHa": true,
"isMultiZone": false,
"cloudPostgresqlConfigList": [],
"cloudPostgresqlServerInstanceList": [
{
"cloudPostgresqlServerInstanceNo": "34567891",
"cloudPostgresqlServerName": "testpg-001-98b4",
"cloudPostgresqlServerRole": {
"code": "M",
"codeName": "Primary"
},
"cloudPostgresqlServerInstanceStatusName": "running",
"cloudPostgresqlServerInstanceStatus": {
"code": "RUN",
"codeName": "CLOUD DATABASE (VPC) server Running status"
},
"cloudPostgresqlServerInstanceOperation": {
"code": "NOOP",
"codeName": "CLOUD DATABASE (VPC) server null OP"
},
"regionCode": "KR",
"zoneCode": "KR-1",
"vpcNo": "12345678",
"subnetNo": "23456789",
"dataStorageSize": 10737418240,
"cpuCount": 2,
"memorySize": 4294967296
},
{
"cloudPostgresqlServerInstanceNo": "34567892",
"cloudPostgresqlServerName": "testpg-002-98b5",
"cloudPostgresqlServerRole": {
"code": "H",
"codeName": "Secondary"
},
"cloudPostgresqlServerInstanceStatusName": "running",
"cloudPostgresqlServerInstanceStatus": {
"code": "RUN",
"codeName": "CLOUD DATABASE (VPC) server Running status"
},
"cloudPostgresqlServerInstanceOperation": {
"code": "NOOP",
"codeName": "CLOUD DATABASE (VPC) server null OP"
},
"regionCode": "KR",
"zoneCode": "KR-1",
"vpcNo": "12345678",
"subnetNo": "23456789",
"dataStorageSize": 10737418240,
"cpuCount": 2,
"memorySize": 4294967296
}
]
}
],
"requestId": "b2c3d4e5-f6a7-8901-bcde-f23456789012",
"returnCode": "0",
"returnMessage": "success"
}
}