From c99c64c46d3b87f2ef5b653220b656b901d5b9af Mon Sep 17 00:00:00 2001 From: Claus Ibsen Date: Fri, 23 Oct 2026 14:57:06 +0200 Subject: [PATCH 1/5] CAMEL-26098: camel-aws - producers without an operation fail with a hint, and headers of the wrong type are no longer dropped Fixes CAMEL-26032, CAMEL-26070, CAMEL-26075, CAMEL-26076, CAMEL-26095, CAMEL-26096, CAMEL-26097, CAMEL-26098, CAMEL-26099 and CAMEL-26101. - aws2-ecs, aws2-eks, aws2-msk, aws2-mq, aws2-ec2, aws-config, aws2-step-functions, aws2-transcribe, aws2-rekognition, aws-bedrock-agent: no operation fails with an IllegalArgumentException instead of a NullPointerException - eks, msk, mq: a header of the wrong type fails instead of being dropped; mq takes a configuration id as text - msk, mq: createCluster/createBroker and describeCluster/describeBroker set the result headers with pojoRequest - ec2: the instance type by its AWS value (t2.micro), instance ids as a String separated by commas - rekognition: facial and detection attributes as Strings, the operation and header descriptions, the input image docs - step-functions: no host prefix injection with uriEndpointOverride, so startSyncExecution works against an emulator - transcribe: the phrases as a List and the vocabulary file uri, delete operations set the response, endpoints with the default or profile credentials provider - bedrock-agent: the catalog lists its own headers, not those of aws-bedrock-agent-runtime; the page describes it - aws-config: putConformancePack asks for the conformance pack name; the page describes AWS Config - msk, mq, ec2: doc examples and descriptions Co-Authored-By: Claude Opus 5.5 (1M context) Signed-off-by: Claus Ibsen --- .../catalog/components/aws-bedrock-agent.json | 78 ++- .../camel/catalog/components/aws2-ec2.json | 4 +- .../camel/catalog/components/aws2-mq.json | 12 +- .../camel/catalog/components/aws2-msk.json | 4 +- .../catalog/components/aws2-rekognition.json | 16 +- .../docs/aws-bedrock-agent-component.adoc | 38 +- .../catalog/docs/aws-config-component.adoc | 22 +- .../catalog/docs/aws2-ec2-component.adoc | 3 + .../camel/catalog/docs/aws2-mq-component.adoc | 4 +- .../catalog/docs/aws2-msk-component.adoc | 22 +- .../docs/aws2-rekognition-component.adoc | 47 +- .../docs/aws2-transcribe-component.adoc | 2 +- .../aws2/bedrock/agent/aws-bedrock-agent.json | 78 ++- .../docs/aws-bedrock-agent-component.adoc | 38 +- .../agent/BedrockAgentConfiguration.java | 16 +- .../bedrock/agent/BedrockAgentConstants.java | 16 +- .../bedrock/agent/BedrockAgentEndpoint.java | 3 +- .../bedrock/agent/BedrockAgentProducer.java | 5 + .../agent/BedrockAgentProducerTest.java | 78 +++ .../src/main/docs/aws-config-component.adoc | 22 +- .../aws/config/AWSConfigProducer.java | 10 +- .../aws/config/AWSConfigProducerTest.java | 68 +++ .../camel/component/aws2/ec2/aws2-ec2.json | 4 +- .../src/main/docs/aws2-ec2-component.adoc | 3 + .../component/aws2/ec2/AWS2EC2Constants.java | 5 +- .../component/aws2/ec2/AWS2EC2Producer.java | 104 +++- .../aws2/ec2/AmazonEC2ClientMock.java | 13 + .../aws2/ec2/EC2ComponentSpringTest.java | 15 +- .../component/aws2/ec2/EC2ProducerTest.java | 108 +++- .../component/aws2/ecs/ECS2Producer.java | 8 +- .../component/aws2/ecs/ECS2ProducerTest.java | 22 + .../component/aws2/eks/EKS2Producer.java | 28 +- .../aws2/eks/AmazonEKSClientMock.java | 7 + .../component/aws2/eks/EKS2ProducerTest.java | 40 +- .../camel/component/aws2/mq/aws2-mq.json | 12 +- .../src/main/docs/aws2-mq-component.adoc | 4 +- .../component/aws2/mq/MQ2Configuration.java | 2 +- .../camel/component/aws2/mq/MQ2Constants.java | 7 +- .../camel/component/aws2/mq/MQ2Endpoint.java | 2 +- .../camel/component/aws2/mq/MQ2Producer.java | 53 +- .../component/aws2/mq/AmazonMQClientMock.java | 8 +- .../component/aws2/mq/MQProducerTest.java | 91 ++++ .../camel/component/aws2/msk/aws2-msk.json | 4 +- .../src/main/docs/aws2-msk-component.adoc | 22 +- .../component/aws2/msk/MSK2Constants.java | 5 +- .../component/aws2/msk/MSK2Producer.java | 27 +- .../aws2/msk/AmazonMSKClientMock.java | 1 + .../component/aws2/msk/MSKProducerTest.java | 51 ++ .../aws2/rekognition/aws2-rekognition.json | 16 +- .../main/docs/aws2-rekognition-component.adoc | 47 +- .../Rekognition2Configuration.java | 2 +- .../rekognition/Rekognition2Constants.java | 22 +- .../rekognition/Rekognition2Producer.java | 47 +- .../AmazonRekognitionClientMock.java | 7 + .../Rekognition2ProducerSpringTest.java | 2 +- .../rekognition/Rekognition2ProducerTest.java | 80 ++- .../stepfunctions/StepFunctions2Producer.java | 5 + .../client/StepFunctions2ClientFactory.java | 14 +- .../StepFunctions2ClientFactoryTest.java | 57 +++ .../StepFunctions2ProducerTest.java | 10 + .../main/docs/aws2-transcribe-component.adoc | 2 +- .../aws2/transcribe/Transcribe2Component.java | 8 +- .../aws2/transcribe/Transcribe2Producer.java | 77 +-- .../Transcribe2ComponentCredentialsTest.java | 56 +++ ...ibe2ProducerImplementedOperationsTest.java | 113 +++++ .../pages/camel-4x-upgrade-guide-4_24.adoc | 21 + .../component/ComponentsBuilderFactory.java | 2 +- .../dsl/Aws2MqComponentBuilderFactory.java | 7 +- ...ws2RekognitionComponentBuilderFactory.java | 3 +- ...wsBedrockAgentComponentBuilderFactory.java | 45 +- .../endpoint/EndpointHeaderBuilders.java | 2 +- .../endpoint/StaticEndpointBuilders.java | 4 +- .../dsl/AWS2EC2EndpointBuilderFactory.java | 7 +- .../BedrockAgentEndpointBuilderFactory.java | 464 +++++------------- .../dsl/MQ2EndpointBuilderFactory.java | 23 +- .../dsl/MSK2EndpointBuilderFactory.java | 5 +- .../Rekognition2EndpointBuilderFactory.java | 29 +- 77 files changed, 1663 insertions(+), 746 deletions(-) create mode 100644 components/camel-aws/camel-aws-bedrock/src/test/java/org/apache/camel/component/aws2/bedrock/agent/BedrockAgentProducerTest.java create mode 100644 components/camel-aws/camel-aws-config/src/test/java/org/apache/camel/component/aws/config/AWSConfigProducerTest.java create mode 100644 components/camel-aws/camel-aws2-step-functions/src/test/java/org/apache/camel/component/aws2/stepfunctions/StepFunctions2ClientFactoryTest.java create mode 100644 components/camel-aws/camel-aws2-transcribe/src/test/java/org/apache/camel/component/aws2/transcribe/Transcribe2ComponentCredentialsTest.java diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/aws-bedrock-agent.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/aws-bedrock-agent.json index 59f861132332b..15094023f010e 100644 --- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/aws-bedrock-agent.json +++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/aws-bedrock-agent.json @@ -25,18 +25,18 @@ }, "componentProperties": { "configuration": { "index": 0, "kind": "property", "displayName": "Configuration", "group": "common", "label": "", "required": false, "type": "object", "javaType": "org.apache.camel.component.aws2.bedrock.agent.BedrockAgentConfiguration", "deprecated": false, "autowired": false, "secret": false, "description": "Component configuration" }, - "dataSourceId": { "index": 1, "kind": "property", "displayName": "Data Source Id", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.bedrock.agent.BedrockAgentConfiguration", "configurationField": "configuration", "description": "Define the Data source Id we are going to use" }, - "knowledgeBaseId": { "index": 2, "kind": "property", "displayName": "Knowledge Base Id", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.bedrock.agent.BedrockAgentConfiguration", "configurationField": "configuration", "description": "Define the Knowledge Base Id we are going to use" }, - "operation": { "index": 3, "kind": "property", "displayName": "Operation", "group": "common", "label": "", "required": true, "type": "enum", "javaType": "org.apache.camel.component.aws2.bedrock.agent.BedrockAgentOperations", "enum": [ "startIngestionJob", "listIngestionJobs", "getIngestionJob" ], "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.bedrock.agent.BedrockAgentConfiguration", "configurationField": "configuration", "description": "The operation to perform" }, - "overrideEndpoint": { "index": 4, "kind": "property", "displayName": "Override Endpoint", "group": "common", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.aws2.bedrock.agent.BedrockAgentConfiguration", "configurationField": "configuration", "description": "Set the need for overriding the endpoint. This option needs to be used in combination with the uriEndpointOverride option" }, - "pojoRequest": { "index": 5, "kind": "property", "displayName": "Pojo Request", "group": "common", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.aws2.bedrock.agent.BedrockAgentConfiguration", "configurationField": "configuration", "description": "If we want to use a POJO request as body or not" }, - "profileCredentialsName": { "index": 6, "kind": "property", "displayName": "Profile Credentials Name", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "false", "configurationClass": "org.apache.camel.component.aws2.bedrock.agent.BedrockAgentConfiguration", "configurationField": "configuration", "description": "If using a profile credentials provider, this parameter will set the profile name" }, - "region": { "index": 7, "kind": "property", "displayName": "Region", "group": "common", "label": "", "required": false, "type": "enum", "javaType": "java.lang.String", "enum": [ "us-east-1", "us-east-2", "us-west-2", "us-gov-west-1", "ap-northeast-1", "ap-northeast-2", "ap-south-1", "ap-southeast-1", "ap-southeast-2", "ca-central-1", "eu-central-1", "eu-central-2", "eu-west-1", "eu-west-2", "eu-west-3", "sa-east-1" ], "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.bedrock.agent.BedrockAgentConfiguration", "configurationField": "configuration", "description": "The region in which Bedrock Agent client needs to work. When using this parameter, the configuration will expect the lowercase name of the region (for example, ap-east-1) You'll need to use the name Region.EU_WEST_1.id()" }, - "uriEndpointOverride": { "index": 8, "kind": "property", "displayName": "Uri Endpoint Override", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.bedrock.agent.BedrockAgentConfiguration", "configurationField": "configuration", "description": "Set the overriding uri endpoint. This option needs to be used in combination with overrideEndpoint option" }, - "useDefaultCredentialsProvider": { "index": 9, "kind": "property", "displayName": "Use Default Credentials Provider", "group": "common", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.aws2.bedrock.agent.BedrockAgentConfiguration", "configurationField": "configuration", "description": "Set whether the Bedrock Agent client should expect to load credentials through a default credentials provider or to expect static credentials to be passed in." }, - "useProfileCredentialsProvider": { "index": 10, "kind": "property", "displayName": "Use Profile Credentials Provider", "group": "common", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.aws2.bedrock.agent.BedrockAgentConfiguration", "configurationField": "configuration", "description": "Set whether the Bedrock Agent client should expect to load credentials through a profile credentials provider." }, - "bridgeErrorHandler": { "index": 11, "kind": "property", "displayName": "Bridge Error Handler", "group": "consumer", "label": "consumer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the likes, will now be processed as a message and handled by the routing Error Handler. Important: This is only possible if the 3rd party component allows Camel to be alerted if an exception was thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not possible. In other situations we may improve the Camel component to hook into the 3rd party component and make this possible for future releases. By default the consumer will use the org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or ERROR level and ignored." }, - "ingestionJobId": { "index": 12, "kind": "property", "displayName": "Ingestion Job Id", "group": "consumer", "label": "consumer", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.bedrock.agent.BedrockAgentConfiguration", "configurationField": "configuration", "description": "Define the Ingestion Job Id we want to track" }, + "dataSourceId": { "index": 1, "kind": "property", "displayName": "Data Source Id", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.bedrock.agent.BedrockAgentConfiguration", "configurationField": "configuration", "description": "Define the Data source Id we are going to use. The consumer and all the operations need it; when set, it is used instead of the CamelAwsBedrockAgentDataSourceId header" }, + "ingestionJobId": { "index": 2, "kind": "property", "displayName": "Ingestion Job Id", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.bedrock.agent.BedrockAgentConfiguration", "configurationField": "configuration", "description": "Define the Ingestion Job Id we want to track. The consumer and the getIngestionJob operation need it; when set, it is used instead of the CamelAwsBedrockAgentIngestionJobId header" }, + "knowledgeBaseId": { "index": 3, "kind": "property", "displayName": "Knowledge Base Id", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.bedrock.agent.BedrockAgentConfiguration", "configurationField": "configuration", "description": "Define the Knowledge Base Id we are going to use. The consumer and all the operations need it; when set, it is used instead of the CamelAwsBedrockAgentKnowledgeBaseId header" }, + "operation": { "index": 4, "kind": "property", "displayName": "Operation", "group": "common", "label": "", "required": true, "type": "enum", "javaType": "org.apache.camel.component.aws2.bedrock.agent.BedrockAgentOperations", "enum": [ "startIngestionJob", "listIngestionJobs", "getIngestionJob" ], "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.bedrock.agent.BedrockAgentConfiguration", "configurationField": "configuration", "description": "The operation to perform. It can be startIngestionJob, listIngestionJobs or getIngestionJob" }, + "overrideEndpoint": { "index": 5, "kind": "property", "displayName": "Override Endpoint", "group": "common", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.aws2.bedrock.agent.BedrockAgentConfiguration", "configurationField": "configuration", "description": "Set the need for overriding the endpoint. This option needs to be used in combination with the uriEndpointOverride option" }, + "pojoRequest": { "index": 6, "kind": "property", "displayName": "Pojo Request", "group": "common", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.aws2.bedrock.agent.BedrockAgentConfiguration", "configurationField": "configuration", "description": "If we want to use a POJO request as body or not" }, + "profileCredentialsName": { "index": 7, "kind": "property", "displayName": "Profile Credentials Name", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "false", "configurationClass": "org.apache.camel.component.aws2.bedrock.agent.BedrockAgentConfiguration", "configurationField": "configuration", "description": "If using a profile credentials provider, this parameter will set the profile name" }, + "region": { "index": 8, "kind": "property", "displayName": "Region", "group": "common", "label": "", "required": false, "type": "enum", "javaType": "java.lang.String", "enum": [ "us-east-1", "us-east-2", "us-west-2", "us-gov-west-1", "ap-northeast-1", "ap-northeast-2", "ap-south-1", "ap-southeast-1", "ap-southeast-2", "ca-central-1", "eu-central-1", "eu-central-2", "eu-west-1", "eu-west-2", "eu-west-3", "sa-east-1" ], "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.bedrock.agent.BedrockAgentConfiguration", "configurationField": "configuration", "description": "The region in which Bedrock Agent client needs to work. When using this parameter, the configuration will expect the lowercase name of the region (for example, ap-east-1) You'll need to use the name Region.EU_WEST_1.id()" }, + "uriEndpointOverride": { "index": 9, "kind": "property", "displayName": "Uri Endpoint Override", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.bedrock.agent.BedrockAgentConfiguration", "configurationField": "configuration", "description": "Set the overriding uri endpoint. This option needs to be used in combination with overrideEndpoint option" }, + "useDefaultCredentialsProvider": { "index": 10, "kind": "property", "displayName": "Use Default Credentials Provider", "group": "common", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.aws2.bedrock.agent.BedrockAgentConfiguration", "configurationField": "configuration", "description": "Set whether the Bedrock Agent client should expect to load credentials through a default credentials provider or to expect static credentials to be passed in." }, + "useProfileCredentialsProvider": { "index": 11, "kind": "property", "displayName": "Use Profile Credentials Provider", "group": "common", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.aws2.bedrock.agent.BedrockAgentConfiguration", "configurationField": "configuration", "description": "Set whether the Bedrock Agent client should expect to load credentials through a profile credentials provider." }, + "bridgeErrorHandler": { "index": 12, "kind": "property", "displayName": "Bridge Error Handler", "group": "consumer", "label": "consumer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the likes, will now be processed as a message and handled by the routing Error Handler. Important: This is only possible if the 3rd party component allows Camel to be alerted if an exception was thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not possible. In other situations we may improve the Camel component to hook into the 3rd party component and make this possible for future releases. By default the consumer will use the org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or ERROR level and ignored." }, "lazyStartProducer": { "index": 13, "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 during starting and cause the route to fail being started. By deferring this startup to be lazy then the startup failure can be handled during routing messages via Camel's routing error handlers. Beware that when the first message is processed then creating and starting the producer may take a little time and prolong the total processing time of the processing." }, "autowiredEnabled": { "index": 14, "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 type, which then gets configured on the component. This can be used for automatic configuring JDBC data sources, JMS connection factories, AWS Clients, etc." }, "bedrockAgentClient": { "index": 15, "kind": "property", "displayName": "Bedrock Agent Client", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "software.amazon.awssdk.services.bedrockagent.BedrockAgentClient", "deprecated": false, "deprecationNote": "", "autowired": true, "secret": false, "configurationClass": "org.apache.camel.component.aws2.bedrock.agent.BedrockAgentConfiguration", "configurationField": "configuration", "description": "To use an existing configured AWS Bedrock Agent client" }, @@ -52,46 +52,26 @@ "useSessionCredentials": { "index": 25, "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.bedrock.agent.BedrockAgentConfiguration", "configurationField": "configuration", "description": "Set whether the Bedrock Agent client should expect to use Session Credentials. This is useful in a situation in which the user needs to assume an IAM role for doing operations in Bedrock." } }, "headers": { - "CamelAwsBedrockAgentRuntimeOperation": { "index": 0, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The operation we want to perform", "constantName": "org.apache.camel.component.aws2.bedrock.agentruntime.BedrockAgentRuntimeConstants#OPERATION" }, - "CamelAwsBedrockAgentRuntimeCitations": { "index": 1, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "When retrieving and generating a response, this header will contain the citations", "constantName": "org.apache.camel.component.aws2.bedrock.agentruntime.BedrockAgentRuntimeConstants#CITATIONS" }, - "CamelAwsBedrockAgentRuntimeSessionId": { "index": 2, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "When retrieving and generating a response, this header will contain he unique identifier of the session. Reuse the same value to continue the same session with the knowledge base.", "constantName": "org.apache.camel.component.aws2.bedrock.agentruntime.BedrockAgentRuntimeConstants#SESSION_ID" }, - "CamelAwsBedrockAgentRuntimeAgentId": { "index": 3, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The unique identifier of the agent to invoke. Overrides the agentId configured on the endpoint.", "constantName": "org.apache.camel.component.aws2.bedrock.agentruntime.BedrockAgentRuntimeConstants#AGENT_ID" }, - "CamelAwsBedrockAgentRuntimeAgentAliasId": { "index": 4, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The unique identifier of the agent alias to invoke. Overrides the agentAliasId configured on the endpoint.", "constantName": "org.apache.camel.component.aws2.bedrock.agentruntime.BedrockAgentRuntimeConstants#AGENT_ALIAS_ID" }, - "CamelAwsBedrockAgentRuntimeAgentEnableTrace": { "index": 5, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "Boolean", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Enables tracing for the agent invocation. When set, overrides the enableTrace option on the endpoint.", "constantName": "org.apache.camel.component.aws2.bedrock.agentruntime.BedrockAgentRuntimeConstants#AGENT_ENABLE_TRACE" }, - "CamelAwsBedrockAgentRuntimeAgentEndSession": { "index": 6, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "Boolean", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Ends the agent session after this invocation.", "constantName": "org.apache.camel.component.aws2.bedrock.agentruntime.BedrockAgentRuntimeConstants#AGENT_END_SESSION" }, - "CamelAwsBedrockAgentRuntimeAgentMemoryId": { "index": 7, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The unique identifier of the agent memory to use across sessions.", "constantName": "org.apache.camel.component.aws2.bedrock.agentruntime.BedrockAgentRuntimeConstants#AGENT_MEMORY_ID" }, - "CamelAwsBedrockAgentRuntimeAgentStreamOutputMode": { "index": 8, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The streaming output mode (complete or chunks) for an agent invocation. When set, overrides the streamOutputMode option on the endpoint.", "constantName": "org.apache.camel.component.aws2.bedrock.agentruntime.BedrockAgentRuntimeConstants#AGENT_STREAM_OUTPUT_MODE" }, - "CamelAwsBedrockAgentRuntimeAgentFoundationModel": { "index": 9, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The foundation model used by an inline agent. Overrides the foundationModel configured on the endpoint.", "constantName": "org.apache.camel.component.aws2.bedrock.agentruntime.BedrockAgentRuntimeConstants#AGENT_FOUNDATION_MODEL" }, - "CamelAwsBedrockAgentRuntimeAgentInstruction": { "index": 10, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The instruction given to an inline agent. Overrides the instruction configured on the endpoint.", "constantName": "org.apache.camel.component.aws2.bedrock.agentruntime.BedrockAgentRuntimeConstants#AGENT_INSTRUCTION" }, - "CamelAwsBedrockAgentRuntimeAgentTraces": { "index": 11, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "java.util.List", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "When invoking an agent with tracing enabled, this header will contain the list of TracePart emitted during the invocation. The elements are TracePart for invokeAgent and InlineAgentTracePart for invokeInlineAgent.", "constantName": "org.apache.camel.component.aws2.bedrock.agentruntime.BedrockAgentRuntimeConstants#AGENT_TRACES" }, - "CamelAwsBedrockAgentRuntimeAgentReturnControl": { "index": 12, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "java.util.List", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "When an agent invocation requires the caller to fulfil an action, this header will contain the list of return-control payloads emitted by the agent. The elements are ReturnControlPayload for invokeAgent and InlineAgentReturnControlPayload for invokeInlineAgent.", "constantName": "org.apache.camel.component.aws2.bedrock.agentruntime.BedrockAgentRuntimeConstants#AGENT_RETURN_CONTROL" }, - "CamelAwsBedrockAgentRuntimeAgentFiles": { "index": 13, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "java.util.List", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "When an agent invocation returns files, this header will contain the files emitted by the agent. The elements are FilePart for invokeAgent and InlineAgentFilePart for invokeInlineAgent.", "constantName": "org.apache.camel.component.aws2.bedrock.agentruntime.BedrockAgentRuntimeConstants#AGENT_FILES" }, - "CamelAwsBedrockAgentRuntimeFlowIdentifier": { "index": 14, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The unique identifier of the flow to invoke. Overrides the flowIdentifier configured on the endpoint.", "constantName": "org.apache.camel.component.aws2.bedrock.agentruntime.BedrockAgentRuntimeConstants#FLOW_IDENTIFIER" }, - "CamelAwsBedrockAgentRuntimeFlowAliasIdentifier": { "index": 15, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The unique identifier of the flow alias to invoke. Overrides the flowAliasIdentifier configured on the endpoint.", "constantName": "org.apache.camel.component.aws2.bedrock.agentruntime.BedrockAgentRuntimeConstants#FLOW_ALIAS_IDENTIFIER" }, - "CamelAwsBedrockAgentRuntimeFlowEnableTrace": { "index": 16, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "Boolean", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Enables tracing for the flow invocation. When set, overrides the enableTrace option on the endpoint.", "constantName": "org.apache.camel.component.aws2.bedrock.agentruntime.BedrockAgentRuntimeConstants#FLOW_ENABLE_TRACE" }, - "CamelAwsBedrockAgentRuntimeFlowExecutionId": { "index": 17, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The unique identifier of an in-progress flow execution to continue. Used for multi-turn flow conversations.", "constantName": "org.apache.camel.component.aws2.bedrock.agentruntime.BedrockAgentRuntimeConstants#FLOW_EXECUTION_ID" }, - "CamelAwsBedrockAgentRuntimeFlowOutputs": { "index": 18, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "java.util.List", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "When invoking a flow, this header will contain the list of FlowOutputEvent emitted by the flow.", "constantName": "org.apache.camel.component.aws2.bedrock.agentruntime.BedrockAgentRuntimeConstants#FLOW_OUTPUTS" }, - "CamelAwsBedrockAgentRuntimeFlowTraces": { "index": 19, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "java.util.List", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "When invoking a flow with tracing enabled, this header will contain the list of FlowTraceEvent emitted during execution.", "constantName": "org.apache.camel.component.aws2.bedrock.agentruntime.BedrockAgentRuntimeConstants#FLOW_TRACES" }, - "CamelAwsBedrockAgentRuntimeFlowCompletionReason": { "index": 20, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "When invoking a flow, this header will contain the reason the flow completed (set when a FlowCompletionEvent is received).", "constantName": "org.apache.camel.component.aws2.bedrock.agentruntime.BedrockAgentRuntimeConstants#FLOW_COMPLETION_REASON" }, - "CamelAwsBedrockAgentRuntimeRetrievedResults": { "index": 21, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "java.util.List", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "When performing a retrieve operation, this header will contain the list of KnowledgeBaseRetrievalResult chunks returned by the knowledge base.", "constantName": "org.apache.camel.component.aws2.bedrock.agentruntime.BedrockAgentRuntimeConstants#RETRIEVED_RESULTS" }, - "CamelAwsBedrockAgentRuntimeNumberOfResults": { "index": 22, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "Integer", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Overrides the maximum number of results returned by the retrieve operation. Must be a positive Integer; when not set the AWS service default is used.", "constantName": "org.apache.camel.component.aws2.bedrock.agentruntime.BedrockAgentRuntimeConstants#NUMBER_OF_RESULTS" }, - "CamelAwsBedrockAgentRuntimeSearchType": { "index": 23, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Overrides the search type used by the retrieve operation. Accepts the AWS SearchType enum (HYBRID, SEMANTIC) or its String representation.", "constantName": "org.apache.camel.component.aws2.bedrock.agentruntime.BedrockAgentRuntimeConstants#OVERRIDE_SEARCH_TYPE" }, - "CamelAwsBedrockAgentRuntimeNextToken": { "index": 24, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Pagination token used by the retrieve operation. Set on the in-message to request the next page; set on the out-message when the response carries one.", "constantName": "org.apache.camel.component.aws2.bedrock.agentruntime.BedrockAgentRuntimeConstants#NEXT_TOKEN" }, - "CamelAwsBedrockAgentRuntimeRetrieveGuardrailAction": { "index": 25, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "When performing a retrieve operation, this header will contain the guardrail action (if any) applied by the knowledge base.", "constantName": "org.apache.camel.component.aws2.bedrock.agentruntime.BedrockAgentRuntimeConstants#RETRIEVE_GUARDRAIL_ACTION" } + "CamelAwsBedrockAgentOperation": { "index": 0, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The operation we want to perform", "constantName": "org.apache.camel.component.aws2.bedrock.agent.BedrockAgentConstants#OPERATION" }, + "CamelAwsBedrockAgentDataSourceId": { "index": 1, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The data source Id of the operation, used when the dataSourceId option is not set", "constantName": "org.apache.camel.component.aws2.bedrock.agent.BedrockAgentConstants#DATASOURCE_ID" }, + "CamelAwsBedrockAgentKnowledgeBaseId": { "index": 2, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The knowledge base Id of the operation, used when the knowledgeBaseId option is not set", "constantName": "org.apache.camel.component.aws2.bedrock.agent.BedrockAgentConstants#KNOWLEDGE_BASE_ID" }, + "CamelAwsBedrockAgentIngestionJobId": { "index": 3, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The id of the ingestion job of the getIngestionJob operation, used when the ingestionJobId option is not set", "constantName": "org.apache.camel.component.aws2.bedrock.agent.BedrockAgentConstants#INGESTION_JOB_ID" }, + "CamelAwsBedrockAgentIngestionJobStatus": { "index": 4, "kind": "header", "displayName": "", "group": "common", "label": "common", "required": false, "javaType": "software.amazon.awssdk.services.bedrockagent.model.IngestionJobStatus", "enum": [ "STARTING", "IN_PROGRESS", "COMPLETE", "FAILED", "STOPPING", "STOPPED", "null" ], "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The status of the ingestion job, set by the consumer and by the getIngestionJob operation", "constantName": "org.apache.camel.component.aws2.bedrock.agent.BedrockAgentConstants#INGESTION_JOB_STATUS" }, + "CamelAwsBedrockAgentIngestionJobFailureReasons": { "index": 5, "kind": "header", "displayName": "", "group": "common", "label": "common", "required": false, "javaType": "List", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The failure reasons of the ingestion job, set by the consumer and by the getIngestionJob operation when the job has failure reasons", "constantName": "org.apache.camel.component.aws2.bedrock.agent.BedrockAgentConstants#INGESTION_JOB_FAILURE_REASONS" } }, "properties": { "label": { "index": 0, "kind": "path", "displayName": "Label", "group": "common", "label": "", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.bedrock.agent.BedrockAgentConfiguration", "configurationField": "configuration", "description": "Logical name" }, - "dataSourceId": { "index": 1, "kind": "parameter", "displayName": "Data Source Id", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.bedrock.agent.BedrockAgentConfiguration", "configurationField": "configuration", "description": "Define the Data source Id we are going to use" }, - "knowledgeBaseId": { "index": 2, "kind": "parameter", "displayName": "Knowledge Base Id", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.bedrock.agent.BedrockAgentConfiguration", "configurationField": "configuration", "description": "Define the Knowledge Base Id we are going to use" }, - "operation": { "index": 3, "kind": "parameter", "displayName": "Operation", "group": "common", "label": "", "required": true, "type": "enum", "javaType": "org.apache.camel.component.aws2.bedrock.agent.BedrockAgentOperations", "enum": [ "startIngestionJob", "listIngestionJobs", "getIngestionJob" ], "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.bedrock.agent.BedrockAgentConfiguration", "configurationField": "configuration", "description": "The operation to perform" }, - "overrideEndpoint": { "index": 4, "kind": "parameter", "displayName": "Override Endpoint", "group": "common", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.aws2.bedrock.agent.BedrockAgentConfiguration", "configurationField": "configuration", "description": "Set the need for overriding the endpoint. This option needs to be used in combination with the uriEndpointOverride option" }, - "pojoRequest": { "index": 5, "kind": "parameter", "displayName": "Pojo Request", "group": "common", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.aws2.bedrock.agent.BedrockAgentConfiguration", "configurationField": "configuration", "description": "If we want to use a POJO request as body or not" }, - "profileCredentialsName": { "index": 6, "kind": "parameter", "displayName": "Profile Credentials Name", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "false", "configurationClass": "org.apache.camel.component.aws2.bedrock.agent.BedrockAgentConfiguration", "configurationField": "configuration", "description": "If using a profile credentials provider, this parameter will set the profile name" }, - "region": { "index": 7, "kind": "parameter", "displayName": "Region", "group": "common", "label": "", "required": false, "type": "enum", "javaType": "java.lang.String", "enum": [ "us-east-1", "us-east-2", "us-west-2", "us-gov-west-1", "ap-northeast-1", "ap-northeast-2", "ap-south-1", "ap-southeast-1", "ap-southeast-2", "ca-central-1", "eu-central-1", "eu-central-2", "eu-west-1", "eu-west-2", "eu-west-3", "sa-east-1" ], "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.bedrock.agent.BedrockAgentConfiguration", "configurationField": "configuration", "description": "The region in which Bedrock Agent client needs to work. When using this parameter, the configuration will expect the lowercase name of the region (for example, ap-east-1) You'll need to use the name Region.EU_WEST_1.id()" }, - "uriEndpointOverride": { "index": 8, "kind": "parameter", "displayName": "Uri Endpoint Override", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.bedrock.agent.BedrockAgentConfiguration", "configurationField": "configuration", "description": "Set the overriding uri endpoint. This option needs to be used in combination with overrideEndpoint option" }, - "useDefaultCredentialsProvider": { "index": 9, "kind": "parameter", "displayName": "Use Default Credentials Provider", "group": "common", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.aws2.bedrock.agent.BedrockAgentConfiguration", "configurationField": "configuration", "description": "Set whether the Bedrock Agent client should expect to load credentials through a default credentials provider or to expect static credentials to be passed in." }, - "useProfileCredentialsProvider": { "index": 10, "kind": "parameter", "displayName": "Use Profile Credentials Provider", "group": "common", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.aws2.bedrock.agent.BedrockAgentConfiguration", "configurationField": "configuration", "description": "Set whether the Bedrock Agent client should expect to load credentials through a profile credentials provider." }, - "ingestionJobId": { "index": 11, "kind": "parameter", "displayName": "Ingestion Job Id", "group": "consumer", "label": "consumer", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.bedrock.agent.BedrockAgentConfiguration", "configurationField": "configuration", "description": "Define the Ingestion Job Id we want to track" }, + "dataSourceId": { "index": 1, "kind": "parameter", "displayName": "Data Source Id", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.bedrock.agent.BedrockAgentConfiguration", "configurationField": "configuration", "description": "Define the Data source Id we are going to use. The consumer and all the operations need it; when set, it is used instead of the CamelAwsBedrockAgentDataSourceId header" }, + "ingestionJobId": { "index": 2, "kind": "parameter", "displayName": "Ingestion Job Id", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.bedrock.agent.BedrockAgentConfiguration", "configurationField": "configuration", "description": "Define the Ingestion Job Id we want to track. The consumer and the getIngestionJob operation need it; when set, it is used instead of the CamelAwsBedrockAgentIngestionJobId header" }, + "knowledgeBaseId": { "index": 3, "kind": "parameter", "displayName": "Knowledge Base Id", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.bedrock.agent.BedrockAgentConfiguration", "configurationField": "configuration", "description": "Define the Knowledge Base Id we are going to use. The consumer and all the operations need it; when set, it is used instead of the CamelAwsBedrockAgentKnowledgeBaseId header" }, + "operation": { "index": 4, "kind": "parameter", "displayName": "Operation", "group": "common", "label": "", "required": true, "type": "enum", "javaType": "org.apache.camel.component.aws2.bedrock.agent.BedrockAgentOperations", "enum": [ "startIngestionJob", "listIngestionJobs", "getIngestionJob" ], "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.bedrock.agent.BedrockAgentConfiguration", "configurationField": "configuration", "description": "The operation to perform. It can be startIngestionJob, listIngestionJobs or getIngestionJob" }, + "overrideEndpoint": { "index": 5, "kind": "parameter", "displayName": "Override Endpoint", "group": "common", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.aws2.bedrock.agent.BedrockAgentConfiguration", "configurationField": "configuration", "description": "Set the need for overriding the endpoint. This option needs to be used in combination with the uriEndpointOverride option" }, + "pojoRequest": { "index": 6, "kind": "parameter", "displayName": "Pojo Request", "group": "common", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.aws2.bedrock.agent.BedrockAgentConfiguration", "configurationField": "configuration", "description": "If we want to use a POJO request as body or not" }, + "profileCredentialsName": { "index": 7, "kind": "parameter", "displayName": "Profile Credentials Name", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "false", "configurationClass": "org.apache.camel.component.aws2.bedrock.agent.BedrockAgentConfiguration", "configurationField": "configuration", "description": "If using a profile credentials provider, this parameter will set the profile name" }, + "region": { "index": 8, "kind": "parameter", "displayName": "Region", "group": "common", "label": "", "required": false, "type": "enum", "javaType": "java.lang.String", "enum": [ "us-east-1", "us-east-2", "us-west-2", "us-gov-west-1", "ap-northeast-1", "ap-northeast-2", "ap-south-1", "ap-southeast-1", "ap-southeast-2", "ca-central-1", "eu-central-1", "eu-central-2", "eu-west-1", "eu-west-2", "eu-west-3", "sa-east-1" ], "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.bedrock.agent.BedrockAgentConfiguration", "configurationField": "configuration", "description": "The region in which Bedrock Agent client needs to work. When using this parameter, the configuration will expect the lowercase name of the region (for example, ap-east-1) You'll need to use the name Region.EU_WEST_1.id()" }, + "uriEndpointOverride": { "index": 9, "kind": "parameter", "displayName": "Uri Endpoint Override", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.bedrock.agent.BedrockAgentConfiguration", "configurationField": "configuration", "description": "Set the overriding uri endpoint. This option needs to be used in combination with overrideEndpoint option" }, + "useDefaultCredentialsProvider": { "index": 10, "kind": "parameter", "displayName": "Use Default Credentials Provider", "group": "common", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.aws2.bedrock.agent.BedrockAgentConfiguration", "configurationField": "configuration", "description": "Set whether the Bedrock Agent client should expect to load credentials through a default credentials provider or to expect static credentials to be passed in." }, + "useProfileCredentialsProvider": { "index": 11, "kind": "parameter", "displayName": "Use Profile Credentials Provider", "group": "common", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.aws2.bedrock.agent.BedrockAgentConfiguration", "configurationField": "configuration", "description": "Set whether the Bedrock Agent client should expect to load credentials through a profile credentials provider." }, "sendEmptyMessageWhenIdle": { "index": 12, "kind": "parameter", "displayName": "Send Empty Message When Idle", "group": "consumer", "label": "consumer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "If the polling consumer did not poll any files, you can enable this option to send an empty message (no body) instead." }, "bridgeErrorHandler": { "index": 13, "kind": "parameter", "displayName": "Bridge Error Handler", "group": "consumer (advanced)", "label": "consumer,advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the likes, will now be processed as a message and handled by the routing Error Handler. Important: This is only possible if the 3rd party component allows Camel to be alerted if an exception was thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not possible. In other situations we may improve the Camel component to hook into the 3rd party component and make this possible for future releases. By default the consumer will use the org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or ERROR level and ignored." }, "exceptionHandler": { "index": 14, "kind": "parameter", "displayName": "Exception Handler", "group": "consumer (advanced)", "label": "consumer,advanced", "required": false, "type": "object", "javaType": "org.apache.camel.spi.ExceptionHandler", "optionalPrefix": "consumer.", "deprecated": false, "autowired": false, "secret": false, "description": "To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is enabled then this option is not in use. By default the consumer will deal with exceptions, that will be logged at WARN or ERROR level and ignored." }, diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/aws2-ec2.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/aws2-ec2.json index 9f0d4dd0aeb1a..c166292614a1a 100644 --- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/aws2-ec2.json +++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/aws2-ec2.json @@ -49,7 +49,7 @@ }, "headers": { "CamelAwsEC2ImageId": { "index": 0, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "An image ID of the AWS marketplace", "constantName": "org.apache.camel.component.aws2.ec2.AWS2EC2Constants#IMAGE_ID" }, - "CamelAwsEC2InstanceType": { "index": 1, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "software.amazon.awssdk.services.ec2.model.InstanceType", "enum": [ "a1.medium", "a1.large", "a1.xlarge", "a1.2xlarge", "a1.4xlarge", "a1.metal", "c1.medium", "c1.xlarge", "c3.large", "c3.xlarge", "c3.2xlarge", "c3.4xlarge", "c3.8xlarge", "c4.large", "c4.xlarge", "c4.2xlarge", "c4.4xlarge", "c4.8xlarge", "c5.large", "c5.xlarge", "c5.2xlarge", "c5.4xlarge", "c5.9xlarge", "c5.12xlarge", "c5.18xlarge", "c5.24xlarge", "c5.metal", "c5a.large", "c5a.xlarge", "c5a.2xlarge", "c5a.4xlarge", "c5a.8xlarge", "c5a.12xlarge", "c5a.16xlarge", "c5a.24xlarge", "c5ad.large", "c5ad.xlarge", "c5ad.2xlarge", "c5ad.4xlarge", "c5ad.8xlarge", "c5ad.12xlarge", "c5ad.16xlarge", "c5ad.24xlarge", "c5d.large", "c5d.xlarge", "c5d.2xlarge", "c5d.4xlarge", "c5d.9xlarge", "c5d.12xlarge", "c5d.18xlarge", "c5d.24xlarge", "c5d.metal", "c5n.large", "c5n.xlarge", "c5n.2xlarge", "c5n.4xlarge", "c5n.9xlarge", "c5n.18xlarge", "c5n.metal", "c6g.medium", "c6g.large", "c6g.xlarge", "c6g.2xlarge", "c6g.4xlarge", "c6g.8xlarge", "c6g.12xlarge", "c6g.16xlarge", "c6g.metal", "c6gd.medium", "c6gd.large", "c6gd.xlarge", "c6gd.2xlarge", "c6gd.4xlarge", "c6gd.8xlarge", "c6gd.12xlarge", "c6gd.16xlarge", "c6gd.metal", "c6gn.medium", "c6gn.large", "c6gn.xlarge", "c6gn.2xlarge", "c6gn.4xlarge", "c6gn.8xlarge", "c6gn.12xlarge", "c6gn.16xlarge", "c6i.large", "c6i.xlarge", "c6i.2xlarge", "c6i.4xlarge", "c6i.8xlarge", "c6i.12xlarge", "c6i.16xlarge", "c6i.24xlarge", "c6i.32xlarge", "c6i.metal", "cc1.4xlarge", "cc2.8xlarge", "cg1.4xlarge", "cr1.8xlarge", "d2.xlarge", "d2.2xlarge", "d2.4xlarge", "d2.8xlarge", "d3.xlarge", "d3.2xlarge", "d3.4xlarge", "d3.8xlarge", "d3en.xlarge", "d3en.2xlarge", "d3en.4xlarge", "d3en.6xlarge", "d3en.8xlarge", "d3en.12xlarge", "dl1.24xlarge", "f1.2xlarge", "f1.4xlarge", "f1.16xlarge", "g2.2xlarge", "g2.8xlarge", "g3.4xlarge", "g3.8xlarge", "g3.16xlarge", "g3s.xlarge", "g4ad.xlarge", "g4ad.2xlarge", "g4ad.4xlarge", "g4ad.8xlarge", "g4ad.16xlarge", "g4dn.xlarge", "g4dn.2xlarge", "g4dn.4xlarge", "g4dn.8xlarge", "g4dn.12xlarge", "g4dn.16xlarge", "g4dn.metal", "g5.xlarge", "g5.2xlarge", "g5.4xlarge", "g5.8xlarge", "g5.12xlarge", "g5.16xlarge", "g5.24xlarge", "g5.48xlarge", "g5g.xlarge", "g5g.2xlarge", "g5g.4xlarge", "g5g.8xlarge", "g5g.16xlarge", "g5g.metal", "hi1.4xlarge", "hpc6a.48xlarge", "hs1.8xlarge", "h1.2xlarge", "h1.4xlarge", "h1.8xlarge", "h1.16xlarge", "i2.xlarge", "i2.2xlarge", "i2.4xlarge", "i2.8xlarge", "i3.large", "i3.xlarge", "i3.2xlarge", "i3.4xlarge", "i3.8xlarge", "i3.16xlarge", "i3.metal", "i3en.large", "i3en.xlarge", "i3en.2xlarge", "i3en.3xlarge", "i3en.6xlarge", "i3en.12xlarge", "i3en.24xlarge", "i3en.metal", "im4gn.large", "im4gn.xlarge", "im4gn.2xlarge", "im4gn.4xlarge", "im4gn.8xlarge", "im4gn.16xlarge", "inf1.xlarge", "inf1.2xlarge", "inf1.6xlarge", "inf1.24xlarge", "is4gen.medium", "is4gen.large", "is4gen.xlarge", "is4gen.2xlarge", "is4gen.4xlarge", "is4gen.8xlarge", "m1.small", "m1.medium", "m1.large", "m1.xlarge", "m2.xlarge", "m2.2xlarge", "m2.4xlarge", "m3.medium", "m3.large", "m3.xlarge", "m3.2xlarge", "m4.large", "m4.xlarge", "m4.2xlarge", "m4.4xlarge", "m4.10xlarge", "m4.16xlarge", "m5.large", "m5.xlarge", "m5.2xlarge", "m5.4xlarge", "m5.8xlarge", "m5.12xlarge", "m5.16xlarge", "m5.24xlarge", "m5.metal", "m5a.large", "m5a.xlarge", "m5a.2xlarge", "m5a.4xlarge", "m5a.8xlarge", "m5a.12xlarge", "m5a.16xlarge", "m5a.24xlarge", "m5ad.large", "m5ad.xlarge", "m5ad.2xlarge", "m5ad.4xlarge", "m5ad.8xlarge", "m5ad.12xlarge", "m5ad.16xlarge", "m5ad.24xlarge", "m5d.large", "m5d.xlarge", "m5d.2xlarge", "m5d.4xlarge", "m5d.8xlarge", "m5d.12xlarge", "m5d.16xlarge", "m5d.24xlarge", "m5d.metal", "m5dn.large", "m5dn.xlarge", "m5dn.2xlarge", "m5dn.4xlarge", "m5dn.8xlarge", "m5dn.12xlarge", "m5dn.16xlarge", "m5dn.24xlarge", "m5dn.metal", "m5n.large", "m5n.xlarge", "m5n.2xlarge", "m5n.4xlarge", "m5n.8xlarge", "m5n.12xlarge", "m5n.16xlarge", "m5n.24xlarge", "m5n.metal", "m5zn.large", "m5zn.xlarge", "m5zn.2xlarge", "m5zn.3xlarge", "m5zn.6xlarge", "m5zn.12xlarge", "m5zn.metal", "m6a.large", "m6a.xlarge", "m6a.2xlarge", "m6a.4xlarge", "m6a.8xlarge", "m6a.12xlarge", "m6a.16xlarge", "m6a.24xlarge", "m6a.32xlarge", "m6a.48xlarge", "m6g.metal", "m6g.medium", "m6g.large", "m6g.xlarge", "m6g.2xlarge", "m6g.4xlarge", "m6g.8xlarge", "m6g.12xlarge", "m6g.16xlarge", "m6gd.metal", "m6gd.medium", "m6gd.large", "m6gd.xlarge", "m6gd.2xlarge", "m6gd.4xlarge", "m6gd.8xlarge", "m6gd.12xlarge", "m6gd.16xlarge", "m6i.large", "m6i.xlarge", "m6i.2xlarge", "m6i.4xlarge", "m6i.8xlarge", "m6i.12xlarge", "m6i.16xlarge", "m6i.24xlarge", "m6i.32xlarge", "m6i.metal", "mac1.metal", "p2.xlarge", "p2.8xlarge", "p2.16xlarge", "p3.2xlarge", "p3.8xlarge", "p3.16xlarge", "p3dn.24xlarge", "p4d.24xlarge", "r3.large", "r3.xlarge", "r3.2xlarge", "r3.4xlarge", "r3.8xlarge", "r4.large", "r4.xlarge", "r4.2xlarge", "r4.4xlarge", "r4.8xlarge", "r4.16xlarge", "r5.large", "r5.xlarge", "r5.2xlarge", "r5.4xlarge", "r5.8xlarge", "r5.12xlarge", "r5.16xlarge", "r5.24xlarge", "r5.metal", "r5a.large", "r5a.xlarge", "r5a.2xlarge", "r5a.4xlarge", "r5a.8xlarge", "r5a.12xlarge", "r5a.16xlarge", "r5a.24xlarge", "r5ad.large", "r5ad.xlarge", "r5ad.2xlarge", "r5ad.4xlarge", "r5ad.8xlarge", "r5ad.12xlarge", "r5ad.16xlarge", "r5ad.24xlarge", "r5b.large", "r5b.xlarge", "r5b.2xlarge", "r5b.4xlarge", "r5b.8xlarge", "r5b.12xlarge", "r5b.16xlarge", "r5b.24xlarge", "r5b.metal", "r5d.large", "r5d.xlarge", "r5d.2xlarge", "r5d.4xlarge", "r5d.8xlarge", "r5d.12xlarge", "r5d.16xlarge", "r5d.24xlarge", "r5d.metal", "r5dn.large", "r5dn.xlarge", "r5dn.2xlarge", "r5dn.4xlarge", "r5dn.8xlarge", "r5dn.12xlarge", "r5dn.16xlarge", "r5dn.24xlarge", "r5dn.metal", "r5n.large", "r5n.xlarge", "r5n.2xlarge", "r5n.4xlarge", "r5n.8xlarge", "r5n.12xlarge", "r5n.16xlarge", "r5n.24xlarge", "r5n.metal", "r6g.medium", "r6g.large", "r6g.xlarge", "r6g.2xlarge", "r6g.4xlarge", "r6g.8xlarge", "r6g.12xlarge", "r6g.16xlarge", "r6g.metal", "r6gd.medium", "r6gd.large", "r6gd.xlarge", "r6gd.2xlarge", "r6gd.4xlarge", "r6gd.8xlarge", "r6gd.12xlarge", "r6gd.16xlarge", "r6gd.metal", "r6i.large", "r6i.xlarge", "r6i.2xlarge", "r6i.4xlarge", "r6i.8xlarge", "r6i.12xlarge", "r6i.16xlarge", "r6i.24xlarge", "r6i.32xlarge", "r6i.metal", "t1.micro", "t2.nano", "t2.micro", "t2.small", "t2.medium", "t2.large", "t2.xlarge", "t2.2xlarge", "t3.nano", "t3.micro", "t3.small", "t3.medium", "t3.large", "t3.xlarge", "t3.2xlarge", "t3a.nano", "t3a.micro", "t3a.small", "t3a.medium", "t3a.large", "t3a.xlarge", "t3a.2xlarge", "t4g.nano", "t4g.micro", "t4g.small", "t4g.medium", "t4g.large", "t4g.xlarge", "t4g.2xlarge", "u-6tb1.56xlarge", "u-6tb1.112xlarge", "u-9tb1.112xlarge", "u-12tb1.112xlarge", "u-6tb1.metal", "u-9tb1.metal", "u-12tb1.metal", "u-18tb1.metal", "u-24tb1.metal", "vt1.3xlarge", "vt1.6xlarge", "vt1.24xlarge", "x1.16xlarge", "x1.32xlarge", "x1e.xlarge", "x1e.2xlarge", "x1e.4xlarge", "x1e.8xlarge", "x1e.16xlarge", "x1e.32xlarge", "x2iezn.2xlarge", "x2iezn.4xlarge", "x2iezn.6xlarge", "x2iezn.8xlarge", "x2iezn.12xlarge", "x2iezn.metal", "x2gd.medium", "x2gd.large", "x2gd.xlarge", "x2gd.2xlarge", "x2gd.4xlarge", "x2gd.8xlarge", "x2gd.12xlarge", "x2gd.16xlarge", "x2gd.metal", "z1d.large", "z1d.xlarge", "z1d.2xlarge", "z1d.3xlarge", "z1d.6xlarge", "z1d.12xlarge", "z1d.metal", "x2idn.16xlarge", "x2idn.24xlarge", "x2idn.32xlarge", "x2iedn.xlarge", "x2iedn.2xlarge", "x2iedn.4xlarge", "x2iedn.8xlarge", "x2iedn.16xlarge", "x2iedn.24xlarge", "x2iedn.32xlarge", "c6a.large", "c6a.xlarge", "c6a.2xlarge", "c6a.4xlarge", "c6a.8xlarge", "c6a.12xlarge", "c6a.16xlarge", "c6a.24xlarge", "c6a.32xlarge", "c6a.48xlarge", "c6a.metal", "m6a.metal", "i4i.large", "i4i.xlarge", "i4i.2xlarge", "i4i.4xlarge", "i4i.8xlarge", "i4i.16xlarge", "i4i.32xlarge", "i4i.metal", "x2idn.metal", "x2iedn.metal", "c7g.medium", "c7g.large", "c7g.xlarge", "c7g.2xlarge", "c7g.4xlarge", "c7g.8xlarge", "c7g.12xlarge", "c7g.16xlarge", "mac2.metal", "c6id.large", "c6id.xlarge", "c6id.2xlarge", "c6id.4xlarge", "c6id.8xlarge", "c6id.12xlarge", "c6id.16xlarge", "c6id.24xlarge", "c6id.32xlarge", "c6id.metal", "m6id.large", "m6id.xlarge", "m6id.2xlarge", "m6id.4xlarge", "m6id.8xlarge", "m6id.12xlarge", "m6id.16xlarge", "m6id.24xlarge", "m6id.32xlarge", "m6id.metal", "r6id.large", "r6id.xlarge", "r6id.2xlarge", "r6id.4xlarge", "r6id.8xlarge", "r6id.12xlarge", "r6id.16xlarge", "r6id.24xlarge", "r6id.32xlarge", "r6id.metal", "r6a.large", "r6a.xlarge", "r6a.2xlarge", "r6a.4xlarge", "r6a.8xlarge", "r6a.12xlarge", "r6a.16xlarge", "r6a.24xlarge", "r6a.32xlarge", "r6a.48xlarge", "r6a.metal", "p4de.24xlarge", "u-3tb1.56xlarge", "u-18tb1.112xlarge", "u-24tb1.112xlarge", "trn1.2xlarge", "trn1.32xlarge", "hpc6id.32xlarge", "c6in.large", "c6in.xlarge", "c6in.2xlarge", "c6in.4xlarge", "c6in.8xlarge", "c6in.12xlarge", "c6in.16xlarge", "c6in.24xlarge", "c6in.32xlarge", "m6in.large", "m6in.xlarge", "m6in.2xlarge", "m6in.4xlarge", "m6in.8xlarge", "m6in.12xlarge", "m6in.16xlarge", "m6in.24xlarge", "m6in.32xlarge", "m6idn.large", "m6idn.xlarge", "m6idn.2xlarge", "m6idn.4xlarge", "m6idn.8xlarge", "m6idn.12xlarge", "m6idn.16xlarge", "m6idn.24xlarge", "m6idn.32xlarge", "r6in.large", "r6in.xlarge", "r6in.2xlarge", "r6in.4xlarge", "r6in.8xlarge", "r6in.12xlarge", "r6in.16xlarge", "r6in.24xlarge", "r6in.32xlarge", "r6idn.large", "r6idn.xlarge", "r6idn.2xlarge", "r6idn.4xlarge", "r6idn.8xlarge", "r6idn.12xlarge", "r6idn.16xlarge", "r6idn.24xlarge", "r6idn.32xlarge", "c7g.metal", "m7g.medium", "m7g.large", "m7g.xlarge", "m7g.2xlarge", "m7g.4xlarge", "m7g.8xlarge", "m7g.12xlarge", "m7g.16xlarge", "m7g.metal", "r7g.medium", "r7g.large", "r7g.xlarge", "r7g.2xlarge", "r7g.4xlarge", "r7g.8xlarge", "r7g.12xlarge", "r7g.16xlarge", "r7g.metal", "c6in.metal", "m6in.metal", "m6idn.metal", "r6in.metal", "r6idn.metal", "inf2.xlarge", "inf2.8xlarge", "inf2.24xlarge", "inf2.48xlarge", "trn1n.32xlarge", "i4g.large", "i4g.xlarge", "i4g.2xlarge", "i4g.4xlarge", "i4g.8xlarge", "i4g.16xlarge", "hpc7g.4xlarge", "hpc7g.8xlarge", "hpc7g.16xlarge", "c7gn.medium", "c7gn.large", "c7gn.xlarge", "c7gn.2xlarge", "c7gn.4xlarge", "c7gn.8xlarge", "c7gn.12xlarge", "c7gn.16xlarge", "p5.48xlarge", "m7i.large", "m7i.xlarge", "m7i.2xlarge", "m7i.4xlarge", "m7i.8xlarge", "m7i.12xlarge", "m7i.16xlarge", "m7i.24xlarge", "m7i.48xlarge", "m7i-flex.large", "m7i-flex.xlarge", "m7i-flex.2xlarge", "m7i-flex.4xlarge", "m7i-flex.8xlarge", "m7a.medium", "m7a.large", "m7a.xlarge", "m7a.2xlarge", "m7a.4xlarge", "m7a.8xlarge", "m7a.12xlarge", "m7a.16xlarge", "m7a.24xlarge", "m7a.32xlarge", "m7a.48xlarge", "m7a.metal-48xl", "hpc7a.12xlarge", "hpc7a.24xlarge", "hpc7a.48xlarge", "hpc7a.96xlarge", "c7gd.medium", "c7gd.large", "c7gd.xlarge", "c7gd.2xlarge", "c7gd.4xlarge", "c7gd.8xlarge", "c7gd.12xlarge", "c7gd.16xlarge", "m7gd.medium", "m7gd.large", "m7gd.xlarge", "m7gd.2xlarge", "m7gd.4xlarge", "m7gd.8xlarge", "m7gd.12xlarge", "m7gd.16xlarge", "r7gd.medium", "r7gd.large", "r7gd.xlarge", "r7gd.2xlarge", "r7gd.4xlarge", "r7gd.8xlarge", "r7gd.12xlarge", "r7gd.16xlarge", "r7a.medium", "r7a.large", "r7a.xlarge", "r7a.2xlarge", "r7a.4xlarge", "r7a.8xlarge", "r7a.12xlarge", "r7a.16xlarge", "r7a.24xlarge", "r7a.32xlarge", "r7a.48xlarge", "c7i.large", "c7i.xlarge", "c7i.2xlarge", "c7i.4xlarge", "c7i.8xlarge", "c7i.12xlarge", "c7i.16xlarge", "c7i.24xlarge", "c7i.48xlarge", "mac2-m2pro.metal", "r7iz.large", "r7iz.xlarge", "r7iz.2xlarge", "r7iz.4xlarge", "r7iz.8xlarge", "r7iz.12xlarge", "r7iz.16xlarge", "r7iz.32xlarge", "c7a.medium", "c7a.large", "c7a.xlarge", "c7a.2xlarge", "c7a.4xlarge", "c7a.8xlarge", "c7a.12xlarge", "c7a.16xlarge", "c7a.24xlarge", "c7a.32xlarge", "c7a.48xlarge", "c7a.metal-48xl", "r7a.metal-48xl", "r7i.large", "r7i.xlarge", "r7i.2xlarge", "r7i.4xlarge", "r7i.8xlarge", "r7i.12xlarge", "r7i.16xlarge", "r7i.24xlarge", "r7i.48xlarge", "dl2q.24xlarge", "mac2-m2.metal", "i4i.12xlarge", "i4i.24xlarge", "c7i.metal-24xl", "c7i.metal-48xl", "m7i.metal-24xl", "m7i.metal-48xl", "r7i.metal-24xl", "r7i.metal-48xl", "r7iz.metal-16xl", "r7iz.metal-32xl", "c7gd.metal", "m7gd.metal", "r7gd.metal", "g6.xlarge", "g6.2xlarge", "g6.4xlarge", "g6.8xlarge", "g6.12xlarge", "g6.16xlarge", "g6.24xlarge", "g6.48xlarge", "gr6.4xlarge", "gr6.8xlarge", "c7i-flex.large", "c7i-flex.xlarge", "c7i-flex.2xlarge", "c7i-flex.4xlarge", "c7i-flex.8xlarge", "u7i-12tb.224xlarge", "u7in-16tb.224xlarge", "u7in-24tb.224xlarge", "u7in-32tb.224xlarge", "u7ib-12tb.224xlarge", "c7gn.metal", "r8g.medium", "r8g.large", "r8g.xlarge", "r8g.2xlarge", "r8g.4xlarge", "r8g.8xlarge", "r8g.12xlarge", "r8g.16xlarge", "r8g.24xlarge", "r8g.48xlarge", "r8g.metal-24xl", "r8g.metal-48xl", "mac2-m1ultra.metal", "g6e.xlarge", "g6e.2xlarge", "g6e.4xlarge", "g6e.8xlarge", "g6e.12xlarge", "g6e.16xlarge", "g6e.24xlarge", "g6e.48xlarge", "c8g.medium", "c8g.large", "c8g.xlarge", "c8g.2xlarge", "c8g.4xlarge", "c8g.8xlarge", "c8g.12xlarge", "c8g.16xlarge", "c8g.24xlarge", "c8g.48xlarge", "c8g.metal-24xl", "c8g.metal-48xl", "m8g.medium", "m8g.large", "m8g.xlarge", "m8g.2xlarge", "m8g.4xlarge", "m8g.8xlarge", "m8g.12xlarge", "m8g.16xlarge", "m8g.24xlarge", "m8g.48xlarge", "m8g.metal-24xl", "m8g.metal-48xl", "x8g.medium", "x8g.large", "x8g.xlarge", "x8g.2xlarge", "x8g.4xlarge", "x8g.8xlarge", "x8g.12xlarge", "x8g.16xlarge", "x8g.24xlarge", "x8g.48xlarge", "x8g.metal-24xl", "x8g.metal-48xl", "i7ie.large", "i7ie.xlarge", "i7ie.2xlarge", "i7ie.3xlarge", "i7ie.6xlarge", "i7ie.12xlarge", "i7ie.18xlarge", "i7ie.24xlarge", "i7ie.48xlarge", "i8g.large", "i8g.xlarge", "i8g.2xlarge", "i8g.4xlarge", "i8g.8xlarge", "i8g.12xlarge", "i8g.16xlarge", "i8g.24xlarge", "i8g.metal-24xl", "u7i-6tb.112xlarge", "u7i-8tb.112xlarge", "u7inh-32tb.480xlarge", "p5e.48xlarge", "p5en.48xlarge", "f2.12xlarge", "f2.48xlarge", "trn2.48xlarge", "c7i-flex.12xlarge", "c7i-flex.16xlarge", "m7i-flex.12xlarge", "m7i-flex.16xlarge", "i7ie.metal-24xl", "i7ie.metal-48xl", "i8g.48xlarge", "c8gd.medium", "c8gd.large", "c8gd.xlarge", "c8gd.2xlarge", "c8gd.4xlarge", "c8gd.8xlarge", "c8gd.12xlarge", "c8gd.16xlarge", "c8gd.24xlarge", "c8gd.48xlarge", "c8gd.metal-24xl", "c8gd.metal-48xl", "i7i.large", "i7i.xlarge", "i7i.2xlarge", "i7i.4xlarge", "i7i.8xlarge", "i7i.12xlarge", "i7i.16xlarge", "i7i.24xlarge", "i7i.48xlarge", "i7i.metal-24xl", "i7i.metal-48xl", "p6-b200.48xlarge", "m8gd.medium", "m8gd.large", "m8gd.xlarge", "m8gd.2xlarge", "m8gd.4xlarge", "m8gd.8xlarge", "m8gd.12xlarge", "m8gd.16xlarge", "m8gd.24xlarge", "m8gd.48xlarge", "m8gd.metal-24xl", "m8gd.metal-48xl", "r8gd.medium", "r8gd.large", "r8gd.xlarge", "r8gd.2xlarge", "r8gd.4xlarge", "r8gd.8xlarge", "r8gd.12xlarge", "r8gd.16xlarge", "r8gd.24xlarge", "r8gd.48xlarge", "r8gd.metal-24xl", "r8gd.metal-48xl", "c8gn.medium", "c8gn.large", "c8gn.xlarge", "c8gn.2xlarge", "c8gn.4xlarge", "c8gn.8xlarge", "c8gn.12xlarge", "c8gn.16xlarge", "c8gn.24xlarge", "c8gn.48xlarge", "c8gn.metal-24xl", "c8gn.metal-48xl", "f2.6xlarge", "p6e-gb200.36xlarge", "g6f.large", "g6f.xlarge", "g6f.2xlarge", "g6f.4xlarge", "gr6f.4xlarge", "p5.4xlarge", "r8i.large", "r8i.xlarge", "r8i.2xlarge", "r8i.4xlarge", "r8i.8xlarge", "r8i.12xlarge", "r8i.16xlarge", "r8i.24xlarge", "r8i.32xlarge", "r8i.48xlarge", "r8i.96xlarge", "r8i.metal-48xl", "r8i.metal-96xl", "r8i-flex.large", "r8i-flex.xlarge", "r8i-flex.2xlarge", "r8i-flex.4xlarge", "r8i-flex.8xlarge", "r8i-flex.12xlarge", "r8i-flex.16xlarge", "m8i.large", "m8i.xlarge", "m8i.2xlarge", "m8i.4xlarge", "m8i.8xlarge", "m8i.12xlarge", "m8i.16xlarge", "m8i.24xlarge", "m8i.32xlarge", "m8i.48xlarge", "m8i.96xlarge", "m8i.metal-48xl", "m8i.metal-96xl", "m8i-flex.large", "m8i-flex.xlarge", "m8i-flex.2xlarge", "m8i-flex.4xlarge", "m8i-flex.8xlarge", "m8i-flex.12xlarge", "m8i-flex.16xlarge", "i8ge.large", "i8ge.xlarge", "i8ge.2xlarge", "i8ge.3xlarge", "i8ge.6xlarge", "i8ge.12xlarge", "i8ge.18xlarge", "i8ge.24xlarge", "i8ge.48xlarge", "i8ge.metal-24xl", "i8ge.metal-48xl", "mac-m4.metal", "mac-m4pro.metal", "r8gn.medium", "r8gn.large", "r8gn.xlarge", "r8gn.2xlarge", "r8gn.4xlarge", "r8gn.8xlarge", "r8gn.12xlarge", "r8gn.16xlarge", "r8gn.24xlarge", "r8gn.48xlarge", "r8gn.metal-24xl", "r8gn.metal-48xl", "c8i.large", "c8i.xlarge", "c8i.2xlarge", "c8i.4xlarge", "c8i.8xlarge", "c8i.12xlarge", "c8i.16xlarge", "c8i.24xlarge", "c8i.32xlarge", "c8i.48xlarge", "c8i.96xlarge", "c8i.metal-48xl", "c8i.metal-96xl", "c8i-flex.large", "c8i-flex.xlarge", "c8i-flex.2xlarge", "c8i-flex.4xlarge", "c8i-flex.8xlarge", "c8i-flex.12xlarge", "c8i-flex.16xlarge", "r8gb.medium", "r8gb.large", "r8gb.xlarge", "r8gb.2xlarge", "r8gb.4xlarge", "r8gb.8xlarge", "r8gb.12xlarge", "r8gb.16xlarge", "r8gb.24xlarge", "r8gb.metal-24xl", "m8a.medium", "m8a.large", "m8a.xlarge", "m8a.2xlarge", "m8a.4xlarge", "m8a.8xlarge", "m8a.12xlarge", "m8a.16xlarge", "m8a.24xlarge", "m8a.48xlarge", "m8a.metal-24xl", "m8a.metal-48xl", "trn2.3xlarge", "r8a.medium", "r8a.large", "r8a.xlarge", "r8a.2xlarge", "r8a.4xlarge", "r8a.8xlarge", "r8a.12xlarge", "r8a.16xlarge", "r8a.24xlarge", "r8a.48xlarge", "r8a.metal-24xl", "r8a.metal-48xl", "p6-b300.48xlarge", "c8a.medium", "c8a.large", "c8a.xlarge", "c8a.2xlarge", "c8a.4xlarge", "c8a.8xlarge", "c8a.12xlarge", "c8a.16xlarge", "c8a.24xlarge", "c8a.48xlarge", "c8a.metal-24xl", "c8a.metal-48xl", "c8gb.12xlarge", "c8gb.16xlarge", "c8gb.24xlarge", "c8gb.2xlarge", "c8gb.4xlarge", "c8gb.8xlarge", "c8gb.large", "c8gb.medium", "c8gb.metal-24xl", "c8gb.xlarge", "c8gb.48xlarge", "c8gb.metal-48xl", "m8gb.12xlarge", "m8gb.16xlarge", "m8gb.24xlarge", "m8gb.2xlarge", "m8gb.4xlarge", "m8gb.8xlarge", "m8gb.large", "m8gb.medium", "m8gb.xlarge", "m8gb.48xlarge", "m8gb.metal-24xl", "m8gb.metal-48xl", "m8gn.12xlarge", "m8gn.16xlarge", "m8gn.24xlarge", "m8gn.2xlarge", "m8gn.48xlarge", "m8gn.4xlarge", "m8gn.8xlarge", "m8gn.large", "m8gn.medium", "m8gn.xlarge", "m8gn.metal-24xl", "m8gn.metal-48xl", "x8aedz.12xlarge", "x8aedz.24xlarge", "x8aedz.3xlarge", "x8aedz.6xlarge", "x8aedz.large", "x8aedz.metal-12xl", "x8aedz.metal-24xl", "x8aedz.xlarge", "m8azn.medium", "m8azn.large", "m8azn.xlarge", "m8azn.3xlarge", "m8azn.6xlarge", "m8azn.12xlarge", "m8azn.24xlarge", "m8azn.metal-12xl", "m8azn.metal-24xl", "x8i.large", "x8i.xlarge", "x8i.2xlarge", "x8i.4xlarge", "x8i.8xlarge", "x8i.12xlarge", "x8i.16xlarge", "x8i.24xlarge", "x8i.32xlarge", "x8i.48xlarge", "x8i.64xlarge", "x8i.96xlarge", "x8i.metal-48xl", "x8i.metal-96xl", "mac-m4max.metal", "g7e.2xlarge", "g7e.4xlarge", "g7e.8xlarge", "g7e.12xlarge", "g7e.24xlarge", "g7e.48xlarge", "r8id.large", "r8id.xlarge", "r8id.2xlarge", "r8id.4xlarge", "r8id.8xlarge", "r8id.12xlarge", "r8id.16xlarge", "r8id.24xlarge", "r8id.32xlarge", "r8id.48xlarge", "r8id.96xlarge", "r8id.metal-48xl", "r8id.metal-96xl", "c8id.large", "c8id.xlarge", "c8id.2xlarge", "c8id.4xlarge", "c8id.8xlarge", "c8id.12xlarge", "c8id.16xlarge", "c8id.24xlarge", "c8id.32xlarge", "c8id.48xlarge", "c8id.96xlarge", "c8id.metal-48xl", "c8id.metal-96xl", "m8id.large", "m8id.xlarge", "m8id.2xlarge", "m8id.4xlarge", "m8id.8xlarge", "m8id.12xlarge", "m8id.16xlarge", "m8id.24xlarge", "m8id.32xlarge", "m8id.48xlarge", "m8id.96xlarge", "m8id.metal-48xl", "m8id.metal-96xl", "hpc8a.96xlarge", "c8in.large", "c8in.xlarge", "c8in.2xlarge", "c8in.4xlarge", "c8in.8xlarge", "c8in.12xlarge", "c8in.16xlarge", "c8in.24xlarge", "c8in.32xlarge", "c8in.48xlarge", "c8in.96xlarge", "c8in.metal-48xl", "c8in.metal-96xl", "c8ib.large", "c8ib.xlarge", "c8ib.2xlarge", "c8ib.4xlarge", "c8ib.8xlarge", "c8ib.12xlarge", "c8ib.16xlarge", "c8ib.24xlarge", "c8ib.32xlarge", "c8ib.48xlarge", "c8ib.96xlarge", "c8ib.metal-48xl", "c8ib.metal-96xl", "r8in.large", "r8in.xlarge", "r8in.2xlarge", "r8in.4xlarge", "r8in.8xlarge", "r8in.12xlarge", "r8in.16xlarge", "r8in.24xlarge", "r8in.32xlarge", "r8in.48xlarge", "r8in.96xlarge", "r8ib.large", "r8ib.xlarge", "r8ib.2xlarge", "r8ib.4xlarge", "r8ib.8xlarge", "r8ib.12xlarge", "r8ib.16xlarge", "r8ib.24xlarge", "r8ib.32xlarge", "r8ib.48xlarge", "r8ib.96xlarge", "m8in.large", "m8in.xlarge", "m8in.2xlarge", "m8in.4xlarge", "m8in.8xlarge", "m8in.12xlarge", "m8in.16xlarge", "m8in.24xlarge", "m8in.32xlarge", "m8in.48xlarge", "m8in.96xlarge", "m8ib.large", "m8ib.xlarge", "m8ib.2xlarge", "m8ib.4xlarge", "m8ib.8xlarge", "m8ib.12xlarge", "m8ib.16xlarge", "m8ib.24xlarge", "m8ib.32xlarge", "m8ib.48xlarge", "m8ib.96xlarge", "m8ine.large", "m8ine.xlarge", "m8ine.2xlarge", "m8ine.4xlarge", "m8ine.8xlarge", "m8ine.12xlarge", "c8ine.large", "c8ine.xlarge", "c8ine.2xlarge", "c8ine.4xlarge", "c8ine.8xlarge", "c8ine.12xlarge", "m8idn.large", "m8idn.xlarge", "m8idn.2xlarge", "m8idn.4xlarge", "m8idn.8xlarge", "m8idn.12xlarge", "m8idn.16xlarge", "m8idn.24xlarge", "m8idn.32xlarge", "m8idn.48xlarge", "m8idn.96xlarge", "r8idn.large", "r8idn.xlarge", "r8idn.2xlarge", "r8idn.4xlarge", "r8idn.8xlarge", "r8idn.12xlarge", "r8idn.16xlarge", "r8idn.24xlarge", "r8idn.32xlarge", "r8idn.48xlarge", "r8idn.96xlarge", "m8idb.large", "m8idb.xlarge", "m8idb.2xlarge", "m8idb.4xlarge", "m8idb.8xlarge", "m8idb.12xlarge", "m8idb.16xlarge", "m8idb.24xlarge", "m8idb.32xlarge", "m8idb.48xlarge", "m8idb.96xlarge", "r8idb.large", "r8idb.xlarge", "r8idb.2xlarge", "r8idb.4xlarge", "r8idb.8xlarge", "r8idb.12xlarge", "r8idb.16xlarge", "r8idb.24xlarge", "r8idb.32xlarge", "r8idb.48xlarge", "r8idb.96xlarge", "mac-m3ultra.metal", "m9g.large", "m9g.xlarge", "m9g.2xlarge", "m9g.4xlarge", "m9g.8xlarge", "m9g.12xlarge", "m9g.16xlarge", "m9g.24xlarge", "m9g.48xlarge", "m9g.metal-24xl", "m9g.metal-48xl", "m9gd.large", "m9gd.xlarge", "m9gd.2xlarge", "m9gd.4xlarge", "m9gd.8xlarge", "m9gd.12xlarge", "m9gd.16xlarge", "m9gd.24xlarge", "m9gd.48xlarge", "m9gd.metal-24xl", "m9gd.metal-48xl", "r8in.metal-48xl", "r8in.metal-96xl", "r8ib.metal-48xl", "r8ib.metal-96xl", "r8idn.metal-48xl", "r8idn.metal-96xl", "r8idb.metal-48xl", "r8idb.metal-96xl", "m8in.metal-48xl", "m8in.metal-96xl", "m8ib.metal-48xl", "m8ib.metal-96xl", "m8idn.metal-48xl", "m8idn.metal-96xl", "m8idb.metal-48xl", "m8idb.metal-96xl", "g7.2xlarge", "g7.4xlarge", "g7.8xlarge", "g7.12xlarge", "g7.24xlarge", "g7.48xlarge", "c9g.medium", "c9g.large", "c9g.xlarge", "c9g.2xlarge", "c9g.4xlarge", "c9g.8xlarge", "c9g.12xlarge", "c9g.16xlarge", "c9g.24xlarge", "c9g.48xlarge", "c9g.metal-48xl", "c9gd.medium", "c9gd.large", "c9gd.xlarge", "c9gd.2xlarge", "c9gd.4xlarge", "c9gd.8xlarge", "c9gd.12xlarge", "c9gd.16xlarge", "c9gd.24xlarge", "c9gd.48xlarge", "c9gd.metal-48xl", "r9g.medium", "r9g.large", "r9g.xlarge", "r9g.2xlarge", "r9g.4xlarge", "r9g.8xlarge", "r9g.12xlarge", "r9g.16xlarge", "r9g.24xlarge", "r9g.48xlarge", "r9g.metal-48xl", "r9gd.medium", "r9gd.large", "r9gd.xlarge", "r9gd.2xlarge", "r9gd.4xlarge", "r9gd.8xlarge", "r9gd.12xlarge", "r9gd.16xlarge", "r9gd.24xlarge", "r9gd.48xlarge", "r9gd.metal-48xl", "m9g.medium", "t8i.nano", "t8i.micro", "t8i.small", "t8i.medium", "i8g.metal-48xl", "r8gb.48xlarge", "r8gb.metal-48xl", "m9gd.medium", "trn2u.48xlarge", "null" ], "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The instance type we want to create and run", "constantName": "org.apache.camel.component.aws2.ec2.AWS2EC2Constants#INSTANCE_TYPE" }, + "CamelAwsEC2InstanceType": { "index": 1, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "software.amazon.awssdk.services.ec2.model.InstanceType", "enum": [ "a1.medium", "a1.large", "a1.xlarge", "a1.2xlarge", "a1.4xlarge", "a1.metal", "c1.medium", "c1.xlarge", "c3.large", "c3.xlarge", "c3.2xlarge", "c3.4xlarge", "c3.8xlarge", "c4.large", "c4.xlarge", "c4.2xlarge", "c4.4xlarge", "c4.8xlarge", "c5.large", "c5.xlarge", "c5.2xlarge", "c5.4xlarge", "c5.9xlarge", "c5.12xlarge", "c5.18xlarge", "c5.24xlarge", "c5.metal", "c5a.large", "c5a.xlarge", "c5a.2xlarge", "c5a.4xlarge", "c5a.8xlarge", "c5a.12xlarge", "c5a.16xlarge", "c5a.24xlarge", "c5ad.large", "c5ad.xlarge", "c5ad.2xlarge", "c5ad.4xlarge", "c5ad.8xlarge", "c5ad.12xlarge", "c5ad.16xlarge", "c5ad.24xlarge", "c5d.large", "c5d.xlarge", "c5d.2xlarge", "c5d.4xlarge", "c5d.9xlarge", "c5d.12xlarge", "c5d.18xlarge", "c5d.24xlarge", "c5d.metal", "c5n.large", "c5n.xlarge", "c5n.2xlarge", "c5n.4xlarge", "c5n.9xlarge", "c5n.18xlarge", "c5n.metal", "c6g.medium", "c6g.large", "c6g.xlarge", "c6g.2xlarge", "c6g.4xlarge", "c6g.8xlarge", "c6g.12xlarge", "c6g.16xlarge", "c6g.metal", "c6gd.medium", "c6gd.large", "c6gd.xlarge", "c6gd.2xlarge", "c6gd.4xlarge", "c6gd.8xlarge", "c6gd.12xlarge", "c6gd.16xlarge", "c6gd.metal", "c6gn.medium", "c6gn.large", "c6gn.xlarge", "c6gn.2xlarge", "c6gn.4xlarge", "c6gn.8xlarge", "c6gn.12xlarge", "c6gn.16xlarge", "c6i.large", "c6i.xlarge", "c6i.2xlarge", "c6i.4xlarge", "c6i.8xlarge", "c6i.12xlarge", "c6i.16xlarge", "c6i.24xlarge", "c6i.32xlarge", "c6i.metal", "cc1.4xlarge", "cc2.8xlarge", "cg1.4xlarge", "cr1.8xlarge", "d2.xlarge", "d2.2xlarge", "d2.4xlarge", "d2.8xlarge", "d3.xlarge", "d3.2xlarge", "d3.4xlarge", "d3.8xlarge", "d3en.xlarge", "d3en.2xlarge", "d3en.4xlarge", "d3en.6xlarge", "d3en.8xlarge", "d3en.12xlarge", "dl1.24xlarge", "f1.2xlarge", "f1.4xlarge", "f1.16xlarge", "g2.2xlarge", "g2.8xlarge", "g3.4xlarge", "g3.8xlarge", "g3.16xlarge", "g3s.xlarge", "g4ad.xlarge", "g4ad.2xlarge", "g4ad.4xlarge", "g4ad.8xlarge", "g4ad.16xlarge", "g4dn.xlarge", "g4dn.2xlarge", "g4dn.4xlarge", "g4dn.8xlarge", "g4dn.12xlarge", "g4dn.16xlarge", "g4dn.metal", "g5.xlarge", "g5.2xlarge", "g5.4xlarge", "g5.8xlarge", "g5.12xlarge", "g5.16xlarge", "g5.24xlarge", "g5.48xlarge", "g5g.xlarge", "g5g.2xlarge", "g5g.4xlarge", "g5g.8xlarge", "g5g.16xlarge", "g5g.metal", "hi1.4xlarge", "hpc6a.48xlarge", "hs1.8xlarge", "h1.2xlarge", "h1.4xlarge", "h1.8xlarge", "h1.16xlarge", "i2.xlarge", "i2.2xlarge", "i2.4xlarge", "i2.8xlarge", "i3.large", "i3.xlarge", "i3.2xlarge", "i3.4xlarge", "i3.8xlarge", "i3.16xlarge", "i3.metal", "i3en.large", "i3en.xlarge", "i3en.2xlarge", "i3en.3xlarge", "i3en.6xlarge", "i3en.12xlarge", "i3en.24xlarge", "i3en.metal", "im4gn.large", "im4gn.xlarge", "im4gn.2xlarge", "im4gn.4xlarge", "im4gn.8xlarge", "im4gn.16xlarge", "inf1.xlarge", "inf1.2xlarge", "inf1.6xlarge", "inf1.24xlarge", "is4gen.medium", "is4gen.large", "is4gen.xlarge", "is4gen.2xlarge", "is4gen.4xlarge", "is4gen.8xlarge", "m1.small", "m1.medium", "m1.large", "m1.xlarge", "m2.xlarge", "m2.2xlarge", "m2.4xlarge", "m3.medium", "m3.large", "m3.xlarge", "m3.2xlarge", "m4.large", "m4.xlarge", "m4.2xlarge", "m4.4xlarge", "m4.10xlarge", "m4.16xlarge", "m5.large", "m5.xlarge", "m5.2xlarge", "m5.4xlarge", "m5.8xlarge", "m5.12xlarge", "m5.16xlarge", "m5.24xlarge", "m5.metal", "m5a.large", "m5a.xlarge", "m5a.2xlarge", "m5a.4xlarge", "m5a.8xlarge", "m5a.12xlarge", "m5a.16xlarge", "m5a.24xlarge", "m5ad.large", "m5ad.xlarge", "m5ad.2xlarge", "m5ad.4xlarge", "m5ad.8xlarge", "m5ad.12xlarge", "m5ad.16xlarge", "m5ad.24xlarge", "m5d.large", "m5d.xlarge", "m5d.2xlarge", "m5d.4xlarge", "m5d.8xlarge", "m5d.12xlarge", "m5d.16xlarge", "m5d.24xlarge", "m5d.metal", "m5dn.large", "m5dn.xlarge", "m5dn.2xlarge", "m5dn.4xlarge", "m5dn.8xlarge", "m5dn.12xlarge", "m5dn.16xlarge", "m5dn.24xlarge", "m5dn.metal", "m5n.large", "m5n.xlarge", "m5n.2xlarge", "m5n.4xlarge", "m5n.8xlarge", "m5n.12xlarge", "m5n.16xlarge", "m5n.24xlarge", "m5n.metal", "m5zn.large", "m5zn.xlarge", "m5zn.2xlarge", "m5zn.3xlarge", "m5zn.6xlarge", "m5zn.12xlarge", "m5zn.metal", "m6a.large", "m6a.xlarge", "m6a.2xlarge", "m6a.4xlarge", "m6a.8xlarge", "m6a.12xlarge", "m6a.16xlarge", "m6a.24xlarge", "m6a.32xlarge", "m6a.48xlarge", "m6g.metal", "m6g.medium", "m6g.large", "m6g.xlarge", "m6g.2xlarge", "m6g.4xlarge", "m6g.8xlarge", "m6g.12xlarge", "m6g.16xlarge", "m6gd.metal", "m6gd.medium", "m6gd.large", "m6gd.xlarge", "m6gd.2xlarge", "m6gd.4xlarge", "m6gd.8xlarge", "m6gd.12xlarge", "m6gd.16xlarge", "m6i.large", "m6i.xlarge", "m6i.2xlarge", "m6i.4xlarge", "m6i.8xlarge", "m6i.12xlarge", "m6i.16xlarge", "m6i.24xlarge", "m6i.32xlarge", "m6i.metal", "mac1.metal", "p2.xlarge", "p2.8xlarge", "p2.16xlarge", "p3.2xlarge", "p3.8xlarge", "p3.16xlarge", "p3dn.24xlarge", "p4d.24xlarge", "r3.large", "r3.xlarge", "r3.2xlarge", "r3.4xlarge", "r3.8xlarge", "r4.large", "r4.xlarge", "r4.2xlarge", "r4.4xlarge", "r4.8xlarge", "r4.16xlarge", "r5.large", "r5.xlarge", "r5.2xlarge", "r5.4xlarge", "r5.8xlarge", "r5.12xlarge", "r5.16xlarge", "r5.24xlarge", "r5.metal", "r5a.large", "r5a.xlarge", "r5a.2xlarge", "r5a.4xlarge", "r5a.8xlarge", "r5a.12xlarge", "r5a.16xlarge", "r5a.24xlarge", "r5ad.large", "r5ad.xlarge", "r5ad.2xlarge", "r5ad.4xlarge", "r5ad.8xlarge", "r5ad.12xlarge", "r5ad.16xlarge", "r5ad.24xlarge", "r5b.large", "r5b.xlarge", "r5b.2xlarge", "r5b.4xlarge", "r5b.8xlarge", "r5b.12xlarge", "r5b.16xlarge", "r5b.24xlarge", "r5b.metal", "r5d.large", "r5d.xlarge", "r5d.2xlarge", "r5d.4xlarge", "r5d.8xlarge", "r5d.12xlarge", "r5d.16xlarge", "r5d.24xlarge", "r5d.metal", "r5dn.large", "r5dn.xlarge", "r5dn.2xlarge", "r5dn.4xlarge", "r5dn.8xlarge", "r5dn.12xlarge", "r5dn.16xlarge", "r5dn.24xlarge", "r5dn.metal", "r5n.large", "r5n.xlarge", "r5n.2xlarge", "r5n.4xlarge", "r5n.8xlarge", "r5n.12xlarge", "r5n.16xlarge", "r5n.24xlarge", "r5n.metal", "r6g.medium", "r6g.large", "r6g.xlarge", "r6g.2xlarge", "r6g.4xlarge", "r6g.8xlarge", "r6g.12xlarge", "r6g.16xlarge", "r6g.metal", "r6gd.medium", "r6gd.large", "r6gd.xlarge", "r6gd.2xlarge", "r6gd.4xlarge", "r6gd.8xlarge", "r6gd.12xlarge", "r6gd.16xlarge", "r6gd.metal", "r6i.large", "r6i.xlarge", "r6i.2xlarge", "r6i.4xlarge", "r6i.8xlarge", "r6i.12xlarge", "r6i.16xlarge", "r6i.24xlarge", "r6i.32xlarge", "r6i.metal", "t1.micro", "t2.nano", "t2.micro", "t2.small", "t2.medium", "t2.large", "t2.xlarge", "t2.2xlarge", "t3.nano", "t3.micro", "t3.small", "t3.medium", "t3.large", "t3.xlarge", "t3.2xlarge", "t3a.nano", "t3a.micro", "t3a.small", "t3a.medium", "t3a.large", "t3a.xlarge", "t3a.2xlarge", "t4g.nano", "t4g.micro", "t4g.small", "t4g.medium", "t4g.large", "t4g.xlarge", "t4g.2xlarge", "u-6tb1.56xlarge", "u-6tb1.112xlarge", "u-9tb1.112xlarge", "u-12tb1.112xlarge", "u-6tb1.metal", "u-9tb1.metal", "u-12tb1.metal", "u-18tb1.metal", "u-24tb1.metal", "vt1.3xlarge", "vt1.6xlarge", "vt1.24xlarge", "x1.16xlarge", "x1.32xlarge", "x1e.xlarge", "x1e.2xlarge", "x1e.4xlarge", "x1e.8xlarge", "x1e.16xlarge", "x1e.32xlarge", "x2iezn.2xlarge", "x2iezn.4xlarge", "x2iezn.6xlarge", "x2iezn.8xlarge", "x2iezn.12xlarge", "x2iezn.metal", "x2gd.medium", "x2gd.large", "x2gd.xlarge", "x2gd.2xlarge", "x2gd.4xlarge", "x2gd.8xlarge", "x2gd.12xlarge", "x2gd.16xlarge", "x2gd.metal", "z1d.large", "z1d.xlarge", "z1d.2xlarge", "z1d.3xlarge", "z1d.6xlarge", "z1d.12xlarge", "z1d.metal", "x2idn.16xlarge", "x2idn.24xlarge", "x2idn.32xlarge", "x2iedn.xlarge", "x2iedn.2xlarge", "x2iedn.4xlarge", "x2iedn.8xlarge", "x2iedn.16xlarge", "x2iedn.24xlarge", "x2iedn.32xlarge", "c6a.large", "c6a.xlarge", "c6a.2xlarge", "c6a.4xlarge", "c6a.8xlarge", "c6a.12xlarge", "c6a.16xlarge", "c6a.24xlarge", "c6a.32xlarge", "c6a.48xlarge", "c6a.metal", "m6a.metal", "i4i.large", "i4i.xlarge", "i4i.2xlarge", "i4i.4xlarge", "i4i.8xlarge", "i4i.16xlarge", "i4i.32xlarge", "i4i.metal", "x2idn.metal", "x2iedn.metal", "c7g.medium", "c7g.large", "c7g.xlarge", "c7g.2xlarge", "c7g.4xlarge", "c7g.8xlarge", "c7g.12xlarge", "c7g.16xlarge", "mac2.metal", "c6id.large", "c6id.xlarge", "c6id.2xlarge", "c6id.4xlarge", "c6id.8xlarge", "c6id.12xlarge", "c6id.16xlarge", "c6id.24xlarge", "c6id.32xlarge", "c6id.metal", "m6id.large", "m6id.xlarge", "m6id.2xlarge", "m6id.4xlarge", "m6id.8xlarge", "m6id.12xlarge", "m6id.16xlarge", "m6id.24xlarge", "m6id.32xlarge", "m6id.metal", "r6id.large", "r6id.xlarge", "r6id.2xlarge", "r6id.4xlarge", "r6id.8xlarge", "r6id.12xlarge", "r6id.16xlarge", "r6id.24xlarge", "r6id.32xlarge", "r6id.metal", "r6a.large", "r6a.xlarge", "r6a.2xlarge", "r6a.4xlarge", "r6a.8xlarge", "r6a.12xlarge", "r6a.16xlarge", "r6a.24xlarge", "r6a.32xlarge", "r6a.48xlarge", "r6a.metal", "p4de.24xlarge", "u-3tb1.56xlarge", "u-18tb1.112xlarge", "u-24tb1.112xlarge", "trn1.2xlarge", "trn1.32xlarge", "hpc6id.32xlarge", "c6in.large", "c6in.xlarge", "c6in.2xlarge", "c6in.4xlarge", "c6in.8xlarge", "c6in.12xlarge", "c6in.16xlarge", "c6in.24xlarge", "c6in.32xlarge", "m6in.large", "m6in.xlarge", "m6in.2xlarge", "m6in.4xlarge", "m6in.8xlarge", "m6in.12xlarge", "m6in.16xlarge", "m6in.24xlarge", "m6in.32xlarge", "m6idn.large", "m6idn.xlarge", "m6idn.2xlarge", "m6idn.4xlarge", "m6idn.8xlarge", "m6idn.12xlarge", "m6idn.16xlarge", "m6idn.24xlarge", "m6idn.32xlarge", "r6in.large", "r6in.xlarge", "r6in.2xlarge", "r6in.4xlarge", "r6in.8xlarge", "r6in.12xlarge", "r6in.16xlarge", "r6in.24xlarge", "r6in.32xlarge", "r6idn.large", "r6idn.xlarge", "r6idn.2xlarge", "r6idn.4xlarge", "r6idn.8xlarge", "r6idn.12xlarge", "r6idn.16xlarge", "r6idn.24xlarge", "r6idn.32xlarge", "c7g.metal", "m7g.medium", "m7g.large", "m7g.xlarge", "m7g.2xlarge", "m7g.4xlarge", "m7g.8xlarge", "m7g.12xlarge", "m7g.16xlarge", "m7g.metal", "r7g.medium", "r7g.large", "r7g.xlarge", "r7g.2xlarge", "r7g.4xlarge", "r7g.8xlarge", "r7g.12xlarge", "r7g.16xlarge", "r7g.metal", "c6in.metal", "m6in.metal", "m6idn.metal", "r6in.metal", "r6idn.metal", "inf2.xlarge", "inf2.8xlarge", "inf2.24xlarge", "inf2.48xlarge", "trn1n.32xlarge", "i4g.large", "i4g.xlarge", "i4g.2xlarge", "i4g.4xlarge", "i4g.8xlarge", "i4g.16xlarge", "hpc7g.4xlarge", "hpc7g.8xlarge", "hpc7g.16xlarge", "c7gn.medium", "c7gn.large", "c7gn.xlarge", "c7gn.2xlarge", "c7gn.4xlarge", "c7gn.8xlarge", "c7gn.12xlarge", "c7gn.16xlarge", "p5.48xlarge", "m7i.large", "m7i.xlarge", "m7i.2xlarge", "m7i.4xlarge", "m7i.8xlarge", "m7i.12xlarge", "m7i.16xlarge", "m7i.24xlarge", "m7i.48xlarge", "m7i-flex.large", "m7i-flex.xlarge", "m7i-flex.2xlarge", "m7i-flex.4xlarge", "m7i-flex.8xlarge", "m7a.medium", "m7a.large", "m7a.xlarge", "m7a.2xlarge", "m7a.4xlarge", "m7a.8xlarge", "m7a.12xlarge", "m7a.16xlarge", "m7a.24xlarge", "m7a.32xlarge", "m7a.48xlarge", "m7a.metal-48xl", "hpc7a.12xlarge", "hpc7a.24xlarge", "hpc7a.48xlarge", "hpc7a.96xlarge", "c7gd.medium", "c7gd.large", "c7gd.xlarge", "c7gd.2xlarge", "c7gd.4xlarge", "c7gd.8xlarge", "c7gd.12xlarge", "c7gd.16xlarge", "m7gd.medium", "m7gd.large", "m7gd.xlarge", "m7gd.2xlarge", "m7gd.4xlarge", "m7gd.8xlarge", "m7gd.12xlarge", "m7gd.16xlarge", "r7gd.medium", "r7gd.large", "r7gd.xlarge", "r7gd.2xlarge", "r7gd.4xlarge", "r7gd.8xlarge", "r7gd.12xlarge", "r7gd.16xlarge", "r7a.medium", "r7a.large", "r7a.xlarge", "r7a.2xlarge", "r7a.4xlarge", "r7a.8xlarge", "r7a.12xlarge", "r7a.16xlarge", "r7a.24xlarge", "r7a.32xlarge", "r7a.48xlarge", "c7i.large", "c7i.xlarge", "c7i.2xlarge", "c7i.4xlarge", "c7i.8xlarge", "c7i.12xlarge", "c7i.16xlarge", "c7i.24xlarge", "c7i.48xlarge", "mac2-m2pro.metal", "r7iz.large", "r7iz.xlarge", "r7iz.2xlarge", "r7iz.4xlarge", "r7iz.8xlarge", "r7iz.12xlarge", "r7iz.16xlarge", "r7iz.32xlarge", "c7a.medium", "c7a.large", "c7a.xlarge", "c7a.2xlarge", "c7a.4xlarge", "c7a.8xlarge", "c7a.12xlarge", "c7a.16xlarge", "c7a.24xlarge", "c7a.32xlarge", "c7a.48xlarge", "c7a.metal-48xl", "r7a.metal-48xl", "r7i.large", "r7i.xlarge", "r7i.2xlarge", "r7i.4xlarge", "r7i.8xlarge", "r7i.12xlarge", "r7i.16xlarge", "r7i.24xlarge", "r7i.48xlarge", "dl2q.24xlarge", "mac2-m2.metal", "i4i.12xlarge", "i4i.24xlarge", "c7i.metal-24xl", "c7i.metal-48xl", "m7i.metal-24xl", "m7i.metal-48xl", "r7i.metal-24xl", "r7i.metal-48xl", "r7iz.metal-16xl", "r7iz.metal-32xl", "c7gd.metal", "m7gd.metal", "r7gd.metal", "g6.xlarge", "g6.2xlarge", "g6.4xlarge", "g6.8xlarge", "g6.12xlarge", "g6.16xlarge", "g6.24xlarge", "g6.48xlarge", "gr6.4xlarge", "gr6.8xlarge", "c7i-flex.large", "c7i-flex.xlarge", "c7i-flex.2xlarge", "c7i-flex.4xlarge", "c7i-flex.8xlarge", "u7i-12tb.224xlarge", "u7in-16tb.224xlarge", "u7in-24tb.224xlarge", "u7in-32tb.224xlarge", "u7ib-12tb.224xlarge", "c7gn.metal", "r8g.medium", "r8g.large", "r8g.xlarge", "r8g.2xlarge", "r8g.4xlarge", "r8g.8xlarge", "r8g.12xlarge", "r8g.16xlarge", "r8g.24xlarge", "r8g.48xlarge", "r8g.metal-24xl", "r8g.metal-48xl", "mac2-m1ultra.metal", "g6e.xlarge", "g6e.2xlarge", "g6e.4xlarge", "g6e.8xlarge", "g6e.12xlarge", "g6e.16xlarge", "g6e.24xlarge", "g6e.48xlarge", "c8g.medium", "c8g.large", "c8g.xlarge", "c8g.2xlarge", "c8g.4xlarge", "c8g.8xlarge", "c8g.12xlarge", "c8g.16xlarge", "c8g.24xlarge", "c8g.48xlarge", "c8g.metal-24xl", "c8g.metal-48xl", "m8g.medium", "m8g.large", "m8g.xlarge", "m8g.2xlarge", "m8g.4xlarge", "m8g.8xlarge", "m8g.12xlarge", "m8g.16xlarge", "m8g.24xlarge", "m8g.48xlarge", "m8g.metal-24xl", "m8g.metal-48xl", "x8g.medium", "x8g.large", "x8g.xlarge", "x8g.2xlarge", "x8g.4xlarge", "x8g.8xlarge", "x8g.12xlarge", "x8g.16xlarge", "x8g.24xlarge", "x8g.48xlarge", "x8g.metal-24xl", "x8g.metal-48xl", "i7ie.large", "i7ie.xlarge", "i7ie.2xlarge", "i7ie.3xlarge", "i7ie.6xlarge", "i7ie.12xlarge", "i7ie.18xlarge", "i7ie.24xlarge", "i7ie.48xlarge", "i8g.large", "i8g.xlarge", "i8g.2xlarge", "i8g.4xlarge", "i8g.8xlarge", "i8g.12xlarge", "i8g.16xlarge", "i8g.24xlarge", "i8g.metal-24xl", "u7i-6tb.112xlarge", "u7i-8tb.112xlarge", "u7inh-32tb.480xlarge", "p5e.48xlarge", "p5en.48xlarge", "f2.12xlarge", "f2.48xlarge", "trn2.48xlarge", "c7i-flex.12xlarge", "c7i-flex.16xlarge", "m7i-flex.12xlarge", "m7i-flex.16xlarge", "i7ie.metal-24xl", "i7ie.metal-48xl", "i8g.48xlarge", "c8gd.medium", "c8gd.large", "c8gd.xlarge", "c8gd.2xlarge", "c8gd.4xlarge", "c8gd.8xlarge", "c8gd.12xlarge", "c8gd.16xlarge", "c8gd.24xlarge", "c8gd.48xlarge", "c8gd.metal-24xl", "c8gd.metal-48xl", "i7i.large", "i7i.xlarge", "i7i.2xlarge", "i7i.4xlarge", "i7i.8xlarge", "i7i.12xlarge", "i7i.16xlarge", "i7i.24xlarge", "i7i.48xlarge", "i7i.metal-24xl", "i7i.metal-48xl", "p6-b200.48xlarge", "m8gd.medium", "m8gd.large", "m8gd.xlarge", "m8gd.2xlarge", "m8gd.4xlarge", "m8gd.8xlarge", "m8gd.12xlarge", "m8gd.16xlarge", "m8gd.24xlarge", "m8gd.48xlarge", "m8gd.metal-24xl", "m8gd.metal-48xl", "r8gd.medium", "r8gd.large", "r8gd.xlarge", "r8gd.2xlarge", "r8gd.4xlarge", "r8gd.8xlarge", "r8gd.12xlarge", "r8gd.16xlarge", "r8gd.24xlarge", "r8gd.48xlarge", "r8gd.metal-24xl", "r8gd.metal-48xl", "c8gn.medium", "c8gn.large", "c8gn.xlarge", "c8gn.2xlarge", "c8gn.4xlarge", "c8gn.8xlarge", "c8gn.12xlarge", "c8gn.16xlarge", "c8gn.24xlarge", "c8gn.48xlarge", "c8gn.metal-24xl", "c8gn.metal-48xl", "f2.6xlarge", "p6e-gb200.36xlarge", "g6f.large", "g6f.xlarge", "g6f.2xlarge", "g6f.4xlarge", "gr6f.4xlarge", "p5.4xlarge", "r8i.large", "r8i.xlarge", "r8i.2xlarge", "r8i.4xlarge", "r8i.8xlarge", "r8i.12xlarge", "r8i.16xlarge", "r8i.24xlarge", "r8i.32xlarge", "r8i.48xlarge", "r8i.96xlarge", "r8i.metal-48xl", "r8i.metal-96xl", "r8i-flex.large", "r8i-flex.xlarge", "r8i-flex.2xlarge", "r8i-flex.4xlarge", "r8i-flex.8xlarge", "r8i-flex.12xlarge", "r8i-flex.16xlarge", "m8i.large", "m8i.xlarge", "m8i.2xlarge", "m8i.4xlarge", "m8i.8xlarge", "m8i.12xlarge", "m8i.16xlarge", "m8i.24xlarge", "m8i.32xlarge", "m8i.48xlarge", "m8i.96xlarge", "m8i.metal-48xl", "m8i.metal-96xl", "m8i-flex.large", "m8i-flex.xlarge", "m8i-flex.2xlarge", "m8i-flex.4xlarge", "m8i-flex.8xlarge", "m8i-flex.12xlarge", "m8i-flex.16xlarge", "i8ge.large", "i8ge.xlarge", "i8ge.2xlarge", "i8ge.3xlarge", "i8ge.6xlarge", "i8ge.12xlarge", "i8ge.18xlarge", "i8ge.24xlarge", "i8ge.48xlarge", "i8ge.metal-24xl", "i8ge.metal-48xl", "mac-m4.metal", "mac-m4pro.metal", "r8gn.medium", "r8gn.large", "r8gn.xlarge", "r8gn.2xlarge", "r8gn.4xlarge", "r8gn.8xlarge", "r8gn.12xlarge", "r8gn.16xlarge", "r8gn.24xlarge", "r8gn.48xlarge", "r8gn.metal-24xl", "r8gn.metal-48xl", "c8i.large", "c8i.xlarge", "c8i.2xlarge", "c8i.4xlarge", "c8i.8xlarge", "c8i.12xlarge", "c8i.16xlarge", "c8i.24xlarge", "c8i.32xlarge", "c8i.48xlarge", "c8i.96xlarge", "c8i.metal-48xl", "c8i.metal-96xl", "c8i-flex.large", "c8i-flex.xlarge", "c8i-flex.2xlarge", "c8i-flex.4xlarge", "c8i-flex.8xlarge", "c8i-flex.12xlarge", "c8i-flex.16xlarge", "r8gb.medium", "r8gb.large", "r8gb.xlarge", "r8gb.2xlarge", "r8gb.4xlarge", "r8gb.8xlarge", "r8gb.12xlarge", "r8gb.16xlarge", "r8gb.24xlarge", "r8gb.metal-24xl", "m8a.medium", "m8a.large", "m8a.xlarge", "m8a.2xlarge", "m8a.4xlarge", "m8a.8xlarge", "m8a.12xlarge", "m8a.16xlarge", "m8a.24xlarge", "m8a.48xlarge", "m8a.metal-24xl", "m8a.metal-48xl", "trn2.3xlarge", "r8a.medium", "r8a.large", "r8a.xlarge", "r8a.2xlarge", "r8a.4xlarge", "r8a.8xlarge", "r8a.12xlarge", "r8a.16xlarge", "r8a.24xlarge", "r8a.48xlarge", "r8a.metal-24xl", "r8a.metal-48xl", "p6-b300.48xlarge", "c8a.medium", "c8a.large", "c8a.xlarge", "c8a.2xlarge", "c8a.4xlarge", "c8a.8xlarge", "c8a.12xlarge", "c8a.16xlarge", "c8a.24xlarge", "c8a.48xlarge", "c8a.metal-24xl", "c8a.metal-48xl", "c8gb.12xlarge", "c8gb.16xlarge", "c8gb.24xlarge", "c8gb.2xlarge", "c8gb.4xlarge", "c8gb.8xlarge", "c8gb.large", "c8gb.medium", "c8gb.metal-24xl", "c8gb.xlarge", "c8gb.48xlarge", "c8gb.metal-48xl", "m8gb.12xlarge", "m8gb.16xlarge", "m8gb.24xlarge", "m8gb.2xlarge", "m8gb.4xlarge", "m8gb.8xlarge", "m8gb.large", "m8gb.medium", "m8gb.xlarge", "m8gb.48xlarge", "m8gb.metal-24xl", "m8gb.metal-48xl", "m8gn.12xlarge", "m8gn.16xlarge", "m8gn.24xlarge", "m8gn.2xlarge", "m8gn.48xlarge", "m8gn.4xlarge", "m8gn.8xlarge", "m8gn.large", "m8gn.medium", "m8gn.xlarge", "m8gn.metal-24xl", "m8gn.metal-48xl", "x8aedz.12xlarge", "x8aedz.24xlarge", "x8aedz.3xlarge", "x8aedz.6xlarge", "x8aedz.large", "x8aedz.metal-12xl", "x8aedz.metal-24xl", "x8aedz.xlarge", "m8azn.medium", "m8azn.large", "m8azn.xlarge", "m8azn.3xlarge", "m8azn.6xlarge", "m8azn.12xlarge", "m8azn.24xlarge", "m8azn.metal-12xl", "m8azn.metal-24xl", "x8i.large", "x8i.xlarge", "x8i.2xlarge", "x8i.4xlarge", "x8i.8xlarge", "x8i.12xlarge", "x8i.16xlarge", "x8i.24xlarge", "x8i.32xlarge", "x8i.48xlarge", "x8i.64xlarge", "x8i.96xlarge", "x8i.metal-48xl", "x8i.metal-96xl", "mac-m4max.metal", "g7e.2xlarge", "g7e.4xlarge", "g7e.8xlarge", "g7e.12xlarge", "g7e.24xlarge", "g7e.48xlarge", "r8id.large", "r8id.xlarge", "r8id.2xlarge", "r8id.4xlarge", "r8id.8xlarge", "r8id.12xlarge", "r8id.16xlarge", "r8id.24xlarge", "r8id.32xlarge", "r8id.48xlarge", "r8id.96xlarge", "r8id.metal-48xl", "r8id.metal-96xl", "c8id.large", "c8id.xlarge", "c8id.2xlarge", "c8id.4xlarge", "c8id.8xlarge", "c8id.12xlarge", "c8id.16xlarge", "c8id.24xlarge", "c8id.32xlarge", "c8id.48xlarge", "c8id.96xlarge", "c8id.metal-48xl", "c8id.metal-96xl", "m8id.large", "m8id.xlarge", "m8id.2xlarge", "m8id.4xlarge", "m8id.8xlarge", "m8id.12xlarge", "m8id.16xlarge", "m8id.24xlarge", "m8id.32xlarge", "m8id.48xlarge", "m8id.96xlarge", "m8id.metal-48xl", "m8id.metal-96xl", "hpc8a.96xlarge", "c8in.large", "c8in.xlarge", "c8in.2xlarge", "c8in.4xlarge", "c8in.8xlarge", "c8in.12xlarge", "c8in.16xlarge", "c8in.24xlarge", "c8in.32xlarge", "c8in.48xlarge", "c8in.96xlarge", "c8in.metal-48xl", "c8in.metal-96xl", "c8ib.large", "c8ib.xlarge", "c8ib.2xlarge", "c8ib.4xlarge", "c8ib.8xlarge", "c8ib.12xlarge", "c8ib.16xlarge", "c8ib.24xlarge", "c8ib.32xlarge", "c8ib.48xlarge", "c8ib.96xlarge", "c8ib.metal-48xl", "c8ib.metal-96xl", "r8in.large", "r8in.xlarge", "r8in.2xlarge", "r8in.4xlarge", "r8in.8xlarge", "r8in.12xlarge", "r8in.16xlarge", "r8in.24xlarge", "r8in.32xlarge", "r8in.48xlarge", "r8in.96xlarge", "r8ib.large", "r8ib.xlarge", "r8ib.2xlarge", "r8ib.4xlarge", "r8ib.8xlarge", "r8ib.12xlarge", "r8ib.16xlarge", "r8ib.24xlarge", "r8ib.32xlarge", "r8ib.48xlarge", "r8ib.96xlarge", "m8in.large", "m8in.xlarge", "m8in.2xlarge", "m8in.4xlarge", "m8in.8xlarge", "m8in.12xlarge", "m8in.16xlarge", "m8in.24xlarge", "m8in.32xlarge", "m8in.48xlarge", "m8in.96xlarge", "m8ib.large", "m8ib.xlarge", "m8ib.2xlarge", "m8ib.4xlarge", "m8ib.8xlarge", "m8ib.12xlarge", "m8ib.16xlarge", "m8ib.24xlarge", "m8ib.32xlarge", "m8ib.48xlarge", "m8ib.96xlarge", "m8ine.large", "m8ine.xlarge", "m8ine.2xlarge", "m8ine.4xlarge", "m8ine.8xlarge", "m8ine.12xlarge", "c8ine.large", "c8ine.xlarge", "c8ine.2xlarge", "c8ine.4xlarge", "c8ine.8xlarge", "c8ine.12xlarge", "m8idn.large", "m8idn.xlarge", "m8idn.2xlarge", "m8idn.4xlarge", "m8idn.8xlarge", "m8idn.12xlarge", "m8idn.16xlarge", "m8idn.24xlarge", "m8idn.32xlarge", "m8idn.48xlarge", "m8idn.96xlarge", "r8idn.large", "r8idn.xlarge", "r8idn.2xlarge", "r8idn.4xlarge", "r8idn.8xlarge", "r8idn.12xlarge", "r8idn.16xlarge", "r8idn.24xlarge", "r8idn.32xlarge", "r8idn.48xlarge", "r8idn.96xlarge", "m8idb.large", "m8idb.xlarge", "m8idb.2xlarge", "m8idb.4xlarge", "m8idb.8xlarge", "m8idb.12xlarge", "m8idb.16xlarge", "m8idb.24xlarge", "m8idb.32xlarge", "m8idb.48xlarge", "m8idb.96xlarge", "r8idb.large", "r8idb.xlarge", "r8idb.2xlarge", "r8idb.4xlarge", "r8idb.8xlarge", "r8idb.12xlarge", "r8idb.16xlarge", "r8idb.24xlarge", "r8idb.32xlarge", "r8idb.48xlarge", "r8idb.96xlarge", "mac-m3ultra.metal", "m9g.large", "m9g.xlarge", "m9g.2xlarge", "m9g.4xlarge", "m9g.8xlarge", "m9g.12xlarge", "m9g.16xlarge", "m9g.24xlarge", "m9g.48xlarge", "m9g.metal-24xl", "m9g.metal-48xl", "m9gd.large", "m9gd.xlarge", "m9gd.2xlarge", "m9gd.4xlarge", "m9gd.8xlarge", "m9gd.12xlarge", "m9gd.16xlarge", "m9gd.24xlarge", "m9gd.48xlarge", "m9gd.metal-24xl", "m9gd.metal-48xl", "r8in.metal-48xl", "r8in.metal-96xl", "r8ib.metal-48xl", "r8ib.metal-96xl", "r8idn.metal-48xl", "r8idn.metal-96xl", "r8idb.metal-48xl", "r8idb.metal-96xl", "m8in.metal-48xl", "m8in.metal-96xl", "m8ib.metal-48xl", "m8ib.metal-96xl", "m8idn.metal-48xl", "m8idn.metal-96xl", "m8idb.metal-48xl", "m8idb.metal-96xl", "g7.2xlarge", "g7.4xlarge", "g7.8xlarge", "g7.12xlarge", "g7.24xlarge", "g7.48xlarge", "c9g.medium", "c9g.large", "c9g.xlarge", "c9g.2xlarge", "c9g.4xlarge", "c9g.8xlarge", "c9g.12xlarge", "c9g.16xlarge", "c9g.24xlarge", "c9g.48xlarge", "c9g.metal-48xl", "c9gd.medium", "c9gd.large", "c9gd.xlarge", "c9gd.2xlarge", "c9gd.4xlarge", "c9gd.8xlarge", "c9gd.12xlarge", "c9gd.16xlarge", "c9gd.24xlarge", "c9gd.48xlarge", "c9gd.metal-48xl", "r9g.medium", "r9g.large", "r9g.xlarge", "r9g.2xlarge", "r9g.4xlarge", "r9g.8xlarge", "r9g.12xlarge", "r9g.16xlarge", "r9g.24xlarge", "r9g.48xlarge", "r9g.metal-48xl", "r9gd.medium", "r9gd.large", "r9gd.xlarge", "r9gd.2xlarge", "r9gd.4xlarge", "r9gd.8xlarge", "r9gd.12xlarge", "r9gd.16xlarge", "r9gd.24xlarge", "r9gd.48xlarge", "r9gd.metal-48xl", "m9g.medium", "t8i.nano", "t8i.micro", "t8i.small", "t8i.medium", "i8g.metal-48xl", "r8gb.48xlarge", "r8gb.metal-48xl", "m9gd.medium", "trn2u.48xlarge", "null" ], "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The instance type we want to create and run, as an InstanceType, its AWS value (such as t2.micro) or the name of the constant (such as T2_MICRO)", "constantName": "org.apache.camel.component.aws2.ec2.AWS2EC2Constants#INSTANCE_TYPE" }, "CamelAwsEC2Operation": { "index": 2, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The operation we want to perform", "constantName": "org.apache.camel.component.aws2.ec2.AWS2EC2Constants#OPERATION" }, "CamelAwsEC2InstanceMinCount": { "index": 3, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "Integer", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The minimum number of instances we want to run.", "constantName": "org.apache.camel.component.aws2.ec2.AWS2EC2Constants#INSTANCE_MIN_COUNT" }, "CamelAwsEC2InstanceMaxCount": { "index": 4, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "Integer", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The maximum number of instances we want to run.", "constantName": "org.apache.camel.component.aws2.ec2.AWS2EC2Constants#INSTANCE_MAX_COUNT" }, @@ -57,7 +57,7 @@ "CamelAwsEC2InstanceKernelId": { "index": 6, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The ID of the kernel.", "constantName": "org.apache.camel.component.aws2.ec2.AWS2EC2Constants#INSTANCE_KERNEL_ID" }, "CamelAwsEC2InstanceEbsOptimized": { "index": 7, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "Boolean", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Define if the creating instance is optimized for EBS I\/O.", "constantName": "org.apache.camel.component.aws2.ec2.AWS2EC2Constants#INSTANCE_EBS_OPTIMIZED" }, "CamelAwsEC2InstanceSecurityGroups": { "index": 8, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "Collection", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The security groups to associate to the instances", "constantName": "org.apache.camel.component.aws2.ec2.AWS2EC2Constants#INSTANCE_SECURITY_GROUPS" }, - "CamelAwsEC2InstancesIds": { "index": 9, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "Collection", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "A collection of instances IDS to execute start, stop, describe and terminate operations on.", "constantName": "org.apache.camel.component.aws2.ec2.AWS2EC2Constants#INSTANCES_IDS" }, + "CamelAwsEC2InstancesIds": { "index": 9, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "Collection", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "A collection of instances IDS to execute start, stop, describe and terminate operations on. A String of ids separated by commas is accepted too.", "constantName": "org.apache.camel.component.aws2.ec2.AWS2EC2Constants#INSTANCES_IDS" }, "CamelAwsEC2InstancesKeyPair": { "index": 10, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The name of the key pair.", "constantName": "org.apache.camel.component.aws2.ec2.AWS2EC2Constants#INSTANCES_KEY_PAIR" }, "CamelAwsEC2InstancesClientToken": { "index": 11, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Unique, case-sensitive identifier you provide to ensure the idempotency of the request.", "constantName": "org.apache.camel.component.aws2.ec2.AWS2EC2Constants#INSTANCES_CLIENT_TOKEN" }, "CamelAwsEC2InstancesPlacement": { "index": 12, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "software.amazon.awssdk.services.ec2.model.Placement", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The placement for the instance.", "constantName": "org.apache.camel.component.aws2.ec2.AWS2EC2Constants#INSTANCES_PLACEMENT" }, diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/aws2-mq.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/aws2-mq.json index a100694868ff0..4b7ee35955fdb 100644 --- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/aws2-mq.json +++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/aws2-mq.json @@ -3,7 +3,7 @@ "kind": "component", "name": "aws2-mq", "title": "AWS MQ", - "description": "Send messages to AWS MQ.", + "description": "Manage AWS MQ instances.", "deprecated": false, "firstVersion": "3.1.0", "label": "cloud,messaging", @@ -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.mq.MQ2Configuration", "deprecated": false, "autowired": false, "secret": false, "description": "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 during starting and cause the route to fail being started. By deferring this startup to be lazy then the startup failure can be handled during routing messages via Camel's routing error handlers. Beware that when the first message is processed then creating and starting the producer may take a little time and prolong the total processing time of the processing." }, - "operation": { "index": 2, "kind": "property", "displayName": "Operation", "group": "producer", "label": "", "required": true, "type": "enum", "javaType": "org.apache.camel.component.aws2.mq.MQ2Operations", "enum": [ "listBrokers", "createBroker", "deleteBroker", "rebootBroker", "updateBroker", "describeBroker" ], "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.mq.MQ2Configuration", "configurationField": "configuration", "description": "The operation to perform. It can be listBrokers, createBroker, deleteBroker" }, + "operation": { "index": 2, "kind": "property", "displayName": "Operation", "group": "producer", "label": "", "required": true, "type": "enum", "javaType": "org.apache.camel.component.aws2.mq.MQ2Operations", "enum": [ "listBrokers", "createBroker", "deleteBroker", "rebootBroker", "updateBroker", "describeBroker" ], "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.mq.MQ2Configuration", "configurationField": "configuration", "description": "The operation to perform" }, "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.mq.MQ2Configuration", "configurationField": "configuration", "description": "Set the need for overriding the endpoint. This option needs to be used in combination with the uriEndpointOverride option" }, "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.mq.MQ2Configuration", "configurationField": "configuration", "description": "If we want to use a POJO request as body or not" }, "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-northeast-2", "ap-northeast-1", "me-south-1", "sa-east-1", "ap-east-1", "cn-north-1", "ca-west-1", "us-gov-west-1", "ap-southeast-1", "ap-southeast-2", "us-iso-east-1", "ap-southeast-3", "ap-southeast-4", "us-east-1", "us-east-2", "cn-northwest-1", "us-isob-east-1", "aws-global", "aws-cn-global", "aws-us-gov-global", "aws-iso-global", "aws-iso-b-global" ], "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.mq.MQ2Configuration", "configurationField": "configuration", "description": "The region in which MQ client needs to work. When using this parameter, the configuration will expect the lowercase name of the region (for example, ap-east-1) You'll need to use the name Region.EU_WEST_1.id()" }, @@ -54,19 +54,19 @@ "CamelAwsMQBrokerEngine": { "index": 3, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The Broker Engine for MQ.", "constantName": "org.apache.camel.component.aws2.mq.MQ2Constants#BROKER_ENGINE" }, "CamelAwsMQBrokerEngineVersion": { "index": 4, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The Broker Engine Version for MQ. Currently you can choose between 5.15.6 and 5.15.0 of ACTIVEMQ", "constantName": "org.apache.camel.component.aws2.mq.MQ2Constants#BROKER_ENGINE_VERSION" }, "CamelAwsMQBrokerID": { "index": 5, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The broker id", "constantName": "org.apache.camel.component.aws2.mq.MQ2Constants#BROKER_ID" }, - "CamelAwsMQConfigurationID": { "index": 6, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "software.amazon.awssdk.services.mq.model.ConfigurationId", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "A list of information about the configuration.", "constantName": "org.apache.camel.component.aws2.mq.MQ2Constants#CONFIGURATION_ID" }, + "CamelAwsMQConfigurationID": { "index": 6, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "software.amazon.awssdk.services.mq.model.ConfigurationId", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The configuration of the broker for the updateBroker operation: a ConfigurationId of the AWS SDK, or the id of the configuration as a String.", "constantName": "org.apache.camel.component.aws2.mq.MQ2Constants#CONFIGURATION_ID" }, "CamelAwsMQBrokerDeploymentMode": { "index": 7, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The deployment mode for the broker in the createBroker operation", "constantName": "org.apache.camel.component.aws2.mq.MQ2Constants#BROKER_DEPLOYMENT_MODE" }, "CamelAwsMQBrokerInstanceType": { "index": 8, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The instance type for the MQ machine in the createBroker operation", "constantName": "org.apache.camel.component.aws2.mq.MQ2Constants#BROKER_INSTANCE_TYPE" }, - "CamelAwsMQBrokerUsers": { "index": 9, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "List", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The list of users for MQ", "constantName": "org.apache.camel.component.aws2.mq.MQ2Constants#BROKER_USERS" }, + "CamelAwsMQBrokerUsers": { "index": 9, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "List", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The list of users for MQ in the createBroker operation, as User objects of the AWS SDK", "constantName": "org.apache.camel.component.aws2.mq.MQ2Constants#BROKER_USERS" }, "CamelAwsMQBrokerPubliclyAccessible": { "index": 10, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "Boolean", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "defaultValue": "false", "description": "If the MQ instance must be publicly available or not.", "constantName": "org.apache.camel.component.aws2.mq.MQ2Constants#BROKER_PUBLICLY_ACCESSIBLE" }, "CamelAwsMQNextToken": { "index": 11, "kind": "header", "displayName": "", "group": "listBrokers", "label": "listBrokers", "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.mq.MQ2Constants#NEXT_TOKEN" }, "CamelAwsMQIsTruncated": { "index": 12, "kind": "header", "displayName": "", "group": "listBrokers", "label": "listBrokers", "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.mq.MQ2Constants#IS_TRUNCATED" }, - "CamelAwsMQBrokerArn": { "index": 13, "kind": "header", "displayName": "", "group": "createBroker", "label": "createBroker", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The Amazon Resource Name (ARN) of the broker.", "constantName": "org.apache.camel.component.aws2.mq.MQ2Constants#BROKER_ARN" }, + "CamelAwsMQBrokerArn": { "index": 13, "kind": "header", "displayName": "", "group": "createBroker describeBroker", "label": "createBroker describeBroker", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The Amazon Resource Name (ARN) of the broker.", "constantName": "org.apache.camel.component.aws2.mq.MQ2Constants#BROKER_ARN" }, "CamelAwsMQBrokerState": { "index": 14, "kind": "header", "displayName": "", "group": "describeBroker", "label": "describeBroker", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The state of the broker.", "constantName": "org.apache.camel.component.aws2.mq.MQ2Constants#BROKER_STATE" } }, "properties": { "label": { "index": 0, "kind": "path", "displayName": "Label", "group": "producer", "label": "", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.mq.MQ2Configuration", "configurationField": "configuration", "description": "Logical name" }, - "operation": { "index": 1, "kind": "parameter", "displayName": "Operation", "group": "producer", "label": "", "required": true, "type": "enum", "javaType": "org.apache.camel.component.aws2.mq.MQ2Operations", "enum": [ "listBrokers", "createBroker", "deleteBroker", "rebootBroker", "updateBroker", "describeBroker" ], "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.mq.MQ2Configuration", "configurationField": "configuration", "description": "The operation to perform. It can be listBrokers, createBroker, deleteBroker" }, + "operation": { "index": 1, "kind": "parameter", "displayName": "Operation", "group": "producer", "label": "", "required": true, "type": "enum", "javaType": "org.apache.camel.component.aws2.mq.MQ2Operations", "enum": [ "listBrokers", "createBroker", "deleteBroker", "rebootBroker", "updateBroker", "describeBroker" ], "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.mq.MQ2Configuration", "configurationField": "configuration", "description": "The operation to perform" }, "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.mq.MQ2Configuration", "configurationField": "configuration", "description": "Set the need for overriding the endpoint. This option needs to be used in combination with 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.mq.MQ2Configuration", "configurationField": "configuration", "description": "If we want to use a POJO request as body or not" }, "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-northeast-2", "ap-northeast-1", "me-south-1", "sa-east-1", "ap-east-1", "cn-north-1", "ca-west-1", "us-gov-west-1", "ap-southeast-1", "ap-southeast-2", "us-iso-east-1", "ap-southeast-3", "ap-southeast-4", "us-east-1", "us-east-2", "cn-northwest-1", "us-isob-east-1", "aws-global", "aws-cn-global", "aws-us-gov-global", "aws-iso-global", "aws-iso-b-global" ], "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.mq.MQ2Configuration", "configurationField": "configuration", "description": "The region in which MQ client needs to work. When using this parameter, the configuration will expect the lowercase name of the region (for example, ap-east-1) You'll need to use the name Region.EU_WEST_1.id()" }, diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/aws2-msk.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/aws2-msk.json index 42f2250df7faa..39676b9a4401d 100644 --- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/aws2-msk.json +++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/aws2-msk.json @@ -50,8 +50,8 @@ "headers": { "CamelAwsMSKOperation": { "index": 0, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The operation we want to perform", "constantName": "org.apache.camel.component.aws2.msk.MSK2Constants#OPERATION" }, "CamelAwsMSKClusterFilter": { "index": 1, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The cluster name filter for list operation", "constantName": "org.apache.camel.component.aws2.msk.MSK2Constants#CLUSTERS_FILTER" }, - "CamelAwsMSKClusterName": { "index": 2, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The cluster name for list and create operation", "constantName": "org.apache.camel.component.aws2.msk.MSK2Constants#CLUSTER_NAME" }, - "CamelAwsMSKClusterArn": { "index": 3, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The cluster arn for delete operation", "constantName": "org.apache.camel.component.aws2.msk.MSK2Constants#CLUSTER_ARN" }, + "CamelAwsMSKClusterName": { "index": 2, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The cluster name for the create operation", "constantName": "org.apache.camel.component.aws2.msk.MSK2Constants#CLUSTER_NAME" }, + "CamelAwsMSKClusterArn": { "index": 3, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The cluster ARN for the delete and describe operations. It is set by the create and describe operations.", "constantName": "org.apache.camel.component.aws2.msk.MSK2Constants#CLUSTER_ARN" }, "CamelAwsMSKClusterKafkaVersion": { "index": 4, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The Kafka for the cluster during create operation", "constantName": "org.apache.camel.component.aws2.msk.MSK2Constants#CLUSTER_KAFKA_VERSION" }, "CamelAwsMSKBrokerNodesNumber": { "index": 5, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "Integer", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The number of nodes for the cluster during create operation", "constantName": "org.apache.camel.component.aws2.msk.MSK2Constants#BROKER_NODES_NUMBER" }, "CamelAwsMSKBrokerNodesGroupInfo": { "index": 6, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "software.amazon.awssdk.services.kafka.model.BrokerNodeGroupInfo", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The Broker nodes group info to provide during the create operation", "constantName": "org.apache.camel.component.aws2.msk.MSK2Constants#BROKER_NODES_GROUP_INFO" }, diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/aws2-rekognition.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/aws2-rekognition.json index 9aa551cdd4737..29fff5938e2b4 100644 --- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/aws2-rekognition.json +++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/aws2-rekognition.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.rekognition.Rekognition2Configuration", "deprecated": false, "autowired": false, "secret": false, "description": "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 during starting and cause the route to fail being started. By deferring this startup to be lazy then the startup failure can be handled during routing messages via Camel's routing error handlers. Beware that when the first message is processed then creating and starting the producer may take a little time and prolong the total processing time of the processing." }, - "operation": { "index": 2, "kind": "property", "displayName": "Operation", "group": "producer", "label": "", "required": true, "type": "enum", "javaType": "org.apache.camel.component.aws2.rekognition.Rekognition2Operations", "enum": [ "associateFaces", "compareFaces", "createCollection", "createUser", "deleteCollection", "deleteFaces", "deleteUser", "describeCollection", "detectFaces", "detectLabels", "detectModerationLabels", "detectProtectiveEquipment", "detectText", "disassociateFaces", "getCelebrityInfo", "getMediaAnalysisJob", "indexFaces", "listCollections", "listMediaAnalysisJobs", "listFaces", "listUsers", "recognizeCelebrities", "searchFaces", "searchFacesByImage", "searchUsers", "searchUsersByImage", "startMediaAnalysisJob" ], "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.rekognition.Rekognition2Configuration", "configurationField": "configuration", "description": "The operation to perform. It can be listFunctions, getFunction, createFunction, deleteFunction or invokeFunction" }, + "operation": { "index": 2, "kind": "property", "displayName": "Operation", "group": "producer", "label": "", "required": true, "type": "enum", "javaType": "org.apache.camel.component.aws2.rekognition.Rekognition2Operations", "enum": [ "associateFaces", "compareFaces", "createCollection", "createUser", "deleteCollection", "deleteFaces", "deleteUser", "describeCollection", "detectFaces", "detectLabels", "detectModerationLabels", "detectProtectiveEquipment", "detectText", "disassociateFaces", "getCelebrityInfo", "getMediaAnalysisJob", "indexFaces", "listCollections", "listMediaAnalysisJobs", "listFaces", "listUsers", "recognizeCelebrities", "searchFaces", "searchFacesByImage", "searchUsers", "searchUsersByImage", "startMediaAnalysisJob" ], "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.rekognition.Rekognition2Configuration", "configurationField": "configuration", "description": "The operation to perform" }, "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.rekognition.Rekognition2Configuration", "configurationField": "configuration", "description": "Set the need for overriding the endpoint. This option needs to be used in combination with the uriEndpointOverride option" }, "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.rekognition.Rekognition2Configuration", "configurationField": "configuration", "description": "If we want to use a POJO request as body or not" }, "profileCredentialsName": { "index": 5, "kind": "property", "displayName": "Profile Credentials Name", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.rekognition.Rekognition2Configuration", "configurationField": "configuration", "description": "If using a profile credentials provider, this parameter will set the profile name" }, @@ -53,13 +53,13 @@ "CamelAwsRekognitionUserId": { "index": 2, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The ID of the User", "constantName": "org.apache.camel.component.aws2.rekognition.Rekognition2Constants#USER_ID" }, "CamelAwsRekognitionFaceIds": { "index": 3, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "Collection", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Collection of the Face IDs", "constantName": "org.apache.camel.component.aws2.rekognition.Rekognition2Constants#FACE_IDS" }, "CamelAwsRekognitionUserMatchThreshold": { "index": 4, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "Float", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Minimum user match confidence required for the face to be associated with a UserID that has at least one FaceID already associated", "constantName": "org.apache.camel.component.aws2.rekognition.Rekognition2Constants#USER_MATCH_THRESHOLD" }, - "CamelAwsRekognitionClientRequestToken": { "index": 5, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The ID of the User", "constantName": "org.apache.camel.component.aws2.rekognition.Rekognition2Constants#CLIENT_REQUEST_TOKEN" }, - "CamelAwsRekognitionSourceImage": { "index": 6, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "software.amazon.awssdk.services.rekognition.model.Image", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Source Input Image", "constantName": "org.apache.camel.component.aws2.rekognition.Rekognition2Constants#SOURCE_IMAGE" }, - "CamelAwsRekognitionTargetImage": { "index": 7, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "software.amazon.awssdk.services.rekognition.model.Image", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Target Input Image", "constantName": "org.apache.camel.component.aws2.rekognition.Rekognition2Constants#TARGET_IMAGE" }, + "CamelAwsRekognitionClientRequestToken": { "index": 5, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Idempotency token of the request: a retry of associateFaces, createUser, deleteUser, disassociateFaces or startMediaAnalysisJob with the same token is not processed again", "constantName": "org.apache.camel.component.aws2.rekognition.Rekognition2Constants#CLIENT_REQUEST_TOKEN" }, + "CamelAwsRekognitionSourceImage": { "index": 6, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "software.amazon.awssdk.services.rekognition.model.Image", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Source Input Image of compareFaces", "constantName": "org.apache.camel.component.aws2.rekognition.Rekognition2Constants#SOURCE_IMAGE" }, + "CamelAwsRekognitionTargetImage": { "index": 7, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "software.amazon.awssdk.services.rekognition.model.Image", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Target Input Image of compareFaces", "constantName": "org.apache.camel.component.aws2.rekognition.Rekognition2Constants#TARGET_IMAGE" }, "CamelAwsRekognitionSimilarityThreshold": { "index": 8, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "Float", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Similarity Score Threshold", "constantName": "org.apache.camel.component.aws2.rekognition.Rekognition2Constants#SIMILARITY_THRESHOLD" }, "CamelAwsRekognitionQualityFilter": { "index": 9, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Allows to filter out detected faces that dont meet a required quality bar.", "constantName": "org.apache.camel.component.aws2.rekognition.Rekognition2Constants#QUALITY_FILTER" }, - "CamelAwsRekognitionImage": { "index": 10, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "software.amazon.awssdk.services.rekognition.model.Image", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Input Image", "constantName": "org.apache.camel.component.aws2.rekognition.Rekognition2Constants#IMAGE" }, - "CamelAwsRekognitionFacialAttributes": { "index": 11, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "List", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Facial Attributes to be returned", "constantName": "org.apache.camel.component.aws2.rekognition.Rekognition2Constants#FACIAL_ATTRIBUTES" }, + "CamelAwsRekognitionImage": { "index": 10, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "software.amazon.awssdk.services.rekognition.model.Image", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Input Image of the operations that analyze an image (all but compareFaces, which uses the source and target image headers)", "constantName": "org.apache.camel.component.aws2.rekognition.Rekognition2Constants#IMAGE" }, + "CamelAwsRekognitionFacialAttributes": { "index": 11, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "Collection", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Facial Attributes to be returned by detectFaces: the names of the attributes (such as DEFAULT or ALL), or Attribute values of the AWS SDK", "constantName": "org.apache.camel.component.aws2.rekognition.Rekognition2Constants#FACIAL_ATTRIBUTES" }, "CamelAwsRekognitionMaxLabels": { "index": 12, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "Integer", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Maximum Labels to detect", "constantName": "org.apache.camel.component.aws2.rekognition.Rekognition2Constants#MAX_LABELS" }, "CamelAwsRekognitionMinConfidence": { "index": 13, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "Float", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Minimum confidence level for the labels to return", "constantName": "org.apache.camel.component.aws2.rekognition.Rekognition2Constants#MIN_CONFIDENCE" }, "CamelAwsRekognitionFeatures": { "index": 14, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "Collection", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "A list of the types of analysis to perform", "constantName": "org.apache.camel.component.aws2.rekognition.Rekognition2Constants#FEATURES" }, @@ -76,7 +76,7 @@ "CamelAwsRekognitionOperationsConfig": { "index": 25, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "software.amazon.awssdk.services.rekognition.model.MediaAnalysisOperationsConfig", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Configuration options for the media analysis job to be created", "constantName": "org.apache.camel.component.aws2.rekognition.Rekognition2Constants#OPERATIONS_CONFIG" }, "CamelAwsRekognitionKmsKeyId": { "index": 26, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The identifier for your AWS Key Management Service key (AWS KMS key)", "constantName": "org.apache.camel.component.aws2.rekognition.Rekognition2Constants#KMS_KEY_ID" }, "CamelAwsRekognitionExternalImageId": { "index": 27, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The ID used to identify a user in the collection", "constantName": "org.apache.camel.component.aws2.rekognition.Rekognition2Constants#EXTERNAL_IMAGE_ID" }, - "CamelAwsRekognitionDetectionAttributes": { "index": 28, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "Collection", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "An array of facial attributes to return", "constantName": "org.apache.camel.component.aws2.rekognition.Rekognition2Constants#DETECTION_ATTRIBUTES" }, + "CamelAwsRekognitionDetectionAttributes": { "index": 28, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "Collection", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Facial Attributes to be returned by indexFaces: the names of the attributes (such as DEFAULT or ALL), or Attribute values of the AWS SDK", "constantName": "org.apache.camel.component.aws2.rekognition.Rekognition2Constants#DETECTION_ATTRIBUTES" }, "CamelAwsRekognitionMaxFaces": { "index": 29, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "Integer", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The maximum number of faces to index", "constantName": "org.apache.camel.component.aws2.rekognition.Rekognition2Constants#MAX_FACES" }, "CamelAwsRekognitionMaxResults": { "index": 30, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "Integer", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Maximum number of results to return", "constantName": "org.apache.camel.component.aws2.rekognition.Rekognition2Constants#MAX_RESULTS" }, "CamelAwsRekognitionNextToken": { "index": 31, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Pagination token from the previous response", "constantName": "org.apache.camel.component.aws2.rekognition.Rekognition2Constants#NEXT_TOKEN" }, @@ -86,7 +86,7 @@ }, "properties": { "label": { "index": 0, "kind": "path", "displayName": "Label", "group": "producer", "label": "", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.rekognition.Rekognition2Configuration", "configurationField": "configuration", "description": "Logical name" }, - "operation": { "index": 1, "kind": "parameter", "displayName": "Operation", "group": "producer", "label": "", "required": true, "type": "enum", "javaType": "org.apache.camel.component.aws2.rekognition.Rekognition2Operations", "enum": [ "associateFaces", "compareFaces", "createCollection", "createUser", "deleteCollection", "deleteFaces", "deleteUser", "describeCollection", "detectFaces", "detectLabels", "detectModerationLabels", "detectProtectiveEquipment", "detectText", "disassociateFaces", "getCelebrityInfo", "getMediaAnalysisJob", "indexFaces", "listCollections", "listMediaAnalysisJobs", "listFaces", "listUsers", "recognizeCelebrities", "searchFaces", "searchFacesByImage", "searchUsers", "searchUsersByImage", "startMediaAnalysisJob" ], "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.rekognition.Rekognition2Configuration", "configurationField": "configuration", "description": "The operation to perform. It can be listFunctions, getFunction, createFunction, deleteFunction or invokeFunction" }, + "operation": { "index": 1, "kind": "parameter", "displayName": "Operation", "group": "producer", "label": "", "required": true, "type": "enum", "javaType": "org.apache.camel.component.aws2.rekognition.Rekognition2Operations", "enum": [ "associateFaces", "compareFaces", "createCollection", "createUser", "deleteCollection", "deleteFaces", "deleteUser", "describeCollection", "detectFaces", "detectLabels", "detectModerationLabels", "detectProtectiveEquipment", "detectText", "disassociateFaces", "getCelebrityInfo", "getMediaAnalysisJob", "indexFaces", "listCollections", "listMediaAnalysisJobs", "listFaces", "listUsers", "recognizeCelebrities", "searchFaces", "searchFacesByImage", "searchUsers", "searchUsersByImage", "startMediaAnalysisJob" ], "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.rekognition.Rekognition2Configuration", "configurationField": "configuration", "description": "The operation to perform" }, "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.rekognition.Rekognition2Configuration", "configurationField": "configuration", "description": "Set the need for overriding the endpoint. This option needs to be used in combination with 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.rekognition.Rekognition2Configuration", "configurationField": "configuration", "description": "If we want to use a POJO request as body or not" }, "profileCredentialsName": { "index": 4, "kind": "parameter", "displayName": "Profile Credentials Name", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.rekognition.Rekognition2Configuration", "configurationField": "configuration", "description": "If using a profile credentials provider, this parameter will set the profile name" }, diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/aws-bedrock-agent-component.adoc b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/aws-bedrock-agent-component.adoc index a4ad5e69b8b08..18540aee19280 100644 --- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/aws-bedrock-agent-component.adoc +++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/aws-bedrock-agent-component.adoc @@ -14,8 +14,9 @@ *{component-header}* -The AWS2 Bedrock component supports invoking a supported LLM model from -https://aws.amazon.com/bedrock/[AWS Bedrock] service. +The AWS Bedrock Agent component works with the ingestion jobs of the knowledge bases of the +https://aws.amazon.com/bedrock/[AWS Bedrock] service: an ingestion job syncs a data source into a knowledge base. +The producer starts, lists and gets ingestion jobs, and the consumer polls the state of one ingestion job. Prerequisites @@ -27,7 +28,7 @@ https://aws.amazon.com/bedrock/[Amazon Bedrock]. == URI Format ------------------------- -aws-bedrock-agent-runtime://label[?options] +aws-bedrock-agent://label[?options] ------------------------- You can append query options to the URI in the following format: @@ -42,9 +43,9 @@ include::partial$component-endpoint-headers.adoc[] // component options: END -Required Bedrock component options +Required Bedrock Agent component options -You have to provide the bedrockRuntimeClient in the +You have to provide the bedrockAgentClient in the Registry or your accessKey and secretKey to access the https://aws.amazon.com/bedrock/[Amazon Bedrock] service. @@ -69,6 +70,33 @@ Only one of static, default and profile credentials could be used at the same ti For more information about this you can look at https://docs.aws.amazon.com/sdk-for-java/latest/developer-guide/credentials.html[AWS credentials documentation] +=== Bedrock Agent Producer operations + +The producer supports the following operations, set with the `operation` option or the `CamelAwsBedrockAgentOperation` header: + +- startIngestionJob: starts an ingestion job of the data source `dataSourceId` into the knowledge base `knowledgeBaseId`. +The body is set to the id of the new ingestion job. +- listIngestionJobs: lists the ingestion jobs of the data source `dataSourceId` of the knowledge base `knowledgeBaseId`. +The body is set to the list of `IngestionJobSummary` of the AWS SDK. +- getIngestionJob: gets the ingestion job `ingestionJobId` of the data source `dataSourceId` of the knowledge base `knowledgeBaseId`. +The body is set to the `IngestionJob` of the AWS SDK, the `CamelAwsBedrockAgentIngestionJobStatus` header to its status, +and the `CamelAwsBedrockAgentIngestionJobFailureReasons` header to its failure reasons, if it has any. + +The knowledge base, data source and ingestion job ids are taken from the `knowledgeBaseId`, `dataSourceId` and +`ingestionJobId` options. The `CamelAwsBedrockAgentKnowledgeBaseId`, `CamelAwsBedrockAgentDataSourceId` and +`CamelAwsBedrockAgentIngestionJobId` headers are used only when the option is not set. + +With `pojoRequest=true`, the body is the request of the AWS SDK instead (`StartIngestionJobRequest`, +`ListIngestionJobsRequest` or `GetIngestionJobRequest`), and the ids are taken from it. + +=== Bedrock Agent Consumer + +The consumer polls the ingestion job `ingestionJobId` of the data source `dataSourceId` of the knowledge base +`knowledgeBaseId`; the three options must be set. On every poll it sends an exchange with the `IngestionJob` of the AWS SDK +as the body and the `CamelAwsBedrockAgentIngestionJobStatus` and `CamelAwsBedrockAgentIngestionJobFailureReasons` headers, +as the getIngestionJob operation does. It does so on every poll, also when the job did not change since the previous poll, +so filter on the status to act once the job is done, and set the poll `delay` to how often the job should be checked. + === Example The following route starts an ingestion job, which syncs a data source into a knowledge base: diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/aws-config-component.adoc b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/aws-config-component.adoc index d35e97e732129..d76d83fc7ad4e 100644 --- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/aws-config-component.adoc +++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/aws-config-component.adoc @@ -14,8 +14,26 @@ *{component-header}* -The AWS Config component supports create and delete config rules -https://aws.amazon.com/config/[AWS ECS] clusters instances. +The AWS Config component manages the rules and conformance packs of +https://aws.amazon.com/config/[AWS Config], the AWS service that records the configuration of your +AWS resources and evaluates it against the rules you define. + +The producer supports the following operations, set with the `operation` option or the +`CamelAwsConfigOperation` header: + +- `putConfigRule`: adds or updates a config rule. The `CamelAwsConfigRuleSource` header (the owner of the rule: +`AWS`, `CUSTOM_LAMBDA` or `CUSTOM_POLICY`) is required; `CamelAwsConfigRuleName` and +`CamelAwsConfigRuleSourceIdentifier` set the rule name and the identifier of the rule. +- `removeConfigRule`: deletes the config rule named by the `CamelAwsConfigRuleName` header. +- `describeRuleCompliance`: describes the compliance of the config rules, or of the rule named by the +`CamelAwsConfigRuleName` header. +- `putConformancePack`: adds or updates the conformance pack named by the `CamelAwsConformancePackName` header, +from the template in S3 (`CamelAwsConfigConformacePackS3TemplateURI`) or the template body +(`CamelAwsConfigConformacePackTemplateBody`). +- `removeConformancePack`: deletes the conformance pack named by the `CamelAwsConformancePackName` header. + +With `pojoRequest=true`, each operation takes the AWS SDK request as the message body instead +(such as a `PutConfigRuleRequest` for `putConfigRule`). Prerequisites diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/aws2-ec2-component.adoc b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/aws2-ec2-component.adoc index ae94788a0b318..0dba26ec24f6c 100644 --- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/aws2-ec2-component.adoc +++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/aws2-ec2-component.adoc @@ -155,6 +155,9 @@ YAML:: - startInstances: this operation will start a list of EC2 instances +The `CamelAwsEC2InstancesIds` header is a collection of instance IDs, or a String of IDs separated by commas +(such as `i-1,i-2`), which can be set from XML and YAML routes too. + ._Java-only: sets a collection header for instance IDs_ [source,java] ---- diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/aws2-mq-component.adoc b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/aws2-mq-component.adoc index 6de3d136a9457..977fe924290db 100644 --- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/aws2-mq-component.adoc +++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/aws2-mq-component.adoc @@ -2,7 +2,7 @@ :doctitle: AWS MQ :shortname: aws2-mq :artifactid: camel-aws2-mq -:description: Send messages to AWS MQ. +:description: Manage AWS MQ instances. :since: 3.1 :supportlevel: Stable :tabs-sync-option: @@ -260,5 +260,3 @@ Maven users will need to add the following dependency to their pom.xml. ---- where `$\{camel-version}` must be replaced by the actual version of Camel. - - diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/aws2-msk-component.adoc b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/aws2-msk-component.adoc index 15c5351d88cbb..aa8c0877fdf91 100644 --- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/aws2-msk-component.adoc +++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/aws2-msk-component.adoc @@ -74,7 +74,7 @@ Camel-AWS MSK component provides the following operation on the producer side: === Producer Examples -- listClusters: this operation will list the available MSK Brokers in AWS +- listClusters: this operation will list the MSK Clusters in AWS [tabs] ==== @@ -137,7 +137,7 @@ Java:: [source,java] ---- from("direct:deleteCluster") - .setHeader("CamelAwsMSKClusterArn", constant("test-kafka")) + .setHeader("CamelAwsMSKClusterArn", constant("arn:aws:kafka:us-east-1:123456789012:cluster/test-kafka/abcd1234-ab12-cd34-ef56-abcdef123456-1")) .to("aws2-msk://test?mskClient=#amazonMskClient&operation=deleteCluster"); ---- @@ -148,7 +148,7 @@ XML:: - test-kafka + arn:aws:kafka:us-east-1:123456789012:cluster/test-kafka/abcd1234-ab12-cd34-ef56-abcdef123456-1 @@ -164,7 +164,7 @@ YAML:: steps: - setHeader: name: CamelAwsMSKClusterArn - constant: test-kafka + constant: "arn:aws:kafka:us-east-1:123456789012:cluster/test-kafka/abcd1234-ab12-cd34-ef56-abcdef123456-1" - to: uri: aws2-msk://test parameters: @@ -173,20 +173,6 @@ YAML:: ---- ==== -._Java-only: uses AWS SDK `BrokerNodeGroupInfo` builder_ -[source,java] ----- -from("direct:deleteCluster") - .process(exchange -> { - exchange.getIn().setHeader("CamelAwsMSKClusterName", "test-kafka"); - exchange.getIn().setHeader("CamelAwsMSKClusterKafkaVersion", "2.1.1"); - exchange.getIn().setHeader("CamelAwsMSKBrokerNodesNumber", 2); - exchange.getIn().setHeader("CamelAwsMSKBrokerNodesGroupInfo", - BrokerNodeGroupInfo.builder().build()); - }) - .to("aws2-msk://test?mskClient=#amazonMskClient&operation=deleteCluster"); ----- - === Using a POJO as body Sometimes building an AWS Request can be complex because of multiple options. We introduce the possibility to use a POJO as the body. diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/aws2-rekognition-component.adoc b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/aws2-rekognition-component.adoc index 9253f534c5d2b..b461bd70557b0 100644 --- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/aws2-rekognition-component.adoc +++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/aws2-rekognition-component.adoc @@ -14,11 +14,9 @@ *{component-header}* -The AWS2 Rekognition component supports the following operations on -https://aws.amazon.com/rekognition/[AWS Rekognition]: - -- -- +The AWS2 Rekognition component supports analyzing images (faces, labels, text, celebrities and protective equipment), +managing face collections and users, and running media analysis jobs on +https://aws.amazon.com/rekognition/[AWS Rekognition]. The operations are listed under Usage. Prerequisites @@ -103,12 +101,40 @@ Camel-AWS Rekognition component provides the following operation on the producer - searchUsersByImage - startMediaAnalysisJob +=== The input image + +The operations that analyze an image (detectFaces, detectLabels, detectModerationLabels, detectProtectiveEquipment, +detectText, indexFaces, recognizeCelebrities, searchFacesByImage and searchUsersByImage) read the image from the +`CamelAwsRekognitionImage` header, which holds an `software.amazon.awssdk.services.rekognition.model.Image` of the AWS SDK. +The compareFaces operation reads the two images from the `CamelAwsRekognitionSourceImage` and +`CamelAwsRekognitionTargetImage` headers, which hold an `Image` as well. + +An `Image` holds either the bytes of the image or the location of an object in Amazon S3. +The message body is not used as the image, and neither is a byte array in the image header: build the `Image` from it. + +._Java-only: building the Image from the bytes in the message body_ +[source,java] +---- +from("direct:detectFaces") + .process(exchange -> { + byte[] bytes = exchange.getMessage().getBody(byte[].class); + Image image = Image.builder().bytes(SdkBytes.fromByteArray(bytes)).build(); + exchange.getMessage().setHeader(Rekognition2Constants.IMAGE, image); + }) + .to("aws2-rekognition://test?awsRekognitionClient=#awsRekognitionClient&operation=detectFaces"); +---- + +An image stored in Amazon S3 is given as `Image.builder().s3Object(S3Object.builder().bucket("my-bucket").name("photo.jpg").build()).build()`. + +The `CamelAwsRekognitionFacialAttributes` header of detectFaces and the `CamelAwsRekognitionDetectionAttributes` header of +indexFaces hold the names of the facial attributes to return, such as `DEFAULT` or `ALL`, as a collection of Strings +(or of `Attribute` values of the AWS SDK), or as a comma separated String. == Examples === Producer Examples -- createCollection: this operation will create a collection +- createCollection: this operation will create a collection with the id of the `CamelAwsRekognitionCollectionId` header [tabs] ==== @@ -117,6 +143,7 @@ Java:: [source,java] ---- from("direct:createCollection") + .setHeader(Rekognition2Constants.COLLECTION_ID, constant("my-collection")) .to("aws2-rekognition://test?awsRekognitionClient=#awsRekognitionClient&operation=createCollection"); ---- @@ -126,6 +153,9 @@ XML:: ---- + + my-collection + ---- @@ -138,6 +168,11 @@ YAML:: from: uri: direct:createCollection steps: + - setHeader: + name: CamelAwsRekognitionCollectionId + expression: + constant: + expression: my-collection - to: uri: aws2-rekognition://test parameters: diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/aws2-transcribe-component.adoc b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/aws2-transcribe-component.adoc index bca350fcc2cb4..78b68014ec1c6 100644 --- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/aws2-transcribe-component.adoc +++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/aws2-transcribe-component.adoc @@ -43,7 +43,7 @@ include::partial$component-endpoint-headers.adoc[] Required Transcribe component options -You have to provide the amazonTranscribeClient in the +You have to provide the transcribeClient in the Registry or your accessKey and secretKey to access the https://aws.amazon.com/transcribe/[Amazon Transcribe] service. diff --git a/components/camel-aws/camel-aws-bedrock/src/generated/resources/META-INF/org/apache/camel/component/aws2/bedrock/agent/aws-bedrock-agent.json b/components/camel-aws/camel-aws-bedrock/src/generated/resources/META-INF/org/apache/camel/component/aws2/bedrock/agent/aws-bedrock-agent.json index 59f861132332b..15094023f010e 100644 --- a/components/camel-aws/camel-aws-bedrock/src/generated/resources/META-INF/org/apache/camel/component/aws2/bedrock/agent/aws-bedrock-agent.json +++ b/components/camel-aws/camel-aws-bedrock/src/generated/resources/META-INF/org/apache/camel/component/aws2/bedrock/agent/aws-bedrock-agent.json @@ -25,18 +25,18 @@ }, "componentProperties": { "configuration": { "index": 0, "kind": "property", "displayName": "Configuration", "group": "common", "label": "", "required": false, "type": "object", "javaType": "org.apache.camel.component.aws2.bedrock.agent.BedrockAgentConfiguration", "deprecated": false, "autowired": false, "secret": false, "description": "Component configuration" }, - "dataSourceId": { "index": 1, "kind": "property", "displayName": "Data Source Id", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.bedrock.agent.BedrockAgentConfiguration", "configurationField": "configuration", "description": "Define the Data source Id we are going to use" }, - "knowledgeBaseId": { "index": 2, "kind": "property", "displayName": "Knowledge Base Id", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.bedrock.agent.BedrockAgentConfiguration", "configurationField": "configuration", "description": "Define the Knowledge Base Id we are going to use" }, - "operation": { "index": 3, "kind": "property", "displayName": "Operation", "group": "common", "label": "", "required": true, "type": "enum", "javaType": "org.apache.camel.component.aws2.bedrock.agent.BedrockAgentOperations", "enum": [ "startIngestionJob", "listIngestionJobs", "getIngestionJob" ], "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.bedrock.agent.BedrockAgentConfiguration", "configurationField": "configuration", "description": "The operation to perform" }, - "overrideEndpoint": { "index": 4, "kind": "property", "displayName": "Override Endpoint", "group": "common", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.aws2.bedrock.agent.BedrockAgentConfiguration", "configurationField": "configuration", "description": "Set the need for overriding the endpoint. This option needs to be used in combination with the uriEndpointOverride option" }, - "pojoRequest": { "index": 5, "kind": "property", "displayName": "Pojo Request", "group": "common", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.aws2.bedrock.agent.BedrockAgentConfiguration", "configurationField": "configuration", "description": "If we want to use a POJO request as body or not" }, - "profileCredentialsName": { "index": 6, "kind": "property", "displayName": "Profile Credentials Name", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "false", "configurationClass": "org.apache.camel.component.aws2.bedrock.agent.BedrockAgentConfiguration", "configurationField": "configuration", "description": "If using a profile credentials provider, this parameter will set the profile name" }, - "region": { "index": 7, "kind": "property", "displayName": "Region", "group": "common", "label": "", "required": false, "type": "enum", "javaType": "java.lang.String", "enum": [ "us-east-1", "us-east-2", "us-west-2", "us-gov-west-1", "ap-northeast-1", "ap-northeast-2", "ap-south-1", "ap-southeast-1", "ap-southeast-2", "ca-central-1", "eu-central-1", "eu-central-2", "eu-west-1", "eu-west-2", "eu-west-3", "sa-east-1" ], "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.bedrock.agent.BedrockAgentConfiguration", "configurationField": "configuration", "description": "The region in which Bedrock Agent client needs to work. When using this parameter, the configuration will expect the lowercase name of the region (for example, ap-east-1) You'll need to use the name Region.EU_WEST_1.id()" }, - "uriEndpointOverride": { "index": 8, "kind": "property", "displayName": "Uri Endpoint Override", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.bedrock.agent.BedrockAgentConfiguration", "configurationField": "configuration", "description": "Set the overriding uri endpoint. This option needs to be used in combination with overrideEndpoint option" }, - "useDefaultCredentialsProvider": { "index": 9, "kind": "property", "displayName": "Use Default Credentials Provider", "group": "common", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.aws2.bedrock.agent.BedrockAgentConfiguration", "configurationField": "configuration", "description": "Set whether the Bedrock Agent client should expect to load credentials through a default credentials provider or to expect static credentials to be passed in." }, - "useProfileCredentialsProvider": { "index": 10, "kind": "property", "displayName": "Use Profile Credentials Provider", "group": "common", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.aws2.bedrock.agent.BedrockAgentConfiguration", "configurationField": "configuration", "description": "Set whether the Bedrock Agent client should expect to load credentials through a profile credentials provider." }, - "bridgeErrorHandler": { "index": 11, "kind": "property", "displayName": "Bridge Error Handler", "group": "consumer", "label": "consumer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the likes, will now be processed as a message and handled by the routing Error Handler. Important: This is only possible if the 3rd party component allows Camel to be alerted if an exception was thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not possible. In other situations we may improve the Camel component to hook into the 3rd party component and make this possible for future releases. By default the consumer will use the org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or ERROR level and ignored." }, - "ingestionJobId": { "index": 12, "kind": "property", "displayName": "Ingestion Job Id", "group": "consumer", "label": "consumer", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.bedrock.agent.BedrockAgentConfiguration", "configurationField": "configuration", "description": "Define the Ingestion Job Id we want to track" }, + "dataSourceId": { "index": 1, "kind": "property", "displayName": "Data Source Id", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.bedrock.agent.BedrockAgentConfiguration", "configurationField": "configuration", "description": "Define the Data source Id we are going to use. The consumer and all the operations need it; when set, it is used instead of the CamelAwsBedrockAgentDataSourceId header" }, + "ingestionJobId": { "index": 2, "kind": "property", "displayName": "Ingestion Job Id", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.bedrock.agent.BedrockAgentConfiguration", "configurationField": "configuration", "description": "Define the Ingestion Job Id we want to track. The consumer and the getIngestionJob operation need it; when set, it is used instead of the CamelAwsBedrockAgentIngestionJobId header" }, + "knowledgeBaseId": { "index": 3, "kind": "property", "displayName": "Knowledge Base Id", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.bedrock.agent.BedrockAgentConfiguration", "configurationField": "configuration", "description": "Define the Knowledge Base Id we are going to use. The consumer and all the operations need it; when set, it is used instead of the CamelAwsBedrockAgentKnowledgeBaseId header" }, + "operation": { "index": 4, "kind": "property", "displayName": "Operation", "group": "common", "label": "", "required": true, "type": "enum", "javaType": "org.apache.camel.component.aws2.bedrock.agent.BedrockAgentOperations", "enum": [ "startIngestionJob", "listIngestionJobs", "getIngestionJob" ], "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.bedrock.agent.BedrockAgentConfiguration", "configurationField": "configuration", "description": "The operation to perform. It can be startIngestionJob, listIngestionJobs or getIngestionJob" }, + "overrideEndpoint": { "index": 5, "kind": "property", "displayName": "Override Endpoint", "group": "common", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.aws2.bedrock.agent.BedrockAgentConfiguration", "configurationField": "configuration", "description": "Set the need for overriding the endpoint. This option needs to be used in combination with the uriEndpointOverride option" }, + "pojoRequest": { "index": 6, "kind": "property", "displayName": "Pojo Request", "group": "common", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.aws2.bedrock.agent.BedrockAgentConfiguration", "configurationField": "configuration", "description": "If we want to use a POJO request as body or not" }, + "profileCredentialsName": { "index": 7, "kind": "property", "displayName": "Profile Credentials Name", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "false", "configurationClass": "org.apache.camel.component.aws2.bedrock.agent.BedrockAgentConfiguration", "configurationField": "configuration", "description": "If using a profile credentials provider, this parameter will set the profile name" }, + "region": { "index": 8, "kind": "property", "displayName": "Region", "group": "common", "label": "", "required": false, "type": "enum", "javaType": "java.lang.String", "enum": [ "us-east-1", "us-east-2", "us-west-2", "us-gov-west-1", "ap-northeast-1", "ap-northeast-2", "ap-south-1", "ap-southeast-1", "ap-southeast-2", "ca-central-1", "eu-central-1", "eu-central-2", "eu-west-1", "eu-west-2", "eu-west-3", "sa-east-1" ], "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.bedrock.agent.BedrockAgentConfiguration", "configurationField": "configuration", "description": "The region in which Bedrock Agent client needs to work. When using this parameter, the configuration will expect the lowercase name of the region (for example, ap-east-1) You'll need to use the name Region.EU_WEST_1.id()" }, + "uriEndpointOverride": { "index": 9, "kind": "property", "displayName": "Uri Endpoint Override", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.bedrock.agent.BedrockAgentConfiguration", "configurationField": "configuration", "description": "Set the overriding uri endpoint. This option needs to be used in combination with overrideEndpoint option" }, + "useDefaultCredentialsProvider": { "index": 10, "kind": "property", "displayName": "Use Default Credentials Provider", "group": "common", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.aws2.bedrock.agent.BedrockAgentConfiguration", "configurationField": "configuration", "description": "Set whether the Bedrock Agent client should expect to load credentials through a default credentials provider or to expect static credentials to be passed in." }, + "useProfileCredentialsProvider": { "index": 11, "kind": "property", "displayName": "Use Profile Credentials Provider", "group": "common", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.aws2.bedrock.agent.BedrockAgentConfiguration", "configurationField": "configuration", "description": "Set whether the Bedrock Agent client should expect to load credentials through a profile credentials provider." }, + "bridgeErrorHandler": { "index": 12, "kind": "property", "displayName": "Bridge Error Handler", "group": "consumer", "label": "consumer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the likes, will now be processed as a message and handled by the routing Error Handler. Important: This is only possible if the 3rd party component allows Camel to be alerted if an exception was thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not possible. In other situations we may improve the Camel component to hook into the 3rd party component and make this possible for future releases. By default the consumer will use the org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or ERROR level and ignored." }, "lazyStartProducer": { "index": 13, "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 during starting and cause the route to fail being started. By deferring this startup to be lazy then the startup failure can be handled during routing messages via Camel's routing error handlers. Beware that when the first message is processed then creating and starting the producer may take a little time and prolong the total processing time of the processing." }, "autowiredEnabled": { "index": 14, "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 type, which then gets configured on the component. This can be used for automatic configuring JDBC data sources, JMS connection factories, AWS Clients, etc." }, "bedrockAgentClient": { "index": 15, "kind": "property", "displayName": "Bedrock Agent Client", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "software.amazon.awssdk.services.bedrockagent.BedrockAgentClient", "deprecated": false, "deprecationNote": "", "autowired": true, "secret": false, "configurationClass": "org.apache.camel.component.aws2.bedrock.agent.BedrockAgentConfiguration", "configurationField": "configuration", "description": "To use an existing configured AWS Bedrock Agent client" }, @@ -52,46 +52,26 @@ "useSessionCredentials": { "index": 25, "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.bedrock.agent.BedrockAgentConfiguration", "configurationField": "configuration", "description": "Set whether the Bedrock Agent client should expect to use Session Credentials. This is useful in a situation in which the user needs to assume an IAM role for doing operations in Bedrock." } }, "headers": { - "CamelAwsBedrockAgentRuntimeOperation": { "index": 0, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The operation we want to perform", "constantName": "org.apache.camel.component.aws2.bedrock.agentruntime.BedrockAgentRuntimeConstants#OPERATION" }, - "CamelAwsBedrockAgentRuntimeCitations": { "index": 1, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "When retrieving and generating a response, this header will contain the citations", "constantName": "org.apache.camel.component.aws2.bedrock.agentruntime.BedrockAgentRuntimeConstants#CITATIONS" }, - "CamelAwsBedrockAgentRuntimeSessionId": { "index": 2, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "When retrieving and generating a response, this header will contain he unique identifier of the session. Reuse the same value to continue the same session with the knowledge base.", "constantName": "org.apache.camel.component.aws2.bedrock.agentruntime.BedrockAgentRuntimeConstants#SESSION_ID" }, - "CamelAwsBedrockAgentRuntimeAgentId": { "index": 3, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The unique identifier of the agent to invoke. Overrides the agentId configured on the endpoint.", "constantName": "org.apache.camel.component.aws2.bedrock.agentruntime.BedrockAgentRuntimeConstants#AGENT_ID" }, - "CamelAwsBedrockAgentRuntimeAgentAliasId": { "index": 4, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The unique identifier of the agent alias to invoke. Overrides the agentAliasId configured on the endpoint.", "constantName": "org.apache.camel.component.aws2.bedrock.agentruntime.BedrockAgentRuntimeConstants#AGENT_ALIAS_ID" }, - "CamelAwsBedrockAgentRuntimeAgentEnableTrace": { "index": 5, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "Boolean", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Enables tracing for the agent invocation. When set, overrides the enableTrace option on the endpoint.", "constantName": "org.apache.camel.component.aws2.bedrock.agentruntime.BedrockAgentRuntimeConstants#AGENT_ENABLE_TRACE" }, - "CamelAwsBedrockAgentRuntimeAgentEndSession": { "index": 6, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "Boolean", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Ends the agent session after this invocation.", "constantName": "org.apache.camel.component.aws2.bedrock.agentruntime.BedrockAgentRuntimeConstants#AGENT_END_SESSION" }, - "CamelAwsBedrockAgentRuntimeAgentMemoryId": { "index": 7, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The unique identifier of the agent memory to use across sessions.", "constantName": "org.apache.camel.component.aws2.bedrock.agentruntime.BedrockAgentRuntimeConstants#AGENT_MEMORY_ID" }, - "CamelAwsBedrockAgentRuntimeAgentStreamOutputMode": { "index": 8, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The streaming output mode (complete or chunks) for an agent invocation. When set, overrides the streamOutputMode option on the endpoint.", "constantName": "org.apache.camel.component.aws2.bedrock.agentruntime.BedrockAgentRuntimeConstants#AGENT_STREAM_OUTPUT_MODE" }, - "CamelAwsBedrockAgentRuntimeAgentFoundationModel": { "index": 9, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The foundation model used by an inline agent. Overrides the foundationModel configured on the endpoint.", "constantName": "org.apache.camel.component.aws2.bedrock.agentruntime.BedrockAgentRuntimeConstants#AGENT_FOUNDATION_MODEL" }, - "CamelAwsBedrockAgentRuntimeAgentInstruction": { "index": 10, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The instruction given to an inline agent. Overrides the instruction configured on the endpoint.", "constantName": "org.apache.camel.component.aws2.bedrock.agentruntime.BedrockAgentRuntimeConstants#AGENT_INSTRUCTION" }, - "CamelAwsBedrockAgentRuntimeAgentTraces": { "index": 11, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "java.util.List", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "When invoking an agent with tracing enabled, this header will contain the list of TracePart emitted during the invocation. The elements are TracePart for invokeAgent and InlineAgentTracePart for invokeInlineAgent.", "constantName": "org.apache.camel.component.aws2.bedrock.agentruntime.BedrockAgentRuntimeConstants#AGENT_TRACES" }, - "CamelAwsBedrockAgentRuntimeAgentReturnControl": { "index": 12, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "java.util.List", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "When an agent invocation requires the caller to fulfil an action, this header will contain the list of return-control payloads emitted by the agent. The elements are ReturnControlPayload for invokeAgent and InlineAgentReturnControlPayload for invokeInlineAgent.", "constantName": "org.apache.camel.component.aws2.bedrock.agentruntime.BedrockAgentRuntimeConstants#AGENT_RETURN_CONTROL" }, - "CamelAwsBedrockAgentRuntimeAgentFiles": { "index": 13, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "java.util.List", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "When an agent invocation returns files, this header will contain the files emitted by the agent. The elements are FilePart for invokeAgent and InlineAgentFilePart for invokeInlineAgent.", "constantName": "org.apache.camel.component.aws2.bedrock.agentruntime.BedrockAgentRuntimeConstants#AGENT_FILES" }, - "CamelAwsBedrockAgentRuntimeFlowIdentifier": { "index": 14, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The unique identifier of the flow to invoke. Overrides the flowIdentifier configured on the endpoint.", "constantName": "org.apache.camel.component.aws2.bedrock.agentruntime.BedrockAgentRuntimeConstants#FLOW_IDENTIFIER" }, - "CamelAwsBedrockAgentRuntimeFlowAliasIdentifier": { "index": 15, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The unique identifier of the flow alias to invoke. Overrides the flowAliasIdentifier configured on the endpoint.", "constantName": "org.apache.camel.component.aws2.bedrock.agentruntime.BedrockAgentRuntimeConstants#FLOW_ALIAS_IDENTIFIER" }, - "CamelAwsBedrockAgentRuntimeFlowEnableTrace": { "index": 16, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "Boolean", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Enables tracing for the flow invocation. When set, overrides the enableTrace option on the endpoint.", "constantName": "org.apache.camel.component.aws2.bedrock.agentruntime.BedrockAgentRuntimeConstants#FLOW_ENABLE_TRACE" }, - "CamelAwsBedrockAgentRuntimeFlowExecutionId": { "index": 17, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The unique identifier of an in-progress flow execution to continue. Used for multi-turn flow conversations.", "constantName": "org.apache.camel.component.aws2.bedrock.agentruntime.BedrockAgentRuntimeConstants#FLOW_EXECUTION_ID" }, - "CamelAwsBedrockAgentRuntimeFlowOutputs": { "index": 18, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "java.util.List", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "When invoking a flow, this header will contain the list of FlowOutputEvent emitted by the flow.", "constantName": "org.apache.camel.component.aws2.bedrock.agentruntime.BedrockAgentRuntimeConstants#FLOW_OUTPUTS" }, - "CamelAwsBedrockAgentRuntimeFlowTraces": { "index": 19, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "java.util.List", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "When invoking a flow with tracing enabled, this header will contain the list of FlowTraceEvent emitted during execution.", "constantName": "org.apache.camel.component.aws2.bedrock.agentruntime.BedrockAgentRuntimeConstants#FLOW_TRACES" }, - "CamelAwsBedrockAgentRuntimeFlowCompletionReason": { "index": 20, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "When invoking a flow, this header will contain the reason the flow completed (set when a FlowCompletionEvent is received).", "constantName": "org.apache.camel.component.aws2.bedrock.agentruntime.BedrockAgentRuntimeConstants#FLOW_COMPLETION_REASON" }, - "CamelAwsBedrockAgentRuntimeRetrievedResults": { "index": 21, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "java.util.List", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "When performing a retrieve operation, this header will contain the list of KnowledgeBaseRetrievalResult chunks returned by the knowledge base.", "constantName": "org.apache.camel.component.aws2.bedrock.agentruntime.BedrockAgentRuntimeConstants#RETRIEVED_RESULTS" }, - "CamelAwsBedrockAgentRuntimeNumberOfResults": { "index": 22, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "Integer", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Overrides the maximum number of results returned by the retrieve operation. Must be a positive Integer; when not set the AWS service default is used.", "constantName": "org.apache.camel.component.aws2.bedrock.agentruntime.BedrockAgentRuntimeConstants#NUMBER_OF_RESULTS" }, - "CamelAwsBedrockAgentRuntimeSearchType": { "index": 23, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Overrides the search type used by the retrieve operation. Accepts the AWS SearchType enum (HYBRID, SEMANTIC) or its String representation.", "constantName": "org.apache.camel.component.aws2.bedrock.agentruntime.BedrockAgentRuntimeConstants#OVERRIDE_SEARCH_TYPE" }, - "CamelAwsBedrockAgentRuntimeNextToken": { "index": 24, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Pagination token used by the retrieve operation. Set on the in-message to request the next page; set on the out-message when the response carries one.", "constantName": "org.apache.camel.component.aws2.bedrock.agentruntime.BedrockAgentRuntimeConstants#NEXT_TOKEN" }, - "CamelAwsBedrockAgentRuntimeRetrieveGuardrailAction": { "index": 25, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "When performing a retrieve operation, this header will contain the guardrail action (if any) applied by the knowledge base.", "constantName": "org.apache.camel.component.aws2.bedrock.agentruntime.BedrockAgentRuntimeConstants#RETRIEVE_GUARDRAIL_ACTION" } + "CamelAwsBedrockAgentOperation": { "index": 0, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The operation we want to perform", "constantName": "org.apache.camel.component.aws2.bedrock.agent.BedrockAgentConstants#OPERATION" }, + "CamelAwsBedrockAgentDataSourceId": { "index": 1, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The data source Id of the operation, used when the dataSourceId option is not set", "constantName": "org.apache.camel.component.aws2.bedrock.agent.BedrockAgentConstants#DATASOURCE_ID" }, + "CamelAwsBedrockAgentKnowledgeBaseId": { "index": 2, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The knowledge base Id of the operation, used when the knowledgeBaseId option is not set", "constantName": "org.apache.camel.component.aws2.bedrock.agent.BedrockAgentConstants#KNOWLEDGE_BASE_ID" }, + "CamelAwsBedrockAgentIngestionJobId": { "index": 3, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The id of the ingestion job of the getIngestionJob operation, used when the ingestionJobId option is not set", "constantName": "org.apache.camel.component.aws2.bedrock.agent.BedrockAgentConstants#INGESTION_JOB_ID" }, + "CamelAwsBedrockAgentIngestionJobStatus": { "index": 4, "kind": "header", "displayName": "", "group": "common", "label": "common", "required": false, "javaType": "software.amazon.awssdk.services.bedrockagent.model.IngestionJobStatus", "enum": [ "STARTING", "IN_PROGRESS", "COMPLETE", "FAILED", "STOPPING", "STOPPED", "null" ], "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The status of the ingestion job, set by the consumer and by the getIngestionJob operation", "constantName": "org.apache.camel.component.aws2.bedrock.agent.BedrockAgentConstants#INGESTION_JOB_STATUS" }, + "CamelAwsBedrockAgentIngestionJobFailureReasons": { "index": 5, "kind": "header", "displayName": "", "group": "common", "label": "common", "required": false, "javaType": "List", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The failure reasons of the ingestion job, set by the consumer and by the getIngestionJob operation when the job has failure reasons", "constantName": "org.apache.camel.component.aws2.bedrock.agent.BedrockAgentConstants#INGESTION_JOB_FAILURE_REASONS" } }, "properties": { "label": { "index": 0, "kind": "path", "displayName": "Label", "group": "common", "label": "", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.bedrock.agent.BedrockAgentConfiguration", "configurationField": "configuration", "description": "Logical name" }, - "dataSourceId": { "index": 1, "kind": "parameter", "displayName": "Data Source Id", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.bedrock.agent.BedrockAgentConfiguration", "configurationField": "configuration", "description": "Define the Data source Id we are going to use" }, - "knowledgeBaseId": { "index": 2, "kind": "parameter", "displayName": "Knowledge Base Id", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.bedrock.agent.BedrockAgentConfiguration", "configurationField": "configuration", "description": "Define the Knowledge Base Id we are going to use" }, - "operation": { "index": 3, "kind": "parameter", "displayName": "Operation", "group": "common", "label": "", "required": true, "type": "enum", "javaType": "org.apache.camel.component.aws2.bedrock.agent.BedrockAgentOperations", "enum": [ "startIngestionJob", "listIngestionJobs", "getIngestionJob" ], "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.bedrock.agent.BedrockAgentConfiguration", "configurationField": "configuration", "description": "The operation to perform" }, - "overrideEndpoint": { "index": 4, "kind": "parameter", "displayName": "Override Endpoint", "group": "common", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.aws2.bedrock.agent.BedrockAgentConfiguration", "configurationField": "configuration", "description": "Set the need for overriding the endpoint. This option needs to be used in combination with the uriEndpointOverride option" }, - "pojoRequest": { "index": 5, "kind": "parameter", "displayName": "Pojo Request", "group": "common", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.aws2.bedrock.agent.BedrockAgentConfiguration", "configurationField": "configuration", "description": "If we want to use a POJO request as body or not" }, - "profileCredentialsName": { "index": 6, "kind": "parameter", "displayName": "Profile Credentials Name", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "false", "configurationClass": "org.apache.camel.component.aws2.bedrock.agent.BedrockAgentConfiguration", "configurationField": "configuration", "description": "If using a profile credentials provider, this parameter will set the profile name" }, - "region": { "index": 7, "kind": "parameter", "displayName": "Region", "group": "common", "label": "", "required": false, "type": "enum", "javaType": "java.lang.String", "enum": [ "us-east-1", "us-east-2", "us-west-2", "us-gov-west-1", "ap-northeast-1", "ap-northeast-2", "ap-south-1", "ap-southeast-1", "ap-southeast-2", "ca-central-1", "eu-central-1", "eu-central-2", "eu-west-1", "eu-west-2", "eu-west-3", "sa-east-1" ], "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.bedrock.agent.BedrockAgentConfiguration", "configurationField": "configuration", "description": "The region in which Bedrock Agent client needs to work. When using this parameter, the configuration will expect the lowercase name of the region (for example, ap-east-1) You'll need to use the name Region.EU_WEST_1.id()" }, - "uriEndpointOverride": { "index": 8, "kind": "parameter", "displayName": "Uri Endpoint Override", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.bedrock.agent.BedrockAgentConfiguration", "configurationField": "configuration", "description": "Set the overriding uri endpoint. This option needs to be used in combination with overrideEndpoint option" }, - "useDefaultCredentialsProvider": { "index": 9, "kind": "parameter", "displayName": "Use Default Credentials Provider", "group": "common", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.aws2.bedrock.agent.BedrockAgentConfiguration", "configurationField": "configuration", "description": "Set whether the Bedrock Agent client should expect to load credentials through a default credentials provider or to expect static credentials to be passed in." }, - "useProfileCredentialsProvider": { "index": 10, "kind": "parameter", "displayName": "Use Profile Credentials Provider", "group": "common", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.aws2.bedrock.agent.BedrockAgentConfiguration", "configurationField": "configuration", "description": "Set whether the Bedrock Agent client should expect to load credentials through a profile credentials provider." }, - "ingestionJobId": { "index": 11, "kind": "parameter", "displayName": "Ingestion Job Id", "group": "consumer", "label": "consumer", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.bedrock.agent.BedrockAgentConfiguration", "configurationField": "configuration", "description": "Define the Ingestion Job Id we want to track" }, + "dataSourceId": { "index": 1, "kind": "parameter", "displayName": "Data Source Id", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.bedrock.agent.BedrockAgentConfiguration", "configurationField": "configuration", "description": "Define the Data source Id we are going to use. The consumer and all the operations need it; when set, it is used instead of the CamelAwsBedrockAgentDataSourceId header" }, + "ingestionJobId": { "index": 2, "kind": "parameter", "displayName": "Ingestion Job Id", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.bedrock.agent.BedrockAgentConfiguration", "configurationField": "configuration", "description": "Define the Ingestion Job Id we want to track. The consumer and the getIngestionJob operation need it; when set, it is used instead of the CamelAwsBedrockAgentIngestionJobId header" }, + "knowledgeBaseId": { "index": 3, "kind": "parameter", "displayName": "Knowledge Base Id", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.bedrock.agent.BedrockAgentConfiguration", "configurationField": "configuration", "description": "Define the Knowledge Base Id we are going to use. The consumer and all the operations need it; when set, it is used instead of the CamelAwsBedrockAgentKnowledgeBaseId header" }, + "operation": { "index": 4, "kind": "parameter", "displayName": "Operation", "group": "common", "label": "", "required": true, "type": "enum", "javaType": "org.apache.camel.component.aws2.bedrock.agent.BedrockAgentOperations", "enum": [ "startIngestionJob", "listIngestionJobs", "getIngestionJob" ], "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.bedrock.agent.BedrockAgentConfiguration", "configurationField": "configuration", "description": "The operation to perform. It can be startIngestionJob, listIngestionJobs or getIngestionJob" }, + "overrideEndpoint": { "index": 5, "kind": "parameter", "displayName": "Override Endpoint", "group": "common", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.aws2.bedrock.agent.BedrockAgentConfiguration", "configurationField": "configuration", "description": "Set the need for overriding the endpoint. This option needs to be used in combination with the uriEndpointOverride option" }, + "pojoRequest": { "index": 6, "kind": "parameter", "displayName": "Pojo Request", "group": "common", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.aws2.bedrock.agent.BedrockAgentConfiguration", "configurationField": "configuration", "description": "If we want to use a POJO request as body or not" }, + "profileCredentialsName": { "index": 7, "kind": "parameter", "displayName": "Profile Credentials Name", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "false", "configurationClass": "org.apache.camel.component.aws2.bedrock.agent.BedrockAgentConfiguration", "configurationField": "configuration", "description": "If using a profile credentials provider, this parameter will set the profile name" }, + "region": { "index": 8, "kind": "parameter", "displayName": "Region", "group": "common", "label": "", "required": false, "type": "enum", "javaType": "java.lang.String", "enum": [ "us-east-1", "us-east-2", "us-west-2", "us-gov-west-1", "ap-northeast-1", "ap-northeast-2", "ap-south-1", "ap-southeast-1", "ap-southeast-2", "ca-central-1", "eu-central-1", "eu-central-2", "eu-west-1", "eu-west-2", "eu-west-3", "sa-east-1" ], "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.bedrock.agent.BedrockAgentConfiguration", "configurationField": "configuration", "description": "The region in which Bedrock Agent client needs to work. When using this parameter, the configuration will expect the lowercase name of the region (for example, ap-east-1) You'll need to use the name Region.EU_WEST_1.id()" }, + "uriEndpointOverride": { "index": 9, "kind": "parameter", "displayName": "Uri Endpoint Override", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.bedrock.agent.BedrockAgentConfiguration", "configurationField": "configuration", "description": "Set the overriding uri endpoint. This option needs to be used in combination with overrideEndpoint option" }, + "useDefaultCredentialsProvider": { "index": 10, "kind": "parameter", "displayName": "Use Default Credentials Provider", "group": "common", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.aws2.bedrock.agent.BedrockAgentConfiguration", "configurationField": "configuration", "description": "Set whether the Bedrock Agent client should expect to load credentials through a default credentials provider or to expect static credentials to be passed in." }, + "useProfileCredentialsProvider": { "index": 11, "kind": "parameter", "displayName": "Use Profile Credentials Provider", "group": "common", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.aws2.bedrock.agent.BedrockAgentConfiguration", "configurationField": "configuration", "description": "Set whether the Bedrock Agent client should expect to load credentials through a profile credentials provider." }, "sendEmptyMessageWhenIdle": { "index": 12, "kind": "parameter", "displayName": "Send Empty Message When Idle", "group": "consumer", "label": "consumer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "If the polling consumer did not poll any files, you can enable this option to send an empty message (no body) instead." }, "bridgeErrorHandler": { "index": 13, "kind": "parameter", "displayName": "Bridge Error Handler", "group": "consumer (advanced)", "label": "consumer,advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the likes, will now be processed as a message and handled by the routing Error Handler. Important: This is only possible if the 3rd party component allows Camel to be alerted if an exception was thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not possible. In other situations we may improve the Camel component to hook into the 3rd party component and make this possible for future releases. By default the consumer will use the org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or ERROR level and ignored." }, "exceptionHandler": { "index": 14, "kind": "parameter", "displayName": "Exception Handler", "group": "consumer (advanced)", "label": "consumer,advanced", "required": false, "type": "object", "javaType": "org.apache.camel.spi.ExceptionHandler", "optionalPrefix": "consumer.", "deprecated": false, "autowired": false, "secret": false, "description": "To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is enabled then this option is not in use. By default the consumer will deal with exceptions, that will be logged at WARN or ERROR level and ignored." }, diff --git a/components/camel-aws/camel-aws-bedrock/src/main/docs/aws-bedrock-agent-component.adoc b/components/camel-aws/camel-aws-bedrock/src/main/docs/aws-bedrock-agent-component.adoc index a4ad5e69b8b08..18540aee19280 100644 --- a/components/camel-aws/camel-aws-bedrock/src/main/docs/aws-bedrock-agent-component.adoc +++ b/components/camel-aws/camel-aws-bedrock/src/main/docs/aws-bedrock-agent-component.adoc @@ -14,8 +14,9 @@ *{component-header}* -The AWS2 Bedrock component supports invoking a supported LLM model from -https://aws.amazon.com/bedrock/[AWS Bedrock] service. +The AWS Bedrock Agent component works with the ingestion jobs of the knowledge bases of the +https://aws.amazon.com/bedrock/[AWS Bedrock] service: an ingestion job syncs a data source into a knowledge base. +The producer starts, lists and gets ingestion jobs, and the consumer polls the state of one ingestion job. Prerequisites @@ -27,7 +28,7 @@ https://aws.amazon.com/bedrock/[Amazon Bedrock]. == URI Format ------------------------- -aws-bedrock-agent-runtime://label[?options] +aws-bedrock-agent://label[?options] ------------------------- You can append query options to the URI in the following format: @@ -42,9 +43,9 @@ include::partial$component-endpoint-headers.adoc[] // component options: END -Required Bedrock component options +Required Bedrock Agent component options -You have to provide the bedrockRuntimeClient in the +You have to provide the bedrockAgentClient in the Registry or your accessKey and secretKey to access the https://aws.amazon.com/bedrock/[Amazon Bedrock] service. @@ -69,6 +70,33 @@ Only one of static, default and profile credentials could be used at the same ti For more information about this you can look at https://docs.aws.amazon.com/sdk-for-java/latest/developer-guide/credentials.html[AWS credentials documentation] +=== Bedrock Agent Producer operations + +The producer supports the following operations, set with the `operation` option or the `CamelAwsBedrockAgentOperation` header: + +- startIngestionJob: starts an ingestion job of the data source `dataSourceId` into the knowledge base `knowledgeBaseId`. +The body is set to the id of the new ingestion job. +- listIngestionJobs: lists the ingestion jobs of the data source `dataSourceId` of the knowledge base `knowledgeBaseId`. +The body is set to the list of `IngestionJobSummary` of the AWS SDK. +- getIngestionJob: gets the ingestion job `ingestionJobId` of the data source `dataSourceId` of the knowledge base `knowledgeBaseId`. +The body is set to the `IngestionJob` of the AWS SDK, the `CamelAwsBedrockAgentIngestionJobStatus` header to its status, +and the `CamelAwsBedrockAgentIngestionJobFailureReasons` header to its failure reasons, if it has any. + +The knowledge base, data source and ingestion job ids are taken from the `knowledgeBaseId`, `dataSourceId` and +`ingestionJobId` options. The `CamelAwsBedrockAgentKnowledgeBaseId`, `CamelAwsBedrockAgentDataSourceId` and +`CamelAwsBedrockAgentIngestionJobId` headers are used only when the option is not set. + +With `pojoRequest=true`, the body is the request of the AWS SDK instead (`StartIngestionJobRequest`, +`ListIngestionJobsRequest` or `GetIngestionJobRequest`), and the ids are taken from it. + +=== Bedrock Agent Consumer + +The consumer polls the ingestion job `ingestionJobId` of the data source `dataSourceId` of the knowledge base +`knowledgeBaseId`; the three options must be set. On every poll it sends an exchange with the `IngestionJob` of the AWS SDK +as the body and the `CamelAwsBedrockAgentIngestionJobStatus` and `CamelAwsBedrockAgentIngestionJobFailureReasons` headers, +as the getIngestionJob operation does. It does so on every poll, also when the job did not change since the previous poll, +so filter on the status to act once the job is done, and set the poll `delay` to how often the job should be checked. + === Example The following route starts an ingestion job, which syncs a data source into a knowledge base: diff --git a/components/camel-aws/camel-aws-bedrock/src/main/java/org/apache/camel/component/aws2/bedrock/agent/BedrockAgentConfiguration.java b/components/camel-aws/camel-aws-bedrock/src/main/java/org/apache/camel/component/aws2/bedrock/agent/BedrockAgentConfiguration.java index 634a7aa6158c4..896b9520fb651 100644 --- a/components/camel-aws/camel-aws-bedrock/src/main/java/org/apache/camel/component/aws2/bedrock/agent/BedrockAgentConfiguration.java +++ b/components/camel-aws/camel-aws-bedrock/src/main/java/org/apache/camel/component/aws2/bedrock/agent/BedrockAgentConfiguration.java @@ -47,7 +47,6 @@ public class BedrockAgentConfiguration implements Cloneable, AwsCommonConfigurat @Metadata private String dataSourceId; @UriParam - @Metadata(label = "consumer") private String ingestionJobId; @UriParam @Metadata(required = true) @@ -84,8 +83,8 @@ public BedrockAgentClient getBedrockAgentClient() { /** * To use an existing configured AWS Bedrock Agent client */ - public void setBedrockAgentClient(BedrockAgentClient bedrockRuntimeClient) { - this.bedrockAgentClient = bedrockRuntimeClient; + public void setBedrockAgentClient(BedrockAgentClient bedrockAgentClient) { + this.bedrockAgentClient = bedrockAgentClient; } public String getAccessKey() { @@ -126,7 +125,7 @@ public BedrockAgentOperations getOperation() { } /** - * The operation to perform + * The operation to perform. It can be startIngestionJob, listIngestionJobs or getIngestionJob */ public void setOperation(BedrockAgentOperations operation) { this.operation = operation; @@ -273,7 +272,8 @@ public String getKnowledgeBaseId() { } /** - * Define the Knowledge Base Id we are going to use + * Define the Knowledge Base Id we are going to use. The consumer and all the operations need it; when set, it is + * used instead of the CamelAwsBedrockAgentKnowledgeBaseId header */ public void setKnowledgeBaseId(String knowledgeBaseId) { this.knowledgeBaseId = knowledgeBaseId; @@ -284,7 +284,8 @@ public String getDataSourceId() { } /** - * Define the Data source Id we are going to use + * Define the Data source Id we are going to use. The consumer and all the operations need it; when set, it is used + * instead of the CamelAwsBedrockAgentDataSourceId header */ public void setDataSourceId(String dataSourceId) { this.dataSourceId = dataSourceId; @@ -295,7 +296,8 @@ public String getIngestionJobId() { } /** - * Define the Ingestion Job Id we want to track + * Define the Ingestion Job Id we want to track. The consumer and the getIngestionJob operation need it; when set, + * it is used instead of the CamelAwsBedrockAgentIngestionJobId header */ public void setIngestionJobId(String ingestionJobId) { this.ingestionJobId = ingestionJobId; diff --git a/components/camel-aws/camel-aws-bedrock/src/main/java/org/apache/camel/component/aws2/bedrock/agent/BedrockAgentConstants.java b/components/camel-aws/camel-aws-bedrock/src/main/java/org/apache/camel/component/aws2/bedrock/agent/BedrockAgentConstants.java index 83e52dcc0276e..51206df19d72e 100644 --- a/components/camel-aws/camel-aws-bedrock/src/main/java/org/apache/camel/component/aws2/bedrock/agent/BedrockAgentConstants.java +++ b/components/camel-aws/camel-aws-bedrock/src/main/java/org/apache/camel/component/aws2/bedrock/agent/BedrockAgentConstants.java @@ -19,29 +19,29 @@ import org.apache.camel.spi.Metadata; /** - * Constants used in Camel AWS Bedrock Agent Runtime module SDK v2 + * Constants used in Camel AWS Bedrock Agent module SDK v2 */ public interface BedrockAgentConstants { @Metadata(description = "The operation we want to perform", javaType = "String", label = "producer") String OPERATION = "CamelAwsBedrockAgentOperation"; - @Metadata(description = "The header could be used to set up a data source Id dynamically while performing operation", + @Metadata(description = "The data source Id of the operation, used when the dataSourceId option is not set", javaType = "String", label = "producer") String DATASOURCE_ID = "CamelAwsBedrockAgentDataSourceId"; - @Metadata(description = "The header could be used to set up a knowledge base Id dynamically while performing operation", + @Metadata(description = "The knowledge base Id of the operation, used when the knowledgeBaseId option is not set", javaType = "String", label = "producer") String KNOWLEDGE_BASE_ID = "CamelAwsBedrockAgentKnowledgeBaseId"; - @Metadata(description = "The header contains the id of the ingestion job", + @Metadata(description = "The id of the ingestion job of the getIngestionJob operation, used when the ingestionJobId option is not set", javaType = "String", label = "producer") String INGESTION_JOB_ID = "CamelAwsBedrockAgentIngestionJobId"; - @Metadata(description = "The header contains the status of the ingestion job", - javaType = "String", label = "consumer") + @Metadata(description = "The status of the ingestion job, set by the consumer and by the getIngestionJob operation", + javaType = "software.amazon.awssdk.services.bedrockagent.model.IngestionJobStatus", label = "common") String INGESTION_JOB_STATUS = "CamelAwsBedrockAgentIngestionJobStatus"; - @Metadata(description = "The header contains the failure reasons of the ingestion job", - javaType = "java.util.List", label = "common") + @Metadata(description = "The failure reasons of the ingestion job, set by the consumer and by the getIngestionJob operation when the job has failure reasons", + javaType = "List", label = "common") String INGESTION_JOB_FAILURE_REASONS = "CamelAwsBedrockAgentIngestionJobFailureReasons"; } diff --git a/components/camel-aws/camel-aws-bedrock/src/main/java/org/apache/camel/component/aws2/bedrock/agent/BedrockAgentEndpoint.java b/components/camel-aws/camel-aws-bedrock/src/main/java/org/apache/camel/component/aws2/bedrock/agent/BedrockAgentEndpoint.java index b4a95b266c99e..8e047645a9691 100644 --- a/components/camel-aws/camel-aws-bedrock/src/main/java/org/apache/camel/component/aws2/bedrock/agent/BedrockAgentEndpoint.java +++ b/components/camel-aws/camel-aws-bedrock/src/main/java/org/apache/camel/component/aws2/bedrock/agent/BedrockAgentEndpoint.java @@ -22,7 +22,6 @@ import org.apache.camel.Processor; import org.apache.camel.Producer; import org.apache.camel.component.aws2.bedrock.agent.client.BedrockAgentClientFactory; -import org.apache.camel.component.aws2.bedrock.agentruntime.BedrockAgentRuntimeConstants; import org.apache.camel.spi.EndpointServiceLocation; import org.apache.camel.spi.UriEndpoint; import org.apache.camel.spi.UriParam; @@ -35,7 +34,7 @@ */ @UriEndpoint(firstVersion = "4.5.0", scheme = "aws-bedrock-agent", title = "AWS Bedrock Agent", syntax = "aws-bedrock-agent:label", category = { Category.AI, Category.CLOUD }, - headersClass = BedrockAgentRuntimeConstants.class) + headersClass = BedrockAgentConstants.class) public class BedrockAgentEndpoint extends ScheduledPollEndpoint implements EndpointServiceLocation { private BedrockAgentClient bedrockAgentClient; diff --git a/components/camel-aws/camel-aws-bedrock/src/main/java/org/apache/camel/component/aws2/bedrock/agent/BedrockAgentProducer.java b/components/camel-aws/camel-aws-bedrock/src/main/java/org/apache/camel/component/aws2/bedrock/agent/BedrockAgentProducer.java index 5ccfc6fce2f76..dfcf65c1ca96d 100644 --- a/components/camel-aws/camel-aws-bedrock/src/main/java/org/apache/camel/component/aws2/bedrock/agent/BedrockAgentProducer.java +++ b/components/camel-aws/camel-aws-bedrock/src/main/java/org/apache/camel/component/aws2/bedrock/agent/BedrockAgentProducer.java @@ -66,6 +66,11 @@ private BedrockAgentOperations determineOperation(Exchange exchange) { if (operation == null) { operation = getConfiguration().getOperation(); } + if (operation == null) { + throw new IllegalArgumentException( + "Operation must be specified, either with the operation option or the " + BedrockAgentConstants.OPERATION + + " header"); + } return operation; } diff --git a/components/camel-aws/camel-aws-bedrock/src/test/java/org/apache/camel/component/aws2/bedrock/agent/BedrockAgentProducerTest.java b/components/camel-aws/camel-aws-bedrock/src/test/java/org/apache/camel/component/aws2/bedrock/agent/BedrockAgentProducerTest.java new file mode 100644 index 0000000000000..13471fff7ce5f --- /dev/null +++ b/components/camel-aws/camel-aws-bedrock/src/test/java/org/apache/camel/component/aws2/bedrock/agent/BedrockAgentProducerTest.java @@ -0,0 +1,78 @@ +/* + * 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.bedrock.agent; + +import org.apache.camel.Exchange; +import org.apache.camel.impl.DefaultCamelContext; +import org.apache.camel.support.DefaultExchange; +import org.junit.jupiter.api.Test; +import software.amazon.awssdk.services.bedrockagent.BedrockAgentClient; +import software.amazon.awssdk.services.bedrockagent.model.GetIngestionJobRequest; +import software.amazon.awssdk.services.bedrockagent.model.GetIngestionJobResponse; +import software.amazon.awssdk.services.bedrockagent.model.IngestionJob; +import software.amazon.awssdk.services.bedrockagent.model.IngestionJobStatus; + +import static org.assertj.core.api.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThatThrownBy; +import static org.mockito.ArgumentMatchers.any; +import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.verifyNoInteractions; +import static org.mockito.Mockito.when; + +class BedrockAgentProducerTest { + + private final BedrockAgentClient client = mock(BedrockAgentClient.class); + + private BedrockAgentProducer createProducer(BedrockAgentConfiguration configuration) { + BedrockAgentEndpoint endpoint = mock(BedrockAgentEndpoint.class); + when(endpoint.getConfiguration()).thenReturn(configuration); + when(endpoint.getBedrockAgentClient()).thenReturn(client); + return new BedrockAgentProducer(endpoint); + } + + @Test + void noOperationFailsWithHint() { + BedrockAgentProducer producer = createProducer(new BedrockAgentConfiguration()); + Exchange exchange = new DefaultExchange(new DefaultCamelContext()); + + assertThatThrownBy(() -> producer.process(exchange)) + .isInstanceOf(IllegalArgumentException.class) + .hasMessage( + "Operation must be specified, either with the operation option or the CamelAwsBedrockAgentOperation header"); + verifyNoInteractions(client); + } + + @Test + void getIngestionJobSetsStatusHeaderAsEnum() throws Exception { + when(client.getIngestionJob(any(GetIngestionJobRequest.class))).thenReturn(GetIngestionJobResponse.builder() + .ingestionJob(IngestionJob.builder().ingestionJobId("job-1").status(IngestionJobStatus.COMPLETE).build()) + .build()); + BedrockAgentConfiguration configuration = new BedrockAgentConfiguration(); + configuration.setKnowledgeBaseId("kb-1"); + configuration.setDataSourceId("ds-1"); + configuration.setIngestionJobId("job-1"); + BedrockAgentProducer producer = createProducer(configuration); + Exchange exchange = new DefaultExchange(new DefaultCamelContext()); + exchange.getIn().setHeader(BedrockAgentConstants.OPERATION, BedrockAgentOperations.getIngestionJob); + + producer.process(exchange); + + assertThat(exchange.getMessage().getHeader(BedrockAgentConstants.INGESTION_JOB_STATUS)) + .isEqualTo(IngestionJobStatus.COMPLETE); + assertThat(exchange.getMessage().getBody(IngestionJob.class).ingestionJobId()).isEqualTo("job-1"); + } +} diff --git a/components/camel-aws/camel-aws-config/src/main/docs/aws-config-component.adoc b/components/camel-aws/camel-aws-config/src/main/docs/aws-config-component.adoc index d35e97e732129..d76d83fc7ad4e 100644 --- a/components/camel-aws/camel-aws-config/src/main/docs/aws-config-component.adoc +++ b/components/camel-aws/camel-aws-config/src/main/docs/aws-config-component.adoc @@ -14,8 +14,26 @@ *{component-header}* -The AWS Config component supports create and delete config rules -https://aws.amazon.com/config/[AWS ECS] clusters instances. +The AWS Config component manages the rules and conformance packs of +https://aws.amazon.com/config/[AWS Config], the AWS service that records the configuration of your +AWS resources and evaluates it against the rules you define. + +The producer supports the following operations, set with the `operation` option or the +`CamelAwsConfigOperation` header: + +- `putConfigRule`: adds or updates a config rule. The `CamelAwsConfigRuleSource` header (the owner of the rule: +`AWS`, `CUSTOM_LAMBDA` or `CUSTOM_POLICY`) is required; `CamelAwsConfigRuleName` and +`CamelAwsConfigRuleSourceIdentifier` set the rule name and the identifier of the rule. +- `removeConfigRule`: deletes the config rule named by the `CamelAwsConfigRuleName` header. +- `describeRuleCompliance`: describes the compliance of the config rules, or of the rule named by the +`CamelAwsConfigRuleName` header. +- `putConformancePack`: adds or updates the conformance pack named by the `CamelAwsConformancePackName` header, +from the template in S3 (`CamelAwsConfigConformacePackS3TemplateURI`) or the template body +(`CamelAwsConfigConformacePackTemplateBody`). +- `removeConformancePack`: deletes the conformance pack named by the `CamelAwsConformancePackName` header. + +With `pojoRequest=true`, each operation takes the AWS SDK request as the message body instead +(such as a `PutConfigRuleRequest` for `putConfigRule`). Prerequisites diff --git a/components/camel-aws/camel-aws-config/src/main/java/org/apache/camel/component/aws/config/AWSConfigProducer.java b/components/camel-aws/camel-aws-config/src/main/java/org/apache/camel/component/aws/config/AWSConfigProducer.java index 58958ee1350b1..01b5f230fae60 100644 --- a/components/camel-aws/camel-aws-config/src/main/java/org/apache/camel/component/aws/config/AWSConfigProducer.java +++ b/components/camel-aws/camel-aws-config/src/main/java/org/apache/camel/component/aws/config/AWSConfigProducer.java @@ -77,6 +77,11 @@ private AWSConfigOperations determineOperation(Exchange exchange) { if (ObjectHelper.isEmpty(operation)) { operation = getConfiguration().getOperation(); } + if (ObjectHelper.isEmpty(operation)) { + throw new IllegalArgumentException( + "Operation must be specified, either with the operation option or the " + AWSConfigConstants.OPERATION + + " header"); + } return operation; } @@ -245,7 +250,7 @@ private void putConformancePack(ConfigClient configClient, Exchange exchange) th String conformancePackName = exchange.getIn().getHeader(AWSConfigConstants.CONFORMACE_PACK_NAME, String.class); builder.conformancePackName(conformancePackName); } else { - throw new IllegalArgumentException("Rule Name must be specified"); + throw new IllegalArgumentException("Conformance Pack Name must be specified"); } String conformancePackS3TemplateUri = null; String conformancePackTemplateBody = null; @@ -260,7 +265,8 @@ private void putConformancePack(ConfigClient configClient, Exchange exchange) th builder.templateBody(conformancePackTemplateBody); } if (ObjectHelper.isEmpty(conformancePackS3TemplateUri) && ObjectHelper.isEmpty(conformancePackTemplateBody)) { - throw new IllegalArgumentException("One of Conformace Pack S3 Template URI or Template Body must be specified"); + throw new IllegalArgumentException( + "One of Conformance Pack S3 Template URI or Template Body must be specified"); } PutConformancePackResponse result; try { diff --git a/components/camel-aws/camel-aws-config/src/test/java/org/apache/camel/component/aws/config/AWSConfigProducerTest.java b/components/camel-aws/camel-aws-config/src/test/java/org/apache/camel/component/aws/config/AWSConfigProducerTest.java new file mode 100644 index 0000000000000..ba5e664e2da51 --- /dev/null +++ b/components/camel-aws/camel-aws-config/src/test/java/org/apache/camel/component/aws/config/AWSConfigProducerTest.java @@ -0,0 +1,68 @@ +/* + * 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.aws.config; + +import org.apache.camel.BindToRegistry; +import org.apache.camel.Exchange; +import org.apache.camel.builder.RouteBuilder; +import org.apache.camel.test.junit6.CamelTestSupport; +import org.junit.jupiter.api.Test; +import software.amazon.awssdk.services.config.ConfigClient; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertInstanceOf; +import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.verifyNoInteractions; + +public class AWSConfigProducerTest extends CamelTestSupport { + + @BindToRegistry("configClient") + private final ConfigClient configClient = mock(ConfigClient.class); + + @Test + public void noOperationFailsWithAHint() { + Exchange exchange = template.send("direct:noOperation", e -> e.getIn().setBody("test")); + + assertInstanceOf(IllegalArgumentException.class, exchange.getException()); + assertEquals("Operation must be specified, either with the operation option or the CamelAwsConfigOperation header", + exchange.getException().getMessage()); + verifyNoInteractions(configClient); + } + + @Test + public void putConformancePackWithoutNameAsksForTheConformancePackName() { + Exchange exchange = template.send("direct:putConformancePack", + e -> e.getIn().setHeader(AWSConfigConstants.CONFORMACE_PACK_TEMPLATE_BODY, "Resources: {}")); + + assertInstanceOf(IllegalArgumentException.class, exchange.getException()); + assertEquals("Conformance Pack Name must be specified", exchange.getException().getMessage()); + verifyNoInteractions(configClient); + } + + @Override + protected RouteBuilder createRouteBuilder() { + return new RouteBuilder() { + @Override + public void configure() { + from("direct:noOperation") + .to("aws-config://test?configClient=#configClient"); + from("direct:putConformancePack") + .to("aws-config://test?configClient=#configClient&operation=putConformancePack"); + } + }; + } +} diff --git a/components/camel-aws/camel-aws2-ec2/src/generated/resources/META-INF/org/apache/camel/component/aws2/ec2/aws2-ec2.json b/components/camel-aws/camel-aws2-ec2/src/generated/resources/META-INF/org/apache/camel/component/aws2/ec2/aws2-ec2.json index 9f0d4dd0aeb1a..c166292614a1a 100644 --- a/components/camel-aws/camel-aws2-ec2/src/generated/resources/META-INF/org/apache/camel/component/aws2/ec2/aws2-ec2.json +++ b/components/camel-aws/camel-aws2-ec2/src/generated/resources/META-INF/org/apache/camel/component/aws2/ec2/aws2-ec2.json @@ -49,7 +49,7 @@ }, "headers": { "CamelAwsEC2ImageId": { "index": 0, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "An image ID of the AWS marketplace", "constantName": "org.apache.camel.component.aws2.ec2.AWS2EC2Constants#IMAGE_ID" }, - "CamelAwsEC2InstanceType": { "index": 1, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "software.amazon.awssdk.services.ec2.model.InstanceType", "enum": [ "a1.medium", "a1.large", "a1.xlarge", "a1.2xlarge", "a1.4xlarge", "a1.metal", "c1.medium", "c1.xlarge", "c3.large", "c3.xlarge", "c3.2xlarge", "c3.4xlarge", "c3.8xlarge", "c4.large", "c4.xlarge", "c4.2xlarge", "c4.4xlarge", "c4.8xlarge", "c5.large", "c5.xlarge", "c5.2xlarge", "c5.4xlarge", "c5.9xlarge", "c5.12xlarge", "c5.18xlarge", "c5.24xlarge", "c5.metal", "c5a.large", "c5a.xlarge", "c5a.2xlarge", "c5a.4xlarge", "c5a.8xlarge", "c5a.12xlarge", "c5a.16xlarge", "c5a.24xlarge", "c5ad.large", "c5ad.xlarge", "c5ad.2xlarge", "c5ad.4xlarge", "c5ad.8xlarge", "c5ad.12xlarge", "c5ad.16xlarge", "c5ad.24xlarge", "c5d.large", "c5d.xlarge", "c5d.2xlarge", "c5d.4xlarge", "c5d.9xlarge", "c5d.12xlarge", "c5d.18xlarge", "c5d.24xlarge", "c5d.metal", "c5n.large", "c5n.xlarge", "c5n.2xlarge", "c5n.4xlarge", "c5n.9xlarge", "c5n.18xlarge", "c5n.metal", "c6g.medium", "c6g.large", "c6g.xlarge", "c6g.2xlarge", "c6g.4xlarge", "c6g.8xlarge", "c6g.12xlarge", "c6g.16xlarge", "c6g.metal", "c6gd.medium", "c6gd.large", "c6gd.xlarge", "c6gd.2xlarge", "c6gd.4xlarge", "c6gd.8xlarge", "c6gd.12xlarge", "c6gd.16xlarge", "c6gd.metal", "c6gn.medium", "c6gn.large", "c6gn.xlarge", "c6gn.2xlarge", "c6gn.4xlarge", "c6gn.8xlarge", "c6gn.12xlarge", "c6gn.16xlarge", "c6i.large", "c6i.xlarge", "c6i.2xlarge", "c6i.4xlarge", "c6i.8xlarge", "c6i.12xlarge", "c6i.16xlarge", "c6i.24xlarge", "c6i.32xlarge", "c6i.metal", "cc1.4xlarge", "cc2.8xlarge", "cg1.4xlarge", "cr1.8xlarge", "d2.xlarge", "d2.2xlarge", "d2.4xlarge", "d2.8xlarge", "d3.xlarge", "d3.2xlarge", "d3.4xlarge", "d3.8xlarge", "d3en.xlarge", "d3en.2xlarge", "d3en.4xlarge", "d3en.6xlarge", "d3en.8xlarge", "d3en.12xlarge", "dl1.24xlarge", "f1.2xlarge", "f1.4xlarge", "f1.16xlarge", "g2.2xlarge", "g2.8xlarge", "g3.4xlarge", "g3.8xlarge", "g3.16xlarge", "g3s.xlarge", "g4ad.xlarge", "g4ad.2xlarge", "g4ad.4xlarge", "g4ad.8xlarge", "g4ad.16xlarge", "g4dn.xlarge", "g4dn.2xlarge", "g4dn.4xlarge", "g4dn.8xlarge", "g4dn.12xlarge", "g4dn.16xlarge", "g4dn.metal", "g5.xlarge", "g5.2xlarge", "g5.4xlarge", "g5.8xlarge", "g5.12xlarge", "g5.16xlarge", "g5.24xlarge", "g5.48xlarge", "g5g.xlarge", "g5g.2xlarge", "g5g.4xlarge", "g5g.8xlarge", "g5g.16xlarge", "g5g.metal", "hi1.4xlarge", "hpc6a.48xlarge", "hs1.8xlarge", "h1.2xlarge", "h1.4xlarge", "h1.8xlarge", "h1.16xlarge", "i2.xlarge", "i2.2xlarge", "i2.4xlarge", "i2.8xlarge", "i3.large", "i3.xlarge", "i3.2xlarge", "i3.4xlarge", "i3.8xlarge", "i3.16xlarge", "i3.metal", "i3en.large", "i3en.xlarge", "i3en.2xlarge", "i3en.3xlarge", "i3en.6xlarge", "i3en.12xlarge", "i3en.24xlarge", "i3en.metal", "im4gn.large", "im4gn.xlarge", "im4gn.2xlarge", "im4gn.4xlarge", "im4gn.8xlarge", "im4gn.16xlarge", "inf1.xlarge", "inf1.2xlarge", "inf1.6xlarge", "inf1.24xlarge", "is4gen.medium", "is4gen.large", "is4gen.xlarge", "is4gen.2xlarge", "is4gen.4xlarge", "is4gen.8xlarge", "m1.small", "m1.medium", "m1.large", "m1.xlarge", "m2.xlarge", "m2.2xlarge", "m2.4xlarge", "m3.medium", "m3.large", "m3.xlarge", "m3.2xlarge", "m4.large", "m4.xlarge", "m4.2xlarge", "m4.4xlarge", "m4.10xlarge", "m4.16xlarge", "m5.large", "m5.xlarge", "m5.2xlarge", "m5.4xlarge", "m5.8xlarge", "m5.12xlarge", "m5.16xlarge", "m5.24xlarge", "m5.metal", "m5a.large", "m5a.xlarge", "m5a.2xlarge", "m5a.4xlarge", "m5a.8xlarge", "m5a.12xlarge", "m5a.16xlarge", "m5a.24xlarge", "m5ad.large", "m5ad.xlarge", "m5ad.2xlarge", "m5ad.4xlarge", "m5ad.8xlarge", "m5ad.12xlarge", "m5ad.16xlarge", "m5ad.24xlarge", "m5d.large", "m5d.xlarge", "m5d.2xlarge", "m5d.4xlarge", "m5d.8xlarge", "m5d.12xlarge", "m5d.16xlarge", "m5d.24xlarge", "m5d.metal", "m5dn.large", "m5dn.xlarge", "m5dn.2xlarge", "m5dn.4xlarge", "m5dn.8xlarge", "m5dn.12xlarge", "m5dn.16xlarge", "m5dn.24xlarge", "m5dn.metal", "m5n.large", "m5n.xlarge", "m5n.2xlarge", "m5n.4xlarge", "m5n.8xlarge", "m5n.12xlarge", "m5n.16xlarge", "m5n.24xlarge", "m5n.metal", "m5zn.large", "m5zn.xlarge", "m5zn.2xlarge", "m5zn.3xlarge", "m5zn.6xlarge", "m5zn.12xlarge", "m5zn.metal", "m6a.large", "m6a.xlarge", "m6a.2xlarge", "m6a.4xlarge", "m6a.8xlarge", "m6a.12xlarge", "m6a.16xlarge", "m6a.24xlarge", "m6a.32xlarge", "m6a.48xlarge", "m6g.metal", "m6g.medium", "m6g.large", "m6g.xlarge", "m6g.2xlarge", "m6g.4xlarge", "m6g.8xlarge", "m6g.12xlarge", "m6g.16xlarge", "m6gd.metal", "m6gd.medium", "m6gd.large", "m6gd.xlarge", "m6gd.2xlarge", "m6gd.4xlarge", "m6gd.8xlarge", "m6gd.12xlarge", "m6gd.16xlarge", "m6i.large", "m6i.xlarge", "m6i.2xlarge", "m6i.4xlarge", "m6i.8xlarge", "m6i.12xlarge", "m6i.16xlarge", "m6i.24xlarge", "m6i.32xlarge", "m6i.metal", "mac1.metal", "p2.xlarge", "p2.8xlarge", "p2.16xlarge", "p3.2xlarge", "p3.8xlarge", "p3.16xlarge", "p3dn.24xlarge", "p4d.24xlarge", "r3.large", "r3.xlarge", "r3.2xlarge", "r3.4xlarge", "r3.8xlarge", "r4.large", "r4.xlarge", "r4.2xlarge", "r4.4xlarge", "r4.8xlarge", "r4.16xlarge", "r5.large", "r5.xlarge", "r5.2xlarge", "r5.4xlarge", "r5.8xlarge", "r5.12xlarge", "r5.16xlarge", "r5.24xlarge", "r5.metal", "r5a.large", "r5a.xlarge", "r5a.2xlarge", "r5a.4xlarge", "r5a.8xlarge", "r5a.12xlarge", "r5a.16xlarge", "r5a.24xlarge", "r5ad.large", "r5ad.xlarge", "r5ad.2xlarge", "r5ad.4xlarge", "r5ad.8xlarge", "r5ad.12xlarge", "r5ad.16xlarge", "r5ad.24xlarge", "r5b.large", "r5b.xlarge", "r5b.2xlarge", "r5b.4xlarge", "r5b.8xlarge", "r5b.12xlarge", "r5b.16xlarge", "r5b.24xlarge", "r5b.metal", "r5d.large", "r5d.xlarge", "r5d.2xlarge", "r5d.4xlarge", "r5d.8xlarge", "r5d.12xlarge", "r5d.16xlarge", "r5d.24xlarge", "r5d.metal", "r5dn.large", "r5dn.xlarge", "r5dn.2xlarge", "r5dn.4xlarge", "r5dn.8xlarge", "r5dn.12xlarge", "r5dn.16xlarge", "r5dn.24xlarge", "r5dn.metal", "r5n.large", "r5n.xlarge", "r5n.2xlarge", "r5n.4xlarge", "r5n.8xlarge", "r5n.12xlarge", "r5n.16xlarge", "r5n.24xlarge", "r5n.metal", "r6g.medium", "r6g.large", "r6g.xlarge", "r6g.2xlarge", "r6g.4xlarge", "r6g.8xlarge", "r6g.12xlarge", "r6g.16xlarge", "r6g.metal", "r6gd.medium", "r6gd.large", "r6gd.xlarge", "r6gd.2xlarge", "r6gd.4xlarge", "r6gd.8xlarge", "r6gd.12xlarge", "r6gd.16xlarge", "r6gd.metal", "r6i.large", "r6i.xlarge", "r6i.2xlarge", "r6i.4xlarge", "r6i.8xlarge", "r6i.12xlarge", "r6i.16xlarge", "r6i.24xlarge", "r6i.32xlarge", "r6i.metal", "t1.micro", "t2.nano", "t2.micro", "t2.small", "t2.medium", "t2.large", "t2.xlarge", "t2.2xlarge", "t3.nano", "t3.micro", "t3.small", "t3.medium", "t3.large", "t3.xlarge", "t3.2xlarge", "t3a.nano", "t3a.micro", "t3a.small", "t3a.medium", "t3a.large", "t3a.xlarge", "t3a.2xlarge", "t4g.nano", "t4g.micro", "t4g.small", "t4g.medium", "t4g.large", "t4g.xlarge", "t4g.2xlarge", "u-6tb1.56xlarge", "u-6tb1.112xlarge", "u-9tb1.112xlarge", "u-12tb1.112xlarge", "u-6tb1.metal", "u-9tb1.metal", "u-12tb1.metal", "u-18tb1.metal", "u-24tb1.metal", "vt1.3xlarge", "vt1.6xlarge", "vt1.24xlarge", "x1.16xlarge", "x1.32xlarge", "x1e.xlarge", "x1e.2xlarge", "x1e.4xlarge", "x1e.8xlarge", "x1e.16xlarge", "x1e.32xlarge", "x2iezn.2xlarge", "x2iezn.4xlarge", "x2iezn.6xlarge", "x2iezn.8xlarge", "x2iezn.12xlarge", "x2iezn.metal", "x2gd.medium", "x2gd.large", "x2gd.xlarge", "x2gd.2xlarge", "x2gd.4xlarge", "x2gd.8xlarge", "x2gd.12xlarge", "x2gd.16xlarge", "x2gd.metal", "z1d.large", "z1d.xlarge", "z1d.2xlarge", "z1d.3xlarge", "z1d.6xlarge", "z1d.12xlarge", "z1d.metal", "x2idn.16xlarge", "x2idn.24xlarge", "x2idn.32xlarge", "x2iedn.xlarge", "x2iedn.2xlarge", "x2iedn.4xlarge", "x2iedn.8xlarge", "x2iedn.16xlarge", "x2iedn.24xlarge", "x2iedn.32xlarge", "c6a.large", "c6a.xlarge", "c6a.2xlarge", "c6a.4xlarge", "c6a.8xlarge", "c6a.12xlarge", "c6a.16xlarge", "c6a.24xlarge", "c6a.32xlarge", "c6a.48xlarge", "c6a.metal", "m6a.metal", "i4i.large", "i4i.xlarge", "i4i.2xlarge", "i4i.4xlarge", "i4i.8xlarge", "i4i.16xlarge", "i4i.32xlarge", "i4i.metal", "x2idn.metal", "x2iedn.metal", "c7g.medium", "c7g.large", "c7g.xlarge", "c7g.2xlarge", "c7g.4xlarge", "c7g.8xlarge", "c7g.12xlarge", "c7g.16xlarge", "mac2.metal", "c6id.large", "c6id.xlarge", "c6id.2xlarge", "c6id.4xlarge", "c6id.8xlarge", "c6id.12xlarge", "c6id.16xlarge", "c6id.24xlarge", "c6id.32xlarge", "c6id.metal", "m6id.large", "m6id.xlarge", "m6id.2xlarge", "m6id.4xlarge", "m6id.8xlarge", "m6id.12xlarge", "m6id.16xlarge", "m6id.24xlarge", "m6id.32xlarge", "m6id.metal", "r6id.large", "r6id.xlarge", "r6id.2xlarge", "r6id.4xlarge", "r6id.8xlarge", "r6id.12xlarge", "r6id.16xlarge", "r6id.24xlarge", "r6id.32xlarge", "r6id.metal", "r6a.large", "r6a.xlarge", "r6a.2xlarge", "r6a.4xlarge", "r6a.8xlarge", "r6a.12xlarge", "r6a.16xlarge", "r6a.24xlarge", "r6a.32xlarge", "r6a.48xlarge", "r6a.metal", "p4de.24xlarge", "u-3tb1.56xlarge", "u-18tb1.112xlarge", "u-24tb1.112xlarge", "trn1.2xlarge", "trn1.32xlarge", "hpc6id.32xlarge", "c6in.large", "c6in.xlarge", "c6in.2xlarge", "c6in.4xlarge", "c6in.8xlarge", "c6in.12xlarge", "c6in.16xlarge", "c6in.24xlarge", "c6in.32xlarge", "m6in.large", "m6in.xlarge", "m6in.2xlarge", "m6in.4xlarge", "m6in.8xlarge", "m6in.12xlarge", "m6in.16xlarge", "m6in.24xlarge", "m6in.32xlarge", "m6idn.large", "m6idn.xlarge", "m6idn.2xlarge", "m6idn.4xlarge", "m6idn.8xlarge", "m6idn.12xlarge", "m6idn.16xlarge", "m6idn.24xlarge", "m6idn.32xlarge", "r6in.large", "r6in.xlarge", "r6in.2xlarge", "r6in.4xlarge", "r6in.8xlarge", "r6in.12xlarge", "r6in.16xlarge", "r6in.24xlarge", "r6in.32xlarge", "r6idn.large", "r6idn.xlarge", "r6idn.2xlarge", "r6idn.4xlarge", "r6idn.8xlarge", "r6idn.12xlarge", "r6idn.16xlarge", "r6idn.24xlarge", "r6idn.32xlarge", "c7g.metal", "m7g.medium", "m7g.large", "m7g.xlarge", "m7g.2xlarge", "m7g.4xlarge", "m7g.8xlarge", "m7g.12xlarge", "m7g.16xlarge", "m7g.metal", "r7g.medium", "r7g.large", "r7g.xlarge", "r7g.2xlarge", "r7g.4xlarge", "r7g.8xlarge", "r7g.12xlarge", "r7g.16xlarge", "r7g.metal", "c6in.metal", "m6in.metal", "m6idn.metal", "r6in.metal", "r6idn.metal", "inf2.xlarge", "inf2.8xlarge", "inf2.24xlarge", "inf2.48xlarge", "trn1n.32xlarge", "i4g.large", "i4g.xlarge", "i4g.2xlarge", "i4g.4xlarge", "i4g.8xlarge", "i4g.16xlarge", "hpc7g.4xlarge", "hpc7g.8xlarge", "hpc7g.16xlarge", "c7gn.medium", "c7gn.large", "c7gn.xlarge", "c7gn.2xlarge", "c7gn.4xlarge", "c7gn.8xlarge", "c7gn.12xlarge", "c7gn.16xlarge", "p5.48xlarge", "m7i.large", "m7i.xlarge", "m7i.2xlarge", "m7i.4xlarge", "m7i.8xlarge", "m7i.12xlarge", "m7i.16xlarge", "m7i.24xlarge", "m7i.48xlarge", "m7i-flex.large", "m7i-flex.xlarge", "m7i-flex.2xlarge", "m7i-flex.4xlarge", "m7i-flex.8xlarge", "m7a.medium", "m7a.large", "m7a.xlarge", "m7a.2xlarge", "m7a.4xlarge", "m7a.8xlarge", "m7a.12xlarge", "m7a.16xlarge", "m7a.24xlarge", "m7a.32xlarge", "m7a.48xlarge", "m7a.metal-48xl", "hpc7a.12xlarge", "hpc7a.24xlarge", "hpc7a.48xlarge", "hpc7a.96xlarge", "c7gd.medium", "c7gd.large", "c7gd.xlarge", "c7gd.2xlarge", "c7gd.4xlarge", "c7gd.8xlarge", "c7gd.12xlarge", "c7gd.16xlarge", "m7gd.medium", "m7gd.large", "m7gd.xlarge", "m7gd.2xlarge", "m7gd.4xlarge", "m7gd.8xlarge", "m7gd.12xlarge", "m7gd.16xlarge", "r7gd.medium", "r7gd.large", "r7gd.xlarge", "r7gd.2xlarge", "r7gd.4xlarge", "r7gd.8xlarge", "r7gd.12xlarge", "r7gd.16xlarge", "r7a.medium", "r7a.large", "r7a.xlarge", "r7a.2xlarge", "r7a.4xlarge", "r7a.8xlarge", "r7a.12xlarge", "r7a.16xlarge", "r7a.24xlarge", "r7a.32xlarge", "r7a.48xlarge", "c7i.large", "c7i.xlarge", "c7i.2xlarge", "c7i.4xlarge", "c7i.8xlarge", "c7i.12xlarge", "c7i.16xlarge", "c7i.24xlarge", "c7i.48xlarge", "mac2-m2pro.metal", "r7iz.large", "r7iz.xlarge", "r7iz.2xlarge", "r7iz.4xlarge", "r7iz.8xlarge", "r7iz.12xlarge", "r7iz.16xlarge", "r7iz.32xlarge", "c7a.medium", "c7a.large", "c7a.xlarge", "c7a.2xlarge", "c7a.4xlarge", "c7a.8xlarge", "c7a.12xlarge", "c7a.16xlarge", "c7a.24xlarge", "c7a.32xlarge", "c7a.48xlarge", "c7a.metal-48xl", "r7a.metal-48xl", "r7i.large", "r7i.xlarge", "r7i.2xlarge", "r7i.4xlarge", "r7i.8xlarge", "r7i.12xlarge", "r7i.16xlarge", "r7i.24xlarge", "r7i.48xlarge", "dl2q.24xlarge", "mac2-m2.metal", "i4i.12xlarge", "i4i.24xlarge", "c7i.metal-24xl", "c7i.metal-48xl", "m7i.metal-24xl", "m7i.metal-48xl", "r7i.metal-24xl", "r7i.metal-48xl", "r7iz.metal-16xl", "r7iz.metal-32xl", "c7gd.metal", "m7gd.metal", "r7gd.metal", "g6.xlarge", "g6.2xlarge", "g6.4xlarge", "g6.8xlarge", "g6.12xlarge", "g6.16xlarge", "g6.24xlarge", "g6.48xlarge", "gr6.4xlarge", "gr6.8xlarge", "c7i-flex.large", "c7i-flex.xlarge", "c7i-flex.2xlarge", "c7i-flex.4xlarge", "c7i-flex.8xlarge", "u7i-12tb.224xlarge", "u7in-16tb.224xlarge", "u7in-24tb.224xlarge", "u7in-32tb.224xlarge", "u7ib-12tb.224xlarge", "c7gn.metal", "r8g.medium", "r8g.large", "r8g.xlarge", "r8g.2xlarge", "r8g.4xlarge", "r8g.8xlarge", "r8g.12xlarge", "r8g.16xlarge", "r8g.24xlarge", "r8g.48xlarge", "r8g.metal-24xl", "r8g.metal-48xl", "mac2-m1ultra.metal", "g6e.xlarge", "g6e.2xlarge", "g6e.4xlarge", "g6e.8xlarge", "g6e.12xlarge", "g6e.16xlarge", "g6e.24xlarge", "g6e.48xlarge", "c8g.medium", "c8g.large", "c8g.xlarge", "c8g.2xlarge", "c8g.4xlarge", "c8g.8xlarge", "c8g.12xlarge", "c8g.16xlarge", "c8g.24xlarge", "c8g.48xlarge", "c8g.metal-24xl", "c8g.metal-48xl", "m8g.medium", "m8g.large", "m8g.xlarge", "m8g.2xlarge", "m8g.4xlarge", "m8g.8xlarge", "m8g.12xlarge", "m8g.16xlarge", "m8g.24xlarge", "m8g.48xlarge", "m8g.metal-24xl", "m8g.metal-48xl", "x8g.medium", "x8g.large", "x8g.xlarge", "x8g.2xlarge", "x8g.4xlarge", "x8g.8xlarge", "x8g.12xlarge", "x8g.16xlarge", "x8g.24xlarge", "x8g.48xlarge", "x8g.metal-24xl", "x8g.metal-48xl", "i7ie.large", "i7ie.xlarge", "i7ie.2xlarge", "i7ie.3xlarge", "i7ie.6xlarge", "i7ie.12xlarge", "i7ie.18xlarge", "i7ie.24xlarge", "i7ie.48xlarge", "i8g.large", "i8g.xlarge", "i8g.2xlarge", "i8g.4xlarge", "i8g.8xlarge", "i8g.12xlarge", "i8g.16xlarge", "i8g.24xlarge", "i8g.metal-24xl", "u7i-6tb.112xlarge", "u7i-8tb.112xlarge", "u7inh-32tb.480xlarge", "p5e.48xlarge", "p5en.48xlarge", "f2.12xlarge", "f2.48xlarge", "trn2.48xlarge", "c7i-flex.12xlarge", "c7i-flex.16xlarge", "m7i-flex.12xlarge", "m7i-flex.16xlarge", "i7ie.metal-24xl", "i7ie.metal-48xl", "i8g.48xlarge", "c8gd.medium", "c8gd.large", "c8gd.xlarge", "c8gd.2xlarge", "c8gd.4xlarge", "c8gd.8xlarge", "c8gd.12xlarge", "c8gd.16xlarge", "c8gd.24xlarge", "c8gd.48xlarge", "c8gd.metal-24xl", "c8gd.metal-48xl", "i7i.large", "i7i.xlarge", "i7i.2xlarge", "i7i.4xlarge", "i7i.8xlarge", "i7i.12xlarge", "i7i.16xlarge", "i7i.24xlarge", "i7i.48xlarge", "i7i.metal-24xl", "i7i.metal-48xl", "p6-b200.48xlarge", "m8gd.medium", "m8gd.large", "m8gd.xlarge", "m8gd.2xlarge", "m8gd.4xlarge", "m8gd.8xlarge", "m8gd.12xlarge", "m8gd.16xlarge", "m8gd.24xlarge", "m8gd.48xlarge", "m8gd.metal-24xl", "m8gd.metal-48xl", "r8gd.medium", "r8gd.large", "r8gd.xlarge", "r8gd.2xlarge", "r8gd.4xlarge", "r8gd.8xlarge", "r8gd.12xlarge", "r8gd.16xlarge", "r8gd.24xlarge", "r8gd.48xlarge", "r8gd.metal-24xl", "r8gd.metal-48xl", "c8gn.medium", "c8gn.large", "c8gn.xlarge", "c8gn.2xlarge", "c8gn.4xlarge", "c8gn.8xlarge", "c8gn.12xlarge", "c8gn.16xlarge", "c8gn.24xlarge", "c8gn.48xlarge", "c8gn.metal-24xl", "c8gn.metal-48xl", "f2.6xlarge", "p6e-gb200.36xlarge", "g6f.large", "g6f.xlarge", "g6f.2xlarge", "g6f.4xlarge", "gr6f.4xlarge", "p5.4xlarge", "r8i.large", "r8i.xlarge", "r8i.2xlarge", "r8i.4xlarge", "r8i.8xlarge", "r8i.12xlarge", "r8i.16xlarge", "r8i.24xlarge", "r8i.32xlarge", "r8i.48xlarge", "r8i.96xlarge", "r8i.metal-48xl", "r8i.metal-96xl", "r8i-flex.large", "r8i-flex.xlarge", "r8i-flex.2xlarge", "r8i-flex.4xlarge", "r8i-flex.8xlarge", "r8i-flex.12xlarge", "r8i-flex.16xlarge", "m8i.large", "m8i.xlarge", "m8i.2xlarge", "m8i.4xlarge", "m8i.8xlarge", "m8i.12xlarge", "m8i.16xlarge", "m8i.24xlarge", "m8i.32xlarge", "m8i.48xlarge", "m8i.96xlarge", "m8i.metal-48xl", "m8i.metal-96xl", "m8i-flex.large", "m8i-flex.xlarge", "m8i-flex.2xlarge", "m8i-flex.4xlarge", "m8i-flex.8xlarge", "m8i-flex.12xlarge", "m8i-flex.16xlarge", "i8ge.large", "i8ge.xlarge", "i8ge.2xlarge", "i8ge.3xlarge", "i8ge.6xlarge", "i8ge.12xlarge", "i8ge.18xlarge", "i8ge.24xlarge", "i8ge.48xlarge", "i8ge.metal-24xl", "i8ge.metal-48xl", "mac-m4.metal", "mac-m4pro.metal", "r8gn.medium", "r8gn.large", "r8gn.xlarge", "r8gn.2xlarge", "r8gn.4xlarge", "r8gn.8xlarge", "r8gn.12xlarge", "r8gn.16xlarge", "r8gn.24xlarge", "r8gn.48xlarge", "r8gn.metal-24xl", "r8gn.metal-48xl", "c8i.large", "c8i.xlarge", "c8i.2xlarge", "c8i.4xlarge", "c8i.8xlarge", "c8i.12xlarge", "c8i.16xlarge", "c8i.24xlarge", "c8i.32xlarge", "c8i.48xlarge", "c8i.96xlarge", "c8i.metal-48xl", "c8i.metal-96xl", "c8i-flex.large", "c8i-flex.xlarge", "c8i-flex.2xlarge", "c8i-flex.4xlarge", "c8i-flex.8xlarge", "c8i-flex.12xlarge", "c8i-flex.16xlarge", "r8gb.medium", "r8gb.large", "r8gb.xlarge", "r8gb.2xlarge", "r8gb.4xlarge", "r8gb.8xlarge", "r8gb.12xlarge", "r8gb.16xlarge", "r8gb.24xlarge", "r8gb.metal-24xl", "m8a.medium", "m8a.large", "m8a.xlarge", "m8a.2xlarge", "m8a.4xlarge", "m8a.8xlarge", "m8a.12xlarge", "m8a.16xlarge", "m8a.24xlarge", "m8a.48xlarge", "m8a.metal-24xl", "m8a.metal-48xl", "trn2.3xlarge", "r8a.medium", "r8a.large", "r8a.xlarge", "r8a.2xlarge", "r8a.4xlarge", "r8a.8xlarge", "r8a.12xlarge", "r8a.16xlarge", "r8a.24xlarge", "r8a.48xlarge", "r8a.metal-24xl", "r8a.metal-48xl", "p6-b300.48xlarge", "c8a.medium", "c8a.large", "c8a.xlarge", "c8a.2xlarge", "c8a.4xlarge", "c8a.8xlarge", "c8a.12xlarge", "c8a.16xlarge", "c8a.24xlarge", "c8a.48xlarge", "c8a.metal-24xl", "c8a.metal-48xl", "c8gb.12xlarge", "c8gb.16xlarge", "c8gb.24xlarge", "c8gb.2xlarge", "c8gb.4xlarge", "c8gb.8xlarge", "c8gb.large", "c8gb.medium", "c8gb.metal-24xl", "c8gb.xlarge", "c8gb.48xlarge", "c8gb.metal-48xl", "m8gb.12xlarge", "m8gb.16xlarge", "m8gb.24xlarge", "m8gb.2xlarge", "m8gb.4xlarge", "m8gb.8xlarge", "m8gb.large", "m8gb.medium", "m8gb.xlarge", "m8gb.48xlarge", "m8gb.metal-24xl", "m8gb.metal-48xl", "m8gn.12xlarge", "m8gn.16xlarge", "m8gn.24xlarge", "m8gn.2xlarge", "m8gn.48xlarge", "m8gn.4xlarge", "m8gn.8xlarge", "m8gn.large", "m8gn.medium", "m8gn.xlarge", "m8gn.metal-24xl", "m8gn.metal-48xl", "x8aedz.12xlarge", "x8aedz.24xlarge", "x8aedz.3xlarge", "x8aedz.6xlarge", "x8aedz.large", "x8aedz.metal-12xl", "x8aedz.metal-24xl", "x8aedz.xlarge", "m8azn.medium", "m8azn.large", "m8azn.xlarge", "m8azn.3xlarge", "m8azn.6xlarge", "m8azn.12xlarge", "m8azn.24xlarge", "m8azn.metal-12xl", "m8azn.metal-24xl", "x8i.large", "x8i.xlarge", "x8i.2xlarge", "x8i.4xlarge", "x8i.8xlarge", "x8i.12xlarge", "x8i.16xlarge", "x8i.24xlarge", "x8i.32xlarge", "x8i.48xlarge", "x8i.64xlarge", "x8i.96xlarge", "x8i.metal-48xl", "x8i.metal-96xl", "mac-m4max.metal", "g7e.2xlarge", "g7e.4xlarge", "g7e.8xlarge", "g7e.12xlarge", "g7e.24xlarge", "g7e.48xlarge", "r8id.large", "r8id.xlarge", "r8id.2xlarge", "r8id.4xlarge", "r8id.8xlarge", "r8id.12xlarge", "r8id.16xlarge", "r8id.24xlarge", "r8id.32xlarge", "r8id.48xlarge", "r8id.96xlarge", "r8id.metal-48xl", "r8id.metal-96xl", "c8id.large", "c8id.xlarge", "c8id.2xlarge", "c8id.4xlarge", "c8id.8xlarge", "c8id.12xlarge", "c8id.16xlarge", "c8id.24xlarge", "c8id.32xlarge", "c8id.48xlarge", "c8id.96xlarge", "c8id.metal-48xl", "c8id.metal-96xl", "m8id.large", "m8id.xlarge", "m8id.2xlarge", "m8id.4xlarge", "m8id.8xlarge", "m8id.12xlarge", "m8id.16xlarge", "m8id.24xlarge", "m8id.32xlarge", "m8id.48xlarge", "m8id.96xlarge", "m8id.metal-48xl", "m8id.metal-96xl", "hpc8a.96xlarge", "c8in.large", "c8in.xlarge", "c8in.2xlarge", "c8in.4xlarge", "c8in.8xlarge", "c8in.12xlarge", "c8in.16xlarge", "c8in.24xlarge", "c8in.32xlarge", "c8in.48xlarge", "c8in.96xlarge", "c8in.metal-48xl", "c8in.metal-96xl", "c8ib.large", "c8ib.xlarge", "c8ib.2xlarge", "c8ib.4xlarge", "c8ib.8xlarge", "c8ib.12xlarge", "c8ib.16xlarge", "c8ib.24xlarge", "c8ib.32xlarge", "c8ib.48xlarge", "c8ib.96xlarge", "c8ib.metal-48xl", "c8ib.metal-96xl", "r8in.large", "r8in.xlarge", "r8in.2xlarge", "r8in.4xlarge", "r8in.8xlarge", "r8in.12xlarge", "r8in.16xlarge", "r8in.24xlarge", "r8in.32xlarge", "r8in.48xlarge", "r8in.96xlarge", "r8ib.large", "r8ib.xlarge", "r8ib.2xlarge", "r8ib.4xlarge", "r8ib.8xlarge", "r8ib.12xlarge", "r8ib.16xlarge", "r8ib.24xlarge", "r8ib.32xlarge", "r8ib.48xlarge", "r8ib.96xlarge", "m8in.large", "m8in.xlarge", "m8in.2xlarge", "m8in.4xlarge", "m8in.8xlarge", "m8in.12xlarge", "m8in.16xlarge", "m8in.24xlarge", "m8in.32xlarge", "m8in.48xlarge", "m8in.96xlarge", "m8ib.large", "m8ib.xlarge", "m8ib.2xlarge", "m8ib.4xlarge", "m8ib.8xlarge", "m8ib.12xlarge", "m8ib.16xlarge", "m8ib.24xlarge", "m8ib.32xlarge", "m8ib.48xlarge", "m8ib.96xlarge", "m8ine.large", "m8ine.xlarge", "m8ine.2xlarge", "m8ine.4xlarge", "m8ine.8xlarge", "m8ine.12xlarge", "c8ine.large", "c8ine.xlarge", "c8ine.2xlarge", "c8ine.4xlarge", "c8ine.8xlarge", "c8ine.12xlarge", "m8idn.large", "m8idn.xlarge", "m8idn.2xlarge", "m8idn.4xlarge", "m8idn.8xlarge", "m8idn.12xlarge", "m8idn.16xlarge", "m8idn.24xlarge", "m8idn.32xlarge", "m8idn.48xlarge", "m8idn.96xlarge", "r8idn.large", "r8idn.xlarge", "r8idn.2xlarge", "r8idn.4xlarge", "r8idn.8xlarge", "r8idn.12xlarge", "r8idn.16xlarge", "r8idn.24xlarge", "r8idn.32xlarge", "r8idn.48xlarge", "r8idn.96xlarge", "m8idb.large", "m8idb.xlarge", "m8idb.2xlarge", "m8idb.4xlarge", "m8idb.8xlarge", "m8idb.12xlarge", "m8idb.16xlarge", "m8idb.24xlarge", "m8idb.32xlarge", "m8idb.48xlarge", "m8idb.96xlarge", "r8idb.large", "r8idb.xlarge", "r8idb.2xlarge", "r8idb.4xlarge", "r8idb.8xlarge", "r8idb.12xlarge", "r8idb.16xlarge", "r8idb.24xlarge", "r8idb.32xlarge", "r8idb.48xlarge", "r8idb.96xlarge", "mac-m3ultra.metal", "m9g.large", "m9g.xlarge", "m9g.2xlarge", "m9g.4xlarge", "m9g.8xlarge", "m9g.12xlarge", "m9g.16xlarge", "m9g.24xlarge", "m9g.48xlarge", "m9g.metal-24xl", "m9g.metal-48xl", "m9gd.large", "m9gd.xlarge", "m9gd.2xlarge", "m9gd.4xlarge", "m9gd.8xlarge", "m9gd.12xlarge", "m9gd.16xlarge", "m9gd.24xlarge", "m9gd.48xlarge", "m9gd.metal-24xl", "m9gd.metal-48xl", "r8in.metal-48xl", "r8in.metal-96xl", "r8ib.metal-48xl", "r8ib.metal-96xl", "r8idn.metal-48xl", "r8idn.metal-96xl", "r8idb.metal-48xl", "r8idb.metal-96xl", "m8in.metal-48xl", "m8in.metal-96xl", "m8ib.metal-48xl", "m8ib.metal-96xl", "m8idn.metal-48xl", "m8idn.metal-96xl", "m8idb.metal-48xl", "m8idb.metal-96xl", "g7.2xlarge", "g7.4xlarge", "g7.8xlarge", "g7.12xlarge", "g7.24xlarge", "g7.48xlarge", "c9g.medium", "c9g.large", "c9g.xlarge", "c9g.2xlarge", "c9g.4xlarge", "c9g.8xlarge", "c9g.12xlarge", "c9g.16xlarge", "c9g.24xlarge", "c9g.48xlarge", "c9g.metal-48xl", "c9gd.medium", "c9gd.large", "c9gd.xlarge", "c9gd.2xlarge", "c9gd.4xlarge", "c9gd.8xlarge", "c9gd.12xlarge", "c9gd.16xlarge", "c9gd.24xlarge", "c9gd.48xlarge", "c9gd.metal-48xl", "r9g.medium", "r9g.large", "r9g.xlarge", "r9g.2xlarge", "r9g.4xlarge", "r9g.8xlarge", "r9g.12xlarge", "r9g.16xlarge", "r9g.24xlarge", "r9g.48xlarge", "r9g.metal-48xl", "r9gd.medium", "r9gd.large", "r9gd.xlarge", "r9gd.2xlarge", "r9gd.4xlarge", "r9gd.8xlarge", "r9gd.12xlarge", "r9gd.16xlarge", "r9gd.24xlarge", "r9gd.48xlarge", "r9gd.metal-48xl", "m9g.medium", "t8i.nano", "t8i.micro", "t8i.small", "t8i.medium", "i8g.metal-48xl", "r8gb.48xlarge", "r8gb.metal-48xl", "m9gd.medium", "trn2u.48xlarge", "null" ], "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The instance type we want to create and run", "constantName": "org.apache.camel.component.aws2.ec2.AWS2EC2Constants#INSTANCE_TYPE" }, + "CamelAwsEC2InstanceType": { "index": 1, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "software.amazon.awssdk.services.ec2.model.InstanceType", "enum": [ "a1.medium", "a1.large", "a1.xlarge", "a1.2xlarge", "a1.4xlarge", "a1.metal", "c1.medium", "c1.xlarge", "c3.large", "c3.xlarge", "c3.2xlarge", "c3.4xlarge", "c3.8xlarge", "c4.large", "c4.xlarge", "c4.2xlarge", "c4.4xlarge", "c4.8xlarge", "c5.large", "c5.xlarge", "c5.2xlarge", "c5.4xlarge", "c5.9xlarge", "c5.12xlarge", "c5.18xlarge", "c5.24xlarge", "c5.metal", "c5a.large", "c5a.xlarge", "c5a.2xlarge", "c5a.4xlarge", "c5a.8xlarge", "c5a.12xlarge", "c5a.16xlarge", "c5a.24xlarge", "c5ad.large", "c5ad.xlarge", "c5ad.2xlarge", "c5ad.4xlarge", "c5ad.8xlarge", "c5ad.12xlarge", "c5ad.16xlarge", "c5ad.24xlarge", "c5d.large", "c5d.xlarge", "c5d.2xlarge", "c5d.4xlarge", "c5d.9xlarge", "c5d.12xlarge", "c5d.18xlarge", "c5d.24xlarge", "c5d.metal", "c5n.large", "c5n.xlarge", "c5n.2xlarge", "c5n.4xlarge", "c5n.9xlarge", "c5n.18xlarge", "c5n.metal", "c6g.medium", "c6g.large", "c6g.xlarge", "c6g.2xlarge", "c6g.4xlarge", "c6g.8xlarge", "c6g.12xlarge", "c6g.16xlarge", "c6g.metal", "c6gd.medium", "c6gd.large", "c6gd.xlarge", "c6gd.2xlarge", "c6gd.4xlarge", "c6gd.8xlarge", "c6gd.12xlarge", "c6gd.16xlarge", "c6gd.metal", "c6gn.medium", "c6gn.large", "c6gn.xlarge", "c6gn.2xlarge", "c6gn.4xlarge", "c6gn.8xlarge", "c6gn.12xlarge", "c6gn.16xlarge", "c6i.large", "c6i.xlarge", "c6i.2xlarge", "c6i.4xlarge", "c6i.8xlarge", "c6i.12xlarge", "c6i.16xlarge", "c6i.24xlarge", "c6i.32xlarge", "c6i.metal", "cc1.4xlarge", "cc2.8xlarge", "cg1.4xlarge", "cr1.8xlarge", "d2.xlarge", "d2.2xlarge", "d2.4xlarge", "d2.8xlarge", "d3.xlarge", "d3.2xlarge", "d3.4xlarge", "d3.8xlarge", "d3en.xlarge", "d3en.2xlarge", "d3en.4xlarge", "d3en.6xlarge", "d3en.8xlarge", "d3en.12xlarge", "dl1.24xlarge", "f1.2xlarge", "f1.4xlarge", "f1.16xlarge", "g2.2xlarge", "g2.8xlarge", "g3.4xlarge", "g3.8xlarge", "g3.16xlarge", "g3s.xlarge", "g4ad.xlarge", "g4ad.2xlarge", "g4ad.4xlarge", "g4ad.8xlarge", "g4ad.16xlarge", "g4dn.xlarge", "g4dn.2xlarge", "g4dn.4xlarge", "g4dn.8xlarge", "g4dn.12xlarge", "g4dn.16xlarge", "g4dn.metal", "g5.xlarge", "g5.2xlarge", "g5.4xlarge", "g5.8xlarge", "g5.12xlarge", "g5.16xlarge", "g5.24xlarge", "g5.48xlarge", "g5g.xlarge", "g5g.2xlarge", "g5g.4xlarge", "g5g.8xlarge", "g5g.16xlarge", "g5g.metal", "hi1.4xlarge", "hpc6a.48xlarge", "hs1.8xlarge", "h1.2xlarge", "h1.4xlarge", "h1.8xlarge", "h1.16xlarge", "i2.xlarge", "i2.2xlarge", "i2.4xlarge", "i2.8xlarge", "i3.large", "i3.xlarge", "i3.2xlarge", "i3.4xlarge", "i3.8xlarge", "i3.16xlarge", "i3.metal", "i3en.large", "i3en.xlarge", "i3en.2xlarge", "i3en.3xlarge", "i3en.6xlarge", "i3en.12xlarge", "i3en.24xlarge", "i3en.metal", "im4gn.large", "im4gn.xlarge", "im4gn.2xlarge", "im4gn.4xlarge", "im4gn.8xlarge", "im4gn.16xlarge", "inf1.xlarge", "inf1.2xlarge", "inf1.6xlarge", "inf1.24xlarge", "is4gen.medium", "is4gen.large", "is4gen.xlarge", "is4gen.2xlarge", "is4gen.4xlarge", "is4gen.8xlarge", "m1.small", "m1.medium", "m1.large", "m1.xlarge", "m2.xlarge", "m2.2xlarge", "m2.4xlarge", "m3.medium", "m3.large", "m3.xlarge", "m3.2xlarge", "m4.large", "m4.xlarge", "m4.2xlarge", "m4.4xlarge", "m4.10xlarge", "m4.16xlarge", "m5.large", "m5.xlarge", "m5.2xlarge", "m5.4xlarge", "m5.8xlarge", "m5.12xlarge", "m5.16xlarge", "m5.24xlarge", "m5.metal", "m5a.large", "m5a.xlarge", "m5a.2xlarge", "m5a.4xlarge", "m5a.8xlarge", "m5a.12xlarge", "m5a.16xlarge", "m5a.24xlarge", "m5ad.large", "m5ad.xlarge", "m5ad.2xlarge", "m5ad.4xlarge", "m5ad.8xlarge", "m5ad.12xlarge", "m5ad.16xlarge", "m5ad.24xlarge", "m5d.large", "m5d.xlarge", "m5d.2xlarge", "m5d.4xlarge", "m5d.8xlarge", "m5d.12xlarge", "m5d.16xlarge", "m5d.24xlarge", "m5d.metal", "m5dn.large", "m5dn.xlarge", "m5dn.2xlarge", "m5dn.4xlarge", "m5dn.8xlarge", "m5dn.12xlarge", "m5dn.16xlarge", "m5dn.24xlarge", "m5dn.metal", "m5n.large", "m5n.xlarge", "m5n.2xlarge", "m5n.4xlarge", "m5n.8xlarge", "m5n.12xlarge", "m5n.16xlarge", "m5n.24xlarge", "m5n.metal", "m5zn.large", "m5zn.xlarge", "m5zn.2xlarge", "m5zn.3xlarge", "m5zn.6xlarge", "m5zn.12xlarge", "m5zn.metal", "m6a.large", "m6a.xlarge", "m6a.2xlarge", "m6a.4xlarge", "m6a.8xlarge", "m6a.12xlarge", "m6a.16xlarge", "m6a.24xlarge", "m6a.32xlarge", "m6a.48xlarge", "m6g.metal", "m6g.medium", "m6g.large", "m6g.xlarge", "m6g.2xlarge", "m6g.4xlarge", "m6g.8xlarge", "m6g.12xlarge", "m6g.16xlarge", "m6gd.metal", "m6gd.medium", "m6gd.large", "m6gd.xlarge", "m6gd.2xlarge", "m6gd.4xlarge", "m6gd.8xlarge", "m6gd.12xlarge", "m6gd.16xlarge", "m6i.large", "m6i.xlarge", "m6i.2xlarge", "m6i.4xlarge", "m6i.8xlarge", "m6i.12xlarge", "m6i.16xlarge", "m6i.24xlarge", "m6i.32xlarge", "m6i.metal", "mac1.metal", "p2.xlarge", "p2.8xlarge", "p2.16xlarge", "p3.2xlarge", "p3.8xlarge", "p3.16xlarge", "p3dn.24xlarge", "p4d.24xlarge", "r3.large", "r3.xlarge", "r3.2xlarge", "r3.4xlarge", "r3.8xlarge", "r4.large", "r4.xlarge", "r4.2xlarge", "r4.4xlarge", "r4.8xlarge", "r4.16xlarge", "r5.large", "r5.xlarge", "r5.2xlarge", "r5.4xlarge", "r5.8xlarge", "r5.12xlarge", "r5.16xlarge", "r5.24xlarge", "r5.metal", "r5a.large", "r5a.xlarge", "r5a.2xlarge", "r5a.4xlarge", "r5a.8xlarge", "r5a.12xlarge", "r5a.16xlarge", "r5a.24xlarge", "r5ad.large", "r5ad.xlarge", "r5ad.2xlarge", "r5ad.4xlarge", "r5ad.8xlarge", "r5ad.12xlarge", "r5ad.16xlarge", "r5ad.24xlarge", "r5b.large", "r5b.xlarge", "r5b.2xlarge", "r5b.4xlarge", "r5b.8xlarge", "r5b.12xlarge", "r5b.16xlarge", "r5b.24xlarge", "r5b.metal", "r5d.large", "r5d.xlarge", "r5d.2xlarge", "r5d.4xlarge", "r5d.8xlarge", "r5d.12xlarge", "r5d.16xlarge", "r5d.24xlarge", "r5d.metal", "r5dn.large", "r5dn.xlarge", "r5dn.2xlarge", "r5dn.4xlarge", "r5dn.8xlarge", "r5dn.12xlarge", "r5dn.16xlarge", "r5dn.24xlarge", "r5dn.metal", "r5n.large", "r5n.xlarge", "r5n.2xlarge", "r5n.4xlarge", "r5n.8xlarge", "r5n.12xlarge", "r5n.16xlarge", "r5n.24xlarge", "r5n.metal", "r6g.medium", "r6g.large", "r6g.xlarge", "r6g.2xlarge", "r6g.4xlarge", "r6g.8xlarge", "r6g.12xlarge", "r6g.16xlarge", "r6g.metal", "r6gd.medium", "r6gd.large", "r6gd.xlarge", "r6gd.2xlarge", "r6gd.4xlarge", "r6gd.8xlarge", "r6gd.12xlarge", "r6gd.16xlarge", "r6gd.metal", "r6i.large", "r6i.xlarge", "r6i.2xlarge", "r6i.4xlarge", "r6i.8xlarge", "r6i.12xlarge", "r6i.16xlarge", "r6i.24xlarge", "r6i.32xlarge", "r6i.metal", "t1.micro", "t2.nano", "t2.micro", "t2.small", "t2.medium", "t2.large", "t2.xlarge", "t2.2xlarge", "t3.nano", "t3.micro", "t3.small", "t3.medium", "t3.large", "t3.xlarge", "t3.2xlarge", "t3a.nano", "t3a.micro", "t3a.small", "t3a.medium", "t3a.large", "t3a.xlarge", "t3a.2xlarge", "t4g.nano", "t4g.micro", "t4g.small", "t4g.medium", "t4g.large", "t4g.xlarge", "t4g.2xlarge", "u-6tb1.56xlarge", "u-6tb1.112xlarge", "u-9tb1.112xlarge", "u-12tb1.112xlarge", "u-6tb1.metal", "u-9tb1.metal", "u-12tb1.metal", "u-18tb1.metal", "u-24tb1.metal", "vt1.3xlarge", "vt1.6xlarge", "vt1.24xlarge", "x1.16xlarge", "x1.32xlarge", "x1e.xlarge", "x1e.2xlarge", "x1e.4xlarge", "x1e.8xlarge", "x1e.16xlarge", "x1e.32xlarge", "x2iezn.2xlarge", "x2iezn.4xlarge", "x2iezn.6xlarge", "x2iezn.8xlarge", "x2iezn.12xlarge", "x2iezn.metal", "x2gd.medium", "x2gd.large", "x2gd.xlarge", "x2gd.2xlarge", "x2gd.4xlarge", "x2gd.8xlarge", "x2gd.12xlarge", "x2gd.16xlarge", "x2gd.metal", "z1d.large", "z1d.xlarge", "z1d.2xlarge", "z1d.3xlarge", "z1d.6xlarge", "z1d.12xlarge", "z1d.metal", "x2idn.16xlarge", "x2idn.24xlarge", "x2idn.32xlarge", "x2iedn.xlarge", "x2iedn.2xlarge", "x2iedn.4xlarge", "x2iedn.8xlarge", "x2iedn.16xlarge", "x2iedn.24xlarge", "x2iedn.32xlarge", "c6a.large", "c6a.xlarge", "c6a.2xlarge", "c6a.4xlarge", "c6a.8xlarge", "c6a.12xlarge", "c6a.16xlarge", "c6a.24xlarge", "c6a.32xlarge", "c6a.48xlarge", "c6a.metal", "m6a.metal", "i4i.large", "i4i.xlarge", "i4i.2xlarge", "i4i.4xlarge", "i4i.8xlarge", "i4i.16xlarge", "i4i.32xlarge", "i4i.metal", "x2idn.metal", "x2iedn.metal", "c7g.medium", "c7g.large", "c7g.xlarge", "c7g.2xlarge", "c7g.4xlarge", "c7g.8xlarge", "c7g.12xlarge", "c7g.16xlarge", "mac2.metal", "c6id.large", "c6id.xlarge", "c6id.2xlarge", "c6id.4xlarge", "c6id.8xlarge", "c6id.12xlarge", "c6id.16xlarge", "c6id.24xlarge", "c6id.32xlarge", "c6id.metal", "m6id.large", "m6id.xlarge", "m6id.2xlarge", "m6id.4xlarge", "m6id.8xlarge", "m6id.12xlarge", "m6id.16xlarge", "m6id.24xlarge", "m6id.32xlarge", "m6id.metal", "r6id.large", "r6id.xlarge", "r6id.2xlarge", "r6id.4xlarge", "r6id.8xlarge", "r6id.12xlarge", "r6id.16xlarge", "r6id.24xlarge", "r6id.32xlarge", "r6id.metal", "r6a.large", "r6a.xlarge", "r6a.2xlarge", "r6a.4xlarge", "r6a.8xlarge", "r6a.12xlarge", "r6a.16xlarge", "r6a.24xlarge", "r6a.32xlarge", "r6a.48xlarge", "r6a.metal", "p4de.24xlarge", "u-3tb1.56xlarge", "u-18tb1.112xlarge", "u-24tb1.112xlarge", "trn1.2xlarge", "trn1.32xlarge", "hpc6id.32xlarge", "c6in.large", "c6in.xlarge", "c6in.2xlarge", "c6in.4xlarge", "c6in.8xlarge", "c6in.12xlarge", "c6in.16xlarge", "c6in.24xlarge", "c6in.32xlarge", "m6in.large", "m6in.xlarge", "m6in.2xlarge", "m6in.4xlarge", "m6in.8xlarge", "m6in.12xlarge", "m6in.16xlarge", "m6in.24xlarge", "m6in.32xlarge", "m6idn.large", "m6idn.xlarge", "m6idn.2xlarge", "m6idn.4xlarge", "m6idn.8xlarge", "m6idn.12xlarge", "m6idn.16xlarge", "m6idn.24xlarge", "m6idn.32xlarge", "r6in.large", "r6in.xlarge", "r6in.2xlarge", "r6in.4xlarge", "r6in.8xlarge", "r6in.12xlarge", "r6in.16xlarge", "r6in.24xlarge", "r6in.32xlarge", "r6idn.large", "r6idn.xlarge", "r6idn.2xlarge", "r6idn.4xlarge", "r6idn.8xlarge", "r6idn.12xlarge", "r6idn.16xlarge", "r6idn.24xlarge", "r6idn.32xlarge", "c7g.metal", "m7g.medium", "m7g.large", "m7g.xlarge", "m7g.2xlarge", "m7g.4xlarge", "m7g.8xlarge", "m7g.12xlarge", "m7g.16xlarge", "m7g.metal", "r7g.medium", "r7g.large", "r7g.xlarge", "r7g.2xlarge", "r7g.4xlarge", "r7g.8xlarge", "r7g.12xlarge", "r7g.16xlarge", "r7g.metal", "c6in.metal", "m6in.metal", "m6idn.metal", "r6in.metal", "r6idn.metal", "inf2.xlarge", "inf2.8xlarge", "inf2.24xlarge", "inf2.48xlarge", "trn1n.32xlarge", "i4g.large", "i4g.xlarge", "i4g.2xlarge", "i4g.4xlarge", "i4g.8xlarge", "i4g.16xlarge", "hpc7g.4xlarge", "hpc7g.8xlarge", "hpc7g.16xlarge", "c7gn.medium", "c7gn.large", "c7gn.xlarge", "c7gn.2xlarge", "c7gn.4xlarge", "c7gn.8xlarge", "c7gn.12xlarge", "c7gn.16xlarge", "p5.48xlarge", "m7i.large", "m7i.xlarge", "m7i.2xlarge", "m7i.4xlarge", "m7i.8xlarge", "m7i.12xlarge", "m7i.16xlarge", "m7i.24xlarge", "m7i.48xlarge", "m7i-flex.large", "m7i-flex.xlarge", "m7i-flex.2xlarge", "m7i-flex.4xlarge", "m7i-flex.8xlarge", "m7a.medium", "m7a.large", "m7a.xlarge", "m7a.2xlarge", "m7a.4xlarge", "m7a.8xlarge", "m7a.12xlarge", "m7a.16xlarge", "m7a.24xlarge", "m7a.32xlarge", "m7a.48xlarge", "m7a.metal-48xl", "hpc7a.12xlarge", "hpc7a.24xlarge", "hpc7a.48xlarge", "hpc7a.96xlarge", "c7gd.medium", "c7gd.large", "c7gd.xlarge", "c7gd.2xlarge", "c7gd.4xlarge", "c7gd.8xlarge", "c7gd.12xlarge", "c7gd.16xlarge", "m7gd.medium", "m7gd.large", "m7gd.xlarge", "m7gd.2xlarge", "m7gd.4xlarge", "m7gd.8xlarge", "m7gd.12xlarge", "m7gd.16xlarge", "r7gd.medium", "r7gd.large", "r7gd.xlarge", "r7gd.2xlarge", "r7gd.4xlarge", "r7gd.8xlarge", "r7gd.12xlarge", "r7gd.16xlarge", "r7a.medium", "r7a.large", "r7a.xlarge", "r7a.2xlarge", "r7a.4xlarge", "r7a.8xlarge", "r7a.12xlarge", "r7a.16xlarge", "r7a.24xlarge", "r7a.32xlarge", "r7a.48xlarge", "c7i.large", "c7i.xlarge", "c7i.2xlarge", "c7i.4xlarge", "c7i.8xlarge", "c7i.12xlarge", "c7i.16xlarge", "c7i.24xlarge", "c7i.48xlarge", "mac2-m2pro.metal", "r7iz.large", "r7iz.xlarge", "r7iz.2xlarge", "r7iz.4xlarge", "r7iz.8xlarge", "r7iz.12xlarge", "r7iz.16xlarge", "r7iz.32xlarge", "c7a.medium", "c7a.large", "c7a.xlarge", "c7a.2xlarge", "c7a.4xlarge", "c7a.8xlarge", "c7a.12xlarge", "c7a.16xlarge", "c7a.24xlarge", "c7a.32xlarge", "c7a.48xlarge", "c7a.metal-48xl", "r7a.metal-48xl", "r7i.large", "r7i.xlarge", "r7i.2xlarge", "r7i.4xlarge", "r7i.8xlarge", "r7i.12xlarge", "r7i.16xlarge", "r7i.24xlarge", "r7i.48xlarge", "dl2q.24xlarge", "mac2-m2.metal", "i4i.12xlarge", "i4i.24xlarge", "c7i.metal-24xl", "c7i.metal-48xl", "m7i.metal-24xl", "m7i.metal-48xl", "r7i.metal-24xl", "r7i.metal-48xl", "r7iz.metal-16xl", "r7iz.metal-32xl", "c7gd.metal", "m7gd.metal", "r7gd.metal", "g6.xlarge", "g6.2xlarge", "g6.4xlarge", "g6.8xlarge", "g6.12xlarge", "g6.16xlarge", "g6.24xlarge", "g6.48xlarge", "gr6.4xlarge", "gr6.8xlarge", "c7i-flex.large", "c7i-flex.xlarge", "c7i-flex.2xlarge", "c7i-flex.4xlarge", "c7i-flex.8xlarge", "u7i-12tb.224xlarge", "u7in-16tb.224xlarge", "u7in-24tb.224xlarge", "u7in-32tb.224xlarge", "u7ib-12tb.224xlarge", "c7gn.metal", "r8g.medium", "r8g.large", "r8g.xlarge", "r8g.2xlarge", "r8g.4xlarge", "r8g.8xlarge", "r8g.12xlarge", "r8g.16xlarge", "r8g.24xlarge", "r8g.48xlarge", "r8g.metal-24xl", "r8g.metal-48xl", "mac2-m1ultra.metal", "g6e.xlarge", "g6e.2xlarge", "g6e.4xlarge", "g6e.8xlarge", "g6e.12xlarge", "g6e.16xlarge", "g6e.24xlarge", "g6e.48xlarge", "c8g.medium", "c8g.large", "c8g.xlarge", "c8g.2xlarge", "c8g.4xlarge", "c8g.8xlarge", "c8g.12xlarge", "c8g.16xlarge", "c8g.24xlarge", "c8g.48xlarge", "c8g.metal-24xl", "c8g.metal-48xl", "m8g.medium", "m8g.large", "m8g.xlarge", "m8g.2xlarge", "m8g.4xlarge", "m8g.8xlarge", "m8g.12xlarge", "m8g.16xlarge", "m8g.24xlarge", "m8g.48xlarge", "m8g.metal-24xl", "m8g.metal-48xl", "x8g.medium", "x8g.large", "x8g.xlarge", "x8g.2xlarge", "x8g.4xlarge", "x8g.8xlarge", "x8g.12xlarge", "x8g.16xlarge", "x8g.24xlarge", "x8g.48xlarge", "x8g.metal-24xl", "x8g.metal-48xl", "i7ie.large", "i7ie.xlarge", "i7ie.2xlarge", "i7ie.3xlarge", "i7ie.6xlarge", "i7ie.12xlarge", "i7ie.18xlarge", "i7ie.24xlarge", "i7ie.48xlarge", "i8g.large", "i8g.xlarge", "i8g.2xlarge", "i8g.4xlarge", "i8g.8xlarge", "i8g.12xlarge", "i8g.16xlarge", "i8g.24xlarge", "i8g.metal-24xl", "u7i-6tb.112xlarge", "u7i-8tb.112xlarge", "u7inh-32tb.480xlarge", "p5e.48xlarge", "p5en.48xlarge", "f2.12xlarge", "f2.48xlarge", "trn2.48xlarge", "c7i-flex.12xlarge", "c7i-flex.16xlarge", "m7i-flex.12xlarge", "m7i-flex.16xlarge", "i7ie.metal-24xl", "i7ie.metal-48xl", "i8g.48xlarge", "c8gd.medium", "c8gd.large", "c8gd.xlarge", "c8gd.2xlarge", "c8gd.4xlarge", "c8gd.8xlarge", "c8gd.12xlarge", "c8gd.16xlarge", "c8gd.24xlarge", "c8gd.48xlarge", "c8gd.metal-24xl", "c8gd.metal-48xl", "i7i.large", "i7i.xlarge", "i7i.2xlarge", "i7i.4xlarge", "i7i.8xlarge", "i7i.12xlarge", "i7i.16xlarge", "i7i.24xlarge", "i7i.48xlarge", "i7i.metal-24xl", "i7i.metal-48xl", "p6-b200.48xlarge", "m8gd.medium", "m8gd.large", "m8gd.xlarge", "m8gd.2xlarge", "m8gd.4xlarge", "m8gd.8xlarge", "m8gd.12xlarge", "m8gd.16xlarge", "m8gd.24xlarge", "m8gd.48xlarge", "m8gd.metal-24xl", "m8gd.metal-48xl", "r8gd.medium", "r8gd.large", "r8gd.xlarge", "r8gd.2xlarge", "r8gd.4xlarge", "r8gd.8xlarge", "r8gd.12xlarge", "r8gd.16xlarge", "r8gd.24xlarge", "r8gd.48xlarge", "r8gd.metal-24xl", "r8gd.metal-48xl", "c8gn.medium", "c8gn.large", "c8gn.xlarge", "c8gn.2xlarge", "c8gn.4xlarge", "c8gn.8xlarge", "c8gn.12xlarge", "c8gn.16xlarge", "c8gn.24xlarge", "c8gn.48xlarge", "c8gn.metal-24xl", "c8gn.metal-48xl", "f2.6xlarge", "p6e-gb200.36xlarge", "g6f.large", "g6f.xlarge", "g6f.2xlarge", "g6f.4xlarge", "gr6f.4xlarge", "p5.4xlarge", "r8i.large", "r8i.xlarge", "r8i.2xlarge", "r8i.4xlarge", "r8i.8xlarge", "r8i.12xlarge", "r8i.16xlarge", "r8i.24xlarge", "r8i.32xlarge", "r8i.48xlarge", "r8i.96xlarge", "r8i.metal-48xl", "r8i.metal-96xl", "r8i-flex.large", "r8i-flex.xlarge", "r8i-flex.2xlarge", "r8i-flex.4xlarge", "r8i-flex.8xlarge", "r8i-flex.12xlarge", "r8i-flex.16xlarge", "m8i.large", "m8i.xlarge", "m8i.2xlarge", "m8i.4xlarge", "m8i.8xlarge", "m8i.12xlarge", "m8i.16xlarge", "m8i.24xlarge", "m8i.32xlarge", "m8i.48xlarge", "m8i.96xlarge", "m8i.metal-48xl", "m8i.metal-96xl", "m8i-flex.large", "m8i-flex.xlarge", "m8i-flex.2xlarge", "m8i-flex.4xlarge", "m8i-flex.8xlarge", "m8i-flex.12xlarge", "m8i-flex.16xlarge", "i8ge.large", "i8ge.xlarge", "i8ge.2xlarge", "i8ge.3xlarge", "i8ge.6xlarge", "i8ge.12xlarge", "i8ge.18xlarge", "i8ge.24xlarge", "i8ge.48xlarge", "i8ge.metal-24xl", "i8ge.metal-48xl", "mac-m4.metal", "mac-m4pro.metal", "r8gn.medium", "r8gn.large", "r8gn.xlarge", "r8gn.2xlarge", "r8gn.4xlarge", "r8gn.8xlarge", "r8gn.12xlarge", "r8gn.16xlarge", "r8gn.24xlarge", "r8gn.48xlarge", "r8gn.metal-24xl", "r8gn.metal-48xl", "c8i.large", "c8i.xlarge", "c8i.2xlarge", "c8i.4xlarge", "c8i.8xlarge", "c8i.12xlarge", "c8i.16xlarge", "c8i.24xlarge", "c8i.32xlarge", "c8i.48xlarge", "c8i.96xlarge", "c8i.metal-48xl", "c8i.metal-96xl", "c8i-flex.large", "c8i-flex.xlarge", "c8i-flex.2xlarge", "c8i-flex.4xlarge", "c8i-flex.8xlarge", "c8i-flex.12xlarge", "c8i-flex.16xlarge", "r8gb.medium", "r8gb.large", "r8gb.xlarge", "r8gb.2xlarge", "r8gb.4xlarge", "r8gb.8xlarge", "r8gb.12xlarge", "r8gb.16xlarge", "r8gb.24xlarge", "r8gb.metal-24xl", "m8a.medium", "m8a.large", "m8a.xlarge", "m8a.2xlarge", "m8a.4xlarge", "m8a.8xlarge", "m8a.12xlarge", "m8a.16xlarge", "m8a.24xlarge", "m8a.48xlarge", "m8a.metal-24xl", "m8a.metal-48xl", "trn2.3xlarge", "r8a.medium", "r8a.large", "r8a.xlarge", "r8a.2xlarge", "r8a.4xlarge", "r8a.8xlarge", "r8a.12xlarge", "r8a.16xlarge", "r8a.24xlarge", "r8a.48xlarge", "r8a.metal-24xl", "r8a.metal-48xl", "p6-b300.48xlarge", "c8a.medium", "c8a.large", "c8a.xlarge", "c8a.2xlarge", "c8a.4xlarge", "c8a.8xlarge", "c8a.12xlarge", "c8a.16xlarge", "c8a.24xlarge", "c8a.48xlarge", "c8a.metal-24xl", "c8a.metal-48xl", "c8gb.12xlarge", "c8gb.16xlarge", "c8gb.24xlarge", "c8gb.2xlarge", "c8gb.4xlarge", "c8gb.8xlarge", "c8gb.large", "c8gb.medium", "c8gb.metal-24xl", "c8gb.xlarge", "c8gb.48xlarge", "c8gb.metal-48xl", "m8gb.12xlarge", "m8gb.16xlarge", "m8gb.24xlarge", "m8gb.2xlarge", "m8gb.4xlarge", "m8gb.8xlarge", "m8gb.large", "m8gb.medium", "m8gb.xlarge", "m8gb.48xlarge", "m8gb.metal-24xl", "m8gb.metal-48xl", "m8gn.12xlarge", "m8gn.16xlarge", "m8gn.24xlarge", "m8gn.2xlarge", "m8gn.48xlarge", "m8gn.4xlarge", "m8gn.8xlarge", "m8gn.large", "m8gn.medium", "m8gn.xlarge", "m8gn.metal-24xl", "m8gn.metal-48xl", "x8aedz.12xlarge", "x8aedz.24xlarge", "x8aedz.3xlarge", "x8aedz.6xlarge", "x8aedz.large", "x8aedz.metal-12xl", "x8aedz.metal-24xl", "x8aedz.xlarge", "m8azn.medium", "m8azn.large", "m8azn.xlarge", "m8azn.3xlarge", "m8azn.6xlarge", "m8azn.12xlarge", "m8azn.24xlarge", "m8azn.metal-12xl", "m8azn.metal-24xl", "x8i.large", "x8i.xlarge", "x8i.2xlarge", "x8i.4xlarge", "x8i.8xlarge", "x8i.12xlarge", "x8i.16xlarge", "x8i.24xlarge", "x8i.32xlarge", "x8i.48xlarge", "x8i.64xlarge", "x8i.96xlarge", "x8i.metal-48xl", "x8i.metal-96xl", "mac-m4max.metal", "g7e.2xlarge", "g7e.4xlarge", "g7e.8xlarge", "g7e.12xlarge", "g7e.24xlarge", "g7e.48xlarge", "r8id.large", "r8id.xlarge", "r8id.2xlarge", "r8id.4xlarge", "r8id.8xlarge", "r8id.12xlarge", "r8id.16xlarge", "r8id.24xlarge", "r8id.32xlarge", "r8id.48xlarge", "r8id.96xlarge", "r8id.metal-48xl", "r8id.metal-96xl", "c8id.large", "c8id.xlarge", "c8id.2xlarge", "c8id.4xlarge", "c8id.8xlarge", "c8id.12xlarge", "c8id.16xlarge", "c8id.24xlarge", "c8id.32xlarge", "c8id.48xlarge", "c8id.96xlarge", "c8id.metal-48xl", "c8id.metal-96xl", "m8id.large", "m8id.xlarge", "m8id.2xlarge", "m8id.4xlarge", "m8id.8xlarge", "m8id.12xlarge", "m8id.16xlarge", "m8id.24xlarge", "m8id.32xlarge", "m8id.48xlarge", "m8id.96xlarge", "m8id.metal-48xl", "m8id.metal-96xl", "hpc8a.96xlarge", "c8in.large", "c8in.xlarge", "c8in.2xlarge", "c8in.4xlarge", "c8in.8xlarge", "c8in.12xlarge", "c8in.16xlarge", "c8in.24xlarge", "c8in.32xlarge", "c8in.48xlarge", "c8in.96xlarge", "c8in.metal-48xl", "c8in.metal-96xl", "c8ib.large", "c8ib.xlarge", "c8ib.2xlarge", "c8ib.4xlarge", "c8ib.8xlarge", "c8ib.12xlarge", "c8ib.16xlarge", "c8ib.24xlarge", "c8ib.32xlarge", "c8ib.48xlarge", "c8ib.96xlarge", "c8ib.metal-48xl", "c8ib.metal-96xl", "r8in.large", "r8in.xlarge", "r8in.2xlarge", "r8in.4xlarge", "r8in.8xlarge", "r8in.12xlarge", "r8in.16xlarge", "r8in.24xlarge", "r8in.32xlarge", "r8in.48xlarge", "r8in.96xlarge", "r8ib.large", "r8ib.xlarge", "r8ib.2xlarge", "r8ib.4xlarge", "r8ib.8xlarge", "r8ib.12xlarge", "r8ib.16xlarge", "r8ib.24xlarge", "r8ib.32xlarge", "r8ib.48xlarge", "r8ib.96xlarge", "m8in.large", "m8in.xlarge", "m8in.2xlarge", "m8in.4xlarge", "m8in.8xlarge", "m8in.12xlarge", "m8in.16xlarge", "m8in.24xlarge", "m8in.32xlarge", "m8in.48xlarge", "m8in.96xlarge", "m8ib.large", "m8ib.xlarge", "m8ib.2xlarge", "m8ib.4xlarge", "m8ib.8xlarge", "m8ib.12xlarge", "m8ib.16xlarge", "m8ib.24xlarge", "m8ib.32xlarge", "m8ib.48xlarge", "m8ib.96xlarge", "m8ine.large", "m8ine.xlarge", "m8ine.2xlarge", "m8ine.4xlarge", "m8ine.8xlarge", "m8ine.12xlarge", "c8ine.large", "c8ine.xlarge", "c8ine.2xlarge", "c8ine.4xlarge", "c8ine.8xlarge", "c8ine.12xlarge", "m8idn.large", "m8idn.xlarge", "m8idn.2xlarge", "m8idn.4xlarge", "m8idn.8xlarge", "m8idn.12xlarge", "m8idn.16xlarge", "m8idn.24xlarge", "m8idn.32xlarge", "m8idn.48xlarge", "m8idn.96xlarge", "r8idn.large", "r8idn.xlarge", "r8idn.2xlarge", "r8idn.4xlarge", "r8idn.8xlarge", "r8idn.12xlarge", "r8idn.16xlarge", "r8idn.24xlarge", "r8idn.32xlarge", "r8idn.48xlarge", "r8idn.96xlarge", "m8idb.large", "m8idb.xlarge", "m8idb.2xlarge", "m8idb.4xlarge", "m8idb.8xlarge", "m8idb.12xlarge", "m8idb.16xlarge", "m8idb.24xlarge", "m8idb.32xlarge", "m8idb.48xlarge", "m8idb.96xlarge", "r8idb.large", "r8idb.xlarge", "r8idb.2xlarge", "r8idb.4xlarge", "r8idb.8xlarge", "r8idb.12xlarge", "r8idb.16xlarge", "r8idb.24xlarge", "r8idb.32xlarge", "r8idb.48xlarge", "r8idb.96xlarge", "mac-m3ultra.metal", "m9g.large", "m9g.xlarge", "m9g.2xlarge", "m9g.4xlarge", "m9g.8xlarge", "m9g.12xlarge", "m9g.16xlarge", "m9g.24xlarge", "m9g.48xlarge", "m9g.metal-24xl", "m9g.metal-48xl", "m9gd.large", "m9gd.xlarge", "m9gd.2xlarge", "m9gd.4xlarge", "m9gd.8xlarge", "m9gd.12xlarge", "m9gd.16xlarge", "m9gd.24xlarge", "m9gd.48xlarge", "m9gd.metal-24xl", "m9gd.metal-48xl", "r8in.metal-48xl", "r8in.metal-96xl", "r8ib.metal-48xl", "r8ib.metal-96xl", "r8idn.metal-48xl", "r8idn.metal-96xl", "r8idb.metal-48xl", "r8idb.metal-96xl", "m8in.metal-48xl", "m8in.metal-96xl", "m8ib.metal-48xl", "m8ib.metal-96xl", "m8idn.metal-48xl", "m8idn.metal-96xl", "m8idb.metal-48xl", "m8idb.metal-96xl", "g7.2xlarge", "g7.4xlarge", "g7.8xlarge", "g7.12xlarge", "g7.24xlarge", "g7.48xlarge", "c9g.medium", "c9g.large", "c9g.xlarge", "c9g.2xlarge", "c9g.4xlarge", "c9g.8xlarge", "c9g.12xlarge", "c9g.16xlarge", "c9g.24xlarge", "c9g.48xlarge", "c9g.metal-48xl", "c9gd.medium", "c9gd.large", "c9gd.xlarge", "c9gd.2xlarge", "c9gd.4xlarge", "c9gd.8xlarge", "c9gd.12xlarge", "c9gd.16xlarge", "c9gd.24xlarge", "c9gd.48xlarge", "c9gd.metal-48xl", "r9g.medium", "r9g.large", "r9g.xlarge", "r9g.2xlarge", "r9g.4xlarge", "r9g.8xlarge", "r9g.12xlarge", "r9g.16xlarge", "r9g.24xlarge", "r9g.48xlarge", "r9g.metal-48xl", "r9gd.medium", "r9gd.large", "r9gd.xlarge", "r9gd.2xlarge", "r9gd.4xlarge", "r9gd.8xlarge", "r9gd.12xlarge", "r9gd.16xlarge", "r9gd.24xlarge", "r9gd.48xlarge", "r9gd.metal-48xl", "m9g.medium", "t8i.nano", "t8i.micro", "t8i.small", "t8i.medium", "i8g.metal-48xl", "r8gb.48xlarge", "r8gb.metal-48xl", "m9gd.medium", "trn2u.48xlarge", "null" ], "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The instance type we want to create and run, as an InstanceType, its AWS value (such as t2.micro) or the name of the constant (such as T2_MICRO)", "constantName": "org.apache.camel.component.aws2.ec2.AWS2EC2Constants#INSTANCE_TYPE" }, "CamelAwsEC2Operation": { "index": 2, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The operation we want to perform", "constantName": "org.apache.camel.component.aws2.ec2.AWS2EC2Constants#OPERATION" }, "CamelAwsEC2InstanceMinCount": { "index": 3, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "Integer", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The minimum number of instances we want to run.", "constantName": "org.apache.camel.component.aws2.ec2.AWS2EC2Constants#INSTANCE_MIN_COUNT" }, "CamelAwsEC2InstanceMaxCount": { "index": 4, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "Integer", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The maximum number of instances we want to run.", "constantName": "org.apache.camel.component.aws2.ec2.AWS2EC2Constants#INSTANCE_MAX_COUNT" }, @@ -57,7 +57,7 @@ "CamelAwsEC2InstanceKernelId": { "index": 6, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The ID of the kernel.", "constantName": "org.apache.camel.component.aws2.ec2.AWS2EC2Constants#INSTANCE_KERNEL_ID" }, "CamelAwsEC2InstanceEbsOptimized": { "index": 7, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "Boolean", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Define if the creating instance is optimized for EBS I\/O.", "constantName": "org.apache.camel.component.aws2.ec2.AWS2EC2Constants#INSTANCE_EBS_OPTIMIZED" }, "CamelAwsEC2InstanceSecurityGroups": { "index": 8, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "Collection", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The security groups to associate to the instances", "constantName": "org.apache.camel.component.aws2.ec2.AWS2EC2Constants#INSTANCE_SECURITY_GROUPS" }, - "CamelAwsEC2InstancesIds": { "index": 9, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "Collection", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "A collection of instances IDS to execute start, stop, describe and terminate operations on.", "constantName": "org.apache.camel.component.aws2.ec2.AWS2EC2Constants#INSTANCES_IDS" }, + "CamelAwsEC2InstancesIds": { "index": 9, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "Collection", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "A collection of instances IDS to execute start, stop, describe and terminate operations on. A String of ids separated by commas is accepted too.", "constantName": "org.apache.camel.component.aws2.ec2.AWS2EC2Constants#INSTANCES_IDS" }, "CamelAwsEC2InstancesKeyPair": { "index": 10, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The name of the key pair.", "constantName": "org.apache.camel.component.aws2.ec2.AWS2EC2Constants#INSTANCES_KEY_PAIR" }, "CamelAwsEC2InstancesClientToken": { "index": 11, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Unique, case-sensitive identifier you provide to ensure the idempotency of the request.", "constantName": "org.apache.camel.component.aws2.ec2.AWS2EC2Constants#INSTANCES_CLIENT_TOKEN" }, "CamelAwsEC2InstancesPlacement": { "index": 12, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "software.amazon.awssdk.services.ec2.model.Placement", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The placement for the instance.", "constantName": "org.apache.camel.component.aws2.ec2.AWS2EC2Constants#INSTANCES_PLACEMENT" }, diff --git a/components/camel-aws/camel-aws2-ec2/src/main/docs/aws2-ec2-component.adoc b/components/camel-aws/camel-aws2-ec2/src/main/docs/aws2-ec2-component.adoc index ae94788a0b318..0dba26ec24f6c 100644 --- a/components/camel-aws/camel-aws2-ec2/src/main/docs/aws2-ec2-component.adoc +++ b/components/camel-aws/camel-aws2-ec2/src/main/docs/aws2-ec2-component.adoc @@ -155,6 +155,9 @@ YAML:: - startInstances: this operation will start a list of EC2 instances +The `CamelAwsEC2InstancesIds` header is a collection of instance IDs, or a String of IDs separated by commas +(such as `i-1,i-2`), which can be set from XML and YAML routes too. + ._Java-only: sets a collection header for instance IDs_ [source,java] ---- diff --git a/components/camel-aws/camel-aws2-ec2/src/main/java/org/apache/camel/component/aws2/ec2/AWS2EC2Constants.java b/components/camel-aws/camel-aws2-ec2/src/main/java/org/apache/camel/component/aws2/ec2/AWS2EC2Constants.java index fa4df10adecb3..56075069acebd 100644 --- a/components/camel-aws/camel-aws2-ec2/src/main/java/org/apache/camel/component/aws2/ec2/AWS2EC2Constants.java +++ b/components/camel-aws/camel-aws2-ec2/src/main/java/org/apache/camel/component/aws2/ec2/AWS2EC2Constants.java @@ -25,7 +25,8 @@ public interface AWS2EC2Constants { @Metadata(description = "An image ID of the AWS marketplace", javaType = "String") String IMAGE_ID = "CamelAwsEC2ImageId"; - @Metadata(description = "The instance type we want to create and run", + @Metadata(description = "The instance type we want to create and run, as an InstanceType, its AWS value (such as t2.micro)" + + " or the name of the constant (such as T2_MICRO)", javaType = "software.amazon.awssdk.services.ec2.model.InstanceType") String INSTANCE_TYPE = "CamelAwsEC2InstanceType"; @Metadata(description = "The operation we want to perform", javaType = "String") @@ -43,7 +44,7 @@ public interface AWS2EC2Constants { @Metadata(description = "The security groups to associate to the instances", javaType = "Collection") String INSTANCE_SECURITY_GROUPS = "CamelAwsEC2InstanceSecurityGroups"; @Metadata(description = "A collection of instances IDS to execute start, stop, describe and\n" + - "terminate operations on.", + "terminate operations on. A String of ids separated by commas is accepted too.", javaType = "Collection") String INSTANCES_IDS = "CamelAwsEC2InstancesIds"; @Metadata(description = "The name of the key pair.", javaType = "String") diff --git a/components/camel-aws/camel-aws2-ec2/src/main/java/org/apache/camel/component/aws2/ec2/AWS2EC2Producer.java b/components/camel-aws/camel-aws2-ec2/src/main/java/org/apache/camel/component/aws2/ec2/AWS2EC2Producer.java index 410206f451311..2063b8af0ca47 100644 --- a/components/camel-aws/camel-aws2-ec2/src/main/java/org/apache/camel/component/aws2/ec2/AWS2EC2Producer.java +++ b/components/camel-aws/camel-aws2-ec2/src/main/java/org/apache/camel/component/aws2/ec2/AWS2EC2Producer.java @@ -16,8 +16,10 @@ */ package org.apache.camel.component.aws2.ec2; +import java.util.ArrayList; import java.util.Arrays; import java.util.Collection; +import java.util.List; import java.util.function.BiConsumer; import java.util.function.Function; import java.util.function.Supplier; @@ -124,6 +126,11 @@ private AWS2EC2Operations determineOperation(Exchange exchange) { if (operation == null) { operation = getConfiguration().getOperation(); } + if (ObjectHelper.isEmpty(operation)) { + throw new IllegalArgumentException( + "Operation must be specified, either with the operation option or the " + AWS2EC2Constants.OPERATION + + " header"); + } return operation; } @@ -174,8 +181,8 @@ private void createAndRunInstance(Ec2Client ec2Client, Exchange exchange) throws throw new IllegalArgumentException("AMI must be specified"); } if (ObjectHelper.isNotEmpty(exchange.getIn().getHeader(AWS2EC2Constants.INSTANCE_TYPE))) { - instanceType = exchange.getIn().getHeader(AWS2EC2Constants.INSTANCE_TYPE, InstanceType.class); - builder.instanceType(instanceType.toString()); + instanceType = getInstanceType(exchange); + builder.instanceType(instanceType); } else { throw new IllegalArgumentException("Instance Type must be specified"); } @@ -261,8 +268,8 @@ private void startInstances(Ec2Client ec2Client, Exchange exchange) throws Inval } } else { StartInstancesRequest.Builder builder = StartInstancesRequest.builder(); - if (ObjectHelper.isNotEmpty(exchange.getIn().getHeader(AWS2EC2Constants.INSTANCES_IDS))) { - instanceIds = exchange.getIn().getHeader(AWS2EC2Constants.INSTANCES_IDS, Collection.class); + instanceIds = getInstanceIds(exchange); + if (ObjectHelper.isNotEmpty(instanceIds)) { builder.instanceIds(instanceIds); } else { throw new IllegalArgumentException(MISSING_INSTANCES_MESSAGE); @@ -306,8 +313,8 @@ private void stopInstances(Ec2Client ec2Client, Exchange exchange) throws Invali } } else { StopInstancesRequest.Builder builder = StopInstancesRequest.builder(); - if (ObjectHelper.isNotEmpty(exchange.getIn().getHeader(AWS2EC2Constants.INSTANCES_IDS))) { - instanceIds = exchange.getIn().getHeader(AWS2EC2Constants.INSTANCES_IDS, Collection.class); + instanceIds = getInstanceIds(exchange); + if (ObjectHelper.isNotEmpty(instanceIds)) { builder.instanceIds(instanceIds); } else { throw new IllegalArgumentException(MISSING_INSTANCES_MESSAGE); @@ -351,8 +358,8 @@ private void terminateInstances(Ec2Client ec2Client, Exchange exchange) throws I } } else { TerminateInstancesRequest.Builder builder = TerminateInstancesRequest.builder(); - if (ObjectHelper.isNotEmpty(exchange.getIn().getHeader(AWS2EC2Constants.INSTANCES_IDS))) { - instanceIds = exchange.getIn().getHeader(AWS2EC2Constants.INSTANCES_IDS, Collection.class); + instanceIds = getInstanceIds(exchange); + if (ObjectHelper.isNotEmpty(instanceIds)) { builder.instanceIds(instanceIds); } else { throw new IllegalArgumentException(MISSING_INSTANCES_MESSAGE); @@ -383,7 +390,7 @@ private void describeInstances(Ec2Client ec2Client, Exchange exchange) throws In () -> { DescribeInstancesRequest.Builder builder = DescribeInstancesRequest.builder(); Collection instanceIds - = getOptionalHeader(exchange, AWS2EC2Constants.INSTANCES_IDS, Collection.class); + = getInstanceIds(exchange); if (ObjectHelper.isNotEmpty(instanceIds)) { builder.instanceIds(instanceIds); } @@ -413,7 +420,7 @@ private void describeInstancesStatus(Ec2Client ec2Client, Exchange exchange) thr () -> { DescribeInstanceStatusRequest.Builder builder = DescribeInstanceStatusRequest.builder(); Collection instanceIds - = getOptionalHeader(exchange, AWS2EC2Constants.INSTANCES_IDS, Collection.class); + = getInstanceIds(exchange); if (ObjectHelper.isNotEmpty(instanceIds)) { builder.instanceIds(instanceIds); } @@ -453,8 +460,8 @@ private void rebootInstances(Ec2Client ec2Client, Exchange exchange) throws Inva } } else { RebootInstancesRequest.Builder builder = RebootInstancesRequest.builder(); - if (ObjectHelper.isNotEmpty(exchange.getIn().getHeader(AWS2EC2Constants.INSTANCES_IDS))) { - instanceIds = exchange.getIn().getHeader(AWS2EC2Constants.INSTANCES_IDS, Collection.class); + instanceIds = getInstanceIds(exchange); + if (ObjectHelper.isNotEmpty(instanceIds)) { builder.instanceIds(instanceIds); } else { throw new IllegalArgumentException(MISSING_INSTANCES_MESSAGE); @@ -494,8 +501,8 @@ private void monitorInstances(Ec2Client ec2Client, Exchange exchange) throws Inv } } else { MonitorInstancesRequest.Builder builder = MonitorInstancesRequest.builder(); - if (ObjectHelper.isNotEmpty(exchange.getIn().getHeader(AWS2EC2Constants.INSTANCES_IDS))) { - instanceIds = exchange.getIn().getHeader(AWS2EC2Constants.INSTANCES_IDS, Collection.class); + instanceIds = getInstanceIds(exchange); + if (ObjectHelper.isNotEmpty(instanceIds)) { builder.instanceIds(instanceIds); } else { throw new IllegalArgumentException(MISSING_INSTANCES_MESSAGE); @@ -539,8 +546,8 @@ private void unmonitorInstances(Ec2Client ec2Client, Exchange exchange) throws I } } else { UnmonitorInstancesRequest.Builder builder = UnmonitorInstancesRequest.builder(); - if (ObjectHelper.isNotEmpty(exchange.getIn().getHeader(AWS2EC2Constants.INSTANCES_IDS))) { - instanceIds = exchange.getIn().getHeader(AWS2EC2Constants.INSTANCES_IDS, Collection.class); + instanceIds = getInstanceIds(exchange); + if (ObjectHelper.isNotEmpty(instanceIds)) { builder.instanceIds(instanceIds); } else { throw new IllegalArgumentException(MISSING_INSTANCES_MESSAGE); @@ -585,8 +592,8 @@ private void createTags(Ec2Client ec2Client, Exchange exchange) throws InvalidPa } else { Collection tags; CreateTagsRequest.Builder builder = CreateTagsRequest.builder(); - if (ObjectHelper.isNotEmpty(exchange.getIn().getHeader(AWS2EC2Constants.INSTANCES_IDS))) { - instanceIds = exchange.getIn().getHeader(AWS2EC2Constants.INSTANCES_IDS, Collection.class); + instanceIds = getInstanceIds(exchange); + if (ObjectHelper.isNotEmpty(instanceIds)) { builder.resources(instanceIds); } else { throw new IllegalArgumentException(MISSING_INSTANCES_MESSAGE); @@ -637,8 +644,8 @@ private void deleteTags(Ec2Client ec2Client, Exchange exchange) throws InvalidPa } else { Collection tags; DeleteTagsRequest.Builder builder = DeleteTagsRequest.builder(); - if (ObjectHelper.isNotEmpty(exchange.getIn().getHeader(AWS2EC2Constants.INSTANCES_IDS))) { - instanceIds = exchange.getIn().getHeader(AWS2EC2Constants.INSTANCES_IDS, Collection.class); + instanceIds = getInstanceIds(exchange); + if (ObjectHelper.isNotEmpty(instanceIds)) { builder.resources(instanceIds); } else { throw new IllegalArgumentException(MISSING_INSTANCES_MESSAGE); @@ -670,6 +677,63 @@ public static Message getMessageForResponse(final Exchange exchange) { return exchange.getMessage(); } + /** + * The instance type of the {@link AWS2EC2Constants#INSTANCE_TYPE} header: an {@link InstanceType}, its AWS value + * (such as t2.micro), or the name of the constant (such as T2_MICRO). + */ + private InstanceType getInstanceType(Exchange exchange) { + Object value = exchange.getIn().getHeader(AWS2EC2Constants.INSTANCE_TYPE); + if (value instanceof InstanceType instanceType) { + return instanceType; + } + String text = exchange.getIn().getHeader(AWS2EC2Constants.INSTANCE_TYPE, String.class); + if (text != null) { + text = text.trim(); + InstanceType instanceType = InstanceType.fromValue(text); + if (instanceType != null && instanceType != InstanceType.UNKNOWN_TO_SDK_VERSION) { + return instanceType; + } + for (InstanceType candidate : InstanceType.knownValues()) { + if (candidate.name().equals(text)) { + return candidate; + } + } + } + throw new IllegalArgumentException( + "Unknown instance type " + value + " in the " + AWS2EC2Constants.INSTANCE_TYPE + + " header: expected an InstanceType, such as t2.micro or T2_MICRO"); + } + + /** + * The instance ids of the {@link AWS2EC2Constants#INSTANCES_IDS} header: a Collection of ids, or a String of ids + * separated by commas. Returns null when the header is not set. + */ + private Collection getInstanceIds(Exchange exchange) { + Object value = exchange.getIn().getHeader(AWS2EC2Constants.INSTANCES_IDS); + if (value == null) { + return null; + } + if (value instanceof Collection collection) { + List ids = new ArrayList<>(collection.size()); + for (Object id : collection) { + ids.add(id != null ? id.toString() : null); + } + return ids; + } + if (value instanceof String text) { + List ids = new ArrayList<>(); + for (String id : text.split(",")) { + if (!id.isBlank()) { + ids.add(id.trim()); + } + } + return ids; + } + throw new IllegalArgumentException( + "The " + AWS2EC2Constants.INSTANCES_IDS + " header must be a Collection or a String of ids" + + " separated by commas, but was " + value.getClass().getName()); + } + /** * Executes an EC2 operation with POJO request support. */ diff --git a/components/camel-aws/camel-aws2-ec2/src/test/java/org/apache/camel/component/aws2/ec2/AmazonEC2ClientMock.java b/components/camel-aws/camel-aws2-ec2/src/test/java/org/apache/camel/component/aws2/ec2/AmazonEC2ClientMock.java index e75fedf044eee..76bc345fcd99d 100644 --- a/components/camel-aws/camel-aws2-ec2/src/test/java/org/apache/camel/component/aws2/ec2/AmazonEC2ClientMock.java +++ b/components/camel-aws/camel-aws2-ec2/src/test/java/org/apache/camel/component/aws2/ec2/AmazonEC2ClientMock.java @@ -61,6 +61,17 @@ public class AmazonEC2ClientMock implements Ec2Client { + private volatile RebootInstancesRequest lastRebootInstancesRequest; + private volatile DescribeInstancesRequest lastDescribeInstancesRequest; + + public RebootInstancesRequest getLastRebootInstancesRequest() { + return lastRebootInstancesRequest; + } + + public DescribeInstancesRequest getLastDescribeInstancesRequest() { + return lastDescribeInstancesRequest; + } + @Override public RunInstancesResponse runInstances(RunInstancesRequest runInstancesRequest) { RunInstancesResponse.Builder result = RunInstancesResponse.builder(); @@ -198,6 +209,7 @@ public TerminateInstancesResponse terminateInstances(TerminateInstancesRequest t @Override public DescribeInstancesResponse describeInstances(DescribeInstancesRequest describeInstancesRequest) { + lastDescribeInstancesRequest = describeInstancesRequest; DescribeInstancesResponse.Builder result = DescribeInstancesResponse.builder(); if (describeInstancesRequest.instanceIds().isEmpty()) { Collection list = new ArrayList<>(); @@ -273,6 +285,7 @@ public DescribeInstanceStatusResponse describeInstanceStatus(DescribeInstanceSta @Override public RebootInstancesResponse rebootInstances(RebootInstancesRequest rebootInstancesRequest) { + lastRebootInstancesRequest = rebootInstancesRequest; return RebootInstancesResponse.builder().build(); } diff --git a/components/camel-aws/camel-aws2-ec2/src/test/java/org/apache/camel/component/aws2/ec2/EC2ComponentSpringTest.java b/components/camel-aws/camel-aws2-ec2/src/test/java/org/apache/camel/component/aws2/ec2/EC2ComponentSpringTest.java index d5c6967789576..3815ea4b80a3e 100644 --- a/components/camel-aws/camel-aws2-ec2/src/test/java/org/apache/camel/component/aws2/ec2/EC2ComponentSpringTest.java +++ b/components/camel-aws/camel-aws2-ec2/src/test/java/org/apache/camel/component/aws2/ec2/EC2ComponentSpringTest.java @@ -18,6 +18,7 @@ import java.util.ArrayList; import java.util.Collection; +import java.util.List; import org.apache.camel.Exchange; import org.apache.camel.Processor; @@ -38,8 +39,8 @@ import software.amazon.awssdk.services.ec2.model.TerminateInstancesResponse; import software.amazon.awssdk.services.ec2.model.UnmonitorInstancesResponse; -import static org.junit.jupiter.api.Assertions.assertDoesNotThrow; import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNull; public class EC2ComponentSpringTest extends CamelSpringTestSupport { @@ -180,15 +181,15 @@ public void process(Exchange exchange) { @Test public void ec2RebootInstancesTest() { - assertDoesNotThrow(() -> issueReboot()); - } - - private void issueReboot() { - template.request("direct:reboot", exchange -> { + Exchange exchange = template.request("direct:reboot", e -> { Collection l = new ArrayList<>(); l.add("test-1"); - exchange.getIn().setHeader(AWS2EC2Constants.INSTANCES_IDS, l); + e.getIn().setHeader(AWS2EC2Constants.INSTANCES_IDS, l); }); + + assertNull(exchange.getException()); + AmazonEC2ClientMock client = context.getRegistry().lookupByNameAndType("amazonEc2Client", AmazonEC2ClientMock.class); + assertEquals(List.of("test-1"), client.getLastRebootInstancesRequest().instanceIds()); } @Test diff --git a/components/camel-aws/camel-aws2-ec2/src/test/java/org/apache/camel/component/aws2/ec2/EC2ProducerTest.java b/components/camel-aws/camel-aws2-ec2/src/test/java/org/apache/camel/component/aws2/ec2/EC2ProducerTest.java index 05b00d086fff6..317c85a2795ba 100644 --- a/components/camel-aws/camel-aws2-ec2/src/test/java/org/apache/camel/component/aws2/ec2/EC2ProducerTest.java +++ b/components/camel-aws/camel-aws2-ec2/src/test/java/org/apache/camel/component/aws2/ec2/EC2ProducerTest.java @@ -18,6 +18,7 @@ import java.util.ArrayList; import java.util.Collection; +import java.util.List; import org.apache.camel.BindToRegistry; import org.apache.camel.EndpointInject; @@ -29,6 +30,7 @@ import org.junit.jupiter.api.Test; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.CsvSource; +import org.junit.jupiter.params.provider.ValueSource; import software.amazon.awssdk.services.ec2.model.DescribeInstanceStatusResponse; import software.amazon.awssdk.services.ec2.model.DescribeInstancesResponse; import software.amazon.awssdk.services.ec2.model.InstanceStateName; @@ -43,8 +45,9 @@ import software.amazon.awssdk.services.ec2.model.UnmonitorInstancesResponse; import static org.assertj.core.api.Assertions.assertThatThrownBy; -import static org.junit.jupiter.api.Assertions.assertDoesNotThrow; import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertInstanceOf; +import static org.junit.jupiter.api.Assertions.assertNull; public class EC2ProducerTest extends CamelTestSupport { @@ -208,15 +211,104 @@ public void process(Exchange exchange) { @Test public void ec2RebootInstancesTest() { - assertDoesNotThrow(() -> issueReboot()); - } - - private void issueReboot() { - template.request("direct:reboot", exchange -> { + Exchange exchange = template.request("direct:reboot", e -> { Collection l = new ArrayList<>(); l.add("test-1"); - exchange.getIn().setHeader(AWS2EC2Constants.INSTANCES_IDS, l); + e.getIn().setHeader(AWS2EC2Constants.INSTANCES_IDS, l); + }); + + assertNull(exchange.getException()); + assertEquals(List.of("test-1"), amazonEc2Client.getLastRebootInstancesRequest().instanceIds()); + } + + @Test + public void noOperation() { + Exchange exchange = template.send("direct:noOperation", e -> e.getIn().setBody("test")); + + assertInstanceOf(IllegalArgumentException.class, exchange.getException()); + assertEquals("Operation must be specified, either with the operation option or the CamelAwsEC2Operation header", + exchange.getException().getMessage()); + } + + @ParameterizedTest + @ValueSource(strings = { "t2.micro", "T2_MICRO", " t2.micro " }) + public void createAndRunInstancesWithInstanceTypeAsText(String instanceType) { + Exchange exchange = template.request("direct:createAndRun", e -> { + e.getIn().setHeader(AWS2EC2Constants.IMAGE_ID, "test-1"); + e.getIn().setHeader(AWS2EC2Constants.INSTANCE_TYPE, instanceType); + e.getIn().setHeader(AWS2EC2Constants.INSTANCE_MIN_COUNT, 1); + e.getIn().setHeader(AWS2EC2Constants.INSTANCE_MAX_COUNT, 1); + }); + + assertNull(exchange.getException()); + RunInstancesResponse resultGet = exchange.getMessage().getBody(RunInstancesResponse.class); + assertEquals(InstanceType.T2_MICRO, resultGet.instances().get(0).instanceType()); + } + + @Test + public void createAndRunInstancesWithUnknownInstanceType() { + Exchange exchange = template.send("direct:createAndRun", e -> { + e.getIn().setHeader(AWS2EC2Constants.IMAGE_ID, "test-1"); + e.getIn().setHeader(AWS2EC2Constants.INSTANCE_TYPE, "t2.nosuchsize"); + e.getIn().setHeader(AWS2EC2Constants.INSTANCE_MIN_COUNT, 1); + e.getIn().setHeader(AWS2EC2Constants.INSTANCE_MAX_COUNT, 1); }); + + assertInstanceOf(IllegalArgumentException.class, exchange.getException()); + assertEquals("Unknown instance type t2.nosuchsize in the CamelAwsEC2InstanceType header:" + + " expected an InstanceType, such as t2.micro or T2_MICRO", + exchange.getException().getMessage()); + } + + @Test + public void stopInstancesWithIdsAsText() { + Exchange exchange = template.request("direct:stop", + e -> e.getIn().setHeader(AWS2EC2Constants.INSTANCES_IDS, "test-1")); + + assertNull(exchange.getException()); + StopInstancesResponse resultGet = exchange.getMessage().getBody(StopInstancesResponse.class); + assertEquals(1, resultGet.stoppingInstances().size()); + assertEquals("test-1", resultGet.stoppingInstances().get(0).instanceId()); + } + + @Test + public void rebootInstancesWithIdsSeparatedByCommas() { + Exchange exchange = template.request("direct:reboot", + e -> e.getIn().setHeader(AWS2EC2Constants.INSTANCES_IDS, "test-1, test-2,,")); + + assertNull(exchange.getException()); + assertEquals(List.of("test-1", "test-2"), amazonEc2Client.getLastRebootInstancesRequest().instanceIds()); + } + + @Test + public void describeInstancesWithIdsAsText() { + Exchange exchange = template.request("direct:describe", + e -> e.getIn().setHeader(AWS2EC2Constants.INSTANCES_IDS, "instance-1")); + + assertNull(exchange.getException()); + assertEquals(List.of("instance-1"), amazonEc2Client.getLastDescribeInstancesRequest().instanceIds()); + DescribeInstancesResponse resultGet = exchange.getMessage().getBody(DescribeInstancesResponse.class); + assertEquals(1, resultGet.reservations().get(0).instances().size()); + } + + @Test + public void startInstancesWithOnlyCommasFails() { + Exchange exchange = template.send("direct:start", + e -> e.getIn().setHeader(AWS2EC2Constants.INSTANCES_IDS, " , ")); + + assertInstanceOf(IllegalArgumentException.class, exchange.getException()); + assertEquals(AWS2EC2Producer.MISSING_INSTANCES_MESSAGE, exchange.getException().getMessage()); + } + + @Test + public void stopInstancesWithIdsOfWrongTypeFails() { + Exchange exchange = template.send("direct:stop", + e -> e.getIn().setHeader(AWS2EC2Constants.INSTANCES_IDS, 42)); + + assertInstanceOf(IllegalArgumentException.class, exchange.getException()); + assertEquals("The CamelAwsEC2InstancesIds header must be a Collection or a String of ids separated by" + + " commas, but was java.lang.Integer", + exchange.getException().getMessage()); } @Test @@ -282,6 +374,8 @@ protected RouteBuilder createRouteBuilder() { return new RouteBuilder() { @Override public void configure() { + from("direct:noOperation") + .to("aws2-ec2://test?amazonEc2Client=#amazonEc2Client"); from("direct:createAndRun") .to("aws2-ec2://test?amazonEc2Client=#amazonEc2Client&operation=createAndRunInstances") .to("mock:result"); diff --git a/components/camel-aws/camel-aws2-ecs/src/main/java/org/apache/camel/component/aws2/ecs/ECS2Producer.java b/components/camel-aws/camel-aws2-ecs/src/main/java/org/apache/camel/component/aws2/ecs/ECS2Producer.java index f571607e64e01..6446c438caeef 100644 --- a/components/camel-aws/camel-aws2-ecs/src/main/java/org/apache/camel/component/aws2/ecs/ECS2Producer.java +++ b/components/camel-aws/camel-aws2-ecs/src/main/java/org/apache/camel/component/aws2/ecs/ECS2Producer.java @@ -84,6 +84,11 @@ private ECS2Operations determineOperation(Exchange exchange) { if (operation == null) { operation = getConfiguration().getOperation(); } + if (ObjectHelper.isEmpty(operation)) { + throw new IllegalArgumentException( + "Operation must be specified, either with the operation option or the " + ECS2Constants.OPERATION + + " header"); + } return operation; } @@ -230,8 +235,7 @@ private void executeOperation( } else { throw new IllegalArgumentException( String.format("Expected body of type %s but was %s", - requestClass.getName(), - ObjectHelper.isNotEmpty(payload) ? payload.getClass().getName() : "null")); + requestClass.getName(), payload.getClass().getName())); } } else { try { diff --git a/components/camel-aws/camel-aws2-ecs/src/test/java/org/apache/camel/component/aws2/ecs/ECS2ProducerTest.java b/components/camel-aws/camel-aws2-ecs/src/test/java/org/apache/camel/component/aws2/ecs/ECS2ProducerTest.java index 53c44566b3564..c084bddfd71ff 100644 --- a/components/camel-aws/camel-aws2-ecs/src/test/java/org/apache/camel/component/aws2/ecs/ECS2ProducerTest.java +++ b/components/camel-aws/camel-aws2-ecs/src/test/java/org/apache/camel/component/aws2/ecs/ECS2ProducerTest.java @@ -31,6 +31,7 @@ import software.amazon.awssdk.services.ecs.model.ListClustersResponse; import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertInstanceOf; public class ECS2ProducerTest extends CamelTestSupport { @@ -131,11 +132,32 @@ public void process(Exchange exchange) { assertEquals("Test", resultGet.cluster().clusterName()); } + @Test + public void ecsNoOperationTest() { + Exchange exchange = template.send("direct:noOperation", e -> { + }); + + IllegalArgumentException cause = assertInstanceOf(IllegalArgumentException.class, exchange.getException()); + assertEquals("Operation must be specified, either with the operation option or the CamelAwsECSOperation header", + cause.getMessage()); + } + + @Test + public void ecsListClustersPojoEmptyBodyTest() { + Exchange exchange = template.send("direct:listClustersPojo", e -> e.getIn().setBody("")); + + IllegalArgumentException cause = assertInstanceOf(IllegalArgumentException.class, exchange.getException()); + assertEquals("Expected body of type " + ListClustersRequest.class.getName() + " but was java.lang.String", + cause.getMessage()); + } + @Override protected RouteBuilder createRouteBuilder() { return new RouteBuilder() { @Override public void configure() { + from("direct:noOperation").to("aws2-ecs://test?ecsClient=#amazonEcsClient") + .to("mock:result"); from("direct:listClusters").to("aws2-ecs://test?ecsClient=#amazonEcsClient&operation=listClusters") .to("mock:result"); from("direct:listClustersPojo") diff --git a/components/camel-aws/camel-aws2-eks/src/main/java/org/apache/camel/component/aws2/eks/EKS2Producer.java b/components/camel-aws/camel-aws2-eks/src/main/java/org/apache/camel/component/aws2/eks/EKS2Producer.java index c85efb1b09169..e36ae3e1e0095 100644 --- a/components/camel-aws/camel-aws2-eks/src/main/java/org/apache/camel/component/aws2/eks/EKS2Producer.java +++ b/components/camel-aws/camel-aws2-eks/src/main/java/org/apache/camel/component/aws2/eks/EKS2Producer.java @@ -84,6 +84,11 @@ private EKS2Operations determineOperation(Exchange exchange) { if (operation == null) { operation = getConfiguration().getOperation(); } + if (ObjectHelper.isEmpty(operation)) { + throw new IllegalArgumentException( + "Operation must be specified, either with the operation option or the " + EKS2Constants.OPERATION + + " header"); + } return operation; } @@ -143,7 +148,7 @@ private void createCluster(EksClient eksClient, Exchange exchange) throws Invali if (ObjectHelper.isNotEmpty(roleArn)) { builder.roleArn(roleArn); } - VpcConfigRequest vpcConfig = getOptionalHeader(exchange, EKS2Constants.VPC_CONFIG, VpcConfigRequest.class); + VpcConfigRequest vpcConfig = getVpcConfig(exchange); if (ObjectHelper.isNotEmpty(vpcConfig)) { builder.resourcesVpcConfig(vpcConfig); } @@ -235,8 +240,7 @@ private void executeOperation( } else { throw new IllegalArgumentException( String.format("Expected body of type %s but was %s", - requestClass.getName(), - ObjectHelper.isNotEmpty(payload) ? payload.getClass().getName() : "null")); + requestClass.getName(), payload.getClass().getName())); } } else { try { @@ -264,6 +268,24 @@ private T getRequiredHeader(Exchange exchange, String headerName, Class h return value; } + /** + * Gets the VPC config header, which must be a {@link VpcConfigRequest}; a value of another type would otherwise be + * dropped silently. + */ + private VpcConfigRequest getVpcConfig(Exchange exchange) { + Object value = exchange.getIn().getHeader(EKS2Constants.VPC_CONFIG); + if (value == null) { + return null; + } + VpcConfigRequest vpcConfig = exchange.getIn().getHeader(EKS2Constants.VPC_CONFIG, VpcConfigRequest.class); + if (vpcConfig == null) { + throw new IllegalArgumentException( + "The " + EKS2Constants.VPC_CONFIG + " header must be of type " + VpcConfigRequest.class.getName() + + " but was " + value.getClass().getName()); + } + return vpcConfig; + } + /** * Gets an optional header value. */ diff --git a/components/camel-aws/camel-aws2-eks/src/test/java/org/apache/camel/component/aws2/eks/AmazonEKSClientMock.java b/components/camel-aws/camel-aws2-eks/src/test/java/org/apache/camel/component/aws2/eks/AmazonEKSClientMock.java index a6ed7246aa952..c7d65fcdc0a1e 100644 --- a/components/camel-aws/camel-aws2-eks/src/test/java/org/apache/camel/component/aws2/eks/AmazonEKSClientMock.java +++ b/components/camel-aws/camel-aws2-eks/src/test/java/org/apache/camel/component/aws2/eks/AmazonEKSClientMock.java @@ -34,11 +34,18 @@ public class AmazonEKSClientMock implements EksClient { + private CreateClusterRequest lastCreateClusterRequest; + public AmazonEKSClientMock() { } + public CreateClusterRequest getLastCreateClusterRequest() { + return lastCreateClusterRequest; + } + @Override public CreateClusterResponse createCluster(CreateClusterRequest request) { + lastCreateClusterRequest = request; CreateClusterResponse.Builder res = CreateClusterResponse.builder(); Cluster cluster = Cluster.builder().name("Test").status(ClusterStatus.ACTIVE.name()).build(); res.cluster(cluster); diff --git a/components/camel-aws/camel-aws2-eks/src/test/java/org/apache/camel/component/aws2/eks/EKS2ProducerTest.java b/components/camel-aws/camel-aws2-eks/src/test/java/org/apache/camel/component/aws2/eks/EKS2ProducerTest.java index e23b91e9ad7ca..8b67c54b92afb 100644 --- a/components/camel-aws/camel-aws2-eks/src/test/java/org/apache/camel/component/aws2/eks/EKS2ProducerTest.java +++ b/components/camel-aws/camel-aws2-eks/src/test/java/org/apache/camel/component/aws2/eks/EKS2ProducerTest.java @@ -32,6 +32,8 @@ import software.amazon.awssdk.services.eks.model.VpcConfigRequest; import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertInstanceOf; +import static org.junit.jupiter.api.Assertions.assertNull; public class EKS2ProducerTest extends CamelTestSupport { @@ -87,7 +89,7 @@ public void eksCreateClusterTest() throws Exception { public void process(Exchange exchange) { exchange.getIn().setHeader(EKS2Constants.OPERATION, EKS2Operations.createCluster); exchange.getIn().setHeader(EKS2Constants.CLUSTER_NAME, "Test"); - VpcConfigRequest req = VpcConfigRequest.builder().build(); + VpcConfigRequest req = VpcConfigRequest.builder().subnetIds("subnet-1").build(); exchange.getIn().setHeader(EKS2Constants.VPC_CONFIG, req); exchange.getIn().setHeader(EKS2Constants.ROLE_ARN, "arn:aws:eks::123456789012:user/Camel"); } @@ -97,6 +99,40 @@ public void process(Exchange exchange) { CreateClusterResponse resultGet = (CreateClusterResponse) exchange.getIn().getBody(); assertEquals("Test", resultGet.cluster().name()); + assertEquals("subnet-1", clientMock.getLastCreateClusterRequest().resourcesVpcConfig().subnetIds().get(0)); + } + + @Test + public void eksCreateClusterVpcConfigAsTextTest() { + Exchange exchange = template.send("direct:createCluster", e -> { + e.getIn().setHeader(EKS2Constants.CLUSTER_NAME, "Test"); + e.getIn().setHeader(EKS2Constants.VPC_CONFIG, "subnet-1"); + }); + + IllegalArgumentException cause = assertInstanceOf(IllegalArgumentException.class, exchange.getException()); + assertEquals("The CamelAwsEKSVPCConfig header must be of type " + VpcConfigRequest.class.getName() + + " but was java.lang.String", + cause.getMessage()); + assertNull(clientMock.getLastCreateClusterRequest()); + } + + @Test + public void eksNoOperationTest() { + Exchange exchange = template.send("direct:noOperation", e -> { + }); + + IllegalArgumentException cause = assertInstanceOf(IllegalArgumentException.class, exchange.getException()); + assertEquals("Operation must be specified, either with the operation option or the CamelAwsEKSOperation header", + cause.getMessage()); + } + + @Test + public void eksListClustersPojoEmptyBodyTest() { + Exchange exchange = template.send("direct:listPojoClusters", e -> e.getIn().setBody("")); + + IllegalArgumentException cause = assertInstanceOf(IllegalArgumentException.class, exchange.getException()); + assertEquals("Expected body of type " + ListClustersRequest.class.getName() + " but was java.lang.String", + cause.getMessage()); } @Test @@ -140,6 +176,8 @@ protected RouteBuilder createRouteBuilder() { return new RouteBuilder() { @Override public void configure() { + from("direct:noOperation").to("aws2-eks://test?eksClient=#amazonEksClient") + .to("mock:result"); from("direct:listClusters").to("aws2-eks://test?eksClient=#amazonEksClient&operation=listClusters") .to("mock:result"); from("direct:listPojoClusters") diff --git a/components/camel-aws/camel-aws2-mq/src/generated/resources/META-INF/org/apache/camel/component/aws2/mq/aws2-mq.json b/components/camel-aws/camel-aws2-mq/src/generated/resources/META-INF/org/apache/camel/component/aws2/mq/aws2-mq.json index a100694868ff0..4b7ee35955fdb 100644 --- a/components/camel-aws/camel-aws2-mq/src/generated/resources/META-INF/org/apache/camel/component/aws2/mq/aws2-mq.json +++ b/components/camel-aws/camel-aws2-mq/src/generated/resources/META-INF/org/apache/camel/component/aws2/mq/aws2-mq.json @@ -3,7 +3,7 @@ "kind": "component", "name": "aws2-mq", "title": "AWS MQ", - "description": "Send messages to AWS MQ.", + "description": "Manage AWS MQ instances.", "deprecated": false, "firstVersion": "3.1.0", "label": "cloud,messaging", @@ -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.mq.MQ2Configuration", "deprecated": false, "autowired": false, "secret": false, "description": "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 during starting and cause the route to fail being started. By deferring this startup to be lazy then the startup failure can be handled during routing messages via Camel's routing error handlers. Beware that when the first message is processed then creating and starting the producer may take a little time and prolong the total processing time of the processing." }, - "operation": { "index": 2, "kind": "property", "displayName": "Operation", "group": "producer", "label": "", "required": true, "type": "enum", "javaType": "org.apache.camel.component.aws2.mq.MQ2Operations", "enum": [ "listBrokers", "createBroker", "deleteBroker", "rebootBroker", "updateBroker", "describeBroker" ], "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.mq.MQ2Configuration", "configurationField": "configuration", "description": "The operation to perform. It can be listBrokers, createBroker, deleteBroker" }, + "operation": { "index": 2, "kind": "property", "displayName": "Operation", "group": "producer", "label": "", "required": true, "type": "enum", "javaType": "org.apache.camel.component.aws2.mq.MQ2Operations", "enum": [ "listBrokers", "createBroker", "deleteBroker", "rebootBroker", "updateBroker", "describeBroker" ], "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.mq.MQ2Configuration", "configurationField": "configuration", "description": "The operation to perform" }, "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.mq.MQ2Configuration", "configurationField": "configuration", "description": "Set the need for overriding the endpoint. This option needs to be used in combination with the uriEndpointOverride option" }, "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.mq.MQ2Configuration", "configurationField": "configuration", "description": "If we want to use a POJO request as body or not" }, "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-northeast-2", "ap-northeast-1", "me-south-1", "sa-east-1", "ap-east-1", "cn-north-1", "ca-west-1", "us-gov-west-1", "ap-southeast-1", "ap-southeast-2", "us-iso-east-1", "ap-southeast-3", "ap-southeast-4", "us-east-1", "us-east-2", "cn-northwest-1", "us-isob-east-1", "aws-global", "aws-cn-global", "aws-us-gov-global", "aws-iso-global", "aws-iso-b-global" ], "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.mq.MQ2Configuration", "configurationField": "configuration", "description": "The region in which MQ client needs to work. When using this parameter, the configuration will expect the lowercase name of the region (for example, ap-east-1) You'll need to use the name Region.EU_WEST_1.id()" }, @@ -54,19 +54,19 @@ "CamelAwsMQBrokerEngine": { "index": 3, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The Broker Engine for MQ.", "constantName": "org.apache.camel.component.aws2.mq.MQ2Constants#BROKER_ENGINE" }, "CamelAwsMQBrokerEngineVersion": { "index": 4, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The Broker Engine Version for MQ. Currently you can choose between 5.15.6 and 5.15.0 of ACTIVEMQ", "constantName": "org.apache.camel.component.aws2.mq.MQ2Constants#BROKER_ENGINE_VERSION" }, "CamelAwsMQBrokerID": { "index": 5, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The broker id", "constantName": "org.apache.camel.component.aws2.mq.MQ2Constants#BROKER_ID" }, - "CamelAwsMQConfigurationID": { "index": 6, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "software.amazon.awssdk.services.mq.model.ConfigurationId", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "A list of information about the configuration.", "constantName": "org.apache.camel.component.aws2.mq.MQ2Constants#CONFIGURATION_ID" }, + "CamelAwsMQConfigurationID": { "index": 6, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "software.amazon.awssdk.services.mq.model.ConfigurationId", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The configuration of the broker for the updateBroker operation: a ConfigurationId of the AWS SDK, or the id of the configuration as a String.", "constantName": "org.apache.camel.component.aws2.mq.MQ2Constants#CONFIGURATION_ID" }, "CamelAwsMQBrokerDeploymentMode": { "index": 7, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The deployment mode for the broker in the createBroker operation", "constantName": "org.apache.camel.component.aws2.mq.MQ2Constants#BROKER_DEPLOYMENT_MODE" }, "CamelAwsMQBrokerInstanceType": { "index": 8, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The instance type for the MQ machine in the createBroker operation", "constantName": "org.apache.camel.component.aws2.mq.MQ2Constants#BROKER_INSTANCE_TYPE" }, - "CamelAwsMQBrokerUsers": { "index": 9, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "List", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The list of users for MQ", "constantName": "org.apache.camel.component.aws2.mq.MQ2Constants#BROKER_USERS" }, + "CamelAwsMQBrokerUsers": { "index": 9, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "List", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The list of users for MQ in the createBroker operation, as User objects of the AWS SDK", "constantName": "org.apache.camel.component.aws2.mq.MQ2Constants#BROKER_USERS" }, "CamelAwsMQBrokerPubliclyAccessible": { "index": 10, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "Boolean", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "defaultValue": "false", "description": "If the MQ instance must be publicly available or not.", "constantName": "org.apache.camel.component.aws2.mq.MQ2Constants#BROKER_PUBLICLY_ACCESSIBLE" }, "CamelAwsMQNextToken": { "index": 11, "kind": "header", "displayName": "", "group": "listBrokers", "label": "listBrokers", "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.mq.MQ2Constants#NEXT_TOKEN" }, "CamelAwsMQIsTruncated": { "index": 12, "kind": "header", "displayName": "", "group": "listBrokers", "label": "listBrokers", "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.mq.MQ2Constants#IS_TRUNCATED" }, - "CamelAwsMQBrokerArn": { "index": 13, "kind": "header", "displayName": "", "group": "createBroker", "label": "createBroker", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The Amazon Resource Name (ARN) of the broker.", "constantName": "org.apache.camel.component.aws2.mq.MQ2Constants#BROKER_ARN" }, + "CamelAwsMQBrokerArn": { "index": 13, "kind": "header", "displayName": "", "group": "createBroker describeBroker", "label": "createBroker describeBroker", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The Amazon Resource Name (ARN) of the broker.", "constantName": "org.apache.camel.component.aws2.mq.MQ2Constants#BROKER_ARN" }, "CamelAwsMQBrokerState": { "index": 14, "kind": "header", "displayName": "", "group": "describeBroker", "label": "describeBroker", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The state of the broker.", "constantName": "org.apache.camel.component.aws2.mq.MQ2Constants#BROKER_STATE" } }, "properties": { "label": { "index": 0, "kind": "path", "displayName": "Label", "group": "producer", "label": "", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.mq.MQ2Configuration", "configurationField": "configuration", "description": "Logical name" }, - "operation": { "index": 1, "kind": "parameter", "displayName": "Operation", "group": "producer", "label": "", "required": true, "type": "enum", "javaType": "org.apache.camel.component.aws2.mq.MQ2Operations", "enum": [ "listBrokers", "createBroker", "deleteBroker", "rebootBroker", "updateBroker", "describeBroker" ], "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.mq.MQ2Configuration", "configurationField": "configuration", "description": "The operation to perform. It can be listBrokers, createBroker, deleteBroker" }, + "operation": { "index": 1, "kind": "parameter", "displayName": "Operation", "group": "producer", "label": "", "required": true, "type": "enum", "javaType": "org.apache.camel.component.aws2.mq.MQ2Operations", "enum": [ "listBrokers", "createBroker", "deleteBroker", "rebootBroker", "updateBroker", "describeBroker" ], "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.mq.MQ2Configuration", "configurationField": "configuration", "description": "The operation to perform" }, "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.mq.MQ2Configuration", "configurationField": "configuration", "description": "Set the need for overriding the endpoint. This option needs to be used in combination with 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.mq.MQ2Configuration", "configurationField": "configuration", "description": "If we want to use a POJO request as body or not" }, "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-northeast-2", "ap-northeast-1", "me-south-1", "sa-east-1", "ap-east-1", "cn-north-1", "ca-west-1", "us-gov-west-1", "ap-southeast-1", "ap-southeast-2", "us-iso-east-1", "ap-southeast-3", "ap-southeast-4", "us-east-1", "us-east-2", "cn-northwest-1", "us-isob-east-1", "aws-global", "aws-cn-global", "aws-us-gov-global", "aws-iso-global", "aws-iso-b-global" ], "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.mq.MQ2Configuration", "configurationField": "configuration", "description": "The region in which MQ client needs to work. When using this parameter, the configuration will expect the lowercase name of the region (for example, ap-east-1) You'll need to use the name Region.EU_WEST_1.id()" }, diff --git a/components/camel-aws/camel-aws2-mq/src/main/docs/aws2-mq-component.adoc b/components/camel-aws/camel-aws2-mq/src/main/docs/aws2-mq-component.adoc index 6de3d136a9457..977fe924290db 100644 --- a/components/camel-aws/camel-aws2-mq/src/main/docs/aws2-mq-component.adoc +++ b/components/camel-aws/camel-aws2-mq/src/main/docs/aws2-mq-component.adoc @@ -2,7 +2,7 @@ :doctitle: AWS MQ :shortname: aws2-mq :artifactid: camel-aws2-mq -:description: Send messages to AWS MQ. +:description: Manage AWS MQ instances. :since: 3.1 :supportlevel: Stable :tabs-sync-option: @@ -260,5 +260,3 @@ Maven users will need to add the following dependency to their pom.xml. ---- where `$\{camel-version}` must be replaced by the actual version of Camel. - - diff --git a/components/camel-aws/camel-aws2-mq/src/main/java/org/apache/camel/component/aws2/mq/MQ2Configuration.java b/components/camel-aws/camel-aws2-mq/src/main/java/org/apache/camel/component/aws2/mq/MQ2Configuration.java index 320c8fc1d3402..167c47201fe15 100644 --- a/components/camel-aws/camel-aws2-mq/src/main/java/org/apache/camel/component/aws2/mq/MQ2Configuration.java +++ b/components/camel-aws/camel-aws2-mq/src/main/java/org/apache/camel/component/aws2/mq/MQ2Configuration.java @@ -118,7 +118,7 @@ public MQ2Operations getOperation() { } /** - * The operation to perform. It can be listBrokers, createBroker, deleteBroker + * The operation to perform */ public void setOperation(MQ2Operations operation) { this.operation = operation; diff --git a/components/camel-aws/camel-aws2-mq/src/main/java/org/apache/camel/component/aws2/mq/MQ2Constants.java b/components/camel-aws/camel-aws2-mq/src/main/java/org/apache/camel/component/aws2/mq/MQ2Constants.java index 642213d7acb81..5eaee79274237 100644 --- a/components/camel-aws/camel-aws2-mq/src/main/java/org/apache/camel/component/aws2/mq/MQ2Constants.java +++ b/components/camel-aws/camel-aws2-mq/src/main/java/org/apache/camel/component/aws2/mq/MQ2Constants.java @@ -35,14 +35,15 @@ public interface MQ2Constants { String BROKER_ENGINE_VERSION = "CamelAwsMQBrokerEngineVersion"; @Metadata(description = "The broker id", javaType = "String") String BROKER_ID = "CamelAwsMQBrokerID"; - @Metadata(description = "A list of information about the configuration.", + @Metadata(description = "The configuration of the broker for the updateBroker operation: a ConfigurationId of the AWS SDK, or the id of the configuration as a String.", javaType = "software.amazon.awssdk.services.mq.model.ConfigurationId") String CONFIGURATION_ID = "CamelAwsMQConfigurationID"; @Metadata(description = "The deployment mode for the broker in the createBroker operation", javaType = "String") String BROKER_DEPLOYMENT_MODE = "CamelAwsMQBrokerDeploymentMode"; @Metadata(description = "The instance type for the MQ machine in the createBroker operation", javaType = "String") String BROKER_INSTANCE_TYPE = "CamelAwsMQBrokerInstanceType"; - @Metadata(description = "The list of users for MQ", javaType = "List") + @Metadata(description = "The list of users for MQ in the createBroker operation, as User objects of the AWS SDK", + javaType = "List") String BROKER_USERS = "CamelAwsMQBrokerUsers"; @Metadata(description = "If the MQ instance must be publicly available or not.", javaType = "Boolean", defaultValue = "false") @@ -57,7 +58,7 @@ public interface MQ2Constants { String IS_TRUNCATED = "CamelAwsMQIsTruncated"; // Response metadata - @Metadata(label = "createBroker", + @Metadata(label = "createBroker describeBroker", description = "The Amazon Resource Name (ARN) of the broker.", javaType = "String") String BROKER_ARN = "CamelAwsMQBrokerArn"; @Metadata(label = "describeBroker", diff --git a/components/camel-aws/camel-aws2-mq/src/main/java/org/apache/camel/component/aws2/mq/MQ2Endpoint.java b/components/camel-aws/camel-aws2-mq/src/main/java/org/apache/camel/component/aws2/mq/MQ2Endpoint.java index 76267f10158d3..8b05b758ac21d 100644 --- a/components/camel-aws/camel-aws2-mq/src/main/java/org/apache/camel/component/aws2/mq/MQ2Endpoint.java +++ b/components/camel-aws/camel-aws2-mq/src/main/java/org/apache/camel/component/aws2/mq/MQ2Endpoint.java @@ -30,7 +30,7 @@ import software.amazon.awssdk.services.mq.MqClient; /** - * Send messages to AWS MQ. + * Manage AWS MQ instances. */ @UriEndpoint(firstVersion = "3.1.0", scheme = "aws2-mq", title = "AWS MQ", syntax = "aws2-mq:label", producerOnly = true, category = { Category.CLOUD, Category.MESSAGING }, headersClass = MQ2Constants.class) diff --git a/components/camel-aws/camel-aws2-mq/src/main/java/org/apache/camel/component/aws2/mq/MQ2Producer.java b/components/camel-aws/camel-aws2-mq/src/main/java/org/apache/camel/component/aws2/mq/MQ2Producer.java index 43cc24eeb99cd..b1125b7142eb7 100644 --- a/components/camel-aws/camel-aws2-mq/src/main/java/org/apache/camel/component/aws2/mq/MQ2Producer.java +++ b/components/camel-aws/camel-aws2-mq/src/main/java/org/apache/camel/component/aws2/mq/MQ2Producer.java @@ -16,6 +16,8 @@ */ package org.apache.camel.component.aws2.mq; +import java.util.ArrayList; +import java.util.Collection; import java.util.List; import org.apache.camel.Endpoint; @@ -99,6 +101,11 @@ private MQ2Operations determineOperation(Exchange exchange) { if (operation == null) { operation = getConfiguration().getOperation(); } + if (operation == null) { + throw new IllegalArgumentException( + "Operation must be specified, either with the operation option or the " + MQ2Constants.OPERATION + + " header"); + } return operation; } @@ -162,7 +169,6 @@ private void listBrokers(MqClient mqClient, Exchange exchange) throws InvalidPay } } - @SuppressWarnings("unchecked") private void createBroker(MqClient mqClient, Exchange exchange) throws InvalidPayloadException { String brokerName; String brokerEngine; @@ -183,6 +189,8 @@ private void createBroker(MqClient mqClient, Exchange exchange) throws InvalidPa } Message message = getMessageForResponse(exchange); message.setBody(result); + message.setHeader(MQ2Constants.BROKER_ID, result.brokerId()); + message.setHeader(MQ2Constants.BROKER_ARN, result.brokerArn()); } else { throw new IllegalArgumentException( "createBroker operation requires CreateBrokerRequest in POJO mode"); @@ -219,8 +227,9 @@ private void createBroker(MqClient mqClient, Exchange exchange) throws InvalidPa } else { throw new IllegalArgumentException("Instance Type must be specified"); } - if (ObjectHelper.isNotEmpty(exchange.getIn().getHeader(MQ2Constants.BROKER_USERS))) { - users = exchange.getIn().getHeader(MQ2Constants.BROKER_USERS, List.class); + Object brokerUsers = exchange.getIn().getHeader(MQ2Constants.BROKER_USERS); + if (ObjectHelper.isNotEmpty(brokerUsers)) { + users = toUsers(brokerUsers); builder.users(users); } else { throw new IllegalArgumentException("A Users list must be specified"); @@ -348,8 +357,18 @@ private void updateBroker(MqClient mqClient, Exchange exchange) throws InvalidPa } else { throw new IllegalArgumentException(MISSING_BROKER_ID); } - if (ObjectHelper.isNotEmpty(exchange.getIn().getHeader(MQ2Constants.CONFIGURATION_ID))) { - configurationId = exchange.getIn().getHeader(MQ2Constants.CONFIGURATION_ID, ConfigurationId.class); + Object configuration = exchange.getIn().getHeader(MQ2Constants.CONFIGURATION_ID); + if (ObjectHelper.isNotEmpty(configuration)) { + if (configuration instanceof ConfigurationId cId) { + configurationId = cId; + } else if (configuration instanceof String id) { + configurationId = ConfigurationId.builder().id(id).build(); + } else { + throw new IllegalArgumentException( + "The " + MQ2Constants.CONFIGURATION_ID + " header must be a " + ConfigurationId.class.getName() + + " or the id of the configuration as a String, but was " + + configuration.getClass().getName()); + } builder.configuration(configurationId); } else { throw new IllegalArgumentException(MISSING_CONFIGURATION_ID); @@ -375,11 +394,13 @@ private void describeBroker(MqClient mqClient, Exchange exchange) throws Invalid try { result = mqClient.describeBroker(describeBrokerRequest); } catch (AwsServiceException ase) { - LOG.trace("Reboot Broker command returned the error code {}", AwsExceptionUtil.errorCode(ase)); + LOG.trace("Describe Broker command returned the error code {}", AwsExceptionUtil.errorCode(ase)); throw ase; } Message message = getMessageForResponse(exchange); message.setBody(result); + message.setHeader(MQ2Constants.BROKER_ARN, result.brokerArn()); + message.setHeader(MQ2Constants.BROKER_STATE, result.brokerStateAsString()); } else { throw new IllegalArgumentException( "describeBroker operation requires DescribeBrokerRequest in POJO mode"); @@ -406,6 +427,26 @@ private void describeBroker(MqClient mqClient, Exchange exchange) throws Invalid } } + private static List toUsers(Object brokerUsers) { + if (brokerUsers instanceof Collection collection) { + List users = new ArrayList<>(collection.size()); + for (Object element : collection) { + if (element instanceof User user) { + users.add(user); + } else { + throw new IllegalArgumentException( + "The " + MQ2Constants.BROKER_USERS + " header must be a List of " + User.class.getName() + + ", but it contains a " + + (element == null ? "null" : element.getClass().getName())); + } + } + return users; + } + throw new IllegalArgumentException( + "The " + MQ2Constants.BROKER_USERS + " header must be a List of " + User.class.getName() + ", but was a " + + brokerUsers.getClass().getName()); + } + public static Message getMessageForResponse(final Exchange exchange) { return exchange.getMessage(); } diff --git a/components/camel-aws/camel-aws2-mq/src/test/java/org/apache/camel/component/aws2/mq/AmazonMQClientMock.java b/components/camel-aws/camel-aws2-mq/src/test/java/org/apache/camel/component/aws2/mq/AmazonMQClientMock.java index 442e0b6edd63b..145a3d4593e3a 100644 --- a/components/camel-aws/camel-aws2-mq/src/test/java/org/apache/camel/component/aws2/mq/AmazonMQClientMock.java +++ b/components/camel-aws/camel-aws2-mq/src/test/java/org/apache/camel/component/aws2/mq/AmazonMQClientMock.java @@ -23,7 +23,6 @@ import software.amazon.awssdk.services.mq.MqServiceClientConfiguration; import software.amazon.awssdk.services.mq.model.BrokerState; import software.amazon.awssdk.services.mq.model.BrokerSummary; -import software.amazon.awssdk.services.mq.model.ConfigurationId; import software.amazon.awssdk.services.mq.model.CreateBrokerRequest; import software.amazon.awssdk.services.mq.model.CreateBrokerResponse; import software.amazon.awssdk.services.mq.model.DeleteBrokerRequest; @@ -59,7 +58,7 @@ public DeleteBrokerResponse deleteBroker(DeleteBrokerRequest deleteBrokerRequest @Override public DescribeBrokerResponse describeBroker(DescribeBrokerRequest describeBrokerRequest) { DescribeBrokerResponse.Builder builder = DescribeBrokerResponse.builder(); - builder.brokerId("1").brokerName("Test").brokerState(BrokerState.RUNNING.toString()); + builder.brokerId("1").brokerArn("test").brokerName("Test").brokerState(BrokerState.RUNNING.toString()); return builder.build(); } @@ -86,10 +85,7 @@ public RebootBrokerResponse rebootBroker(RebootBrokerRequest rebootBrokerRequest @Override public UpdateBrokerResponse updateBroker(UpdateBrokerRequest updateBrokerRequest) { UpdateBrokerResponse.Builder builder = UpdateBrokerResponse.builder(); - ConfigurationId.Builder cId = ConfigurationId.builder(); - cId.id("1"); - cId.revision(12); - builder.brokerId("1").configuration(cId.build()); + builder.brokerId("1").configuration(updateBrokerRequest.configuration()); return builder.build(); } diff --git a/components/camel-aws/camel-aws2-mq/src/test/java/org/apache/camel/component/aws2/mq/MQProducerTest.java b/components/camel-aws/camel-aws2-mq/src/test/java/org/apache/camel/component/aws2/mq/MQProducerTest.java index 6b7ac15d9be54..f366b1f78a4c1 100644 --- a/components/camel-aws/camel-aws2-mq/src/test/java/org/apache/camel/component/aws2/mq/MQProducerTest.java +++ b/components/camel-aws/camel-aws2-mq/src/test/java/org/apache/camel/component/aws2/mq/MQProducerTest.java @@ -18,6 +18,7 @@ import java.util.ArrayList; import java.util.List; +import java.util.Map; import org.apache.camel.BindToRegistry; import org.apache.camel.EndpointInject; @@ -29,9 +30,11 @@ import org.junit.jupiter.api.Test; import software.amazon.awssdk.services.mq.model.BrokerState; import software.amazon.awssdk.services.mq.model.ConfigurationId; +import software.amazon.awssdk.services.mq.model.CreateBrokerRequest; import software.amazon.awssdk.services.mq.model.CreateBrokerResponse; import software.amazon.awssdk.services.mq.model.DeleteBrokerResponse; import software.amazon.awssdk.services.mq.model.DeploymentMode; +import software.amazon.awssdk.services.mq.model.DescribeBrokerRequest; import software.amazon.awssdk.services.mq.model.DescribeBrokerResponse; import software.amazon.awssdk.services.mq.model.EngineType; import software.amazon.awssdk.services.mq.model.ListBrokersRequest; @@ -252,6 +255,93 @@ void describeBrokerWithPojoRequestAndWrongBodyTypeThrows() { .hasRootCauseMessage("describeBroker operation requires DescribeBrokerRequest in POJO mode"); } + @Test + void noOperationReportsHowToSetIt() { + assertThatThrownBy(() -> template.requestBody("direct:noOperation", "body")) + .hasRootCauseInstanceOf(IllegalArgumentException.class) + .hasRootCauseMessage( + "Operation must be specified, either with the operation option or the CamelAwsMQOperation header"); + } + + @Test + void createBrokerWithUsersAsStringsThrows() { + assertThatThrownBy(() -> template.requestBodyAndHeaders("direct:createBroker", "body", + Map.of( + MQ2Constants.BROKER_NAME, "test", + MQ2Constants.BROKER_DEPLOYMENT_MODE, DeploymentMode.SINGLE_INSTANCE.toString(), + MQ2Constants.BROKER_INSTANCE_TYPE, "mq.t2.micro", + MQ2Constants.BROKER_ENGINE, EngineType.ACTIVEMQ.name(), + MQ2Constants.BROKER_ENGINE_VERSION, "5.15.6", + MQ2Constants.BROKER_USERS, List.of("camel")))) + .hasRootCauseInstanceOf(IllegalArgumentException.class) + .hasRootCauseMessage("The CamelAwsMQBrokerUsers header must be a List of " + User.class.getName() + + ", but it contains a java.lang.String"); + } + + @Test + void createBrokerWithUsersAsTextThrows() { + assertThatThrownBy(() -> template.requestBodyAndHeaders("direct:createBroker", "body", + Map.of( + MQ2Constants.BROKER_NAME, "test", + MQ2Constants.BROKER_DEPLOYMENT_MODE, DeploymentMode.SINGLE_INSTANCE.toString(), + MQ2Constants.BROKER_INSTANCE_TYPE, "mq.t2.micro", + MQ2Constants.BROKER_ENGINE, EngineType.ACTIVEMQ.name(), + MQ2Constants.BROKER_ENGINE_VERSION, "5.15.6", + MQ2Constants.BROKER_USERS, "camel"))) + .hasRootCauseInstanceOf(IllegalArgumentException.class) + .hasRootCauseMessage("The CamelAwsMQBrokerUsers header must be a List of " + User.class.getName() + + ", but was a java.lang.String"); + } + + @Test + public void mqUpdateBrokerWithConfigurationIdAsTextTest() throws Exception { + Exchange exchange = template.request("direct:updateBroker", new Processor() { + @Override + public void process(Exchange exchange) { + exchange.getIn().setHeader(MQ2Constants.BROKER_ID, "1"); + exchange.getIn().setHeader(MQ2Constants.CONFIGURATION_ID, "c-123"); + } + }); + + UpdateBrokerResponse resultGet = (UpdateBrokerResponse) exchange.getIn().getBody(); + assertEquals("c-123", resultGet.configuration().id()); + } + + @Test + void mqUpdateBrokerWithConfigurationIdOfWrongTypeThrows() { + assertThatThrownBy(() -> template.requestBodyAndHeaders("direct:updateBroker", "body", + Map.of(MQ2Constants.BROKER_ID, "1", MQ2Constants.CONFIGURATION_ID, 123))) + .hasRootCauseInstanceOf(IllegalArgumentException.class) + .hasRootCauseMessage("The CamelAwsMQConfigurationID header must be a " + ConfigurationId.class.getName() + + " or the id of the configuration as a String, but was java.lang.Integer"); + } + + @Test + public void mqCreateBrokerPojoSetsHeadersTest() throws Exception { + Exchange exchange = template.request("direct:createBrokerPojo", new Processor() { + @Override + public void process(Exchange exchange) { + exchange.getIn().setBody(CreateBrokerRequest.builder().brokerName("test").build()); + } + }); + + assertEquals("1", exchange.getMessage().getHeader(MQ2Constants.BROKER_ID)); + assertEquals("test", exchange.getMessage().getHeader(MQ2Constants.BROKER_ARN)); + } + + @Test + public void mqDescribeBrokerPojoSetsHeadersTest() throws Exception { + Exchange exchange = template.request("direct:describeBrokerPojo", new Processor() { + @Override + public void process(Exchange exchange) { + exchange.getIn().setBody(DescribeBrokerRequest.builder().brokerId("1").build()); + } + }); + + assertEquals("test", exchange.getMessage().getHeader(MQ2Constants.BROKER_ARN)); + assertEquals(BrokerState.RUNNING.toString(), exchange.getMessage().getHeader(MQ2Constants.BROKER_STATE)); + } + @Override protected RouteBuilder createRouteBuilder() { return new RouteBuilder() { @@ -272,6 +362,7 @@ public void configure() { .to("mock:result"); from("direct:describeBroker").to("aws2-mq://test?amazonMqClient=#amazonMqClient&operation=describeBroker") .to("mock:result"); + from("direct:noOperation").to("aws2-mq://test?amazonMqClient=#amazonMqClient"); from("direct:createBrokerPojo") .to("aws2-mq://test?amazonMqClient=#amazonMqClient&operation=createBroker&pojoRequest=true"); from("direct:deleteBrokerPojo") diff --git a/components/camel-aws/camel-aws2-msk/src/generated/resources/META-INF/org/apache/camel/component/aws2/msk/aws2-msk.json b/components/camel-aws/camel-aws2-msk/src/generated/resources/META-INF/org/apache/camel/component/aws2/msk/aws2-msk.json index 42f2250df7faa..39676b9a4401d 100644 --- a/components/camel-aws/camel-aws2-msk/src/generated/resources/META-INF/org/apache/camel/component/aws2/msk/aws2-msk.json +++ b/components/camel-aws/camel-aws2-msk/src/generated/resources/META-INF/org/apache/camel/component/aws2/msk/aws2-msk.json @@ -50,8 +50,8 @@ "headers": { "CamelAwsMSKOperation": { "index": 0, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The operation we want to perform", "constantName": "org.apache.camel.component.aws2.msk.MSK2Constants#OPERATION" }, "CamelAwsMSKClusterFilter": { "index": 1, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The cluster name filter for list operation", "constantName": "org.apache.camel.component.aws2.msk.MSK2Constants#CLUSTERS_FILTER" }, - "CamelAwsMSKClusterName": { "index": 2, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The cluster name for list and create operation", "constantName": "org.apache.camel.component.aws2.msk.MSK2Constants#CLUSTER_NAME" }, - "CamelAwsMSKClusterArn": { "index": 3, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The cluster arn for delete operation", "constantName": "org.apache.camel.component.aws2.msk.MSK2Constants#CLUSTER_ARN" }, + "CamelAwsMSKClusterName": { "index": 2, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The cluster name for the create operation", "constantName": "org.apache.camel.component.aws2.msk.MSK2Constants#CLUSTER_NAME" }, + "CamelAwsMSKClusterArn": { "index": 3, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The cluster ARN for the delete and describe operations. It is set by the create and describe operations.", "constantName": "org.apache.camel.component.aws2.msk.MSK2Constants#CLUSTER_ARN" }, "CamelAwsMSKClusterKafkaVersion": { "index": 4, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The Kafka for the cluster during create operation", "constantName": "org.apache.camel.component.aws2.msk.MSK2Constants#CLUSTER_KAFKA_VERSION" }, "CamelAwsMSKBrokerNodesNumber": { "index": 5, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "Integer", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The number of nodes for the cluster during create operation", "constantName": "org.apache.camel.component.aws2.msk.MSK2Constants#BROKER_NODES_NUMBER" }, "CamelAwsMSKBrokerNodesGroupInfo": { "index": 6, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "software.amazon.awssdk.services.kafka.model.BrokerNodeGroupInfo", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The Broker nodes group info to provide during the create operation", "constantName": "org.apache.camel.component.aws2.msk.MSK2Constants#BROKER_NODES_GROUP_INFO" }, diff --git a/components/camel-aws/camel-aws2-msk/src/main/docs/aws2-msk-component.adoc b/components/camel-aws/camel-aws2-msk/src/main/docs/aws2-msk-component.adoc index 15c5351d88cbb..aa8c0877fdf91 100644 --- a/components/camel-aws/camel-aws2-msk/src/main/docs/aws2-msk-component.adoc +++ b/components/camel-aws/camel-aws2-msk/src/main/docs/aws2-msk-component.adoc @@ -74,7 +74,7 @@ Camel-AWS MSK component provides the following operation on the producer side: === Producer Examples -- listClusters: this operation will list the available MSK Brokers in AWS +- listClusters: this operation will list the MSK Clusters in AWS [tabs] ==== @@ -137,7 +137,7 @@ Java:: [source,java] ---- from("direct:deleteCluster") - .setHeader("CamelAwsMSKClusterArn", constant("test-kafka")) + .setHeader("CamelAwsMSKClusterArn", constant("arn:aws:kafka:us-east-1:123456789012:cluster/test-kafka/abcd1234-ab12-cd34-ef56-abcdef123456-1")) .to("aws2-msk://test?mskClient=#amazonMskClient&operation=deleteCluster"); ---- @@ -148,7 +148,7 @@ XML:: - test-kafka + arn:aws:kafka:us-east-1:123456789012:cluster/test-kafka/abcd1234-ab12-cd34-ef56-abcdef123456-1 @@ -164,7 +164,7 @@ YAML:: steps: - setHeader: name: CamelAwsMSKClusterArn - constant: test-kafka + constant: "arn:aws:kafka:us-east-1:123456789012:cluster/test-kafka/abcd1234-ab12-cd34-ef56-abcdef123456-1" - to: uri: aws2-msk://test parameters: @@ -173,20 +173,6 @@ YAML:: ---- ==== -._Java-only: uses AWS SDK `BrokerNodeGroupInfo` builder_ -[source,java] ----- -from("direct:deleteCluster") - .process(exchange -> { - exchange.getIn().setHeader("CamelAwsMSKClusterName", "test-kafka"); - exchange.getIn().setHeader("CamelAwsMSKClusterKafkaVersion", "2.1.1"); - exchange.getIn().setHeader("CamelAwsMSKBrokerNodesNumber", 2); - exchange.getIn().setHeader("CamelAwsMSKBrokerNodesGroupInfo", - BrokerNodeGroupInfo.builder().build()); - }) - .to("aws2-msk://test?mskClient=#amazonMskClient&operation=deleteCluster"); ----- - === Using a POJO as body Sometimes building an AWS Request can be complex because of multiple options. We introduce the possibility to use a POJO as the body. diff --git a/components/camel-aws/camel-aws2-msk/src/main/java/org/apache/camel/component/aws2/msk/MSK2Constants.java b/components/camel-aws/camel-aws2-msk/src/main/java/org/apache/camel/component/aws2/msk/MSK2Constants.java index 5a7288c25e649..b7f70bded035b 100644 --- a/components/camel-aws/camel-aws2-msk/src/main/java/org/apache/camel/component/aws2/msk/MSK2Constants.java +++ b/components/camel-aws/camel-aws2-msk/src/main/java/org/apache/camel/component/aws2/msk/MSK2Constants.java @@ -26,9 +26,10 @@ public interface MSK2Constants { String OPERATION = "CamelAwsMSKOperation"; @Metadata(description = "The cluster name filter for list operation", javaType = "String") String CLUSTERS_FILTER = "CamelAwsMSKClusterFilter"; - @Metadata(description = "The cluster name for list and create operation", javaType = "String") + @Metadata(description = "The cluster name for the create operation", javaType = "String") String CLUSTER_NAME = "CamelAwsMSKClusterName"; - @Metadata(description = "The cluster arn for delete operation", javaType = "String") + @Metadata(description = "The cluster ARN for the delete and describe operations. It is set by the create and describe operations.", + javaType = "String") String CLUSTER_ARN = "CamelAwsMSKClusterArn"; @Metadata(description = "The Kafka for the cluster during create operation", javaType = "String") String CLUSTER_KAFKA_VERSION = "CamelAwsMSKClusterKafkaVersion"; diff --git a/components/camel-aws/camel-aws2-msk/src/main/java/org/apache/camel/component/aws2/msk/MSK2Producer.java b/components/camel-aws/camel-aws2-msk/src/main/java/org/apache/camel/component/aws2/msk/MSK2Producer.java index 3139fcc84422d..4c37d87a8e8e8 100644 --- a/components/camel-aws/camel-aws2-msk/src/main/java/org/apache/camel/component/aws2/msk/MSK2Producer.java +++ b/components/camel-aws/camel-aws2-msk/src/main/java/org/apache/camel/component/aws2/msk/MSK2Producer.java @@ -81,6 +81,11 @@ private MSK2Operations determineOperation(Exchange exchange) { if (operation == null) { operation = getConfiguration().getOperation(); } + if (operation == null) { + throw new IllegalArgumentException( + "Operation must be specified, either with the operation option or the " + MSK2Constants.OPERATION + + " header"); + } return operation; } @@ -161,6 +166,8 @@ private void createCluster(KafkaClient mskClient, Exchange exchange) throws Inva } Message message = getMessageForResponse(exchange); message.setBody(response); + message.setHeader(MSK2Constants.CLUSTER_ARN, response.clusterArn()); + message.setHeader(MSK2Constants.CLUSTER_STATE, response.stateAsString()); } else { throw new IllegalArgumentException( "createCluster operation requires CreateClusterRequest in POJO mode"); @@ -185,10 +192,16 @@ private void createCluster(KafkaClient mskClient, Exchange exchange) throws Inva } else { throw new IllegalArgumentException("Number of Broker Nodes must be specified"); } - if (ObjectHelper.isNotEmpty(exchange.getIn().getHeader(MSK2Constants.BROKER_NODES_GROUP_INFO))) { - BrokerNodeGroupInfo brokerNodesGroupInfo - = exchange.getIn().getHeader(MSK2Constants.BROKER_NODES_GROUP_INFO, BrokerNodeGroupInfo.class); - builder.brokerNodeGroupInfo(brokerNodesGroupInfo); + Object groupInfo = exchange.getIn().getHeader(MSK2Constants.BROKER_NODES_GROUP_INFO); + if (ObjectHelper.isNotEmpty(groupInfo)) { + if (groupInfo instanceof BrokerNodeGroupInfo brokerNodesGroupInfo) { + builder.brokerNodeGroupInfo(brokerNodesGroupInfo); + } else { + throw new IllegalArgumentException( + "The " + MSK2Constants.BROKER_NODES_GROUP_INFO + " header must be a " + + BrokerNodeGroupInfo.class.getName() + " but was " + + groupInfo.getClass().getName()); + } } else { throw new IllegalArgumentException("BrokerNodeGroupInfo must be specified"); } @@ -251,11 +264,15 @@ private void describeCluster(KafkaClient mskClient, Exchange exchange) throws In try { result = mskClient.describeCluster(describeClusterRequest); } catch (AwsServiceException ase) { - LOG.trace("Delete Cluster command returned the error code {}", AwsExceptionUtil.errorCode(ase)); + LOG.trace("Describe Cluster command returned the error code {}", AwsExceptionUtil.errorCode(ase)); throw ase; } Message message = getMessageForResponse(exchange); message.setBody(result); + if (ObjectHelper.isNotEmpty(result.clusterInfo())) { + message.setHeader(MSK2Constants.CLUSTER_ARN, result.clusterInfo().clusterArn()); + message.setHeader(MSK2Constants.CLUSTER_STATE, result.clusterInfo().stateAsString()); + } } else { throw new IllegalArgumentException( "describeCluster operation requires DescribeClusterRequest in POJO mode"); diff --git a/components/camel-aws/camel-aws2-msk/src/test/java/org/apache/camel/component/aws2/msk/AmazonMSKClientMock.java b/components/camel-aws/camel-aws2-msk/src/test/java/org/apache/camel/component/aws2/msk/AmazonMSKClientMock.java index 3d1beddcf9157..f1c0254b7183d 100644 --- a/components/camel-aws/camel-aws2-msk/src/test/java/org/apache/camel/component/aws2/msk/AmazonMSKClientMock.java +++ b/components/camel-aws/camel-aws2-msk/src/test/java/org/apache/camel/component/aws2/msk/AmazonMSKClientMock.java @@ -57,6 +57,7 @@ public KafkaServiceClientConfiguration serviceClientConfiguration() { public CreateClusterResponse createCluster(CreateClusterRequest request) { CreateClusterResponse.Builder builder = CreateClusterResponse.builder(); builder.clusterName(request.clusterName()); + builder.clusterArn("test-kafka"); builder.state(ClusterState.CREATING.name()); return builder.build(); } diff --git a/components/camel-aws/camel-aws2-msk/src/test/java/org/apache/camel/component/aws2/msk/MSKProducerTest.java b/components/camel-aws/camel-aws2-msk/src/test/java/org/apache/camel/component/aws2/msk/MSKProducerTest.java index 676a16f9fa614..f92b5e757fce8 100644 --- a/components/camel-aws/camel-aws2-msk/src/test/java/org/apache/camel/component/aws2/msk/MSKProducerTest.java +++ b/components/camel-aws/camel-aws2-msk/src/test/java/org/apache/camel/component/aws2/msk/MSKProducerTest.java @@ -28,8 +28,10 @@ import org.junit.jupiter.api.Test; import software.amazon.awssdk.services.kafka.model.BrokerNodeGroupInfo; import software.amazon.awssdk.services.kafka.model.ClusterState; +import software.amazon.awssdk.services.kafka.model.CreateClusterRequest; import software.amazon.awssdk.services.kafka.model.CreateClusterResponse; import software.amazon.awssdk.services.kafka.model.DeleteClusterResponse; +import software.amazon.awssdk.services.kafka.model.DescribeClusterRequest; import software.amazon.awssdk.services.kafka.model.DescribeClusterResponse; import software.amazon.awssdk.services.kafka.model.ListClustersRequest; import software.amazon.awssdk.services.kafka.model.ListClustersResponse; @@ -177,6 +179,54 @@ void describeClusterWithPojoRequestAndWrongBodyTypeThrows() { .hasRootCauseMessage("describeCluster operation requires DescribeClusterRequest in POJO mode"); } + @Test + void noOperationReportsHowToSetIt() { + assertThatThrownBy(() -> template.requestBody("direct:noOperation", "body")) + .hasRootCauseInstanceOf(IllegalArgumentException.class) + .hasRootCauseMessage( + "Operation must be specified, either with the operation option or the CamelAwsMSKOperation header"); + } + + @Test + void createClusterWithBrokerNodesGroupInfoAsTextThrows() { + assertThatThrownBy(() -> template.requestBodyAndHeaders("direct:createCluster", "body", + Map.of( + MSK2Constants.CLUSTER_NAME, "test-kafka", + MSK2Constants.CLUSTER_KAFKA_VERSION, "2.1.1", + MSK2Constants.BROKER_NODES_NUMBER, 2, + MSK2Constants.BROKER_NODES_GROUP_INFO, "kafka.m5.large"))) + .hasRootCauseInstanceOf(IllegalArgumentException.class) + .hasRootCauseMessage("The CamelAwsMSKBrokerNodesGroupInfo header must be a " + + BrokerNodeGroupInfo.class.getName() + " but was java.lang.String"); + } + + @Test + public void mskCreateClusterPojoSetsHeadersTest() throws Exception { + Exchange exchange = template.request("direct:createClusterPojo", new Processor() { + @Override + public void process(Exchange exchange) { + exchange.getIn().setBody(CreateClusterRequest.builder().clusterName("test-kafka").kafkaVersion("2.1.1") + .numberOfBrokerNodes(2).brokerNodeGroupInfo(BrokerNodeGroupInfo.builder().build()).build()); + } + }); + + assertEquals("test-kafka", exchange.getMessage().getHeader(MSK2Constants.CLUSTER_ARN)); + assertEquals(ClusterState.CREATING.name(), exchange.getMessage().getHeader(MSK2Constants.CLUSTER_STATE)); + } + + @Test + public void mskDescribeClusterPojoSetsHeadersTest() throws Exception { + Exchange exchange = template.request("direct:describeClusterPojo", new Processor() { + @Override + public void process(Exchange exchange) { + exchange.getIn().setBody(DescribeClusterRequest.builder().clusterArn("test-kafka").build()); + } + }); + + assertEquals("test-kafka", exchange.getMessage().getHeader(MSK2Constants.CLUSTER_ARN)); + assertEquals(ClusterState.ACTIVE.name(), exchange.getMessage().getHeader(MSK2Constants.CLUSTER_STATE)); + } + @Override protected RouteBuilder createRouteBuilder() { return new RouteBuilder() { @@ -193,6 +243,7 @@ public void configure() { .to("mock:result"); from("direct:describeCluster").to("aws2-msk://test?mskClient=#amazonMskClient&operation=describeCluster") .to("mock:result"); + from("direct:noOperation").to("aws2-msk://test?mskClient=#amazonMskClient"); from("direct:createClusterPojo") .to("aws2-msk://test?mskClient=#amazonMskClient&operation=createCluster&pojoRequest=true"); from("direct:deleteClusterPojo") diff --git a/components/camel-aws/camel-aws2-rekognition/src/generated/resources/META-INF/org/apache/camel/component/aws2/rekognition/aws2-rekognition.json b/components/camel-aws/camel-aws2-rekognition/src/generated/resources/META-INF/org/apache/camel/component/aws2/rekognition/aws2-rekognition.json index 9aa551cdd4737..29fff5938e2b4 100644 --- a/components/camel-aws/camel-aws2-rekognition/src/generated/resources/META-INF/org/apache/camel/component/aws2/rekognition/aws2-rekognition.json +++ b/components/camel-aws/camel-aws2-rekognition/src/generated/resources/META-INF/org/apache/camel/component/aws2/rekognition/aws2-rekognition.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.rekognition.Rekognition2Configuration", "deprecated": false, "autowired": false, "secret": false, "description": "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 during starting and cause the route to fail being started. By deferring this startup to be lazy then the startup failure can be handled during routing messages via Camel's routing error handlers. Beware that when the first message is processed then creating and starting the producer may take a little time and prolong the total processing time of the processing." }, - "operation": { "index": 2, "kind": "property", "displayName": "Operation", "group": "producer", "label": "", "required": true, "type": "enum", "javaType": "org.apache.camel.component.aws2.rekognition.Rekognition2Operations", "enum": [ "associateFaces", "compareFaces", "createCollection", "createUser", "deleteCollection", "deleteFaces", "deleteUser", "describeCollection", "detectFaces", "detectLabels", "detectModerationLabels", "detectProtectiveEquipment", "detectText", "disassociateFaces", "getCelebrityInfo", "getMediaAnalysisJob", "indexFaces", "listCollections", "listMediaAnalysisJobs", "listFaces", "listUsers", "recognizeCelebrities", "searchFaces", "searchFacesByImage", "searchUsers", "searchUsersByImage", "startMediaAnalysisJob" ], "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.rekognition.Rekognition2Configuration", "configurationField": "configuration", "description": "The operation to perform. It can be listFunctions, getFunction, createFunction, deleteFunction or invokeFunction" }, + "operation": { "index": 2, "kind": "property", "displayName": "Operation", "group": "producer", "label": "", "required": true, "type": "enum", "javaType": "org.apache.camel.component.aws2.rekognition.Rekognition2Operations", "enum": [ "associateFaces", "compareFaces", "createCollection", "createUser", "deleteCollection", "deleteFaces", "deleteUser", "describeCollection", "detectFaces", "detectLabels", "detectModerationLabels", "detectProtectiveEquipment", "detectText", "disassociateFaces", "getCelebrityInfo", "getMediaAnalysisJob", "indexFaces", "listCollections", "listMediaAnalysisJobs", "listFaces", "listUsers", "recognizeCelebrities", "searchFaces", "searchFacesByImage", "searchUsers", "searchUsersByImage", "startMediaAnalysisJob" ], "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.rekognition.Rekognition2Configuration", "configurationField": "configuration", "description": "The operation to perform" }, "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.rekognition.Rekognition2Configuration", "configurationField": "configuration", "description": "Set the need for overriding the endpoint. This option needs to be used in combination with the uriEndpointOverride option" }, "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.rekognition.Rekognition2Configuration", "configurationField": "configuration", "description": "If we want to use a POJO request as body or not" }, "profileCredentialsName": { "index": 5, "kind": "property", "displayName": "Profile Credentials Name", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.rekognition.Rekognition2Configuration", "configurationField": "configuration", "description": "If using a profile credentials provider, this parameter will set the profile name" }, @@ -53,13 +53,13 @@ "CamelAwsRekognitionUserId": { "index": 2, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The ID of the User", "constantName": "org.apache.camel.component.aws2.rekognition.Rekognition2Constants#USER_ID" }, "CamelAwsRekognitionFaceIds": { "index": 3, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "Collection", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Collection of the Face IDs", "constantName": "org.apache.camel.component.aws2.rekognition.Rekognition2Constants#FACE_IDS" }, "CamelAwsRekognitionUserMatchThreshold": { "index": 4, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "Float", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Minimum user match confidence required for the face to be associated with a UserID that has at least one FaceID already associated", "constantName": "org.apache.camel.component.aws2.rekognition.Rekognition2Constants#USER_MATCH_THRESHOLD" }, - "CamelAwsRekognitionClientRequestToken": { "index": 5, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The ID of the User", "constantName": "org.apache.camel.component.aws2.rekognition.Rekognition2Constants#CLIENT_REQUEST_TOKEN" }, - "CamelAwsRekognitionSourceImage": { "index": 6, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "software.amazon.awssdk.services.rekognition.model.Image", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Source Input Image", "constantName": "org.apache.camel.component.aws2.rekognition.Rekognition2Constants#SOURCE_IMAGE" }, - "CamelAwsRekognitionTargetImage": { "index": 7, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "software.amazon.awssdk.services.rekognition.model.Image", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Target Input Image", "constantName": "org.apache.camel.component.aws2.rekognition.Rekognition2Constants#TARGET_IMAGE" }, + "CamelAwsRekognitionClientRequestToken": { "index": 5, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Idempotency token of the request: a retry of associateFaces, createUser, deleteUser, disassociateFaces or startMediaAnalysisJob with the same token is not processed again", "constantName": "org.apache.camel.component.aws2.rekognition.Rekognition2Constants#CLIENT_REQUEST_TOKEN" }, + "CamelAwsRekognitionSourceImage": { "index": 6, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "software.amazon.awssdk.services.rekognition.model.Image", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Source Input Image of compareFaces", "constantName": "org.apache.camel.component.aws2.rekognition.Rekognition2Constants#SOURCE_IMAGE" }, + "CamelAwsRekognitionTargetImage": { "index": 7, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "software.amazon.awssdk.services.rekognition.model.Image", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Target Input Image of compareFaces", "constantName": "org.apache.camel.component.aws2.rekognition.Rekognition2Constants#TARGET_IMAGE" }, "CamelAwsRekognitionSimilarityThreshold": { "index": 8, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "Float", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Similarity Score Threshold", "constantName": "org.apache.camel.component.aws2.rekognition.Rekognition2Constants#SIMILARITY_THRESHOLD" }, "CamelAwsRekognitionQualityFilter": { "index": 9, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Allows to filter out detected faces that dont meet a required quality bar.", "constantName": "org.apache.camel.component.aws2.rekognition.Rekognition2Constants#QUALITY_FILTER" }, - "CamelAwsRekognitionImage": { "index": 10, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "software.amazon.awssdk.services.rekognition.model.Image", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Input Image", "constantName": "org.apache.camel.component.aws2.rekognition.Rekognition2Constants#IMAGE" }, - "CamelAwsRekognitionFacialAttributes": { "index": 11, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "List", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Facial Attributes to be returned", "constantName": "org.apache.camel.component.aws2.rekognition.Rekognition2Constants#FACIAL_ATTRIBUTES" }, + "CamelAwsRekognitionImage": { "index": 10, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "software.amazon.awssdk.services.rekognition.model.Image", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Input Image of the operations that analyze an image (all but compareFaces, which uses the source and target image headers)", "constantName": "org.apache.camel.component.aws2.rekognition.Rekognition2Constants#IMAGE" }, + "CamelAwsRekognitionFacialAttributes": { "index": 11, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "Collection", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Facial Attributes to be returned by detectFaces: the names of the attributes (such as DEFAULT or ALL), or Attribute values of the AWS SDK", "constantName": "org.apache.camel.component.aws2.rekognition.Rekognition2Constants#FACIAL_ATTRIBUTES" }, "CamelAwsRekognitionMaxLabels": { "index": 12, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "Integer", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Maximum Labels to detect", "constantName": "org.apache.camel.component.aws2.rekognition.Rekognition2Constants#MAX_LABELS" }, "CamelAwsRekognitionMinConfidence": { "index": 13, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "Float", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Minimum confidence level for the labels to return", "constantName": "org.apache.camel.component.aws2.rekognition.Rekognition2Constants#MIN_CONFIDENCE" }, "CamelAwsRekognitionFeatures": { "index": 14, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "Collection", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "A list of the types of analysis to perform", "constantName": "org.apache.camel.component.aws2.rekognition.Rekognition2Constants#FEATURES" }, @@ -76,7 +76,7 @@ "CamelAwsRekognitionOperationsConfig": { "index": 25, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "software.amazon.awssdk.services.rekognition.model.MediaAnalysisOperationsConfig", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Configuration options for the media analysis job to be created", "constantName": "org.apache.camel.component.aws2.rekognition.Rekognition2Constants#OPERATIONS_CONFIG" }, "CamelAwsRekognitionKmsKeyId": { "index": 26, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The identifier for your AWS Key Management Service key (AWS KMS key)", "constantName": "org.apache.camel.component.aws2.rekognition.Rekognition2Constants#KMS_KEY_ID" }, "CamelAwsRekognitionExternalImageId": { "index": 27, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The ID used to identify a user in the collection", "constantName": "org.apache.camel.component.aws2.rekognition.Rekognition2Constants#EXTERNAL_IMAGE_ID" }, - "CamelAwsRekognitionDetectionAttributes": { "index": 28, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "Collection", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "An array of facial attributes to return", "constantName": "org.apache.camel.component.aws2.rekognition.Rekognition2Constants#DETECTION_ATTRIBUTES" }, + "CamelAwsRekognitionDetectionAttributes": { "index": 28, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "Collection", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Facial Attributes to be returned by indexFaces: the names of the attributes (such as DEFAULT or ALL), or Attribute values of the AWS SDK", "constantName": "org.apache.camel.component.aws2.rekognition.Rekognition2Constants#DETECTION_ATTRIBUTES" }, "CamelAwsRekognitionMaxFaces": { "index": 29, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "Integer", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The maximum number of faces to index", "constantName": "org.apache.camel.component.aws2.rekognition.Rekognition2Constants#MAX_FACES" }, "CamelAwsRekognitionMaxResults": { "index": 30, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "Integer", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Maximum number of results to return", "constantName": "org.apache.camel.component.aws2.rekognition.Rekognition2Constants#MAX_RESULTS" }, "CamelAwsRekognitionNextToken": { "index": 31, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Pagination token from the previous response", "constantName": "org.apache.camel.component.aws2.rekognition.Rekognition2Constants#NEXT_TOKEN" }, @@ -86,7 +86,7 @@ }, "properties": { "label": { "index": 0, "kind": "path", "displayName": "Label", "group": "producer", "label": "", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.rekognition.Rekognition2Configuration", "configurationField": "configuration", "description": "Logical name" }, - "operation": { "index": 1, "kind": "parameter", "displayName": "Operation", "group": "producer", "label": "", "required": true, "type": "enum", "javaType": "org.apache.camel.component.aws2.rekognition.Rekognition2Operations", "enum": [ "associateFaces", "compareFaces", "createCollection", "createUser", "deleteCollection", "deleteFaces", "deleteUser", "describeCollection", "detectFaces", "detectLabels", "detectModerationLabels", "detectProtectiveEquipment", "detectText", "disassociateFaces", "getCelebrityInfo", "getMediaAnalysisJob", "indexFaces", "listCollections", "listMediaAnalysisJobs", "listFaces", "listUsers", "recognizeCelebrities", "searchFaces", "searchFacesByImage", "searchUsers", "searchUsersByImage", "startMediaAnalysisJob" ], "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.rekognition.Rekognition2Configuration", "configurationField": "configuration", "description": "The operation to perform. It can be listFunctions, getFunction, createFunction, deleteFunction or invokeFunction" }, + "operation": { "index": 1, "kind": "parameter", "displayName": "Operation", "group": "producer", "label": "", "required": true, "type": "enum", "javaType": "org.apache.camel.component.aws2.rekognition.Rekognition2Operations", "enum": [ "associateFaces", "compareFaces", "createCollection", "createUser", "deleteCollection", "deleteFaces", "deleteUser", "describeCollection", "detectFaces", "detectLabels", "detectModerationLabels", "detectProtectiveEquipment", "detectText", "disassociateFaces", "getCelebrityInfo", "getMediaAnalysisJob", "indexFaces", "listCollections", "listMediaAnalysisJobs", "listFaces", "listUsers", "recognizeCelebrities", "searchFaces", "searchFacesByImage", "searchUsers", "searchUsersByImage", "startMediaAnalysisJob" ], "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.rekognition.Rekognition2Configuration", "configurationField": "configuration", "description": "The operation to perform" }, "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.rekognition.Rekognition2Configuration", "configurationField": "configuration", "description": "Set the need for overriding the endpoint. This option needs to be used in combination with 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.rekognition.Rekognition2Configuration", "configurationField": "configuration", "description": "If we want to use a POJO request as body or not" }, "profileCredentialsName": { "index": 4, "kind": "parameter", "displayName": "Profile Credentials Name", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.rekognition.Rekognition2Configuration", "configurationField": "configuration", "description": "If using a profile credentials provider, this parameter will set the profile name" }, diff --git a/components/camel-aws/camel-aws2-rekognition/src/main/docs/aws2-rekognition-component.adoc b/components/camel-aws/camel-aws2-rekognition/src/main/docs/aws2-rekognition-component.adoc index 9253f534c5d2b..b461bd70557b0 100644 --- a/components/camel-aws/camel-aws2-rekognition/src/main/docs/aws2-rekognition-component.adoc +++ b/components/camel-aws/camel-aws2-rekognition/src/main/docs/aws2-rekognition-component.adoc @@ -14,11 +14,9 @@ *{component-header}* -The AWS2 Rekognition component supports the following operations on -https://aws.amazon.com/rekognition/[AWS Rekognition]: - -- -- +The AWS2 Rekognition component supports analyzing images (faces, labels, text, celebrities and protective equipment), +managing face collections and users, and running media analysis jobs on +https://aws.amazon.com/rekognition/[AWS Rekognition]. The operations are listed under Usage. Prerequisites @@ -103,12 +101,40 @@ Camel-AWS Rekognition component provides the following operation on the producer - searchUsersByImage - startMediaAnalysisJob +=== The input image + +The operations that analyze an image (detectFaces, detectLabels, detectModerationLabels, detectProtectiveEquipment, +detectText, indexFaces, recognizeCelebrities, searchFacesByImage and searchUsersByImage) read the image from the +`CamelAwsRekognitionImage` header, which holds an `software.amazon.awssdk.services.rekognition.model.Image` of the AWS SDK. +The compareFaces operation reads the two images from the `CamelAwsRekognitionSourceImage` and +`CamelAwsRekognitionTargetImage` headers, which hold an `Image` as well. + +An `Image` holds either the bytes of the image or the location of an object in Amazon S3. +The message body is not used as the image, and neither is a byte array in the image header: build the `Image` from it. + +._Java-only: building the Image from the bytes in the message body_ +[source,java] +---- +from("direct:detectFaces") + .process(exchange -> { + byte[] bytes = exchange.getMessage().getBody(byte[].class); + Image image = Image.builder().bytes(SdkBytes.fromByteArray(bytes)).build(); + exchange.getMessage().setHeader(Rekognition2Constants.IMAGE, image); + }) + .to("aws2-rekognition://test?awsRekognitionClient=#awsRekognitionClient&operation=detectFaces"); +---- + +An image stored in Amazon S3 is given as `Image.builder().s3Object(S3Object.builder().bucket("my-bucket").name("photo.jpg").build()).build()`. + +The `CamelAwsRekognitionFacialAttributes` header of detectFaces and the `CamelAwsRekognitionDetectionAttributes` header of +indexFaces hold the names of the facial attributes to return, such as `DEFAULT` or `ALL`, as a collection of Strings +(or of `Attribute` values of the AWS SDK), or as a comma separated String. == Examples === Producer Examples -- createCollection: this operation will create a collection +- createCollection: this operation will create a collection with the id of the `CamelAwsRekognitionCollectionId` header [tabs] ==== @@ -117,6 +143,7 @@ Java:: [source,java] ---- from("direct:createCollection") + .setHeader(Rekognition2Constants.COLLECTION_ID, constant("my-collection")) .to("aws2-rekognition://test?awsRekognitionClient=#awsRekognitionClient&operation=createCollection"); ---- @@ -126,6 +153,9 @@ XML:: ---- + + my-collection + ---- @@ -138,6 +168,11 @@ YAML:: from: uri: direct:createCollection steps: + - setHeader: + name: CamelAwsRekognitionCollectionId + expression: + constant: + expression: my-collection - to: uri: aws2-rekognition://test parameters: diff --git a/components/camel-aws/camel-aws2-rekognition/src/main/java/org/apache/camel/component/aws2/rekognition/Rekognition2Configuration.java b/components/camel-aws/camel-aws2-rekognition/src/main/java/org/apache/camel/component/aws2/rekognition/Rekognition2Configuration.java index d6cb3dd4856b7..af7b6f8dd5402 100644 --- a/components/camel-aws/camel-aws2-rekognition/src/main/java/org/apache/camel/component/aws2/rekognition/Rekognition2Configuration.java +++ b/components/camel-aws/camel-aws2-rekognition/src/main/java/org/apache/camel/component/aws2/rekognition/Rekognition2Configuration.java @@ -130,7 +130,7 @@ public Rekognition2Operations getOperation() { } /** - * The operation to perform. It can be listFunctions, getFunction, createFunction, deleteFunction or invokeFunction + * The operation to perform */ public void setOperation(Rekognition2Operations operation) { this.operation = operation; diff --git a/components/camel-aws/camel-aws2-rekognition/src/main/java/org/apache/camel/component/aws2/rekognition/Rekognition2Constants.java b/components/camel-aws/camel-aws2-rekognition/src/main/java/org/apache/camel/component/aws2/rekognition/Rekognition2Constants.java index c9e8cb8cc1dab..c3938040c0fa3 100644 --- a/components/camel-aws/camel-aws2-rekognition/src/main/java/org/apache/camel/component/aws2/rekognition/Rekognition2Constants.java +++ b/components/camel-aws/camel-aws2-rekognition/src/main/java/org/apache/camel/component/aws2/rekognition/Rekognition2Constants.java @@ -37,13 +37,17 @@ public interface Rekognition2Constants { javaType = "Float") String USER_MATCH_THRESHOLD = "CamelAwsRekognitionUserMatchThreshold"; - @Metadata(description = "The ID of the User", javaType = "String") + @Metadata(description = "Idempotency token of the request: a retry of associateFaces, createUser, deleteUser, " + + "disassociateFaces or startMediaAnalysisJob with the same token is not processed again", + javaType = "String") String CLIENT_REQUEST_TOKEN = "CamelAwsRekognitionClientRequestToken"; - @Metadata(description = "Source Input Image", javaType = "software.amazon.awssdk.services.rekognition.model.Image") + @Metadata(description = "Source Input Image of compareFaces", + javaType = "software.amazon.awssdk.services.rekognition.model.Image") String SOURCE_IMAGE = "CamelAwsRekognitionSourceImage"; - @Metadata(description = "Target Input Image", javaType = "software.amazon.awssdk.services.rekognition.model.Image") + @Metadata(description = "Target Input Image of compareFaces", + javaType = "software.amazon.awssdk.services.rekognition.model.Image") String TARGET_IMAGE = "CamelAwsRekognitionTargetImage"; @Metadata(description = "Similarity Score Threshold", javaType = "Float") @@ -52,11 +56,13 @@ public interface Rekognition2Constants { @Metadata(description = "Allows to filter out detected faces that don’t meet a required quality bar.", javaType = "String") String QUALITY_FILTER = "CamelAwsRekognitionQualityFilter"; - @Metadata(description = "Input Image", javaType = "software.amazon.awssdk.services.rekognition.model.Image") + @Metadata(description = "Input Image of the operations that analyze an image (all but compareFaces, which uses the source and target image headers)", + javaType = "software.amazon.awssdk.services.rekognition.model.Image") String IMAGE = "CamelAwsRekognitionImage"; - @Metadata(description = "Facial Attributes to be returned", - javaType = "List") + @Metadata(description = "Facial Attributes to be returned by detectFaces: the names of the attributes (such as DEFAULT or ALL)," + + " or Attribute values of the AWS SDK", + javaType = "Collection") String FACIAL_ATTRIBUTES = "CamelAwsRekognitionFacialAttributes"; @Metadata(description = "Maximum Labels to detect", javaType = "Integer") @@ -116,7 +122,9 @@ public interface Rekognition2Constants { @Metadata(description = "The ID used to identify a user in the collection", javaType = "String") String EXTERNAL_IMAGE_ID = "CamelAwsRekognitionExternalImageId"; - @Metadata(description = "An array of facial attributes to return", javaType = "Collection") + @Metadata(description = "Facial Attributes to be returned by indexFaces: the names of the attributes (such as DEFAULT or ALL)," + + " or Attribute values of the AWS SDK", + javaType = "Collection") String DETECTION_ATTRIBUTES = "CamelAwsRekognitionDetectionAttributes"; @Metadata(description = "The maximum number of faces to index", javaType = "Integer") diff --git a/components/camel-aws/camel-aws2-rekognition/src/main/java/org/apache/camel/component/aws2/rekognition/Rekognition2Producer.java b/components/camel-aws/camel-aws2-rekognition/src/main/java/org/apache/camel/component/aws2/rekognition/Rekognition2Producer.java index dce041a876729..c8069c37603ad 100644 --- a/components/camel-aws/camel-aws2-rekognition/src/main/java/org/apache/camel/component/aws2/rekognition/Rekognition2Producer.java +++ b/components/camel-aws/camel-aws2-rekognition/src/main/java/org/apache/camel/component/aws2/rekognition/Rekognition2Producer.java @@ -16,6 +16,7 @@ */ package org.apache.camel.component.aws2.rekognition; +import java.util.ArrayList; import java.util.Collection; import java.util.List; @@ -156,9 +157,47 @@ private Rekognition2Operations determineOperation(Exchange exchange) { if (ObjectHelper.isEmpty(operation)) { operation = getConfiguration().getOperation(); } + if (operation == null) { + throw new IllegalArgumentException( + "Operation must be specified, either with the operation option or the " + Rekognition2Constants.OPERATION + + " header"); + } return operation; } + /** + * The facial attributes of a header, as the names of the AWS SDK (such as DEFAULT or ALL). The header can hold a + * collection (or array) of String or {@link Attribute} values, or a comma separated String. + */ + private static List getAttributeNames(Exchange exchange, String header) { + Object value = exchange.getIn().getHeader(header); + Collection elements; + if (value instanceof Collection collection) { + elements = collection; + } else if (value instanceof Object[] array) { + elements = List.of(array); + } else if (value instanceof String names) { + elements = List.of(names.split(",")); + } else { + elements = List.of(value); + } + List answer = new ArrayList<>(); + for (Object element : elements) { + if (element instanceof Attribute attribute) { + answer.add(attribute.toString()); + } else if (element instanceof String name) { + if (!name.isBlank()) { + answer.add(name.trim()); + } + } else if (element != null) { + throw new IllegalArgumentException( + "The " + header + " header must hold String or " + Attribute.class.getName() + + " values, but holds a " + element.getClass().getName()); + } + } + return answer; + } + protected Rekognition2Configuration getConfiguration() { return getEndpoint().getConfiguration(); } @@ -531,8 +570,7 @@ private void detectFaces(RekognitionClient rekognitionClient, Exchange exchange) builder.image(image); } if (ObjectHelper.isNotEmpty(exchange.getIn().getHeader(Rekognition2Constants.FACIAL_ATTRIBUTES))) { - List attributes = exchange.getIn().getHeader(Rekognition2Constants.FACIAL_ATTRIBUTES, List.class); - builder.attributes(attributes); + builder.attributesWithStrings(getAttributeNames(exchange, Rekognition2Constants.FACIAL_ATTRIBUTES)); } DetectFacesResponse result; try { @@ -881,9 +919,8 @@ private void indexFaces(RekognitionClient rekognitionClient, Exchange exchange) builder.externalImageId(externalImageId); } if (ObjectHelper.isNotEmpty(exchange.getIn().getHeader(Rekognition2Constants.DETECTION_ATTRIBUTES))) { - Collection detectionAttributes - = exchange.getIn().getHeader(Rekognition2Constants.DETECTION_ATTRIBUTES, Collection.class); - builder.detectionAttributes(detectionAttributes); + builder.detectionAttributesWithStrings( + getAttributeNames(exchange, Rekognition2Constants.DETECTION_ATTRIBUTES)); } if (ObjectHelper.isNotEmpty(exchange.getIn().getHeader(Rekognition2Constants.MAX_FACES))) { Integer maxFaces = exchange.getIn().getHeader(Rekognition2Constants.MAX_FACES, Integer.class); diff --git a/components/camel-aws/camel-aws2-rekognition/src/test/java/org/apache/camel/component/aws2/rekognition/AmazonRekognitionClientMock.java b/components/camel-aws/camel-aws2-rekognition/src/test/java/org/apache/camel/component/aws2/rekognition/AmazonRekognitionClientMock.java index 95f12158cb848..ad904516d6f27 100644 --- a/components/camel-aws/camel-aws2-rekognition/src/test/java/org/apache/camel/component/aws2/rekognition/AmazonRekognitionClientMock.java +++ b/components/camel-aws/camel-aws2-rekognition/src/test/java/org/apache/camel/component/aws2/rekognition/AmazonRekognitionClientMock.java @@ -95,6 +95,10 @@ public class AmazonRekognitionClientMock implements RekognitionClient { + volatile CompareFacesRequest lastCompareFacesRequest; + volatile DetectFacesRequest lastDetectFacesRequest; + volatile IndexFacesRequest lastIndexFacesRequest; + public AmazonRekognitionClientMock() { } @@ -110,6 +114,7 @@ public AssociateFacesResponse associateFaces(AssociateFacesRequest associateFace @Override public CompareFacesResponse compareFaces(CompareFacesRequest compareFacesRequest) { + lastCompareFacesRequest = compareFacesRequest; CompareFacesResponse.Builder result = CompareFacesResponse.builder(); ComparedFace face = ComparedFace.builder() .confidence(99.5f) @@ -162,6 +167,7 @@ public DescribeCollectionResponse describeCollection(DescribeCollectionRequest d @Override public DetectFacesResponse detectFaces(DetectFacesRequest detectFacesRequest) { + lastDetectFacesRequest = detectFacesRequest; DetectFacesResponse.Builder result = DetectFacesResponse.builder(); FaceDetail face = FaceDetail.builder() .confidence(99.5f) @@ -238,6 +244,7 @@ public GetMediaAnalysisJobResponse getMediaAnalysisJob(GetMediaAnalysisJobReques @Override public IndexFacesResponse indexFaces(IndexFacesRequest indexFacesRequest) { + lastIndexFacesRequest = indexFacesRequest; IndexFacesResponse.Builder result = IndexFacesResponse.builder(); FaceRecord record = FaceRecord.builder() .face(Face.builder().faceId("test-face-id").build()) diff --git a/components/camel-aws/camel-aws2-rekognition/src/test/java/org/apache/camel/component/aws2/rekognition/Rekognition2ProducerSpringTest.java b/components/camel-aws/camel-aws2-rekognition/src/test/java/org/apache/camel/component/aws2/rekognition/Rekognition2ProducerSpringTest.java index b8e648e4362d3..04c2a9ec5d3a0 100644 --- a/components/camel-aws/camel-aws2-rekognition/src/test/java/org/apache/camel/component/aws2/rekognition/Rekognition2ProducerSpringTest.java +++ b/components/camel-aws/camel-aws2-rekognition/src/test/java/org/apache/camel/component/aws2/rekognition/Rekognition2ProducerSpringTest.java @@ -57,7 +57,7 @@ public void rekognitionCompareFacesTest() throws Exception { @Override public void process(Exchange exchange) { exchange.getIn().setHeader(Rekognition2Constants.OPERATION, Rekognition2Operations.compareFaces); - exchange.getIn().setHeader(Rekognition2Constants.IMAGE, Image.builder().build()); + exchange.getIn().setHeader(Rekognition2Constants.SOURCE_IMAGE, Image.builder().build()); exchange.getIn().setHeader(Rekognition2Constants.TARGET_IMAGE, Image.builder().build()); } }); diff --git a/components/camel-aws/camel-aws2-rekognition/src/test/java/org/apache/camel/component/aws2/rekognition/Rekognition2ProducerTest.java b/components/camel-aws/camel-aws2-rekognition/src/test/java/org/apache/camel/component/aws2/rekognition/Rekognition2ProducerTest.java index 8283c88562b8d..482e764bce041 100644 --- a/components/camel-aws/camel-aws2-rekognition/src/test/java/org/apache/camel/component/aws2/rekognition/Rekognition2ProducerTest.java +++ b/components/camel-aws/camel-aws2-rekognition/src/test/java/org/apache/camel/component/aws2/rekognition/Rekognition2ProducerTest.java @@ -16,6 +16,8 @@ */ package org.apache.camel.component.aws2.rekognition; +import java.util.List; + import org.apache.camel.BindToRegistry; import org.apache.camel.EndpointInject; import org.apache.camel.Exchange; @@ -26,11 +28,14 @@ import org.junit.jupiter.api.Test; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.CsvSource; +import software.amazon.awssdk.core.SdkBytes; import software.amazon.awssdk.services.rekognition.model.*; import static org.assertj.core.api.Assertions.assertThatThrownBy; import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertInstanceOf; import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertTrue; public class Rekognition2ProducerTest extends CamelTestSupport { @@ -60,13 +65,15 @@ public void process(Exchange exchange) { @Test public void compareFacesTest() throws Exception { + Image sourceImage = Image.builder().bytes(SdkBytes.fromUtf8String("source")).build(); + Image targetImage = Image.builder().bytes(SdkBytes.fromUtf8String("target")).build(); mock.expectedMessageCount(1); Exchange exchange = template.request("direct:compareFaces", new Processor() { @Override public void process(Exchange exchange) { exchange.getIn().setHeader(Rekognition2Constants.OPERATION, Rekognition2Operations.compareFaces); - exchange.getIn().setHeader(Rekognition2Constants.IMAGE, Image.builder().build()); - exchange.getIn().setHeader(Rekognition2Constants.TARGET_IMAGE, Image.builder().build()); + exchange.getIn().setHeader(Rekognition2Constants.SOURCE_IMAGE, sourceImage); + exchange.getIn().setHeader(Rekognition2Constants.TARGET_IMAGE, targetImage); } }); @@ -74,6 +81,73 @@ public void process(Exchange exchange) { CompareFacesResponse result = (CompareFacesResponse) exchange.getIn().getBody(); assertEquals(1, result.faceMatches().size()); assertEquals(98.0f, result.faceMatches().get(0).similarity()); + assertEquals(sourceImage, clientMock.lastCompareFacesRequest.sourceImage()); + assertEquals(targetImage, clientMock.lastCompareFacesRequest.targetImage()); + } + + @Test + public void noOperationTest() { + Exchange exchange = template.send("direct:noOperation", e -> e.getIn().setBody("test")); + + IllegalArgumentException cause = assertInstanceOf(IllegalArgumentException.class, exchange.getException()); + assertEquals("Operation must be specified, either with the operation option or the CamelAwsRekognitionOperation header", + cause.getMessage()); + } + + @Test + public void detectFacesWithStringAttributesTest() { + template.send("direct:detectFaces", exchange -> { + exchange.getIn().setHeader(Rekognition2Constants.IMAGE, Image.builder().build()); + exchange.getIn().setHeader(Rekognition2Constants.FACIAL_ATTRIBUTES, List.of("ALL")); + }); + + assertEquals(List.of("ALL"), clientMock.lastDetectFacesRequest.attributesAsStrings()); + } + + @Test + public void detectFacesWithAttributeValuesTest() { + template.send("direct:detectFaces", exchange -> { + exchange.getIn().setHeader(Rekognition2Constants.IMAGE, Image.builder().build()); + exchange.getIn().setHeader(Rekognition2Constants.FACIAL_ATTRIBUTES, + List.of(Attribute.DEFAULT, Attribute.AGE_RANGE)); + }); + + assertEquals(List.of(Attribute.DEFAULT, Attribute.AGE_RANGE), clientMock.lastDetectFacesRequest.attributes()); + } + + @Test + public void indexFacesWithStringDetectionAttributesTest() { + template.send("direct:indexFaces", exchange -> { + exchange.getIn().setHeader(Rekognition2Constants.COLLECTION_ID, "test-collection"); + exchange.getIn().setHeader(Rekognition2Constants.IMAGE, Image.builder().build()); + exchange.getIn().setHeader(Rekognition2Constants.DETECTION_ATTRIBUTES, List.of("DEFAULT", "EMOTIONS")); + }); + + assertEquals(List.of("DEFAULT", "EMOTIONS"), clientMock.lastIndexFacesRequest.detectionAttributesAsStrings()); + } + + @Test + public void indexFacesWithCommaSeparatedDetectionAttributesTest() { + template.send("direct:indexFaces", exchange -> { + exchange.getIn().setHeader(Rekognition2Constants.COLLECTION_ID, "test-collection"); + exchange.getIn().setHeader(Rekognition2Constants.IMAGE, Image.builder().build()); + exchange.getIn().setHeader(Rekognition2Constants.DETECTION_ATTRIBUTES, "DEFAULT, EMOTIONS"); + }); + + assertEquals(List.of(Attribute.DEFAULT, Attribute.EMOTIONS), clientMock.lastIndexFacesRequest.detectionAttributes()); + } + + @Test + public void indexFacesWithWrongDetectionAttributesTypeTest() { + Exchange exchange = template.send("direct:indexFaces", e -> { + e.getIn().setHeader(Rekognition2Constants.COLLECTION_ID, "test-collection"); + e.getIn().setHeader(Rekognition2Constants.IMAGE, Image.builder().build()); + e.getIn().setHeader(Rekognition2Constants.DETECTION_ATTRIBUTES, List.of(42)); + }); + + IllegalArgumentException cause = assertInstanceOf(IllegalArgumentException.class, exchange.getException()); + assertTrue(cause.getMessage().startsWith("The CamelAwsRekognitionDetectionAttributes header must hold String or"), + cause.getMessage()); } @Test @@ -540,6 +614,8 @@ protected RouteBuilder createRouteBuilder() { return new RouteBuilder() { @Override public void configure() { + from("direct:noOperation") + .to("aws2-rekognition://test?awsRekognitionClient=#awsRekognitionClient"); from("direct:associateFaces") .to("aws2-rekognition://test?awsRekognitionClient=#awsRekognitionClient&operation=associateFaces") .to("mock:result"); diff --git a/components/camel-aws/camel-aws2-step-functions/src/main/java/org/apache/camel/component/aws2/stepfunctions/StepFunctions2Producer.java b/components/camel-aws/camel-aws2-step-functions/src/main/java/org/apache/camel/component/aws2/stepfunctions/StepFunctions2Producer.java index a40c64f6fe163..dc477736e2673 100644 --- a/components/camel-aws/camel-aws2-step-functions/src/main/java/org/apache/camel/component/aws2/stepfunctions/StepFunctions2Producer.java +++ b/components/camel-aws/camel-aws2-step-functions/src/main/java/org/apache/camel/component/aws2/stepfunctions/StepFunctions2Producer.java @@ -79,6 +79,11 @@ private StepFunctions2Operations determineOperation(Exchange exchange) { if (ObjectHelper.isEmpty(operation)) { operation = getConfiguration().getOperation(); } + if (operation == null) { + throw new IllegalArgumentException( + "Operation must be specified, either with the operation option or the " + StepFunctions2Constants.OPERATION + + " header"); + } return operation; } diff --git a/components/camel-aws/camel-aws2-step-functions/src/main/java/org/apache/camel/component/aws2/stepfunctions/client/StepFunctions2ClientFactory.java b/components/camel-aws/camel-aws2-step-functions/src/main/java/org/apache/camel/component/aws2/stepfunctions/client/StepFunctions2ClientFactory.java index 90aec221d5ed6..d878feac27e4d 100644 --- a/components/camel-aws/camel-aws2-step-functions/src/main/java/org/apache/camel/component/aws2/stepfunctions/client/StepFunctions2ClientFactory.java +++ b/components/camel-aws/camel-aws2-step-functions/src/main/java/org/apache/camel/component/aws2/stepfunctions/client/StepFunctions2ClientFactory.java @@ -18,6 +18,8 @@ import org.apache.camel.component.aws.common.AwsClientBuilderUtil; import org.apache.camel.component.aws2.stepfunctions.StepFunctions2Configuration; +import org.apache.camel.util.ObjectHelper; +import software.amazon.awssdk.core.client.config.SdkAdvancedClientOption; import software.amazon.awssdk.services.sfn.SfnClient; /** @@ -30,6 +32,9 @@ private StepFunctions2ClientFactory() { /** * Create a SfnClient based on configuration. + *

+ * When the endpoint is overridden (such as an emulator), the host prefix injection of the AWS SDK is disabled, as + * the SDK would otherwise put the {@code sync-} prefix before the host of the endpoint for startSyncExecution. * * @param configuration The StepFunctions configuration * @return Configured SfnClient @@ -37,6 +42,13 @@ private StepFunctions2ClientFactory() { public static SfnClient getSfnClient(StepFunctions2Configuration configuration) { return AwsClientBuilderUtil.buildClient( configuration, - SfnClient::builder); + SfnClient::builder, + builder -> { + if (configuration.isOverrideEndpoint() + && ObjectHelper.isNotEmpty(configuration.getUriEndpointOverride())) { + builder.overrideConfiguration( + c -> c.putAdvancedOption(SdkAdvancedClientOption.DISABLE_HOST_PREFIX_INJECTION, true)); + } + }); } } diff --git a/components/camel-aws/camel-aws2-step-functions/src/test/java/org/apache/camel/component/aws2/stepfunctions/StepFunctions2ClientFactoryTest.java b/components/camel-aws/camel-aws2-step-functions/src/test/java/org/apache/camel/component/aws2/stepfunctions/StepFunctions2ClientFactoryTest.java new file mode 100644 index 0000000000000..bd02dc44c9afd --- /dev/null +++ b/components/camel-aws/camel-aws2-step-functions/src/test/java/org/apache/camel/component/aws2/stepfunctions/StepFunctions2ClientFactoryTest.java @@ -0,0 +1,57 @@ +/* + * 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.stepfunctions; + +import org.apache.camel.component.aws2.stepfunctions.client.StepFunctions2ClientFactory; +import org.junit.jupiter.api.Test; +import software.amazon.awssdk.core.client.config.ClientOverrideConfiguration; +import software.amazon.awssdk.core.client.config.SdkAdvancedClientOption; +import software.amazon.awssdk.services.sfn.SfnClient; + +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertTrue; + +public class StepFunctions2ClientFactoryTest { + + @Test + public void hostPrefixInjectionDisabledWithEndpointOverride() { + StepFunctions2Configuration configuration = new StepFunctions2Configuration(); + configuration.setAccessKey("xxx"); + configuration.setSecretKey("yyy"); + configuration.setRegion("eu-west-1"); + configuration.setOverrideEndpoint(true); + configuration.setUriEndpointOverride("http://localhost:4566"); + + try (SfnClient client = StepFunctions2ClientFactory.getSfnClient(configuration)) { + ClientOverrideConfiguration override = client.serviceClientConfiguration().overrideConfiguration(); + assertTrue(override.advancedOption(SdkAdvancedClientOption.DISABLE_HOST_PREFIX_INJECTION).orElse(false)); + } + } + + @Test + public void hostPrefixInjectionEnabledWithoutEndpointOverride() { + StepFunctions2Configuration configuration = new StepFunctions2Configuration(); + configuration.setAccessKey("xxx"); + configuration.setSecretKey("yyy"); + configuration.setRegion("eu-west-1"); + + try (SfnClient client = StepFunctions2ClientFactory.getSfnClient(configuration)) { + ClientOverrideConfiguration override = client.serviceClientConfiguration().overrideConfiguration(); + assertFalse(override.advancedOption(SdkAdvancedClientOption.DISABLE_HOST_PREFIX_INJECTION).orElse(false)); + } + } +} diff --git a/components/camel-aws/camel-aws2-step-functions/src/test/java/org/apache/camel/component/aws2/stepfunctions/StepFunctions2ProducerTest.java b/components/camel-aws/camel-aws2-step-functions/src/test/java/org/apache/camel/component/aws2/stepfunctions/StepFunctions2ProducerTest.java index adbb04995be91..e1fdef089e876 100644 --- a/components/camel-aws/camel-aws2-step-functions/src/test/java/org/apache/camel/component/aws2/stepfunctions/StepFunctions2ProducerTest.java +++ b/components/camel-aws/camel-aws2-step-functions/src/test/java/org/apache/camel/component/aws2/stepfunctions/StepFunctions2ProducerTest.java @@ -367,11 +367,21 @@ void pojoRequestWithWrongBodyTypeThrows(String route, String expectedMessage) { .hasRootCauseMessage(expectedMessage); } + @Test + void noOperationThrows() { + assertThatThrownBy(() -> template.requestBody("direct:noOperation", "test")) + .hasRootCauseInstanceOf(IllegalArgumentException.class) + .hasRootCauseMessage( + "Operation must be specified, either with the operation option or the CamelAwsStepFunctionsOperation header"); + } + @Override protected RouteBuilder createRouteBuilder() { return new RouteBuilder() { @Override public void configure() { + from("direct:noOperation") + .to("aws2-step-functions://test?awsSfnClient=#awsSfnClient"); from("direct:createActivity") .to("aws2-step-functions://test?awsSfnClient=#awsSfnClient&operation=createActivity") .to("mock:result"); diff --git a/components/camel-aws/camel-aws2-transcribe/src/main/docs/aws2-transcribe-component.adoc b/components/camel-aws/camel-aws2-transcribe/src/main/docs/aws2-transcribe-component.adoc index bca350fcc2cb4..78b68014ec1c6 100644 --- a/components/camel-aws/camel-aws2-transcribe/src/main/docs/aws2-transcribe-component.adoc +++ b/components/camel-aws/camel-aws2-transcribe/src/main/docs/aws2-transcribe-component.adoc @@ -43,7 +43,7 @@ include::partial$component-endpoint-headers.adoc[] Required Transcribe component options -You have to provide the amazonTranscribeClient in the +You have to provide the transcribeClient in the Registry or your accessKey and secretKey to access the https://aws.amazon.com/transcribe/[Amazon Transcribe] service. diff --git a/components/camel-aws/camel-aws2-transcribe/src/main/java/org/apache/camel/component/aws2/transcribe/Transcribe2Component.java b/components/camel-aws/camel-aws2-transcribe/src/main/java/org/apache/camel/component/aws2/transcribe/Transcribe2Component.java index 126f00f0656f7..0f3e46bceae4e 100644 --- a/components/camel-aws/camel-aws2-transcribe/src/main/java/org/apache/camel/component/aws2/transcribe/Transcribe2Component.java +++ b/components/camel-aws/camel-aws2-transcribe/src/main/java/org/apache/camel/component/aws2/transcribe/Transcribe2Component.java @@ -65,10 +65,14 @@ protected Endpoint createEndpoint(String uri, String remaining, Map transcribeClient.deleteTranscriptionJob(req))); } else { throw new IllegalArgumentException( "deleteTranscriptionJob operation requires DeleteTranscriptionJobRequest in POJO mode"); @@ -285,12 +286,8 @@ private void deleteTranscriptionJob(TranscribeClient transcribeClient, Exchange String jobName = exchange.getIn().getHeader(Transcribe2Constants.TRANSCRIPTION_JOB_NAME, String.class); builder.transcriptionJobName(jobName); } - try { - transcribeClient.deleteTranscriptionJob(builder.build()); - } catch (AwsServiceException ase) { - LOG.trace("Delete Transcription Job command returned the error code {}", AwsExceptionUtil.errorCode(ase)); - throw ase; - } + setResponse(exchange, + execute("Delete Transcription Job", () -> transcribeClient.deleteTranscriptionJob(builder.build()))); } } @@ -322,10 +319,11 @@ private void createVocabulary(TranscribeClient transcribeClient, Exchange exchan String languageCode = exchange.getIn().getHeader(Transcribe2Constants.LANGUAGE_CODE, String.class); builder.languageCode(languageCode); } - if (ObjectHelper.isNotEmpty(exchange.getIn().getHeader(Transcribe2Constants.VOCABULARY_PHRASES))) { - String phrases = exchange.getIn().getHeader(Transcribe2Constants.VOCABULARY_PHRASES, String.class); + List phrases = getPhrases(exchange); + if (ObjectHelper.isNotEmpty(phrases)) { builder.phrases(phrases); } + applyIfPresent(exchange, Transcribe2Constants.VOCABULARY_FILE_URI, builder::vocabularyFileUri); CreateVocabularyResponse result; try { result = transcribeClient.createVocabulary(builder.build()); @@ -435,6 +433,11 @@ private void updateVocabulary(TranscribeClient transcribeClient, Exchange exchan String languageCode = exchange.getIn().getHeader(Transcribe2Constants.LANGUAGE_CODE, String.class); builder.languageCode(languageCode); } + List phrases = getPhrases(exchange); + if (ObjectHelper.isNotEmpty(phrases)) { + builder.phrases(phrases); + } + applyIfPresent(exchange, Transcribe2Constants.VOCABULARY_FILE_URI, builder::vocabularyFileUri); UpdateVocabularyResponse result; try { result = transcribeClient.updateVocabulary(builder.build()); @@ -451,12 +454,7 @@ private void deleteVocabulary(TranscribeClient transcribeClient, Exchange exchan if (getConfiguration().isPojoRequest()) { Object payload = exchange.getIn().getMandatoryBody(); if (payload instanceof DeleteVocabularyRequest req) { - try { - transcribeClient.deleteVocabulary(req); - } catch (AwsServiceException ase) { - LOG.trace("Delete Vocabulary command returned the error code {}", AwsExceptionUtil.errorCode(ase)); - throw ase; - } + setResponse(exchange, execute("Delete Vocabulary", () -> transcribeClient.deleteVocabulary(req))); } else { throw new IllegalArgumentException( "deleteVocabulary operation requires DeleteVocabularyRequest in POJO mode"); @@ -467,12 +465,7 @@ private void deleteVocabulary(TranscribeClient transcribeClient, Exchange exchan String vocabularyName = exchange.getIn().getHeader(Transcribe2Constants.VOCABULARY_NAME, String.class); builder.vocabularyName(vocabularyName); } - try { - transcribeClient.deleteVocabulary(builder.build()); - } catch (AwsServiceException ase) { - LOG.trace("Delete Vocabulary command returned the error code {}", AwsExceptionUtil.errorCode(ase)); - throw ase; - } + setResponse(exchange, execute("Delete Vocabulary", () -> transcribeClient.deleteVocabulary(builder.build()))); } } @@ -492,7 +485,7 @@ private void createVocabularyFilter(TranscribeClient transcribeClient, Exchange applyIfPresent(exchange, Transcribe2Constants.LANGUAGE_CODE, builder::languageCode); applyIfPresent(exchange, Transcribe2Constants.VOCABULARY_FILE_URI, builder::vocabularyFilterFileUri); applyIfPresent(exchange, Transcribe2Constants.DATA_ACCESS_ROLE_ARN, builder::dataAccessRoleArn); - List words = exchange.getIn().getHeader(Transcribe2Constants.VOCABULARY_PHRASES, List.class); + List words = getPhrases(exchange); if (ObjectHelper.isNotEmpty(words)) { builder.words(words); } @@ -552,7 +545,7 @@ private void updateVocabularyFilter(TranscribeClient transcribeClient, Exchange applyIfPresent(exchange, Transcribe2Constants.VOCABULARY_FILTER_NAME, builder::vocabularyFilterName); applyIfPresent(exchange, Transcribe2Constants.VOCABULARY_FILE_URI, builder::vocabularyFilterFileUri); applyIfPresent(exchange, Transcribe2Constants.DATA_ACCESS_ROLE_ARN, builder::dataAccessRoleArn); - List words = exchange.getIn().getHeader(Transcribe2Constants.VOCABULARY_PHRASES, List.class); + List words = getPhrases(exchange); if (ObjectHelper.isNotEmpty(words)) { builder.words(words); } @@ -917,6 +910,32 @@ private void applyIfPresent(Exchange exchange, String header, Consumer s } } + /** + * Reads the phrases (or words of a vocabulary filter) header as a list of strings. A single String is taken as a + * list of one phrase. + */ + private List getPhrases(Exchange exchange) { + Object value = exchange.getIn().getHeader(Transcribe2Constants.VOCABULARY_PHRASES); + if (value == null) { + return null; + } + if (value instanceof String phrase) { + return phrase.isBlank() ? null : List.of(phrase); + } + if (value instanceof Collection collection) { + List phrases = new ArrayList<>(collection.size()); + for (Object phrase : collection) { + if (phrase != null) { + phrases.add(phrase.toString()); + } + } + return phrases; + } + throw new IllegalArgumentException( + "The " + Transcribe2Constants.VOCABULARY_PHRASES + " header must be a List or a String, was: " + + value.getClass().getName()); + } + private void applyMaxResults(Exchange exchange, Consumer setter) { Integer maxResults = exchange.getIn().getHeader(Transcribe2Constants.MAX_RESULTS, Integer.class); if (ObjectHelper.isNotEmpty(maxResults)) { diff --git a/components/camel-aws/camel-aws2-transcribe/src/test/java/org/apache/camel/component/aws2/transcribe/Transcribe2ComponentCredentialsTest.java b/components/camel-aws/camel-aws2-transcribe/src/test/java/org/apache/camel/component/aws2/transcribe/Transcribe2ComponentCredentialsTest.java new file mode 100644 index 0000000000000..4043a071d13c9 --- /dev/null +++ b/components/camel-aws/camel-aws2-transcribe/src/test/java/org/apache/camel/component/aws2/transcribe/Transcribe2ComponentCredentialsTest.java @@ -0,0 +1,56 @@ +/* + * 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.transcribe; + +import org.apache.camel.test.junit6.CamelTestSupport; +import org.junit.jupiter.api.Test; + +import static org.assertj.core.api.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThatThrownBy; +import static org.junit.jupiter.api.Assumptions.assumeTrue; + +public class Transcribe2ComponentCredentialsTest extends CamelTestSupport { + + @Test + public void defaultCredentialsProviderWithoutKeys() throws Exception { + Transcribe2Component component = context.getComponent("aws2-transcribe", Transcribe2Component.class); + Transcribe2Endpoint endpoint = (Transcribe2Endpoint) component + .createEndpoint("aws2-transcribe://label?operation=listVocabularies&useDefaultCredentialsProvider=true"); + + assertThat(endpoint.getConfiguration().isUseDefaultCredentialsProvider()).isTrue(); + } + + @Test + public void profileCredentialsProviderWithoutKeys() throws Exception { + Transcribe2Component component = context.getComponent("aws2-transcribe", Transcribe2Component.class); + Transcribe2Endpoint endpoint = (Transcribe2Endpoint) component + .createEndpoint("aws2-transcribe://label?operation=listVocabularies&useProfileCredentialsProvider=true"); + + assertThat(endpoint.getConfiguration().isUseProfileCredentialsProvider()).isTrue(); + } + + @Test + public void noCredentialsFails() { + // the component takes the keys from the environment when the endpoint has none + assumeTrue(System.getenv("AWS_ACCESS_KEY_ID") == null && System.getProperty("aws.accessKeyId") == null); + Transcribe2Component component = context.getComponent("aws2-transcribe", Transcribe2Component.class); + + assertThatThrownBy(() -> component.createEndpoint("aws2-transcribe://label?operation=listVocabularies")) + .isInstanceOf(IllegalArgumentException.class) + .hasMessageContaining("accessKey and secretKey must be specified"); + } +} diff --git a/components/camel-aws/camel-aws2-transcribe/src/test/java/org/apache/camel/component/aws2/transcribe/Transcribe2ProducerImplementedOperationsTest.java b/components/camel-aws/camel-aws2-transcribe/src/test/java/org/apache/camel/component/aws2/transcribe/Transcribe2ProducerImplementedOperationsTest.java index 2d880e47d490a..cda5257238265 100644 --- a/components/camel-aws/camel-aws2-transcribe/src/test/java/org/apache/camel/component/aws2/transcribe/Transcribe2ProducerImplementedOperationsTest.java +++ b/components/camel-aws/camel-aws2-transcribe/src/test/java/org/apache/camel/component/aws2/transcribe/Transcribe2ProducerImplementedOperationsTest.java @@ -20,6 +20,7 @@ import java.util.Map; import org.apache.camel.BindToRegistry; +import org.apache.camel.Exchange; import org.apache.camel.builder.RouteBuilder; import org.apache.camel.test.junit6.CamelTestSupport; import org.junit.jupiter.api.Test; @@ -29,6 +30,12 @@ import software.amazon.awssdk.services.transcribe.model.CreateLanguageModelResponse; import software.amazon.awssdk.services.transcribe.model.CreateVocabularyFilterRequest; import software.amazon.awssdk.services.transcribe.model.CreateVocabularyFilterResponse; +import software.amazon.awssdk.services.transcribe.model.CreateVocabularyRequest; +import software.amazon.awssdk.services.transcribe.model.CreateVocabularyResponse; +import software.amazon.awssdk.services.transcribe.model.DeleteTranscriptionJobRequest; +import software.amazon.awssdk.services.transcribe.model.DeleteTranscriptionJobResponse; +import software.amazon.awssdk.services.transcribe.model.DeleteVocabularyRequest; +import software.amazon.awssdk.services.transcribe.model.DeleteVocabularyResponse; import software.amazon.awssdk.services.transcribe.model.ListTagsForResourceRequest; import software.amazon.awssdk.services.transcribe.model.ListTagsForResourceResponse; import software.amazon.awssdk.services.transcribe.model.ListVocabularyFiltersRequest; @@ -39,11 +46,14 @@ import software.amazon.awssdk.services.transcribe.model.TagResourceResponse; import software.amazon.awssdk.services.transcribe.model.UntagResourceRequest; import software.amazon.awssdk.services.transcribe.model.UntagResourceResponse; +import software.amazon.awssdk.services.transcribe.model.UpdateVocabularyRequest; +import software.amazon.awssdk.services.transcribe.model.UpdateVocabularyResponse; import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.ArgumentMatchers.any; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.verify; +import static org.mockito.Mockito.verifyNoInteractions; import static org.mockito.Mockito.when; /** @@ -74,6 +84,104 @@ public void createVocabularyFilterUsesNameLanguageAndWords() throws Exception { assertThat(captor.getValue().words()).containsExactly("foo", "bar"); } + @Test + public void createVocabularySendsEachPhraseAndTheFileUri() throws Exception { + when(transcribeClient.createVocabulary(any(CreateVocabularyRequest.class))) + .thenReturn(CreateVocabularyResponse.builder().build()); + + template.send("direct:createVocabulary", exchange -> { + exchange.getIn().setHeader(Transcribe2Constants.VOCABULARY_NAME, "my-vocabulary"); + exchange.getIn().setHeader(Transcribe2Constants.LANGUAGE_CODE, "en-US"); + exchange.getIn().setHeader(Transcribe2Constants.VOCABULARY_PHRASES, List.of("camel", "kamelet")); + exchange.getIn().setHeader(Transcribe2Constants.VOCABULARY_FILE_URI, "s3://bucket/vocabulary.txt"); + }); + + ArgumentCaptor captor = ArgumentCaptor.forClass(CreateVocabularyRequest.class); + verify(transcribeClient).createVocabulary(captor.capture()); + assertThat(captor.getValue().vocabularyName()).isEqualTo("my-vocabulary"); + assertThat(captor.getValue().phrases()).containsExactly("camel", "kamelet"); + assertThat(captor.getValue().vocabularyFileUri()).isEqualTo("s3://bucket/vocabulary.txt"); + } + + @Test + public void createVocabularyTakesASinglePhraseAsAList() throws Exception { + when(transcribeClient.createVocabulary(any(CreateVocabularyRequest.class))) + .thenReturn(CreateVocabularyResponse.builder().build()); + + template.send("direct:createVocabulary", exchange -> { + exchange.getIn().setHeader(Transcribe2Constants.VOCABULARY_NAME, "my-vocabulary"); + exchange.getIn().setHeader(Transcribe2Constants.VOCABULARY_PHRASES, "camel"); + }); + + ArgumentCaptor captor = ArgumentCaptor.forClass(CreateVocabularyRequest.class); + verify(transcribeClient).createVocabulary(captor.capture()); + assertThat(captor.getValue().phrases()).containsExactly("camel"); + } + + @Test + public void createVocabularyFailsWithPhrasesOfAnotherType() throws Exception { + Exchange exchange = template.send("direct:createVocabulary", e -> { + e.getIn().setHeader(Transcribe2Constants.VOCABULARY_NAME, "my-vocabulary"); + e.getIn().setHeader(Transcribe2Constants.VOCABULARY_PHRASES, 42); + }); + + assertThat(exchange.getException()).isInstanceOf(IllegalArgumentException.class) + .hasMessageContaining(Transcribe2Constants.VOCABULARY_PHRASES); + verifyNoInteractions(transcribeClient); + } + + @Test + public void updateVocabularySendsEachPhraseAndTheFileUri() throws Exception { + when(transcribeClient.updateVocabulary(any(UpdateVocabularyRequest.class))) + .thenReturn(UpdateVocabularyResponse.builder().build()); + + template.send("direct:updateVocabulary", exchange -> { + exchange.getIn().setHeader(Transcribe2Constants.VOCABULARY_NAME, "my-vocabulary"); + exchange.getIn().setHeader(Transcribe2Constants.VOCABULARY_PHRASES, List.of("camel", "kamelet")); + exchange.getIn().setHeader(Transcribe2Constants.VOCABULARY_FILE_URI, "s3://bucket/vocabulary.txt"); + }); + + ArgumentCaptor captor = ArgumentCaptor.forClass(UpdateVocabularyRequest.class); + verify(transcribeClient).updateVocabulary(captor.capture()); + assertThat(captor.getValue().phrases()).containsExactly("camel", "kamelet"); + assertThat(captor.getValue().vocabularyFileUri()).isEqualTo("s3://bucket/vocabulary.txt"); + } + + @Test + public void deleteVocabularySetsTheResponseAsBody() throws Exception { + DeleteVocabularyResponse response = DeleteVocabularyResponse.builder().build(); + when(transcribeClient.deleteVocabulary(any(DeleteVocabularyRequest.class))).thenReturn(response); + + Exchange exchange = template.send("direct:deleteVocabulary", e -> { + e.getIn().setHeader(Transcribe2Constants.VOCABULARY_NAME, "my-vocabulary"); + e.getIn().setBody("the body of the step before"); + }); + + assertThat(exchange.getMessage().getBody()).isSameAs(response); + } + + @Test + public void deleteTranscriptionJobSetsTheResponseAsBody() throws Exception { + DeleteTranscriptionJobResponse response = DeleteTranscriptionJobResponse.builder().build(); + when(transcribeClient.deleteTranscriptionJob(any(DeleteTranscriptionJobRequest.class))).thenReturn(response); + + Exchange exchange = template.send("direct:deleteTranscriptionJob", e -> { + e.getIn().setHeader(Transcribe2Constants.TRANSCRIPTION_JOB_NAME, "my-job"); + e.getIn().setBody("the body of the step before"); + }); + + assertThat(exchange.getMessage().getBody()).isSameAs(response); + } + + @Test + public void noOperationFails() throws Exception { + Exchange exchange = template.send("direct:noOperation", e -> e.getIn().setBody("test")); + + assertThat(exchange.getException()).isInstanceOf(IllegalArgumentException.class) + .hasMessage("Operation must be specified with the operation option"); + verifyNoInteractions(transcribeClient); + } + @Test public void listVocabularyFiltersUsesNameContainsAndMaxResults() throws Exception { when(transcribeClient.listVocabularyFilters(any(ListVocabularyFiltersRequest.class))) @@ -186,6 +294,11 @@ protected RouteBuilder createRouteBuilder() { @Override public void configure() { String base = "aws2-transcribe://transcribe?transcribeClient=#transcribeClient&operation="; + from("direct:noOperation").to("aws2-transcribe://transcribe?transcribeClient=#transcribeClient"); + from("direct:createVocabulary").to(base + "createVocabulary"); + from("direct:updateVocabulary").to(base + "updateVocabulary"); + from("direct:deleteVocabulary").to(base + "deleteVocabulary"); + from("direct:deleteTranscriptionJob").to(base + "deleteTranscriptionJob"); from("direct:createVocabularyFilter").to(base + "createVocabularyFilter"); from("direct:listVocabularyFilters").to(base + "listVocabularyFilters"); from("direct:createLanguageModel").to(base + "createLanguageModel"); diff --git a/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_24.adoc b/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_24.adoc index 97d2460e984d9..9e462700d699a 100644 --- a/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_24.adoc +++ b/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_24.adoc @@ -2661,3 +2661,24 @@ Node producer creates it, from the options of the Edge Node endpoint (`deviceIds Device route that starts before the Edge Node route, or while it is stopped, therefore no longer fails with a `NullPointerException` when the Device URI has no `deviceIds`. Sending to a Device endpoint while no producer of its Edge Node endpoint is started now fails the exchange with an `IllegalStateException`; before, the data was dropped. +=== camel-aws - producers without an operation, and headers of the wrong type + +The producers of `aws2-ec2`, `aws2-ecs`, `aws2-eks`, `aws2-mq`, `aws2-msk`, `aws2-rekognition`, `aws2-step-functions`, +`aws2-transcribe`, `aws-bedrock-agent` and `aws-config` now fail with an `IllegalArgumentException` that says to set +the `operation` option or the operation header, when neither is set. Before, they failed with a `NullPointerException`. + +A header that holds a value of the wrong type is no longer dropped: the request is not sent, and the exchange fails +with an `IllegalArgumentException` that names the header. This applies to `CamelAwsEKSVPCConfig`, +`CamelAwsMSKBrokerNodesGroupInfo`, `CamelAwsMQBrokerUsers` and `CamelAwsMQConfigurationID`. `CamelAwsMQConfigurationID` +also accepts the id of the configuration as a String. In `aws2-ec2`, `CamelAwsEC2InstanceType` also accepts the AWS +value of the instance type (such as `t2.micro`), and `CamelAwsEC2InstancesIds` a String of ids separated by commas. +In `aws2-rekognition`, `CamelAwsRekognitionFacialAttributes` and `CamelAwsRekognitionDetectionAttributes` also accept +the names of the attributes as Strings. + +In `aws2-transcribe`, a List in the `CamelAwsTranscribeVocabularyPhrases` header is now sent as one phrase per element +by createVocabulary, and updateVocabulary now sends the phrases too. deleteVocabulary and deleteTranscriptionJob now +set the response as the message body, as the other delete operations do. + +The catalog and the endpoint DSL of `aws-bedrock-agent` listed the headers of `aws-bedrock-agent-runtime`. They now +list the headers of `aws-bedrock-agent`, so the `CamelAwsBedrockAgentRuntime*` header names are no longer in the +header builder of the `aws-bedrock-agent` endpoint DSL. diff --git a/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/ComponentsBuilderFactory.java b/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/ComponentsBuilderFactory.java index 0134a73fbe96e..e2e1a2419259f 100644 --- a/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/ComponentsBuilderFactory.java +++ b/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/ComponentsBuilderFactory.java @@ -588,7 +588,7 @@ static Aws2LambdaComponentBuilderFactory.Aws2LambdaComponentBuilder aws2Lambda() } /** * AWS MQ (camel-aws2-mq) - * Send messages to AWS MQ. + * Manage AWS MQ instances. * * Category: cloud,messaging * Since: 3.1 diff --git a/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/Aws2MqComponentBuilderFactory.java b/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/Aws2MqComponentBuilderFactory.java index af4bc5c2153f6..512783ffb4fc3 100644 --- a/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/Aws2MqComponentBuilderFactory.java +++ b/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/Aws2MqComponentBuilderFactory.java @@ -24,7 +24,7 @@ import org.apache.camel.component.aws2.mq.MQ2Component; /** - * Send messages to AWS MQ. + * Manage AWS MQ instances. * * Generated by camel build tools - do NOT edit this file! */ @@ -33,7 +33,7 @@ public interface Aws2MqComponentBuilderFactory { /** * AWS MQ (camel-aws2-mq) - * Send messages to AWS MQ. + * Manage AWS MQ instances. * * Category: cloud,messaging * Since: 3.1 @@ -92,8 +92,7 @@ default Aws2MqComponentBuilder lazyStartProducer(boolean lazyStartProducer) { } /** - * The operation to perform. It can be listBrokers, createBroker, - * deleteBroker. + * The operation to perform. * * The option is a: * <code>org.apache.camel.component.aws2.mq.MQ2Operations</code> type. diff --git a/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/Aws2RekognitionComponentBuilderFactory.java b/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/Aws2RekognitionComponentBuilderFactory.java index 727b5ae3dce0f..c13065d1cd032 100644 --- a/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/Aws2RekognitionComponentBuilderFactory.java +++ b/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/Aws2RekognitionComponentBuilderFactory.java @@ -92,8 +92,7 @@ default Aws2RekognitionComponentBuilder lazyStartProducer(boolean lazyStartProdu } /** - * The operation to perform. It can be listFunctions, getFunction, - * createFunction, deleteFunction or invokeFunction. + * The operation to perform. * * The option is a: * <code>org.apache.camel.component.aws2.rekognition.Rekognition2Operations</code> type. diff --git a/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/AwsBedrockAgentComponentBuilderFactory.java b/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/AwsBedrockAgentComponentBuilderFactory.java index 7d69c067a5810..1abbb8295ad1e 100644 --- a/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/AwsBedrockAgentComponentBuilderFactory.java +++ b/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/AwsBedrockAgentComponentBuilderFactory.java @@ -67,7 +67,9 @@ default AwsBedrockAgentComponentBuilder configuration(org.apache.camel.component } /** - * Define the Data source Id we are going to use. + * Define the Data source Id we are going to use. The consumer and all + * the operations need it; when set, it is used instead of the + * CamelAwsBedrockAgentDataSourceId header. * * The option is a: <code>java.lang.String</code> type. * @@ -82,7 +84,26 @@ default AwsBedrockAgentComponentBuilder dataSourceId(java.lang.String dataSource } /** - * Define the Knowledge Base Id we are going to use. + * Define the Ingestion Job Id we want to track. The consumer and the + * getIngestionJob operation need it; when set, it is used instead of + * the CamelAwsBedrockAgentIngestionJobId header. + * + * The option is a: <code>java.lang.String</code> type. + * + * Group: common + * + * @param ingestionJobId the value to set + * @return the dsl builder + */ + default AwsBedrockAgentComponentBuilder ingestionJobId(java.lang.String ingestionJobId) { + doSetProperty("ingestionJobId", ingestionJobId); + return this; + } + + /** + * Define the Knowledge Base Id we are going to use. The consumer and + * all the operations need it; when set, it is used instead of the + * CamelAwsBedrockAgentKnowledgeBaseId header. * * The option is a: <code>java.lang.String</code> type. * @@ -97,7 +118,8 @@ default AwsBedrockAgentComponentBuilder knowledgeBaseId(java.lang.String knowled } /** - * The operation to perform. + * The operation to perform. It can be startIngestionJob, + * listIngestionJobs or getIngestionJob. * * The option is a: * <code>org.apache.camel.component.aws2.bedrock.agent.BedrockAgentOperations</code> type. @@ -264,21 +286,6 @@ default AwsBedrockAgentComponentBuilder bridgeErrorHandler(boolean bridgeErrorHa return this; } - /** - * Define the Ingestion Job Id we want to track. - * - * The option is a: <code>java.lang.String</code> type. - * - * Group: consumer - * - * @param ingestionJobId the value to set - * @return the dsl builder - */ - default AwsBedrockAgentComponentBuilder ingestionJobId(java.lang.String ingestionJobId) { - doSetProperty("ingestionJobId", ingestionJobId); - return this; - } - /** * Whether the producer should be started lazy (on the first message). @@ -534,6 +541,7 @@ protected boolean setPropertyOnComponent( switch (name) { case "configuration": ((BedrockAgentComponent) component).setConfiguration((org.apache.camel.component.aws2.bedrock.agent.BedrockAgentConfiguration) value); return true; case "dataSourceId": getOrCreateConfiguration((BedrockAgentComponent) component).setDataSourceId((java.lang.String) value); return true; + case "ingestionJobId": getOrCreateConfiguration((BedrockAgentComponent) component).setIngestionJobId((java.lang.String) value); return true; case "knowledgeBaseId": getOrCreateConfiguration((BedrockAgentComponent) component).setKnowledgeBaseId((java.lang.String) value); return true; case "operation": getOrCreateConfiguration((BedrockAgentComponent) component).setOperation((org.apache.camel.component.aws2.bedrock.agent.BedrockAgentOperations) value); return true; case "overrideEndpoint": getOrCreateConfiguration((BedrockAgentComponent) component).setOverrideEndpoint((boolean) value); return true; @@ -544,7 +552,6 @@ protected boolean setPropertyOnComponent( case "useDefaultCredentialsProvider": getOrCreateConfiguration((BedrockAgentComponent) component).setUseDefaultCredentialsProvider((boolean) value); return true; case "useProfileCredentialsProvider": getOrCreateConfiguration((BedrockAgentComponent) component).setUseProfileCredentialsProvider((boolean) value); return true; case "bridgeErrorHandler": ((BedrockAgentComponent) component).setBridgeErrorHandler((boolean) value); return true; - case "ingestionJobId": getOrCreateConfiguration((BedrockAgentComponent) component).setIngestionJobId((java.lang.String) value); return true; case "lazyStartProducer": ((BedrockAgentComponent) component).setLazyStartProducer((boolean) value); return true; case "autowiredEnabled": ((BedrockAgentComponent) component).setAutowiredEnabled((boolean) value); return true; case "bedrockAgentClient": getOrCreateConfiguration((BedrockAgentComponent) component).setBedrockAgentClient((software.amazon.awssdk.services.bedrockagent.BedrockAgentClient) value); return true; diff --git a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/EndpointHeaderBuilders.java b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/EndpointHeaderBuilders.java index 507e46a89f832..7a9267ee75c07 100644 --- a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/EndpointHeaderBuilders.java +++ b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/EndpointHeaderBuilders.java @@ -541,7 +541,7 @@ public static Lambda2EndpointBuilderFactory.Lambda2HeaderNameBuilder aws2Lambda( } /** * AWS MQ (camel-aws2-mq) - * Send messages to AWS MQ. + * Manage AWS MQ instances. * * Category: cloud,messaging * Since: 3.1 diff --git a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/StaticEndpointBuilders.java b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/StaticEndpointBuilders.java index 0de9679652cef..4b2f595a39de2 100644 --- a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/StaticEndpointBuilders.java +++ b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/StaticEndpointBuilders.java @@ -1772,7 +1772,7 @@ public static Lambda2EndpointBuilderFactory.Lambda2EndpointBuilder aws2Lambda(St } /** * AWS MQ (camel-aws2-mq) - * Send messages to AWS MQ. + * Manage AWS MQ instances. * * Category: cloud,messaging * Since: 3.1 @@ -1791,7 +1791,7 @@ public static MQ2EndpointBuilderFactory.MQ2EndpointBuilder aws2Mq(String path) { } /** * AWS MQ (camel-aws2-mq) - * Send messages to AWS MQ. + * Manage AWS MQ instances. * * Category: cloud,messaging * Since: 3.1 diff --git a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/AWS2EC2EndpointBuilderFactory.java b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/AWS2EC2EndpointBuilderFactory.java index a9a03e352174a..64dd2a95b936d 100644 --- a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/AWS2EC2EndpointBuilderFactory.java +++ b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/AWS2EC2EndpointBuilderFactory.java @@ -612,7 +612,9 @@ public String awsEC2ImageId() { return "CamelAwsEC2ImageId"; } /** - * The instance type we want to create and run. + * The instance type we want to create and run, as an InstanceType, its + * AWS value (such as t2.micro) or the name of the constant (such as + * T2_MICRO). * * The option is a: {@code * software.amazon.awssdk.services.ec2.model.InstanceType} type. @@ -710,7 +712,8 @@ public String awsEC2InstanceSecurityGroups() { } /** * A collection of instances IDS to execute start, stop, describe and - * terminate operations on. + * terminate operations on. A String of ids separated by commas is + * accepted too. * * The option is a: {@code Collection} type. * diff --git a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/BedrockAgentEndpointBuilderFactory.java b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/BedrockAgentEndpointBuilderFactory.java index 05f6f68c77421..7f0173d11b01d 100644 --- a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/BedrockAgentEndpointBuilderFactory.java +++ b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/BedrockAgentEndpointBuilderFactory.java @@ -44,7 +44,9 @@ default AdvancedBedrockAgentEndpointConsumerBuilder advanced() { return (AdvancedBedrockAgentEndpointConsumerBuilder) this; } /** - * Define the Data source Id we are going to use. + * Define the Data source Id we are going to use. The consumer and all + * the operations need it; when set, it is used instead of the + * CamelAwsBedrockAgentDataSourceId header. * * The option is a: java.lang.String type. * @@ -58,7 +60,25 @@ default BedrockAgentEndpointConsumerBuilder dataSourceId(String dataSourceId) { return this; } /** - * Define the Knowledge Base Id we are going to use. + * Define the Ingestion Job Id we want to track. The consumer and the + * getIngestionJob operation need it; when set, it is used instead of + * the CamelAwsBedrockAgentIngestionJobId header. + * + * The option is a: java.lang.String type. + * + * Group: common + * + * @param ingestionJobId the value to set + * @return the dsl builder + */ + default BedrockAgentEndpointConsumerBuilder ingestionJobId(String ingestionJobId) { + doSetProperty("ingestionJobId", ingestionJobId); + return this; + } + /** + * Define the Knowledge Base Id we are going to use. The consumer and + * all the operations need it; when set, it is used instead of the + * CamelAwsBedrockAgentKnowledgeBaseId header. * * The option is a: java.lang.String type. * @@ -72,7 +92,8 @@ default BedrockAgentEndpointConsumerBuilder knowledgeBaseId(String knowledgeBase return this; } /** - * The operation to perform. + * The operation to perform. It can be startIngestionJob, + * listIngestionJobs or getIngestionJob. * * The option is a: * org.apache.camel.component.aws2.bedrock.agent.BedrockAgentOperations type. @@ -88,7 +109,8 @@ default BedrockAgentEndpointConsumerBuilder operation(org.apache.camel.component return this; } /** - * The operation to perform. + * The operation to perform. It can be startIngestionJob, + * listIngestionJobs or getIngestionJob. * * The option will be converted to a * org.apache.camel.component.aws2.bedrock.agent.BedrockAgentOperations type. @@ -279,20 +301,6 @@ default BedrockAgentEndpointConsumerBuilder useProfileCredentialsProvider(String doSetProperty("useProfileCredentialsProvider", useProfileCredentialsProvider); return this; } - /** - * Define the Ingestion Job Id we want to track. - * - * The option is a: java.lang.String type. - * - * Group: consumer - * - * @param ingestionJobId the value to set - * @return the dsl builder - */ - default BedrockAgentEndpointConsumerBuilder ingestionJobId(String ingestionJobId) { - doSetProperty("ingestionJobId", ingestionJobId); - return this; - } /** * If the polling consumer did not poll any files, you can enable this * option to send an empty message (no body) instead. @@ -1175,7 +1183,9 @@ default AdvancedBedrockAgentEndpointProducerBuilder advanced() { } /** - * Define the Data source Id we are going to use. + * Define the Data source Id we are going to use. The consumer and all + * the operations need it; when set, it is used instead of the + * CamelAwsBedrockAgentDataSourceId header. * * The option is a: java.lang.String type. * @@ -1189,7 +1199,25 @@ default BedrockAgentEndpointProducerBuilder dataSourceId(String dataSourceId) { return this; } /** - * Define the Knowledge Base Id we are going to use. + * Define the Ingestion Job Id we want to track. The consumer and the + * getIngestionJob operation need it; when set, it is used instead of + * the CamelAwsBedrockAgentIngestionJobId header. + * + * The option is a: java.lang.String type. + * + * Group: common + * + * @param ingestionJobId the value to set + * @return the dsl builder + */ + default BedrockAgentEndpointProducerBuilder ingestionJobId(String ingestionJobId) { + doSetProperty("ingestionJobId", ingestionJobId); + return this; + } + /** + * Define the Knowledge Base Id we are going to use. The consumer and + * all the operations need it; when set, it is used instead of the + * CamelAwsBedrockAgentKnowledgeBaseId header. * * The option is a: java.lang.String type. * @@ -1203,7 +1231,8 @@ default BedrockAgentEndpointProducerBuilder knowledgeBaseId(String knowledgeBase return this; } /** - * The operation to perform. + * The operation to perform. It can be startIngestionJob, + * listIngestionJobs or getIngestionJob. * * The option is a: * org.apache.camel.component.aws2.bedrock.agent.BedrockAgentOperations type. @@ -1219,7 +1248,8 @@ default BedrockAgentEndpointProducerBuilder operation(org.apache.camel.component return this; } /** - * The operation to perform. + * The operation to perform. It can be startIngestionJob, + * listIngestionJobs or getIngestionJob. * * The option will be converted to a * org.apache.camel.component.aws2.bedrock.agent.BedrockAgentOperations type. @@ -1696,7 +1726,9 @@ default AdvancedBedrockAgentEndpointBuilder advanced() { } /** - * Define the Data source Id we are going to use. + * Define the Data source Id we are going to use. The consumer and all + * the operations need it; when set, it is used instead of the + * CamelAwsBedrockAgentDataSourceId header. * * The option is a: java.lang.String type. * @@ -1710,7 +1742,25 @@ default BedrockAgentEndpointBuilder dataSourceId(String dataSourceId) { return this; } /** - * Define the Knowledge Base Id we are going to use. + * Define the Ingestion Job Id we want to track. The consumer and the + * getIngestionJob operation need it; when set, it is used instead of + * the CamelAwsBedrockAgentIngestionJobId header. + * + * The option is a: java.lang.String type. + * + * Group: common + * + * @param ingestionJobId the value to set + * @return the dsl builder + */ + default BedrockAgentEndpointBuilder ingestionJobId(String ingestionJobId) { + doSetProperty("ingestionJobId", ingestionJobId); + return this; + } + /** + * Define the Knowledge Base Id we are going to use. The consumer and + * all the operations need it; when set, it is used instead of the + * CamelAwsBedrockAgentKnowledgeBaseId header. * * The option is a: java.lang.String type. * @@ -1724,7 +1774,8 @@ default BedrockAgentEndpointBuilder knowledgeBaseId(String knowledgeBaseId) { return this; } /** - * The operation to perform. + * The operation to perform. It can be startIngestionJob, + * listIngestionJobs or getIngestionJob. * * The option is a: * org.apache.camel.component.aws2.bedrock.agent.BedrockAgentOperations type. @@ -1740,7 +1791,8 @@ default BedrockAgentEndpointBuilder operation(org.apache.camel.component.aws2.be return this; } /** - * The operation to perform. + * The operation to perform. It can be startIngestionJob, + * listIngestionJobs or getIngestionJob. * * The option will be converted to a * org.apache.camel.component.aws2.bedrock.agent.BedrockAgentOperations type. @@ -2233,373 +2285,81 @@ public static class BedrockAgentHeaderNameBuilder { * * The option is a: {@code String} type. * - * Group: common - * - * @return the name of the header {@code - * AwsBedrockAgentRuntimeOperation}. - */ - public String awsBedrockAgentRuntimeOperation() { - return "CamelAwsBedrockAgentRuntimeOperation"; - } - /** - * When retrieving and generating a response, this header will contain - * the citations. - * - * The option is a: {@code String} type. - * - * Group: common - * - * @return the name of the header {@code - * AwsBedrockAgentRuntimeCitations}. - */ - public String awsBedrockAgentRuntimeCitations() { - return "CamelAwsBedrockAgentRuntimeCitations"; - } - /** - * When retrieving and generating a response, this header will contain - * he unique identifier of the session. Reuse the same value to continue - * the same session with the knowledge base. - * - * The option is a: {@code String} type. - * - * Group: common - * - * @return the name of the header {@code - * AwsBedrockAgentRuntimeSessionId}. - */ - public String awsBedrockAgentRuntimeSessionId() { - return "CamelAwsBedrockAgentRuntimeSessionId"; - } - /** - * The unique identifier of the agent to invoke. Overrides the agentId - * configured on the endpoint. - * - * The option is a: {@code String} type. - * - * Group: common - * - * @return the name of the header {@code AwsBedrockAgentRuntimeAgentId}. - */ - public String awsBedrockAgentRuntimeAgentId() { - return "CamelAwsBedrockAgentRuntimeAgentId"; - } - /** - * The unique identifier of the agent alias to invoke. Overrides the - * agentAliasId configured on the endpoint. - * - * The option is a: {@code String} type. - * - * Group: common - * - * @return the name of the header {@code - * AwsBedrockAgentRuntimeAgentAliasId}. - */ - public String awsBedrockAgentRuntimeAgentAliasId() { - return "CamelAwsBedrockAgentRuntimeAgentAliasId"; - } - /** - * Enables tracing for the agent invocation. When set, overrides the - * enableTrace option on the endpoint. + * Group: producer * - * The option is a: {@code Boolean} type. - * - * Group: common - * - * @return the name of the header {@code - * AwsBedrockAgentRuntimeAgentEnableTrace}. + * @return the name of the header {@code AwsBedrockAgentOperation}. */ - public String awsBedrockAgentRuntimeAgentEnableTrace() { - return "CamelAwsBedrockAgentRuntimeAgentEnableTrace"; + public String awsBedrockAgentOperation() { + return "CamelAwsBedrockAgentOperation"; } /** - * Ends the agent session after this invocation. - * - * The option is a: {@code Boolean} type. - * - * Group: common - * - * @return the name of the header {@code - * AwsBedrockAgentRuntimeAgentEndSession}. - */ - public String awsBedrockAgentRuntimeAgentEndSession() { - return "CamelAwsBedrockAgentRuntimeAgentEndSession"; - } - /** - * The unique identifier of the agent memory to use across sessions. + * The data source Id of the operation, used when the dataSourceId + * option is not set. * * The option is a: {@code String} type. * - * Group: common + * Group: producer * - * @return the name of the header {@code - * AwsBedrockAgentRuntimeAgentMemoryId}. + * @return the name of the header {@code AwsBedrockAgentDataSourceId}. */ - public String awsBedrockAgentRuntimeAgentMemoryId() { - return "CamelAwsBedrockAgentRuntimeAgentMemoryId"; + public String awsBedrockAgentDataSourceId() { + return "CamelAwsBedrockAgentDataSourceId"; } /** - * The streaming output mode (complete or chunks) for an agent - * invocation. When set, overrides the streamOutputMode option on the - * endpoint. + * The knowledge base Id of the operation, used when the knowledgeBaseId + * option is not set. * * The option is a: {@code String} type. * - * Group: common + * Group: producer * * @return the name of the header {@code - * AwsBedrockAgentRuntimeAgentStreamOutputMode}. + * AwsBedrockAgentKnowledgeBaseId}. */ - public String awsBedrockAgentRuntimeAgentStreamOutputMode() { - return "CamelAwsBedrockAgentRuntimeAgentStreamOutputMode"; + public String awsBedrockAgentKnowledgeBaseId() { + return "CamelAwsBedrockAgentKnowledgeBaseId"; } /** - * The foundation model used by an inline agent. Overrides the - * foundationModel configured on the endpoint. + * The id of the ingestion job of the getIngestionJob operation, used + * when the ingestionJobId option is not set. * * The option is a: {@code String} type. * - * Group: common + * Group: producer * - * @return the name of the header {@code - * AwsBedrockAgentRuntimeAgentFoundationModel}. + * @return the name of the header {@code AwsBedrockAgentIngestionJobId}. */ - public String awsBedrockAgentRuntimeAgentFoundationModel() { - return "CamelAwsBedrockAgentRuntimeAgentFoundationModel"; + public String awsBedrockAgentIngestionJobId() { + return "CamelAwsBedrockAgentIngestionJobId"; } /** - * The instruction given to an inline agent. Overrides the instruction - * configured on the endpoint. - * - * The option is a: {@code String} type. - * - * Group: common - * - * @return the name of the header {@code - * AwsBedrockAgentRuntimeAgentInstruction}. - */ - public String awsBedrockAgentRuntimeAgentInstruction() { - return "CamelAwsBedrockAgentRuntimeAgentInstruction"; - } - /** - * When invoking an agent with tracing enabled, this header will contain - * the list of TracePart emitted during the invocation. The elements are - * TracePart for invokeAgent and InlineAgentTracePart for - * invokeInlineAgent. - * - * The option is a: {@code java.util.List} type. - * - * Group: common - * - * @return the name of the header {@code - * AwsBedrockAgentRuntimeAgentTraces}. - */ - public String awsBedrockAgentRuntimeAgentTraces() { - return "CamelAwsBedrockAgentRuntimeAgentTraces"; - } - /** - * When an agent invocation requires the caller to fulfil an action, - * this header will contain the list of return-control payloads emitted - * by the agent. The elements are ReturnControlPayload for invokeAgent - * and InlineAgentReturnControlPayload for invokeInlineAgent. - * - * The option is a: {@code java.util.List} type. - * - * Group: common - * - * @return the name of the header {@code - * AwsBedrockAgentRuntimeAgentReturnControl}. - */ - public String awsBedrockAgentRuntimeAgentReturnControl() { - return "CamelAwsBedrockAgentRuntimeAgentReturnControl"; - } - /** - * When an agent invocation returns files, this header will contain the - * files emitted by the agent. The elements are FilePart for invokeAgent - * and InlineAgentFilePart for invokeInlineAgent. - * - * The option is a: {@code java.util.List} type. - * - * Group: common - * - * @return the name of the header {@code - * AwsBedrockAgentRuntimeAgentFiles}. - */ - public String awsBedrockAgentRuntimeAgentFiles() { - return "CamelAwsBedrockAgentRuntimeAgentFiles"; - } - /** - * The unique identifier of the flow to invoke. Overrides the - * flowIdentifier configured on the endpoint. - * - * The option is a: {@code String} type. - * - * Group: common - * - * @return the name of the header {@code - * AwsBedrockAgentRuntimeFlowIdentifier}. - */ - public String awsBedrockAgentRuntimeFlowIdentifier() { - return "CamelAwsBedrockAgentRuntimeFlowIdentifier"; - } - /** - * The unique identifier of the flow alias to invoke. Overrides the - * flowAliasIdentifier configured on the endpoint. - * - * The option is a: {@code String} type. - * - * Group: common - * - * @return the name of the header {@code - * AwsBedrockAgentRuntimeFlowAliasIdentifier}. - */ - public String awsBedrockAgentRuntimeFlowAliasIdentifier() { - return "CamelAwsBedrockAgentRuntimeFlowAliasIdentifier"; - } - /** - * Enables tracing for the flow invocation. When set, overrides the - * enableTrace option on the endpoint. - * - * The option is a: {@code Boolean} type. - * - * Group: common - * - * @return the name of the header {@code - * AwsBedrockAgentRuntimeFlowEnableTrace}. - */ - public String awsBedrockAgentRuntimeFlowEnableTrace() { - return "CamelAwsBedrockAgentRuntimeFlowEnableTrace"; - } - /** - * The unique identifier of an in-progress flow execution to continue. - * Used for multi-turn flow conversations. - * - * The option is a: {@code String} type. - * - * Group: common - * - * @return the name of the header {@code - * AwsBedrockAgentRuntimeFlowExecutionId}. - */ - public String awsBedrockAgentRuntimeFlowExecutionId() { - return "CamelAwsBedrockAgentRuntimeFlowExecutionId"; - } - /** - * When invoking a flow, this header will contain the list of - * FlowOutputEvent emitted by the flow. + * The status of the ingestion job, set by the consumer and by the + * getIngestionJob operation. * * The option is a: {@code - * java.util.List} type. + * software.amazon.awssdk.services.bedrockagent.model.IngestionJobStatus} type. * * Group: common * * @return the name of the header {@code - * AwsBedrockAgentRuntimeFlowOutputs}. + * AwsBedrockAgentIngestionJobStatus}. */ - public String awsBedrockAgentRuntimeFlowOutputs() { - return "CamelAwsBedrockAgentRuntimeFlowOutputs"; + public String awsBedrockAgentIngestionJobStatus() { + return "CamelAwsBedrockAgentIngestionJobStatus"; } /** - * When invoking a flow with tracing enabled, this header will contain - * the list of FlowTraceEvent emitted during execution. - * - * The option is a: {@code - * java.util.List} type. - * - * Group: common + * The failure reasons of the ingestion job, set by the consumer and by + * the getIngestionJob operation when the job has failure reasons. * - * @return the name of the header {@code - * AwsBedrockAgentRuntimeFlowTraces}. - */ - public String awsBedrockAgentRuntimeFlowTraces() { - return "CamelAwsBedrockAgentRuntimeFlowTraces"; - } - /** - * When invoking a flow, this header will contain the reason the flow - * completed (set when a FlowCompletionEvent is received). - * - * The option is a: {@code String} type. - * - * Group: common - * - * @return the name of the header {@code - * AwsBedrockAgentRuntimeFlowCompletionReason}. - */ - public String awsBedrockAgentRuntimeFlowCompletionReason() { - return "CamelAwsBedrockAgentRuntimeFlowCompletionReason"; - } - /** - * When performing a retrieve operation, this header will contain the - * list of KnowledgeBaseRetrievalResult chunks returned by the knowledge - * base. - * - * The option is a: {@code - * java.util.List} type. - * - * Group: common - * - * @return the name of the header {@code - * AwsBedrockAgentRuntimeRetrievedResults}. - */ - public String awsBedrockAgentRuntimeRetrievedResults() { - return "CamelAwsBedrockAgentRuntimeRetrievedResults"; - } - /** - * Overrides the maximum number of results returned by the retrieve - * operation. Must be a positive Integer; when not set the AWS service - * default is used. - * - * The option is a: {@code Integer} type. - * - * Group: common - * - * @return the name of the header {@code - * AwsBedrockAgentRuntimeNumberOfResults}. - */ - public String awsBedrockAgentRuntimeNumberOfResults() { - return "CamelAwsBedrockAgentRuntimeNumberOfResults"; - } - /** - * Overrides the search type used by the retrieve operation. Accepts the - * AWS SearchType enum (HYBRID, SEMANTIC) or its String representation. - * - * The option is a: {@code String} type. - * - * Group: common - * - * @return the name of the header {@code - * AwsBedrockAgentRuntimeSearchType}. - */ - public String awsBedrockAgentRuntimeSearchType() { - return "CamelAwsBedrockAgentRuntimeSearchType"; - } - /** - * Pagination token used by the retrieve operation. Set on the - * in-message to request the next page; set on the out-message when the - * response carries one. - * - * The option is a: {@code String} type. - * - * Group: common - * - * @return the name of the header {@code - * AwsBedrockAgentRuntimeNextToken}. - */ - public String awsBedrockAgentRuntimeNextToken() { - return "CamelAwsBedrockAgentRuntimeNextToken"; - } - /** - * When performing a retrieve operation, this header will contain the - * guardrail action (if any) applied by the knowledge base. - * - * The option is a: {@code String} type. + * The option is a: {@code List} type. * * Group: common * * @return the name of the header {@code - * AwsBedrockAgentRuntimeRetrieveGuardrailAction}. + * AwsBedrockAgentIngestionJobFailureReasons}. */ - public String awsBedrockAgentRuntimeRetrieveGuardrailAction() { - return "CamelAwsBedrockAgentRuntimeRetrieveGuardrailAction"; + public String awsBedrockAgentIngestionJobFailureReasons() { + return "CamelAwsBedrockAgentIngestionJobFailureReasons"; } } static BedrockAgentEndpointBuilder endpointBuilder(String componentName, String path) { diff --git a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/MQ2EndpointBuilderFactory.java b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/MQ2EndpointBuilderFactory.java index f9232832d24bb..e801fd772c718 100644 --- a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/MQ2EndpointBuilderFactory.java +++ b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/MQ2EndpointBuilderFactory.java @@ -27,7 +27,7 @@ import org.apache.camel.builder.endpoint.AbstractEndpointBuilder; /** - * Send messages to AWS MQ. + * Manage AWS MQ instances. * * Generated by camel build tools - do NOT edit this file! */ @@ -45,8 +45,7 @@ default AdvancedMQ2EndpointBuilder advanced() { } /** - * The operation to perform. It can be listBrokers, createBroker, - * deleteBroker. + * The operation to perform. * * The option is a: * org.apache.camel.component.aws2.mq.MQ2Operations type. @@ -62,8 +61,7 @@ default MQ2EndpointBuilder operation(org.apache.camel.component.aws2.mq.MQ2Opera return this; } /** - * The operation to perform. It can be listBrokers, createBroker, - * deleteBroker. + * The operation to perform. * * The option will be converted to a * org.apache.camel.component.aws2.mq.MQ2Operations type. @@ -530,7 +528,7 @@ default AdvancedMQ2EndpointBuilder amazonMqClient(String amazonMqClient) { public interface MQ2Builders { /** * AWS MQ (camel-aws2-mq) - * Send messages to AWS MQ. + * Manage AWS MQ instances. * * Category: cloud,messaging * Since: 3.1 @@ -543,7 +541,7 @@ default MQ2HeaderNameBuilder aws2Mq() { } /** * AWS MQ (camel-aws2-mq) - * Send messages to AWS MQ. + * Manage AWS MQ instances. * * Category: cloud,messaging * Since: 3.1 @@ -562,7 +560,7 @@ default MQ2EndpointBuilder aws2Mq(String path) { } /** * AWS MQ (camel-aws2-mq) - * Send messages to AWS MQ. + * Manage AWS MQ instances. * * Category: cloud,messaging * Since: 3.1 @@ -668,7 +666,9 @@ public String awsMQBrokerID() { return "CamelAwsMQBrokerID"; } /** - * A list of information about the configuration. + * The configuration of the broker for the updateBroker operation: a + * ConfigurationId of the AWS SDK, or the id of the configuration as a + * String. * * The option is a: {@code * software.amazon.awssdk.services.mq.model.ConfigurationId} type. @@ -705,7 +705,8 @@ public String awsMQBrokerInstanceType() { return "CamelAwsMQBrokerInstanceType"; } /** - * The list of users for MQ. + * The list of users for MQ in the createBroker operation, as User + * objects of the AWS SDK. * * The option is a: {@code List} type. * @@ -758,7 +759,7 @@ public String awsMQIsTruncated() { * * The option is a: {@code String} type. * - * Group: createBroker + * Group: createBroker describeBroker * * @return the name of the header {@code AwsMQBrokerArn}. */ diff --git a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/MSK2EndpointBuilderFactory.java b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/MSK2EndpointBuilderFactory.java index a68bf5a16efc8..7a300e6d60e22 100644 --- a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/MSK2EndpointBuilderFactory.java +++ b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/MSK2EndpointBuilderFactory.java @@ -616,7 +616,7 @@ public String awsMSKClusterFilter() { return "CamelAwsMSKClusterFilter"; } /** - * The cluster name for list and create operation. + * The cluster name for the create operation. * * The option is a: {@code String} type. * @@ -628,7 +628,8 @@ public String awsMSKClusterName() { return "CamelAwsMSKClusterName"; } /** - * The cluster arn for delete operation. + * The cluster ARN for the delete and describe operations. It is set by + * the create and describe operations. * * The option is a: {@code String} type. * diff --git a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/Rekognition2EndpointBuilderFactory.java b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/Rekognition2EndpointBuilderFactory.java index 019b013190753..5c2aa21c32aab 100644 --- a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/Rekognition2EndpointBuilderFactory.java +++ b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/Rekognition2EndpointBuilderFactory.java @@ -45,8 +45,7 @@ default AdvancedRekognition2EndpointBuilder advanced() { } /** - * The operation to perform. It can be listFunctions, getFunction, - * createFunction, deleteFunction or invokeFunction. + * The operation to perform. * * The option is a: * org.apache.camel.component.aws2.rekognition.Rekognition2Operations type. @@ -62,8 +61,7 @@ default Rekognition2EndpointBuilder operation(org.apache.camel.component.aws2.re return this; } /** - * The operation to perform. It can be listFunctions, getFunction, - * createFunction, deleteFunction or invokeFunction. + * The operation to perform. * * The option will be converted to a * org.apache.camel.component.aws2.rekognition.Rekognition2Operations type. @@ -656,7 +654,9 @@ public String awsRekognitionUserMatchThreshold() { return "CamelAwsRekognitionUserMatchThreshold"; } /** - * The ID of the User. + * Idempotency token of the request: a retry of associateFaces, + * createUser, deleteUser, disassociateFaces or startMediaAnalysisJob + * with the same token is not processed again. * * The option is a: {@code String} type. * @@ -669,7 +669,7 @@ public String awsRekognitionClientRequestToken() { return "CamelAwsRekognitionClientRequestToken"; } /** - * Source Input Image. + * Source Input Image of compareFaces. * * The option is a: {@code * software.amazon.awssdk.services.rekognition.model.Image} type. @@ -682,7 +682,7 @@ public String awsRekognitionSourceImage() { return "CamelAwsRekognitionSourceImage"; } /** - * Target Input Image. + * Target Input Image of compareFaces. * * The option is a: {@code * software.amazon.awssdk.services.rekognition.model.Image} type. @@ -721,7 +721,8 @@ public String awsRekognitionQualityFilter() { return "CamelAwsRekognitionQualityFilter"; } /** - * Input Image. + * Input Image of the operations that analyze an image (all but + * compareFaces, which uses the source and target image headers). * * The option is a: {@code * software.amazon.awssdk.services.rekognition.model.Image} type. @@ -734,11 +735,11 @@ public String awsRekognitionImage() { return "CamelAwsRekognitionImage"; } /** - * Facial Attributes to be returned. + * Facial Attributes to be returned by detectFaces: the names of the + * attributes (such as DEFAULT or ALL), or Attribute values of the AWS + * SDK. * - * The option is a: {@code - * List} - * type. + * The option is a: {@code Collection} type. * * Group: producer * @@ -957,7 +958,9 @@ public String awsRekognitionExternalImageId() { return "CamelAwsRekognitionExternalImageId"; } /** - * An array of facial attributes to return. + * Facial Attributes to be returned by indexFaces: the names of the + * attributes (such as DEFAULT or ALL), or Attribute values of the AWS + * SDK. * * The option is a: {@code Collection} type. * From d791ae95bba0f1b066683cb9b6b85eee2a61359f Mon Sep 17 00:00:00 2001 From: Claus Ibsen Date: Fri, 23 Oct 2026 15:01:11 +0200 Subject: [PATCH 2/5] CAMEL-26097: camel-aws2-eks - remove the CamelAwsEKSDescription header no operation reads; camel-aws2-mq - management category Co-Authored-By: Claude Opus 5.5 (1M context) Signed-off-by: Claus Ibsen --- .../apache/camel/catalog/components/aws2-eks.json | 13 ++++++------- .../apache/camel/catalog/components/aws2-mq.json | 2 +- .../apache/camel/component/aws2/eks/aws2-eks.json | 13 ++++++------- .../camel/component/aws2/eks/EKS2Constants.java | 2 -- .../org/apache/camel/component/aws2/mq/aws2-mq.json | 2 +- .../apache/camel/component/aws2/mq/MQ2Endpoint.java | 2 +- .../ROOT/pages/camel-4x-upgrade-guide-4_24.adoc | 5 +++++ .../builder/component/ComponentsBuilderFactory.java | 2 +- .../dsl/Aws2MqComponentBuilderFactory.java | 2 +- .../builder/endpoint/EndpointHeaderBuilders.java | 2 +- .../builder/endpoint/StaticEndpointBuilders.java | 4 ++-- .../endpoint/dsl/EKS2EndpointBuilderFactory.java | 12 ------------ .../endpoint/dsl/MQ2EndpointBuilderFactory.java | 6 +++--- 13 files changed, 28 insertions(+), 39 deletions(-) diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/aws2-eks.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/aws2-eks.json index b43403c1ba002..f4f017b778917 100644 --- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/aws2-eks.json +++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/aws2-eks.json @@ -50,13 +50,12 @@ "headers": { "CamelAwsEKSOperation": { "index": 0, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The operation we want to perform", "constantName": "org.apache.camel.component.aws2.eks.EKS2Constants#OPERATION" }, "CamelAwsEKSMaxResults": { "index": 1, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "Integer", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The limit number of results while listing clusters", "constantName": "org.apache.camel.component.aws2.eks.EKS2Constants#MAX_RESULTS" }, - "CamelAwsEKSDescription": { "index": 2, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "A key description to use while performing a createKey operation", "constantName": "org.apache.camel.component.aws2.eks.EKS2Constants#DESCRIPTION" }, - "CamelAwsEKSClusterName": { "index": 3, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The cluster name", "constantName": "org.apache.camel.component.aws2.eks.EKS2Constants#CLUSTER_NAME" }, - "CamelAwsEKSRoleARN": { "index": 4, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The role ARN to use while creating the cluster", "constantName": "org.apache.camel.component.aws2.eks.EKS2Constants#ROLE_ARN" }, - "CamelAwsEKSVPCConfig": { "index": 5, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "software.amazon.awssdk.services.eks.model.VpcConfigRequest", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The VPC config for the creations of an EKS cluster", "constantName": "org.apache.camel.component.aws2.eks.EKS2Constants#VPC_CONFIG" }, - "CamelAwsEKSNextToken": { "index": 6, "kind": "header", "displayName": "", "group": "listClusters", "label": "listClusters", "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.eks.EKS2Constants#NEXT_TOKEN" }, - "CamelAwsEKSIsTruncated": { "index": 7, "kind": "header", "displayName": "", "group": "listClusters", "label": "listClusters", "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.eks.EKS2Constants#IS_TRUNCATED" }, - "CamelAwsEKSClusterArn": { "index": 8, "kind": "header", "displayName": "", "group": "createCluster describeCluster deleteCluster", "label": "createCluster describeCluster deleteCluster", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The ARN of the cluster.", "constantName": "org.apache.camel.component.aws2.eks.EKS2Constants#CLUSTER_ARN" } + "CamelAwsEKSClusterName": { "index": 2, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The cluster name", "constantName": "org.apache.camel.component.aws2.eks.EKS2Constants#CLUSTER_NAME" }, + "CamelAwsEKSRoleARN": { "index": 3, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The role ARN to use while creating the cluster", "constantName": "org.apache.camel.component.aws2.eks.EKS2Constants#ROLE_ARN" }, + "CamelAwsEKSVPCConfig": { "index": 4, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "software.amazon.awssdk.services.eks.model.VpcConfigRequest", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The VPC config for the creations of an EKS cluster", "constantName": "org.apache.camel.component.aws2.eks.EKS2Constants#VPC_CONFIG" }, + "CamelAwsEKSNextToken": { "index": 5, "kind": "header", "displayName": "", "group": "listClusters", "label": "listClusters", "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.eks.EKS2Constants#NEXT_TOKEN" }, + "CamelAwsEKSIsTruncated": { "index": 6, "kind": "header", "displayName": "", "group": "listClusters", "label": "listClusters", "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.eks.EKS2Constants#IS_TRUNCATED" }, + "CamelAwsEKSClusterArn": { "index": 7, "kind": "header", "displayName": "", "group": "createCluster describeCluster deleteCluster", "label": "createCluster describeCluster deleteCluster", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The ARN of the cluster.", "constantName": "org.apache.camel.component.aws2.eks.EKS2Constants#CLUSTER_ARN" } }, "properties": { "label": { "index": 0, "kind": "path", "displayName": "Label", "group": "producer", "label": "", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.eks.EKS2Configuration", "configurationField": "configuration", "description": "Logical name" }, diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/aws2-mq.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/aws2-mq.json index 4b7ee35955fdb..02fd2bca74017 100644 --- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/aws2-mq.json +++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/aws2-mq.json @@ -6,7 +6,7 @@ "description": "Manage AWS MQ instances.", "deprecated": false, "firstVersion": "3.1.0", - "label": "cloud,messaging", + "label": "cloud,management", "javaType": "org.apache.camel.component.aws2.mq.MQ2Component", "supportLevel": "Stable", "groupId": "org.apache.camel", diff --git a/components/camel-aws/camel-aws2-eks/src/generated/resources/META-INF/org/apache/camel/component/aws2/eks/aws2-eks.json b/components/camel-aws/camel-aws2-eks/src/generated/resources/META-INF/org/apache/camel/component/aws2/eks/aws2-eks.json index b43403c1ba002..f4f017b778917 100644 --- a/components/camel-aws/camel-aws2-eks/src/generated/resources/META-INF/org/apache/camel/component/aws2/eks/aws2-eks.json +++ b/components/camel-aws/camel-aws2-eks/src/generated/resources/META-INF/org/apache/camel/component/aws2/eks/aws2-eks.json @@ -50,13 +50,12 @@ "headers": { "CamelAwsEKSOperation": { "index": 0, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The operation we want to perform", "constantName": "org.apache.camel.component.aws2.eks.EKS2Constants#OPERATION" }, "CamelAwsEKSMaxResults": { "index": 1, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "Integer", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The limit number of results while listing clusters", "constantName": "org.apache.camel.component.aws2.eks.EKS2Constants#MAX_RESULTS" }, - "CamelAwsEKSDescription": { "index": 2, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "A key description to use while performing a createKey operation", "constantName": "org.apache.camel.component.aws2.eks.EKS2Constants#DESCRIPTION" }, - "CamelAwsEKSClusterName": { "index": 3, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The cluster name", "constantName": "org.apache.camel.component.aws2.eks.EKS2Constants#CLUSTER_NAME" }, - "CamelAwsEKSRoleARN": { "index": 4, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The role ARN to use while creating the cluster", "constantName": "org.apache.camel.component.aws2.eks.EKS2Constants#ROLE_ARN" }, - "CamelAwsEKSVPCConfig": { "index": 5, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "software.amazon.awssdk.services.eks.model.VpcConfigRequest", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The VPC config for the creations of an EKS cluster", "constantName": "org.apache.camel.component.aws2.eks.EKS2Constants#VPC_CONFIG" }, - "CamelAwsEKSNextToken": { "index": 6, "kind": "header", "displayName": "", "group": "listClusters", "label": "listClusters", "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.eks.EKS2Constants#NEXT_TOKEN" }, - "CamelAwsEKSIsTruncated": { "index": 7, "kind": "header", "displayName": "", "group": "listClusters", "label": "listClusters", "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.eks.EKS2Constants#IS_TRUNCATED" }, - "CamelAwsEKSClusterArn": { "index": 8, "kind": "header", "displayName": "", "group": "createCluster describeCluster deleteCluster", "label": "createCluster describeCluster deleteCluster", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The ARN of the cluster.", "constantName": "org.apache.camel.component.aws2.eks.EKS2Constants#CLUSTER_ARN" } + "CamelAwsEKSClusterName": { "index": 2, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The cluster name", "constantName": "org.apache.camel.component.aws2.eks.EKS2Constants#CLUSTER_NAME" }, + "CamelAwsEKSRoleARN": { "index": 3, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The role ARN to use while creating the cluster", "constantName": "org.apache.camel.component.aws2.eks.EKS2Constants#ROLE_ARN" }, + "CamelAwsEKSVPCConfig": { "index": 4, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "software.amazon.awssdk.services.eks.model.VpcConfigRequest", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The VPC config for the creations of an EKS cluster", "constantName": "org.apache.camel.component.aws2.eks.EKS2Constants#VPC_CONFIG" }, + "CamelAwsEKSNextToken": { "index": 5, "kind": "header", "displayName": "", "group": "listClusters", "label": "listClusters", "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.eks.EKS2Constants#NEXT_TOKEN" }, + "CamelAwsEKSIsTruncated": { "index": 6, "kind": "header", "displayName": "", "group": "listClusters", "label": "listClusters", "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.eks.EKS2Constants#IS_TRUNCATED" }, + "CamelAwsEKSClusterArn": { "index": 7, "kind": "header", "displayName": "", "group": "createCluster describeCluster deleteCluster", "label": "createCluster describeCluster deleteCluster", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The ARN of the cluster.", "constantName": "org.apache.camel.component.aws2.eks.EKS2Constants#CLUSTER_ARN" } }, "properties": { "label": { "index": 0, "kind": "path", "displayName": "Label", "group": "producer", "label": "", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.eks.EKS2Configuration", "configurationField": "configuration", "description": "Logical name" }, diff --git a/components/camel-aws/camel-aws2-eks/src/main/java/org/apache/camel/component/aws2/eks/EKS2Constants.java b/components/camel-aws/camel-aws2-eks/src/main/java/org/apache/camel/component/aws2/eks/EKS2Constants.java index f1ffaea2059f5..ec2e40baf01fd 100644 --- a/components/camel-aws/camel-aws2-eks/src/main/java/org/apache/camel/component/aws2/eks/EKS2Constants.java +++ b/components/camel-aws/camel-aws2-eks/src/main/java/org/apache/camel/component/aws2/eks/EKS2Constants.java @@ -26,8 +26,6 @@ public interface EKS2Constants { String OPERATION = "CamelAwsEKSOperation"; @Metadata(description = "The limit number of results while listing clusters", javaType = "Integer") String MAX_RESULTS = "CamelAwsEKSMaxResults"; - @Metadata(description = "A key description to use while performing a createKey operation", javaType = "String") - String DESCRIPTION = "CamelAwsEKSDescription"; @Metadata(description = "The cluster name", javaType = "String") String CLUSTER_NAME = "CamelAwsEKSClusterName"; @Metadata(description = "The role ARN to use while creating the cluster", javaType = "String") diff --git a/components/camel-aws/camel-aws2-mq/src/generated/resources/META-INF/org/apache/camel/component/aws2/mq/aws2-mq.json b/components/camel-aws/camel-aws2-mq/src/generated/resources/META-INF/org/apache/camel/component/aws2/mq/aws2-mq.json index 4b7ee35955fdb..02fd2bca74017 100644 --- a/components/camel-aws/camel-aws2-mq/src/generated/resources/META-INF/org/apache/camel/component/aws2/mq/aws2-mq.json +++ b/components/camel-aws/camel-aws2-mq/src/generated/resources/META-INF/org/apache/camel/component/aws2/mq/aws2-mq.json @@ -6,7 +6,7 @@ "description": "Manage AWS MQ instances.", "deprecated": false, "firstVersion": "3.1.0", - "label": "cloud,messaging", + "label": "cloud,management", "javaType": "org.apache.camel.component.aws2.mq.MQ2Component", "supportLevel": "Stable", "groupId": "org.apache.camel", diff --git a/components/camel-aws/camel-aws2-mq/src/main/java/org/apache/camel/component/aws2/mq/MQ2Endpoint.java b/components/camel-aws/camel-aws2-mq/src/main/java/org/apache/camel/component/aws2/mq/MQ2Endpoint.java index 8b05b758ac21d..584e751084e9f 100644 --- a/components/camel-aws/camel-aws2-mq/src/main/java/org/apache/camel/component/aws2/mq/MQ2Endpoint.java +++ b/components/camel-aws/camel-aws2-mq/src/main/java/org/apache/camel/component/aws2/mq/MQ2Endpoint.java @@ -33,7 +33,7 @@ * Manage AWS MQ instances. */ @UriEndpoint(firstVersion = "3.1.0", scheme = "aws2-mq", title = "AWS MQ", syntax = "aws2-mq:label", producerOnly = true, - category = { Category.CLOUD, Category.MESSAGING }, headersClass = MQ2Constants.class) + category = { Category.CLOUD, Category.MANAGEMENT }, headersClass = MQ2Constants.class) public class MQ2Endpoint extends ScheduledPollEndpoint implements EndpointServiceLocation { private MqClient mqClient; diff --git a/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_24.adoc b/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_24.adoc index 9e462700d699a..33ee72762a84c 100644 --- a/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_24.adoc +++ b/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_24.adoc @@ -2682,3 +2682,8 @@ set the response as the message body, as the other delete operations do. The catalog and the endpoint DSL of `aws-bedrock-agent` listed the headers of `aws-bedrock-agent-runtime`. They now list the headers of `aws-bedrock-agent`, so the `CamelAwsBedrockAgentRuntime*` header names are no longer in the header builder of the `aws-bedrock-agent` endpoint DSL. + +The `CamelAwsEKSDescription` header of `aws2-eks` is removed, together with the `EKS2Constants.DESCRIPTION` constant and +its method in the header builder of the endpoint DSL. No operation of the component read it. + +The `aws2-mq` component, which manages Amazon MQ brokers, is now in the `management` category instead of `messaging`. diff --git a/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/ComponentsBuilderFactory.java b/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/ComponentsBuilderFactory.java index e2e1a2419259f..06f6be4ffa517 100644 --- a/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/ComponentsBuilderFactory.java +++ b/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/ComponentsBuilderFactory.java @@ -590,7 +590,7 @@ static Aws2LambdaComponentBuilderFactory.Aws2LambdaComponentBuilder aws2Lambda() * AWS MQ (camel-aws2-mq) * Manage AWS MQ instances. * - * Category: cloud,messaging + * Category: cloud,management * Since: 3.1 * Maven coordinates: org.apache.camel:camel-aws2-mq * diff --git a/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/Aws2MqComponentBuilderFactory.java b/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/Aws2MqComponentBuilderFactory.java index 512783ffb4fc3..e805e9f108a69 100644 --- a/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/Aws2MqComponentBuilderFactory.java +++ b/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/Aws2MqComponentBuilderFactory.java @@ -35,7 +35,7 @@ public interface Aws2MqComponentBuilderFactory { * AWS MQ (camel-aws2-mq) * Manage AWS MQ instances. * - * Category: cloud,messaging + * Category: cloud,management * Since: 3.1 * Maven coordinates: org.apache.camel:camel-aws2-mq * diff --git a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/EndpointHeaderBuilders.java b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/EndpointHeaderBuilders.java index 7a9267ee75c07..72e941ed329b1 100644 --- a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/EndpointHeaderBuilders.java +++ b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/EndpointHeaderBuilders.java @@ -543,7 +543,7 @@ public static Lambda2EndpointBuilderFactory.Lambda2HeaderNameBuilder aws2Lambda( * AWS MQ (camel-aws2-mq) * Manage AWS MQ instances. * - * Category: cloud,messaging + * Category: cloud,management * Since: 3.1 * Maven coordinates: org.apache.camel:camel-aws2-mq * diff --git a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/StaticEndpointBuilders.java b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/StaticEndpointBuilders.java index 4b2f595a39de2..3392121b49388 100644 --- a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/StaticEndpointBuilders.java +++ b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/StaticEndpointBuilders.java @@ -1774,7 +1774,7 @@ public static Lambda2EndpointBuilderFactory.Lambda2EndpointBuilder aws2Lambda(St * AWS MQ (camel-aws2-mq) * Manage AWS MQ instances. * - * Category: cloud,messaging + * Category: cloud,management * Since: 3.1 * Maven coordinates: org.apache.camel:camel-aws2-mq * @@ -1793,7 +1793,7 @@ public static MQ2EndpointBuilderFactory.MQ2EndpointBuilder aws2Mq(String path) { * AWS MQ (camel-aws2-mq) * Manage AWS MQ instances. * - * Category: cloud,messaging + * Category: cloud,management * Since: 3.1 * Maven coordinates: org.apache.camel:camel-aws2-mq * diff --git a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/EKS2EndpointBuilderFactory.java b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/EKS2EndpointBuilderFactory.java index b6d3ab9964fab..0cc1cd05826b6 100644 --- a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/EKS2EndpointBuilderFactory.java +++ b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/EKS2EndpointBuilderFactory.java @@ -615,18 +615,6 @@ public String awsEKSOperation() { public String awsEKSMaxResults() { return "CamelAwsEKSMaxResults"; } - /** - * A key description to use while performing a createKey operation. - * - * The option is a: {@code String} type. - * - * Group: producer - * - * @return the name of the header {@code AwsEKSDescription}. - */ - public String awsEKSDescription() { - return "CamelAwsEKSDescription"; - } /** * The cluster name. * diff --git a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/MQ2EndpointBuilderFactory.java b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/MQ2EndpointBuilderFactory.java index e801fd772c718..98aa3b840c405 100644 --- a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/MQ2EndpointBuilderFactory.java +++ b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/MQ2EndpointBuilderFactory.java @@ -530,7 +530,7 @@ public interface MQ2Builders { * AWS MQ (camel-aws2-mq) * Manage AWS MQ instances. * - * Category: cloud,messaging + * Category: cloud,management * Since: 3.1 * Maven coordinates: org.apache.camel:camel-aws2-mq * @@ -543,7 +543,7 @@ default MQ2HeaderNameBuilder aws2Mq() { * AWS MQ (camel-aws2-mq) * Manage AWS MQ instances. * - * Category: cloud,messaging + * Category: cloud,management * Since: 3.1 * Maven coordinates: org.apache.camel:camel-aws2-mq * @@ -562,7 +562,7 @@ default MQ2EndpointBuilder aws2Mq(String path) { * AWS MQ (camel-aws2-mq) * Manage AWS MQ instances. * - * Category: cloud,messaging + * Category: cloud,management * Since: 3.1 * Maven coordinates: org.apache.camel:camel-aws2-mq * From d1059531ebeba8ed4a6e18afd05ef04f51df05a7 Mon Sep 17 00:00:00 2001 From: Claus Ibsen Date: Fri, 23 Oct 2026 15:07:47 +0200 Subject: [PATCH 3/5] CAMEL-26101, CAMEL-26070: camel-aws2-step-functions - the execution input must be JSON text, startSyncExecution sets the status headers; camel-aws-bedrock - aws-bedrock-agent headers override the options Co-Authored-By: Claude Opus 5.5 (1M context) Signed-off-by: Claus Ibsen --- .../catalog/components/aws-bedrock-agent.json | 18 +-- .../components/aws2-step-functions.json | 15 ++- .../docs/aws-bedrock-agent-component.adoc | 7 +- .../docs/aws2-step-functions-component.adoc | 10 ++ .../aws2/bedrock/agent/aws-bedrock-agent.json | 18 +-- .../docs/aws-bedrock-agent-component.adoc | 7 +- .../agent/BedrockAgentConfiguration.java | 12 +- .../bedrock/agent/BedrockAgentConstants.java | 6 +- .../bedrock/agent/BedrockAgentProducer.java | 105 +++++------------- .../agent/BedrockAgentProducerTest.java | 64 +++++++++++ .../stepfunctions/aws2-step-functions.json | 15 ++- .../docs/aws2-step-functions-component.adoc | 10 ++ .../StepFunctions2Constants.java | 17 ++- .../stepfunctions/StepFunctions2Producer.java | 40 ++++++- .../AmazonStepFunctionsClientMock.java | 12 ++ .../StepFunctions2ProducerTest.java | 50 +++++++++ .../pages/camel-4x-upgrade-guide-4_24.adoc | 12 ++ ...wsBedrockAgentComponentBuilderFactory.java | 13 ++- .../BedrockAgentEndpointBuilderFactory.java | 51 +++++---- .../StepFunctions2EndpointBuilderFactory.java | 44 +++++++- 20 files changed, 368 insertions(+), 158 deletions(-) diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/aws-bedrock-agent.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/aws-bedrock-agent.json index 15094023f010e..84f63bca5da50 100644 --- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/aws-bedrock-agent.json +++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/aws-bedrock-agent.json @@ -25,9 +25,9 @@ }, "componentProperties": { "configuration": { "index": 0, "kind": "property", "displayName": "Configuration", "group": "common", "label": "", "required": false, "type": "object", "javaType": "org.apache.camel.component.aws2.bedrock.agent.BedrockAgentConfiguration", "deprecated": false, "autowired": false, "secret": false, "description": "Component configuration" }, - "dataSourceId": { "index": 1, "kind": "property", "displayName": "Data Source Id", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.bedrock.agent.BedrockAgentConfiguration", "configurationField": "configuration", "description": "Define the Data source Id we are going to use. The consumer and all the operations need it; when set, it is used instead of the CamelAwsBedrockAgentDataSourceId header" }, - "ingestionJobId": { "index": 2, "kind": "property", "displayName": "Ingestion Job Id", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.bedrock.agent.BedrockAgentConfiguration", "configurationField": "configuration", "description": "Define the Ingestion Job Id we want to track. The consumer and the getIngestionJob operation need it; when set, it is used instead of the CamelAwsBedrockAgentIngestionJobId header" }, - "knowledgeBaseId": { "index": 3, "kind": "property", "displayName": "Knowledge Base Id", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.bedrock.agent.BedrockAgentConfiguration", "configurationField": "configuration", "description": "Define the Knowledge Base Id we are going to use. The consumer and all the operations need it; when set, it is used instead of the CamelAwsBedrockAgentKnowledgeBaseId header" }, + "dataSourceId": { "index": 1, "kind": "property", "displayName": "Data Source Id", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.bedrock.agent.BedrockAgentConfiguration", "configurationField": "configuration", "description": "Define the Data source Id we are going to use. The consumer and all the operations need it; the CamelAwsBedrockAgentDataSourceId header overrides it for the producer" }, + "ingestionJobId": { "index": 2, "kind": "property", "displayName": "Ingestion Job Id", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.bedrock.agent.BedrockAgentConfiguration", "configurationField": "configuration", "description": "Define the Ingestion Job Id we want to track. The consumer and the getIngestionJob operation need it; the CamelAwsBedrockAgentIngestionJobId header overrides it for the producer" }, + "knowledgeBaseId": { "index": 3, "kind": "property", "displayName": "Knowledge Base Id", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.bedrock.agent.BedrockAgentConfiguration", "configurationField": "configuration", "description": "Define the Knowledge Base Id we are going to use. The consumer and all the operations need it; the CamelAwsBedrockAgentKnowledgeBaseId header overrides it for the producer" }, "operation": { "index": 4, "kind": "property", "displayName": "Operation", "group": "common", "label": "", "required": true, "type": "enum", "javaType": "org.apache.camel.component.aws2.bedrock.agent.BedrockAgentOperations", "enum": [ "startIngestionJob", "listIngestionJobs", "getIngestionJob" ], "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.bedrock.agent.BedrockAgentConfiguration", "configurationField": "configuration", "description": "The operation to perform. It can be startIngestionJob, listIngestionJobs or getIngestionJob" }, "overrideEndpoint": { "index": 5, "kind": "property", "displayName": "Override Endpoint", "group": "common", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.aws2.bedrock.agent.BedrockAgentConfiguration", "configurationField": "configuration", "description": "Set the need for overriding the endpoint. This option needs to be used in combination with the uriEndpointOverride option" }, "pojoRequest": { "index": 6, "kind": "property", "displayName": "Pojo Request", "group": "common", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.aws2.bedrock.agent.BedrockAgentConfiguration", "configurationField": "configuration", "description": "If we want to use a POJO request as body or not" }, @@ -53,17 +53,17 @@ }, "headers": { "CamelAwsBedrockAgentOperation": { "index": 0, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The operation we want to perform", "constantName": "org.apache.camel.component.aws2.bedrock.agent.BedrockAgentConstants#OPERATION" }, - "CamelAwsBedrockAgentDataSourceId": { "index": 1, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The data source Id of the operation, used when the dataSourceId option is not set", "constantName": "org.apache.camel.component.aws2.bedrock.agent.BedrockAgentConstants#DATASOURCE_ID" }, - "CamelAwsBedrockAgentKnowledgeBaseId": { "index": 2, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The knowledge base Id of the operation, used when the knowledgeBaseId option is not set", "constantName": "org.apache.camel.component.aws2.bedrock.agent.BedrockAgentConstants#KNOWLEDGE_BASE_ID" }, - "CamelAwsBedrockAgentIngestionJobId": { "index": 3, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The id of the ingestion job of the getIngestionJob operation, used when the ingestionJobId option is not set", "constantName": "org.apache.camel.component.aws2.bedrock.agent.BedrockAgentConstants#INGESTION_JOB_ID" }, + "CamelAwsBedrockAgentDataSourceId": { "index": 1, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The data source Id of the operation; it overrides the dataSourceId option", "constantName": "org.apache.camel.component.aws2.bedrock.agent.BedrockAgentConstants#DATASOURCE_ID" }, + "CamelAwsBedrockAgentKnowledgeBaseId": { "index": 2, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The knowledge base Id of the operation; it overrides the knowledgeBaseId option", "constantName": "org.apache.camel.component.aws2.bedrock.agent.BedrockAgentConstants#KNOWLEDGE_BASE_ID" }, + "CamelAwsBedrockAgentIngestionJobId": { "index": 3, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The id of the ingestion job of the getIngestionJob operation; it overrides the ingestionJobId option", "constantName": "org.apache.camel.component.aws2.bedrock.agent.BedrockAgentConstants#INGESTION_JOB_ID" }, "CamelAwsBedrockAgentIngestionJobStatus": { "index": 4, "kind": "header", "displayName": "", "group": "common", "label": "common", "required": false, "javaType": "software.amazon.awssdk.services.bedrockagent.model.IngestionJobStatus", "enum": [ "STARTING", "IN_PROGRESS", "COMPLETE", "FAILED", "STOPPING", "STOPPED", "null" ], "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The status of the ingestion job, set by the consumer and by the getIngestionJob operation", "constantName": "org.apache.camel.component.aws2.bedrock.agent.BedrockAgentConstants#INGESTION_JOB_STATUS" }, "CamelAwsBedrockAgentIngestionJobFailureReasons": { "index": 5, "kind": "header", "displayName": "", "group": "common", "label": "common", "required": false, "javaType": "List", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The failure reasons of the ingestion job, set by the consumer and by the getIngestionJob operation when the job has failure reasons", "constantName": "org.apache.camel.component.aws2.bedrock.agent.BedrockAgentConstants#INGESTION_JOB_FAILURE_REASONS" } }, "properties": { "label": { "index": 0, "kind": "path", "displayName": "Label", "group": "common", "label": "", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.bedrock.agent.BedrockAgentConfiguration", "configurationField": "configuration", "description": "Logical name" }, - "dataSourceId": { "index": 1, "kind": "parameter", "displayName": "Data Source Id", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.bedrock.agent.BedrockAgentConfiguration", "configurationField": "configuration", "description": "Define the Data source Id we are going to use. The consumer and all the operations need it; when set, it is used instead of the CamelAwsBedrockAgentDataSourceId header" }, - "ingestionJobId": { "index": 2, "kind": "parameter", "displayName": "Ingestion Job Id", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.bedrock.agent.BedrockAgentConfiguration", "configurationField": "configuration", "description": "Define the Ingestion Job Id we want to track. The consumer and the getIngestionJob operation need it; when set, it is used instead of the CamelAwsBedrockAgentIngestionJobId header" }, - "knowledgeBaseId": { "index": 3, "kind": "parameter", "displayName": "Knowledge Base Id", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.bedrock.agent.BedrockAgentConfiguration", "configurationField": "configuration", "description": "Define the Knowledge Base Id we are going to use. The consumer and all the operations need it; when set, it is used instead of the CamelAwsBedrockAgentKnowledgeBaseId header" }, + "dataSourceId": { "index": 1, "kind": "parameter", "displayName": "Data Source Id", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.bedrock.agent.BedrockAgentConfiguration", "configurationField": "configuration", "description": "Define the Data source Id we are going to use. The consumer and all the operations need it; the CamelAwsBedrockAgentDataSourceId header overrides it for the producer" }, + "ingestionJobId": { "index": 2, "kind": "parameter", "displayName": "Ingestion Job Id", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.bedrock.agent.BedrockAgentConfiguration", "configurationField": "configuration", "description": "Define the Ingestion Job Id we want to track. The consumer and the getIngestionJob operation need it; the CamelAwsBedrockAgentIngestionJobId header overrides it for the producer" }, + "knowledgeBaseId": { "index": 3, "kind": "parameter", "displayName": "Knowledge Base Id", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.bedrock.agent.BedrockAgentConfiguration", "configurationField": "configuration", "description": "Define the Knowledge Base Id we are going to use. The consumer and all the operations need it; the CamelAwsBedrockAgentKnowledgeBaseId header overrides it for the producer" }, "operation": { "index": 4, "kind": "parameter", "displayName": "Operation", "group": "common", "label": "", "required": true, "type": "enum", "javaType": "org.apache.camel.component.aws2.bedrock.agent.BedrockAgentOperations", "enum": [ "startIngestionJob", "listIngestionJobs", "getIngestionJob" ], "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.bedrock.agent.BedrockAgentConfiguration", "configurationField": "configuration", "description": "The operation to perform. It can be startIngestionJob, listIngestionJobs or getIngestionJob" }, "overrideEndpoint": { "index": 5, "kind": "parameter", "displayName": "Override Endpoint", "group": "common", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.aws2.bedrock.agent.BedrockAgentConfiguration", "configurationField": "configuration", "description": "Set the need for overriding the endpoint. This option needs to be used in combination with the uriEndpointOverride option" }, "pojoRequest": { "index": 6, "kind": "parameter", "displayName": "Pojo Request", "group": "common", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.aws2.bedrock.agent.BedrockAgentConfiguration", "configurationField": "configuration", "description": "If we want to use a POJO request as body or not" }, diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/aws2-step-functions.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/aws2-step-functions.json index 41c36bc55272a..d3a30c8e5f62a 100644 --- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/aws2-step-functions.json +++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/aws2-step-functions.json @@ -60,12 +60,15 @@ "CamelAwsStepFunctionsActivitiesMaxResults": { "index": 9, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "Integer", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The limit number of results while listing activities", "constantName": "org.apache.camel.component.aws2.stepfunctions.StepFunctions2Constants#ACTIVITIES_MAX_RESULTS" }, "CamelAwsStepFunctionsExecutionArn": { "index": 10, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The Amazon Resource Name (ARN) of the execution.", "constantName": "org.apache.camel.component.aws2.stepfunctions.StepFunctions2Constants#EXECUTION_ARN" }, "CamelAwsStepFunctionsExecutionName": { "index": 11, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Optional name of the execution.", "constantName": "org.apache.camel.component.aws2.stepfunctions.StepFunctions2Constants#EXECUTION_NAME" }, - "CamelAwsStepFunctionsExecutionInput": { "index": 12, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The string that contains the JSON input data for the execution.", "constantName": "org.apache.camel.component.aws2.stepfunctions.StepFunctions2Constants#EXECUTION_INPUT" }, - "CamelAwsStepFunctionsExecutionTraceHeader": { "index": 13, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Passes the X-Ray trace header.", "constantName": "org.apache.camel.component.aws2.stepfunctions.StepFunctions2Constants#EXECUTION_TRACE_HEADER" }, - "CamelAwsStepFunctionsExecutionHistoryMaxResults": { "index": 14, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "Integer", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The limit number of results while listing execution history", "constantName": "org.apache.camel.component.aws2.stepfunctions.StepFunctions2Constants#EXECUTION_HISTORY_MAX_RESULTS" }, - "CamelAwsStepFunctionsExecutionHistoryIncludeExecutionData": { "index": 15, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "Boolean", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "You can select whether execution data (input or output of a history event) is returned.", "constantName": "org.apache.camel.component.aws2.stepfunctions.StepFunctions2Constants#EXECUTION_HISTORY_INCLUDE_EXECUTION_DATA" }, - "CamelAwsStepFunctionsExecutionHistoryReverseOrder": { "index": 16, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "Boolean", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Lists events in descending order of their timeStamp.", "constantName": "org.apache.camel.component.aws2.stepfunctions.StepFunctions2Constants#EXECUTION_HISTORY_REVERSE_ORDER" }, - "CamelAwsStepFunctionsExecutionMaxResults": { "index": 17, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "Integer", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The limit number of results while listing executions", "constantName": "org.apache.camel.component.aws2.stepfunctions.StepFunctions2Constants#EXECUTIONS_MAX_RESULTS" } + "CamelAwsStepFunctionsExecutionInput": { "index": 12, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The JSON input data for the execution, as text (a String, a byte array or a stream).", "constantName": "org.apache.camel.component.aws2.stepfunctions.StepFunctions2Constants#EXECUTION_INPUT" }, + "CamelAwsStepFunctionsExecutionStatus": { "index": 13, "kind": "header", "displayName": "", "group": "startSyncExecution", "label": "startSyncExecution", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The status of the execution: SUCCEEDED, FAILED or TIMED_OUT. The exchange does not fail when the execution did not succeed: check this header.", "constantName": "org.apache.camel.component.aws2.stepfunctions.StepFunctions2Constants#EXECUTION_STATUS" }, + "CamelAwsStepFunctionsExecutionError": { "index": 14, "kind": "header", "displayName": "", "group": "startSyncExecution", "label": "startSyncExecution", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The error code of the failure, when the execution failed.", "constantName": "org.apache.camel.component.aws2.stepfunctions.StepFunctions2Constants#EXECUTION_ERROR" }, + "CamelAwsStepFunctionsExecutionCause": { "index": 15, "kind": "header", "displayName": "", "group": "startSyncExecution", "label": "startSyncExecution", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The cause of the failure, when the execution failed.", "constantName": "org.apache.camel.component.aws2.stepfunctions.StepFunctions2Constants#EXECUTION_CAUSE" }, + "CamelAwsStepFunctionsExecutionTraceHeader": { "index": 16, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Passes the X-Ray trace header.", "constantName": "org.apache.camel.component.aws2.stepfunctions.StepFunctions2Constants#EXECUTION_TRACE_HEADER" }, + "CamelAwsStepFunctionsExecutionHistoryMaxResults": { "index": 17, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "Integer", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The limit number of results while listing execution history", "constantName": "org.apache.camel.component.aws2.stepfunctions.StepFunctions2Constants#EXECUTION_HISTORY_MAX_RESULTS" }, + "CamelAwsStepFunctionsExecutionHistoryIncludeExecutionData": { "index": 18, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "Boolean", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "You can select whether execution data (input or output of a history event) is returned.", "constantName": "org.apache.camel.component.aws2.stepfunctions.StepFunctions2Constants#EXECUTION_HISTORY_INCLUDE_EXECUTION_DATA" }, + "CamelAwsStepFunctionsExecutionHistoryReverseOrder": { "index": 19, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "Boolean", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Lists events in descending order of their timeStamp.", "constantName": "org.apache.camel.component.aws2.stepfunctions.StepFunctions2Constants#EXECUTION_HISTORY_REVERSE_ORDER" }, + "CamelAwsStepFunctionsExecutionMaxResults": { "index": 20, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "Integer", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The limit number of results while listing executions", "constantName": "org.apache.camel.component.aws2.stepfunctions.StepFunctions2Constants#EXECUTIONS_MAX_RESULTS" } }, "properties": { "label": { "index": 0, "kind": "path", "displayName": "Label", "group": "producer", "label": "", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.stepfunctions.StepFunctions2Configuration", "configurationField": "configuration", "description": "Logical name" }, diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/aws-bedrock-agent-component.adoc b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/aws-bedrock-agent-component.adoc index 18540aee19280..035bd1df5be24 100644 --- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/aws-bedrock-agent-component.adoc +++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/aws-bedrock-agent-component.adoc @@ -82,9 +82,10 @@ The body is set to the list of `IngestionJobSummary` of the AWS SDK. The body is set to the `IngestionJob` of the AWS SDK, the `CamelAwsBedrockAgentIngestionJobStatus` header to its status, and the `CamelAwsBedrockAgentIngestionJobFailureReasons` header to its failure reasons, if it has any. -The knowledge base, data source and ingestion job ids are taken from the `knowledgeBaseId`, `dataSourceId` and -`ingestionJobId` options. The `CamelAwsBedrockAgentKnowledgeBaseId`, `CamelAwsBedrockAgentDataSourceId` and -`CamelAwsBedrockAgentIngestionJobId` headers are used only when the option is not set. +The knowledge base, data source and ingestion job ids are taken from the `CamelAwsBedrockAgentKnowledgeBaseId`, +`CamelAwsBedrockAgentDataSourceId` and `CamelAwsBedrockAgentIngestionJobId` headers, and else from the +`knowledgeBaseId`, `dataSourceId` and `ingestionJobId` options. So the options are the defaults of the endpoint, and +a header overrides them for one message, for example to get the ingestion job that startIngestionJob returned in the body. With `pojoRequest=true`, the body is the request of the AWS SDK instead (`StartIngestionJobRequest`, `ListIngestionJobsRequest` or `GetIngestionJobRequest`), and the ids are taken from it. diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/aws2-step-functions-component.adoc b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/aws2-step-functions-component.adoc index 965c1846da6e8..a97a02b707dbf 100644 --- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/aws2-step-functions-component.adoc +++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/aws2-step-functions-component.adoc @@ -96,6 +96,16 @@ Camel-AWS Step Functions component provides the following operation on the produ - listExecutions - getExecutionHistory +The startExecution and startSyncExecution operations take the input of the execution from the +`CamelAwsStepFunctionsExecutionInput` header, which must be JSON text (a String, a byte array or a stream). +A value of another type, such as a `Map`, is not turned into JSON: the exchange fails. + +The startSyncExecution operation waits for the execution to end, and sets the body to the `StartSyncExecutionResponse` +of the AWS SDK, which holds the output. It sets the `CamelAwsStepFunctionsExecutionStatus` header to the status of the +execution (`SUCCEEDED`, `FAILED` or `TIMED_OUT`), and, when the execution failed, the +`CamelAwsStepFunctionsExecutionError` and `CamelAwsStepFunctionsExecutionCause` headers. The exchange does not fail +when the execution did not succeed: check the status header. + == Examples === Producer Examples diff --git a/components/camel-aws/camel-aws-bedrock/src/generated/resources/META-INF/org/apache/camel/component/aws2/bedrock/agent/aws-bedrock-agent.json b/components/camel-aws/camel-aws-bedrock/src/generated/resources/META-INF/org/apache/camel/component/aws2/bedrock/agent/aws-bedrock-agent.json index 15094023f010e..84f63bca5da50 100644 --- a/components/camel-aws/camel-aws-bedrock/src/generated/resources/META-INF/org/apache/camel/component/aws2/bedrock/agent/aws-bedrock-agent.json +++ b/components/camel-aws/camel-aws-bedrock/src/generated/resources/META-INF/org/apache/camel/component/aws2/bedrock/agent/aws-bedrock-agent.json @@ -25,9 +25,9 @@ }, "componentProperties": { "configuration": { "index": 0, "kind": "property", "displayName": "Configuration", "group": "common", "label": "", "required": false, "type": "object", "javaType": "org.apache.camel.component.aws2.bedrock.agent.BedrockAgentConfiguration", "deprecated": false, "autowired": false, "secret": false, "description": "Component configuration" }, - "dataSourceId": { "index": 1, "kind": "property", "displayName": "Data Source Id", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.bedrock.agent.BedrockAgentConfiguration", "configurationField": "configuration", "description": "Define the Data source Id we are going to use. The consumer and all the operations need it; when set, it is used instead of the CamelAwsBedrockAgentDataSourceId header" }, - "ingestionJobId": { "index": 2, "kind": "property", "displayName": "Ingestion Job Id", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.bedrock.agent.BedrockAgentConfiguration", "configurationField": "configuration", "description": "Define the Ingestion Job Id we want to track. The consumer and the getIngestionJob operation need it; when set, it is used instead of the CamelAwsBedrockAgentIngestionJobId header" }, - "knowledgeBaseId": { "index": 3, "kind": "property", "displayName": "Knowledge Base Id", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.bedrock.agent.BedrockAgentConfiguration", "configurationField": "configuration", "description": "Define the Knowledge Base Id we are going to use. The consumer and all the operations need it; when set, it is used instead of the CamelAwsBedrockAgentKnowledgeBaseId header" }, + "dataSourceId": { "index": 1, "kind": "property", "displayName": "Data Source Id", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.bedrock.agent.BedrockAgentConfiguration", "configurationField": "configuration", "description": "Define the Data source Id we are going to use. The consumer and all the operations need it; the CamelAwsBedrockAgentDataSourceId header overrides it for the producer" }, + "ingestionJobId": { "index": 2, "kind": "property", "displayName": "Ingestion Job Id", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.bedrock.agent.BedrockAgentConfiguration", "configurationField": "configuration", "description": "Define the Ingestion Job Id we want to track. The consumer and the getIngestionJob operation need it; the CamelAwsBedrockAgentIngestionJobId header overrides it for the producer" }, + "knowledgeBaseId": { "index": 3, "kind": "property", "displayName": "Knowledge Base Id", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.bedrock.agent.BedrockAgentConfiguration", "configurationField": "configuration", "description": "Define the Knowledge Base Id we are going to use. The consumer and all the operations need it; the CamelAwsBedrockAgentKnowledgeBaseId header overrides it for the producer" }, "operation": { "index": 4, "kind": "property", "displayName": "Operation", "group": "common", "label": "", "required": true, "type": "enum", "javaType": "org.apache.camel.component.aws2.bedrock.agent.BedrockAgentOperations", "enum": [ "startIngestionJob", "listIngestionJobs", "getIngestionJob" ], "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.bedrock.agent.BedrockAgentConfiguration", "configurationField": "configuration", "description": "The operation to perform. It can be startIngestionJob, listIngestionJobs or getIngestionJob" }, "overrideEndpoint": { "index": 5, "kind": "property", "displayName": "Override Endpoint", "group": "common", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.aws2.bedrock.agent.BedrockAgentConfiguration", "configurationField": "configuration", "description": "Set the need for overriding the endpoint. This option needs to be used in combination with the uriEndpointOverride option" }, "pojoRequest": { "index": 6, "kind": "property", "displayName": "Pojo Request", "group": "common", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.aws2.bedrock.agent.BedrockAgentConfiguration", "configurationField": "configuration", "description": "If we want to use a POJO request as body or not" }, @@ -53,17 +53,17 @@ }, "headers": { "CamelAwsBedrockAgentOperation": { "index": 0, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The operation we want to perform", "constantName": "org.apache.camel.component.aws2.bedrock.agent.BedrockAgentConstants#OPERATION" }, - "CamelAwsBedrockAgentDataSourceId": { "index": 1, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The data source Id of the operation, used when the dataSourceId option is not set", "constantName": "org.apache.camel.component.aws2.bedrock.agent.BedrockAgentConstants#DATASOURCE_ID" }, - "CamelAwsBedrockAgentKnowledgeBaseId": { "index": 2, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The knowledge base Id of the operation, used when the knowledgeBaseId option is not set", "constantName": "org.apache.camel.component.aws2.bedrock.agent.BedrockAgentConstants#KNOWLEDGE_BASE_ID" }, - "CamelAwsBedrockAgentIngestionJobId": { "index": 3, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The id of the ingestion job of the getIngestionJob operation, used when the ingestionJobId option is not set", "constantName": "org.apache.camel.component.aws2.bedrock.agent.BedrockAgentConstants#INGESTION_JOB_ID" }, + "CamelAwsBedrockAgentDataSourceId": { "index": 1, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The data source Id of the operation; it overrides the dataSourceId option", "constantName": "org.apache.camel.component.aws2.bedrock.agent.BedrockAgentConstants#DATASOURCE_ID" }, + "CamelAwsBedrockAgentKnowledgeBaseId": { "index": 2, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The knowledge base Id of the operation; it overrides the knowledgeBaseId option", "constantName": "org.apache.camel.component.aws2.bedrock.agent.BedrockAgentConstants#KNOWLEDGE_BASE_ID" }, + "CamelAwsBedrockAgentIngestionJobId": { "index": 3, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The id of the ingestion job of the getIngestionJob operation; it overrides the ingestionJobId option", "constantName": "org.apache.camel.component.aws2.bedrock.agent.BedrockAgentConstants#INGESTION_JOB_ID" }, "CamelAwsBedrockAgentIngestionJobStatus": { "index": 4, "kind": "header", "displayName": "", "group": "common", "label": "common", "required": false, "javaType": "software.amazon.awssdk.services.bedrockagent.model.IngestionJobStatus", "enum": [ "STARTING", "IN_PROGRESS", "COMPLETE", "FAILED", "STOPPING", "STOPPED", "null" ], "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The status of the ingestion job, set by the consumer and by the getIngestionJob operation", "constantName": "org.apache.camel.component.aws2.bedrock.agent.BedrockAgentConstants#INGESTION_JOB_STATUS" }, "CamelAwsBedrockAgentIngestionJobFailureReasons": { "index": 5, "kind": "header", "displayName": "", "group": "common", "label": "common", "required": false, "javaType": "List", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The failure reasons of the ingestion job, set by the consumer and by the getIngestionJob operation when the job has failure reasons", "constantName": "org.apache.camel.component.aws2.bedrock.agent.BedrockAgentConstants#INGESTION_JOB_FAILURE_REASONS" } }, "properties": { "label": { "index": 0, "kind": "path", "displayName": "Label", "group": "common", "label": "", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.bedrock.agent.BedrockAgentConfiguration", "configurationField": "configuration", "description": "Logical name" }, - "dataSourceId": { "index": 1, "kind": "parameter", "displayName": "Data Source Id", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.bedrock.agent.BedrockAgentConfiguration", "configurationField": "configuration", "description": "Define the Data source Id we are going to use. The consumer and all the operations need it; when set, it is used instead of the CamelAwsBedrockAgentDataSourceId header" }, - "ingestionJobId": { "index": 2, "kind": "parameter", "displayName": "Ingestion Job Id", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.bedrock.agent.BedrockAgentConfiguration", "configurationField": "configuration", "description": "Define the Ingestion Job Id we want to track. The consumer and the getIngestionJob operation need it; when set, it is used instead of the CamelAwsBedrockAgentIngestionJobId header" }, - "knowledgeBaseId": { "index": 3, "kind": "parameter", "displayName": "Knowledge Base Id", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.bedrock.agent.BedrockAgentConfiguration", "configurationField": "configuration", "description": "Define the Knowledge Base Id we are going to use. The consumer and all the operations need it; when set, it is used instead of the CamelAwsBedrockAgentKnowledgeBaseId header" }, + "dataSourceId": { "index": 1, "kind": "parameter", "displayName": "Data Source Id", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.bedrock.agent.BedrockAgentConfiguration", "configurationField": "configuration", "description": "Define the Data source Id we are going to use. The consumer and all the operations need it; the CamelAwsBedrockAgentDataSourceId header overrides it for the producer" }, + "ingestionJobId": { "index": 2, "kind": "parameter", "displayName": "Ingestion Job Id", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.bedrock.agent.BedrockAgentConfiguration", "configurationField": "configuration", "description": "Define the Ingestion Job Id we want to track. The consumer and the getIngestionJob operation need it; the CamelAwsBedrockAgentIngestionJobId header overrides it for the producer" }, + "knowledgeBaseId": { "index": 3, "kind": "parameter", "displayName": "Knowledge Base Id", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.bedrock.agent.BedrockAgentConfiguration", "configurationField": "configuration", "description": "Define the Knowledge Base Id we are going to use. The consumer and all the operations need it; the CamelAwsBedrockAgentKnowledgeBaseId header overrides it for the producer" }, "operation": { "index": 4, "kind": "parameter", "displayName": "Operation", "group": "common", "label": "", "required": true, "type": "enum", "javaType": "org.apache.camel.component.aws2.bedrock.agent.BedrockAgentOperations", "enum": [ "startIngestionJob", "listIngestionJobs", "getIngestionJob" ], "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.bedrock.agent.BedrockAgentConfiguration", "configurationField": "configuration", "description": "The operation to perform. It can be startIngestionJob, listIngestionJobs or getIngestionJob" }, "overrideEndpoint": { "index": 5, "kind": "parameter", "displayName": "Override Endpoint", "group": "common", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.aws2.bedrock.agent.BedrockAgentConfiguration", "configurationField": "configuration", "description": "Set the need for overriding the endpoint. This option needs to be used in combination with the uriEndpointOverride option" }, "pojoRequest": { "index": 6, "kind": "parameter", "displayName": "Pojo Request", "group": "common", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.aws2.bedrock.agent.BedrockAgentConfiguration", "configurationField": "configuration", "description": "If we want to use a POJO request as body or not" }, diff --git a/components/camel-aws/camel-aws-bedrock/src/main/docs/aws-bedrock-agent-component.adoc b/components/camel-aws/camel-aws-bedrock/src/main/docs/aws-bedrock-agent-component.adoc index 18540aee19280..035bd1df5be24 100644 --- a/components/camel-aws/camel-aws-bedrock/src/main/docs/aws-bedrock-agent-component.adoc +++ b/components/camel-aws/camel-aws-bedrock/src/main/docs/aws-bedrock-agent-component.adoc @@ -82,9 +82,10 @@ The body is set to the list of `IngestionJobSummary` of the AWS SDK. The body is set to the `IngestionJob` of the AWS SDK, the `CamelAwsBedrockAgentIngestionJobStatus` header to its status, and the `CamelAwsBedrockAgentIngestionJobFailureReasons` header to its failure reasons, if it has any. -The knowledge base, data source and ingestion job ids are taken from the `knowledgeBaseId`, `dataSourceId` and -`ingestionJobId` options. The `CamelAwsBedrockAgentKnowledgeBaseId`, `CamelAwsBedrockAgentDataSourceId` and -`CamelAwsBedrockAgentIngestionJobId` headers are used only when the option is not set. +The knowledge base, data source and ingestion job ids are taken from the `CamelAwsBedrockAgentKnowledgeBaseId`, +`CamelAwsBedrockAgentDataSourceId` and `CamelAwsBedrockAgentIngestionJobId` headers, and else from the +`knowledgeBaseId`, `dataSourceId` and `ingestionJobId` options. So the options are the defaults of the endpoint, and +a header overrides them for one message, for example to get the ingestion job that startIngestionJob returned in the body. With `pojoRequest=true`, the body is the request of the AWS SDK instead (`StartIngestionJobRequest`, `ListIngestionJobsRequest` or `GetIngestionJobRequest`), and the ids are taken from it. diff --git a/components/camel-aws/camel-aws-bedrock/src/main/java/org/apache/camel/component/aws2/bedrock/agent/BedrockAgentConfiguration.java b/components/camel-aws/camel-aws-bedrock/src/main/java/org/apache/camel/component/aws2/bedrock/agent/BedrockAgentConfiguration.java index 896b9520fb651..82f5f98c1b909 100644 --- a/components/camel-aws/camel-aws-bedrock/src/main/java/org/apache/camel/component/aws2/bedrock/agent/BedrockAgentConfiguration.java +++ b/components/camel-aws/camel-aws-bedrock/src/main/java/org/apache/camel/component/aws2/bedrock/agent/BedrockAgentConfiguration.java @@ -272,8 +272,8 @@ public String getKnowledgeBaseId() { } /** - * Define the Knowledge Base Id we are going to use. The consumer and all the operations need it; when set, it is - * used instead of the CamelAwsBedrockAgentKnowledgeBaseId header + * Define the Knowledge Base Id we are going to use. The consumer and all the operations need it; the + * CamelAwsBedrockAgentKnowledgeBaseId header overrides it for the producer */ public void setKnowledgeBaseId(String knowledgeBaseId) { this.knowledgeBaseId = knowledgeBaseId; @@ -284,8 +284,8 @@ public String getDataSourceId() { } /** - * Define the Data source Id we are going to use. The consumer and all the operations need it; when set, it is used - * instead of the CamelAwsBedrockAgentDataSourceId header + * Define the Data source Id we are going to use. The consumer and all the operations need it; the + * CamelAwsBedrockAgentDataSourceId header overrides it for the producer */ public void setDataSourceId(String dataSourceId) { this.dataSourceId = dataSourceId; @@ -296,8 +296,8 @@ public String getIngestionJobId() { } /** - * Define the Ingestion Job Id we want to track. The consumer and the getIngestionJob operation need it; when set, - * it is used instead of the CamelAwsBedrockAgentIngestionJobId header + * Define the Ingestion Job Id we want to track. The consumer and the getIngestionJob operation need it; the + * CamelAwsBedrockAgentIngestionJobId header overrides it for the producer */ public void setIngestionJobId(String ingestionJobId) { this.ingestionJobId = ingestionJobId; diff --git a/components/camel-aws/camel-aws-bedrock/src/main/java/org/apache/camel/component/aws2/bedrock/agent/BedrockAgentConstants.java b/components/camel-aws/camel-aws-bedrock/src/main/java/org/apache/camel/component/aws2/bedrock/agent/BedrockAgentConstants.java index 51206df19d72e..4373ba35f9685 100644 --- a/components/camel-aws/camel-aws-bedrock/src/main/java/org/apache/camel/component/aws2/bedrock/agent/BedrockAgentConstants.java +++ b/components/camel-aws/camel-aws-bedrock/src/main/java/org/apache/camel/component/aws2/bedrock/agent/BedrockAgentConstants.java @@ -25,15 +25,15 @@ public interface BedrockAgentConstants { @Metadata(description = "The operation we want to perform", javaType = "String", label = "producer") String OPERATION = "CamelAwsBedrockAgentOperation"; - @Metadata(description = "The data source Id of the operation, used when the dataSourceId option is not set", + @Metadata(description = "The data source Id of the operation; it overrides the dataSourceId option", javaType = "String", label = "producer") String DATASOURCE_ID = "CamelAwsBedrockAgentDataSourceId"; - @Metadata(description = "The knowledge base Id of the operation, used when the knowledgeBaseId option is not set", + @Metadata(description = "The knowledge base Id of the operation; it overrides the knowledgeBaseId option", javaType = "String", label = "producer") String KNOWLEDGE_BASE_ID = "CamelAwsBedrockAgentKnowledgeBaseId"; - @Metadata(description = "The id of the ingestion job of the getIngestionJob operation, used when the ingestionJobId option is not set", + @Metadata(description = "The id of the ingestion job of the getIngestionJob operation; it overrides the ingestionJobId option", javaType = "String", label = "producer") String INGESTION_JOB_ID = "CamelAwsBedrockAgentIngestionJobId"; diff --git a/components/camel-aws/camel-aws-bedrock/src/main/java/org/apache/camel/component/aws2/bedrock/agent/BedrockAgentProducer.java b/components/camel-aws/camel-aws-bedrock/src/main/java/org/apache/camel/component/aws2/bedrock/agent/BedrockAgentProducer.java index dfcf65c1ca96d..a0f75aee3eb05 100644 --- a/components/camel-aws/camel-aws-bedrock/src/main/java/org/apache/camel/component/aws2/bedrock/agent/BedrockAgentProducer.java +++ b/components/camel-aws/camel-aws-bedrock/src/main/java/org/apache/camel/component/aws2/bedrock/agent/BedrockAgentProducer.java @@ -74,6 +74,20 @@ private BedrockAgentOperations determineOperation(Exchange exchange) { return operation; } + /** + * The id of the header, or else of the option: the header overrides the option for this message. + */ + private static String getId(Exchange exchange, String header, String option, String name) { + String id = exchange.getMessage().getHeader(header, String.class); + if (ObjectHelper.isEmpty(id)) { + id = option; + } + if (ObjectHelper.isEmpty(id)) { + throw new IllegalArgumentException(name + " must be specified"); + } + return id; + } + protected BedrockAgentConfiguration getConfiguration() { return getEndpoint().getConfiguration(); } @@ -111,29 +125,11 @@ private void startIngestionJob(BedrockAgentClient bedrockAgentClient, Exchange e "startIngestionJob operation requires a StartIngestionJobRequest body when pojoRequest=true"); } } else { - String knowledgeBaseId; - String dataSourceId; StartIngestionJobRequest.Builder builder = StartIngestionJobRequest.builder(); - if (ObjectHelper.isEmpty(getConfiguration().getKnowledgeBaseId())) { - if (ObjectHelper.isNotEmpty(exchange.getMessage().getHeader(BedrockAgentConstants.KNOWLEDGE_BASE_ID))) { - knowledgeBaseId = exchange.getIn().getHeader(BedrockAgentConstants.KNOWLEDGE_BASE_ID, String.class); - } else { - throw new IllegalArgumentException("KnowledgeBaseId must be specified"); - } - } else { - knowledgeBaseId = getConfiguration().getKnowledgeBaseId(); - } - if (ObjectHelper.isEmpty(getConfiguration().getDataSourceId())) { - if (ObjectHelper.isNotEmpty(exchange.getMessage().getHeader(BedrockAgentConstants.DATASOURCE_ID))) { - dataSourceId = exchange.getIn().getHeader(BedrockAgentConstants.DATASOURCE_ID, String.class); - } else { - throw new IllegalArgumentException("DataSourceId must be specified"); - } - } else { - dataSourceId = getConfiguration().getDataSourceId(); - } - builder.knowledgeBaseId(knowledgeBaseId); - builder.dataSourceId(dataSourceId); + builder.knowledgeBaseId(getId(exchange, BedrockAgentConstants.KNOWLEDGE_BASE_ID, + getConfiguration().getKnowledgeBaseId(), "KnowledgeBaseId")); + builder.dataSourceId( + getId(exchange, BedrockAgentConstants.DATASOURCE_ID, getConfiguration().getDataSourceId(), "DataSourceId")); StartIngestionJobResponse output = bedrockAgentClient.startIngestionJob(builder.build()); Message message = getMessageForResponse(exchange); prepareIngestionJobResponse(output, message); @@ -159,29 +155,11 @@ private void listIngestionJobs(BedrockAgentClient bedrockAgentClient, Exchange e "listIngestionJobs operation requires a ListIngestionJobsRequest body when pojoRequest=true"); } } else { - String knowledgeBaseId; - String dataSourceId; ListIngestionJobsRequest.Builder builder = ListIngestionJobsRequest.builder(); - if (ObjectHelper.isEmpty(getConfiguration().getKnowledgeBaseId())) { - if (ObjectHelper.isNotEmpty(exchange.getMessage().getHeader(BedrockAgentConstants.KNOWLEDGE_BASE_ID))) { - knowledgeBaseId = exchange.getIn().getHeader(BedrockAgentConstants.KNOWLEDGE_BASE_ID, String.class); - } else { - throw new IllegalArgumentException("KnowledgeBaseId must be specified"); - } - } else { - knowledgeBaseId = getConfiguration().getKnowledgeBaseId(); - } - if (ObjectHelper.isEmpty(getConfiguration().getDataSourceId())) { - if (ObjectHelper.isNotEmpty(exchange.getMessage().getHeader(BedrockAgentConstants.DATASOURCE_ID))) { - dataSourceId = exchange.getIn().getHeader(BedrockAgentConstants.DATASOURCE_ID, String.class); - } else { - throw new IllegalArgumentException("DataSourceId must be specified"); - } - } else { - dataSourceId = getConfiguration().getDataSourceId(); - } - builder.knowledgeBaseId(knowledgeBaseId); - builder.dataSourceId(dataSourceId); + builder.knowledgeBaseId(getId(exchange, BedrockAgentConstants.KNOWLEDGE_BASE_ID, + getConfiguration().getKnowledgeBaseId(), "KnowledgeBaseId")); + builder.dataSourceId( + getId(exchange, BedrockAgentConstants.DATASOURCE_ID, getConfiguration().getDataSourceId(), "DataSourceId")); ListIngestionJobsResponse output = bedrockAgentClient.listIngestionJobs(builder.build()); Message message = getMessageForResponse(exchange); prepareListIngestionJobsResponse(output, message); @@ -207,40 +185,13 @@ private void getIngestionJob(BedrockAgentClient bedrockAgentClient, Exchange exc "getIngestionJob operation requires a GetIngestionJobRequest body when pojoRequest=true"); } } else { - String knowledgeBaseId; - String dataSourceId; - String ingestionJobId; GetIngestionJobRequest.Builder builder = GetIngestionJobRequest.builder(); - if (ObjectHelper.isEmpty(getConfiguration().getKnowledgeBaseId())) { - if (ObjectHelper.isNotEmpty(exchange.getMessage().getHeader(BedrockAgentConstants.KNOWLEDGE_BASE_ID))) { - knowledgeBaseId = exchange.getMessage().getHeader(BedrockAgentConstants.KNOWLEDGE_BASE_ID, String.class); - } else { - throw new IllegalArgumentException("KnowledgeBaseId must be specified"); - } - } else { - knowledgeBaseId = getConfiguration().getKnowledgeBaseId(); - } - if (ObjectHelper.isEmpty(getConfiguration().getDataSourceId())) { - if (ObjectHelper.isNotEmpty(exchange.getMessage().getHeader(BedrockAgentConstants.DATASOURCE_ID))) { - dataSourceId = exchange.getMessage().getHeader(BedrockAgentConstants.DATASOURCE_ID, String.class); - } else { - throw new IllegalArgumentException("DataSourceId must be specified"); - } - } else { - dataSourceId = getConfiguration().getDataSourceId(); - } - if (ObjectHelper.isEmpty(getConfiguration().getIngestionJobId())) { - if (ObjectHelper.isNotEmpty(exchange.getMessage().getHeader(BedrockAgentConstants.INGESTION_JOB_ID))) { - ingestionJobId = exchange.getMessage().getHeader(BedrockAgentConstants.INGESTION_JOB_ID, String.class); - } else { - throw new IllegalArgumentException("IngestionJobId must be specified"); - } - } else { - ingestionJobId = getConfiguration().getIngestionJobId(); - } - builder.knowledgeBaseId(knowledgeBaseId); - builder.dataSourceId(dataSourceId); - builder.ingestionJobId(ingestionJobId); + builder.knowledgeBaseId(getId(exchange, BedrockAgentConstants.KNOWLEDGE_BASE_ID, + getConfiguration().getKnowledgeBaseId(), "KnowledgeBaseId")); + builder.dataSourceId( + getId(exchange, BedrockAgentConstants.DATASOURCE_ID, getConfiguration().getDataSourceId(), "DataSourceId")); + builder.ingestionJobId(getId(exchange, BedrockAgentConstants.INGESTION_JOB_ID, + getConfiguration().getIngestionJobId(), "IngestionJobId")); GetIngestionJobResponse output = bedrockAgentClient.getIngestionJob(builder.build()); Message message = getMessageForResponse(exchange); prepareGetIngestionJobResponse(output, message); diff --git a/components/camel-aws/camel-aws-bedrock/src/test/java/org/apache/camel/component/aws2/bedrock/agent/BedrockAgentProducerTest.java b/components/camel-aws/camel-aws-bedrock/src/test/java/org/apache/camel/component/aws2/bedrock/agent/BedrockAgentProducerTest.java index 13471fff7ce5f..161c9f17d7ed7 100644 --- a/components/camel-aws/camel-aws-bedrock/src/test/java/org/apache/camel/component/aws2/bedrock/agent/BedrockAgentProducerTest.java +++ b/components/camel-aws/camel-aws-bedrock/src/test/java/org/apache/camel/component/aws2/bedrock/agent/BedrockAgentProducerTest.java @@ -20,16 +20,20 @@ import org.apache.camel.impl.DefaultCamelContext; import org.apache.camel.support.DefaultExchange; import org.junit.jupiter.api.Test; +import org.mockito.ArgumentCaptor; import software.amazon.awssdk.services.bedrockagent.BedrockAgentClient; import software.amazon.awssdk.services.bedrockagent.model.GetIngestionJobRequest; import software.amazon.awssdk.services.bedrockagent.model.GetIngestionJobResponse; import software.amazon.awssdk.services.bedrockagent.model.IngestionJob; import software.amazon.awssdk.services.bedrockagent.model.IngestionJobStatus; +import software.amazon.awssdk.services.bedrockagent.model.StartIngestionJobRequest; +import software.amazon.awssdk.services.bedrockagent.model.StartIngestionJobResponse; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatThrownBy; import static org.mockito.ArgumentMatchers.any; import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.verify; import static org.mockito.Mockito.verifyNoInteractions; import static org.mockito.Mockito.when; @@ -75,4 +79,64 @@ void getIngestionJobSetsStatusHeaderAsEnum() throws Exception { .isEqualTo(IngestionJobStatus.COMPLETE); assertThat(exchange.getMessage().getBody(IngestionJob.class).ingestionJobId()).isEqualTo("job-1"); } + + @Test + void headersOverrideTheOptions() throws Exception { + when(client.getIngestionJob(any(GetIngestionJobRequest.class))).thenReturn(GetIngestionJobResponse.builder() + .ingestionJob(IngestionJob.builder().ingestionJobId("job-2").status(IngestionJobStatus.COMPLETE).build()) + .build()); + BedrockAgentConfiguration configuration = new BedrockAgentConfiguration(); + configuration.setKnowledgeBaseId("kb-1"); + configuration.setDataSourceId("ds-1"); + configuration.setIngestionJobId("job-1"); + BedrockAgentProducer producer = createProducer(configuration); + Exchange exchange = new DefaultExchange(new DefaultCamelContext()); + exchange.getIn().setHeader(BedrockAgentConstants.OPERATION, BedrockAgentOperations.getIngestionJob); + exchange.getIn().setHeader(BedrockAgentConstants.KNOWLEDGE_BASE_ID, "kb-2"); + exchange.getIn().setHeader(BedrockAgentConstants.DATASOURCE_ID, "ds-2"); + exchange.getIn().setHeader(BedrockAgentConstants.INGESTION_JOB_ID, "job-2"); + + producer.process(exchange); + + ArgumentCaptor request = ArgumentCaptor.forClass(GetIngestionJobRequest.class); + verify(client).getIngestionJob(request.capture()); + assertThat(request.getValue().knowledgeBaseId()).isEqualTo("kb-2"); + assertThat(request.getValue().dataSourceId()).isEqualTo("ds-2"); + assertThat(request.getValue().ingestionJobId()).isEqualTo("job-2"); + } + + @Test + void optionsAreUsedWithoutHeaders() throws Exception { + when(client.startIngestionJob(any(StartIngestionJobRequest.class))).thenReturn(StartIngestionJobResponse.builder() + .ingestionJob(IngestionJob.builder().ingestionJobId("job-3").build()) + .build()); + BedrockAgentConfiguration configuration = new BedrockAgentConfiguration(); + configuration.setKnowledgeBaseId("kb-1"); + configuration.setDataSourceId("ds-1"); + BedrockAgentProducer producer = createProducer(configuration); + Exchange exchange = new DefaultExchange(new DefaultCamelContext()); + exchange.getIn().setHeader(BedrockAgentConstants.OPERATION, BedrockAgentOperations.startIngestionJob); + + producer.process(exchange); + + ArgumentCaptor request = ArgumentCaptor.forClass(StartIngestionJobRequest.class); + verify(client).startIngestionJob(request.capture()); + assertThat(request.getValue().knowledgeBaseId()).isEqualTo("kb-1"); + assertThat(request.getValue().dataSourceId()).isEqualTo("ds-1"); + assertThat(exchange.getMessage().getBody()).isEqualTo("job-3"); + } + + @Test + void missingIdFails() { + BedrockAgentConfiguration configuration = new BedrockAgentConfiguration(); + configuration.setKnowledgeBaseId("kb-1"); + BedrockAgentProducer producer = createProducer(configuration); + Exchange exchange = new DefaultExchange(new DefaultCamelContext()); + exchange.getIn().setHeader(BedrockAgentConstants.OPERATION, BedrockAgentOperations.listIngestionJobs); + + assertThatThrownBy(() -> producer.process(exchange)) + .isInstanceOf(IllegalArgumentException.class) + .hasMessage("DataSourceId must be specified"); + verifyNoInteractions(client); + } } diff --git a/components/camel-aws/camel-aws2-step-functions/src/generated/resources/META-INF/org/apache/camel/component/aws2/stepfunctions/aws2-step-functions.json b/components/camel-aws/camel-aws2-step-functions/src/generated/resources/META-INF/org/apache/camel/component/aws2/stepfunctions/aws2-step-functions.json index 41c36bc55272a..d3a30c8e5f62a 100644 --- a/components/camel-aws/camel-aws2-step-functions/src/generated/resources/META-INF/org/apache/camel/component/aws2/stepfunctions/aws2-step-functions.json +++ b/components/camel-aws/camel-aws2-step-functions/src/generated/resources/META-INF/org/apache/camel/component/aws2/stepfunctions/aws2-step-functions.json @@ -60,12 +60,15 @@ "CamelAwsStepFunctionsActivitiesMaxResults": { "index": 9, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "Integer", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The limit number of results while listing activities", "constantName": "org.apache.camel.component.aws2.stepfunctions.StepFunctions2Constants#ACTIVITIES_MAX_RESULTS" }, "CamelAwsStepFunctionsExecutionArn": { "index": 10, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The Amazon Resource Name (ARN) of the execution.", "constantName": "org.apache.camel.component.aws2.stepfunctions.StepFunctions2Constants#EXECUTION_ARN" }, "CamelAwsStepFunctionsExecutionName": { "index": 11, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Optional name of the execution.", "constantName": "org.apache.camel.component.aws2.stepfunctions.StepFunctions2Constants#EXECUTION_NAME" }, - "CamelAwsStepFunctionsExecutionInput": { "index": 12, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The string that contains the JSON input data for the execution.", "constantName": "org.apache.camel.component.aws2.stepfunctions.StepFunctions2Constants#EXECUTION_INPUT" }, - "CamelAwsStepFunctionsExecutionTraceHeader": { "index": 13, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Passes the X-Ray trace header.", "constantName": "org.apache.camel.component.aws2.stepfunctions.StepFunctions2Constants#EXECUTION_TRACE_HEADER" }, - "CamelAwsStepFunctionsExecutionHistoryMaxResults": { "index": 14, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "Integer", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The limit number of results while listing execution history", "constantName": "org.apache.camel.component.aws2.stepfunctions.StepFunctions2Constants#EXECUTION_HISTORY_MAX_RESULTS" }, - "CamelAwsStepFunctionsExecutionHistoryIncludeExecutionData": { "index": 15, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "Boolean", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "You can select whether execution data (input or output of a history event) is returned.", "constantName": "org.apache.camel.component.aws2.stepfunctions.StepFunctions2Constants#EXECUTION_HISTORY_INCLUDE_EXECUTION_DATA" }, - "CamelAwsStepFunctionsExecutionHistoryReverseOrder": { "index": 16, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "Boolean", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Lists events in descending order of their timeStamp.", "constantName": "org.apache.camel.component.aws2.stepfunctions.StepFunctions2Constants#EXECUTION_HISTORY_REVERSE_ORDER" }, - "CamelAwsStepFunctionsExecutionMaxResults": { "index": 17, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "Integer", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The limit number of results while listing executions", "constantName": "org.apache.camel.component.aws2.stepfunctions.StepFunctions2Constants#EXECUTIONS_MAX_RESULTS" } + "CamelAwsStepFunctionsExecutionInput": { "index": 12, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The JSON input data for the execution, as text (a String, a byte array or a stream).", "constantName": "org.apache.camel.component.aws2.stepfunctions.StepFunctions2Constants#EXECUTION_INPUT" }, + "CamelAwsStepFunctionsExecutionStatus": { "index": 13, "kind": "header", "displayName": "", "group": "startSyncExecution", "label": "startSyncExecution", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The status of the execution: SUCCEEDED, FAILED or TIMED_OUT. The exchange does not fail when the execution did not succeed: check this header.", "constantName": "org.apache.camel.component.aws2.stepfunctions.StepFunctions2Constants#EXECUTION_STATUS" }, + "CamelAwsStepFunctionsExecutionError": { "index": 14, "kind": "header", "displayName": "", "group": "startSyncExecution", "label": "startSyncExecution", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The error code of the failure, when the execution failed.", "constantName": "org.apache.camel.component.aws2.stepfunctions.StepFunctions2Constants#EXECUTION_ERROR" }, + "CamelAwsStepFunctionsExecutionCause": { "index": 15, "kind": "header", "displayName": "", "group": "startSyncExecution", "label": "startSyncExecution", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The cause of the failure, when the execution failed.", "constantName": "org.apache.camel.component.aws2.stepfunctions.StepFunctions2Constants#EXECUTION_CAUSE" }, + "CamelAwsStepFunctionsExecutionTraceHeader": { "index": 16, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Passes the X-Ray trace header.", "constantName": "org.apache.camel.component.aws2.stepfunctions.StepFunctions2Constants#EXECUTION_TRACE_HEADER" }, + "CamelAwsStepFunctionsExecutionHistoryMaxResults": { "index": 17, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "Integer", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The limit number of results while listing execution history", "constantName": "org.apache.camel.component.aws2.stepfunctions.StepFunctions2Constants#EXECUTION_HISTORY_MAX_RESULTS" }, + "CamelAwsStepFunctionsExecutionHistoryIncludeExecutionData": { "index": 18, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "Boolean", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "You can select whether execution data (input or output of a history event) is returned.", "constantName": "org.apache.camel.component.aws2.stepfunctions.StepFunctions2Constants#EXECUTION_HISTORY_INCLUDE_EXECUTION_DATA" }, + "CamelAwsStepFunctionsExecutionHistoryReverseOrder": { "index": 19, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "Boolean", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Lists events in descending order of their timeStamp.", "constantName": "org.apache.camel.component.aws2.stepfunctions.StepFunctions2Constants#EXECUTION_HISTORY_REVERSE_ORDER" }, + "CamelAwsStepFunctionsExecutionMaxResults": { "index": 20, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "Integer", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The limit number of results while listing executions", "constantName": "org.apache.camel.component.aws2.stepfunctions.StepFunctions2Constants#EXECUTIONS_MAX_RESULTS" } }, "properties": { "label": { "index": 0, "kind": "path", "displayName": "Label", "group": "producer", "label": "", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.stepfunctions.StepFunctions2Configuration", "configurationField": "configuration", "description": "Logical name" }, diff --git a/components/camel-aws/camel-aws2-step-functions/src/main/docs/aws2-step-functions-component.adoc b/components/camel-aws/camel-aws2-step-functions/src/main/docs/aws2-step-functions-component.adoc index 965c1846da6e8..a97a02b707dbf 100644 --- a/components/camel-aws/camel-aws2-step-functions/src/main/docs/aws2-step-functions-component.adoc +++ b/components/camel-aws/camel-aws2-step-functions/src/main/docs/aws2-step-functions-component.adoc @@ -96,6 +96,16 @@ Camel-AWS Step Functions component provides the following operation on the produ - listExecutions - getExecutionHistory +The startExecution and startSyncExecution operations take the input of the execution from the +`CamelAwsStepFunctionsExecutionInput` header, which must be JSON text (a String, a byte array or a stream). +A value of another type, such as a `Map`, is not turned into JSON: the exchange fails. + +The startSyncExecution operation waits for the execution to end, and sets the body to the `StartSyncExecutionResponse` +of the AWS SDK, which holds the output. It sets the `CamelAwsStepFunctionsExecutionStatus` header to the status of the +execution (`SUCCEEDED`, `FAILED` or `TIMED_OUT`), and, when the execution failed, the +`CamelAwsStepFunctionsExecutionError` and `CamelAwsStepFunctionsExecutionCause` headers. The exchange does not fail +when the execution did not succeed: check the status header. + == Examples === Producer Examples diff --git a/components/camel-aws/camel-aws2-step-functions/src/main/java/org/apache/camel/component/aws2/stepfunctions/StepFunctions2Constants.java b/components/camel-aws/camel-aws2-step-functions/src/main/java/org/apache/camel/component/aws2/stepfunctions/StepFunctions2Constants.java index 3a302901b3caa..219be86c9bfd8 100644 --- a/components/camel-aws/camel-aws2-step-functions/src/main/java/org/apache/camel/component/aws2/stepfunctions/StepFunctions2Constants.java +++ b/components/camel-aws/camel-aws2-step-functions/src/main/java/org/apache/camel/component/aws2/stepfunctions/StepFunctions2Constants.java @@ -57,9 +57,24 @@ public interface StepFunctions2Constants { @Metadata(description = "Optional name of the execution.", javaType = "String") String EXECUTION_NAME = "CamelAwsStepFunctionsExecutionName"; - @Metadata(description = "The string that contains the JSON input data for the execution.", javaType = "String") + @Metadata(description = "The JSON input data for the execution, as text (a String, a byte array or a stream).", + javaType = "String") String EXECUTION_INPUT = "CamelAwsStepFunctionsExecutionInput"; + @Metadata(label = "startSyncExecution", + description = "The status of the execution: SUCCEEDED, FAILED or TIMED_OUT. The exchange does not fail when the" + + " execution did not succeed: check this header.", + javaType = "String") + String EXECUTION_STATUS = "CamelAwsStepFunctionsExecutionStatus"; + + @Metadata(label = "startSyncExecution", description = "The error code of the failure, when the execution failed.", + javaType = "String") + String EXECUTION_ERROR = "CamelAwsStepFunctionsExecutionError"; + + @Metadata(label = "startSyncExecution", description = "The cause of the failure, when the execution failed.", + javaType = "String") + String EXECUTION_CAUSE = "CamelAwsStepFunctionsExecutionCause"; + @Metadata(description = "Passes the X-Ray trace header.", javaType = "String") String EXECUTION_TRACE_HEADER = "CamelAwsStepFunctionsExecutionTraceHeader"; diff --git a/components/camel-aws/camel-aws2-step-functions/src/main/java/org/apache/camel/component/aws2/stepfunctions/StepFunctions2Producer.java b/components/camel-aws/camel-aws2-step-functions/src/main/java/org/apache/camel/component/aws2/stepfunctions/StepFunctions2Producer.java index dc477736e2673..ec96267118bcd 100644 --- a/components/camel-aws/camel-aws2-step-functions/src/main/java/org/apache/camel/component/aws2/stepfunctions/StepFunctions2Producer.java +++ b/components/camel-aws/camel-aws2-step-functions/src/main/java/org/apache/camel/component/aws2/stepfunctions/StepFunctions2Producer.java @@ -16,6 +16,9 @@ */ package org.apache.camel.component.aws2.stepfunctions; +import java.io.InputStream; +import java.io.Reader; + import org.apache.camel.Endpoint; import org.apache.camel.Exchange; import org.apache.camel.InvalidPayloadException; @@ -522,8 +525,8 @@ private void startExecution(SfnClient sfnClient, Exchange exchange) throws Inval String executionName = exchange.getIn().getHeader(StepFunctions2Constants.EXECUTION_NAME, String.class); builder.name(executionName); } - if (ObjectHelper.isNotEmpty(exchange.getIn().getHeader(StepFunctions2Constants.EXECUTION_INPUT))) { - String executionInput = exchange.getIn().getHeader(StepFunctions2Constants.EXECUTION_INPUT, String.class); + String executionInput = getExecutionInput(exchange); + if (ObjectHelper.isNotEmpty(executionInput)) { builder.input(executionInput); } if (ObjectHelper.isNotEmpty(exchange.getIn().getHeader(StepFunctions2Constants.EXECUTION_TRACE_HEADER))) { @@ -557,6 +560,7 @@ private void startSyncExecution(SfnClient sfnClient, Exchange exchange) throws I } Message message = getMessageForResponse(exchange); message.setBody(result); + setSyncExecutionHeaders(message, result); } else { throw new IllegalArgumentException( "startSyncExecution operation requires StartSyncExecutionRequest in POJO mode"); @@ -571,8 +575,8 @@ private void startSyncExecution(SfnClient sfnClient, Exchange exchange) throws I String executionName = exchange.getIn().getHeader(StepFunctions2Constants.EXECUTION_NAME, String.class); builder.name(executionName); } - if (ObjectHelper.isNotEmpty(exchange.getIn().getHeader(StepFunctions2Constants.EXECUTION_INPUT))) { - String executionInput = exchange.getIn().getHeader(StepFunctions2Constants.EXECUTION_INPUT, String.class); + String executionInput = getExecutionInput(exchange); + if (ObjectHelper.isNotEmpty(executionInput)) { builder.input(executionInput); } if (ObjectHelper.isNotEmpty(exchange.getIn().getHeader(StepFunctions2Constants.EXECUTION_TRACE_HEADER))) { @@ -590,6 +594,34 @@ private void startSyncExecution(SfnClient sfnClient, Exchange exchange) throws I } Message message = getMessageForResponse(exchange); message.setBody(result); + setSyncExecutionHeaders(message, result); + } + } + + /** + * The execution input of the header, which must be JSON text. A value that is not text, such as a Map, is not + * turned into JSON, so it fails instead of being sent as its toString(). + */ + private static String getExecutionInput(Exchange exchange) { + Object value = exchange.getIn().getHeader(StepFunctions2Constants.EXECUTION_INPUT); + if (value == null || value instanceof String) { + return (String) value; + } + if (value instanceof byte[] || value instanceof InputStream || value instanceof Reader) { + return exchange.getIn().getHeader(StepFunctions2Constants.EXECUTION_INPUT, String.class); + } + throw new IllegalArgumentException( + "The " + StepFunctions2Constants.EXECUTION_INPUT + " header must be JSON text, but was " + + value.getClass().getName()); + } + + private static void setSyncExecutionHeaders(Message message, StartSyncExecutionResponse result) { + message.setHeader(StepFunctions2Constants.EXECUTION_STATUS, result.statusAsString()); + if (result.error() != null) { + message.setHeader(StepFunctions2Constants.EXECUTION_ERROR, result.error()); + } + if (result.cause() != null) { + message.setHeader(StepFunctions2Constants.EXECUTION_CAUSE, result.cause()); } } diff --git a/components/camel-aws/camel-aws2-step-functions/src/test/java/org/apache/camel/component/aws2/stepfunctions/AmazonStepFunctionsClientMock.java b/components/camel-aws/camel-aws2-step-functions/src/test/java/org/apache/camel/component/aws2/stepfunctions/AmazonStepFunctionsClientMock.java index ed3f27d955ad7..2315bc7f99b0e 100644 --- a/components/camel-aws/camel-aws2-step-functions/src/test/java/org/apache/camel/component/aws2/stepfunctions/AmazonStepFunctionsClientMock.java +++ b/components/camel-aws/camel-aws2-step-functions/src/test/java/org/apache/camel/component/aws2/stepfunctions/AmazonStepFunctionsClientMock.java @@ -25,6 +25,8 @@ public class AmazonStepFunctionsClientMock implements SfnClient { + private StartSyncExecutionRequest lastStartSyncExecutionRequest; + private ListExecutionsRequest lastListExecutionsRequest; public AmazonStepFunctionsClientMock() { @@ -137,11 +139,21 @@ public StartExecutionResponse startExecution(StartExecutionRequest startExecutio @Override public StartSyncExecutionResponse startSyncExecution(StartSyncExecutionRequest startSyncExecutionRequest) { + lastStartSyncExecutionRequest = startSyncExecutionRequest; StartSyncExecutionResponse.Builder result = StartSyncExecutionResponse.builder(); result.executionArn("aws:sfn-execution::test:arn"); + if ("failing".equals(startSyncExecutionRequest.name())) { + result.status(SyncExecutionStatus.FAILED).error("States.TaskFailed").cause("The task failed"); + } else { + result.status(SyncExecutionStatus.SUCCEEDED).output(startSyncExecutionRequest.input()); + } return result.build(); } + public StartSyncExecutionRequest getLastStartSyncExecutionRequest() { + return lastStartSyncExecutionRequest; + } + @Override public StopExecutionResponse stopExecution(StopExecutionRequest stopExecutionRequest) { StopExecutionResponse.Builder result = StopExecutionResponse.builder(); diff --git a/components/camel-aws/camel-aws2-step-functions/src/test/java/org/apache/camel/component/aws2/stepfunctions/StepFunctions2ProducerTest.java b/components/camel-aws/camel-aws2-step-functions/src/test/java/org/apache/camel/component/aws2/stepfunctions/StepFunctions2ProducerTest.java index e1fdef089e876..b490b178947ac 100644 --- a/components/camel-aws/camel-aws2-step-functions/src/test/java/org/apache/camel/component/aws2/stepfunctions/StepFunctions2ProducerTest.java +++ b/components/camel-aws/camel-aws2-step-functions/src/test/java/org/apache/camel/component/aws2/stepfunctions/StepFunctions2ProducerTest.java @@ -16,7 +16,9 @@ */ package org.apache.camel.component.aws2.stepfunctions; +import java.nio.charset.StandardCharsets; import java.util.Date; +import java.util.Map; import org.apache.camel.BindToRegistry; import org.apache.camel.EndpointInject; @@ -32,7 +34,9 @@ import static org.assertj.core.api.Assertions.assertThatThrownBy; import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertInstanceOf; import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertNull; public class StepFunctions2ProducerTest extends CamelTestSupport { @@ -269,6 +273,52 @@ public void process(Exchange exchange) { assertEquals("aws:sfn-execution::test:arn", resultGet.executionArn()); } + @Test + public void sfnStartSyncExecutionSetsStatusHeaderTest() { + Exchange exchange = template.request("direct:startSyncExecution", e -> { + e.getIn().setHeader(StepFunctions2Constants.EXECUTION_INPUT, "{\"a\":1}"); + }); + + assertNull(exchange.getException()); + assertEquals("{\"a\":1}", clientMock.getLastStartSyncExecutionRequest().input()); + assertEquals("SUCCEEDED", exchange.getMessage().getHeader(StepFunctions2Constants.EXECUTION_STATUS)); + assertNull(exchange.getMessage().getHeader(StepFunctions2Constants.EXECUTION_ERROR)); + } + + @Test + public void sfnStartSyncExecutionFailedSetsErrorHeadersTest() { + Exchange exchange = template.request("direct:startSyncExecution", e -> { + e.getIn().setHeader(StepFunctions2Constants.EXECUTION_NAME, "failing"); + }); + + assertNull(exchange.getException()); + assertEquals("FAILED", exchange.getMessage().getHeader(StepFunctions2Constants.EXECUTION_STATUS)); + assertEquals("States.TaskFailed", exchange.getMessage().getHeader(StepFunctions2Constants.EXECUTION_ERROR)); + assertEquals("The task failed", exchange.getMessage().getHeader(StepFunctions2Constants.EXECUTION_CAUSE)); + } + + @Test + public void sfnStartSyncExecutionInputAsBytesTest() { + Exchange exchange = template.request("direct:startSyncExecution", e -> { + e.getIn().setHeader(StepFunctions2Constants.EXECUTION_INPUT, "{\"b\":2}".getBytes(StandardCharsets.UTF_8)); + }); + + assertNull(exchange.getException()); + assertEquals("{\"b\":2}", clientMock.getLastStartSyncExecutionRequest().input()); + } + + @Test + public void sfnStartExecutionInputAsMapFailsTest() { + Exchange exchange = template.request("direct:startExecution", e -> { + e.getIn().setHeader(StepFunctions2Constants.EXECUTION_INPUT, Map.of("a", 1)); + }); + + assertInstanceOf(IllegalArgumentException.class, exchange.getException()); + assertEquals("The CamelAwsStepFunctionsExecutionInput header must be JSON text, but was " + + Map.of("a", 1).getClass().getName(), + exchange.getException().getMessage()); + } + @Test public void sfnStopExecutionTest() throws Exception { diff --git a/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_24.adoc b/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_24.adoc index 33ee72762a84c..b194993cd36c3 100644 --- a/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_24.adoc +++ b/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_24.adoc @@ -2661,6 +2661,7 @@ Node producer creates it, from the options of the Edge Node endpoint (`deviceIds Device route that starts before the Edge Node route, or while it is stopped, therefore no longer fails with a `NullPointerException` when the Device URI has no `deviceIds`. Sending to a Device endpoint while no producer of its Edge Node endpoint is started now fails the exchange with an `IllegalStateException`; before, the data was dropped. + === camel-aws - producers without an operation, and headers of the wrong type The producers of `aws2-ec2`, `aws2-ecs`, `aws2-eks`, `aws2-mq`, `aws2-msk`, `aws2-rekognition`, `aws2-step-functions`, @@ -2687,3 +2688,14 @@ The `CamelAwsEKSDescription` header of `aws2-eks` is removed, together with the its method in the header builder of the endpoint DSL. No operation of the component read it. The `aws2-mq` component, which manages Amazon MQ brokers, is now in the `management` category instead of `messaging`. + +In `aws2-step-functions`, the `CamelAwsStepFunctionsExecutionInput` header of startExecution and startSyncExecution +must be JSON text (a String, a byte array or a stream). A value of another type, such as a `Map`, was sent as its +`toString()`, which is not JSON; now the exchange fails. startSyncExecution now sets the +`CamelAwsStepFunctionsExecutionStatus` header to the status of the execution (`SUCCEEDED`, `FAILED` or `TIMED_OUT`), +and the `CamelAwsStepFunctionsExecutionError` and `CamelAwsStepFunctionsExecutionCause` headers when it failed. The +exchange still does not fail when the execution did not succeed. + +In `aws-bedrock-agent`, the `CamelAwsBedrockAgentKnowledgeBaseId`, `CamelAwsBedrockAgentDataSourceId` and +`CamelAwsBedrockAgentIngestionJobId` headers now override the `knowledgeBaseId`, `dataSourceId` and `ingestionJobId` +options, as the headers of the other AWS components do. Before, a header was used only when the option was not set. diff --git a/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/AwsBedrockAgentComponentBuilderFactory.java b/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/AwsBedrockAgentComponentBuilderFactory.java index 1abbb8295ad1e..a426af6087f18 100644 --- a/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/AwsBedrockAgentComponentBuilderFactory.java +++ b/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/AwsBedrockAgentComponentBuilderFactory.java @@ -68,8 +68,8 @@ default AwsBedrockAgentComponentBuilder configuration(org.apache.camel.component /** * Define the Data source Id we are going to use. The consumer and all - * the operations need it; when set, it is used instead of the - * CamelAwsBedrockAgentDataSourceId header. + * the operations need it; the CamelAwsBedrockAgentDataSourceId header + * overrides it for the producer. * * The option is a: <code>java.lang.String</code> type. * @@ -85,8 +85,9 @@ default AwsBedrockAgentComponentBuilder dataSourceId(java.lang.String dataSource /** * Define the Ingestion Job Id we want to track. The consumer and the - * getIngestionJob operation need it; when set, it is used instead of - * the CamelAwsBedrockAgentIngestionJobId header. + * getIngestionJob operation need it; the + * CamelAwsBedrockAgentIngestionJobId header overrides it for the + * producer. * * The option is a: <code>java.lang.String</code> type. * @@ -102,8 +103,8 @@ default AwsBedrockAgentComponentBuilder ingestionJobId(java.lang.String ingestio /** * Define the Knowledge Base Id we are going to use. The consumer and - * all the operations need it; when set, it is used instead of the - * CamelAwsBedrockAgentKnowledgeBaseId header. + * all the operations need it; the CamelAwsBedrockAgentKnowledgeBaseId + * header overrides it for the producer. * * The option is a: <code>java.lang.String</code> type. * diff --git a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/BedrockAgentEndpointBuilderFactory.java b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/BedrockAgentEndpointBuilderFactory.java index 7f0173d11b01d..5ce9558daa2c5 100644 --- a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/BedrockAgentEndpointBuilderFactory.java +++ b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/BedrockAgentEndpointBuilderFactory.java @@ -45,8 +45,8 @@ default AdvancedBedrockAgentEndpointConsumerBuilder advanced() { } /** * Define the Data source Id we are going to use. The consumer and all - * the operations need it; when set, it is used instead of the - * CamelAwsBedrockAgentDataSourceId header. + * the operations need it; the CamelAwsBedrockAgentDataSourceId header + * overrides it for the producer. * * The option is a: java.lang.String type. * @@ -61,8 +61,9 @@ default BedrockAgentEndpointConsumerBuilder dataSourceId(String dataSourceId) { } /** * Define the Ingestion Job Id we want to track. The consumer and the - * getIngestionJob operation need it; when set, it is used instead of - * the CamelAwsBedrockAgentIngestionJobId header. + * getIngestionJob operation need it; the + * CamelAwsBedrockAgentIngestionJobId header overrides it for the + * producer. * * The option is a: java.lang.String type. * @@ -77,8 +78,8 @@ default BedrockAgentEndpointConsumerBuilder ingestionJobId(String ingestionJobId } /** * Define the Knowledge Base Id we are going to use. The consumer and - * all the operations need it; when set, it is used instead of the - * CamelAwsBedrockAgentKnowledgeBaseId header. + * all the operations need it; the CamelAwsBedrockAgentKnowledgeBaseId + * header overrides it for the producer. * * The option is a: java.lang.String type. * @@ -1184,8 +1185,8 @@ default AdvancedBedrockAgentEndpointProducerBuilder advanced() { /** * Define the Data source Id we are going to use. The consumer and all - * the operations need it; when set, it is used instead of the - * CamelAwsBedrockAgentDataSourceId header. + * the operations need it; the CamelAwsBedrockAgentDataSourceId header + * overrides it for the producer. * * The option is a: java.lang.String type. * @@ -1200,8 +1201,9 @@ default BedrockAgentEndpointProducerBuilder dataSourceId(String dataSourceId) { } /** * Define the Ingestion Job Id we want to track. The consumer and the - * getIngestionJob operation need it; when set, it is used instead of - * the CamelAwsBedrockAgentIngestionJobId header. + * getIngestionJob operation need it; the + * CamelAwsBedrockAgentIngestionJobId header overrides it for the + * producer. * * The option is a: java.lang.String type. * @@ -1216,8 +1218,8 @@ default BedrockAgentEndpointProducerBuilder ingestionJobId(String ingestionJobId } /** * Define the Knowledge Base Id we are going to use. The consumer and - * all the operations need it; when set, it is used instead of the - * CamelAwsBedrockAgentKnowledgeBaseId header. + * all the operations need it; the CamelAwsBedrockAgentKnowledgeBaseId + * header overrides it for the producer. * * The option is a: java.lang.String type. * @@ -1727,8 +1729,8 @@ default AdvancedBedrockAgentEndpointBuilder advanced() { /** * Define the Data source Id we are going to use. The consumer and all - * the operations need it; when set, it is used instead of the - * CamelAwsBedrockAgentDataSourceId header. + * the operations need it; the CamelAwsBedrockAgentDataSourceId header + * overrides it for the producer. * * The option is a: java.lang.String type. * @@ -1743,8 +1745,9 @@ default BedrockAgentEndpointBuilder dataSourceId(String dataSourceId) { } /** * Define the Ingestion Job Id we want to track. The consumer and the - * getIngestionJob operation need it; when set, it is used instead of - * the CamelAwsBedrockAgentIngestionJobId header. + * getIngestionJob operation need it; the + * CamelAwsBedrockAgentIngestionJobId header overrides it for the + * producer. * * The option is a: java.lang.String type. * @@ -1759,8 +1762,8 @@ default BedrockAgentEndpointBuilder ingestionJobId(String ingestionJobId) { } /** * Define the Knowledge Base Id we are going to use. The consumer and - * all the operations need it; when set, it is used instead of the - * CamelAwsBedrockAgentKnowledgeBaseId header. + * all the operations need it; the CamelAwsBedrockAgentKnowledgeBaseId + * header overrides it for the producer. * * The option is a: java.lang.String type. * @@ -2293,8 +2296,8 @@ public String awsBedrockAgentOperation() { return "CamelAwsBedrockAgentOperation"; } /** - * The data source Id of the operation, used when the dataSourceId - * option is not set. + * The data source Id of the operation; it overrides the dataSourceId + * option. * * The option is a: {@code String} type. * @@ -2306,8 +2309,8 @@ public String awsBedrockAgentDataSourceId() { return "CamelAwsBedrockAgentDataSourceId"; } /** - * The knowledge base Id of the operation, used when the knowledgeBaseId - * option is not set. + * The knowledge base Id of the operation; it overrides the + * knowledgeBaseId option. * * The option is a: {@code String} type. * @@ -2320,8 +2323,8 @@ public String awsBedrockAgentKnowledgeBaseId() { return "CamelAwsBedrockAgentKnowledgeBaseId"; } /** - * The id of the ingestion job of the getIngestionJob operation, used - * when the ingestionJobId option is not set. + * The id of the ingestion job of the getIngestionJob operation; it + * overrides the ingestionJobId option. * * The option is a: {@code String} type. * diff --git a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/StepFunctions2EndpointBuilderFactory.java b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/StepFunctions2EndpointBuilderFactory.java index 24777b06b79e7..07b8ba26b769f 100644 --- a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/StepFunctions2EndpointBuilderFactory.java +++ b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/StepFunctions2EndpointBuilderFactory.java @@ -746,7 +746,8 @@ public String awsStepFunctionsExecutionName() { return "CamelAwsStepFunctionsExecutionName"; } /** - * The string that contains the JSON input data for the execution. + * The JSON input data for the execution, as text (a String, a byte + * array or a stream). * * The option is a: {@code String} type. * @@ -758,6 +759,47 @@ public String awsStepFunctionsExecutionName() { public String awsStepFunctionsExecutionInput() { return "CamelAwsStepFunctionsExecutionInput"; } + /** + * The status of the execution: SUCCEEDED, FAILED or TIMED_OUT. The + * exchange does not fail when the execution did not succeed: check this + * header. + * + * The option is a: {@code String} type. + * + * Group: startSyncExecution + * + * @return the name of the header {@code + * AwsStepFunctionsExecutionStatus}. + */ + public String awsStepFunctionsExecutionStatus() { + return "CamelAwsStepFunctionsExecutionStatus"; + } + /** + * The error code of the failure, when the execution failed. + * + * The option is a: {@code String} type. + * + * Group: startSyncExecution + * + * @return the name of the header {@code + * AwsStepFunctionsExecutionError}. + */ + public String awsStepFunctionsExecutionError() { + return "CamelAwsStepFunctionsExecutionError"; + } + /** + * The cause of the failure, when the execution failed. + * + * The option is a: {@code String} type. + * + * Group: startSyncExecution + * + * @return the name of the header {@code + * AwsStepFunctionsExecutionCause}. + */ + public String awsStepFunctionsExecutionCause() { + return "CamelAwsStepFunctionsExecutionCause"; + } /** * Passes the X-Ray trace header. * From 05e8f3fa6ad3cdba996fc4c0bcd6c8dad305402b Mon Sep 17 00:00:00 2001 From: Claus Ibsen Date: Fri, 23 Oct 2026 23:07:58 +0200 Subject: [PATCH 4/5] CAMEL-26079: camel-aws-config, camel-aws2-rekognition - trace logs of an AWS error without details no longer fail Co-Authored-By: Claude Opus 5.5 (1M context) Signed-off-by: Claus Ibsen --- .../camel/component/aws/config/AWSConfigProducer.java | 6 +++--- .../component/aws2/rekognition/Rekognition2Producer.java | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/components/camel-aws/camel-aws-config/src/main/java/org/apache/camel/component/aws/config/AWSConfigProducer.java b/components/camel-aws/camel-aws-config/src/main/java/org/apache/camel/component/aws/config/AWSConfigProducer.java index 01b5f230fae60..6f8de4c3778e3 100644 --- a/components/camel-aws/camel-aws-config/src/main/java/org/apache/camel/component/aws/config/AWSConfigProducer.java +++ b/components/camel-aws/camel-aws-config/src/main/java/org/apache/camel/component/aws/config/AWSConfigProducer.java @@ -198,7 +198,7 @@ private void describeRuleCompliance(ConfigClient configClient, Exchange exchange result = configClient.describeComplianceByConfigRule(request); } catch (AwsServiceException ase) { LOG.trace("Describe Compliance by Config rule command returned the error code {}", - ase.awsErrorDetails().errorCode()); + AwsExceptionUtil.errorCode(ase)); throw ase; } Message message = getMessageForResponse(exchange); @@ -219,7 +219,7 @@ private void describeRuleCompliance(ConfigClient configClient, Exchange exchange result = configClient.describeComplianceByConfigRule(request); } catch (AwsServiceException ase) { LOG.trace("Describe Compliance by Config Rule command returned the error code {}", - ase.awsErrorDetails().errorCode()); + AwsExceptionUtil.errorCode(ase)); throw ase; } Message message = getMessageForResponse(exchange); @@ -290,7 +290,7 @@ private void removeConformancePack(ConfigClient configClient, Exchange exchange) result = configClient.deleteConformancePack(request); } catch (AwsServiceException ase) { LOG.trace("Remove Conformance Pack rule command returned the error code {}", - ase.awsErrorDetails().errorCode()); + AwsExceptionUtil.errorCode(ase)); throw ase; } Message message = getMessageForResponse(exchange); diff --git a/components/camel-aws/camel-aws2-rekognition/src/main/java/org/apache/camel/component/aws2/rekognition/Rekognition2Producer.java b/components/camel-aws/camel-aws2-rekognition/src/main/java/org/apache/camel/component/aws2/rekognition/Rekognition2Producer.java index c8069c37603ad..f4f9cbf1a8888 100644 --- a/components/camel-aws/camel-aws2-rekognition/src/main/java/org/apache/camel/component/aws2/rekognition/Rekognition2Producer.java +++ b/components/camel-aws/camel-aws2-rekognition/src/main/java/org/apache/camel/component/aws2/rekognition/Rekognition2Producer.java @@ -695,7 +695,7 @@ private void detectProtectiveEquipment(RekognitionClient rekognitionClient, Exch result = rekognitionClient.detectProtectiveEquipment(request); } catch (AwsServiceException ase) { LOG.trace("Detect Protective Equipment command returned the error code {}", - ase.awsErrorDetails().errorCode()); + AwsExceptionUtil.errorCode(ase)); throw ase; } Message message = getMessageForResponse(exchange); From 5ffecf575cc8a09e3bee03670f8329d8c1d07388 Mon Sep 17 00:00:00 2001 From: Claus Ibsen Date: Fri, 23 Oct 2026 23:31:45 +0200 Subject: [PATCH 5/5] CAMEL-26098: camel-aws2-ec2 - skip null instance ids, and drop a null check InstanceType.fromValue never needs Co-Authored-By: Claude Opus 5.5 (1M context) Signed-off-by: Claus Ibsen --- .../apache/camel/component/aws2/ec2/AWS2EC2Producer.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/components/camel-aws/camel-aws2-ec2/src/main/java/org/apache/camel/component/aws2/ec2/AWS2EC2Producer.java b/components/camel-aws/camel-aws2-ec2/src/main/java/org/apache/camel/component/aws2/ec2/AWS2EC2Producer.java index 2063b8af0ca47..fb9fb69c3f2f6 100644 --- a/components/camel-aws/camel-aws2-ec2/src/main/java/org/apache/camel/component/aws2/ec2/AWS2EC2Producer.java +++ b/components/camel-aws/camel-aws2-ec2/src/main/java/org/apache/camel/component/aws2/ec2/AWS2EC2Producer.java @@ -690,7 +690,7 @@ private InstanceType getInstanceType(Exchange exchange) { if (text != null) { text = text.trim(); InstanceType instanceType = InstanceType.fromValue(text); - if (instanceType != null && instanceType != InstanceType.UNKNOWN_TO_SDK_VERSION) { + if (instanceType != InstanceType.UNKNOWN_TO_SDK_VERSION) { return instanceType; } for (InstanceType candidate : InstanceType.knownValues()) { @@ -716,7 +716,9 @@ private Collection getInstanceIds(Exchange exchange) { if (value instanceof Collection collection) { List ids = new ArrayList<>(collection.size()); for (Object id : collection) { - ids.add(id != null ? id.toString() : null); + if (id != null) { + ids.add(id.toString()); + } } return ids; }