This is an automated email from the ASF dual-hosted git repository. acosentino pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/camel.git
commit fdda3c706d2cfd24ae9d2bd542fe2f0a670d3e91 Author: Andrea Cosentino <anco...@gmail.com> AuthorDate: Tue Jan 30 08:55:13 2018 +0100 Camel-AWS CW - Use Regions.valueOf in the verifier --- .../apache/camel/component/aws/cw/CwComponentVerifierExtension.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/components/camel-aws/src/main/java/org/apache/camel/component/aws/cw/CwComponentVerifierExtension.java b/components/camel-aws/src/main/java/org/apache/camel/component/aws/cw/CwComponentVerifierExtension.java index faa8787..375b449 100644 --- a/components/camel-aws/src/main/java/org/apache/camel/component/aws/cw/CwComponentVerifierExtension.java +++ b/components/camel-aws/src/main/java/org/apache/camel/component/aws/cw/CwComponentVerifierExtension.java @@ -23,6 +23,7 @@ import com.amazonaws.auth.AWSCredentials; import com.amazonaws.auth.AWSCredentialsProvider; import com.amazonaws.auth.AWSStaticCredentialsProvider; import com.amazonaws.auth.BasicAWSCredentials; +import com.amazonaws.regions.Regions; import com.amazonaws.services.cloudwatch.AmazonCloudWatch; import com.amazonaws.services.cloudwatch.AmazonCloudWatchClientBuilder; @@ -70,7 +71,7 @@ public class CwComponentVerifierExtension extends DefaultComponentVerifierExtens CwConfiguration configuration = setProperties(new CwConfiguration(), parameters); AWSCredentials credentials = new BasicAWSCredentials(configuration.getAccessKey(), configuration.getSecretKey()); AWSCredentialsProvider credentialsProvider = new AWSStaticCredentialsProvider(credentials); - AmazonCloudWatch client = AmazonCloudWatchClientBuilder.standard().withCredentials(credentialsProvider).withRegion(configuration.getRegion()).build(); + AmazonCloudWatch client = AmazonCloudWatchClientBuilder.standard().withCredentials(credentialsProvider).withRegion(Regions.valueOf(configuration.getRegion())).build(); client.listMetrics(); } catch (SdkClientException e) { ResultErrorBuilder errorBuilder = ResultErrorBuilder.withCodeAndDescription(VerificationError.StandardCode.AUTHENTICATION, e.getMessage()) -- To stop receiving notification emails like this one, please contact acosent...@apache.org.