delete_dhcp_options ( $dhcp_options_id, $opt )

Deletes a set of DHCP options that you specify. Amazon VPC returns an error if the set of options you specify is currently associated with a VPC. You can disassociate the set of options by associating either a new set of options or the default options with the VPC.

Access

public

Parameters

Parameter

Type

Required

Description

$dhcp_options_id

string

Required

The ID of the DHCP options set to delete.

$opt

array

Optional

An associative array of parameters that can have the following keys:

  • curlopts - array - Optional - A set of values to pass directly into curl_setopt(), where the key is a pre-defined CURLOPT_* constant.
  • returnCurlHandle - boolean - Optional - A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.

Returns

Type

Description

CFResponse

A CFResponse object containing a parsed HTTP response.

Examples

Delete a set of DHCP options.

$ec2 = new AmazonEC2();

$response1 = $ec2->associate_dhcp_options('default', 'vpc-abcd1234');

sleep(10);

$response2 = $ec2->delete_dhcp_options('dopt-427bd62b');

var_dump($response2->isOK());
Result:
bool(true)

Related Methods

Source

Method defined in services/ec2.class.php | Toggle source view (7 lines) | View on GitHub

public function delete_dhcp_options($dhcp_options_id, $opt = null)
{
    if (!$opt) $opt = array();
    $opt['DhcpOptionsId'] = $dhcp_options_id;
    
    return $this->authenticate('DeleteDhcpOptions', $opt);
}

Copyright © 2010–2013 Amazon Web Services, LLC


Feedback