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 30d41cd3bed3101b29330786af948f41ee9cf22c
Author: Andrea Cosentino <anco...@gmail.com>
AuthorDate: Tue Jan 30 08:58:30 2018 +0100

    Camel-AWS DDBStreams - Use Regions.valueOf in the verifier
---
 .../component/aws/ddbstream/DdbStreamComponentVerifierExtension.java   | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git 
a/components/camel-aws/src/main/java/org/apache/camel/component/aws/ddbstream/DdbStreamComponentVerifierExtension.java
 
b/components/camel-aws/src/main/java/org/apache/camel/component/aws/ddbstream/DdbStreamComponentVerifierExtension.java
index ebfba2d..942d74f 100644
--- 
a/components/camel-aws/src/main/java/org/apache/camel/component/aws/ddbstream/DdbStreamComponentVerifierExtension.java
+++ 
b/components/camel-aws/src/main/java/org/apache/camel/component/aws/ddbstream/DdbStreamComponentVerifierExtension.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.dynamodbv2.AmazonDynamoDBStreams;
 import com.amazonaws.services.dynamodbv2.AmazonDynamoDBStreamsClientBuilder;
 import com.amazonaws.services.dynamodbv2.model.ListStreamsRequest;
@@ -71,7 +72,7 @@ public class DdbStreamComponentVerifierExtension extends 
DefaultComponentVerifie
             DdbStreamConfiguration configuration = setProperties(new 
DdbStreamConfiguration(), parameters);
             AWSCredentials credentials = new 
BasicAWSCredentials(configuration.getAccessKey(), configuration.getSecretKey());
             AWSCredentialsProvider credentialsProvider = new 
AWSStaticCredentialsProvider(credentials);
-            AmazonDynamoDBStreams client = 
AmazonDynamoDBStreamsClientBuilder.standard().withCredentials(credentialsProvider).withRegion(configuration.getRegion()).build();
+            AmazonDynamoDBStreams client = 
AmazonDynamoDBStreamsClientBuilder.standard().withCredentials(credentialsProvider).withRegion(Regions.valueOf(configuration.getRegion())).build();
             client.listStreams(new ListStreamsRequest());
         } 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.

Reply via email to