delete_route ( $route_table_id, $destination_cidr_block, $opt )

Deletes a route from a route table in a VPC. For more information about route tables, go to Route Tables in the Amazon Virtual Private Cloud User Guide.

Access

public

Parameters

Parameter

Type

Required

Description

$route_table_id

string

Required

The ID of the route table where the route will be deleted.

$destination_cidr_block

string

Required

The CIDR range for the route you want to delete. The value you specify must exactly match the CIDR for the route you want 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 VPC route.

$ec2 = new AmazonEC2();

$response = $ec2->delete_route('rtb-e68b0b8f', '0.0.0.0/0');

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

public function delete_route($route_table_id, $destination_cidr_block, $opt = null)
{
    if (!$opt) $opt = array();
    $opt['RouteTableId'] = $route_table_id;
    $opt['DestinationCidrBlock'] = $destination_cidr_block;
    
    return $this->authenticate('DeleteRoute', $opt);
}

Copyright © 2010–2013 Amazon Web Services, LLC


Feedback