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 cea2a08533404957e58f10df8ec63bd76cc8d937 Author: Andrea Cosentino <anco...@gmail.com> AuthorDate: Wed Feb 7 10:00:25 2018 +0100 CAMEL-12234 - Camel-AWS: Since we are using builders, we need to remove the AWS endpoint options on the components that are using them - AWS Lambda --- .../camel-aws/src/main/docs/aws-lambda-component.adoc | 5 ++--- .../camel/component/aws/lambda/LambdaConfiguration.java | 13 ------------- .../apache/camel/component/aws/lambda/LambdaEndpoint.java | 5 +++-- .../aws/lambda/springboot/LambdaComponentConfiguration.java | 12 ------------ 4 files changed, 5 insertions(+), 30 deletions(-) diff --git a/components/camel-aws/src/main/docs/aws-lambda-component.adoc b/components/camel-aws/src/main/docs/aws-lambda-component.adoc index bb2f650..d258045 100644 --- a/components/camel-aws/src/main/docs/aws-lambda-component.adoc +++ b/components/camel-aws/src/main/docs/aws-lambda-component.adoc @@ -67,12 +67,11 @@ with the following path and query parameters: | *function* | *Required* Name of the Lambda function. | | String |=== -==== Query Parameters (9 parameters): +==== Query Parameters (8 parameters): [width="100%",cols="2,5,^1,2",options="header"] |=== | Name | Description | Default | Type -| *awsLambdaEndpoint* (producer) | The AWS-Lambda client to use. | | String | *operation* (producer) | *Required* The operation to perform. It can be listFunctions getFunction createFunction deleteFunction or invokeFunction | | LambdaOperations | *region* (producer) | Amazon AWS Region | | String | *awsLambdaClient* (advanced) | To use a existing configured AwsLambdaClient as client | | AWSLambda @@ -178,4 +177,4 @@ where `${camel-version`} must be replaced by the actual version of Camel * link:endpoint.html[Endpoint] * link:getting-started.html[Getting Started] -* link:aws.html[AWS Component] \ No newline at end of file +* link:aws.html[AWS Component] diff --git a/components/camel-aws/src/main/java/org/apache/camel/component/aws/lambda/LambdaConfiguration.java b/components/camel-aws/src/main/java/org/apache/camel/component/aws/lambda/LambdaConfiguration.java index bf98ff6..cd11aa4 100644 --- a/components/camel-aws/src/main/java/org/apache/camel/component/aws/lambda/LambdaConfiguration.java +++ b/components/camel-aws/src/main/java/org/apache/camel/component/aws/lambda/LambdaConfiguration.java @@ -33,8 +33,6 @@ public class LambdaConfiguration implements Cloneable { @UriParam @Metadata(required = "true") private LambdaOperations operation; - @UriParam - private String awsLambdaEndpoint; @UriParam(label = "security", secret = true) private String accessKey; @UriParam(label = "security", secret = true) @@ -103,17 +101,6 @@ public class LambdaConfiguration implements Cloneable { this.region = region; } - public String getAwsLambdaEndpoint() { - return awsLambdaEndpoint; - } - - /** - * The AWS-Lambda client to use. - */ - public void setAwsLambdaEndpoint(String awsLambdaEndpoint) { - this.awsLambdaEndpoint = awsLambdaEndpoint; - } - public LambdaOperations getOperation() { return operation; } diff --git a/components/camel-aws/src/main/java/org/apache/camel/component/aws/lambda/LambdaEndpoint.java b/components/camel-aws/src/main/java/org/apache/camel/component/aws/lambda/LambdaEndpoint.java index 725a404..35a2d91 100644 --- a/components/camel-aws/src/main/java/org/apache/camel/component/aws/lambda/LambdaEndpoint.java +++ b/components/camel-aws/src/main/java/org/apache/camel/component/aws/lambda/LambdaEndpoint.java @@ -20,6 +20,7 @@ import com.amazonaws.ClientConfiguration; import com.amazonaws.auth.AWSCredentials; import com.amazonaws.auth.AWSStaticCredentialsProvider; import com.amazonaws.auth.BasicAWSCredentials; +import com.amazonaws.regions.Regions; import com.amazonaws.services.lambda.AWSLambda; import com.amazonaws.services.lambda.AWSLambdaClientBuilder; import org.apache.camel.Component; @@ -84,8 +85,8 @@ public class LambdaEndpoint extends DefaultEndpoint { builder = builder.withClientConfiguration(clientConfiguration); } - if (ObjectHelper.isNotEmpty(configuration.getAwsLambdaEndpoint())) { - builder = builder.withRegion(configuration.getAwsLambdaEndpoint()); + if (ObjectHelper.isNotEmpty(configuration.getRegion())) { + builder = builder.withRegion(Regions.valueOf(configuration.getRegion())); } if (configuration.getAccessKey() != null && configuration.getSecretKey() != null) { diff --git a/platforms/spring-boot/components-starter/camel-aws-starter/src/main/java/org/apache/camel/component/aws/lambda/springboot/LambdaComponentConfiguration.java b/platforms/spring-boot/components-starter/camel-aws-starter/src/main/java/org/apache/camel/component/aws/lambda/springboot/LambdaComponentConfiguration.java index 4536083..94b1277 100644 --- a/platforms/spring-boot/components-starter/camel-aws-starter/src/main/java/org/apache/camel/component/aws/lambda/springboot/LambdaComponentConfiguration.java +++ b/platforms/spring-boot/components-starter/camel-aws-starter/src/main/java/org/apache/camel/component/aws/lambda/springboot/LambdaComponentConfiguration.java @@ -122,10 +122,6 @@ public class LambdaComponentConfiguration */ private String region; /** - * The AWS-Lambda client to use. - */ - private String awsLambdaEndpoint; - /** * The operation to perform. It can be listFunctions, getFunction, * createFunction, deleteFunction or invokeFunction */ @@ -173,14 +169,6 @@ public class LambdaComponentConfiguration this.region = region; } - public String getAwsLambdaEndpoint() { - return awsLambdaEndpoint; - } - - public void setAwsLambdaEndpoint(String awsLambdaEndpoint) { - this.awsLambdaEndpoint = awsLambdaEndpoint; - } - public LambdaOperations getOperation() { return operation; } -- To stop receiving notification emails like this one, please contact acosent...@apache.org.