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 2026/01/08 14:04:59 UTC
(camel) 02/03: CAMEL-22827 - Camel-AWS components: Avoid duplicated code and add pagination to producer operation where it makes sense - AWS CloudWatch
This is an automated email from the ASF dual-hosted git repository.
acosentino pushed a commit to branch CAMEL-22805-part-2
in repository https://gitbox.apache.org/repos/asf/camel.git
commit 9f84bf85bd40a028664186cbdf530038aa884517
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Thu Jan 8 12:04:49 2026 +0100
CAMEL-22827 - Camel-AWS components: Avoid duplicated code and add pagination to producer operation where it makes sense - AWS CloudWatch
Signed-off-by: Andrea Cosentino <an...@gmail.com>
---
.../apache/camel/catalog/components/aws2-cw.json | 104 +++++-----
.../component/aws2/cw/Cw2ComponentConfigurer.java | 3 +
.../component/aws2/cw/Cw2EndpointConfigurer.java | 3 +
.../component/aws2/cw/Cw2EndpointUriFactory.java | 3 +-
.../apache/camel/component/aws2/cw/aws2-cw.json | 104 +++++-----
.../camel/component/aws2/cw/Cw2Configuration.java | 13 ++
.../camel/component/aws2/cw/Cw2Constants.java | 19 ++
.../camel/component/aws2/cw/Cw2Operations.java} | 34 +---
.../camel/component/aws2/cw/Cw2Producer.java | 220 ++++++++++++++++++---
.../component/aws2/cw/CloudWatchClientMock.java | 58 ++++++
.../camel/component/aws2/cw/CwComponentTest.java | 62 ++++++
.../dsl/Aws2CwComponentBuilderFactory.java | 19 ++
.../endpoint/dsl/Cw2EndpointBuilderFactory.java | 104 ++++++++++
13 files changed, 599 insertions(+), 147 deletions(-)
diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/aws2-cw.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/aws2-cw.json
index 4f36c35e8af5..a792357d9946 100644
--- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/aws2-cw.json
+++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/aws2-cw.json
@@ -27,59 +27,67 @@
"configuration": { "index": 0, "kind": "property", "displayName": "Configuration", "group": "producer", "label": "", "required": false, "type": "object", "javaType": "org.apache.camel.component.aws2.cw.Cw2Configuration", "deprecated": false, "autowired": false, "secret": false, "description": "The component configuration" },
"lazyStartProducer": { "index": 1, "kind": "property", "displayName": "Lazy Start Producer", "group": "producer", "label": "producer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a producer may otherwise fail [...]
"name": { "index": 2, "kind": "property", "displayName": "Name", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.cw.Cw2Configuration", "configurationField": "configuration", "description": "The metric name" },
- "overrideEndpoint": { "index": 3, "kind": "property", "displayName": "Override Endpoint", "group": "producer", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.aws2.cw.Cw2Configuration", "configurationField": "configuration", "description": "Set the need for overriding the endpoint. This option needs to be used in combination with [...]
- "region": { "index": 4, "kind": "property", "displayName": "Region", "group": "producer", "label": "", "required": false, "type": "enum", "javaType": "java.lang.String", "enum": [ "ap-south-2", "ap-south-1", "eu-south-1", "eu-south-2", "us-gov-east-1", "me-central-1", "il-central-1", "ca-central-1", "eu-central-1", "us-iso-west-1", "eu-central-2", "eu-isoe-west-1", "us-west-1", "us-west-2", "af-south-1", "eu-north-1", "eu-west-3", "eu-west-2", "eu-west-1", "ap-northeast-3", "ap-north [...]
- "timestamp": { "index": 5, "kind": "property", "displayName": "Timestamp", "group": "producer", "label": "", "required": false, "type": "object", "javaType": "java.time.Instant", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.cw.Cw2Configuration", "configurationField": "configuration", "description": "The metric timestamp" },
- "unit": { "index": 6, "kind": "property", "displayName": "Unit", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.cw.Cw2Configuration", "configurationField": "configuration", "description": "The metric unit" },
- "uriEndpointOverride": { "index": 7, "kind": "property", "displayName": "Uri Endpoint Override", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.cw.Cw2Configuration", "configurationField": "configuration", "description": "Set the overriding uri endpoint. This option needs to be used in combination with overrideEndpoint [...]
- "value": { "index": 8, "kind": "property", "displayName": "Value", "group": "producer", "label": "", "required": false, "type": "number", "javaType": "java.lang.Double", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.cw.Cw2Configuration", "configurationField": "configuration", "description": "The metric value" },
- "amazonCwClient": { "index": 9, "kind": "property", "displayName": "Amazon Cw Client", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "software.amazon.awssdk.services.cloudwatch.CloudWatchClient", "deprecated": false, "deprecationNote": "", "autowired": true, "secret": false, "configurationClass": "org.apache.camel.component.aws2.cw.Cw2Configuration", "configurationField": "configuration", "description": "To use the AmazonCloudWatch as the [...]
- "autowiredEnabled": { "index": 10, "kind": "property", "displayName": "Autowired Enabled", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Whether autowiring is enabled. This is used for automatic autowiring options (the option must be marked as autowired) by looking up in the registry to find if there is a single instance of matching [...]
- "healthCheckConsumerEnabled": { "index": 11, "kind": "property", "displayName": "Health Check Consumer Enabled", "group": "health", "label": "health", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Used for enabling or disabling all consumer based health checks from this component" },
- "healthCheckProducerEnabled": { "index": 12, "kind": "property", "displayName": "Health Check Producer Enabled", "group": "health", "label": "health", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Used for enabling or disabling all producer based health checks from this component. Notice: Camel has by default disabled all producer based health-checks. You can turn on produce [...]
- "proxyHost": { "index": 13, "kind": "property", "displayName": "Proxy Host", "group": "proxy", "label": "proxy", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.cw.Cw2Configuration", "configurationField": "configuration", "description": "To define a proxy host when instantiating the CW client" },
- "proxyPort": { "index": 14, "kind": "property", "displayName": "Proxy Port", "group": "proxy", "label": "proxy", "required": false, "type": "integer", "javaType": "java.lang.Integer", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.cw.Cw2Configuration", "configurationField": "configuration", "description": "To define a proxy port when instantiating the CW client" },
- "proxyProtocol": { "index": 15, "kind": "property", "displayName": "Proxy Protocol", "group": "proxy", "label": "proxy", "required": false, "type": "enum", "javaType": "software.amazon.awssdk.core.Protocol", "enum": [ "HTTP", "HTTPS" ], "deprecated": false, "autowired": false, "secret": false, "defaultValue": "HTTPS", "configurationClass": "org.apache.camel.component.aws2.cw.Cw2Configuration", "configurationField": "configuration", "description": "To define a proxy protocol when inst [...]
- "accessKey": { "index": 16, "kind": "property", "displayName": "Access Key", "group": "security", "label": "security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": true, "configurationClass": "org.apache.camel.component.aws2.cw.Cw2Configuration", "configurationField": "configuration", "description": "Amazon AWS Access Key" },
- "profileCredentialsName": { "index": 17, "kind": "property", "displayName": "Profile Credentials Name", "group": "security", "label": "security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.cw.Cw2Configuration", "configurationField": "configuration", "description": "If using a profile credentials provider, this parameter will set the profile name" },
- "secretKey": { "index": 18, "kind": "property", "displayName": "Secret Key", "group": "security", "label": "security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": true, "configurationClass": "org.apache.camel.component.aws2.cw.Cw2Configuration", "configurationField": "configuration", "description": "Amazon AWS Secret Key" },
- "sessionToken": { "index": 19, "kind": "property", "displayName": "Session Token", "group": "security", "label": "security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": true, "configurationClass": "org.apache.camel.component.aws2.cw.Cw2Configuration", "configurationField": "configuration", "description": "Amazon AWS Session Token used when the user needs to assume an IAM role" },
- "trustAllCertificates": { "index": 20, "kind": "property", "displayName": "Trust All Certificates", "group": "security", "label": "security", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.aws2.cw.Cw2Configuration", "configurationField": "configuration", "description": "If we want to trust all certificates in case of overriding the endpoint" },
- "useDefaultCredentialsProvider": { "index": 21, "kind": "property", "displayName": "Use Default Credentials Provider", "group": "security", "label": "security", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.aws2.cw.Cw2Configuration", "configurationField": "configuration", "description": "Set whether the S3 client should expect to load crede [...]
- "useProfileCredentialsProvider": { "index": 22, "kind": "property", "displayName": "Use Profile Credentials Provider", "group": "security", "label": "security", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.aws2.cw.Cw2Configuration", "configurationField": "configuration", "description": "Set whether the Cloudwatch client should expect to lo [...]
- "useSessionCredentials": { "index": 23, "kind": "property", "displayName": "Use Session Credentials", "group": "security", "label": "security", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.aws2.cw.Cw2Configuration", "configurationField": "configuration", "description": "Set whether the CloudWatch client should expect to use Session Credent [...]
+ "operation": { "index": 3, "kind": "property", "displayName": "Operation", "group": "producer", "label": "", "required": false, "type": "enum", "javaType": "org.apache.camel.component.aws2.cw.Cw2Operations", "enum": [ "putMetricData", "listMetrics", "describeAlarms", "describeAlarmsForMetric" ], "deprecated": false, "autowired": false, "secret": false, "defaultValue": "putMetricData", "configurationClass": "org.apache.camel.component.aws2.cw.Cw2Configuration", "configurationField": " [...]
+ "overrideEndpoint": { "index": 4, "kind": "property", "displayName": "Override Endpoint", "group": "producer", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.aws2.cw.Cw2Configuration", "configurationField": "configuration", "description": "Set the need for overriding the endpoint. This option needs to be used in combination with [...]
+ "region": { "index": 5, "kind": "property", "displayName": "Region", "group": "producer", "label": "", "required": false, "type": "enum", "javaType": "java.lang.String", "enum": [ "ap-south-2", "ap-south-1", "eu-south-1", "eu-south-2", "us-gov-east-1", "me-central-1", "il-central-1", "ca-central-1", "eu-central-1", "us-iso-west-1", "eu-central-2", "eu-isoe-west-1", "us-west-1", "us-west-2", "af-south-1", "eu-north-1", "eu-west-3", "eu-west-2", "eu-west-1", "ap-northeast-3", "ap-north [...]
+ "timestamp": { "index": 6, "kind": "property", "displayName": "Timestamp", "group": "producer", "label": "", "required": false, "type": "object", "javaType": "java.time.Instant", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.cw.Cw2Configuration", "configurationField": "configuration", "description": "The metric timestamp" },
+ "unit": { "index": 7, "kind": "property", "displayName": "Unit", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.cw.Cw2Configuration", "configurationField": "configuration", "description": "The metric unit" },
+ "uriEndpointOverride": { "index": 8, "kind": "property", "displayName": "Uri Endpoint Override", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.cw.Cw2Configuration", "configurationField": "configuration", "description": "Set the overriding uri endpoint. This option needs to be used in combination with overrideEndpoint [...]
+ "value": { "index": 9, "kind": "property", "displayName": "Value", "group": "producer", "label": "", "required": false, "type": "number", "javaType": "java.lang.Double", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.cw.Cw2Configuration", "configurationField": "configuration", "description": "The metric value" },
+ "amazonCwClient": { "index": 10, "kind": "property", "displayName": "Amazon Cw Client", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "software.amazon.awssdk.services.cloudwatch.CloudWatchClient", "deprecated": false, "deprecationNote": "", "autowired": true, "secret": false, "configurationClass": "org.apache.camel.component.aws2.cw.Cw2Configuration", "configurationField": "configuration", "description": "To use the AmazonCloudWatch as the [...]
+ "autowiredEnabled": { "index": 11, "kind": "property", "displayName": "Autowired Enabled", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Whether autowiring is enabled. This is used for automatic autowiring options (the option must be marked as autowired) by looking up in the registry to find if there is a single instance of matching [...]
+ "healthCheckConsumerEnabled": { "index": 12, "kind": "property", "displayName": "Health Check Consumer Enabled", "group": "health", "label": "health", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Used for enabling or disabling all consumer based health checks from this component" },
+ "healthCheckProducerEnabled": { "index": 13, "kind": "property", "displayName": "Health Check Producer Enabled", "group": "health", "label": "health", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Used for enabling or disabling all producer based health checks from this component. Notice: Camel has by default disabled all producer based health-checks. You can turn on produce [...]
+ "proxyHost": { "index": 14, "kind": "property", "displayName": "Proxy Host", "group": "proxy", "label": "proxy", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.cw.Cw2Configuration", "configurationField": "configuration", "description": "To define a proxy host when instantiating the CW client" },
+ "proxyPort": { "index": 15, "kind": "property", "displayName": "Proxy Port", "group": "proxy", "label": "proxy", "required": false, "type": "integer", "javaType": "java.lang.Integer", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.cw.Cw2Configuration", "configurationField": "configuration", "description": "To define a proxy port when instantiating the CW client" },
+ "proxyProtocol": { "index": 16, "kind": "property", "displayName": "Proxy Protocol", "group": "proxy", "label": "proxy", "required": false, "type": "enum", "javaType": "software.amazon.awssdk.core.Protocol", "enum": [ "HTTP", "HTTPS" ], "deprecated": false, "autowired": false, "secret": false, "defaultValue": "HTTPS", "configurationClass": "org.apache.camel.component.aws2.cw.Cw2Configuration", "configurationField": "configuration", "description": "To define a proxy protocol when inst [...]
+ "accessKey": { "index": 17, "kind": "property", "displayName": "Access Key", "group": "security", "label": "security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": true, "configurationClass": "org.apache.camel.component.aws2.cw.Cw2Configuration", "configurationField": "configuration", "description": "Amazon AWS Access Key" },
+ "profileCredentialsName": { "index": 18, "kind": "property", "displayName": "Profile Credentials Name", "group": "security", "label": "security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.cw.Cw2Configuration", "configurationField": "configuration", "description": "If using a profile credentials provider, this parameter will set the profile name" },
+ "secretKey": { "index": 19, "kind": "property", "displayName": "Secret Key", "group": "security", "label": "security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": true, "configurationClass": "org.apache.camel.component.aws2.cw.Cw2Configuration", "configurationField": "configuration", "description": "Amazon AWS Secret Key" },
+ "sessionToken": { "index": 20, "kind": "property", "displayName": "Session Token", "group": "security", "label": "security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": true, "configurationClass": "org.apache.camel.component.aws2.cw.Cw2Configuration", "configurationField": "configuration", "description": "Amazon AWS Session Token used when the user needs to assume an IAM role" },
+ "trustAllCertificates": { "index": 21, "kind": "property", "displayName": "Trust All Certificates", "group": "security", "label": "security", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.aws2.cw.Cw2Configuration", "configurationField": "configuration", "description": "If we want to trust all certificates in case of overriding the endpoint" },
+ "useDefaultCredentialsProvider": { "index": 22, "kind": "property", "displayName": "Use Default Credentials Provider", "group": "security", "label": "security", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.aws2.cw.Cw2Configuration", "configurationField": "configuration", "description": "Set whether the S3 client should expect to load crede [...]
+ "useProfileCredentialsProvider": { "index": 23, "kind": "property", "displayName": "Use Profile Credentials Provider", "group": "security", "label": "security", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.aws2.cw.Cw2Configuration", "configurationField": "configuration", "description": "Set whether the Cloudwatch client should expect to lo [...]
+ "useSessionCredentials": { "index": 24, "kind": "property", "displayName": "Use Session Credentials", "group": "security", "label": "security", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.aws2.cw.Cw2Configuration", "configurationField": "configuration", "description": "Set whether the CloudWatch client should expect to use Session Credent [...]
},
"headers": {
- "CamelAwsCwMetricNamespace": { "index": 0, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The Amazon CW metric namespace.", "constantName": "org.apache.camel.component.aws2.cw.Cw2Constants#METRIC_NAMESPACE" },
- "CamelAwsCwMetricName": { "index": 1, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The Amazon CW metric name.", "constantName": "org.apache.camel.component.aws2.cw.Cw2Constants#METRIC_NAME" },
- "CamelAwsCwMetricValue": { "index": 2, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "Double", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The Amazon CW metric value.", "constantName": "org.apache.camel.component.aws2.cw.Cw2Constants#METRIC_VALUE" },
- "CamelAwsCwMetricUnit": { "index": 3, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The Amazon CW metric unit.", "constantName": "org.apache.camel.component.aws2.cw.Cw2Constants#METRIC_UNIT" },
- "CamelAwsCwMetricTimestamp": { "index": 4, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "Date", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The Amazon CW metric timestamp.", "constantName": "org.apache.camel.component.aws2.cw.Cw2Constants#METRIC_TIMESTAMP" },
- "CamelAwsCwMetricDimensions": { "index": 5, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "Map<String, String>", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "A map of dimension names and dimension values.", "constantName": "org.apache.camel.component.aws2.cw.Cw2Constants#METRIC_DIMENSIONS" },
- "CamelAwsCwMetricDimensionName": { "index": 6, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The Amazon CW metric dimension name.", "constantName": "org.apache.camel.component.aws2.cw.Cw2Constants#METRIC_DIMENSION_NAME" },
- "CamelAwsCwMetricDimensionValue": { "index": 7, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The Amazon CW metric dimension value.", "constantName": "org.apache.camel.component.aws2.cw.Cw2Constants#METRIC_DIMENSION_VALUE" }
+ "CamelAwsCwOperation": { "index": 0, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The operation to perform.", "constantName": "org.apache.camel.component.aws2.cw.Cw2Constants#OPERATION" },
+ "CamelAwsCwMetricNamespace": { "index": 1, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The Amazon CW metric namespace.", "constantName": "org.apache.camel.component.aws2.cw.Cw2Constants#METRIC_NAMESPACE" },
+ "CamelAwsCwMetricName": { "index": 2, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The Amazon CW metric name.", "constantName": "org.apache.camel.component.aws2.cw.Cw2Constants#METRIC_NAME" },
+ "CamelAwsCwMetricValue": { "index": 3, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "Double", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The Amazon CW metric value.", "constantName": "org.apache.camel.component.aws2.cw.Cw2Constants#METRIC_VALUE" },
+ "CamelAwsCwMetricUnit": { "index": 4, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The Amazon CW metric unit.", "constantName": "org.apache.camel.component.aws2.cw.Cw2Constants#METRIC_UNIT" },
+ "CamelAwsCwMetricTimestamp": { "index": 5, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "Date", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The Amazon CW metric timestamp.", "constantName": "org.apache.camel.component.aws2.cw.Cw2Constants#METRIC_TIMESTAMP" },
+ "CamelAwsCwMetricDimensions": { "index": 6, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "Map<String, String>", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "A map of dimension names and dimension values.", "constantName": "org.apache.camel.component.aws2.cw.Cw2Constants#METRIC_DIMENSIONS" },
+ "CamelAwsCwMetricDimensionName": { "index": 7, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The Amazon CW metric dimension name.", "constantName": "org.apache.camel.component.aws2.cw.Cw2Constants#METRIC_DIMENSION_NAME" },
+ "CamelAwsCwMetricDimensionValue": { "index": 8, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The Amazon CW metric dimension value.", "constantName": "org.apache.camel.component.aws2.cw.Cw2Constants#METRIC_DIMENSION_VALUE" },
+ "CamelAwsCwAlarmName": { "index": 9, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The name of the alarm.", "constantName": "org.apache.camel.component.aws2.cw.Cw2Constants#ALARM_NAME" },
+ "CamelAwsCwAlarmState": { "index": 10, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The state value for the alarm (OK, ALARM, INSUFFICIENT_DATA).", "constantName": "org.apache.camel.component.aws2.cw.Cw2Constants#ALARM_STATE" },
+ "CamelAwsCwNextToken": { "index": 11, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The token for the next set of results.", "constantName": "org.apache.camel.component.aws2.cw.Cw2Constants#NEXT_TOKEN" },
+ "CamelAwsCwMaxResults": { "index": 12, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "Integer", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The maximum number of results to return.", "constantName": "org.apache.camel.component.aws2.cw.Cw2Constants#MAX_RESULTS" },
+ "CamelAwsCwIsTruncated": { "index": 13, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "Boolean", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Whether the response has more results (is truncated).", "constantName": "org.apache.camel.component.aws2.cw.Cw2Constants#IS_TRUNCATED" }
},
"properties": {
"namespace": { "index": 0, "kind": "path", "displayName": "Namespace", "group": "producer", "label": "", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.cw.Cw2Configuration", "configurationField": "configuration", "description": "The metric namespace" },
"name": { "index": 1, "kind": "parameter", "displayName": "Name", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.cw.Cw2Configuration", "configurationField": "configuration", "description": "The metric name" },
- "overrideEndpoint": { "index": 2, "kind": "parameter", "displayName": "Override Endpoint", "group": "producer", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.aws2.cw.Cw2Configuration", "configurationField": "configuration", "description": "Set the need for overriding the endpoint. This option needs to be used in combination wit [...]
- "region": { "index": 3, "kind": "parameter", "displayName": "Region", "group": "producer", "label": "", "required": false, "type": "enum", "javaType": "java.lang.String", "enum": [ "ap-south-2", "ap-south-1", "eu-south-1", "eu-south-2", "us-gov-east-1", "me-central-1", "il-central-1", "ca-central-1", "eu-central-1", "us-iso-west-1", "eu-central-2", "eu-isoe-west-1", "us-west-1", "us-west-2", "af-south-1", "eu-north-1", "eu-west-3", "eu-west-2", "eu-west-1", "ap-northeast-3", "ap-nort [...]
- "timestamp": { "index": 4, "kind": "parameter", "displayName": "Timestamp", "group": "producer", "label": "", "required": false, "type": "object", "javaType": "java.time.Instant", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.cw.Cw2Configuration", "configurationField": "configuration", "description": "The metric timestamp" },
- "unit": { "index": 5, "kind": "parameter", "displayName": "Unit", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.cw.Cw2Configuration", "configurationField": "configuration", "description": "The metric unit" },
- "uriEndpointOverride": { "index": 6, "kind": "parameter", "displayName": "Uri Endpoint Override", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.cw.Cw2Configuration", "configurationField": "configuration", "description": "Set the overriding uri endpoint. This option needs to be used in combination with overrideEndpoin [...]
- "value": { "index": 7, "kind": "parameter", "displayName": "Value", "group": "producer", "label": "", "required": false, "type": "number", "javaType": "java.lang.Double", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.cw.Cw2Configuration", "configurationField": "configuration", "description": "The metric value" },
- "lazyStartProducer": { "index": 8, "kind": "parameter", "displayName": "Lazy Start Producer", "group": "producer (advanced)", "label": "producer,advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a produc [...]
- "amazonCwClient": { "index": 9, "kind": "parameter", "displayName": "Amazon Cw Client", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "software.amazon.awssdk.services.cloudwatch.CloudWatchClient", "deprecated": false, "deprecationNote": "", "autowired": true, "secret": false, "configurationClass": "org.apache.camel.component.aws2.cw.Cw2Configuration", "configurationField": "configuration", "description": "To use the AmazonCloudWatch as the [...]
- "proxyHost": { "index": 10, "kind": "parameter", "displayName": "Proxy Host", "group": "proxy", "label": "proxy", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.cw.Cw2Configuration", "configurationField": "configuration", "description": "To define a proxy host when instantiating the CW client" },
- "proxyPort": { "index": 11, "kind": "parameter", "displayName": "Proxy Port", "group": "proxy", "label": "proxy", "required": false, "type": "integer", "javaType": "java.lang.Integer", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.cw.Cw2Configuration", "configurationField": "configuration", "description": "To define a proxy port when instantiating the CW client" },
- "proxyProtocol": { "index": 12, "kind": "parameter", "displayName": "Proxy Protocol", "group": "proxy", "label": "proxy", "required": false, "type": "enum", "javaType": "software.amazon.awssdk.core.Protocol", "enum": [ "HTTP", "HTTPS" ], "deprecated": false, "autowired": false, "secret": false, "defaultValue": "HTTPS", "configurationClass": "org.apache.camel.component.aws2.cw.Cw2Configuration", "configurationField": "configuration", "description": "To define a proxy protocol when ins [...]
- "accessKey": { "index": 13, "kind": "parameter", "displayName": "Access Key", "group": "security", "label": "security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": true, "configurationClass": "org.apache.camel.component.aws2.cw.Cw2Configuration", "configurationField": "configuration", "description": "Amazon AWS Access Key" },
- "profileCredentialsName": { "index": 14, "kind": "parameter", "displayName": "Profile Credentials Name", "group": "security", "label": "security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.cw.Cw2Configuration", "configurationField": "configuration", "description": "If using a profile credentials provider, this parameter will set the profile name" },
- "secretKey": { "index": 15, "kind": "parameter", "displayName": "Secret Key", "group": "security", "label": "security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": true, "configurationClass": "org.apache.camel.component.aws2.cw.Cw2Configuration", "configurationField": "configuration", "description": "Amazon AWS Secret Key" },
- "sessionToken": { "index": 16, "kind": "parameter", "displayName": "Session Token", "group": "security", "label": "security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": true, "configurationClass": "org.apache.camel.component.aws2.cw.Cw2Configuration", "configurationField": "configuration", "description": "Amazon AWS Session Token used when the user needs to assume an IAM role" },
- "trustAllCertificates": { "index": 17, "kind": "parameter", "displayName": "Trust All Certificates", "group": "security", "label": "security", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.aws2.cw.Cw2Configuration", "configurationField": "configuration", "description": "If we want to trust all certificates in case of overriding the endpoint" },
- "useDefaultCredentialsProvider": { "index": 18, "kind": "parameter", "displayName": "Use Default Credentials Provider", "group": "security", "label": "security", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.aws2.cw.Cw2Configuration", "configurationField": "configuration", "description": "Set whether the S3 client should expect to load cred [...]
- "useProfileCredentialsProvider": { "index": 19, "kind": "parameter", "displayName": "Use Profile Credentials Provider", "group": "security", "label": "security", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.aws2.cw.Cw2Configuration", "configurationField": "configuration", "description": "Set whether the Cloudwatch client should expect to l [...]
- "useSessionCredentials": { "index": 20, "kind": "parameter", "displayName": "Use Session Credentials", "group": "security", "label": "security", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.aws2.cw.Cw2Configuration", "configurationField": "configuration", "description": "Set whether the CloudWatch client should expect to use Session Creden [...]
+ "operation": { "index": 2, "kind": "parameter", "displayName": "Operation", "group": "producer", "label": "", "required": false, "type": "enum", "javaType": "org.apache.camel.component.aws2.cw.Cw2Operations", "enum": [ "putMetricData", "listMetrics", "describeAlarms", "describeAlarmsForMetric" ], "deprecated": false, "autowired": false, "secret": false, "defaultValue": "putMetricData", "configurationClass": "org.apache.camel.component.aws2.cw.Cw2Configuration", "configurationField": [...]
+ "overrideEndpoint": { "index": 3, "kind": "parameter", "displayName": "Override Endpoint", "group": "producer", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.aws2.cw.Cw2Configuration", "configurationField": "configuration", "description": "Set the need for overriding the endpoint. This option needs to be used in combination wit [...]
+ "region": { "index": 4, "kind": "parameter", "displayName": "Region", "group": "producer", "label": "", "required": false, "type": "enum", "javaType": "java.lang.String", "enum": [ "ap-south-2", "ap-south-1", "eu-south-1", "eu-south-2", "us-gov-east-1", "me-central-1", "il-central-1", "ca-central-1", "eu-central-1", "us-iso-west-1", "eu-central-2", "eu-isoe-west-1", "us-west-1", "us-west-2", "af-south-1", "eu-north-1", "eu-west-3", "eu-west-2", "eu-west-1", "ap-northeast-3", "ap-nort [...]
+ "timestamp": { "index": 5, "kind": "parameter", "displayName": "Timestamp", "group": "producer", "label": "", "required": false, "type": "object", "javaType": "java.time.Instant", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.cw.Cw2Configuration", "configurationField": "configuration", "description": "The metric timestamp" },
+ "unit": { "index": 6, "kind": "parameter", "displayName": "Unit", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.cw.Cw2Configuration", "configurationField": "configuration", "description": "The metric unit" },
+ "uriEndpointOverride": { "index": 7, "kind": "parameter", "displayName": "Uri Endpoint Override", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.cw.Cw2Configuration", "configurationField": "configuration", "description": "Set the overriding uri endpoint. This option needs to be used in combination with overrideEndpoin [...]
+ "value": { "index": 8, "kind": "parameter", "displayName": "Value", "group": "producer", "label": "", "required": false, "type": "number", "javaType": "java.lang.Double", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.cw.Cw2Configuration", "configurationField": "configuration", "description": "The metric value" },
+ "lazyStartProducer": { "index": 9, "kind": "parameter", "displayName": "Lazy Start Producer", "group": "producer (advanced)", "label": "producer,advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a produc [...]
+ "amazonCwClient": { "index": 10, "kind": "parameter", "displayName": "Amazon Cw Client", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "software.amazon.awssdk.services.cloudwatch.CloudWatchClient", "deprecated": false, "deprecationNote": "", "autowired": true, "secret": false, "configurationClass": "org.apache.camel.component.aws2.cw.Cw2Configuration", "configurationField": "configuration", "description": "To use the AmazonCloudWatch as th [...]
+ "proxyHost": { "index": 11, "kind": "parameter", "displayName": "Proxy Host", "group": "proxy", "label": "proxy", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.cw.Cw2Configuration", "configurationField": "configuration", "description": "To define a proxy host when instantiating the CW client" },
+ "proxyPort": { "index": 12, "kind": "parameter", "displayName": "Proxy Port", "group": "proxy", "label": "proxy", "required": false, "type": "integer", "javaType": "java.lang.Integer", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.cw.Cw2Configuration", "configurationField": "configuration", "description": "To define a proxy port when instantiating the CW client" },
+ "proxyProtocol": { "index": 13, "kind": "parameter", "displayName": "Proxy Protocol", "group": "proxy", "label": "proxy", "required": false, "type": "enum", "javaType": "software.amazon.awssdk.core.Protocol", "enum": [ "HTTP", "HTTPS" ], "deprecated": false, "autowired": false, "secret": false, "defaultValue": "HTTPS", "configurationClass": "org.apache.camel.component.aws2.cw.Cw2Configuration", "configurationField": "configuration", "description": "To define a proxy protocol when ins [...]
+ "accessKey": { "index": 14, "kind": "parameter", "displayName": "Access Key", "group": "security", "label": "security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": true, "configurationClass": "org.apache.camel.component.aws2.cw.Cw2Configuration", "configurationField": "configuration", "description": "Amazon AWS Access Key" },
+ "profileCredentialsName": { "index": 15, "kind": "parameter", "displayName": "Profile Credentials Name", "group": "security", "label": "security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.cw.Cw2Configuration", "configurationField": "configuration", "description": "If using a profile credentials provider, this parameter will set the profile name" },
+ "secretKey": { "index": 16, "kind": "parameter", "displayName": "Secret Key", "group": "security", "label": "security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": true, "configurationClass": "org.apache.camel.component.aws2.cw.Cw2Configuration", "configurationField": "configuration", "description": "Amazon AWS Secret Key" },
+ "sessionToken": { "index": 17, "kind": "parameter", "displayName": "Session Token", "group": "security", "label": "security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": true, "configurationClass": "org.apache.camel.component.aws2.cw.Cw2Configuration", "configurationField": "configuration", "description": "Amazon AWS Session Token used when the user needs to assume an IAM role" },
+ "trustAllCertificates": { "index": 18, "kind": "parameter", "displayName": "Trust All Certificates", "group": "security", "label": "security", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.aws2.cw.Cw2Configuration", "configurationField": "configuration", "description": "If we want to trust all certificates in case of overriding the endpoint" },
+ "useDefaultCredentialsProvider": { "index": 19, "kind": "parameter", "displayName": "Use Default Credentials Provider", "group": "security", "label": "security", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.aws2.cw.Cw2Configuration", "configurationField": "configuration", "description": "Set whether the S3 client should expect to load cred [...]
+ "useProfileCredentialsProvider": { "index": 20, "kind": "parameter", "displayName": "Use Profile Credentials Provider", "group": "security", "label": "security", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.aws2.cw.Cw2Configuration", "configurationField": "configuration", "description": "Set whether the Cloudwatch client should expect to l [...]
+ "useSessionCredentials": { "index": 21, "kind": "parameter", "displayName": "Use Session Credentials", "group": "security", "label": "security", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.aws2.cw.Cw2Configuration", "configurationField": "configuration", "description": "Set whether the CloudWatch client should expect to use Session Creden [...]
}
}
diff --git a/components/camel-aws/camel-aws2-cw/src/generated/java/org/apache/camel/component/aws2/cw/Cw2ComponentConfigurer.java b/components/camel-aws/camel-aws2-cw/src/generated/java/org/apache/camel/component/aws2/cw/Cw2ComponentConfigurer.java
index 9e091ad75248..052993fc65ef 100644
--- a/components/camel-aws/camel-aws2-cw/src/generated/java/org/apache/camel/component/aws2/cw/Cw2ComponentConfigurer.java
+++ b/components/camel-aws/camel-aws2-cw/src/generated/java/org/apache/camel/component/aws2/cw/Cw2ComponentConfigurer.java
@@ -44,6 +44,7 @@ public class Cw2ComponentConfigurer extends PropertyConfigurerSupport implements
case "lazystartproducer":
case "lazyStartProducer": target.setLazyStartProducer(property(camelContext, boolean.class, value)); return true;
case "name": getOrCreateConfiguration(target).setName(property(camelContext, java.lang.String.class, value)); return true;
+ case "operation": getOrCreateConfiguration(target).setOperation(property(camelContext, org.apache.camel.component.aws2.cw.Cw2Operations.class, value)); return true;
case "overrideendpoint":
case "overrideEndpoint": getOrCreateConfiguration(target).setOverrideEndpoint(property(camelContext, boolean.class, value)); return true;
case "profilecredentialsname":
@@ -98,6 +99,7 @@ public class Cw2ComponentConfigurer extends PropertyConfigurerSupport implements
case "lazystartproducer":
case "lazyStartProducer": return boolean.class;
case "name": return java.lang.String.class;
+ case "operation": return org.apache.camel.component.aws2.cw.Cw2Operations.class;
case "overrideendpoint":
case "overrideEndpoint": return boolean.class;
case "profilecredentialsname":
@@ -148,6 +150,7 @@ public class Cw2ComponentConfigurer extends PropertyConfigurerSupport implements
case "lazystartproducer":
case "lazyStartProducer": return target.isLazyStartProducer();
case "name": return getOrCreateConfiguration(target).getName();
+ case "operation": return getOrCreateConfiguration(target).getOperation();
case "overrideendpoint":
case "overrideEndpoint": return getOrCreateConfiguration(target).isOverrideEndpoint();
case "profilecredentialsname":
diff --git a/components/camel-aws/camel-aws2-cw/src/generated/java/org/apache/camel/component/aws2/cw/Cw2EndpointConfigurer.java b/components/camel-aws/camel-aws2-cw/src/generated/java/org/apache/camel/component/aws2/cw/Cw2EndpointConfigurer.java
index b8ef7ea8e9f3..b107057716f0 100644
--- a/components/camel-aws/camel-aws2-cw/src/generated/java/org/apache/camel/component/aws2/cw/Cw2EndpointConfigurer.java
+++ b/components/camel-aws/camel-aws2-cw/src/generated/java/org/apache/camel/component/aws2/cw/Cw2EndpointConfigurer.java
@@ -30,6 +30,7 @@ public class Cw2EndpointConfigurer extends PropertyConfigurerSupport implements
case "lazystartproducer":
case "lazyStartProducer": target.setLazyStartProducer(property(camelContext, boolean.class, value)); return true;
case "name": target.getConfiguration().setName(property(camelContext, java.lang.String.class, value)); return true;
+ case "operation": target.getConfiguration().setOperation(property(camelContext, org.apache.camel.component.aws2.cw.Cw2Operations.class, value)); return true;
case "overrideendpoint":
case "overrideEndpoint": target.getConfiguration().setOverrideEndpoint(property(camelContext, boolean.class, value)); return true;
case "profilecredentialsname":
@@ -77,6 +78,7 @@ public class Cw2EndpointConfigurer extends PropertyConfigurerSupport implements
case "lazystartproducer":
case "lazyStartProducer": return boolean.class;
case "name": return java.lang.String.class;
+ case "operation": return org.apache.camel.component.aws2.cw.Cw2Operations.class;
case "overrideendpoint":
case "overrideEndpoint": return boolean.class;
case "profilecredentialsname":
@@ -120,6 +122,7 @@ public class Cw2EndpointConfigurer extends PropertyConfigurerSupport implements
case "lazystartproducer":
case "lazyStartProducer": return target.isLazyStartProducer();
case "name": return target.getConfiguration().getName();
+ case "operation": return target.getConfiguration().getOperation();
case "overrideendpoint":
case "overrideEndpoint": return target.getConfiguration().isOverrideEndpoint();
case "profilecredentialsname":
diff --git a/components/camel-aws/camel-aws2-cw/src/generated/java/org/apache/camel/component/aws2/cw/Cw2EndpointUriFactory.java b/components/camel-aws/camel-aws2-cw/src/generated/java/org/apache/camel/component/aws2/cw/Cw2EndpointUriFactory.java
index ccc43caff245..045b032c14ae 100644
--- a/components/camel-aws/camel-aws2-cw/src/generated/java/org/apache/camel/component/aws2/cw/Cw2EndpointUriFactory.java
+++ b/components/camel-aws/camel-aws2-cw/src/generated/java/org/apache/camel/component/aws2/cw/Cw2EndpointUriFactory.java
@@ -23,12 +23,13 @@ public class Cw2EndpointUriFactory extends org.apache.camel.support.component.En
private static final Set<String> SECRET_PROPERTY_NAMES;
private static final Map<String, String> MULTI_VALUE_PREFIXES;
static {
- Set<String> props = new HashSet<>(21);
+ Set<String> props = new HashSet<>(22);
props.add("accessKey");
props.add("amazonCwClient");
props.add("lazyStartProducer");
props.add("name");
props.add("namespace");
+ props.add("operation");
props.add("overrideEndpoint");
props.add("profileCredentialsName");
props.add("proxyHost");
diff --git a/components/camel-aws/camel-aws2-cw/src/generated/resources/META-INF/org/apache/camel/component/aws2/cw/aws2-cw.json b/components/camel-aws/camel-aws2-cw/src/generated/resources/META-INF/org/apache/camel/component/aws2/cw/aws2-cw.json
index 4f36c35e8af5..a792357d9946 100644
--- a/components/camel-aws/camel-aws2-cw/src/generated/resources/META-INF/org/apache/camel/component/aws2/cw/aws2-cw.json
+++ b/components/camel-aws/camel-aws2-cw/src/generated/resources/META-INF/org/apache/camel/component/aws2/cw/aws2-cw.json
@@ -27,59 +27,67 @@
"configuration": { "index": 0, "kind": "property", "displayName": "Configuration", "group": "producer", "label": "", "required": false, "type": "object", "javaType": "org.apache.camel.component.aws2.cw.Cw2Configuration", "deprecated": false, "autowired": false, "secret": false, "description": "The component configuration" },
"lazyStartProducer": { "index": 1, "kind": "property", "displayName": "Lazy Start Producer", "group": "producer", "label": "producer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a producer may otherwise fail [...]
"name": { "index": 2, "kind": "property", "displayName": "Name", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.cw.Cw2Configuration", "configurationField": "configuration", "description": "The metric name" },
- "overrideEndpoint": { "index": 3, "kind": "property", "displayName": "Override Endpoint", "group": "producer", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.aws2.cw.Cw2Configuration", "configurationField": "configuration", "description": "Set the need for overriding the endpoint. This option needs to be used in combination with [...]
- "region": { "index": 4, "kind": "property", "displayName": "Region", "group": "producer", "label": "", "required": false, "type": "enum", "javaType": "java.lang.String", "enum": [ "ap-south-2", "ap-south-1", "eu-south-1", "eu-south-2", "us-gov-east-1", "me-central-1", "il-central-1", "ca-central-1", "eu-central-1", "us-iso-west-1", "eu-central-2", "eu-isoe-west-1", "us-west-1", "us-west-2", "af-south-1", "eu-north-1", "eu-west-3", "eu-west-2", "eu-west-1", "ap-northeast-3", "ap-north [...]
- "timestamp": { "index": 5, "kind": "property", "displayName": "Timestamp", "group": "producer", "label": "", "required": false, "type": "object", "javaType": "java.time.Instant", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.cw.Cw2Configuration", "configurationField": "configuration", "description": "The metric timestamp" },
- "unit": { "index": 6, "kind": "property", "displayName": "Unit", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.cw.Cw2Configuration", "configurationField": "configuration", "description": "The metric unit" },
- "uriEndpointOverride": { "index": 7, "kind": "property", "displayName": "Uri Endpoint Override", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.cw.Cw2Configuration", "configurationField": "configuration", "description": "Set the overriding uri endpoint. This option needs to be used in combination with overrideEndpoint [...]
- "value": { "index": 8, "kind": "property", "displayName": "Value", "group": "producer", "label": "", "required": false, "type": "number", "javaType": "java.lang.Double", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.cw.Cw2Configuration", "configurationField": "configuration", "description": "The metric value" },
- "amazonCwClient": { "index": 9, "kind": "property", "displayName": "Amazon Cw Client", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "software.amazon.awssdk.services.cloudwatch.CloudWatchClient", "deprecated": false, "deprecationNote": "", "autowired": true, "secret": false, "configurationClass": "org.apache.camel.component.aws2.cw.Cw2Configuration", "configurationField": "configuration", "description": "To use the AmazonCloudWatch as the [...]
- "autowiredEnabled": { "index": 10, "kind": "property", "displayName": "Autowired Enabled", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Whether autowiring is enabled. This is used for automatic autowiring options (the option must be marked as autowired) by looking up in the registry to find if there is a single instance of matching [...]
- "healthCheckConsumerEnabled": { "index": 11, "kind": "property", "displayName": "Health Check Consumer Enabled", "group": "health", "label": "health", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Used for enabling or disabling all consumer based health checks from this component" },
- "healthCheckProducerEnabled": { "index": 12, "kind": "property", "displayName": "Health Check Producer Enabled", "group": "health", "label": "health", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Used for enabling or disabling all producer based health checks from this component. Notice: Camel has by default disabled all producer based health-checks. You can turn on produce [...]
- "proxyHost": { "index": 13, "kind": "property", "displayName": "Proxy Host", "group": "proxy", "label": "proxy", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.cw.Cw2Configuration", "configurationField": "configuration", "description": "To define a proxy host when instantiating the CW client" },
- "proxyPort": { "index": 14, "kind": "property", "displayName": "Proxy Port", "group": "proxy", "label": "proxy", "required": false, "type": "integer", "javaType": "java.lang.Integer", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.cw.Cw2Configuration", "configurationField": "configuration", "description": "To define a proxy port when instantiating the CW client" },
- "proxyProtocol": { "index": 15, "kind": "property", "displayName": "Proxy Protocol", "group": "proxy", "label": "proxy", "required": false, "type": "enum", "javaType": "software.amazon.awssdk.core.Protocol", "enum": [ "HTTP", "HTTPS" ], "deprecated": false, "autowired": false, "secret": false, "defaultValue": "HTTPS", "configurationClass": "org.apache.camel.component.aws2.cw.Cw2Configuration", "configurationField": "configuration", "description": "To define a proxy protocol when inst [...]
- "accessKey": { "index": 16, "kind": "property", "displayName": "Access Key", "group": "security", "label": "security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": true, "configurationClass": "org.apache.camel.component.aws2.cw.Cw2Configuration", "configurationField": "configuration", "description": "Amazon AWS Access Key" },
- "profileCredentialsName": { "index": 17, "kind": "property", "displayName": "Profile Credentials Name", "group": "security", "label": "security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.cw.Cw2Configuration", "configurationField": "configuration", "description": "If using a profile credentials provider, this parameter will set the profile name" },
- "secretKey": { "index": 18, "kind": "property", "displayName": "Secret Key", "group": "security", "label": "security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": true, "configurationClass": "org.apache.camel.component.aws2.cw.Cw2Configuration", "configurationField": "configuration", "description": "Amazon AWS Secret Key" },
- "sessionToken": { "index": 19, "kind": "property", "displayName": "Session Token", "group": "security", "label": "security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": true, "configurationClass": "org.apache.camel.component.aws2.cw.Cw2Configuration", "configurationField": "configuration", "description": "Amazon AWS Session Token used when the user needs to assume an IAM role" },
- "trustAllCertificates": { "index": 20, "kind": "property", "displayName": "Trust All Certificates", "group": "security", "label": "security", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.aws2.cw.Cw2Configuration", "configurationField": "configuration", "description": "If we want to trust all certificates in case of overriding the endpoint" },
- "useDefaultCredentialsProvider": { "index": 21, "kind": "property", "displayName": "Use Default Credentials Provider", "group": "security", "label": "security", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.aws2.cw.Cw2Configuration", "configurationField": "configuration", "description": "Set whether the S3 client should expect to load crede [...]
- "useProfileCredentialsProvider": { "index": 22, "kind": "property", "displayName": "Use Profile Credentials Provider", "group": "security", "label": "security", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.aws2.cw.Cw2Configuration", "configurationField": "configuration", "description": "Set whether the Cloudwatch client should expect to lo [...]
- "useSessionCredentials": { "index": 23, "kind": "property", "displayName": "Use Session Credentials", "group": "security", "label": "security", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.aws2.cw.Cw2Configuration", "configurationField": "configuration", "description": "Set whether the CloudWatch client should expect to use Session Credent [...]
+ "operation": { "index": 3, "kind": "property", "displayName": "Operation", "group": "producer", "label": "", "required": false, "type": "enum", "javaType": "org.apache.camel.component.aws2.cw.Cw2Operations", "enum": [ "putMetricData", "listMetrics", "describeAlarms", "describeAlarmsForMetric" ], "deprecated": false, "autowired": false, "secret": false, "defaultValue": "putMetricData", "configurationClass": "org.apache.camel.component.aws2.cw.Cw2Configuration", "configurationField": " [...]
+ "overrideEndpoint": { "index": 4, "kind": "property", "displayName": "Override Endpoint", "group": "producer", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.aws2.cw.Cw2Configuration", "configurationField": "configuration", "description": "Set the need for overriding the endpoint. This option needs to be used in combination with [...]
+ "region": { "index": 5, "kind": "property", "displayName": "Region", "group": "producer", "label": "", "required": false, "type": "enum", "javaType": "java.lang.String", "enum": [ "ap-south-2", "ap-south-1", "eu-south-1", "eu-south-2", "us-gov-east-1", "me-central-1", "il-central-1", "ca-central-1", "eu-central-1", "us-iso-west-1", "eu-central-2", "eu-isoe-west-1", "us-west-1", "us-west-2", "af-south-1", "eu-north-1", "eu-west-3", "eu-west-2", "eu-west-1", "ap-northeast-3", "ap-north [...]
+ "timestamp": { "index": 6, "kind": "property", "displayName": "Timestamp", "group": "producer", "label": "", "required": false, "type": "object", "javaType": "java.time.Instant", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.cw.Cw2Configuration", "configurationField": "configuration", "description": "The metric timestamp" },
+ "unit": { "index": 7, "kind": "property", "displayName": "Unit", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.cw.Cw2Configuration", "configurationField": "configuration", "description": "The metric unit" },
+ "uriEndpointOverride": { "index": 8, "kind": "property", "displayName": "Uri Endpoint Override", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.cw.Cw2Configuration", "configurationField": "configuration", "description": "Set the overriding uri endpoint. This option needs to be used in combination with overrideEndpoint [...]
+ "value": { "index": 9, "kind": "property", "displayName": "Value", "group": "producer", "label": "", "required": false, "type": "number", "javaType": "java.lang.Double", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.cw.Cw2Configuration", "configurationField": "configuration", "description": "The metric value" },
+ "amazonCwClient": { "index": 10, "kind": "property", "displayName": "Amazon Cw Client", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "software.amazon.awssdk.services.cloudwatch.CloudWatchClient", "deprecated": false, "deprecationNote": "", "autowired": true, "secret": false, "configurationClass": "org.apache.camel.component.aws2.cw.Cw2Configuration", "configurationField": "configuration", "description": "To use the AmazonCloudWatch as the [...]
+ "autowiredEnabled": { "index": 11, "kind": "property", "displayName": "Autowired Enabled", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Whether autowiring is enabled. This is used for automatic autowiring options (the option must be marked as autowired) by looking up in the registry to find if there is a single instance of matching [...]
+ "healthCheckConsumerEnabled": { "index": 12, "kind": "property", "displayName": "Health Check Consumer Enabled", "group": "health", "label": "health", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Used for enabling or disabling all consumer based health checks from this component" },
+ "healthCheckProducerEnabled": { "index": 13, "kind": "property", "displayName": "Health Check Producer Enabled", "group": "health", "label": "health", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Used for enabling or disabling all producer based health checks from this component. Notice: Camel has by default disabled all producer based health-checks. You can turn on produce [...]
+ "proxyHost": { "index": 14, "kind": "property", "displayName": "Proxy Host", "group": "proxy", "label": "proxy", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.cw.Cw2Configuration", "configurationField": "configuration", "description": "To define a proxy host when instantiating the CW client" },
+ "proxyPort": { "index": 15, "kind": "property", "displayName": "Proxy Port", "group": "proxy", "label": "proxy", "required": false, "type": "integer", "javaType": "java.lang.Integer", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.cw.Cw2Configuration", "configurationField": "configuration", "description": "To define a proxy port when instantiating the CW client" },
+ "proxyProtocol": { "index": 16, "kind": "property", "displayName": "Proxy Protocol", "group": "proxy", "label": "proxy", "required": false, "type": "enum", "javaType": "software.amazon.awssdk.core.Protocol", "enum": [ "HTTP", "HTTPS" ], "deprecated": false, "autowired": false, "secret": false, "defaultValue": "HTTPS", "configurationClass": "org.apache.camel.component.aws2.cw.Cw2Configuration", "configurationField": "configuration", "description": "To define a proxy protocol when inst [...]
+ "accessKey": { "index": 17, "kind": "property", "displayName": "Access Key", "group": "security", "label": "security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": true, "configurationClass": "org.apache.camel.component.aws2.cw.Cw2Configuration", "configurationField": "configuration", "description": "Amazon AWS Access Key" },
+ "profileCredentialsName": { "index": 18, "kind": "property", "displayName": "Profile Credentials Name", "group": "security", "label": "security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.cw.Cw2Configuration", "configurationField": "configuration", "description": "If using a profile credentials provider, this parameter will set the profile name" },
+ "secretKey": { "index": 19, "kind": "property", "displayName": "Secret Key", "group": "security", "label": "security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": true, "configurationClass": "org.apache.camel.component.aws2.cw.Cw2Configuration", "configurationField": "configuration", "description": "Amazon AWS Secret Key" },
+ "sessionToken": { "index": 20, "kind": "property", "displayName": "Session Token", "group": "security", "label": "security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": true, "configurationClass": "org.apache.camel.component.aws2.cw.Cw2Configuration", "configurationField": "configuration", "description": "Amazon AWS Session Token used when the user needs to assume an IAM role" },
+ "trustAllCertificates": { "index": 21, "kind": "property", "displayName": "Trust All Certificates", "group": "security", "label": "security", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.aws2.cw.Cw2Configuration", "configurationField": "configuration", "description": "If we want to trust all certificates in case of overriding the endpoint" },
+ "useDefaultCredentialsProvider": { "index": 22, "kind": "property", "displayName": "Use Default Credentials Provider", "group": "security", "label": "security", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.aws2.cw.Cw2Configuration", "configurationField": "configuration", "description": "Set whether the S3 client should expect to load crede [...]
+ "useProfileCredentialsProvider": { "index": 23, "kind": "property", "displayName": "Use Profile Credentials Provider", "group": "security", "label": "security", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.aws2.cw.Cw2Configuration", "configurationField": "configuration", "description": "Set whether the Cloudwatch client should expect to lo [...]
+ "useSessionCredentials": { "index": 24, "kind": "property", "displayName": "Use Session Credentials", "group": "security", "label": "security", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.aws2.cw.Cw2Configuration", "configurationField": "configuration", "description": "Set whether the CloudWatch client should expect to use Session Credent [...]
},
"headers": {
- "CamelAwsCwMetricNamespace": { "index": 0, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The Amazon CW metric namespace.", "constantName": "org.apache.camel.component.aws2.cw.Cw2Constants#METRIC_NAMESPACE" },
- "CamelAwsCwMetricName": { "index": 1, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The Amazon CW metric name.", "constantName": "org.apache.camel.component.aws2.cw.Cw2Constants#METRIC_NAME" },
- "CamelAwsCwMetricValue": { "index": 2, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "Double", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The Amazon CW metric value.", "constantName": "org.apache.camel.component.aws2.cw.Cw2Constants#METRIC_VALUE" },
- "CamelAwsCwMetricUnit": { "index": 3, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The Amazon CW metric unit.", "constantName": "org.apache.camel.component.aws2.cw.Cw2Constants#METRIC_UNIT" },
- "CamelAwsCwMetricTimestamp": { "index": 4, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "Date", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The Amazon CW metric timestamp.", "constantName": "org.apache.camel.component.aws2.cw.Cw2Constants#METRIC_TIMESTAMP" },
- "CamelAwsCwMetricDimensions": { "index": 5, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "Map<String, String>", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "A map of dimension names and dimension values.", "constantName": "org.apache.camel.component.aws2.cw.Cw2Constants#METRIC_DIMENSIONS" },
- "CamelAwsCwMetricDimensionName": { "index": 6, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The Amazon CW metric dimension name.", "constantName": "org.apache.camel.component.aws2.cw.Cw2Constants#METRIC_DIMENSION_NAME" },
- "CamelAwsCwMetricDimensionValue": { "index": 7, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The Amazon CW metric dimension value.", "constantName": "org.apache.camel.component.aws2.cw.Cw2Constants#METRIC_DIMENSION_VALUE" }
+ "CamelAwsCwOperation": { "index": 0, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The operation to perform.", "constantName": "org.apache.camel.component.aws2.cw.Cw2Constants#OPERATION" },
+ "CamelAwsCwMetricNamespace": { "index": 1, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The Amazon CW metric namespace.", "constantName": "org.apache.camel.component.aws2.cw.Cw2Constants#METRIC_NAMESPACE" },
+ "CamelAwsCwMetricName": { "index": 2, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The Amazon CW metric name.", "constantName": "org.apache.camel.component.aws2.cw.Cw2Constants#METRIC_NAME" },
+ "CamelAwsCwMetricValue": { "index": 3, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "Double", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The Amazon CW metric value.", "constantName": "org.apache.camel.component.aws2.cw.Cw2Constants#METRIC_VALUE" },
+ "CamelAwsCwMetricUnit": { "index": 4, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The Amazon CW metric unit.", "constantName": "org.apache.camel.component.aws2.cw.Cw2Constants#METRIC_UNIT" },
+ "CamelAwsCwMetricTimestamp": { "index": 5, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "Date", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The Amazon CW metric timestamp.", "constantName": "org.apache.camel.component.aws2.cw.Cw2Constants#METRIC_TIMESTAMP" },
+ "CamelAwsCwMetricDimensions": { "index": 6, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "Map<String, String>", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "A map of dimension names and dimension values.", "constantName": "org.apache.camel.component.aws2.cw.Cw2Constants#METRIC_DIMENSIONS" },
+ "CamelAwsCwMetricDimensionName": { "index": 7, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The Amazon CW metric dimension name.", "constantName": "org.apache.camel.component.aws2.cw.Cw2Constants#METRIC_DIMENSION_NAME" },
+ "CamelAwsCwMetricDimensionValue": { "index": 8, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The Amazon CW metric dimension value.", "constantName": "org.apache.camel.component.aws2.cw.Cw2Constants#METRIC_DIMENSION_VALUE" },
+ "CamelAwsCwAlarmName": { "index": 9, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The name of the alarm.", "constantName": "org.apache.camel.component.aws2.cw.Cw2Constants#ALARM_NAME" },
+ "CamelAwsCwAlarmState": { "index": 10, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The state value for the alarm (OK, ALARM, INSUFFICIENT_DATA).", "constantName": "org.apache.camel.component.aws2.cw.Cw2Constants#ALARM_STATE" },
+ "CamelAwsCwNextToken": { "index": 11, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The token for the next set of results.", "constantName": "org.apache.camel.component.aws2.cw.Cw2Constants#NEXT_TOKEN" },
+ "CamelAwsCwMaxResults": { "index": 12, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "Integer", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The maximum number of results to return.", "constantName": "org.apache.camel.component.aws2.cw.Cw2Constants#MAX_RESULTS" },
+ "CamelAwsCwIsTruncated": { "index": 13, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "Boolean", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Whether the response has more results (is truncated).", "constantName": "org.apache.camel.component.aws2.cw.Cw2Constants#IS_TRUNCATED" }
},
"properties": {
"namespace": { "index": 0, "kind": "path", "displayName": "Namespace", "group": "producer", "label": "", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.cw.Cw2Configuration", "configurationField": "configuration", "description": "The metric namespace" },
"name": { "index": 1, "kind": "parameter", "displayName": "Name", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.cw.Cw2Configuration", "configurationField": "configuration", "description": "The metric name" },
- "overrideEndpoint": { "index": 2, "kind": "parameter", "displayName": "Override Endpoint", "group": "producer", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.aws2.cw.Cw2Configuration", "configurationField": "configuration", "description": "Set the need for overriding the endpoint. This option needs to be used in combination wit [...]
- "region": { "index": 3, "kind": "parameter", "displayName": "Region", "group": "producer", "label": "", "required": false, "type": "enum", "javaType": "java.lang.String", "enum": [ "ap-south-2", "ap-south-1", "eu-south-1", "eu-south-2", "us-gov-east-1", "me-central-1", "il-central-1", "ca-central-1", "eu-central-1", "us-iso-west-1", "eu-central-2", "eu-isoe-west-1", "us-west-1", "us-west-2", "af-south-1", "eu-north-1", "eu-west-3", "eu-west-2", "eu-west-1", "ap-northeast-3", "ap-nort [...]
- "timestamp": { "index": 4, "kind": "parameter", "displayName": "Timestamp", "group": "producer", "label": "", "required": false, "type": "object", "javaType": "java.time.Instant", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.cw.Cw2Configuration", "configurationField": "configuration", "description": "The metric timestamp" },
- "unit": { "index": 5, "kind": "parameter", "displayName": "Unit", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.cw.Cw2Configuration", "configurationField": "configuration", "description": "The metric unit" },
- "uriEndpointOverride": { "index": 6, "kind": "parameter", "displayName": "Uri Endpoint Override", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.cw.Cw2Configuration", "configurationField": "configuration", "description": "Set the overriding uri endpoint. This option needs to be used in combination with overrideEndpoin [...]
- "value": { "index": 7, "kind": "parameter", "displayName": "Value", "group": "producer", "label": "", "required": false, "type": "number", "javaType": "java.lang.Double", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.cw.Cw2Configuration", "configurationField": "configuration", "description": "The metric value" },
- "lazyStartProducer": { "index": 8, "kind": "parameter", "displayName": "Lazy Start Producer", "group": "producer (advanced)", "label": "producer,advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a produc [...]
- "amazonCwClient": { "index": 9, "kind": "parameter", "displayName": "Amazon Cw Client", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "software.amazon.awssdk.services.cloudwatch.CloudWatchClient", "deprecated": false, "deprecationNote": "", "autowired": true, "secret": false, "configurationClass": "org.apache.camel.component.aws2.cw.Cw2Configuration", "configurationField": "configuration", "description": "To use the AmazonCloudWatch as the [...]
- "proxyHost": { "index": 10, "kind": "parameter", "displayName": "Proxy Host", "group": "proxy", "label": "proxy", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.cw.Cw2Configuration", "configurationField": "configuration", "description": "To define a proxy host when instantiating the CW client" },
- "proxyPort": { "index": 11, "kind": "parameter", "displayName": "Proxy Port", "group": "proxy", "label": "proxy", "required": false, "type": "integer", "javaType": "java.lang.Integer", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.cw.Cw2Configuration", "configurationField": "configuration", "description": "To define a proxy port when instantiating the CW client" },
- "proxyProtocol": { "index": 12, "kind": "parameter", "displayName": "Proxy Protocol", "group": "proxy", "label": "proxy", "required": false, "type": "enum", "javaType": "software.amazon.awssdk.core.Protocol", "enum": [ "HTTP", "HTTPS" ], "deprecated": false, "autowired": false, "secret": false, "defaultValue": "HTTPS", "configurationClass": "org.apache.camel.component.aws2.cw.Cw2Configuration", "configurationField": "configuration", "description": "To define a proxy protocol when ins [...]
- "accessKey": { "index": 13, "kind": "parameter", "displayName": "Access Key", "group": "security", "label": "security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": true, "configurationClass": "org.apache.camel.component.aws2.cw.Cw2Configuration", "configurationField": "configuration", "description": "Amazon AWS Access Key" },
- "profileCredentialsName": { "index": 14, "kind": "parameter", "displayName": "Profile Credentials Name", "group": "security", "label": "security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.cw.Cw2Configuration", "configurationField": "configuration", "description": "If using a profile credentials provider, this parameter will set the profile name" },
- "secretKey": { "index": 15, "kind": "parameter", "displayName": "Secret Key", "group": "security", "label": "security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": true, "configurationClass": "org.apache.camel.component.aws2.cw.Cw2Configuration", "configurationField": "configuration", "description": "Amazon AWS Secret Key" },
- "sessionToken": { "index": 16, "kind": "parameter", "displayName": "Session Token", "group": "security", "label": "security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": true, "configurationClass": "org.apache.camel.component.aws2.cw.Cw2Configuration", "configurationField": "configuration", "description": "Amazon AWS Session Token used when the user needs to assume an IAM role" },
- "trustAllCertificates": { "index": 17, "kind": "parameter", "displayName": "Trust All Certificates", "group": "security", "label": "security", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.aws2.cw.Cw2Configuration", "configurationField": "configuration", "description": "If we want to trust all certificates in case of overriding the endpoint" },
- "useDefaultCredentialsProvider": { "index": 18, "kind": "parameter", "displayName": "Use Default Credentials Provider", "group": "security", "label": "security", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.aws2.cw.Cw2Configuration", "configurationField": "configuration", "description": "Set whether the S3 client should expect to load cred [...]
- "useProfileCredentialsProvider": { "index": 19, "kind": "parameter", "displayName": "Use Profile Credentials Provider", "group": "security", "label": "security", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.aws2.cw.Cw2Configuration", "configurationField": "configuration", "description": "Set whether the Cloudwatch client should expect to l [...]
- "useSessionCredentials": { "index": 20, "kind": "parameter", "displayName": "Use Session Credentials", "group": "security", "label": "security", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.aws2.cw.Cw2Configuration", "configurationField": "configuration", "description": "Set whether the CloudWatch client should expect to use Session Creden [...]
+ "operation": { "index": 2, "kind": "parameter", "displayName": "Operation", "group": "producer", "label": "", "required": false, "type": "enum", "javaType": "org.apache.camel.component.aws2.cw.Cw2Operations", "enum": [ "putMetricData", "listMetrics", "describeAlarms", "describeAlarmsForMetric" ], "deprecated": false, "autowired": false, "secret": false, "defaultValue": "putMetricData", "configurationClass": "org.apache.camel.component.aws2.cw.Cw2Configuration", "configurationField": [...]
+ "overrideEndpoint": { "index": 3, "kind": "parameter", "displayName": "Override Endpoint", "group": "producer", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.aws2.cw.Cw2Configuration", "configurationField": "configuration", "description": "Set the need for overriding the endpoint. This option needs to be used in combination wit [...]
+ "region": { "index": 4, "kind": "parameter", "displayName": "Region", "group": "producer", "label": "", "required": false, "type": "enum", "javaType": "java.lang.String", "enum": [ "ap-south-2", "ap-south-1", "eu-south-1", "eu-south-2", "us-gov-east-1", "me-central-1", "il-central-1", "ca-central-1", "eu-central-1", "us-iso-west-1", "eu-central-2", "eu-isoe-west-1", "us-west-1", "us-west-2", "af-south-1", "eu-north-1", "eu-west-3", "eu-west-2", "eu-west-1", "ap-northeast-3", "ap-nort [...]
+ "timestamp": { "index": 5, "kind": "parameter", "displayName": "Timestamp", "group": "producer", "label": "", "required": false, "type": "object", "javaType": "java.time.Instant", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.cw.Cw2Configuration", "configurationField": "configuration", "description": "The metric timestamp" },
+ "unit": { "index": 6, "kind": "parameter", "displayName": "Unit", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.cw.Cw2Configuration", "configurationField": "configuration", "description": "The metric unit" },
+ "uriEndpointOverride": { "index": 7, "kind": "parameter", "displayName": "Uri Endpoint Override", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.cw.Cw2Configuration", "configurationField": "configuration", "description": "Set the overriding uri endpoint. This option needs to be used in combination with overrideEndpoin [...]
+ "value": { "index": 8, "kind": "parameter", "displayName": "Value", "group": "producer", "label": "", "required": false, "type": "number", "javaType": "java.lang.Double", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.cw.Cw2Configuration", "configurationField": "configuration", "description": "The metric value" },
+ "lazyStartProducer": { "index": 9, "kind": "parameter", "displayName": "Lazy Start Producer", "group": "producer (advanced)", "label": "producer,advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a produc [...]
+ "amazonCwClient": { "index": 10, "kind": "parameter", "displayName": "Amazon Cw Client", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "software.amazon.awssdk.services.cloudwatch.CloudWatchClient", "deprecated": false, "deprecationNote": "", "autowired": true, "secret": false, "configurationClass": "org.apache.camel.component.aws2.cw.Cw2Configuration", "configurationField": "configuration", "description": "To use the AmazonCloudWatch as th [...]
+ "proxyHost": { "index": 11, "kind": "parameter", "displayName": "Proxy Host", "group": "proxy", "label": "proxy", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.cw.Cw2Configuration", "configurationField": "configuration", "description": "To define a proxy host when instantiating the CW client" },
+ "proxyPort": { "index": 12, "kind": "parameter", "displayName": "Proxy Port", "group": "proxy", "label": "proxy", "required": false, "type": "integer", "javaType": "java.lang.Integer", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.cw.Cw2Configuration", "configurationField": "configuration", "description": "To define a proxy port when instantiating the CW client" },
+ "proxyProtocol": { "index": 13, "kind": "parameter", "displayName": "Proxy Protocol", "group": "proxy", "label": "proxy", "required": false, "type": "enum", "javaType": "software.amazon.awssdk.core.Protocol", "enum": [ "HTTP", "HTTPS" ], "deprecated": false, "autowired": false, "secret": false, "defaultValue": "HTTPS", "configurationClass": "org.apache.camel.component.aws2.cw.Cw2Configuration", "configurationField": "configuration", "description": "To define a proxy protocol when ins [...]
+ "accessKey": { "index": 14, "kind": "parameter", "displayName": "Access Key", "group": "security", "label": "security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": true, "configurationClass": "org.apache.camel.component.aws2.cw.Cw2Configuration", "configurationField": "configuration", "description": "Amazon AWS Access Key" },
+ "profileCredentialsName": { "index": 15, "kind": "parameter", "displayName": "Profile Credentials Name", "group": "security", "label": "security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.cw.Cw2Configuration", "configurationField": "configuration", "description": "If using a profile credentials provider, this parameter will set the profile name" },
+ "secretKey": { "index": 16, "kind": "parameter", "displayName": "Secret Key", "group": "security", "label": "security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": true, "configurationClass": "org.apache.camel.component.aws2.cw.Cw2Configuration", "configurationField": "configuration", "description": "Amazon AWS Secret Key" },
+ "sessionToken": { "index": 17, "kind": "parameter", "displayName": "Session Token", "group": "security", "label": "security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": true, "configurationClass": "org.apache.camel.component.aws2.cw.Cw2Configuration", "configurationField": "configuration", "description": "Amazon AWS Session Token used when the user needs to assume an IAM role" },
+ "trustAllCertificates": { "index": 18, "kind": "parameter", "displayName": "Trust All Certificates", "group": "security", "label": "security", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.aws2.cw.Cw2Configuration", "configurationField": "configuration", "description": "If we want to trust all certificates in case of overriding the endpoint" },
+ "useDefaultCredentialsProvider": { "index": 19, "kind": "parameter", "displayName": "Use Default Credentials Provider", "group": "security", "label": "security", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.aws2.cw.Cw2Configuration", "configurationField": "configuration", "description": "Set whether the S3 client should expect to load cred [...]
+ "useProfileCredentialsProvider": { "index": 20, "kind": "parameter", "displayName": "Use Profile Credentials Provider", "group": "security", "label": "security", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.aws2.cw.Cw2Configuration", "configurationField": "configuration", "description": "Set whether the Cloudwatch client should expect to l [...]
+ "useSessionCredentials": { "index": 21, "kind": "parameter", "displayName": "Use Session Credentials", "group": "security", "label": "security", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.aws2.cw.Cw2Configuration", "configurationField": "configuration", "description": "Set whether the CloudWatch client should expect to use Session Creden [...]
}
}
diff --git a/components/camel-aws/camel-aws2-cw/src/main/java/org/apache/camel/component/aws2/cw/Cw2Configuration.java b/components/camel-aws/camel-aws2-cw/src/main/java/org/apache/camel/component/aws2/cw/Cw2Configuration.java
index 3ded82d5a973..ebb10fb86493 100644
--- a/components/camel-aws/camel-aws2-cw/src/main/java/org/apache/camel/component/aws2/cw/Cw2Configuration.java
+++ b/components/camel-aws/camel-aws2-cw/src/main/java/org/apache/camel/component/aws2/cw/Cw2Configuration.java
@@ -33,6 +33,8 @@ public class Cw2Configuration implements Cloneable, AwsCommonConfiguration {
@UriPath
@Metadata(required = true)
private String namespace;
+ @UriParam(defaultValue = "putMetricData")
+ private Cw2Operations operation = Cw2Operations.putMetricData;
@UriParam
@Metadata(label = "advanced", autowired = true)
private CloudWatchClient amazonCwClient;
@@ -150,6 +152,17 @@ public class Cw2Configuration implements Cloneable, AwsCommonConfiguration {
this.namespace = namespace;
}
+ public Cw2Operations getOperation() {
+ return operation;
+ }
+
+ /**
+ * The operation to perform. Defaults to putMetricData.
+ */
+ public void setOperation(Cw2Operations operation) {
+ this.operation = operation;
+ }
+
/**
* The metric timestamp
*/
diff --git a/components/camel-aws/camel-aws2-cw/src/main/java/org/apache/camel/component/aws2/cw/Cw2Constants.java b/components/camel-aws/camel-aws2-cw/src/main/java/org/apache/camel/component/aws2/cw/Cw2Constants.java
index 95ee0e482d72..3703c50a945b 100644
--- a/components/camel-aws/camel-aws2-cw/src/main/java/org/apache/camel/component/aws2/cw/Cw2Constants.java
+++ b/components/camel-aws/camel-aws2-cw/src/main/java/org/apache/camel/component/aws2/cw/Cw2Constants.java
@@ -22,6 +22,11 @@ import org.apache.camel.spi.Metadata;
* Constants used in Camel AWS CloudWatch module SDK v2
*/
public interface Cw2Constants {
+ // Operation
+ @Metadata(description = "The operation to perform.", javaType = "String")
+ String OPERATION = "CamelAwsCwOperation";
+
+ // Metric data constants
@Metadata(description = "The Amazon CW metric namespace.", javaType = "String")
String METRIC_NAMESPACE = "CamelAwsCwMetricNamespace";
@Metadata(description = "The Amazon CW metric name.", javaType = "String")
@@ -38,4 +43,18 @@ public interface Cw2Constants {
String METRIC_DIMENSION_NAME = "CamelAwsCwMetricDimensionName";
@Metadata(description = "The Amazon CW metric dimension value.", javaType = "String")
String METRIC_DIMENSION_VALUE = "CamelAwsCwMetricDimensionValue";
+
+ // Alarm constants
+ @Metadata(description = "The name of the alarm.", javaType = "String")
+ String ALARM_NAME = "CamelAwsCwAlarmName";
+ @Metadata(description = "The state value for the alarm (OK, ALARM, INSUFFICIENT_DATA).", javaType = "String")
+ String ALARM_STATE = "CamelAwsCwAlarmState";
+
+ // Pagination constants
+ @Metadata(description = "The token for the next set of results.", javaType = "String")
+ String NEXT_TOKEN = "CamelAwsCwNextToken";
+ @Metadata(description = "The maximum number of results to return.", javaType = "Integer")
+ String MAX_RESULTS = "CamelAwsCwMaxResults";
+ @Metadata(description = "Whether the response has more results (is truncated).", javaType = "Boolean")
+ String IS_TRUNCATED = "CamelAwsCwIsTruncated";
}
diff --git a/components/camel-aws/camel-aws2-cw/src/test/java/org/apache/camel/component/aws2/cw/CloudWatchClientMock.java b/components/camel-aws/camel-aws2-cw/src/main/java/org/apache/camel/component/aws2/cw/Cw2Operations.java
similarity index 50%
copy from components/camel-aws/camel-aws2-cw/src/test/java/org/apache/camel/component/aws2/cw/CloudWatchClientMock.java
copy to components/camel-aws/camel-aws2-cw/src/main/java/org/apache/camel/component/aws2/cw/Cw2Operations.java
index 4a5c067069cb..0d7c8fdd624d 100644
--- a/components/camel-aws/camel-aws2-cw/src/test/java/org/apache/camel/component/aws2/cw/CloudWatchClientMock.java
+++ b/components/camel-aws/camel-aws2-cw/src/main/java/org/apache/camel/component/aws2/cw/Cw2Operations.java
@@ -16,31 +16,13 @@
*/
package org.apache.camel.component.aws2.cw;
-import software.amazon.awssdk.services.cloudwatch.CloudWatchClient;
-import software.amazon.awssdk.services.cloudwatch.CloudWatchServiceClientConfiguration;
-import software.amazon.awssdk.services.cloudwatch.model.PutMetricDataRequest;
-import software.amazon.awssdk.services.cloudwatch.model.PutMetricDataResponse;
-
-public class CloudWatchClientMock implements CloudWatchClient {
-
- @Override
- public String serviceName() {
- return null;
- }
-
- @Override
- public void close() {
- }
-
- @Override
- public PutMetricDataResponse putMetricData(PutMetricDataRequest request) {
- PutMetricDataResponse.Builder builder = PutMetricDataResponse.builder();
- return builder.build();
- }
-
- @Override
- public CloudWatchServiceClientConfiguration serviceClientConfiguration() {
- return null;
- }
+/**
+ * Operations supported by the AWS CloudWatch component.
+ */
+public enum Cw2Operations {
+ putMetricData,
+ listMetrics,
+ describeAlarms,
+ describeAlarmsForMetric
}
diff --git a/components/camel-aws/camel-aws2-cw/src/main/java/org/apache/camel/component/aws2/cw/Cw2Producer.java b/components/camel-aws/camel-aws2-cw/src/main/java/org/apache/camel/component/aws2/cw/Cw2Producer.java
index 02781cdd2b07..4bf12a65bde7 100644
--- a/components/camel-aws/camel-aws2-cw/src/main/java/org/apache/camel/component/aws2/cw/Cw2Producer.java
+++ b/components/camel-aws/camel-aws2-cw/src/main/java/org/apache/camel/component/aws2/cw/Cw2Producer.java
@@ -22,18 +22,29 @@ import java.util.Arrays;
import java.util.Collection;
import java.util.List;
import java.util.Map;
+import java.util.function.Supplier;
import org.apache.camel.Endpoint;
import org.apache.camel.Exchange;
+import org.apache.camel.Message;
import org.apache.camel.health.HealthCheck;
import org.apache.camel.health.HealthCheckHelper;
import org.apache.camel.health.WritableHealthCheckRepository;
import org.apache.camel.support.DefaultProducer;
import org.apache.camel.util.CastUtils;
+import org.apache.camel.util.ObjectHelper;
import org.apache.camel.util.URISupport;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import software.amazon.awssdk.services.cloudwatch.CloudWatchClient;
+import software.amazon.awssdk.services.cloudwatch.model.DescribeAlarmsForMetricRequest;
+import software.amazon.awssdk.services.cloudwatch.model.DescribeAlarmsForMetricResponse;
+import software.amazon.awssdk.services.cloudwatch.model.DescribeAlarmsRequest;
+import software.amazon.awssdk.services.cloudwatch.model.DescribeAlarmsResponse;
import software.amazon.awssdk.services.cloudwatch.model.Dimension;
+import software.amazon.awssdk.services.cloudwatch.model.DimensionFilter;
+import software.amazon.awssdk.services.cloudwatch.model.ListMetricsRequest;
+import software.amazon.awssdk.services.cloudwatch.model.ListMetricsResponse;
import software.amazon.awssdk.services.cloudwatch.model.MetricDatum;
import software.amazon.awssdk.services.cloudwatch.model.PutMetricDataRequest;
import software.amazon.awssdk.services.cloudwatch.model.StandardUnit;
@@ -55,6 +66,36 @@ public class Cw2Producer extends DefaultProducer {
@Override
public void process(Exchange exchange) throws Exception {
+ Cw2Operations operation = determineOperation(exchange);
+ CloudWatchClient client = getEndpoint().getCloudWatchClient();
+
+ switch (operation) {
+ case putMetricData:
+ putMetricData(client, exchange);
+ break;
+ case listMetrics:
+ listMetrics(client, exchange);
+ break;
+ case describeAlarms:
+ describeAlarms(client, exchange);
+ break;
+ case describeAlarmsForMetric:
+ describeAlarmsForMetric(client, exchange);
+ break;
+ default:
+ throw new IllegalArgumentException("Unsupported operation: " + operation);
+ }
+ }
+
+ private Cw2Operations determineOperation(Exchange exchange) {
+ Cw2Operations operation = exchange.getIn().getHeader(Cw2Constants.OPERATION, Cw2Operations.class);
+ if (operation == null) {
+ operation = getConfiguration().getOperation();
+ }
+ return operation;
+ }
+
+ private void putMetricData(CloudWatchClient client, Exchange exchange) {
List<MetricDatum> metricData = getMetricData(exchange);
PutMetricDataRequest.Builder builder = PutMetricDataRequest.builder();
@@ -62,7 +103,111 @@ public class Cw2Producer extends DefaultProducer {
PutMetricDataRequest request = builder.build();
LOG.info("Sending request [{}] from exchange [{}]...", request, exchange);
- getEndpoint().getCloudWatchClient().putMetricData(request);
+ client.putMetricData(request);
+ }
+
+ private void listMetrics(CloudWatchClient client, Exchange exchange) {
+ ListMetricsRequest.Builder builder = ListMetricsRequest.builder();
+
+ String namespace = getOptionalHeader(exchange, Cw2Constants.METRIC_NAMESPACE, String.class,
+ () -> getConfiguration().getNamespace(), "namespace");
+ if (namespace != null) {
+ builder.namespace(namespace);
+ }
+
+ String metricName = getOptionalHeader(exchange, Cw2Constants.METRIC_NAME, String.class,
+ () -> getConfiguration().getName(), "metric name");
+ if (metricName != null) {
+ builder.metricName(metricName);
+ }
+
+ String nextToken = exchange.getIn().getHeader(Cw2Constants.NEXT_TOKEN, String.class);
+ if (nextToken != null) {
+ builder.nextToken(nextToken);
+ }
+
+ // Handle dimensions filter
+ @SuppressWarnings("unchecked")
+ Map<String, String> dimensions = exchange.getIn().getHeader(Cw2Constants.METRIC_DIMENSIONS, Map.class);
+ if (dimensions != null) {
+ List<DimensionFilter> dimensionFilters = new ArrayList<>();
+ for (Map.Entry<String, String> entry : dimensions.entrySet()) {
+ dimensionFilters.add(DimensionFilter.builder()
+ .name(entry.getKey())
+ .value(entry.getValue())
+ .build());
+ }
+ builder.dimensions(dimensionFilters);
+ }
+
+ ListMetricsResponse response = client.listMetrics(builder.build());
+
+ Message message = getMessageForResponse(exchange);
+ message.setBody(response);
+ message.setHeader(Cw2Constants.NEXT_TOKEN, response.nextToken());
+ message.setHeader(Cw2Constants.IS_TRUNCATED, response.nextToken() != null);
+ }
+
+ private void describeAlarms(CloudWatchClient client, Exchange exchange) {
+ DescribeAlarmsRequest.Builder builder = DescribeAlarmsRequest.builder();
+
+ String alarmName = exchange.getIn().getHeader(Cw2Constants.ALARM_NAME, String.class);
+ if (alarmName != null) {
+ builder.alarmNames(alarmName);
+ }
+
+ String stateValue = exchange.getIn().getHeader(Cw2Constants.ALARM_STATE, String.class);
+ if (stateValue != null) {
+ builder.stateValue(stateValue);
+ }
+
+ String nextToken = exchange.getIn().getHeader(Cw2Constants.NEXT_TOKEN, String.class);
+ if (nextToken != null) {
+ builder.nextToken(nextToken);
+ }
+
+ Integer maxResults = exchange.getIn().getHeader(Cw2Constants.MAX_RESULTS, Integer.class);
+ if (maxResults != null) {
+ builder.maxRecords(maxResults);
+ }
+
+ DescribeAlarmsResponse response = client.describeAlarms(builder.build());
+
+ Message message = getMessageForResponse(exchange);
+ message.setBody(response);
+ message.setHeader(Cw2Constants.NEXT_TOKEN, response.nextToken());
+ message.setHeader(Cw2Constants.IS_TRUNCATED, response.nextToken() != null);
+ }
+
+ private void describeAlarmsForMetric(CloudWatchClient client, Exchange exchange) {
+ DescribeAlarmsForMetricRequest.Builder builder = DescribeAlarmsForMetricRequest.builder();
+
+ String namespace = getRequiredHeader(exchange, Cw2Constants.METRIC_NAMESPACE, String.class,
+ () -> getConfiguration().getNamespace(), "Namespace is required for describeAlarmsForMetric");
+ builder.namespace(namespace);
+
+ String metricName = getRequiredHeader(exchange, Cw2Constants.METRIC_NAME, String.class,
+ () -> getConfiguration().getName(), "Metric name is required for describeAlarmsForMetric");
+ builder.metricName(metricName);
+
+ // Handle dimensions
+ @SuppressWarnings("unchecked")
+ Map<String, String> dimensions = exchange.getIn().getHeader(Cw2Constants.METRIC_DIMENSIONS, Map.class);
+ if (dimensions != null) {
+ List<Dimension> dimensionList = new ArrayList<>();
+ for (Map.Entry<String, String> entry : dimensions.entrySet()) {
+ dimensionList.add(Dimension.builder()
+ .name(entry.getKey())
+ .value(entry.getValue())
+ .build());
+ }
+ builder.dimensions(dimensionList);
+ }
+
+ DescribeAlarmsForMetricResponse response = client.describeAlarmsForMetric(builder.build());
+
+ Message message = getMessageForResponse(exchange);
+ message.setBody(response);
}
private List<MetricDatum> getMetricData(Exchange exchange) {
@@ -103,45 +248,72 @@ public class Cw2Producer extends DefaultProducer {
}
private Instant determineTimestamp(Exchange exchange) {
- Instant timestamp = exchange.getIn().getHeader(Cw2Constants.METRIC_TIMESTAMP, Instant.class);
- if (timestamp == null) {
- timestamp = getConfiguration().getTimestamp();
- }
- return timestamp;
+ return getOptionalHeader(exchange, Cw2Constants.METRIC_TIMESTAMP, Instant.class,
+ () -> getConfiguration().getTimestamp(), "timestamp");
}
private String determineNameSpace(Exchange exchange) {
- String namespace = exchange.getIn().getHeader(Cw2Constants.METRIC_NAMESPACE, String.class);
- if (namespace == null) {
- namespace = getConfiguration().getNamespace();
- }
- return namespace;
+ return getOptionalHeader(exchange, Cw2Constants.METRIC_NAMESPACE, String.class,
+ () -> getConfiguration().getNamespace(), "namespace");
}
private String determineName(Exchange exchange) {
- String name = exchange.getIn().getHeader(Cw2Constants.METRIC_NAME, String.class);
- if (name == null) {
- name = getConfiguration().getName();
- }
- return name;
+ return getOptionalHeader(exchange, Cw2Constants.METRIC_NAME, String.class,
+ () -> getConfiguration().getName(), "name");
}
private Double determineValue(Exchange exchange) {
- Double value = exchange.getIn().getHeader(Cw2Constants.METRIC_VALUE, Double.class);
- if (value == null) {
- value = getConfiguration().getValue();
- }
+ Double value = getOptionalHeader(exchange, Cw2Constants.METRIC_VALUE, Double.class,
+ () -> getConfiguration().getValue(), "value");
return value != null ? value : Double.valueOf(1);
}
private StandardUnit determineUnit(Exchange exchange) {
- String unit = exchange.getIn().getHeader(Cw2Constants.METRIC_UNIT, String.class);
- if (unit == null) {
- unit = getConfiguration().getUnit();
- }
+ String unit = getOptionalHeader(exchange, Cw2Constants.METRIC_UNIT, String.class,
+ () -> getConfiguration().getUnit(), "unit");
return unit != null ? StandardUnit.fromValue(unit) : StandardUnit.COUNT;
}
+ /**
+ * Gets an optional value from the exchange header, falling back to configuration if not present.
+ */
+ private <T> T getOptionalHeader(
+ Exchange exchange,
+ String headerName,
+ Class<T> headerType,
+ Supplier<T> configurationValue,
+ String parameterName) {
+ T value = exchange.getIn().getHeader(headerName, headerType);
+ if (ObjectHelper.isEmpty(value)) {
+ value = configurationValue.get();
+ LOG.trace("CloudWatch {} is missing, using default one [{}]", parameterName, value);
+ }
+ return value;
+ }
+
+ /**
+ * Gets a required value from the exchange header, falling back to configuration if not present.
+ */
+ private <T> T getRequiredHeader(
+ Exchange exchange,
+ String headerName,
+ Class<T> headerType,
+ Supplier<T> configurationValue,
+ String errorMessage) {
+ T value = exchange.getIn().getHeader(headerName, headerType);
+ if (ObjectHelper.isEmpty(value)) {
+ value = configurationValue.get();
+ }
+ if (ObjectHelper.isEmpty(value)) {
+ throw new IllegalArgumentException(errorMessage);
+ }
+ return value;
+ }
+
+ public static Message getMessageForResponse(final Exchange exchange) {
+ return exchange.getMessage();
+ }
+
protected Cw2Configuration getConfiguration() {
return getEndpoint().getConfiguration();
}
diff --git a/components/camel-aws/camel-aws2-cw/src/test/java/org/apache/camel/component/aws2/cw/CloudWatchClientMock.java b/components/camel-aws/camel-aws2-cw/src/test/java/org/apache/camel/component/aws2/cw/CloudWatchClientMock.java
index 4a5c067069cb..d33619db12ea 100644
--- a/components/camel-aws/camel-aws2-cw/src/test/java/org/apache/camel/component/aws2/cw/CloudWatchClientMock.java
+++ b/components/camel-aws/camel-aws2-cw/src/test/java/org/apache/camel/component/aws2/cw/CloudWatchClientMock.java
@@ -16,8 +16,19 @@
*/
package org.apache.camel.component.aws2.cw;
+import java.util.ArrayList;
+import java.util.List;
+
import software.amazon.awssdk.services.cloudwatch.CloudWatchClient;
import software.amazon.awssdk.services.cloudwatch.CloudWatchServiceClientConfiguration;
+import software.amazon.awssdk.services.cloudwatch.model.DescribeAlarmsForMetricRequest;
+import software.amazon.awssdk.services.cloudwatch.model.DescribeAlarmsForMetricResponse;
+import software.amazon.awssdk.services.cloudwatch.model.DescribeAlarmsRequest;
+import software.amazon.awssdk.services.cloudwatch.model.DescribeAlarmsResponse;
+import software.amazon.awssdk.services.cloudwatch.model.ListMetricsRequest;
+import software.amazon.awssdk.services.cloudwatch.model.ListMetricsResponse;
+import software.amazon.awssdk.services.cloudwatch.model.Metric;
+import software.amazon.awssdk.services.cloudwatch.model.MetricAlarm;
import software.amazon.awssdk.services.cloudwatch.model.PutMetricDataRequest;
import software.amazon.awssdk.services.cloudwatch.model.PutMetricDataResponse;
@@ -38,6 +49,53 @@ public class CloudWatchClientMock implements CloudWatchClient {
return builder.build();
}
+ @Override
+ public ListMetricsResponse listMetrics(ListMetricsRequest request) {
+ List<Metric> metrics = new ArrayList<>();
+ metrics.add(Metric.builder()
+ .namespace("TestNamespace")
+ .metricName("TestMetric")
+ .build());
+ metrics.add(Metric.builder()
+ .namespace("TestNamespace")
+ .metricName("TestMetric2")
+ .build());
+
+ return ListMetricsResponse.builder()
+ .metrics(metrics)
+ .nextToken(null) // No more results
+ .build();
+ }
+
+ @Override
+ public DescribeAlarmsResponse describeAlarms(DescribeAlarmsRequest request) {
+ List<MetricAlarm> alarms = new ArrayList<>();
+ alarms.add(MetricAlarm.builder()
+ .alarmName("TestAlarm")
+ .metricName("TestMetric")
+ .namespace("TestNamespace")
+ .build());
+
+ return DescribeAlarmsResponse.builder()
+ .metricAlarms(alarms)
+ .nextToken(null) // No more results
+ .build();
+ }
+
+ @Override
+ public DescribeAlarmsForMetricResponse describeAlarmsForMetric(DescribeAlarmsForMetricRequest request) {
+ List<MetricAlarm> alarms = new ArrayList<>();
+ alarms.add(MetricAlarm.builder()
+ .alarmName("TestAlarmForMetric")
+ .metricName(request.metricName())
+ .namespace(request.namespace())
+ .build());
+
+ return DescribeAlarmsForMetricResponse.builder()
+ .metricAlarms(alarms)
+ .build();
+ }
+
@Override
public CloudWatchServiceClientConfiguration serviceClientConfiguration() {
return null;
diff --git a/components/camel-aws/camel-aws2-cw/src/test/java/org/apache/camel/component/aws2/cw/CwComponentTest.java b/components/camel-aws/camel-aws2-cw/src/test/java/org/apache/camel/component/aws2/cw/CwComponentTest.java
index 2d7fa904f8fd..cb88f6585517 100644
--- a/components/camel-aws/camel-aws2-cw/src/test/java/org/apache/camel/component/aws2/cw/CwComponentTest.java
+++ b/components/camel-aws/camel-aws2-cw/src/test/java/org/apache/camel/component/aws2/cw/CwComponentTest.java
@@ -21,14 +21,22 @@ import java.time.Instant;
import org.apache.camel.BindToRegistry;
import org.apache.camel.EndpointInject;
import org.apache.camel.Exchange;
+import org.apache.camel.ExchangePattern;
import org.apache.camel.Processor;
import org.apache.camel.builder.RouteBuilder;
import org.apache.camel.component.mock.MockEndpoint;
import org.apache.camel.test.junit5.CamelTestSupport;
import org.junit.jupiter.api.Test;
import software.amazon.awssdk.services.cloudwatch.CloudWatchClient;
+import software.amazon.awssdk.services.cloudwatch.model.DescribeAlarmsForMetricResponse;
+import software.amazon.awssdk.services.cloudwatch.model.DescribeAlarmsResponse;
+import software.amazon.awssdk.services.cloudwatch.model.ListMetricsResponse;
import software.amazon.awssdk.services.cloudwatch.model.StandardUnit;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertFalse;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+
public class CwComponentTest extends CamelTestSupport {
@BindToRegistry("now")
@@ -58,6 +66,51 @@ public class CwComponentTest extends CamelTestSupport {
MockEndpoint.assertIsSatisfied(context);
}
+ @Test
+ public void listMetrics() throws Exception {
+ Exchange exchange = template.send("direct:listMetrics", ExchangePattern.InOut, new Processor() {
+ public void process(Exchange exchange) {
+ exchange.getIn().setHeader(Cw2Constants.METRIC_NAMESPACE, "TestNamespace");
+ }
+ });
+
+ ListMetricsResponse response = exchange.getMessage().getBody(ListMetricsResponse.class);
+ assertNotNull(response);
+ assertEquals(2, response.metrics().size());
+ assertEquals("TestMetric", response.metrics().get(0).metricName());
+ assertFalse(exchange.getMessage().getHeader(Cw2Constants.IS_TRUNCATED, Boolean.class));
+ }
+
+ @Test
+ public void describeAlarms() throws Exception {
+ Exchange exchange = template.send("direct:describeAlarms", ExchangePattern.InOut, new Processor() {
+ public void process(Exchange exchange) {
+ // No headers needed for basic describe alarms
+ }
+ });
+
+ DescribeAlarmsResponse response = exchange.getMessage().getBody(DescribeAlarmsResponse.class);
+ assertNotNull(response);
+ assertEquals(1, response.metricAlarms().size());
+ assertEquals("TestAlarm", response.metricAlarms().get(0).alarmName());
+ assertFalse(exchange.getMessage().getHeader(Cw2Constants.IS_TRUNCATED, Boolean.class));
+ }
+
+ @Test
+ public void describeAlarmsForMetric() throws Exception {
+ Exchange exchange = template.send("direct:describeAlarmsForMetric", ExchangePattern.InOut, new Processor() {
+ public void process(Exchange exchange) {
+ exchange.getIn().setHeader(Cw2Constants.METRIC_NAMESPACE, "TestNamespace");
+ exchange.getIn().setHeader(Cw2Constants.METRIC_NAME, "TestMetric");
+ }
+ });
+
+ DescribeAlarmsForMetricResponse response = exchange.getMessage().getBody(DescribeAlarmsForMetricResponse.class);
+ assertNotNull(response);
+ assertEquals(1, response.metricAlarms().size());
+ assertEquals("TestAlarmForMetric", response.metricAlarms().get(0).alarmName());
+ }
+
@Override
protected RouteBuilder createRouteBuilder() {
return new RouteBuilder() {
@@ -66,6 +119,15 @@ public class CwComponentTest extends CamelTestSupport {
from("direct:start").to(
"aws2-cw://camel.apache.org/test?amazonCwClient=#amazonCwClient&name=testMetric&unit=BYTES×tamp=#now")
.to("mock:result");
+
+ from("direct:listMetrics").to(
+ "aws2-cw://camel.apache.org/test?amazonCwClient=#amazonCwClient&operation=listMetrics");
+
+ from("direct:describeAlarms").to(
+ "aws2-cw://camel.apache.org/test?amazonCwClient=#amazonCwClient&operation=describeAlarms");
+
+ from("direct:describeAlarmsForMetric").to(
+ "aws2-cw://camel.apache.org/test?amazonCwClient=#amazonCwClient&operation=describeAlarmsForMetric");
}
};
}
diff --git a/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/Aws2CwComponentBuilderFactory.java b/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/Aws2CwComponentBuilderFactory.java
index 9e1759253b46..a86f724362a8 100644
--- a/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/Aws2CwComponentBuilderFactory.java
+++ b/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/Aws2CwComponentBuilderFactory.java
@@ -107,6 +107,24 @@ public interface Aws2CwComponentBuilderFactory {
}
+ /**
+ * The operation to perform. Defaults to putMetricData.
+ *
+ * The option is a:
+ * <code>org.apache.camel.component.aws2.cw.Cw2Operations</code> type.
+ *
+ * Default: putMetricData
+ * Group: producer
+ *
+ * @param operation the value to set
+ * @return the dsl builder
+ */
+ default Aws2CwComponentBuilder operation(org.apache.camel.component.aws2.cw.Cw2Operations operation) {
+ doSetProperty("operation", operation);
+ return this;
+ }
+
+
/**
* Set the need for overriding the endpoint. This option needs to be
* used in combination with the uriEndpointOverride option.
@@ -486,6 +504,7 @@ public interface Aws2CwComponentBuilderFactory {
case "configuration": ((Cw2Component) component).setConfiguration((org.apache.camel.component.aws2.cw.Cw2Configuration) value); return true;
case "lazyStartProducer": ((Cw2Component) component).setLazyStartProducer((boolean) value); return true;
case "name": getOrCreateConfiguration((Cw2Component) component).setName((java.lang.String) value); return true;
+ case "operation": getOrCreateConfiguration((Cw2Component) component).setOperation((org.apache.camel.component.aws2.cw.Cw2Operations) value); return true;
case "overrideEndpoint": getOrCreateConfiguration((Cw2Component) component).setOverrideEndpoint((boolean) value); return true;
case "region": getOrCreateConfiguration((Cw2Component) component).setRegion((java.lang.String) value); return true;
case "timestamp": getOrCreateConfiguration((Cw2Component) component).setTimestamp((java.time.Instant) value); return true;
diff --git a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/Cw2EndpointBuilderFactory.java b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/Cw2EndpointBuilderFactory.java
index 088efdb1b4d1..03a304d0f2e8 100644
--- a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/Cw2EndpointBuilderFactory.java
+++ b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/Cw2EndpointBuilderFactory.java
@@ -58,6 +58,38 @@ public interface Cw2EndpointBuilderFactory {
doSetProperty("name", name);
return this;
}
+ /**
+ * The operation to perform. Defaults to putMetricData.
+ *
+ * The option is a:
+ * <code>org.apache.camel.component.aws2.cw.Cw2Operations</code> type.
+ *
+ * Default: putMetricData
+ * Group: producer
+ *
+ * @param operation the value to set
+ * @return the dsl builder
+ */
+ default Cw2EndpointBuilder operation(org.apache.camel.component.aws2.cw.Cw2Operations operation) {
+ doSetProperty("operation", operation);
+ return this;
+ }
+ /**
+ * The operation to perform. Defaults to putMetricData.
+ *
+ * The option will be converted to a
+ * <code>org.apache.camel.component.aws2.cw.Cw2Operations</code> type.
+ *
+ * Default: putMetricData
+ * Group: producer
+ *
+ * @param operation the value to set
+ * @return the dsl builder
+ */
+ default Cw2EndpointBuilder operation(String operation) {
+ doSetProperty("operation", operation);
+ return this;
+ }
/**
* Set the need for overriding the endpoint. This option needs to be
* used in combination with the uriEndpointOverride option.
@@ -614,6 +646,18 @@ public interface Cw2EndpointBuilderFactory {
*/
private static final Cw2HeaderNameBuilder INSTANCE = new Cw2HeaderNameBuilder();
+ /**
+ * The operation to perform.
+ *
+ * The option is a: {@code String} type.
+ *
+ * Group: producer
+ *
+ * @return the name of the header {@code AwsCwOperation}.
+ */
+ public String awsCwOperation() {
+ return "CamelAwsCwOperation";
+ }
/**
* The Amazon CW metric namespace.
*
@@ -710,6 +754,66 @@ public interface Cw2EndpointBuilderFactory {
public String awsCwMetricDimensionValue() {
return "CamelAwsCwMetricDimensionValue";
}
+ /**
+ * The name of the alarm.
+ *
+ * The option is a: {@code String} type.
+ *
+ * Group: producer
+ *
+ * @return the name of the header {@code AwsCwAlarmName}.
+ */
+ public String awsCwAlarmName() {
+ return "CamelAwsCwAlarmName";
+ }
+ /**
+ * The state value for the alarm (OK, ALARM, INSUFFICIENT_DATA).
+ *
+ * The option is a: {@code String} type.
+ *
+ * Group: producer
+ *
+ * @return the name of the header {@code AwsCwAlarmState}.
+ */
+ public String awsCwAlarmState() {
+ return "CamelAwsCwAlarmState";
+ }
+ /**
+ * The token for the next set of results.
+ *
+ * The option is a: {@code String} type.
+ *
+ * Group: producer
+ *
+ * @return the name of the header {@code AwsCwNextToken}.
+ */
+ public String awsCwNextToken() {
+ return "CamelAwsCwNextToken";
+ }
+ /**
+ * The maximum number of results to return.
+ *
+ * The option is a: {@code Integer} type.
+ *
+ * Group: producer
+ *
+ * @return the name of the header {@code AwsCwMaxResults}.
+ */
+ public String awsCwMaxResults() {
+ return "CamelAwsCwMaxResults";
+ }
+ /**
+ * Whether the response has more results (is truncated).
+ *
+ * The option is a: {@code Boolean} type.
+ *
+ * Group: producer
+ *
+ * @return the name of the header {@code AwsCwIsTruncated}.
+ */
+ public String awsCwIsTruncated() {
+ return "CamelAwsCwIsTruncated";
+ }
}
static Cw2EndpointBuilder endpointBuilder(String componentName, String path) {
class Cw2EndpointBuilderImpl extends AbstractEndpointBuilder implements Cw2EndpointBuilder, AdvancedCw2EndpointBuilder {