Java 类com.amazonaws.services.autoscaling.AmazonAutoScalingClientBuilder 实例源码

项目:aem-orchestrator    文件:AwsConfig.java   
@Bean
public AmazonAutoScaling amazonAutoScalingClient(final AWSCredentialsProvider awsCredentialsProvider,
    final ClientConfiguration awsClientConfig, final Region awsRegion) {
    return AmazonAutoScalingClientBuilder.standard()
        .withCredentials(awsCredentialsProvider)
        .withClientConfiguration(awsClientConfig)
        .withRegion(awsRegion.getName())
        .build();
}
项目:cmn-project    文件:AutoScaling.java   
public AutoScaling(AWSCredentialsProvider credentials, Regions region) {
    autoScaling = AmazonAutoScalingClientBuilder.standard().withRegion(region).withCredentials(credentials).build();
}
项目:scale.cloudpool    文件:AutoScalingApiClient.java   
/**
 * Constructs a new {@link AutoScalingApiClient} that operates against a
 * given AWS region.
 *
 * @param awsCredentials
 *            The AWS credentials used to connect to the AWS account.
 * @param region
 *            The AWS region that this client operates against.
 * @param clientConfiguration
 *            Any HTTP client configuration to customize API invocations.
 */
public AutoScalingApiClient(AWSCredentials awsCredentials, String region, ClientConfiguration clientConfiguration) {
    // limit the time-to-live of the JVM's DNS cache (in seconds)
    java.security.Security.setProperty("networkaddress.cache.ttl", "60");

    this.region = region;

    this.api = AmazonAutoScalingClientBuilder.standard().withRegion(region)
            .withCredentials(new AWSStaticCredentialsProvider(awsCredentials)).build();
}