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.

addCloudPostgresqlDatabaseList

Prev Next

Available in VPC

Add a database to a Cloud DB for PostgreSQL instance.

Syntax

The addCloudPostgresqlDatabaseList syntax is as follows:

./ncloud vpostgresql addCloudPostgresqlDatabaseList \
    --cloudPostgresqlInstanceNo <instance-no> \
    --cloudPostgresqlDatabaseList <database-config> \
    [--regionCode <KR|SGN|JPN>] \
    [--output <json|xml>]

Options

This section describes the options available when running addCloudPostgresqlDatabaseList.

Required options

The following options are required for addCloudPostgresqlDatabaseList.

Options Type Required Description
--cloudPostgresqlInstanceNo String Required Cloud DB for PostgreSQL instance number
--cloudPostgresqlDatabaseList List Required List of databases to add
  • For each database, enter {field=‘value’} pairs within quotation marks, separated by commas.
    • name (required): Database name. Enter 1-30 characters using lowercase English letters, numbers, and special character _. The string must start with an English letter.
    • owner (required): DB user ID for managing the database. See getCloudPostgresqlUserList.
  • Up to 10 databases can be added at once.

Common options

For information about the options common to all vpostgresql subcommands, see Cloud DB for PostgreSQL (VPC) options.

Examples

If the request to add a database is successful, the specified database is added to the Cloud DB for PostgreSQL instance.

Command

The command example is as follows:

./ncloud vpostgresql addCloudPostgresqlDatabaseList \
    --cloudPostgresqlInstanceNo 34567890 \
    --cloudPostgresqlDatabaseList "name='pgtest1', owner='testuser'" "name='pgtest2', owner='testuser'" \
    --regionCode KR \
    --output json

Output

The output example is as follows:

{
  "addCloudPostgresqlDatabaseListResponse": {
    "requestId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "returnCode": "0",
    "returnMessage": "success"
  }
}