List of usage examples for com.amazonaws.services.elasticache AmazonElastiCacheClient setRegion
@Deprecated public void setRegion(Region region) throws IllegalArgumentException
From source file:org.springframework.cloud.aws.cache.config.annotation.ElastiCacheCachingConfiguration.java
License:Apache License
@Bean @ConditionalOnMissingAmazonClient(AmazonElastiCache.class) public AmazonElastiCache amazonElastiCache() { AmazonElastiCacheClient elastiCacheClient; if (this.credentialsProvider != null) { elastiCacheClient = new AmazonElastiCacheClient(this.credentialsProvider); } else {/*from w w w .j a va2s . c o m*/ elastiCacheClient = new AmazonElastiCacheClient(); } if (this.regionProvider != null) { elastiCacheClient.setRegion(this.regionProvider.getRegion()); } return elastiCacheClient; }