Documentation Index

Fetch the complete documentation index at: https://cli-fin.ncloud-docs.com/llms.txt

Use this file to discover all available pages before exploring further.

getCloudPostgresqlTargetSubnetList

Prev Next

Cloud DB for PostgreSQL에서 사용할 수 있는 Subnet 목록을 조회합니다.

구문

getCloudPostgresqlTargetSubnetList 구문은 다음과 같습니다.

./ncloud vpostgresql getCloudPostgresqlTargetSubnetList \
    --vpcNo <vpc-no> \
    --cloudPostgresqlImageProductCode <image-product-code> \
    [--isPublic <true|false>] \
    [--regionCode <FKR>] \
    [--output <json|xml>]

옵션

getCloudPostgresqlTargetSubnetList 실행 시 지정할 수 있는 옵션을 설명합니다.

필수 옵션

getCloudPostgresqlTargetSubnetList의 필수 옵션입니다.

옵션 타입 필수 여부 설명
--vpcNo String Required VPC 번호
--cloudPostgresqlImageProductCode String Required Cloud DB for PostgreSQL 이미지 상품 코드

선택 옵션

getCloudPostgresqlTargetSubnetList의 선택 옵션입니다. 지정하지 않은 옵션에는 기본값이 적용됩니다.

옵션 타입 필수 여부 설명
--isPublic Boolean Optional Public Subnet 여부
  • true (기본값) | false
    • true: Public Subnet
    • false: Private Subnet

공통 옵션

vpostgresql 명령에서 공통으로 사용하는 옵션에 대한 정보는 Cloud DB for PostgreSQL 옵션을 참조해 주십시오.

예시

Cloud DB for PostgreSQL Subnet 목록 조회 요청이 성공하면 각 Subnet의 번호와 이름, IP 대역 정보가 반환됩니다.

명령

명령 예시는 다음과 같습니다.

./ncloud vpostgresql getCloudPostgresqlTargetSubnetList \
    --vpcNo 12345678 \
    --cloudPostgresqlImageProductCode SW.VPGSL.OS.LNX64.ROCKY.0810.PGSQL.B050 \
    --isPublic false \
    --regionCode FKR \
    --output json

출력

출력 예시는 다음과 같습니다.

{
  "getCloudPostgresqlTargetSubnetListResponse": {
    "totalRows": 2,
    "targetSubnetList": [
      {
        "subnetNo": "23456789",
        "subnetName": "sub-vpc01-priv-01",
        "vpcNo": "12345678",
        "vpcName": "vpc01",
        "zoneCode": "FKR-1",
        "subnet": "192.168.4.0/24",
        "isPublic": false,
        "createdDate": "2026-05-21T13:40:03+0900"
      },
      {
        "subnetNo": "23456780",
        "subnetName": "sub-vpc01-pub01",
        "vpcNo": "12345678",
        "vpcName": "vpc01",
        "zoneCode": "FKR-1",
        "subnet": "192.168.1.0/24",
        "isPublic": true,
        "createdDate": "2025-05-09T09:11:16+0900"
      }
    ],
    "requestId": "a91ff2c5-840b-44f6-9d83-d60099e0f283",
    "returnCode": "0",
    "returnMessage": "success"
  }
}