Package org.jclouds.aws.ec2.features
Interface RouteTableApi
-
@Path("/") public interface RouteTableApi
Provides access to AWS Route Table services.- See Also:
- RouteTable docs
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description String
associateRouteTable(String region, String routeTableId, String subnetId)
Associates a subnet with a route table.String
associateRouteTable(String region, String routeTableId, String subnetId, RouteTableOptions options)
boolean
createRoute(String region, String routeTableId, RouteOptions options)
Creates a route in a route table within a VPC.RouteTable
createRouteTable(String region, String vpcId)
Creates aRouteTable
RouteTable
createRouteTable(String region, String vpcId, RouteTableOptions options)
Creates aRouteTable
, supplying options.boolean
deleteRoute(String region, String routeTableId, RouteOptions options)
Delete a route from a route table.boolean
deleteRouteTable(String region, String routeTableId)
Deletes aRouteTable
boolean
deleteRouteTable(String region, String routeTableId, RouteTableOptions options)
Delete aRouteTable
, supplying options.com.google.common.collect.FluentIterable<RouteTable>
describeRouteTables(String region, String... routeTableIds)
Describes route tables.boolean
disassociateRouteTable(String region, String associationId)
Disassociates a subnet from a route table.boolean
disassociateRouteTable(String region, String associationId, RouteTableOptions options)
boolean
replaceRoute(String region, String routeTableId, RouteOptions options)
Replaces a route in a route table within a VPC.
-
-
-
Method Detail
-
createRouteTable
@Named("CreateRouteTable") @POST RouteTable createRouteTable(@Nullable String region, @FormParam("VpcId") String vpcId)
Creates aRouteTable
- Parameters:
region
- The region to create the table in.vpcId
- The ID of the VPC- Returns:
- The route table
-
createRouteTable
@Named("CreateRouteTable") @POST RouteTable createRouteTable(@Nullable String region, @FormParam("VpcId") String vpcId, RouteTableOptions options)
Creates aRouteTable
, supplying options.- Parameters:
region
- The region to create the table invpcId
- The ID of the VPCoptions
- Options for the request- Returns:
- The route table
-
deleteRouteTable
@Named("DeleteRouteTable") @POST boolean deleteRouteTable(@Nullable String region, @FormParam("RouteTableId") String routeTableId)
Deletes aRouteTable
- Parameters:
region
- The region to delete the table fromrouteTableId
- The ID of the table to delete- Returns:
- true if the route table was found and deleted
-
deleteRouteTable
@Named("DeleteRouteTable") @POST boolean deleteRouteTable(@Nullable String region, @FormParam("RouteTableId") String routeTableId, RouteTableOptions options)
Delete aRouteTable
, supplying options.- Parameters:
region
- The region to delete the table fromrouteTableId
- The ID of the table to deleteoptions
- Options for the request- Returns:
- true if the route table was found and deleted
-
associateRouteTable
@Named("AssociateRouteTable") @POST String associateRouteTable(@Nullable String region, @FormParam("RouteTableId") String routeTableId, @FormParam("SubnetId") String subnetId)
Associates a subnet with a route table. The subnet and route table must be in the same VPC. This association causes traffic originating from the subnet to be routed according to the routes in the route table. The action returns an association ID, which you need in order to disassociate the route table from the subnet later. A route table can be associated with multiple subnets.- Parameters:
region
- Region of the VPC for the route tablerouteTableId
- ID of the route tablesubnetId
- ID of the subnet to associate- Returns:
- The association ID which you need in order to disassociate the route table from the subnet later.
-
associateRouteTable
@Named("AssociateRouteTable") @POST String associateRouteTable(@Nullable String region, @FormParam("RouteTableId") String routeTableId, @FormParam("SubnetId") String subnetId, RouteTableOptions options)
- Parameters:
region
- Region of the VPC for the route tablerouteTableId
- ID of the route tablesubnetId
- ID of the subnet to associateoptions
- Options for the request- Returns:
- The association ID which you need in order to disassociate the route table from the subnet later.
- See Also:
associateRouteTable(java.lang.String, java.lang.String, java.lang.String)
-
disassociateRouteTable
@Named("DisassociateRouteTable") @POST boolean disassociateRouteTable(@Nullable String region, @FormParam("AssociationId") String associationId)
Disassociates a subnet from a route table. After you perform this action, the subnet no longer uses the routes in the route table. Instead, it uses the routes in the VPC's main route table.- Parameters:
region
- Region of the route tableassociationId
- association id returned byassociateRouteTable(String, String, String)
- Returns:
- true if the subnet was found and disassociated.
-
disassociateRouteTable
@Named("DisassociateRouteTable") @POST boolean disassociateRouteTable(@Nullable String region, @FormParam("AssociationId") String associationId, RouteTableOptions options)
- Parameters:
region
- Region of the route tableassociationId
- association id returned byassociateRouteTable(String, String, String)
options
- Options for the request- Returns:
- true if the subnet was found and disassociated.
- See Also:
disassociateRouteTable(String, String)
-
createRoute
@Named("CreateRoute") @POST boolean createRoute(@Nullable String region, @FormParam("RouteTableId") String routeTableId, RouteOptions options)
Creates a route in a route table within a VPC.- Parameters:
region
- region of the VPCrouteTableId
- ID of the route table to put the route inoptions
- You must specify one of the following targets: Internet gateway or virtual private gateway, NAT instance, NAT gateway, VPC peering connection, network interface, or egress-only Internet gateway.- Returns:
- true if the route was created
-
replaceRoute
@Named("ReplaceRoute") @POST boolean replaceRoute(@Nullable String region, @FormParam("RouteTableId") String routeTableId, RouteOptions options)
Replaces a route in a route table within a VPC.- Parameters:
region
- region of the VPCrouteTableId
- ID of the route table containing the route to replaceoptions
- You must specify only one of the following targets: Internet gateway or virtual private gateway, NAT instance, NAT gateway, VPC peering connection, network interface, or egress-only Internet gateway.- Returns:
- true if the route was found and replaced
-
deleteRoute
@Named("DeleteRoute") @POST boolean deleteRoute(@Nullable String region, @FormParam("RouteTableId") String routeTableId, RouteOptions options)
Delete a route from a route table.- Parameters:
region
- region of the VPCrouteTableId
- ID of the route table owning the routeoptions
- This should include the destination CIDR block of the route to delete- Returns:
- true if the route was found and deleted
Example:
api.deleteRoute(region, routeTable.id(), destinationCidrBlock("10.20.30.0/24"))
-
describeRouteTables
@Named("DescribeRouteTables") @POST com.google.common.collect.FluentIterable<RouteTable> describeRouteTables(@Nullable String region, String... routeTableIds)
Describes route tables.- Parameters:
region
- The region to search for route tables.
-
-