Example usage for com.amazonaws.services.ec2 AmazonEC2AsyncClient createRoute

List of usage examples for com.amazonaws.services.ec2 AmazonEC2AsyncClient createRoute

Introduction

In this page you can find the example usage for com.amazonaws.services.ec2 AmazonEC2AsyncClient createRoute.

Prototype

CreateRouteResult createRoute(CreateRouteRequest createRouteRequest);

Source Link

Document

Creates a route in a route table within a VPC.

Usage

From source file:com.vmware.photon.controller.model.adapters.awsadapter.AWSNetworkService.java

License:Open Source License

public void createInternetRoute(String gatewayID, String routeTableID, String subnet,
        AmazonEC2AsyncClient client) {
    CreateRouteRequest req = new CreateRouteRequest().withGatewayId(gatewayID).withRouteTableId(routeTableID)
            .withDestinationCidrBlock(subnet);
    client.createRoute(req);
}