Search in sources :

Example 1 with DeleteLoadBalancerResult

use of com.amazonaws.services.elasticloadbalancing.model.DeleteLoadBalancerResult in project photon-model by vmware.

the class AWSLoadBalancerService method deleteLoadBalancer.

private DeferredResult<AWSLoadBalancerContext> deleteLoadBalancer(AWSLoadBalancerContext context) {
    DeleteLoadBalancerRequest request = new DeleteLoadBalancerRequest().withLoadBalancerName(context.loadBalancerStateExpanded.name);
    String message = "Delete AWS Load Balancer with name [" + context.loadBalancerStateExpanded.name + "]";
    AWSDeferredResultAsyncHandler<DeleteLoadBalancerRequest, DeleteLoadBalancerResult> handler = new AWSDeferredResultAsyncHandler<>(this, message);
    context.client.deleteLoadBalancerAsync(request, handler);
    return handler.toDeferredResult().thenApply(ignore -> context);
}
Also used : AWSDeferredResultAsyncHandler(com.vmware.photon.controller.model.adapters.awsadapter.util.AWSDeferredResultAsyncHandler) DeleteLoadBalancerRequest(com.amazonaws.services.elasticloadbalancing.model.DeleteLoadBalancerRequest) DeleteLoadBalancerResult(com.amazonaws.services.elasticloadbalancing.model.DeleteLoadBalancerResult)

Aggregations

DeleteLoadBalancerRequest (com.amazonaws.services.elasticloadbalancing.model.DeleteLoadBalancerRequest)1 DeleteLoadBalancerResult (com.amazonaws.services.elasticloadbalancing.model.DeleteLoadBalancerResult)1 AWSDeferredResultAsyncHandler (com.vmware.photon.controller.model.adapters.awsadapter.util.AWSDeferredResultAsyncHandler)1