createCloudPostgresqlInstance
- Print
- PDF
createCloudPostgresqlInstance
- Print
- PDF
Article Summary
Share feedback
Thanks for sharing your feedback!
Available in VPC
Create Cloud DB for PostgreSQL instance.
Commands
The text of the command is as follows:
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]
Parameter
The following is a description on parameters.
Parameter | Type | Requirement status | Description | Restrictions |
---|---|---|---|---|
regionCode | String | N | Region code - regionCode can be obtained via the getRegionList action - Default: selects the first region of the getRegionList search results | - |
vpcNo | String | Y | VPC number - vpcNo can be obtained via the getCloudPostgresqlTargetVpcList action | - |
subnetNo | String | Y | Subnet number - subnetNo can be obtained via the getCloudPostgresqlTargetSubnetList action - Public domain can only be subscribed on a DB server generated on Public Subnet - Subnet transfer is not possible after a Cloud DB for PostgreSQL instance has been created | - |
secondarySubnetNo | String | N | Subnet number of the secondary server - When multi-zone (isMultiZone) is false, input is not accepted. When multi-zone (isMultiZone) is true, you must enter - It must have a different zone from the primary server's subnet, and their public or private statuses must match - secondarySubnetNo can be obtained via the getCloudPostgresqlTargetSubnetList action | - |
cloudPostgresqlImageProductCode | String | N | Cloud DB for PostgreSQL image product code - cloudPostgresqlImageProductCode can be obtained via the getCloudPostgresqlImageProductList action's productCode - Generated in default value if data is not entered | - |
cloudPostgresqlProductCode | String | N | Cloud DB for PostgreSQL product code - Sets the server specifications of the Cloud DB for PostgreSQL instance to be created - cloudPostgresqlProductCode can be obtained via the getCloudPostgresqlProductList action's productCode - Default: selected as the minimum specification. The minimum specification is based on 1. memory and 2. CPU | - |
dataStorageTypeCode | String | N | Data storage type code - Data storage type cannot be altered after installation - options: SSD | HDD - default: SSD | - |
isHa | Boolean | N | High availability status - If you select high availability, 2 servers including the secondary server are created, and an additional charge are incurred - If high availability status (isHa) is false, isMultiZone and secondarySubnetNo parameters cannot be used - default: true | - |
isMultiZone | Boolean | N | Multi-zone (True/False) - If the high availability status (isHa) is true, multi-zone status can be selected - If you select multi-zone, primary server and secondary server are created in different zones to provide higher availability - Must be entered if the high availability status (isHa) is true - Not available in the Neurocloud environment - default: false | - |
isStorageEncryption | Boolean | N | Whether data storage encryption is applied - When you apply encryption, DB data will be encrypted and stored in storage - Storage encryption settings cannot be changed after a Cloud DB for PostgreSQL instance has been created - Not available in the Neurocloud environment - default: false | - |
isBackup | Boolean | N | Backup (True/False) - If the high availability status (isHa) is true, backup (isBackup) is to be set at true - default: true | - |
backupFileRetentionPeriod | Integer | N | Backup file storage period - Backups are performed every day, and backup files are saved in a separate backup storage - Charges are based on the storage space used - default: 1 (1 day) | - |
backupTime | String | N | Backup time - Sets the time to perform backup This field must be entered when the backup status (isBackup) is true and the automatic backup status (isAutomaticBackup) is false. - 01:15 | - |
isAutomaticBackup | Boolean | N | Backup time is automatically set - Select whether backup time is to be set automatically, and if automatic backup (isAutomaticBackup) is true, backupTime cannot be entered - default: true | - |
cloudPostgresqlServiceName | String | Y | Cloud DB for PostgreSQL service name | - Only English alphabets, numbers, dash ( - ) and Korean letters can be entered - Min: 3 - Max: 30 |
cloudPostgresqlServerNamePrefix | String | Y | Cloud DB for PostgreSQL server name prefix - It is created with random text added after the transferred cloudPostgresqlServerNamePrefix value to avoid duplicated host names | - DB server name must contain only English letters (lowercase), numbers, and hyphens (-) - It must start with an English letter and end with an English letter or a number - Min: 3 - Max: 20 |
cloudPostgresqlUserName | String | Y | Admin ID - Enter username to use for DB admin | - Only English lowercase letters, numbers, and underscore characters ( _ ) are allowed, and must start with an English letter - Min: 4 - Max: 16 |
cloudPostgresqlUserPassword | String | Y | Admin password - Enter user's password to use for DB admin | - Must be at least 8 characters in length and contain at least 1 each of English letter, special character, and number - The following characters cannot be used in the password: ` & + \ " ' / and space - Cannot include user ID - Min: 8 - Max: 20 |
clientCidr | String | Y | Access control - Enter CIDR of a client you want to have access to | - Allow access to all: 0.0.0.0/0 - Allow specific IP access: 192.168.1.1/32 - Allow IP range access: 192.168.1.0/24 |
cloudPostgresqlPort | Integer | N | Cloud DB for PostgreSQL port - Enter the TCP port number for PostgreSQL access - default: 5432 | 5432 or - Min: 10000 - Max: 20000 |
cloudPostgresqlDatabaseName | String | Y | Cloud DB for PostgreSQL's DB name - Enter the default DB name | - Only English lowercase letters, numbers, and underscore character ( _ ) are allowed, and must start with an English letter - Min: 1 - Max: 30 |
output | String | N | Format type of the response result - options: xml | json - default: json | - |
Responses
Response data type
- CloudPostgresqlInstanceList type
CloudPostgresqlInstanceList extends CommonResponse | Description |
---|---|
private Integer totalRows; | Total number of items viewed |
private List<CloudPostgresqlInstance> cloudPostgresqlInstanceList = new ArrayList<>(); | Cloud DB for PostgreSQL instance list |
- CloudPostgresqlInstance type
CloudPostgresqlInstance | Description |
---|---|
private String cloudPostgresqlInstanceNo; | Cloud DB for PostgreSQL instance number |
private String cloudPostgresqlServiceName; | Cloud DB for PostgreSQL service name |
private String cloudPostgresqlInstanceStatusName; | Cloud DB for PostgreSQL instance status list - creating - deleted - deleting - downgrading - pending - recovering - reinstalling - restarting - running - settingup - shuttingdown - stopped - upgrading |
private CommonCode cloudPostgresqlInstanceStatus; | Cloud DB for PostgreSQL instance status code - INIT (initiate) - CREAT (created) - DEL (deleted) |
private CommonCode cloudPostgresqlInstanceOperation; | Cloud DB for PostgreSQL instance operation code - CREAT (create) - DEL (delete) - FO (failover) - NULL (no operation) - SETUP (setup) - UPGD (upgrade) - DWGD (downgrade) - BKP (backup) |
private String cloudPostgresqlImageProductCode; | Cloud DB for PostgreSQL image product code |
private String engineVersion; | Cloud DB for PostgreSQL engine version |
private String license; | Cloud DB for PostgreSQL license |
private Integer cloudPostgresqlPort; | Cloud DB for PostgreSQL port |
private Boolean isHa; | High availability status |
private Boolean isMultiZone; | Multi-zone (True/False) |
private Boolean isBackup; | Backup (True/False) |
private Integer backupFileRetentionPeriod; | Backup file storage period |
private String backupTime; | Backup time |
private Date createDate; | Creation date |
private AccessControlGroupNoList accessControlGroupNoList; | List of ACG numbers |
private CloudPostgresqlConfigList cloudPostgresqlConfigList; | Cloud DB for PostgreSQL config list |
private List<CloudPostgresqlServerInstance> cloudPostgresqlServerInstanceList; | Cloud DB for PostgreSQL server instance list |
- AccessControlGroupNoList type
AccessControlGroupNoList | Description |
---|---|
private List<String> accessControlGroupNoList = new ArrayList<>(); | List of ACG numbers |
- CloudPostgresqlConfigList type
CloudPostgresqlConfigList | Description |
---|---|
private List<String> cloudPostgresqlConfigList = new ArrayList<>(); | Cloud DB for PostgreSQL config list |
- CloudPostgresqlServerInstance type
CloudPostgresqlServerInstance | Description |
---|---|
private String cloudPostgresqlServerInstanceNo; | Cloud DB for PostgreSQL server instance number |
private String cloudPostgresqlServerName; | Cloud DB for PostgreSQL server name |
private CommonCode cloudPostgresqlServerRole; | Cloud DB for PostgreSQL server role |
private String cloudPostgresqlServerInstanceStatusName; | Cloud DB for PostgreSQL server instance status list - creating - deleted - deleting - downgrading - pending - recovering - reinstalling - restarting - running - settingup - shuttingdown - stopped - upgrading - downgrading |
private CommonCode cloudPostgresqlServerInstanceStatus; | Cloud DB for PostgreSQL server instance status code - DEL (deleted) - PEND (pending) - RUN (running) - STOP (stopped) - FSTOP (failure stopped) |
private CommonCode cloudPostgresqlServerInstanceOperation; | Cloud DB for PostgreSQL server instance operation code - 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 product code |
private String regionCode; | Region code |
private String zoneCode; | Zone code |
private String vpcNo; | VPC number |
private String subnetNo; | Subnet number |
private Boolean isPublicSubnet; | Public Subnet status |
private String publicDomain; | Name of public domain |
private String privateDomain; | Name of private domain |
private CommonCode dataStorageType; | Data storage type |
private Boolean isStorageEncryption; | Whether data storage encryption is applied |
private Long dataStorageSize; | Data storage size |
private Long usedDataStorageSize; | Size of data storage in use |
private Integer cpuCount; | Number of CPUs |
private Long memorySize; | Memory size |
private Date uptime; | VM booting completion time |
private Date createDate; | Creation date |
Examples
Describes examples of recalls and responses.
Recall examples
The following are examples of recalls.
ncloud vpostgresql createCloudPostgresqlInstance --regionCode KR --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****
Response examples
The following are examples of responses.
If the response shows that format type (output) is 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",
"license": "PostgreSQL License",
"cloudPostgresqlPort": 15432,
"isHa": true,
"isMultiZone": true,
"isBackup": true,
"backupFileRetentionPeriod": 10,
"backupTime": "02:00",
"createDate": "2021-09-16T18:00:00+0900",
"accessControlGroupNoList": [],
"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": "KR",
"zoneCode": "KR-1",
"vpcNo": "****87",
"subnetNo": "****49",
"isPublicSubnet": true,
"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": "KR",
"zoneCode": "KR-2",
"vpcNo": "****87",
"subnetNo": "****51",
"isPublicSubnet": true,
"dataStorageType": {
"code": "SSD",
"codeName": "SSD"
},
"isStorageEncryption": true,
"dataStorageSize": 10737418240,
"cpuCount": 2,
"memorySize": 4294967296,
"createDate": "2021-09-16T18:00:00+0900"
}
]
}
]
}
}
If the response shows that format type (output) is xml
<createCloudPostgresqlInstanceResponse>
<requestId>9f76fa24-67a4-4cdf-bf70-f62f251d5138</requestId>
<returnCode>0</returnCode>
<returnMessage>success</returnMessage>
<totalRows>1</totalRows>
<cloudPostgresqlInstanceList>
<cloudPostgresqlInstance>
<cloudPostgresqlInstanceNo>****925</cloudPostgresqlInstanceNo>
<cloudPostgresqlServiceName>test-****</cloudPostgresqlServiceName>
<cloudPostgresqlInstanceStatusName>creating</cloudPostgresqlInstanceStatusName>
<cloudPostgresqlInstanceStatus>
<code>INIT</code>
<codeName>CLOUD DATABASE(VPC) Init State</codeName>
</cloudPostgresqlInstanceStatus>
<cloudPostgresqlInstanceOperation>
<code>CREAT</code>
<codeName>CLOUD DATABASE(VPC) Creat OP</codeName>
</cloudPostgresqlInstanceOperation>
<cloudPostgresqlImageProductCode>SW.VPGSL.OS.LNX64.CNTOS.0708.PGSQL.133.B050</cloudPostgresqlImageProductCode>
<engineVersion>PostgreSQL 13.3</engineVersion>
<license>PostgreSQL License</license>
<cloudPostgresqlPort>15432</cloudPostgresqlPort>
<isHa>true</isHa>
<isMultiZone>true</isMultiZone>
<isBackup>true</isBackup>
<backupFileRetentionPeriod>10</backupFileRetentionPeriod>
<backupTime>02:00</backupTime>
<createDate>2021-09-16T18:00:00+0900</createDate>
<accessControlGroupNoList/>
<cloudPostgresqlServerInstanceList>
<cloudPostgresqlServerInstance>
<cloudPostgresqlServerName>test-****-001-gcb</cloudPostgresqlServerName>
<cloudPostgresqlServerRole>
<code>M</code>
<codeName>Primary</codeName>
</cloudPostgresqlServerRole>
<cloudPostgresqlServerInstanceStatusName>creating</cloudPostgresqlServerInstanceStatusName>
<cloudPostgresqlServerInstanceStatus>
<code>PEND</code>
<codeName>CLOUD DATABASE(VPC) Server Pending State</codeName>
</cloudPostgresqlServerInstanceStatus>
<cloudPostgresqlServerInstanceOperation>
<code>CREAT</code>
<codeName>CLOUD DATABASE(VPC) Server Create OP</codeName>
</cloudPostgresqlServerInstanceOperation>
<cloudPostgresqlProductCode>SVR.VPGSL.DBSVR.STAND.C002.M004.NET.SSD.B050.G001</cloudPostgresqlProductCode>
<regionCode>KR</regionCode>
<zoneCode>KR-1</zoneCode>
<vpcNo>****87</vpcNo>
<subnetNo>****49</subnetNo>
<isPublicSubnet>true</isPublicSubnet>
<dataStorageType>
<code>SSD</code>
<codeName>SSD</codeName>
</dataStorageType>
<isStorageEncryption>true</isStorageEncryption>
<dataStorageSize>10737418240</dataStorageSize>
<cpuCount>2</cpuCount>
<memorySize>4294967296</memorySize>
<createDate>2021-09-16T18:00:00+0900</createDate>
</cloudPostgresqlServerInstance>
<cloudPostgresqlServerInstance>
<cloudPostgresqlServerName>test-****-002-gcc</cloudPostgresqlServerName>
<cloudPostgresqlServerRole>
<code>H</code>
<codeName>Secondary</codeName>
</cloudPostgresqlServerRole>
<cloudPostgresqlServerInstanceStatusName>creating</cloudPostgresqlServerInstanceStatusName>
<cloudPostgresqlServerInstanceStatus>
<code>PEND</code>
<codeName>CLOUD DATABASE(VPC) Server Pending State</codeName>
</cloudPostgresqlServerInstanceStatus>
<cloudPostgresqlServerInstanceOperation>
<code>CREAT</code>
<codeName>CLOUD DATABASE(VPC) Server Create OP</codeName>
</cloudPostgresqlServerInstanceOperation>
<cloudPostgresqlProductCode>SVR.VPGSL.DBSVR.STAND.C002.M004.NET.SSD.B050.G001</cloudPostgresqlProductCode>
<regionCode>KR</regionCode>
<zoneCode>KR-2</zoneCode>
<vpcNo>****87</vpcNo>
<subnetNo>****51</subnetNo>
<isPublicSubnet>true</isPublicSubnet>
<dataStorageType>
<code>SSD</code>
<codeName>SSD</codeName>
</dataStorageType>
<isStorageEncryption>true</isStorageEncryption>
<dataStorageSize>10737418240</dataStorageSize>
<cpuCount>2</cpuCount>
<memorySize>4294967296</memorySize>
<createDate>2021-09-16T18:00:00+0900</createDate>
</cloudPostgresqlServerInstance>
</cloudPostgresqlServerInstanceList>
</cloudPostgresqlInstance>
</cloudPostgresqlInstanceList>
</createCloudPostgresqlInstanceResponse>
Was this article helpful?