use of com.amazonaws.services.autoscaling.model.SuspendProcessesRequest in project cloudbreak by hortonworks.
the class AwsResourceConnector method suspendAutoScaling.
private void suspendAutoScaling(AuthenticatedContext ac, CloudStack stack) {
AmazonAutoScalingClient amazonASClient = awsClient.createAutoScalingClient(new AwsCredentialView(ac.getCloudCredential()), ac.getCloudContext().getLocation().getRegion().value());
for (Group group : stack.getGroups()) {
String asGroupName = cfStackUtil.getAutoscalingGroupName(ac, group.getName(), ac.getCloudContext().getLocation().getRegion().value());
amazonASClient.suspendProcesses(new SuspendProcessesRequest().withAutoScalingGroupName(asGroupName).withScalingProcesses(SUSPENDED_PROCESSES));
}
}
Aggregations