VPC環境で利用できます。
Cloud DB for MySQLインスタンスリストを照会します。
構文
getCloudMysqlInstanceList構文は次の通りです。
./ncloud vmysql getCloudMysqlInstanceList \
[--zoneCode <zone-code>] \
[--vpcNo <vpc-no>] \
[--subnetNo <subnet-no>] \
[--cloudMysqlServiceName <service-name>] \
[--cloudMysqlInstanceNoList <instance-no-list>] \
[--cloudMysqlServerName <server-name>] \
[--cloudMysqlServerInstanceNoList <server-instance-no-list>] \
[--generationCode <G2|G3>] \
[--pageNo <page-no>] \
[--pageSize <page-size>] \
[--regionCode <KR|SGN|JPN>] \
[--output <json|xml>]
オプション
getCloudMysqlInstanceListの実行時に指定できるオプションについて説明します。
必須オプション
getCloudMysqlInstanceListの必須オプションです。
| オプション | タイプ | 必須の有無 | 説明 |
|---|---|---|---|
--pageSize |
Integer | Conditional | ページごとの項目数
|
任意オプション
getCloudMysqlInstanceListの任意オプションです。指定しない場合、オプションにはデフォルト値が適用されます。
| オプション | タイプ | 必須の有無 | 説明 |
|---|---|---|---|
--zoneCode |
String | Optional | ゾーンコード
|
--vpcNo |
String | Optional | VPC番号 |
--subnetNo |
String | Optional | Subnet番号 |
--cloudMysqlServiceName |
String | Optional | Cloud DB for MySQLサービス名 |
--cloudMysqlInstanceNoList |
List | Optional | Cloud DB for MySQLインスタンス番号リスト
|
--cloudMysqlServerName |
String | Optional | Cloud DB for MySQLサーバ名 |
--cloudMysqlServerInstanceNoList |
List | Optional | Cloud DB for MySQLサーバインスタンス番号リスト
|
--generationCode |
String | Optional | サーバの世代コード
|
--pageNo |
Integer | Optional | ページ番号
|
共通オプション
vmysqlコマンドで共通して使用するオプションについては、Cloud DB for MySQL (VPC)のオプションを参照してください。
例
Cloud DB for MySQLインスタンスリストの照会リクエストが成功すると、各インスタンスの構成情報と状態が返されます。
コマンド
コマンドの例は次の通りです。
./ncloud vmysql getCloudMysqlInstanceList \
--zoneCode KR-1 \
--vpcNo 98765432 \
--subnetNo 23456789 \
--cloudMysqlServiceName test-mysql \
--cloudMysqlInstanceNoList 12345678 \
--cloudMysqlServerName testmysql-001-97mj \
--cloudMysqlServerInstanceNoList 34567890 \
--generationCode G2 \
--pageNo 0 \
--pageSize 10 \
--regionCode KR \
--output json
出力
出力の例は次の通りです。
{
"getCloudMysqlInstanceListResponse": {
"totalRows": 1,
"cloudMysqlInstanceList": [
{
"cloudMysqlInstanceNo": "17234567",
"cloudMysqlServiceName": "test-mysql",
"cloudMysqlInstanceStatusName": "running",
"cloudMysqlInstanceStatus": {
"code": "CREAT",
"codeName": "CLOUD DATABASE(VPC) Created状態"
},
"cloudMysqlInstanceOperation": {
"code": "NULL",
"codeName": "CLOUD DATABASE(VPC) Null OP"
},
"isHa": true,
"isMultiZone": true,
"generationCode": "G2",
"cloudMysqlServerInstanceList": [
{
"cloudMysqlServerInstanceNo": "34567890",
"cloudMysqlServerName": "testmysql-001-97mj",
"cloudMysqlServerRole": {
"code": "M",
"codeName": "Master"
},
"cloudMysqlServerInstanceStatusName": "running",
"cloudMysqlServerInstanceStatus": {
"code": "RUN",
"codeName": "CLOUD DATABASE(VPC)サーバ Running状態"
},
"cloudMysqlServerInstanceOperation": {
"code": "NOOP",
"codeName": "CLOUD DATABASE(VPC)サーバ Null OP"
},
"regionCode": "KR",
"zoneCode": "KR-1",
"vpcNo": "98765432",
"subnetNo": "23456789",
"privateIp": "10.0.0.6",
"dataStorageSize": 10737418240,
"cpuCount": 2,
"memorySize": 4294967296
},
{
"cloudMysqlServerInstanceNo": "34567891",
"cloudMysqlServerName": "testmysql-002-97mk",
"cloudMysqlServerRole": {
"code": "H",
"codeName": "Standby Master"
},
"cloudMysqlServerInstanceStatusName": "running",
"cloudMysqlServerInstanceStatus": {
"code": "RUN",
"codeName": "CLOUD DATABASE(VPC)サーバ Running状態"
},
"cloudMysqlServerInstanceOperation": {
"code": "NOOP",
"codeName": "CLOUD DATABASE(VPC)サーバ Null OP"
},
"regionCode": "KR",
"zoneCode": "KR-2",
"vpcNo": "98765432",
"subnetNo": "23456790",
"privateIp": "10.0.1.6",
"dataStorageSize": 10737418240,
"cpuCount": 2,
"memorySize": 4294967296
}
]
}
],
"requestId": "b2c3d4e5-f6a7-8901-bcde-f23456789012",
"returnCode": "0",
"returnMessage": "success"
}
}