You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ac...@apache.org on 2018/01/30 08:36:41 UTC
[camel] 02/15: Camel-AWS DDB - Use Regions.valueOf in the verifier
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 46c90fdde6600f20c5237181e47f2c166b143bc8
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Tue Jan 30 08:56:01 2018 +0100
Camel-AWS DDB - Use Regions.valueOf in the verifier
---
.../camel/component/aws/ddb/DdbComponentVerifierExtension.java | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/components/camel-aws/src/main/java/org/apache/camel/component/aws/ddb/DdbComponentVerifierExtension.java b/components/camel-aws/src/main/java/org/apache/camel/component/aws/ddb/DdbComponentVerifierExtension.java
index e5ad1d8..7c8890a 100644
--- a/components/camel-aws/src/main/java/org/apache/camel/component/aws/ddb/DdbComponentVerifierExtension.java
+++ b/components/camel-aws/src/main/java/org/apache/camel/component/aws/ddb/DdbComponentVerifierExtension.java
@@ -23,8 +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.services.cloudwatch.AmazonCloudWatch;
-import com.amazonaws.services.cloudwatch.AmazonCloudWatchClientBuilder;
+import com.amazonaws.regions.Regions;
import com.amazonaws.services.dynamodbv2.AmazonDynamoDB;
import com.amazonaws.services.dynamodbv2.AmazonDynamoDBClientBuilder;
@@ -72,7 +71,7 @@ public class DdbComponentVerifierExtension extends DefaultComponentVerifierExten
DdbConfiguration configuration = setProperties(new DdbConfiguration(), parameters);
AWSCredentials credentials = new BasicAWSCredentials(configuration.getAccessKey(), configuration.getSecretKey());
AWSCredentialsProvider credentialsProvider = new AWSStaticCredentialsProvider(credentials);
- AmazonDynamoDB client = AmazonDynamoDBClientBuilder.standard().withCredentials(credentialsProvider).withRegion(configuration.getRegion()).build();
+ AmazonDynamoDB client = AmazonDynamoDBClientBuilder.standard().withCredentials(credentialsProvider).withRegion(Regions.valueOf(configuration.getRegion())).build();
client.listTables();
} catch (SdkClientException e) {
ResultErrorBuilder errorBuilder = ResultErrorBuilder.withCodeAndDescription(VerificationError.StandardCode.AUTHENTICATION, e.getMessage())
--
To stop receiving notification emails like this one, please contact
acosentino@apache.org.