AWS::EC2::DHCPOptions
Creates a set of DHCP options for your VPC.
For more information, see CreateDhcpOptions in the Amazon EC2 API Reference.
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" :Number
, "NtpServers" : [String, ...
], "Tags" : [Resource Tag, ...
] } }
YAML
Type: AWS::EC2::DHCPOptions Properties: DomainName:
String
DomainNameServers: -String
NetbiosNameServers: -String
NetbiosNodeType:Number
NtpServers: -String
Tags: -Resource Tag
Properties
DomainName
-
A domain name of your choice.
Required: Conditional; see note.
Type: String
Update requires: Replacement
Example:
"example.com"
DomainNameServers
-
The IP (IPv4) address of a domain name server. You can specify up to four addresses.
Required: Conditional; see note.
Type: List of String values
Update requires: Replacement
Example:
"DomainNameServers" : [ "10.0.0.1", "10.0.0.2" ]
Example: To preserve the order of IP addresses, specify a comma delimited list as a single string:
"DomainNameServers" : [ "10.0.0.1, 10.0.0.2" ]
NetbiosNameServers
-
The IP address (IPv4) of a NetBIOS name server. You can specify up to four addresses.
Required: Conditional; see note.
Type: List of String values
Update requires: Replacement
Example:
"NetbiosNameServers" : [ "10.0.0.1", "10.0.0.2" ]
Example: To preserve the order of IP addresses, specify a comma delimited list as a single string:
"NetbiosNameServers" : [ "10.0.0.1, 10.0.0.2" ]
NetbiosNodeType
-
An integer value indicating the NetBIOS node type:
-
1: Broadcast ("B")
-
2: Point-to-point ("P")
-
4: Mixed mode ("M")
-
8: Hybrid ("H")
For more information about these values and about NetBIOS node types, see RFC 2132, RFC 1001, and RFC 1002. We recommend that you use only the value
2
at this time (broadcast and multicast are not currently supported).Required: Required if
NetBiosNameServers
is specified; optional otherwise.Type: List of numbers
Update requires: Replacement
Example:
"NetbiosNodeType" : 2
-
NtpServers
-
The IP address (IPv4) of a Network Time Protocol (NTP) server. You can specify up to four addresses.
Required: Conditional; see note.
Type: List of String values
Update requires: Replacement
Example:
"NtpServers" : [ "10.0.0.1" ]
Example: To preserve the order of IP addresses, specify a comma delimited list as a single string:
"NtpServers" : [ "10.0.0.1, 10.0.0.2" ]
Tags
-
An arbitrary set of tags (key–value pairs) for this resource.
Required: No
Type: Resource Tag
Update requires: No interruption.
Conditional Properties
At least one of the following properties must be specified:
After this condition has been fulfilled, the rest of these properties are optional.
If you specify NetbiosNameServers
, then NetbiosNodeType
is
required.
Return Values
Ref
When the logical ID of this resource is provided to the Ref
intrinsic
function, Ref
returns the resource name.
For more information about using the Ref
function, see Ref.
Example
JSON
{ "AWSTemplateFormatVersion" : "2010-09-09", "Resources" : { "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" : "foo", "Value" : "bar" } ] } } } }
YAML
AWSTemplateFormatVersion: "2010-09-09" Resources: 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: foo Value: bar
See Also
-
CreateDhcpOptions in the Amazon EC2 API Reference
-
Using Tags in the Amazon Elastic Compute Cloud User Guide.
-
RFC 2132 - DHCP Options and BOOTP Vendor Extensions, Network Working Group, 1997
-
RFC 1001 - Protocol Standard for a NetBIOS Service on a TCP/UDP Transport: Concepts and Methods, Network Working Group, 1987
-
RFC 1002 - Protocol Standard for a NetBIOS Service on a TCP/UDP Transport: Detailed Specifications, Network Working Group, 1987