Skip to content

EC2  >  Structures  >  KeyPairInfo

KeyPairInfo

Structure Class

KeyPairInfo dataclass

Bases: _SerdeShape

Describes a key pair.

Attributes

create_time class-attribute instance-attribute
create_time: datetime | None = ...

If you used Amazon EC2 to create the key pair, this is the date and time when the key was created, in ISO 8601 date-time format, in the UTC time zone.

If you imported an existing key pair to Amazon EC2, this is the date and time the key was imported, in ISO 8601 date-time format, in the UTC time zone.

key_fingerprint class-attribute instance-attribute
key_fingerprint: str | None = ...

If you used CreateKeyPair to create the key pair:

  • For RSA key pairs, the key fingerprint is the SHA-1 digest of the DER encoded private key.

  • For ED25519 key pairs, the key fingerprint is the base64-encoded SHA-256 digest, which is the default for OpenSSH, starting with OpenSSH 6.8.

If you used ImportKeyPair to provide Amazon Web Services the public key:

  • For RSA key pairs, the key fingerprint is the MD5 public key fingerprint as specified in section 4 of RFC4716.

  • For ED25519 key pairs, the key fingerprint is the base64-encoded SHA-256 digest, which is the default for OpenSSH, starting with OpenSSH 6.8.

key_name class-attribute instance-attribute
key_name: str | None = ...

The name of the key pair.

key_pair_id class-attribute instance-attribute
key_pair_id: str | None = ...

The ID of the key pair.

key_type class-attribute instance-attribute
key_type: str | None = ...

The type of key pair.

public_key class-attribute instance-attribute
public_key: str | None = ...

The public key material.

tags class-attribute instance-attribute
tags: list[Tag] | None = ...

Any tags applied to the key pair.