AWS CloudFormation
User Guide (Version )

The AWS Documentation website is getting a new look!
Try it now and let us know what you think. Switch to the new look >>

You can return to the original look by selecting English in the language selector above.

AWS::EC2::DHCPOptions

Specifies 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.

Syntax

To declare this entity in your AWS CloudFormation template, use the following syntax:

JSON

{ "Type" : "AWS::EC2::DHCPOptions", "Properties" : { "DomainName" : String, "DomainNameServers" : [ String, ... ], "NetbiosNameServers" : [ String, ... ], "NetbiosNodeType" : Integer, "NtpServers" : [ String, ... ], "Tags" : [ Tag, ... ] } }

YAML

Type: AWS::EC2::DHCPOptions Properties: DomainName: String DomainNameServers: - String NetbiosNameServers: - String NetbiosNodeType: Integer NtpServers: - String Tags: - Tag

Properties

DomainName

This 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).

Required: No

Type: String

Update requires: Replacement

DomainNameServers

The IPv4 addresses of up to four domain name servers, or AmazonProvidedDNS. The default DHCP option set specifies AmazonProvidedDNS. If specifying more than one domain name server, specify the IP addresses in a single parameter, separated by commas. To have your instance to receive a custom DNS hostname as specified in DomainName, you must set this to a custom DNS server.

Required: Conditional

Type: List of String

Update requires: Replacement

NetbiosNameServers

The IPv4 addresses of up to four NetBIOS name servers.

Required: Conditional

Type: List of String

Update requires: Replacement

NetbiosNodeType

The NetBIOS node type (1, 2, 4, or 8). We recommend that you specify 2 (broadcast and multicast are not currently supported).

Required: No

Type: Integer

Update requires: Replacement

NtpServers

The IPv4 addresses of up to four Network Time Protocol (NTP) servers.

Required: Conditional

Type: List of String

Update requires: Replacement

Tags

Any tags assigned to the DHCP options set.

Required: No

Type: List of Tag

Update requires: No interruption

Return Values

Ref

When you pass the logical ID of this resource to the intrinsic Ref function, Ref returns the resource name.

For more information about using the Ref function, see Ref.

Examples

YAML

myDhcpOptions: Type: AWS::EC2::DHCPOptions Properties: DomainName: example.com DomainNameServers: - AmazonProvidedDNS NtpServers: - 10.2.5.1 NetbiosNameServers: - 10.2.5.1 NetbiosNodeType: 2 Tags: - Key: project Value: 123

JSON

{ "myDhcpOptions" : { "Type" : "AWS::EC2::DHCPOptions", "Properties" : { "DomainName" : "example.com", "DomainNameServers" : [ "AmazonProvidedDNS" ], "NtpServers" : [ "10.2.5.1" ], "NetbiosNameServers" : [ "10.2.5.1" ], "NetbiosNodeType" : 2, "Tags" : [ { "Key" : "project", "Value" : "123" } ] } } }

See Also