Example usage for com.amazonaws.services.elasticloadbalancing AmazonElasticLoadBalancingClient builder

List of usage examples for com.amazonaws.services.elasticloadbalancing AmazonElasticLoadBalancingClient builder

Introduction

In this page you can find the example usage for com.amazonaws.services.elasticloadbalancing AmazonElasticLoadBalancingClient builder.

Prototype

public static AmazonElasticLoadBalancingClientBuilder builder() 

Source Link

Usage

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

License:Apache License

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

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

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

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