Example usage for com.amazonaws.services.elasticloadbalancing AmazonElasticLoadBalancing setEndpoint

List of usage examples for com.amazonaws.services.elasticloadbalancing AmazonElasticLoadBalancing setEndpoint

Introduction

In this page you can find the example usage for com.amazonaws.services.elasticloadbalancing AmazonElasticLoadBalancing setEndpoint.

Prototype

@Deprecated
void setEndpoint(String endpoint);

Source Link

Document

Overrides the default endpoint for this client ("elasticloadbalancing.amazonaws.com").

Usage

From source file:jp.primecloud.auto.aws.amazon.AmazonAwsClientFactory.java

License:Open Source License

/**
 * {@inheritDoc}//from w  ww .jav  a 2  s .  c  om
 */
@Override
public AmazonElasticLoadBalancing createElbClient(String awsAccessId, String awsSecretKey) {
    AWSCredentials credentials = new BasicAWSCredentials(awsAccessId, awsSecretKey);
    ClientConfiguration configuration = createConfiguration();

    AmazonElasticLoadBalancing client = new AmazonElasticLoadBalancingClient(credentials, configuration);

    if (host != null) {
        client.setEndpoint(AmazonElasticLoadBalancing.ENDPOINT_PREFIX + "." + host);
    }

    client = new ExceptionHandleAwsClientWrapper().wrap(client);

    return client;
}