Associates a set of DHCP options (that you’ve previously created) with the specified VPC. Or, associates the default DHCP options with the VPC. The default set consists of the standard EC2 host name, no domain name, no DNS server, no NTP server, and no NetBIOS server or node type. After you associate the options with the VPC, any existing instances and all new instances that you launch in that VPC use the options. For more information about the supported DHCP options and using them with Amazon VPC, go to Using DHCP Options in the Amazon Virtual Private Cloud Developer Guide.
Access
public
Parameters
Parameter |
Type |
Required |
Description |
---|---|---|---|
|
Required |
The ID of the DHCP options to associate with the VPC. Specify “default” to associate the default DHCP options with the VPC. |
|
|
Required |
The ID of the VPC to associate the DHCP options with. |
|
|
Optional |
An associative array of parameters that can have the following keys:
|
Returns
Type |
Description |
---|---|
A |
Examples
Associate a set of DHCP options with a VPC.
$ec2 = new AmazonEC2(); $response = $ec2->associate_dhcp_options('dopt-2a7ad743', 'vpc-abcd1234'); var_dump($response->isOK());Result:
bool(true)
Related Methods
Source
Method defined in services/ec2.class.php | Toggle source view (8 lines) | View on GitHub