Adding or Removing a Route Table Associated with a Net Access Point

You can add or remove route tables associated with the Net access point to specify which Subnets can access the corresponding service through the Net access point.

This action automatically adds or removes the appropriate Net access point route in the specified route table, which enables or disables traffic routing from the associated Subnets to the Net access point.

Adding or Removing a Route Table Associated with a Net Access Point Using Cockpit v2

  1. Click inside the Net Access Points dashboard to make checkboxes appear.

  2. Check the box of the Net access point you want to modify the route tables for.
    The Net access point is selected and an action menu appears.

  3. Click IconEdit Update.
    The UPDATE NET ACCESS POINT dialog box appears.

  4. If adding a route table to the Net access point, check the box with its ID from the Route table(s) section.

    Multiselection is available.

  5. If removing a route table from the VPC endpoint, uncheck the box with its ID from the Route table(s) section.

    Multiselection is available.

  6. Click Update.
    The list of the route tables associated with the Net access point is updated.

Adding or Removing a Route Table Associated with a Net Access Point Using OSC CLI

The UpdateNetAccessPoint command modifies the attributes of a Net access point.
This action enables you to add or remove route tables associated with the specified Net access point.

Request sample: Adding a route table
$ osc-cli api UpdateNetAccessPoint --profile "default" \
    --NetAccessPointId "vpce-12345678" \
    --AddRouteTableIds '["rtb-87654321"]'
Request sample: Removing a route table
$ osc-cli api UpdateNetAccessPoint --profile "default" \
    --NetAccessPointId "vpce-12345678" \
    --RemoveRouteTableIds '["rtb-12345678"]'

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

  • AddRouteTableIds: (optional) One or more IDs of route tables to associate with the specified Net access point.

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

  • NetAccessPointId: The ID of the Net access point.

  • RemoveRouteTableIds: (optional) One or more IDs of route tables to disassociate from the specified Net access point.

The UpdateNetAccessPoint command returns the following elements:

  • NetAccessPoint: Information about the Net access point.

  • ResponseContext: Information about the context of the response.

Result sample: Adding a route table
{
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  },
  "NetAccessPoint": {
    "Tags": [],
    "NetAccessPointId": "vpce-12345678",
    "RouteTableIds": [
      "rtb-12345678",
      "rtb-87654321"
    ],
    "State": "available",
    "NetId": "vpc-12345678",
    "ServiceName": "com.outscale.eu-west-2.oos"
  }
}
Result sample: Removing a route table
{
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  },
  "NetAccessPoint": {
    "Tags": [],
    "NetAccessPointId": "vpce-12345678",
    "RouteTableIds": [],
    "State": "available",
    "NetId": "vpc-12345678",
    "ServiceName": "com.outscale.eu-west-2.oos"
  }
}

Adding or Removing a Route Table Associated with a VPC Endpoint Using AWS CLI

To add or remove a route table associated with a VPC endpoint and the appropriate route, use the modify-vpc-endpoint command following this syntax:

Request sample
$ aws ec2 modify-vpc-endpoint \
    --profile YOUR_PROFILE \
    --vpc-endpoint-id vpce-12345678 \
    --add-route-table-ids rtb-1234abcd rtb-dcba4321 \
    --remove-route-table-ids rtb 5678efgh \
    --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.

  • vpc-endpoints-id: The ID of the VPC endpoint.

  • (optional) add-route-table-ids: One or more IDs of route tables you want to associate with the VPC endpoint.

  • (optional) remove-route-table-ids: One or more IDs of route tables you want to disassociate from the VPC endpoint.

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

The modify-vpc-endpoint command returns a boolean result: if true, the request succeeded and the route is created. Otherwise, it returns an error.

In the above example, the route tables rtb-1234abcd and rtb-4321dcba are associated with the specified VPC endpoint and a route to the VPC endpoint is added to them. The route table rtb-5678efgh is removed from the route tables associated with the VPC endpoint and its VPC endpoint route is deleted.

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.