use of com.amazonaws.services.elasticloadbalancing.model.DeleteLoadBalancerRequest in project photon-model by vmware.
the class AWSLoadBalancerServiceTest method deleteAwsLoadBalancer.
private void deleteAwsLoadBalancer(String name) {
if (this.isMock) {
return;
}
try {
DeleteLoadBalancerRequest deleteRequest = new DeleteLoadBalancerRequest(name);
this.client.deleteLoadBalancer(deleteRequest);
} catch (Exception e) {
this.host.log("Exception deleting a load balancer '%s': %s", name, e.toString());
}
}
use of com.amazonaws.services.elasticloadbalancing.model.DeleteLoadBalancerRequest 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