AWS::EC2::DHCPOptions - AWS CloudFormation

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

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 Reffunction, Refreturns the resource name.

For more information about using the Reffunction, see Ref.

Fn::GetAtt

The Fn::GetAttintrinsic function returns a value for a specified attribute of this type. The following are the available attributes and sample return values.

For more information about using the Fn::GetAttintrinsic function, see Fn::GetAtt.

DhcpOptionsId

The ID of the DHCP options set.

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