KeyPairAttributes

class aws_cdk.aws_ec2.KeyPairAttributes(*, key_pair_name, type=None)

Bases: object

Attributes of a Key Pair.

Parameters:
  • key_pair_name (str) – The unique name of the key pair.

  • type (Optional[KeyPairType]) – The type of the key pair. Default: no type specified

ExampleMetadata:

infused

Example:

key_pair = ec2.KeyPair.from_key_pair_attributes(self, "KeyPair",
    key_pair_name="the-keypair-name",
    type=ec2.KeyPairType.RSA
)

Attributes

key_pair_name

The unique name of the key pair.

type

The type of the key pair.

Default:

no type specified