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

Prev Next

VPC 환경에서 이용 가능합니다.

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

구문

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

./ncloud vpostgresql getCloudPostgresqlTargetSubnetList \
    --vpcNo <vpc-no> \
    --cloudPostgresqlImageProductCode <image-product-code> \
    [--isPublic <true|false>] \
    [--regionCode <KR|SGN|JPN>] \
    [--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 (VPC) 옵션을 참조해 주십시오.

예시

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"
  }
}