--- title: "getCloudPostgresqlTargetSubnetList" slug: "cli-vpostgresql-getcloudpostgresqltargetsubnetlist" updated: 2026-09-17T10:11:08Z published: 2026-09-17T10:11:08Z canonical: "cli.ncloud-docs.com/cli-vpostgresql-getcloudpostgresqltargetsubnetlist" --- > ## Documentation Index > Fetch the complete documentation index at: https://cli.ncloud-docs.com/llms.txt > Use this file to discover all available pages before exploring further. # getCloudPostgresqlTargetSubnetList VPC環境で利用できます。 Cloud DB for PostgreSQLで使用可能な Subnetリストを照会します。 ## 構文 `getCloudPostgresqlTargetSubnetList`構文は次の通りです。 ``` ./ncloud vpostgresql getCloudPostgresqlTargetSubnetList \ --vpcNo \ --cloudPostgresqlImageProductCode \ [--isPublic ] \ [--regionCode ] \ [--output ] ``` ## オプション `getCloudPostgresqlTargetSubnetList`の実行時に指定できるオプションについて説明します。 ### 必須オプション `getCloudPostgresqlTargetSubnetList`の必須オプションです。 | オプション | タイプ | 必須の有無 | 説明 | | --- | --- | --- | --- | | `--vpcNo` | String | Required | VPC番号 - [getCloudPostgresqlTargetVpcList](/docs/ja/cli-vpostgresql-getcloudpostgresqltargetvpclist)を参照 | | `--cloudPostgresqlImageProductCode` | String | Required | Cloud DB for PostgreSQLイメージ商品コード - [getCloudPostgresqlImageProductList](/docs/ja/cli-vpostgresql-getcloudpostgresqlimageproductlist)を参照 | ### 任意オプション `getCloudPostgresqlTargetSubnetList`の任意オプションです。指定しない場合、オプションにはデフォルト値が適用されます。 | オプション | タイプ | 必須の有無 | 説明 | | --- | --- | --- | --- | | `--isPublic` | Boolean | Optional | Public Subnetかどうか - `true` \| `false` - `true`: Public Subnet - `false`: Private Subnet | ### 共通オプション `vpostgresql`コマンドで共通して使用するオプションについては、[Cloud DB for PostgreSQL (VPC)のオプション](/docs/ja/cli-vpostgresql#%EC%98%B5%EC%85%98)を参照してください。 ## 例 Cloud DB for PostgreSQL Subnetリストの照会リクエストが成功すると、各 Subnetの番号と名前、IPアドレス範囲情報が返されます。 ### コマンド コマンドの例は次の通りです。 ``` ./ncloud vpostgresql getCloudPostgresqlTargetSubnetList \ --vpcNo 12345678 \ --cloudPostgresqlImageProductCode SW.VPGSL.OS.LNX64.ROCKY.0810.PGSQL.B050 \ --isPublic false \ --regionCode KR \ --output json ``` ### 出力 出力の例は次の通りです。 ``` { "getCloudPostgresqlTargetSubnetListResponse": { "totalRows": 1, "targetSubnetList": [ { "subnetNo": "23456789", "subnetName": "private-subnet", "vpcNo": "12345678", "vpcName": "vpc-01", "zoneCode": "KR-1", "subnet": "10.0.0.0/24", "isPublic": false, "createdDate": "2026-04-28T13:00:34+0900" } ], "requestId": "d4e5f6a7-b8c9-0123-defa-456789012345", "returnCode": "0", "returnMessage": "success" } } ```