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
, specifyec2.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 isAmazonProvidedDNS
. To have your instance receive a custom DNS hostname as specified inDomainName
, 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 Ref
function, Ref
returns the resource name.
For more information about using the Ref
function, see Ref.
Fn::GetAtt
The Fn::GetAtt
intrinsic 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::GetAtt
intrinsic function, see Fn::GetAtt.
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
-
CreateDhcpOptions in the Amazon EC2 API Reference
-
DHCP options sets in the Amazon VPC User Guide