use of com.netflix.titus.api.connector.cloud.InstanceGroup in project titus-control-plane by Netflix.
the class AwsInstanceCloudConnector method doDetach.
private Completable doDetach(String instanceGroup, List<String> instanceIds, boolean shrink) {
DetachInstancesRequest request = new DetachInstancesRequest().withAutoScalingGroupName(instanceGroup).withInstanceIds(instanceIds).withShouldDecrementDesiredCapacity(shrink);
Observable<DetachInstancesResult> observable = toObservable(request, autoScalingClient::detachInstancesAsync);
return observable.doOnCompleted(() -> logger.info("Detached instances: {}", instanceIds)).doOnError(e -> logger.warn("Failed to detach instances: {}, due to {}", instanceIds, e.getMessage())).toCompletable();
}
Aggregations