Search in sources :

Example 1 with AssociateRouteTableResult

use of com.amazonaws.services.ec2.model.AssociateRouteTableResult 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 -> {
    });
}
Also used : AssociateRouteTableResult(com.amazonaws.services.ec2.model.AssociateRouteTableResult) AssociateRouteTableRequest(com.amazonaws.services.ec2.model.AssociateRouteTableRequest)

Aggregations

AssociateRouteTableRequest (com.amazonaws.services.ec2.model.AssociateRouteTableRequest)1 AssociateRouteTableResult (com.amazonaws.services.ec2.model.AssociateRouteTableResult)1