EC2 / Client / delete_route_table

delete_route_table#

EC2.Client.delete_route_table(**kwargs)#

Deletes the specified route table. You must disassociate the route table from any subnets before you can delete it. You can’t delete the main route table.

See also: AWS API Documentation

Request Syntax

response = client.delete_route_table(
    DryRun=True|False,
    RouteTableId='string'
)
Parameters:
  • DryRun (boolean) – Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.

  • RouteTableId (string) –

    [REQUIRED]

    The ID of the route table.

Returns:

None

Examples

This example deletes the specified route table.

response = client.delete_route_table(
    RouteTableId='rtb-22574640',
)

print(response)

Expected Output:

{
    'ResponseMetadata': {
        '...': '...',
    },
}