AWS::EC2::VPCDHCPOptionsAssociation
Associates a set of DHCP options (that you've previously created) with the specified VPC.
Topics
Syntax
To declare this entity in your AWS CloudFormation template, use the following syntax:
JSON
{ "Type" : "AWS::EC2::VPCDHCPOptionsAssociation", "Properties" : { "DhcpOptionsId" :String, "VpcId" :String} }
YAML
Type: AWS::EC2::VPCDHCPOptionsAssociation Properties: DhcpOptionsId:StringVpcId:String
Properties
DhcpOptionsId-
The ID of the DHCP options you want to associate with the VPC. Specify
defaultif you want the VPC to use no DHCP options.Required: Yes
Type: String
Update requires: No interruption
VpcId-
The ID of the VPC to associate with this DHCP options set.
Required: Yes
Type: String
Update requires: Replacement
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
The following snippet uses the Ref intrinsic function to associate the
myDHCPOptions DHCP options with the myVPC VPC. The VPC and
DHCP options can be declared in the same template or added as input parameters. For
more
information about the VPC or the DHCP options resources, see AWS::EC2::VPC or AWS::EC2::DHCPOptions.
JSON
"myVPCDHCPOptionsAssociation" : { "Type" : "AWS::EC2::VPCDHCPOptionsAssociation", "Properties" : { "VpcId" : {"Ref" : "myVPC"}, "DhcpOptionsId" : {"Ref" : "myDHCPOptions"} } }
YAML
myVPCDHCPOptionsAssociation: Type: AWS::EC2::VPCDHCPOptionsAssociation Properties: VpcId: Ref: myVPC DhcpOptionsId: Ref: myDHCPOptions
See Also
-
AssociateDhcpOptions in the Amazon EC2 API Reference.
