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 2019/07/05 10:51:57 UTC
[camel] 03/18: CAMEL-13723 - Better docs, EC2
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 c1460c57deb89c769c3edfa2b8331a8a38aa99da
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Fri Jul 5 12:13:11 2019 +0200
CAMEL-13723 - Better docs, EC2
---
.../camel-aws-ec2/src/main/docs/aws-ec2-component.adoc | 2 +-
.../camel/component/aws/ec2/EC2Configuration.java | 3 ++-
.../endpoint/dsl/EC2EndpointBuilderFactory.java | 18 ++++++++++++++++--
.../aws/ec2/springboot/EC2ComponentConfiguration.java | 5 ++++-
4 files changed, 23 insertions(+), 5 deletions(-)
diff --git a/components/camel-aws-ec2/src/main/docs/aws-ec2-component.adoc b/components/camel-aws-ec2/src/main/docs/aws-ec2-component.adoc
index addc99b..b22f93b 100644
--- a/components/camel-aws-ec2/src/main/docs/aws-ec2-component.adoc
+++ b/components/camel-aws-ec2/src/main/docs/aws-ec2-component.adoc
@@ -76,7 +76,7 @@ with the following path and query parameters:
| *operation* (producer) | *Required* The operation to perform. It can be createAndRunInstances, startInstances, stopInstances, terminateInstances, describeInstances, describeInstancesStatus, rebootInstances, monitorInstances, unmonitorInstances, createTags or deleteTags | | EC2Operations
| *proxyHost* (producer) | To define a proxy host when instantiating the EC2 client | | String
| *proxyPort* (producer) | To define a proxy port when instantiating the EC2 client | | Integer
-| *region* (producer) | The region in which EC2 client needs to work | | String
+| *region* (producer) | The region in which EC2 client needs to work. When using this parameter, the configuration will expect the capitalized name of the region (for example AP_EAST_1) You'll need to use the name Regions.EU_WEST_1.name() | | String
| *secretKey* (producer) | Amazon AWS Secret Key | | String
| *basicPropertyBinding* (advanced) | Whether the endpoint should use basic property binding (Camel 2.x) or the newer property binding with additional capabilities | false | boolean
| *synchronous* (advanced) | Sets whether synchronous processing should be strictly used, or Camel is allowed to use asynchronous processing (if supported). | false | boolean
diff --git a/components/camel-aws-ec2/src/main/java/org/apache/camel/component/aws/ec2/EC2Configuration.java b/components/camel-aws-ec2/src/main/java/org/apache/camel/component/aws/ec2/EC2Configuration.java
index ed6d670..a95d1bd 100644
--- a/components/camel-aws-ec2/src/main/java/org/apache/camel/component/aws/ec2/EC2Configuration.java
+++ b/components/camel-aws-ec2/src/main/java/org/apache/camel/component/aws/ec2/EC2Configuration.java
@@ -119,7 +119,8 @@ public class EC2Configuration implements Cloneable {
}
/**
- * The region in which EC2 client needs to work
+ * The region in which EC2 client needs to work. When using this parameter, the configuration will expect the capitalized name of the region (for example AP_EAST_1)
+ * You'll need to use the name Regions.EU_WEST_1.name()
*/
public void setRegion(String region) {
this.region = region;
diff --git a/core/camel-endpointdsl/src/main/java/org/apache/camel/builder/endpoint/dsl/EC2EndpointBuilderFactory.java b/core/camel-endpointdsl/src/main/java/org/apache/camel/builder/endpoint/dsl/EC2EndpointBuilderFactory.java
index 1a6045e..2221536 100644
--- a/core/camel-endpointdsl/src/main/java/org/apache/camel/builder/endpoint/dsl/EC2EndpointBuilderFactory.java
+++ b/core/camel-endpointdsl/src/main/java/org/apache/camel/builder/endpoint/dsl/EC2EndpointBuilderFactory.java
@@ -38,7 +38,21 @@ public interface EC2EndpointBuilderFactory {
return (AdvancedEC2EndpointBuilder) this;
}
/**
- * The region in which EC2 client needs to work.
+ * Logical name.
+ *
+ * The option is a: <code>java.lang.String</code> type.
+ *
+ * Group: producer
+ */
+ default EC2EndpointBuilder label(String label) {
+ setProperty("label", label);
+ return this;
+ }
+ /**
+ * The region in which EC2 client needs to work. When using this
+ * parameter, the configuration will expect the capitalized name of the
+ * region (for example AP_EAST_1) You'll need to use the name
+ * Regions.EU_WEST_1.name().
*
* The option is a: <code>java.lang.String</code> type.
*
@@ -149,4 +163,4 @@ public interface EC2EndpointBuilderFactory {
}
return new EC2EndpointBuilderImpl(path);
}
-}
\ No newline at end of file
+}
diff --git a/platforms/spring-boot/components-starter/camel-aws-ec2-starter/src/main/java/org/apache/camel/component/aws/ec2/springboot/EC2ComponentConfiguration.java b/platforms/spring-boot/components-starter/camel-aws-ec2-starter/src/main/java/org/apache/camel/component/aws/ec2/springboot/EC2ComponentConfiguration.java
index 187c697..f2387f1 100644
--- a/platforms/spring-boot/components-starter/camel-aws-ec2-starter/src/main/java/org/apache/camel/component/aws/ec2/springboot/EC2ComponentConfiguration.java
+++ b/platforms/spring-boot/components-starter/camel-aws-ec2-starter/src/main/java/org/apache/camel/component/aws/ec2/springboot/EC2ComponentConfiguration.java
@@ -146,7 +146,10 @@ public class EC2ComponentConfiguration
*/
private Integer proxyPort;
/**
- * The region in which EC2 client needs to work
+ * The region in which EC2 client needs to work. When using this
+ * parameter, the configuration will expect the capitalized name of the
+ * region (for example AP_EAST_1) You'll need to use the name
+ * Regions.EU_WEST_1.name()
*/
private String region;