# CfnVPCDHCPOptionsAssociationProps

Properties for defining a `CfnVPCDHCPOptionsAssociation`.

Used as props by: [CfnVPCDHCPOptionsAssociation](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_ec2.CfnVPCDHCPOptionsAssociation.html)

- Source: Generated at build time
- Type last changed: v2.227.0 · 21 Nov 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_ec2 as ec2 } from 'aws-cdk-lib';
const cfnVPCDHCPOptionsAssociationProps: ec2.CfnVPCDHCPOptionsAssociationProps = {
  dhcpOptionsId: 'dhcpOptionsId',
  vpcId: 'vpcId',
};
```

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_ec2 as ec2

cfn_vpcdhcp_options_association_props = ec2.CfnVPCDHCPOptionsAssociationProps(
    dhcp_options_id="dhcpOptionsId",
    vpc_id="vpcId"
)
```

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.ec2.*;

CfnVPCDHCPOptionsAssociationProps cfnVPCDHCPOptionsAssociationProps = CfnVPCDHCPOptionsAssociationProps.builder()
        .dhcpOptionsId("dhcpOptionsId")
        .vpcId("vpcId")
        .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.EC2;

var cfnVPCDHCPOptionsAssociationProps = new CfnVPCDHCPOptionsAssociationProps {
    DhcpOptionsId = "dhcpOptionsId",
    VpcId = "vpcId"
};
```

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"

cfnVPCDHCPOptionsAssociationProps := &CfnVPCDHCPOptionsAssociationProps{
	DhcpOptionsId: jsii.String("dhcpOptionsId"),
	VpcId: jsii.String("vpcId"),
}
```

## Properties

- `dhcpOptionsId`: string | [IDHCPOptionsRef](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.interfaces.aws_ec2.IDHCPOptionsRef.html) (required) — The ID of the DHCP options set, or `default` to associate no DHCP options with the VPC.

- `vpcId`: string | [IVPCRef](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.interfaces.aws_ec2.IVPCRef.html) (required) — The ID of the VPC.
