Example usage for com.amazonaws.services.autoscaling AmazonAutoScalingClient builder

List of usage examples for com.amazonaws.services.autoscaling AmazonAutoScalingClient builder

Introduction

In this page you can find the example usage for com.amazonaws.services.autoscaling AmazonAutoScalingClient builder.

Prototype

public static AmazonAutoScalingClientBuilder builder() 

Source Link

Usage

From source file:com.netflix.edda.AwsClientFactory.java

License:Apache License

public static AmazonAutoScaling newAutoScalingClient(AwsConfiguration config, AWSCredentialsProvider provider,
        String vip, String region) {
    if (config.useMock())
        throw new UnsupportedOperationException("AutoScaling mock not yet supported");

    EddaAutoScalingClient edda = new EddaAutoScalingClient(config, vip, region);

    if (config.useEdda() && !config.wrapAwsClient())
        return edda.readOnly();

    AmazonAutoScaling client = AmazonAutoScalingClient.builder().withCredentials(provider)
            .withClientConfiguration(clientConfig(config)).withRegion(region).build();
    if (config.useEdda())
        client = edda.wrapAwsClient(client);
    return client;
}