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.

changeCloudPostgresqlUserList

Prev Next

VPC環境で利用できます。

Cloud DB for PostgreSQLインスタンスに登録されている DB User情報を変更します。

構文

changeCloudPostgresqlUserList構文は次の通りです。

./ncloud vpostgresql changeCloudPostgresqlUserList \
    --cloudPostgresqlInstanceNo <instance-no> \
    --cloudPostgresqlUserList <user-config> \
    [--regionCode <KR|SGN|JPN>] \
    [--output <json|xml>]

オプション

changeCloudPostgresqlUserListの実行時に指定できるオプションについて説明します。

必須オプション

changeCloudPostgresqlUserListの必須オプションです。

オプション タイプ 必須の有無 説明
--cloudPostgresqlInstanceNo String Required Cloud DB for PostgreSQLインスタンス番号
--cloudPostgresqlUserList List Required 変更対象の DB Userリスト
  • 各ユーザーは、二重引用符の中に{フィールド=‘値’}のペアをコンマで区切って入力
    • name (Required): ユーザー ID。getCloudPostgresqlUserListを参照
    • password (Conditional): DB Userアカウントのパスワード。英字、数字、記号をそれぞれ1文字以上含めて8~20文字以内で入力。記号の` & + \ " ' /とスペースは使用不可。User IDは含めないこと
    • clientCidr (Conditional): サーバへの接続を許可するクライアントの CIDRブロック。すべて許可: 0.0.0.0/0、特定の IPアドレス: 192.168.1.1/32、IPアドレス範囲: 192.168.1.0/24
    • isReplicationRole (Conditional): Replication Roleかどうか。true | false
  • passwordclientCidrisReplicationRoleのいずれか1つは必ず入力

共通オプション

vpostgresqlコマンドで共通して使用するオプションについては、Cloud DB for PostgreSQL (VPC)のオプションを参照してください

DB Userの変更リクエストが成功すると、入力したユーザーの情報が変更されます。

コマンド

コマンドの例は次の通りです。

./ncloud vpostgresql changeCloudPostgresqlUserList \
    --cloudPostgresqlInstanceNo 34567890 \
    --cloudPostgresqlUserList "name='testreader', isReplicationRole='true'" \
    --regionCode KR \
    --output json

出力

出力の例は次の通りです。

{
  "changeCloudPostgresqlUserListResponse": {
    "requestId": "c3d4e5f6-a7b8-9012-cdef-345678901234",
    "returnCode": "0",
    "returnMessage": "success"
  }
}