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.

getCloudMysqlUserList

Prev Next

VPC環境で利用できます。

Cloud DB for MySQLインスタンスの DB Userリストを照会します。

構文

getCloudMysqlUserList構文は次の通りです。

./ncloud vmysql getCloudMysqlUserList \
    --cloudMysqlInstanceNo <instance-no> \
    --pageNo <page-no> \
    --pageSize <page-size> \
    [--regionCode <KR|SGN|JPN>] \
    [--output <json|xml>]

オプション

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

必須オプション

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

オプション タイプ 必須の有無 説明
--cloudMysqlInstanceNo String Required Cloud DB for MySQLインスタンス番号
--pageNo Integer Required ページ番号
  • 0~N
--pageSize Integer Required ページごとの項目数
  • 1~N

共通オプション

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

DB Userリストの照会リクエストが成功すると、各ユーザーのアカウント情報が返されます。

コマンド

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

./ncloud vmysql getCloudMysqlUserList \
    --cloudMysqlInstanceNo 12345678 \
    --pageNo 0 \
    --pageSize 10 \
    --regionCode KR \
    --output json

出力

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

{
  "getCloudMysqlUserListResponse": {
    "totalRows": 2,
    "cloudMysqlUserList": [
      {
        "userName": "testuser2",
        "hostIp": "%",
        "authority": "READ",
        "isSystemTableAccess": false
      },
      {
        "userName": "testuser",
        "hostIp": "%",
        "authority": "DDL",
        "isSystemTableAccess": true
      }
    ],
    "requestId": "b2c3d4e5-f6a7-8901-bcde-f23456789012",
    "returnCode": "0",
    "returnMessage": "success"
  }
}