Unlinking a Route Table from a Subnet

You can unlink a route table from a Subnet. This Subnet no longer uses the routes contained in this route table to route network trafic, but uses the routes contained in the main route table instead until you explicitly associate another route table to it.

Unlinking a Route Table from a Subnet Using Cockpit v2

  1. Click inside the Route Tables dashboard to make checkboxes appear.

  2. Check the box of the route table you want to unlink from a Subnet.

  3. Click IconUnlink Unlink from Subnet.
    The UNLINK ROUTE TABLE dialog box appears.

  4. From the list, select the association ID corresponding to the Subnet you want to unlink the route table from.

  5. Click Unlink.
    The route table is unlinked from the Subnet.

Unlinking a Route Table from a Subnet Using OSC CLI

The UnlinkRouteTable command disassociates a Subnet from a route table.
After disassociation, the Subnet can no longer use the routes in this route table, but uses the routes in the main route table of the Net instead.

Request sample
$ osc-cli api UnlinkRouteTable --profile "default" \
    --LinkRouteTableId "rtbassoc-12345678"

This command contains the following attributes that you need to specify:

  • DryRun: (optional) If true, checks whether you have the required permissions to perform the action.

  • LinkRouteTableId: The ID of the association between the route table and the Subnet.

The UnlinkRouteTable command returns the following elements:

  • ResponseContext: Information about the context of the response.

Result sample
{
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  }
}

Disassociating a Route Table from a Subnet Using AWS CLI

To disassociate a route table from a subnet, use the disassociate-route-table command following this syntax:

Request sample
$ aws ec2 disassociate-route-table \
    --profile YOUR_PROFILE \
    --association-id rtbassoc-4321dcba \
    --endpoint https://fcu.eu-west-2.outscale.com

This command contains the following attributes that you need to specify:

  • (optional) profile: The named profile you want to use, created when configuring AWS CLI. For more information, see Installing and Configuring AWS CLI.

  • association-id: The ID of the association between the subnet and the route table. For more information, see Getting Information About Your Route Tables.

  • endpoint: The endpoint corresponding to the Region you want to send the request to.

The route table is disassociated from the subnet.

Related Pages

Corresponding API Methods

AWS™ and Amazon Web Services™ are trademarks of Amazon Technologies, Inc or its affiliates in the United States and/or other countries.