computing / Client / import_key_pair

import_key_pair

computing.Client.import_key_pair(**kwargs)

指定したSSH公開鍵をアップロードして登録します。SSHキー名には、同じユーザーが作るキーのうち、一意となる文字列を指定します。

SSH-RSAおよびSSH-DSAの公開鍵形式に対応しています。

推奨する公開鍵方式は SSH-RSA 2048bit鍵です。

アップロードしたSSHキーペアのフィンガープリントが一致しているかどうかの確認方法は、 `DescribeKeyPairs <https://docs.nifcloud.com/cp/api/DescribeKeyPairs.htm>`__の処理概要をご確認ください。

See also: NIFCLOUD API Documentation

Request Syntax

response = client.import_key_pair(
    Description='string',
    KeyName='string',
    PublicKeyMaterial='string'
)
Parameters:
  • Description (string) –

  • KeyName (string) – [REQUIRED]

  • PublicKeyMaterial (string) – [REQUIRED]

Return type:

dict

Returns:

Response Syntax

{
    'KeyFingerprint': 'string',
    'KeyName': 'string',
    'RequestId': 'string'
}

Response Structure

  • (dict) –

    • KeyFingerprint (string) –

    • KeyName (string) –

    • RequestId (string) –