Skip to main content

key_pair

Gets or updates an individual key_pair resource, use key_pairs to retrieve a list of resources or to create or delete a resource.

Overview

Namekey_pair
TypeResource
DescriptionThe AWS::EC2::KeyPair creates an SSH key pair
Idaws.ec2.key_pair

Fields

NameDatatypeDescription
key_namestringThe name of the SSH key pair
key_typestringThe crypto-system used to generate a key pair.
key_formatstringThe format of the private key
public_key_materialstringPlain text public key to import
key_fingerprintstringA short sequence of bytes used for public key verification
key_pair_idstringAn AWS generated ID for the key pair
tagsarrayAn array of key-value pairs to apply to this resource.
regionstringAWS region.

Methods

NameAccessible byRequired Params
get_resourceSELECTdata__Identifier, region

SELECT Example

SELECT
region,
key_name,
key_type,
key_format,
public_key_material,
key_fingerprint,
key_pair_id,
tags
FROM aws.ec2.key_pair
WHERE region = 'us-east-1' AND data__Identifier = '<KeyName>';

Permissions

To operate on the key_pair resource, the following permissions are required:

Read

ec2:DescribeKeyPairs