# CfnHostKeyProps

Properties for defining a `CfnHostKey`.

Extends: CfnHostKeyProps
Used as props by: CfnHostKey

- Source: Generated code
- Type last changed: v2.268.0 · 2 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_transfer as transfer } from 'aws-cdk-lib';
const cfnHostKeyProps: transfer.CfnHostKeyProps = {
  serverId: 'serverId',

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

## Properties

- `description`: string — The text description for this host key.

- `hostKeyBody`: string — The private key portion of an SSH key pair.

  Transfer Family accepts RSA, ECDSA, and ED25519 keys.

- `serverId`: string (required) — The identifier of the server that contains the host key.

- `tags`: [CfnTag](/cdk/api/v2/docs/aws-cdk-lib.CfnTag.html)[] — Key-value pairs that can be used to group and search for host keys.
