VPC環境で利用できます。
サーバインスタンス(VM)の認証キーを使用して管理者パスワードリストを照会します。
構文
getRootPasswordServerInstanceList構文は次の通りです。
./ncloud vserver getRootPasswordServerInstanceList \
--rootPasswordServerInstanceList <root-password-server-instance-config> \
[--regionCode <KR|SGN|JPN>] \
[--output <json|xml>]
オプション
getRootPasswordServerInstanceListの実行時に指定できるオプションについて説明します。
必須オプション
getRootPasswordServerInstanceListの必須オプションです。
| オプション | タイプ | 必須の有無 | 説明 |
|---|---|---|---|
--rootPasswordServerInstanceList |
List | Required | サーバインスタンスと認証キーのマッピングリスト
|
共通オプション
vserverコマンドで共通して使用するオプションについては、Server (VPC)のオプションをご参照ください。
例
管理者パスワードリストの照会リクエストが成功すると、各サーバインスタンスの識別情報と復号化された管理者パスワードが返されます。
コマンド
コマンドの例は次の通りです。
./ncloud vserver getRootPasswordServerInstanceList \
--rootPasswordServerInstanceList \
"serverInstanceNo='34567890', privateKey='file://path/to/key.pem'" \
"serverInstanceNo='34567891', privateKey='file://path/to/key.pem'" \
--regionCode KR \
--output json
出力
出力の例は次の通りです。
{
"getRootPasswordServerInstanceListResponse": {
"totalRows": 1,
"rootPasswordServerInstanceList": [
{
"serverInstanceNo": "34567890",
"rootPassword": "<root-password-redacted>"
}
],
"requestId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"returnCode": "0",
"returnMessage": "success"
}
}