AWS::EC2::DHCPOptionsSpecifies a set of DHCP options for your VPC. You must specify at least one of the following properties: `DomainNameServers` , `NetbiosNameServers` , `NtpServers` . If you specify `NetbiosNameServers` , you must specify `NetbiosNodeType` .
import { CfnDHCPOptions } from 'aws-cdk-lib/aws-ec2';Or use the module namespace:
import * as ec2 from 'aws-cdk-lib/aws-ec2';
// ec2.CfnDHCPOptionsConfiguration passed to the constructor as CfnDHCPOptionsProps.
domainNameOptionalstringThis value is used to complete unqualified DNS hostnames. If you're using AmazonProvidedDNS in `us-east-1` , specify `ec2.internal` . If you're using AmazonProvidedDNS in another Region, specify *region* . `compute.internal` (for example, `ap-northeast-1.compute.internal` ). Otherwise, specify a domain name (for example, *MyCompany.com* ).
domainNameServersOptionalstring[]The IPv4 addresses of up to four domain name servers, or `AmazonProvidedDNS` . The default is `AmazonProvidedDNS` . To have your instance receive a custom DNS hostname as specified in `DomainName` , you must set this property to a custom DNS server.
ipv6AddressPreferredLeaseTimeOptionalnumberA value (in seconds, minutes, hours, or years) for how frequently a running instance with an IPv6 assigned to it goes through DHCPv6 lease renewal. Acceptable values are between 140 and 2147483647 seconds (approximately 68 years). If no value is entered, the default lease time is 140 seconds. If you use long-term addressing for EC2 instances, you can increase the lease time and avoid frequent lease renewal requests. Lease renewal typically occurs when half of the lease time has elapsed.
netbiosNameServersOptionalstring[]The IPv4 addresses of up to four NetBIOS name servers.
netbiosNodeTypeOptionalnumberThe NetBIOS node type (1, 2, 4, or 8). We recommend that you specify 2 (broadcast and multicast are not currently supported).
ntpServersOptionalstring[]The IPv4 addresses of up to four Network Time Protocol (NTP) servers.
tagsOptionalCfnTag[]Any tags assigned to the DHCP options set.
This L1 construct maps directly to the following CloudFormation resource type.
Everything you need to know about Amazon EC2 on one page. HD quality, print-friendly.
Download Free Infographicaws-ec2AWS::EC2::DHCPOptions