use of com.amazonaws.services.autoscaling.model.DescribeAutoScalingInstancesRequest in project opencast by opencast.
the class AutoScalingTerminationStateService method getAutoScalingGroupName.
private String getAutoScalingGroupName() {
DescribeAutoScalingInstancesRequest request = new DescribeAutoScalingInstancesRequest().withInstanceIds(instanceId);
DescribeAutoScalingInstancesResult result = autoScaling.describeAutoScalingInstances(request);
List<AutoScalingInstanceDetails> instances = result.getAutoScalingInstances();
logger.debug("Found {} autoscaling instances", instances.size());
if (!instances.isEmpty()) {
AutoScalingInstanceDetails autoScalingInstance = instances.get(0);
return autoScalingInstance.getAutoScalingGroupName();
}
return null;
}
Aggregations