---
title: "createCloudPostgresqlInstance"
slug: "cli-vpostgresql-createcloudpostgresqlinstance"
tags: ["Cloud DB for PostgreSQL"]
updated: 2026-06-25T09:10:29Z
published: 2026-06-25T09:10:29Z
canonical: "cli-fin.ncloud-docs.com/cli-vpostgresql-createcloudpostgresqlinstance"
---
> ## 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.
# createCloudPostgresqlInstance
Cloud DB for PostgreSQL 인스턴스를 생성합니다.
## 명령어
명령어 구문은 다음과 같습니다.
```
ncloud vpostgresql createCloudPostgresqlInstance [regionCode] [vpcNo] [subnetNo] [secondarySubnetNo] [cloudPostgresqlImageProductCode] [cloudPostgresqlProductCode] [dataStorageTypeCode] [isHa] [isMultiZone] [isStorageEncryption] [isBackup] [backupFileRetentionPeriod] [backupTime] [isAutomaticBackup] [cloudPostgresqlServiceName] [cloudPostgresqlServerNamePrefix] [cloudPostgresqlUserName] [cloudPostgresqlUserPassword] [clientCidr] [cloudPostgresqlPort] [cloudPostgresqlDatabaseName] [output]
```
### 파라미터
파라미터에 대한 설명은 다음과 같습니다.
| 파라미터 | 타입 | 필수 여부 | 설명 | 제약 사항 |
| ------------------------------- | ------- | --------- | ------------------------------------------------------------ | ------------------------------------------------------------ |
| regionCode | String | N | 리전 코드
- regionCode는 [getRegionList](/docs/cli-vserver-server-common-getregionlist) 액션을 통해서 획득
- default: getRegionList 조회 결과의 첫 번째 리전을 선택 | - |
| vpcNo | String | Y | VPC 번호
- vpcNo는 [getCloudPostgresqlTargetVpcList](/docs/cli-vpostgresql-getcloudpostgresqltargetvpclist) 액션을 통해서 획득 | - |
| subnetNo | String | Y | Subnet 번호
- subnetNo는 [getCloudPostgresqlTargetSubnetList](/docs/cli-vpostgresql-getcloudpostgresqltargetsubnetlist) 액션을 통해서 획득
- Public 도메인은 Public Subnet에 생성된 DB 서버에서만 이용 신청 가능
- Cloud DB for PostgreSQL 인스턴스 생성 이후에 Subnet 이전은 불가 | - |
| secondarySubnetNo | String | N | Secondary 서버의 Subnet 번호
- 멀티존 여부(isMultiZone)가 false이면 입력 받지 않으며 멀티존 여부(isMultiZone)가 true이면 반드시 입력
- Primary 서버의 Subnet과 Zone이 달라야 하며 같은 Public이거나 Private이어야만 함
- secondarySubnetNo는 [getCloudPostgresqlTargetSubnetList](/docs/cli-vpostgresql-getcloudpostgresqltargetsubnetlist) 액션을 통해서 획득 | - |
| cloudPostgresqlImageProductCode | String | N | Cloud DB for PostgreSQL 이미지 상품 코드
- cloudPostgresqlImageProductCode는 [getCloudPostgresqlImageProductList](/docs/cli-vpostgresql-getcloudpostgresqlimageproductlist) 액션의 productCode로 획득
- 입력하지 않을 경우 Default값으로 생성 | - |
| cloudPostgresqlProductCode | String | N | Cloud DB for PostgreSQL 상품 코드
- 생성할 Cloud DB for PostgreSQL 인스턴스의 서버 스펙 결정
- cloudPostgresqlProductCode는 [getCloudPostgresqlProductList](/docs/cli-vpostgresql-getcloudpostgresqlproductlist) 액션의 productCode로 획득
- default: 최소 사양으로 선택. 최소 사양의 기준은 1. 메모리 2. CPU | - |
| dataStorageTypeCode | String | N | 데이터 스토리지 타입 코드
- 설치 이후에 데이터 스토리지 타입 변경은 불가
- options: SSD \| HDD
- default: SSD | - |
| isHa | Boolean | N | 고가용성 여부
- 고가용성을 선택하면 Secondary 서버를 포함한 2대의 서버로 생성되며 추가 요금이 발생
- 고가용성 여부(isHa)가 false이면 isMultiZone, secondarySubnetNo 파라미터는 사용 불가
- default: true | - |
| isMultiZone | Boolean | N | 멀티존 여부
- 고가용성 여부(isHa)가 true일 경우, 멀티존 여부 선택 가능
- 멀티존을 선택하면 Primary 서버와 Secondary 서버를 서로 다른 Zone에 생성하여 더욱 높은 가용성 제공
- 고가용성 여부(isHa)가 true일 경우 반드시 입력
- Neurocloud 환경에서는 이용 불가
- default: false | - |
| isStorageEncryption | Boolean | N | 데이터 스토리지 암호화 적용 여부
- 암호화 적용 시 DB 데이터는 암호화 되어 스토리지에 저장
- Cloud DB for PostgreSQL 인스턴스 생성 이후에는 스토리지 암호화 설정 변경 불가
- Neurocloud 환경에서는 이용 불가
- default: false | - |
| isBackup | Boolean | N | 백업 여부
- 고가용성 여부(isHa)가 true일 경우 백업 여부(isBackup)는 true로 고정
- default: true | - |
| backupFileRetentionPeriod | Integer | N | 백업 파일 보관 기간
- 백업은 매일 수행되며, 백업 파일은 별도의 백업 스토리지에 저장
- 요금은 사용하는 공간만큼 과금
- default: 1(1일) | - |
| backupTime | String | N | 백업 시간
- 백업이 수행되는 시간 설정. 백업 여부(isBackup)가 true이고, 자동 백업 여부(isAutomaticBackup)가 false이면 반드시 입력
- 01:15 | - |
| backupFileStorageCount | Integer | N | 백업 파일 보관 개수
- 백업 파일 보관 개수 범위는 1~30 | - |
| isBackupFileCompression | Boolean | N | 백업 파일 압축 여부
- default: true | - |
| isAutomaticBackup | Boolean | N | 백업 시간 자동 여부
- 자동으로 백업 시간 설정 여부 선택, 자동 백업 여부(isAutomaticBackup)가 true이면 backupTime 입력 불가
- default: true | - |
| cloudPostgresqlServiceName | String | Y | Cloud DB for PostgreSQL 서비스 이름 | - 영어, 숫자, 하이픈(-), 한글만 입력 가능
- Min: 3
- Max: 30 |
| cloudPostgresqlServerNamePrefix | String | Y | Cloud DB for PostgreSQL 서버 이름 접두사
- 호스트명 중복 방지를 위해 전달된 cloudPostgresqlServerNamePrefix 값 뒤에 임의의 text가 추가로 포함되어 생성 | - DB Server 이름은 영어 소문자, 숫자, 하이픈(-)으로만 구성
- 첫글자는 영문자, 마지막 글자는 영문자 또는 숫자
- Min: 3
- Max: 20 |
| cloudPostgresqlUserName | String | Y | 관리자 ID
- DB 관리자 용도로 사용할 유저명 입력 | - 영어 소문자, 숫자, 밑줄 문자( _ )만 허용하며 영어로 시작
- Min: 4
- Max: 16 |
| cloudPostgresqlUserPassword | String | Y | 관리자 패스워드
- DB 관리자 용도로 사용할 유저의 패스워드 입력 | - 8자 이상, 영어/특수문자/숫자 3개 항목에 대해 1자 이상 포함
- \` & + \ " ' / 스페이스는 패스워드로 사용 불가
- User ID 포함 불가
- Min: 8
- Max: 20 |
| clientCidr | String | Y | 접근 제어
- 접속하고자하는 Client의 CIDR 입력 | - 전체 접속 허용: 0.0.0.0/0
- 특정 IP 접속 허용: 192.168.1.1/32
- IP 대역 접속 허용: 192.168.1.0/24 |
| cloudPostgresqlPort | Integer | N | Cloud DB for PostgreSQL 포트
- PostgreSQL 접근을 위한 TCP 포트 번호 입력
- default: 5432 | 5432
or
- Min: 10000
- Max: 20000 |
| cloudPostgresqlDatabaseName | String | Y | Cloud DB for PostgreSQL의 DB명
- 기본으로 생성할 DB명 입력 | - 영어 소문자, 숫자, 밑줄 문자( _ )만 허용, 영어로 시작
- Min: 1
- Max: 30 |
| output | String | N | 응답 결과의 포맷 타입
- options: xml \| json
- default: json | - |
## 응답
### 응답 데이터 타입
- CloudPostgresqlInstanceList 타입
| CloudPostgresqlInstanceList extends CommonResponse | 설명 |
| ------------------------------------------------------------ | -------------------------------------------------------- |
| private Integer totalRows; | 조회된 목록의 총 개수 |
| private List<CloudPostgresqlInstance> cloudPostgresqlInstanceList = new ArrayList<>(); | Cloud DB for PostgreSQL 인스턴스 목록 |
- CloudPostgresqlInstance 타입
| CloudPostgresqlInstance | 설명 |
| ------------------------------------------------------------ | ------------------------------------------------------------ |
| private String cloudPostgresqlInstanceNo; | Cloud DB for PostgreSQL 인스턴스 번호 |
| private String cloudPostgresqlServiceName; | Cloud DB for PostgreSQL 서비스 이름 |
| private String cloudPostgresqlInstanceStatusName; | Cloud DB for PostgreSQL 인스턴스 상태 이름
- `creating`
- `deleted`
- `deleting`
- `downgrading`
- `pending`
- `recovering`
- `reinstalling`
- `restarting`
- `running`
- `settingup`
- `shuttingdown`
- `stopped`
- `upgrading` |
| private CommonCode cloudPostgresqlInstanceStatus; | Cloud DB for PostgreSQL 인스턴스 상태 코드
- `INIT (initiate)`
- `CREAT (created)`
- `DEL (deleted)` |
| private CommonCode cloudPostgresqlInstanceOperation; | Cloud DB for PostgreSQL 인스턴스 Operation 코드
- `CREAT (create)`
- `DEL (delete)`
- `FO (failover)`
- `NULL (no operation)`
- `SETUP (setup)`
- `UPGD (upgrade)`
- `DWGD (downgrade)`
- `BKP (backup)` |
| private String cloudPostgresqlImageProductCode; | Cloud DB for PostgreSQL 이미지 상품 코드 |
| private String engineVersion; | Cloud DB for PostgreSQL 엔진 버전 |
| private String generationCode; | 세대코드 |
| private String license; | Cloud DB for PostgreSQL 라이선스 |
| private Integer cloudPostgresqlPort; | Cloud DB for PostgreSQL 포트 |
| private Boolean isHa; | 고가용성 여부 |
| private Boolean isMultiZone; | 멀티존 여부 |
| private Boolean isBackup; | 백업 여부 |
| private Integer backupFileRetentionPeriod; | 백업 파일 보관 기간 |
| private String backupTime; | 백업 시간 |
| private Date createDate; | 생성일자 |
| private AccessControlGroupNoList accessControlGroupNoList; | ACG 번호 목록 |
| private CloudPostgresqlConfigList cloudPostgresqlConfigList; | Cloud DB for PostgreSQL Config 목록 |
| private List<CloudPostgresqlServerInstance> cloudPostgresqlServerInstanceList; | Cloud DB for PostgreSQL 서버 인스턴스 목록 |
- AccessControlGroupNoList 타입
| AccessControlGroupNoList | 설명 |
| ------------------------------------------------------------ | ------------- |
| private List<String> accessControlGroupNoList = new ArrayList<>(); | ACG 번호 목록 |
- CloudPostgresqlConfigList 타입
| CloudPostgresqlConfigList | 설명 |
| ------------------------------------------------------------ | ----------------------------------- |
| private List<String> cloudPostgresqlConfigList = new ArrayList<>(); | Cloud DB for PostgreSQL Config 목록 |
- CloudPostgresqlServerInstance 타입
| CloudPostgresqlServerInstance | 설명 |
| ---------------------------------------------------------- | ------------------------------------------------------------ |
| private String cloudPostgresqlServerInstanceNo; | Cloud DB for PostgreSQL 서버 인스턴스 번호 |
| private String cloudPostgresqlServerName; | Cloud DB for PostgreSQL 서버 이름 |
| private CommonCode cloudPostgresqlServerRole; | Cloud DB for PostgreSQL 서버 역할 |
| private String cloudPostgresqlServerInstanceStatusName; | Cloud DB for PostgreSQL 서버 인스턴스 상태 이름
- `creating`
- `deleted`
- `deleting`
- `downgrading`
- `pending`
- `recovering`
- `reinstalling`
- `restarting`
- `running`
- `settingup`
- `shuttingdown`
- `stopped`
- `upgrading`
- `downgrading` |
| private CommonCode cloudPostgresqlServerInstanceStatus; | Cloud DB for PostgreSQL 서버 인스턴스 상태 코드
- `DEL (deleted)`
- `PEND (pending)`
- `RUN (running)`
- `STOP (stopped)`
- `FSTOP (failure stopped)` |
| private CommonCode cloudPostgresqlServerInstanceOperation; | Cloud DB for PostgreSQL 서버 인스턴스 Operation 코드
- `NOOP (no operation)`
- `CREAT (create)`
- `START (start)`
- `RSTRT (restart)`
- `SETUP (setup)`
- `STOP (stop)`
- `FO (failover)`
- `DEL (delete)`
- `UPGD (upgrade)`
- `DWGD (downgrade)`
- `RISTL (reinstall)` |
| private String cloudPostgresqlProductCode; | Cloud DB for PostgreSQL 상품 코드 |
| private String regionCode; | 리전 코드 |
| private String zoneCode; | Zone 코드 |
| private String vpcNo; | VPC 번호 |
| private String subnetNo; | Subnet 번호 |
| private Boolean isPublicSubnet; | Public Subnet 여부 |
| private String publicDomain; | 공인 도메인명 |
| private String privateDomain; | 사설 도메인명 |
| private String privateIp; | 사설 IP |
| private CommonCode dataStorageType; | 데이터 스토리지 타입 |
| private Boolean isStorageEncryption; | 데이터 스토리지 암호화 여부 |
| private Long dataStorageSize; | 데이터 스토리지 사이즈 |
| private Long usedDataStorageSize; | 사용중인 데이터 스토리지 사이즈 |
| private Integer cpuCount; | CPU 개수 |
| private Long memorySize; | 메모리 사이즈 |
| private Date uptime; | VM 부팅 완료 시간 |
| private Date createDate; | 생성일자 |
## 예시
호출과 응답 예시를 설명합니다.
### 호출 예시
호출 예시는 다음과 같습니다.
```
ncloud vpostgresql createCloudPostgresqlInstance --regionCode FKR --vpcNo ****87 --subnetNo ****49 --secondarySubnetNo ****51 --cloudPostgresqlImageProductCode SW.VPGSL.OS.LNX64.CNTOS.0708.PGSQL.133.B050 --cloudPostgresqlProductCode SVR.VPGSL.DBSVR.STAND.C002.M004.NET.SSD.B050.G001 --dataStorageTypeCode SSD --isHa true --isMultiZone true --isStorageEncryption true --isBackup true --backupFileRetentionPeriod 10 --backupTime 02:00 --isAutomaticBackup false --cloudPostgresqlServiceName test-**** --cloudPostgresqlServerNamePrefix test-**** --cloudPostgresqlUserName test**** --cloudPostgresqlUserPassword ******** --clientCidr 0.0.0.0/0 --cloudPostgresqlPort 15432 --cloudPostgresqlDatabaseName test**** --backupFileStorageCount=5 --isBackupFileCompression=true
```
### 응답 예시
응답 예시는 다음과 같습니다.
응답 결과 포맷 타입(output)이 json 일 때
```json
{
"createCloudPostgresqlInstanceResponse": {
"requestId": "9f76fa24-67a4-4cdf-bf70-f62f251d5138",
"returnCode": 0,
"returnMessage": "success",
"totalRows": 1,
"cloudPostgresqlInstanceList": [
{
"cloudPostgresqlInstanceNo": "****925",
"cloudPostgresqlServiceName": "test-****",
"cloudPostgresqlInstanceStatusName": "creating",
"cloudPostgresqlInstanceStatus": {
"code": "INIT",
"codeName": "CLOUD DATABASE(VPC) Init State"
},
"cloudPostgresqlInstanceOperation": {
"code": "CREAT",
"codeName": "CLOUD DATABASE(VPC) Creat OP"
},
"cloudPostgresqlImageProductCode": "SW.VPGSL.OS.LNX64.CNTOS.0708.PGSQL.133.B050",
"engineVersion": "PostgreSQL 13.3",
"generationCode": "G2",
"license": "PostgreSQL License",
"cloudPostgresqlPort": 15432,
"isHa": true,
"isMultiZone": true,
"isBackup": true,
"backupFileRetentionPeriod": 10,
"backupTime": "02:00",
"createDate": "2021-09-16T18:00:00+0900",
"accessControlGroupNoList": [],
"cloudPostgresqlConfigList": [
"sample_config=sample_value"
],
"cloudPostgresqlServerInstanceList": [
{
"cloudPostgresqlServerName": "test-****-001-gcb",
"cloudPostgresqlServerRole": {
"code": "M",
"codeName": "Primary"
},
"cloudPostgresqlServerInstanceStatusName": "creating",
"cloudPostgresqlServerInstanceStatus": {
"code": "PEND",
"codeName": "CLOUD DATABASE(VPC) Server Pending State"
},
"cloudPostgresqlServerInstanceOperation": {
"code": "CREAT",
"codeName": "CLOUD DATABASE(VPC) Server Create OP"
},
"cloudPostgresqlProductCode": "SVR.VPGSL.DBSVR.STAND.C002.M004.NET.SSD.B050.G001",
"regionCode": "FKR",
"zoneCode": "FKR-1",
"vpcNo": "****87",
"subnetNo": "****49",
"isPublicSubnet": true,
"privateIp": "***.***.***.***",
"dataStorageType": {
"code": "SSD",
"codeName": "SSD"
},
"isStorageEncryption": true,
"dataStorageSize": 10737418240,
"cpuCount": 2,
"memorySize": 4294967296,
"createDate": "2021-09-16T18:00:00+0900"
},
{
"cloudPostgresqlServerName": "test-****-002-gcc",
"cloudPostgresqlServerRole": {
"code": "H",
"codeName": "Secondary"
},
"cloudPostgresqlServerInstanceStatusName": "creating",
"cloudPostgresqlServerInstanceStatus": {
"code": "PEND",
"codeName": "CLOUD DATABASE(VPC) Server Pending State"
},
"cloudPostgresqlServerInstanceOperation": {
"code": "CREAT",
"codeName": "CLOUD DATABASE(VPC) Server Create OP"
},
"cloudPostgresqlProductCode": "SVR.VPGSL.DBSVR.STAND.C002.M004.NET.SSD.B050.G001",
"regionCode": "FKR",
"zoneCode": "FKR-2",
"vpcNo": "****87",
"subnetNo": "****51",
"isPublicSubnet": true,
"privateIp": "***.***.***.***",
"dataStorageType": {
"code": "SSD",
"codeName": "SSD"
},
"isStorageEncryption": true,
"dataStorageSize": 10737418240,
"cpuCount": 2,
"memorySize": 4294967296,
"createDate": "2021-09-16T18:00:00+0900"
}
]
}
]
}
}
```
응답 결과 포맷 타입(output)이 xml 일 때
```xml
9f76fa24-67a4-4cdf-bf70-f62f251d5138
0
success
1
****925
test-****
creating
INIT
CLOUD DATABASE(VPC) Init State
CREAT
CLOUD DATABASE(VPC) Creat OP
SW.VPGSL.OS.LNX64.CNTOS.0708.PGSQL.133.B050
PostgreSQL 13.3
G2
PostgreSQL License
15432
true
true
true
10
02:00
2021-09-16T18:00:00+0900
sample_config=sample_value
test-****-001-gcb
M
Primary
creating
PEND
CLOUD DATABASE(VPC) Server Pending State
CREAT
CLOUD DATABASE(VPC) Server Create OP
SVR.VPGSL.DBSVR.STAND.C002.M004.NET.SSD.B050.G001
FKR
FKR-1
****87
****49
true
***.***.***.***
SSD
SSD
true
10737418240
2
4294967296
2021-09-16T18:00:00+0900
test-****-002-gcc
H
Secondary
creating
PEND
CLOUD DATABASE(VPC) Server Pending State
CREAT
CLOUD DATABASE(VPC) Server Create OP
SVR.VPGSL.DBSVR.STAND.C002.M004.NET.SSD.B050.G001
FKR
FKR-2
****87
****51
true
***.***.***.***
SSD
SSD
true
10737418240
2
4294967296
2021-09-16T18:00:00+0900
```