Skip to content
v2.273.0

KeyPairAttributes Struct ​

Attributes of a Key Pair.

Example ​

ts
const keyPair = ec2.KeyPair.fromKeyPairAttributes(this, 'KeyPair', {
  keyPairName: 'the-keypair-name',
  type: ec2.KeyPairType.RSA,
})

Properties ​

keyPairNamestringkey_pair_namestrkeyPairNameStringKeyPairNamestringKeyPairName*stringrequired#
The unique name of the key pair.
typeKeyPairTypetypeKeyPairTypetypeKeyPairTypeTypeKeyPairTypeTypeKeyPairType= no type specified#
The type of the key pair.