use of com.amazonaws.services.ec2.model.AssociateRouteTableRequest in project photon-model by vmware.
the class AWSNetworkClient method associateSubnetToRouteTable.
/**
* Associate a subnet to an existing route table
*/
public DeferredResult<Void> associateSubnetToRouteTable(String routeTableId, String subnetId) {
AssociateRouteTableRequest req = new AssociateRouteTableRequest().withSubnetId(subnetId).withRouteTableId(routeTableId);
String message = "Associate AWS Subnet [" + subnetId + "] to route table [" + routeTableId + "].";
AWSDeferredResultAsyncHandler<AssociateRouteTableRequest, AssociateRouteTableResult> handler = new AWSDeferredResultAsyncHandler<>(this.service, message);
this.client.associateRouteTableAsync(req, handler);
return handler.toDeferredResult().thenAccept(ignore -> {
});
}
Aggregations