Available in VPC
Get the list of subnets available to use in Cloud DB for PostgreSQL.
Commands
The command statement is as follows:
ncloud vpostgresql getCloudPostgresqlTargetSubnetList [regionCode] [vpcNo] [cloudPostgresqlImageProductCode] [isPublic] [output]
Parameter
The following describes the parameters.
Parameter | Type | Required | Description | Restrictions |
---|---|---|---|---|
regionCode | String | N | Region code - regionCode can be obtained through the getRegionList action. - Default: Select the first Region of the getRegionList search result. |
- |
vpcNo | String | Y | VPC number - vpcNo can be obtained through the getCloudPostgresqlTargetVpcList action. |
- |
cloudPostgresqlImageProductCode | String | Y | Cloud DB for PostgreSQL image product code - cloudPostgresqlImageProductCode can be obtained through productCode of the getCloudPostgresqlImageProductList action. |
- |
isPublic | Boolean | N | Public subnet search status | - |
output | String | N | Format type of the response result - Options: xml | json - Default: json |
- |
Response
Response data type
- TargetSubnetList type
TargetSubnetList extends CommonResponse | Description |
---|---|
private Integer totalRows; | Total number of lists searched |
private List<TargetSubnet> targetSubnetList = new ArrayList<>(); | Subnet list |
- TargetSubnet type
TargetSubnet | Description |
---|---|
private String subnetNo; | Subnet number |
private String subnetName; | Subnet name |
private String vpcNo; | VPC number |
private String vpcName; | VPC name |
private String zoneCode; | Zone code |
private String subnet; | IP address range |
private Boolean isPublic; | Public subnet status |
private Date createdDate; | Issuance date |
Examples
It describes call and response examples.
Call examples
The following is a call example.
ncloud vpostgresql getCloudPostgresqlTargetSubnetList --regionCode KR --vpcNo 25**** --cloudPostgresqlImageProductCode SW.VPGSL.OS.LNX64.CNTOS.0708.PGSQL.133.B050
Response example
The response example is as follows:
When the response result format type (output) is JSON
{
"getCloudPostgresqlTargetSubnetListResponse": {
"requestId": "415050c7-bda1-43b6-9af1-f5ade127ad82",
"returnCode": 0,
"returnMessage": "success",
"totalRows": 2,
"targetSubnetList": [
{
"subnetNo": "37****",
"subnetName": "test-****-private-kr1",
"vpcNo": "25****",
"vpcName": "test-****",
"zoneCode": "KR-1",
"subnet": "192.168.0.0/24",
"isPublic": false,
"createdDate": "2022-03-24T18:00:00+0900"
},
{
"subnetNo": "37****",
"subnetName": "test-****-public-kr1",
"vpcNo": "25****",
"vpcName": "test-****",
"zoneCode": "KR-1",
"subnet": "192.168.1.0/24",
"isPublic": true,
"createdDate": "2022-03-24T18:00:00+0900"
}
]
}
}
When the response result format type (output) is XML
<getCloudPostgresqlTargetSubnetListResponse>
<requestId>415050c7-bda1-43b6-9af1-f5ade127ad82</requestId>
<returnCode>0</returnCode>
<returnMessage>success</returnMessage>
<totalRows>2</totalRows>
<targetSubnetList>
<targetSubnet>
<subnetNo>37****</subnetNo>
<subnetName>test-****-private-kr1</subnetName>
<vpcNo>25****</vpcNo>
<vpcName>test-****</vpcName>
<zoneCode>KR-1</zoneCode>
<subnet>192.168.0.0/24</subnet>
<isPublic>false</isPublic>
<createdDate>2022-03-24T18:00:00+0900</createdDate>
</targetSubnet>
<targetSubnet>
<subnetNo>37****</subnetNo>
<subnetName>test-****-public-kr1</subnetName>
<vpcNo>25****</vpcNo>
<vpcName>test-****</vpcName>
<zoneCode>KR-1</zoneCode>
<subnet>192.168.1.0/24</subnet>
<isPublic>true</isPublic>
<createdDate>2022-03-24T18:00:00+0900</createdDate>
</targetSubnet>
</targetSubnetList>
</getCloudPostgresqlTargetSubnetListResponse>