# HostInfoForCreateProperty

An object that represents a host.

> You cannot use `dedicatedHostId` and `placementGroupId` together in the same `HostInfoForCreate` object. This results in a `ValidationException` response.

- Source: Generated at build time
- Type last changed: v2.201.0 · 13 Jun 2025

## Example

TypeScript:

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_evs as evs } from 'aws-cdk-lib';
const hostInfoForCreateProperty: evs.CfnEnvironment.HostInfoForCreateProperty = {
  hostName: 'hostName',
  instanceType: 'instanceType',
  keyName: 'keyName',

  // the properties below are optional
  dedicatedHostId: 'dedicatedHostId',
  placementGroupId: 'placementGroupId',
};
```

Python:

```python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_evs as evs

host_info_for_create_property = evs.CfnEnvironment.HostInfoForCreateProperty(
    host_name="hostName",
    instance_type="instanceType",
    key_name="keyName",

    # the properties below are optional
    dedicated_host_id="dedicatedHostId",
    placement_group_id="placementGroupId"
)
```

Java:

```java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.evs.*;

HostInfoForCreateProperty hostInfoForCreateProperty = HostInfoForCreateProperty.builder()
        .hostName("hostName")
        .instanceType("instanceType")
        .keyName("keyName")

        // the properties below are optional
        .dedicatedHostId("dedicatedHostId")
        .placementGroupId("placementGroupId")
        .build();
```

C# / .NET:

```csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.EVS;

var hostInfoForCreateProperty = new HostInfoForCreateProperty {
    HostName = "hostName",
    InstanceType = "instanceType",
    KeyName = "keyName",

    // the properties below are optional
    DedicatedHostId = "dedicatedHostId",
    PlacementGroupId = "placementGroupId"
};
```

Golang:

```go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

hostInfoForCreateProperty := &HostInfoForCreateProperty{
	HostName: jsii.String("hostName"),
	InstanceType: jsii.String("instanceType"),
	KeyName: jsii.String("keyName"),

	// the properties below are optional
	DedicatedHostId: jsii.String("dedicatedHostId"),
	PlacementGroupId: jsii.String("placementGroupId"),
}
```

## Properties

- `dedicatedHostId`: string — The unique ID of the Amazon EC2 Dedicated Host.

- `hostName`: string (required) — The DNS hostname of the host.

  DNS hostnames for hosts must be unique across Amazon EVS environments and within VCF.

- `instanceType`: string (required) — The EC2 instance type that represents the host.

- `keyName`: string (required) — The name of the SSH key that is used to access the host.

- `placementGroupId`: string — The unique ID of the placement group where the host is placed.
