Skip to main content

key_pair

Gets an individual key_pair resource

Overview

Namekey_pair
TypeResource
Descriptionkey_pair
Idawscc.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

Currently only SELECT is supported for this resource resource.

Example

SELECT
region,
key_name,
key_type,
key_format,
public_key_material,
key_fingerprint,
key_pair_id,
tags
FROM awscc.ec2.key_pair
WHERE data__Identifier = '<KeyName>';

Permissions

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

Read

ec2:DescribeKeyPairs

Delete

ec2:DeleteKeyPair,
ssm:DeleteParameter,
ec2:DescribeKeyPairs