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);
}
Aggregations