# CfnKeyPairProps

Properties for defining a `CfnKeyPair`.

Extends: CfnKeyPairProps
Used as props by: CfnKeyPair

- Source: Generated code
- Type last changed: v2.272.0 · 30 Sep 2026

## Example

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_lightsail as lightsail } from 'aws-cdk-lib';
const cfnKeyPairProps: lightsail.CfnKeyPairProps = {
  keyPairName: 'keyPairName',

  // the properties below are optional
  tags: [{
    key: 'key',
    value: 'value',
  }],
};
```

## Properties

- `keyPairName`: string (required) — The name of the key pair.

- `tags`: [CfnTag](/cdk/api/v2/docs/aws-cdk-lib.CfnTag.html)[] — The tag keys and optional values to add to the resource during create.
