use of com.amazonaws.services.ec2.model.CreateRouteTableResult in project photon-model by vmware.
the class AWSNetworkClient method createRouteTable.
/**
* Create a route table
*/
public DeferredResult<String> createRouteTable(String vpcId) {
CreateRouteTableRequest req = new CreateRouteTableRequest().withVpcId(vpcId);
String message = "Create AWS Route Table on VPC [" + vpcId + "].";
AWSDeferredResultAsyncHandler<CreateRouteTableRequest, CreateRouteTableResult> handler = new AWSDeferredResultAsyncHandler<>(this.service, message);
this.client.createRouteTableAsync(req, handler);
return handler.toDeferredResult().thenApply(CreateRouteTableResult::getRouteTable).thenApply(RouteTable::getRouteTableId);
}
Aggregations