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.

getRootPassword

Prev Next

VPC環境で利用できます。

サーバインスタンス(VM)の認証キーを使用して管理者パスワードを照会します。

構文

getRootPassword構文は次の通りです。

./ncloud vserver getRootPassword \
    --serverInstanceNo <server-instance-no> \
    --privateKey <private-key> \
    [--regionCode <KR|SGN|JPN>] \
    [--output <json|xml>]

オプション

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

必須オプション

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

オプション タイプ 必須の有無 説明
--serverInstanceNo String Required サーバインスタンス番号
--privateKey String Required 認証キー (秘密鍵)
  • 作成するか、外部から取得した PEMファイルの内容を入力
  • 改行は\nを利用
  • file://またはhttp(s)://パス形式も対応

共通オプション

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

管理者パスワードの照会リクエストが成功すると、復号化された管理者パスワードが返されます。

コマンド

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

./ncloud vserver getRootPassword \
    --serverInstanceNo 34567890 \
    --privateKey "file://path/to/key.pem" \
    --regionCode KR \
    --output json

出力

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

{
  "getRootPasswordResponse": {
    "rootPassword": "<root-password-redacted>",
    "requestId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "returnCode": "0",
    "returnMessage": "success"
  }
}