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
-
In the Net Access Points dashboard, check the box of the Net access point you want to modify the route tables for.
The Net access point is selected. -
Click Update.
The UPDATE NET ACCESS POINT dialog box appears. -
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.
-
If removing a route table from the VPC endpoint, uncheck the box with its ID from the Route table(s) section.
Multiselection is available.
-
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.
$ osc-cli api UpdateNetAccessPoint --profile "default" \
--NetAccessPointId "vpce-12345678" \
--AddRouteTableIds '["rtb-87654321"]'
$ 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.-
NetAccessPointId
: The ID of the Net access point. -
NetId
: The ID of the Net with which the Net access point is associated. -
RouteTableIds
: The ID of the route tables associated with the Net access point. -
ServiceName
: The name of the service with which the Net access point is associated. -
State
: The state of the Net access point (pending
|available
|deleting
|deleted
). -
Tags
: One or more tags associated with the Net access point.-
Key
: The key of the tag, with a minimum of 1 character. -
Value
: The value of the tag, between 0 and 255 characters.
-
-
-
ResponseContext
: Information about the context of the response.-
RequestId
: The ID of the request.
-
{
"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"
}
}
{
"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 Net Access Point Using oapi-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.
$ oapi-cli --profile "default" UpdateNetAccessPoint \
--NetAccessPointId "vpce-12345678" \
--AddRouteTableIds '["rtb-87654321"]'
$ oapi-cli --profile "default" UpdateNetAccessPoint \
--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.-
NetAccessPointId
: The ID of the Net access point. -
NetId
: The ID of the Net with which the Net access point is associated. -
RouteTableIds
: The ID of the route tables associated with the Net access point. -
ServiceName
: The name of the service with which the Net access point is associated. -
State
: The state of the Net access point (pending
|available
|deleting
|deleted
). -
Tags
: One or more tags associated with the Net access point.-
Key
: The key of the tag, with a minimum of 1 character. -
Value
: The value of the tag, between 0 and 255 characters.
-
-
-
ResponseContext
: Information about the context of the response.-
RequestId
: The ID of the request.
-
{
"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"
}
}
{
"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
Before you begin: Install and configure AWS CLI. For more information, see Installing and Configuring 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:
$ 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. For more information, see Installing and Configuring AWS CLI.
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.