This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git


The following commit(s) were added to refs/heads/main by this push:
     new 6d95af65864e CAMEL-27623: camel-aws2-ecs - operation not required, 
producer label on headers (#31008)
6d95af65864e is described below

commit 6d95af65864e4cba642b3b95e4a40f050ac8ec1a
Author: allthingssecurity <[email protected]>
AuthorDate: Sat Nov 28 00:26:27 2026 +0530

    CAMEL-27623: camel-aws2-ecs - operation not required, producer label on 
headers (#31008)
    
    1. The operation option was marked required, but the producer takes the
       operation from the CamelAwsECSOperation header first and uses the option
       only when the header is not set. It already fails the exchange with a
       message that names the option and the header when both are missing. The
       option is no longer marked required, so a URI such as aws2-ecs:test with
       the operation in the header passes the catalog validation.
    
    2. CamelAwsECSNextToken and CamelAwsECSIsTruncated had the label
       listClusters and CamelAwsECSClusterArn the label "createCluster
       describeCluster deleteCluster", which became the group of the header in
       the catalog and the docs. The other three headers had no label. All six
       now have the label producer (the component is producer only), and the
       descriptions of the three that lost the operation names in their label
       name the operations instead.
    
    Not changed: 3 (the label path). It is not read by the component, which
    CAMEL-23832 documents as a free logical name. Making it optional would
    change the endpoint syntax that most AWS components share, so it is better
    done for all of them together.
    
    Regenerated aws2-ecs.json (component and catalog copy) and the endpoint
    DSL.
    
    Co-Authored-By: Claude Opus 5.5 <[email protected]>
---
 .../apache/camel/catalog/components/aws2-ecs.json  | 16 ++---
 .../apache/camel/component/aws2/ecs/aws2-ecs.json  | 16 ++---
 .../component/aws2/ecs/ECS2Configuration.java      |  1 -
 .../camel/component/aws2/ecs/ECS2Constants.java    | 15 ++--
 .../aws2/ecs/ECS2OperationHeaderMetadataTest.java  | 81 ++++++++++++++++++++++
 .../endpoint/dsl/ECS2EndpointBuilderFactory.java   |  8 +--
 6 files changed, 109 insertions(+), 28 deletions(-)

diff --git 
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/aws2-ecs.json
 
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/aws2-ecs.json
index d3a58be75d2c..7d7e10fb97f3 100644
--- 
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/aws2-ecs.json
+++ 
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/aws2-ecs.json
@@ -26,7 +26,7 @@
   "componentProperties": {
     "configuration": { "index": 0, "kind": "property", "displayName": 
"Configuration", "group": "producer", "label": "", "required": false, "type": 
"object", "javaType": "org.apache.camel.component.aws2.ecs.ECS2Configuration", 
"deprecated": false, "autowired": false, "secret": false, "description": "The 
shared configuration of the component. Each endpoint starts from a copy of it 
and then applies its own options." },
     "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 [...]
-    "operation": { "index": 2, "kind": "property", "displayName": "Operation", 
"group": "producer", "label": "", "required": true, "type": "enum", "javaType": 
"org.apache.camel.component.aws2.ecs.ECS2Operations", "enum": [ "listClusters", 
"describeCluster", "createCluster", "deleteCluster" ], "deprecated": false, 
"autowired": false, "secret": false, "configurationClass": 
"org.apache.camel.component.aws2.ecs.ECS2Configuration", "configurationField": 
"configuration", "description": "The op [...]
+    "operation": { "index": 2, "kind": "property", "displayName": "Operation", 
"group": "producer", "label": "", "required": false, "type": "enum", 
"javaType": "org.apache.camel.component.aws2.ecs.ECS2Operations", "enum": [ 
"listClusters", "describeCluster", "createCluster", "deleteCluster" ], 
"deprecated": false, "autowired": false, "secret": false, "configurationClass": 
"org.apache.camel.component.aws2.ecs.ECS2Configuration", "configurationField": 
"configuration", "description": "The o [...]
     "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.ecs.ECS2Configuration", "configurationField": 
"configuration", "description": "Whether the ECS client sends its requests to 
the URI of the uriEndpointOverride option i [...]
     "pojoRequest": { "index": 4, "kind": "property", "displayName": "Pojo 
Request", "group": "producer", "label": "", "required": false, "type": 
"boolean", "javaType": "boolean", "deprecated": false, "autowired": false, 
"secret": false, "defaultValue": false, "configurationClass": 
"org.apache.camel.component.aws2.ecs.ECS2Configuration", "configurationField": 
"configuration", "description": "Whether the producer takes the request from 
the message body, as the AWS SDK request class of the  [...]
     "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 [...]
@@ -48,12 +48,12 @@
     "useSessionCredentials": { "index": 21, "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.ecs.ECS2Configuration", 
"configurationField": "configuration", "description": "Whether the ECS client 
uses the temporary credentials made of access [...]
   },
   "headers": {
-    "CamelAwsECSOperation": { "index": 0, "kind": "header", "displayName": "", 
"group": "producer", "label": "", "required": false, "javaType": "String", 
"deprecated": false, "autowired": false, "secret": false, "description": "The 
operation that the producer performs. It replaces the operation option.", 
"constantName": "org.apache.camel.component.aws2.ecs.ECS2Constants#OPERATION" },
-    "CamelAwsECSMaxResults": { "index": 1, "kind": "header", "displayName": 
"", "group": "producer", "label": "", "required": false, "javaType": "Integer", 
"deprecated": false, "autowired": false, "secret": false, "description": "The 
maximum number of clusters that listClusters returns in one page, from 1 to 
100. If not set, Amazon ECS returns up to 100.", "constantName": 
"org.apache.camel.component.aws2.ecs.ECS2Constants#MAX_RESULTS" },
-    "CamelAwsECSClusterName": { "index": 2, "kind": "header", "displayName": 
"", "group": "producer", "label": "", "required": false, "javaType": "String", 
"deprecated": false, "autowired": false, "secret": false, "description": "The 
short name or the full ARN of the cluster. createCluster takes the name of the 
new cluster and deleteCluster requires it. If not set, Amazon ECS uses the 
cluster named default for createCluster and describeCluster.", "constantName": 
"org.apache.camel.compone [...]
-    "CamelAwsECSNextToken": { "index": 3, "kind": "header", "displayName": "", 
"group": "listClusters", "label": "listClusters", "required": false, 
"javaType": "String", "deprecated": false, "autowired": false, "secret": false, 
"description": "The token of the next page of listClusters. The producer reads 
it to request that page, and sets it from the response, or to null on the last 
page.", "constantName": 
"org.apache.camel.component.aws2.ecs.ECS2Constants#NEXT_TOKEN" },
-    "CamelAwsECSIsTruncated": { "index": 4, "kind": "header", "displayName": 
"", "group": "listClusters", "label": "listClusters", "required": false, 
"javaType": "Boolean", "deprecated": false, "autowired": false, "secret": 
false, "description": "Whether more clusters follow the ones that listClusters 
returned, that is whether the response has a next token. The producer sets 
it.", "constantName": 
"org.apache.camel.component.aws2.ecs.ECS2Constants#IS_TRUNCATED" },
-    "CamelAwsECSClusterArn": { "index": 5, "kind": "header", "displayName": 
"", "group": "createCluster describeCluster deleteCluster", "label": 
"createCluster describeCluster deleteCluster", "required": false, "javaType": 
"String", "deprecated": false, "autowired": false, "secret": false, 
"description": "The ARN of the cluster that the operation created, described or 
deleted. The producer sets it.", "constantName": 
"org.apache.camel.component.aws2.ecs.ECS2Constants#CLUSTER_ARN" }
+    "CamelAwsECSOperation": { "index": 0, "kind": "header", "displayName": "", 
"group": "producer", "label": "producer", "required": false, "javaType": 
"String", "deprecated": false, "autowired": false, "secret": false, 
"description": "The operation that the producer performs. It replaces the 
operation option.", "constantName": 
"org.apache.camel.component.aws2.ecs.ECS2Constants#OPERATION" },
+    "CamelAwsECSMaxResults": { "index": 1, "kind": "header", "displayName": 
"", "group": "producer", "label": "producer", "required": false, "javaType": 
"Integer", "deprecated": false, "autowired": false, "secret": false, 
"description": "The maximum number of clusters that listClusters returns in one 
page, from 1 to 100. If not set, Amazon ECS returns up to 100.", 
"constantName": "org.apache.camel.component.aws2.ecs.ECS2Constants#MAX_RESULTS" 
},
+    "CamelAwsECSClusterName": { "index": 2, "kind": "header", "displayName": 
"", "group": "producer", "label": "producer", "required": false, "javaType": 
"String", "deprecated": false, "autowired": false, "secret": false, 
"description": "The short name or the full ARN of the cluster. createCluster 
takes the name of the new cluster and deleteCluster requires it. If not set, 
Amazon ECS uses the cluster named default for createCluster and 
describeCluster.", "constantName": "org.apache.camel [...]
+    "CamelAwsECSNextToken": { "index": 3, "kind": "header", "displayName": "", 
"group": "producer", "label": "producer", "required": false, "javaType": 
"String", "deprecated": false, "autowired": false, "secret": false, 
"description": "The token of the next page of listClusters. The producer reads 
it to request that page, and sets it from the response, or to null on the last 
page.", "constantName": 
"org.apache.camel.component.aws2.ecs.ECS2Constants#NEXT_TOKEN" },
+    "CamelAwsECSIsTruncated": { "index": 4, "kind": "header", "displayName": 
"", "group": "producer", "label": "producer", "required": false, "javaType": 
"Boolean", "deprecated": false, "autowired": false, "secret": false, 
"description": "Whether more clusters follow the ones that listClusters 
returned, that is whether the response has a next token. The producer sets 
it.", "constantName": 
"org.apache.camel.component.aws2.ecs.ECS2Constants#IS_TRUNCATED" },
+    "CamelAwsECSClusterArn": { "index": 5, "kind": "header", "displayName": 
"", "group": "producer", "label": "producer", "required": false, "javaType": 
"String", "deprecated": false, "autowired": false, "secret": false, 
"description": "The ARN of the cluster that the operation created, described or 
deleted. The producer sets it.", "constantName": 
"org.apache.camel.component.aws2.ecs.ECS2Constants#CLUSTER_ARN" }
   },
   "bodyTypes": {
     "producerIn": { "carriers": [ "any" ], "byOption": [ { "option": 
"pojoRequest", "value": "true", "carriers": [ "pojo" ] } ], "description": "Not 
used: the operations take their input from headers, such as the name of the 
cluster in CamelAwsECSClusterName. With pojoRequest=true the request of the AWS 
SDK for the operation, such as a ListClustersRequest: another body fails" },
@@ -61,7 +61,7 @@
   },
   "properties": {
     "label": { "index": 0, "kind": "path", "displayName": "Label", "group": 
"producer", "label": "", "required": true, "type": "string", "javaType": 
"java.lang.String", "deprecated": false, "autowired": false, "secret": false, 
"configurationClass": "org.apache.camel.component.aws2.ecs.ECS2Configuration", 
"configurationField": "configuration", "description": "A logical name for the 
endpoint, which you can choose freely. The component does not use it." },
-    "operation": { "index": 1, "kind": "parameter", "displayName": 
"Operation", "group": "producer", "label": "", "required": true, "type": 
"enum", "javaType": "org.apache.camel.component.aws2.ecs.ECS2Operations", 
"enum": [ "listClusters", "describeCluster", "createCluster", "deleteCluster" 
], "deprecated": false, "autowired": false, "secret": false, 
"configurationClass": "org.apache.camel.component.aws2.ecs.ECS2Configuration", 
"configurationField": "configuration", "description": "The o [...]
+    "operation": { "index": 1, "kind": "parameter", "displayName": 
"Operation", "group": "producer", "label": "", "required": false, "type": 
"enum", "javaType": "org.apache.camel.component.aws2.ecs.ECS2Operations", 
"enum": [ "listClusters", "describeCluster", "createCluster", "deleteCluster" 
], "deprecated": false, "autowired": false, "secret": false, 
"configurationClass": "org.apache.camel.component.aws2.ecs.ECS2Configuration", 
"configurationField": "configuration", "description": "The  [...]
     "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.ecs.ECS2Configuration", "configurationField": 
"configuration", "description": "Whether the ECS client sends its requests to 
the URI of the uriEndpointOverride option  [...]
     "pojoRequest": { "index": 3, "kind": "parameter", "displayName": "Pojo 
Request", "group": "producer", "label": "", "required": false, "type": 
"boolean", "javaType": "boolean", "deprecated": false, "autowired": false, 
"secret": false, "defaultValue": false, "configurationClass": 
"org.apache.camel.component.aws2.ecs.ECS2Configuration", "configurationField": 
"configuration", "description": "Whether the producer takes the request from 
the message body, as the AWS SDK request class of the [...]
     "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 [...]
diff --git 
a/components/camel-aws/camel-aws2-ecs/src/generated/resources/META-INF/org/apache/camel/component/aws2/ecs/aws2-ecs.json
 
b/components/camel-aws/camel-aws2-ecs/src/generated/resources/META-INF/org/apache/camel/component/aws2/ecs/aws2-ecs.json
index d3a58be75d2c..7d7e10fb97f3 100644
--- 
a/components/camel-aws/camel-aws2-ecs/src/generated/resources/META-INF/org/apache/camel/component/aws2/ecs/aws2-ecs.json
+++ 
b/components/camel-aws/camel-aws2-ecs/src/generated/resources/META-INF/org/apache/camel/component/aws2/ecs/aws2-ecs.json
@@ -26,7 +26,7 @@
   "componentProperties": {
     "configuration": { "index": 0, "kind": "property", "displayName": 
"Configuration", "group": "producer", "label": "", "required": false, "type": 
"object", "javaType": "org.apache.camel.component.aws2.ecs.ECS2Configuration", 
"deprecated": false, "autowired": false, "secret": false, "description": "The 
shared configuration of the component. Each endpoint starts from a copy of it 
and then applies its own options." },
     "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 [...]
-    "operation": { "index": 2, "kind": "property", "displayName": "Operation", 
"group": "producer", "label": "", "required": true, "type": "enum", "javaType": 
"org.apache.camel.component.aws2.ecs.ECS2Operations", "enum": [ "listClusters", 
"describeCluster", "createCluster", "deleteCluster" ], "deprecated": false, 
"autowired": false, "secret": false, "configurationClass": 
"org.apache.camel.component.aws2.ecs.ECS2Configuration", "configurationField": 
"configuration", "description": "The op [...]
+    "operation": { "index": 2, "kind": "property", "displayName": "Operation", 
"group": "producer", "label": "", "required": false, "type": "enum", 
"javaType": "org.apache.camel.component.aws2.ecs.ECS2Operations", "enum": [ 
"listClusters", "describeCluster", "createCluster", "deleteCluster" ], 
"deprecated": false, "autowired": false, "secret": false, "configurationClass": 
"org.apache.camel.component.aws2.ecs.ECS2Configuration", "configurationField": 
"configuration", "description": "The o [...]
     "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.ecs.ECS2Configuration", "configurationField": 
"configuration", "description": "Whether the ECS client sends its requests to 
the URI of the uriEndpointOverride option i [...]
     "pojoRequest": { "index": 4, "kind": "property", "displayName": "Pojo 
Request", "group": "producer", "label": "", "required": false, "type": 
"boolean", "javaType": "boolean", "deprecated": false, "autowired": false, 
"secret": false, "defaultValue": false, "configurationClass": 
"org.apache.camel.component.aws2.ecs.ECS2Configuration", "configurationField": 
"configuration", "description": "Whether the producer takes the request from 
the message body, as the AWS SDK request class of the  [...]
     "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 [...]
@@ -48,12 +48,12 @@
     "useSessionCredentials": { "index": 21, "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.ecs.ECS2Configuration", 
"configurationField": "configuration", "description": "Whether the ECS client 
uses the temporary credentials made of access [...]
   },
   "headers": {
-    "CamelAwsECSOperation": { "index": 0, "kind": "header", "displayName": "", 
"group": "producer", "label": "", "required": false, "javaType": "String", 
"deprecated": false, "autowired": false, "secret": false, "description": "The 
operation that the producer performs. It replaces the operation option.", 
"constantName": "org.apache.camel.component.aws2.ecs.ECS2Constants#OPERATION" },
-    "CamelAwsECSMaxResults": { "index": 1, "kind": "header", "displayName": 
"", "group": "producer", "label": "", "required": false, "javaType": "Integer", 
"deprecated": false, "autowired": false, "secret": false, "description": "The 
maximum number of clusters that listClusters returns in one page, from 1 to 
100. If not set, Amazon ECS returns up to 100.", "constantName": 
"org.apache.camel.component.aws2.ecs.ECS2Constants#MAX_RESULTS" },
-    "CamelAwsECSClusterName": { "index": 2, "kind": "header", "displayName": 
"", "group": "producer", "label": "", "required": false, "javaType": "String", 
"deprecated": false, "autowired": false, "secret": false, "description": "The 
short name or the full ARN of the cluster. createCluster takes the name of the 
new cluster and deleteCluster requires it. If not set, Amazon ECS uses the 
cluster named default for createCluster and describeCluster.", "constantName": 
"org.apache.camel.compone [...]
-    "CamelAwsECSNextToken": { "index": 3, "kind": "header", "displayName": "", 
"group": "listClusters", "label": "listClusters", "required": false, 
"javaType": "String", "deprecated": false, "autowired": false, "secret": false, 
"description": "The token of the next page of listClusters. The producer reads 
it to request that page, and sets it from the response, or to null on the last 
page.", "constantName": 
"org.apache.camel.component.aws2.ecs.ECS2Constants#NEXT_TOKEN" },
-    "CamelAwsECSIsTruncated": { "index": 4, "kind": "header", "displayName": 
"", "group": "listClusters", "label": "listClusters", "required": false, 
"javaType": "Boolean", "deprecated": false, "autowired": false, "secret": 
false, "description": "Whether more clusters follow the ones that listClusters 
returned, that is whether the response has a next token. The producer sets 
it.", "constantName": 
"org.apache.camel.component.aws2.ecs.ECS2Constants#IS_TRUNCATED" },
-    "CamelAwsECSClusterArn": { "index": 5, "kind": "header", "displayName": 
"", "group": "createCluster describeCluster deleteCluster", "label": 
"createCluster describeCluster deleteCluster", "required": false, "javaType": 
"String", "deprecated": false, "autowired": false, "secret": false, 
"description": "The ARN of the cluster that the operation created, described or 
deleted. The producer sets it.", "constantName": 
"org.apache.camel.component.aws2.ecs.ECS2Constants#CLUSTER_ARN" }
+    "CamelAwsECSOperation": { "index": 0, "kind": "header", "displayName": "", 
"group": "producer", "label": "producer", "required": false, "javaType": 
"String", "deprecated": false, "autowired": false, "secret": false, 
"description": "The operation that the producer performs. It replaces the 
operation option.", "constantName": 
"org.apache.camel.component.aws2.ecs.ECS2Constants#OPERATION" },
+    "CamelAwsECSMaxResults": { "index": 1, "kind": "header", "displayName": 
"", "group": "producer", "label": "producer", "required": false, "javaType": 
"Integer", "deprecated": false, "autowired": false, "secret": false, 
"description": "The maximum number of clusters that listClusters returns in one 
page, from 1 to 100. If not set, Amazon ECS returns up to 100.", 
"constantName": "org.apache.camel.component.aws2.ecs.ECS2Constants#MAX_RESULTS" 
},
+    "CamelAwsECSClusterName": { "index": 2, "kind": "header", "displayName": 
"", "group": "producer", "label": "producer", "required": false, "javaType": 
"String", "deprecated": false, "autowired": false, "secret": false, 
"description": "The short name or the full ARN of the cluster. createCluster 
takes the name of the new cluster and deleteCluster requires it. If not set, 
Amazon ECS uses the cluster named default for createCluster and 
describeCluster.", "constantName": "org.apache.camel [...]
+    "CamelAwsECSNextToken": { "index": 3, "kind": "header", "displayName": "", 
"group": "producer", "label": "producer", "required": false, "javaType": 
"String", "deprecated": false, "autowired": false, "secret": false, 
"description": "The token of the next page of listClusters. The producer reads 
it to request that page, and sets it from the response, or to null on the last 
page.", "constantName": 
"org.apache.camel.component.aws2.ecs.ECS2Constants#NEXT_TOKEN" },
+    "CamelAwsECSIsTruncated": { "index": 4, "kind": "header", "displayName": 
"", "group": "producer", "label": "producer", "required": false, "javaType": 
"Boolean", "deprecated": false, "autowired": false, "secret": false, 
"description": "Whether more clusters follow the ones that listClusters 
returned, that is whether the response has a next token. The producer sets 
it.", "constantName": 
"org.apache.camel.component.aws2.ecs.ECS2Constants#IS_TRUNCATED" },
+    "CamelAwsECSClusterArn": { "index": 5, "kind": "header", "displayName": 
"", "group": "producer", "label": "producer", "required": false, "javaType": 
"String", "deprecated": false, "autowired": false, "secret": false, 
"description": "The ARN of the cluster that the operation created, described or 
deleted. The producer sets it.", "constantName": 
"org.apache.camel.component.aws2.ecs.ECS2Constants#CLUSTER_ARN" }
   },
   "bodyTypes": {
     "producerIn": { "carriers": [ "any" ], "byOption": [ { "option": 
"pojoRequest", "value": "true", "carriers": [ "pojo" ] } ], "description": "Not 
used: the operations take their input from headers, such as the name of the 
cluster in CamelAwsECSClusterName. With pojoRequest=true the request of the AWS 
SDK for the operation, such as a ListClustersRequest: another body fails" },
@@ -61,7 +61,7 @@
   },
   "properties": {
     "label": { "index": 0, "kind": "path", "displayName": "Label", "group": 
"producer", "label": "", "required": true, "type": "string", "javaType": 
"java.lang.String", "deprecated": false, "autowired": false, "secret": false, 
"configurationClass": "org.apache.camel.component.aws2.ecs.ECS2Configuration", 
"configurationField": "configuration", "description": "A logical name for the 
endpoint, which you can choose freely. The component does not use it." },
-    "operation": { "index": 1, "kind": "parameter", "displayName": 
"Operation", "group": "producer", "label": "", "required": true, "type": 
"enum", "javaType": "org.apache.camel.component.aws2.ecs.ECS2Operations", 
"enum": [ "listClusters", "describeCluster", "createCluster", "deleteCluster" 
], "deprecated": false, "autowired": false, "secret": false, 
"configurationClass": "org.apache.camel.component.aws2.ecs.ECS2Configuration", 
"configurationField": "configuration", "description": "The o [...]
+    "operation": { "index": 1, "kind": "parameter", "displayName": 
"Operation", "group": "producer", "label": "", "required": false, "type": 
"enum", "javaType": "org.apache.camel.component.aws2.ecs.ECS2Operations", 
"enum": [ "listClusters", "describeCluster", "createCluster", "deleteCluster" 
], "deprecated": false, "autowired": false, "secret": false, 
"configurationClass": "org.apache.camel.component.aws2.ecs.ECS2Configuration", 
"configurationField": "configuration", "description": "The  [...]
     "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.ecs.ECS2Configuration", "configurationField": 
"configuration", "description": "Whether the ECS client sends its requests to 
the URI of the uriEndpointOverride option  [...]
     "pojoRequest": { "index": 3, "kind": "parameter", "displayName": "Pojo 
Request", "group": "producer", "label": "", "required": false, "type": 
"boolean", "javaType": "boolean", "deprecated": false, "autowired": false, 
"secret": false, "defaultValue": false, "configurationClass": 
"org.apache.camel.component.aws2.ecs.ECS2Configuration", "configurationField": 
"configuration", "description": "Whether the producer takes the request from 
the message body, as the AWS SDK request class of the [...]
     "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 [...]
diff --git 
a/components/camel-aws/camel-aws2-ecs/src/main/java/org/apache/camel/component/aws2/ecs/ECS2Configuration.java
 
b/components/camel-aws/camel-aws2-ecs/src/main/java/org/apache/camel/component/aws2/ecs/ECS2Configuration.java
index 1c41ba18eb52..825aabf2cd8a 100644
--- 
a/components/camel-aws/camel-aws2-ecs/src/main/java/org/apache/camel/component/aws2/ecs/ECS2Configuration.java
+++ 
b/components/camel-aws/camel-aws2-ecs/src/main/java/org/apache/camel/component/aws2/ecs/ECS2Configuration.java
@@ -53,7 +53,6 @@ public class ECS2Configuration implements Cloneable, 
AwsCommonConfiguration {
               label = "security", security = "secret")
     private String sessionToken;
     @UriParam(description = "The operation that the producer performs. The 
CamelAwsECSOperation header replaces this option.")
-    @Metadata(required = true)
     private ECS2Operations operation;
     @UriParam(description = "The protocol of the proxy through which the ECS 
client sends its requests. It is used only when"
                             + " proxyHost and proxyPort are set.",
diff --git 
a/components/camel-aws/camel-aws2-ecs/src/main/java/org/apache/camel/component/aws2/ecs/ECS2Constants.java
 
b/components/camel-aws/camel-aws2-ecs/src/main/java/org/apache/camel/component/aws2/ecs/ECS2Constants.java
index b8f800165806..d03382c9a96e 100644
--- 
a/components/camel-aws/camel-aws2-ecs/src/main/java/org/apache/camel/component/aws2/ecs/ECS2Constants.java
+++ 
b/components/camel-aws/camel-aws2-ecs/src/main/java/org/apache/camel/component/aws2/ecs/ECS2Constants.java
@@ -22,32 +22,35 @@ import org.apache.camel.spi.Metadata;
  * Constants used in Camel AWS2 ECS module
  */
 public interface ECS2Constants {
-    @Metadata(description = "The operation that the producer performs. It 
replaces the operation option.", javaType = "String")
+    @Metadata(label = "producer", description = "The operation that the 
producer performs. It replaces the operation option.",
+              javaType = "String")
     String OPERATION = "CamelAwsECSOperation";
-    @Metadata(description = "The maximum number of clusters that listClusters 
returns in one page, from 1 to 100. If not"
+    @Metadata(label = "producer",
+              description = "The maximum number of clusters that listClusters 
returns in one page, from 1 to 100. If not"
                             + " set, Amazon ECS returns up to 100.",
               javaType = "Integer")
     String MAX_RESULTS = "CamelAwsECSMaxResults";
-    @Metadata(description = "The short name or the full ARN of the cluster. 
createCluster takes the name of the new cluster"
+    @Metadata(label = "producer",
+              description = "The short name or the full ARN of the cluster. 
createCluster takes the name of the new cluster"
                             + " and deleteCluster requires it. If not set, 
Amazon ECS uses the cluster named default for"
                             + " createCluster and describeCluster.",
               javaType = "String")
     String CLUSTER_NAME = "CamelAwsECSClusterName";
 
     // Pagination constants
-    @Metadata(label = "listClusters",
+    @Metadata(label = "producer",
               description = "The token of the next page of listClusters. The 
producer reads it to request that page, and"
                             + " sets it from the response, or to null on the 
last page.",
               javaType = "String")
     String NEXT_TOKEN = "CamelAwsECSNextToken";
-    @Metadata(label = "listClusters",
+    @Metadata(label = "producer",
               description = "Whether more clusters follow the ones that 
listClusters returned, that is whether the response"
                             + " has a next token. The producer sets it.",
               javaType = "Boolean")
     String IS_TRUNCATED = "CamelAwsECSIsTruncated";
 
     // Response metadata
-    @Metadata(label = "createCluster describeCluster deleteCluster",
+    @Metadata(label = "producer",
               description = "The ARN of the cluster that the operation 
created, described or deleted. The producer sets it.",
               javaType = "String")
     String CLUSTER_ARN = "CamelAwsECSClusterArn";
diff --git 
a/components/camel-aws/camel-aws2-ecs/src/test/java/org/apache/camel/component/aws2/ecs/ECS2OperationHeaderMetadataTest.java
 
b/components/camel-aws/camel-aws2-ecs/src/test/java/org/apache/camel/component/aws2/ecs/ECS2OperationHeaderMetadataTest.java
new file mode 100644
index 000000000000..4decb534f97a
--- /dev/null
+++ 
b/components/camel-aws/camel-aws2-ecs/src/test/java/org/apache/camel/component/aws2/ecs/ECS2OperationHeaderMetadataTest.java
@@ -0,0 +1,81 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.component.aws2.ecs;
+
+import org.apache.camel.BindToRegistry;
+import org.apache.camel.CatalogCamelContext;
+import org.apache.camel.Exchange;
+import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.test.junit6.CamelTestSupport;
+import org.apache.camel.util.json.JsonObject;
+import org.apache.camel.util.json.Jsoner;
+import org.junit.jupiter.api.Test;
+import software.amazon.awssdk.services.ecs.model.ListClustersResponse;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertFalse;
+import static org.junit.jupiter.api.Assertions.assertInstanceOf;
+
+/**
+ * The operation can come from the CamelAwsECSOperation header alone, and all 
headers are producer headers.
+ */
+public class ECS2OperationHeaderMetadataTest extends CamelTestSupport {
+
+    @BindToRegistry("amazonEcsClient")
+    AmazonECSClientMock clientMock = new AmazonECSClientMock();
+
+    @Test
+    public void operationOptionIsNotRequired() throws Exception {
+        JsonObject properties = schema().getMap("properties");
+        JsonObject operation = properties.getMap("operation");
+        assertFalse(operation.getBoolean("required"), "operation must not be 
required, the header can replace it");
+    }
+
+    @Test
+    public void operationFromHeaderOnly() {
+        Exchange exchange = 
template.request("aws2-ecs://test?ecsClient=#amazonEcsClient",
+                e -> e.getIn().setHeader(ECS2Constants.OPERATION, 
ECS2Operations.listClusters));
+
+        assertInstanceOf(ListClustersResponse.class, 
exchange.getMessage().getBody());
+    }
+
+    @Test
+    public void allHeadersAreProducerHeaders() throws Exception {
+        JsonObject headers = schema().getMap("headers");
+        assertEquals(6, headers.size());
+        for (String name : headers.keySet()) {
+            JsonObject header = headers.getMap(name);
+            assertEquals("producer", header.getString("label"), name);
+            assertEquals("producer", header.getString("group"), name);
+        }
+    }
+
+    private JsonObject schema() throws Exception {
+        String json = ((CatalogCamelContext) 
context).getComponentParameterJsonSchema("aws2-ecs");
+        return (JsonObject) Jsoner.deserialize(json);
+    }
+
+    @Override
+    protected RouteBuilder createRouteBuilder() {
+        return new RouteBuilder() {
+            @Override
+            public void configure() {
+                // no routes, the tests send to the endpoint
+            }
+        };
+    }
+}
diff --git 
a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/ECS2EndpointBuilderFactory.java
 
b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/ECS2EndpointBuilderFactory.java
index 957b2976d336..f31b31823427 100644
--- 
a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/ECS2EndpointBuilderFactory.java
+++ 
b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/ECS2EndpointBuilderFactory.java
@@ -52,7 +52,6 @@ public interface ECS2EndpointBuilderFactory {
          * The option is a:
          * <code>org.apache.camel.component.aws2.ecs.ECS2Operations</code> 
type.
          * 
-         * Required: true
          * Group: producer
          * 
          * @param operation the value to set
@@ -69,7 +68,6 @@ public interface ECS2EndpointBuilderFactory {
          * The option will be converted to a
          * <code>org.apache.camel.component.aws2.ecs.ECS2Operations</code> 
type.
          * 
-         * Required: true
          * Group: producer
          * 
          * @param operation the value to set
@@ -691,7 +689,7 @@ public interface ECS2EndpointBuilderFactory {
          * 
          * The option is a: {@code String} type.
          * 
-         * Group: listClusters
+         * Group: producer
          * 
          * @return the name of the header {@code AwsECSNextToken}.
          */
@@ -704,7 +702,7 @@ public interface ECS2EndpointBuilderFactory {
          * 
          * The option is a: {@code Boolean} type.
          * 
-         * Group: listClusters
+         * Group: producer
          * 
          * @return the name of the header {@code AwsECSIsTruncated}.
          */
@@ -717,7 +715,7 @@ public interface ECS2EndpointBuilderFactory {
          * 
          * The option is a: {@code String} type.
          * 
-         * Group: createCluster describeCluster deleteCluster
+         * Group: producer
          * 
          * @return the name of the header {@code AwsECSClusterArn}.
          */

Reply via email to