AWS Fundamentals Logo
AWS Fundamentals
L1 ConstructAWS::EC2::VPCDHCPOptionsAssociation

CfnVPCDHCPOptionsAssociation

Associates a set of DHCP options with a VPC, or associates no DHCP options with the VPC. After you associate the options with the VPC, any existing instances and all new instances that you launch in that VPC use the options. You don't need to restart or relaunch the instances. They automatically pick up the changes within a few hours, depending on how frequently the instance renews its DHCP lease. You can explicitly renew the lease using the operating system on the instance.

Import

import { CfnVPCDHCPOptionsAssociation } from 'aws-cdk-lib/aws-ec2';

Or use the module namespace:

import * as ec2 from 'aws-cdk-lib/aws-ec2';
// ec2.CfnVPCDHCPOptionsAssociation

Properties

Configuration passed to the constructor as CfnVPCDHCPOptionsAssociationProps.

dhcpOptionsIdRequired
string | IDHCPOptionsRef

The ID of the DHCP options set, or `default` to associate no DHCP options with the VPC.

vpcIdRequired
string | IVPCRef

The ID of the VPC.

CloudFormation Resource

This L1 construct maps directly to the following CloudFormation resource type.

Get the Amazon EC2 Cheat Sheet

Everything you need to know about Amazon EC2 on one page. HD quality, print-friendly.

Download Free Infographic