# CfnHostProps

Properties for defining a `CfnHost`.

Extends: CfnHostProps
Used as props by: CfnHost

- Source: Generated code
- Type last changed: v2.241.0 · 2 Mar 2026

## Example

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_ec2 as ec2 } from 'aws-cdk-lib';
const cfnHostProps: ec2.CfnHostProps = {
  availabilityZone: 'availabilityZone',

  // the properties below are optional
  assetId: 'assetId',
  autoPlacement: 'autoPlacement',
  hostMaintenance: 'hostMaintenance',
  hostRecovery: 'hostRecovery',
  instanceFamily: 'instanceFamily',
  instanceType: 'instanceType',
  outpostArn: 'outpostArn',
  tags: [{
    key: 'key',
    value: 'value',
  }],
};
```

## Properties

- `assetId`: string — The ID of the Outpost hardware asset on which the Dedicated Host is allocated.

- `autoPlacement`: string = "on" — Indicates whether the host accepts any untargeted instance launches that match its instance type configuration, or if it only accepts Host tenancy instance launches that specify its unique host ID.

  For more information, see [Understanding auto-placement and affinity](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/how-dedicated-hosts-work.html#dedicated-hosts-understanding) in the *Amazon EC2 User Guide* .

  Default: `off`

- `availabilityZone`: string (required) — The Availability Zone in which to allocate the Dedicated Host.

- `hostMaintenance`: string = "off" — Indicates whether host maintenance is enabled or disabled for the Dedicated Host.

- `hostRecovery`: string = "off" — Indicates whether to enable or disable host recovery for the Dedicated Host.

  Host recovery is disabled by default. For more information, see [Host recovery](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/dedicated-hosts-recovery.html) in the *Amazon EC2 User Guide* .

  Default: `off`

- `instanceFamily`: string — The instance family supported by the Dedicated Host.

  For example, `m5` .

- `instanceType`: string — Specifies the instance type to be supported by the Dedicated Hosts.

  If you specify an instance type, the Dedicated Hosts support instances of the specified instance type only.

- `outpostArn`: string — The Amazon Resource Name (ARN) of the AWS Outpost on which the Dedicated Host is allocated.

- `tags`: [CfnTag](/cdk/api/v2/docs/aws-cdk-lib.CfnTag.html)[] — Any tags assigned to the Dedicated Host.
