ImportKeyPair#

Description#

Imports the public key from an RSA key pair that you created with a third-party tool.

Request Parameters#

Required parameters#

  • KeyName — The name of the key pair.

    • Type: String

    • Required: Yes

  • PublicKeyMaterial — The public key.

    • Type: Base64 encoded string

    • Required: Yes

Optional parameters#

  • TagSpecification.N — Tags assigned to the SSH key pair when it is created

Response Elements#

  • keyFingerprint — The digest of the encoded private key.

    • Type: String

  • keyName — The name of the key pair.

    • Type: String

  • keyPairId — The ID of the key pair.

    • Type: String

  • requestId — The request ID

    • Type: String

  • tagSet — Tags related to the key pair.

    • Type: List of Tag objects

Examples#

c2-ec2 ImportKeyPair KeyName <name> PublicKeyMaterial <public_key>

c2-ec2 ImportKeyPair KeyName <name> PublicKeyMaterial <public_key> \
       TagSpecification.1.ResourceType key-pair TagSpecification.1.Tag.0.Key "tag_key" \
       TagSpecification.1.Tag.0.Value "tag_value"