diff --git a/bom/camel-bom/pom.xml b/bom/camel-bom/pom.xml
index 24ae2b3f66a98..e6f39b5a03701 100644
--- a/bom/camel-bom/pom.xml
+++ b/bom/camel-bom/pom.xml
@@ -221,6 +221,11 @@
camel-aws2-sqs
${project.version}
+
+ org.apache.camel
+ camel-aws2-step-functions
+ ${project.version}
+
org.apache.camel
camel-aws2-sts
diff --git a/catalog/camel-allcomponents/pom.xml b/catalog/camel-allcomponents/pom.xml
index 672d680eaaffe..2a729bd0af613 100644
--- a/catalog/camel-allcomponents/pom.xml
+++ b/catalog/camel-allcomponents/pom.xml
@@ -217,6 +217,11 @@
camel-aws2-sqs
${project.version}
+
+ org.apache.camel
+ camel-aws2-step-functions
+ ${project.version}
+
org.apache.camel
camel-aws2-sts
diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components.properties b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components.properties
index d7ffb4523578b..75a7ac2930bb0 100644
--- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components.properties
+++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components.properties
@@ -27,6 +27,7 @@ aws2-s3
aws2-ses
aws2-sns
aws2-sqs
+aws2-step-functions
aws2-sts
aws2-translate
azure-cosmosdb
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
new file mode 100644
index 0000000000000..5d6608196f64f
--- /dev/null
+++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/aws2-step-functions.json
@@ -0,0 +1,85 @@
+{
+ "component": {
+ "kind": "component",
+ "name": "aws2-step-functions",
+ "title": "AWS StepFunctions",
+ "description": "Manage and invoke AWS Step functions using AWS SDK version 2.x.",
+ "deprecated": false,
+ "firstVersion": "4.0.0",
+ "label": "cloud,serverless",
+ "javaType": "org.apache.camel.component.aws2.stepfunctions.StepFunctions2Component",
+ "supportLevel": "Preview",
+ "groupId": "org.apache.camel",
+ "artifactId": "camel-aws2-step-functions",
+ "version": "4.0.0-SNAPSHOT",
+ "scheme": "aws2-step-functions",
+ "extendsScheme": "",
+ "syntax": "aws2-step-functions:label",
+ "async": false,
+ "api": false,
+ "consumerOnly": false,
+ "producerOnly": true,
+ "lenientProperties": false
+ },
+ "componentProperties": {
+ "configuration": { "index": 0, "kind": "property", "displayName": "Configuration", "group": "producer", "label": "", "required": false, "type": "object", "javaType": "org.apache.camel.component.aws2.stepfunctions.StepFunctions2Configuration", "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": "object", "javaType": "org.apache.camel.component.aws2.stepfunctions.StepFunctions2Operations", "enum": [ "createStateMachine", "deleteStateMachine", "updateStateMachine", "describeStateMachine", "listStateMachines", "createActivity", "deleteActivity", "describeActivity", "getActivityTask", "listActivities", "startExecution", "startSyncExecution", "stopExecution", "describeExecution", "listExecutions", "getExecutionHistory" ], "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.stepfunctions.StepFunctions2Configuration", "configurationField": "configuration", "description": "The operation to perform. It can be listFunctions, getFunction, createFunction, deleteFunction or invokeFunction" },
+ "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.stepfunctions.StepFunctions2Configuration", "configurationField": "configuration", "description": "Set the need for overidding the endpoint. This option needs to be used in combination with 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.stepfunctions.StepFunctions2Configuration", "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.stepfunctions.StepFunctions2Configuration", "configurationField": "configuration", "description": "If using a profile credentials provider this parameter will set the profile name" },
+ "region": { "index": 6, "kind": "property", "displayName": "Region", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.stepfunctions.StepFunctions2Configuration", "configurationField": "configuration", "description": "The region in which StepFunctions 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()" },
+ "trustAllCertificates": { "index": 7, "kind": "property", "displayName": "Trust All Certificates", "group": "producer", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.aws2.stepfunctions.StepFunctions2Configuration", "configurationField": "configuration", "description": "If we want to trust all certificates in case of overriding the endpoint" },
+ "uriEndpointOverride": { "index": 8, "kind": "property", "displayName": "Uri Endpoint Override", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.stepfunctions.StepFunctions2Configuration", "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": "producer", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.aws2.stepfunctions.StepFunctions2Configuration", "configurationField": "configuration", "description": "Set whether the StepFunctions 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": "producer", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.aws2.stepfunctions.StepFunctions2Configuration", "configurationField": "configuration", "description": "Set whether the StepFunctions client should expect to load credentials through a profile credentials provider." },
+ "autowiredEnabled": { "index": 11, "kind": "property", "displayName": "Autowired Enabled", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Whether autowiring is enabled. This is used for automatic autowiring options (the option must be marked as autowired) by looking up in the registry to find if there is a single instance of matching type, which then gets configured on the component. This can be used for automatic configuring JDBC data sources, JMS connection factories, AWS Clients, etc." },
+ "awsSfnClient": { "index": 12, "kind": "property", "displayName": "Aws Sfn Client", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "software.amazon.awssdk.services.sfn.SfnClient", "deprecated": false, "deprecationNote": "", "autowired": true, "secret": false, "configurationClass": "org.apache.camel.component.aws2.stepfunctions.StepFunctions2Configuration", "configurationField": "configuration", "description": "To use a existing configured AwsStepFunctionsClient as client" },
+ "healthCheckConsumerEnabled": { "index": 13, "kind": "property", "displayName": "Health Check Consumer Enabled", "group": "health", "label": "health", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Used for enabling or disabling all consumer based health checks from this component" },
+ "healthCheckProducerEnabled": { "index": 14, "kind": "property", "displayName": "Health Check Producer Enabled", "group": "health", "label": "health", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Used for enabling or disabling all producer based health checks from this component. Notice: Camel has by default disabled all producer based health-checks. You can turn on producer checks globally by setting camel.health.producersEnabled=true." },
+ "proxyHost": { "index": 15, "kind": "property", "displayName": "Proxy Host", "group": "proxy", "label": "proxy", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.stepfunctions.StepFunctions2Configuration", "configurationField": "configuration", "description": "To define a proxy host when instantiating the StepFunctions client" },
+ "proxyPort": { "index": 16, "kind": "property", "displayName": "Proxy Port", "group": "proxy", "label": "proxy", "required": false, "type": "integer", "javaType": "java.lang.Integer", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.stepfunctions.StepFunctions2Configuration", "configurationField": "configuration", "description": "To define a proxy port when instantiating the StepFunctions client" },
+ "proxyProtocol": { "index": 17, "kind": "property", "displayName": "Proxy Protocol", "group": "proxy", "label": "proxy", "required": false, "type": "object", "javaType": "software.amazon.awssdk.core.Protocol", "enum": [ "HTTP", "HTTPS" ], "deprecated": false, "autowired": false, "secret": false, "defaultValue": "HTTPS", "configurationClass": "org.apache.camel.component.aws2.stepfunctions.StepFunctions2Configuration", "configurationField": "configuration", "description": "To define a proxy protocol when instantiating the StepFunctions client" },
+ "accessKey": { "index": 18, "kind": "property", "displayName": "Access Key", "group": "security", "label": "security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": true, "configurationClass": "org.apache.camel.component.aws2.stepfunctions.StepFunctions2Configuration", "configurationField": "configuration", "description": "Amazon AWS Access Key" },
+ "secretKey": { "index": 19, "kind": "property", "displayName": "Secret Key", "group": "security", "label": "security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": true, "configurationClass": "org.apache.camel.component.aws2.stepfunctions.StepFunctions2Configuration", "configurationField": "configuration", "description": "Amazon AWS Secret Key" }
+ },
+ "headers": {
+ "CamelAwsStateMachineOperation": { "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.stepfunctions.StepFunctions2Constants#OPERATION" },
+ "CamelAwsStepFunctionsStateMachineName": { "index": 1, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The name of the state machine", "constantName": "org.apache.camel.component.aws2.stepfunctions.StepFunctions2Constants#STATE_MACHINE_NAME" },
+ "CamelAwsStepFunctionsStateMachineDefinition": { "index": 2, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The Amazon States Language definition of the state machine", "constantName": "org.apache.camel.component.aws2.stepfunctions.StepFunctions2Constants#STATE_MACHINE_DEFINITION" },
+ "CamelAwsStepFunctionsStateMachineType": { "index": 3, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Determines whether a Standard or Express state machine is created", "constantName": "org.apache.camel.component.aws2.stepfunctions.StepFunctions2Constants#STATE_MACHINE_TYPE" },
+ "CamelAwsStepFunctionsStateMachineRoleArn": { "index": 4, "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 IAM role to use for this state machine.", "constantName": "org.apache.camel.component.aws2.stepfunctions.StepFunctions2Constants#STATE_MACHINE_ROLE_ARN" },
+ "CamelAwsStepFunctionsStateMachineArn": { "index": 5, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The Amazon Resource Name (ARN) of state machine.", "constantName": "org.apache.camel.component.aws2.stepfunctions.StepFunctions2Constants#STATE_MACHINE_ARN" },
+ "CamelAwsStateMachinesMaxResults": { "index": 6, "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 state machines", "constantName": "org.apache.camel.component.aws2.stepfunctions.StepFunctions2Constants#STATE_MACHINES_MAX_RESULTS" },
+ "CamelAwsStepFunctionsStateMachineActivityName": { "index": 7, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The name of the state machine activity", "constantName": "org.apache.camel.component.aws2.stepfunctions.StepFunctions2Constants#ACTIVITY_NAME" },
+ "CamelAwsStepFunctionsStateMachineActivityArn": { "index": 8, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The ARN of the state machine activity", "constantName": "org.apache.camel.component.aws2.stepfunctions.StepFunctions2Constants#ACTIVITY_ARN" },
+ "CamelAwsStateMachineActivitiesMaxResults": { "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 state machines", "constantName": "org.apache.camel.component.aws2.stepfunctions.StepFunctions2Constants#ACTIVITIES_MAX_RESULTS" },
+ "CamelAwsStateMachineExecutionArn": { "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" },
+ "CamelAwsStateMachineExecutionName": { "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" },
+ "CamelAwsStateMachineExecutionInput": { "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" },
+ "CamelAwsStateMachineExecutionTraceHeader": { "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" },
+ "CamelAwsStateMachineExecutionHistoryMaxResults": { "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" },
+ "CamelAwsStateMachineExecutionHistoryIncludeExecutionData": { "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" },
+ "CamelAwsStateMachineExecutionHistoryReverseOrder": { "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" },
+ "CamelAwsStateMachineExecutionMaxResults": { "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" }
+ },
+ "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" },
+ "operation": { "index": 1, "kind": "parameter", "displayName": "Operation", "group": "producer", "label": "", "required": true, "type": "object", "javaType": "org.apache.camel.component.aws2.stepfunctions.StepFunctions2Operations", "enum": [ "createStateMachine", "deleteStateMachine", "updateStateMachine", "describeStateMachine", "listStateMachines", "createActivity", "deleteActivity", "describeActivity", "getActivityTask", "listActivities", "startExecution", "startSyncExecution", "stopExecution", "describeExecution", "listExecutions", "getExecutionHistory" ], "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.stepfunctions.StepFunctions2Configuration", "configurationField": "configuration", "description": "The operation to perform. It can be listFunctions, getFunction, createFunction, deleteFunction or invokeFunction" },
+ "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.stepfunctions.StepFunctions2Configuration", "configurationField": "configuration", "description": "Set the need for overidding the endpoint. This option needs to be used in combination with 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.stepfunctions.StepFunctions2Configuration", "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.stepfunctions.StepFunctions2Configuration", "configurationField": "configuration", "description": "If using a profile credentials provider this parameter will set the profile name" },
+ "region": { "index": 5, "kind": "parameter", "displayName": "Region", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.stepfunctions.StepFunctions2Configuration", "configurationField": "configuration", "description": "The region in which StepFunctions 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()" },
+ "trustAllCertificates": { "index": 6, "kind": "parameter", "displayName": "Trust All Certificates", "group": "producer", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.aws2.stepfunctions.StepFunctions2Configuration", "configurationField": "configuration", "description": "If we want to trust all certificates in case of overriding the endpoint" },
+ "uriEndpointOverride": { "index": 7, "kind": "parameter", "displayName": "Uri Endpoint Override", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.stepfunctions.StepFunctions2Configuration", "configurationField": "configuration", "description": "Set the overriding uri endpoint. This option needs to be used in combination with overrideEndpoint option" },
+ "useDefaultCredentialsProvider": { "index": 8, "kind": "parameter", "displayName": "Use Default Credentials Provider", "group": "producer", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.aws2.stepfunctions.StepFunctions2Configuration", "configurationField": "configuration", "description": "Set whether the StepFunctions client should expect to load credentials through a default credentials provider or to expect static credentials to be passed in." },
+ "useProfileCredentialsProvider": { "index": 9, "kind": "parameter", "displayName": "Use Profile Credentials Provider", "group": "producer", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.aws2.stepfunctions.StepFunctions2Configuration", "configurationField": "configuration", "description": "Set whether the StepFunctions client should expect to load credentials through a profile credentials provider." },
+ "lazyStartProducer": { "index": 10, "kind": "parameter", "displayName": "Lazy Start Producer", "group": "producer (advanced)", "label": "producer,advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a 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." },
+ "awsSfnClient": { "index": 11, "kind": "parameter", "displayName": "Aws Sfn Client", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "software.amazon.awssdk.services.sfn.SfnClient", "deprecated": false, "deprecationNote": "", "autowired": true, "secret": false, "configurationClass": "org.apache.camel.component.aws2.stepfunctions.StepFunctions2Configuration", "configurationField": "configuration", "description": "To use a existing configured AwsStepFunctionsClient as client" },
+ "proxyHost": { "index": 12, "kind": "parameter", "displayName": "Proxy Host", "group": "proxy", "label": "proxy", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.stepfunctions.StepFunctions2Configuration", "configurationField": "configuration", "description": "To define a proxy host when instantiating the StepFunctions client" },
+ "proxyPort": { "index": 13, "kind": "parameter", "displayName": "Proxy Port", "group": "proxy", "label": "proxy", "required": false, "type": "integer", "javaType": "java.lang.Integer", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.stepfunctions.StepFunctions2Configuration", "configurationField": "configuration", "description": "To define a proxy port when instantiating the StepFunctions client" },
+ "proxyProtocol": { "index": 14, "kind": "parameter", "displayName": "Proxy Protocol", "group": "proxy", "label": "proxy", "required": false, "type": "object", "javaType": "software.amazon.awssdk.core.Protocol", "enum": [ "HTTP", "HTTPS" ], "deprecated": false, "autowired": false, "secret": false, "defaultValue": "HTTPS", "configurationClass": "org.apache.camel.component.aws2.stepfunctions.StepFunctions2Configuration", "configurationField": "configuration", "description": "To define a proxy protocol when instantiating the StepFunctions client" },
+ "accessKey": { "index": 15, "kind": "parameter", "displayName": "Access Key", "group": "security", "label": "security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": true, "configurationClass": "org.apache.camel.component.aws2.stepfunctions.StepFunctions2Configuration", "configurationField": "configuration", "description": "Amazon AWS Access Key" },
+ "secretKey": { "index": 16, "kind": "parameter", "displayName": "Secret Key", "group": "security", "label": "security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": true, "configurationClass": "org.apache.camel.component.aws2.stepfunctions.StepFunctions2Configuration", "configurationField": "configuration", "description": "Amazon AWS Secret Key" }
+ }
+}
diff --git a/components/camel-aws/camel-aws2-step-functions/pom.xml b/components/camel-aws/camel-aws2-step-functions/pom.xml
new file mode 100644
index 0000000000000..dcb5201ce6c3b
--- /dev/null
+++ b/components/camel-aws/camel-aws2-step-functions/pom.xml
@@ -0,0 +1,87 @@
+
+
+
+ 4.0.0
+
+
+ org.apache.camel
+ camel-aws-parent
+ 4.0.0-SNAPSHOT
+
+
+ camel-aws2-step-functions
+ jar
+
+ Camel :: AWS Step Functions
+ A Camel Amazon Web Services Step Functions component
+
+
+ 1200
+
+
+
+
+ org.apache.camel
+ camel-support
+
+
+ org.apache.camel
+ camel-health
+
+
+ software.amazon.awssdk
+ sfn
+ ${aws-java-sdk2-version}
+
+
+ software.amazon.awssdk
+ apache-client
+ ${aws-java-sdk2-version}
+
+
+
+
+ org.apache.camel
+ camel-test-spring-junit5
+ test
+
+
+
+
+ org.apache.camel
+ camel-test-infra-aws-v2
+ ${project.version}
+ test-jar
+ test
+
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-surefire-plugin
+
+ ${camel.surefire.fork.vmargs} -Xmx2G
+
+
+
+
+
diff --git a/components/camel-aws/camel-aws2-step-functions/src/generated/java/org/apache/camel/component/aws2/stepfunctions/StepFunctions2ComponentConfigurer.java b/components/camel-aws/camel-aws2-step-functions/src/generated/java/org/apache/camel/component/aws2/stepfunctions/StepFunctions2ComponentConfigurer.java
new file mode 100644
index 0000000000000..00b7f3d498ee1
--- /dev/null
+++ b/components/camel-aws/camel-aws2-step-functions/src/generated/java/org/apache/camel/component/aws2/stepfunctions/StepFunctions2ComponentConfigurer.java
@@ -0,0 +1,166 @@
+/* Generated by camel build tools - do NOT edit this file! */
+package org.apache.camel.component.aws2.stepfunctions;
+
+import java.util.Map;
+
+import org.apache.camel.CamelContext;
+import org.apache.camel.spi.ExtendedPropertyConfigurerGetter;
+import org.apache.camel.spi.PropertyConfigurerGetter;
+import org.apache.camel.spi.ConfigurerStrategy;
+import org.apache.camel.spi.GeneratedPropertyConfigurer;
+import org.apache.camel.util.CaseInsensitiveMap;
+import org.apache.camel.support.component.PropertyConfigurerSupport;
+
+/**
+ * Generated by camel build tools - do NOT edit this file!
+ */
+@SuppressWarnings("unchecked")
+public class StepFunctions2ComponentConfigurer extends PropertyConfigurerSupport implements GeneratedPropertyConfigurer, PropertyConfigurerGetter {
+
+ private org.apache.camel.component.aws2.stepfunctions.StepFunctions2Configuration getOrCreateConfiguration(StepFunctions2Component target) {
+ if (target.getConfiguration() == null) {
+ target.setConfiguration(new org.apache.camel.component.aws2.stepfunctions.StepFunctions2Configuration());
+ }
+ return target.getConfiguration();
+ }
+
+ @Override
+ public boolean configure(CamelContext camelContext, Object obj, String name, Object value, boolean ignoreCase) {
+ StepFunctions2Component target = (StepFunctions2Component) obj;
+ switch (ignoreCase ? name.toLowerCase() : name) {
+ case "accesskey":
+ case "accessKey": getOrCreateConfiguration(target).setAccessKey(property(camelContext, java.lang.String.class, value)); return true;
+ case "autowiredenabled":
+ case "autowiredEnabled": target.setAutowiredEnabled(property(camelContext, boolean.class, value)); return true;
+ case "awssfnclient":
+ case "awsSfnClient": getOrCreateConfiguration(target).setAwsSfnClient(property(camelContext, software.amazon.awssdk.services.sfn.SfnClient.class, value)); return true;
+ case "configuration": target.setConfiguration(property(camelContext, org.apache.camel.component.aws2.stepfunctions.StepFunctions2Configuration.class, value)); return true;
+ case "healthcheckconsumerenabled":
+ case "healthCheckConsumerEnabled": target.setHealthCheckConsumerEnabled(property(camelContext, boolean.class, value)); return true;
+ case "healthcheckproducerenabled":
+ case "healthCheckProducerEnabled": target.setHealthCheckProducerEnabled(property(camelContext, boolean.class, value)); return true;
+ case "lazystartproducer":
+ case "lazyStartProducer": target.setLazyStartProducer(property(camelContext, boolean.class, value)); return true;
+ case "operation": getOrCreateConfiguration(target).setOperation(property(camelContext, org.apache.camel.component.aws2.stepfunctions.StepFunctions2Operations.class, value)); return true;
+ case "overrideendpoint":
+ case "overrideEndpoint": getOrCreateConfiguration(target).setOverrideEndpoint(property(camelContext, boolean.class, value)); return true;
+ case "pojorequest":
+ case "pojoRequest": getOrCreateConfiguration(target).setPojoRequest(property(camelContext, boolean.class, value)); return true;
+ case "profilecredentialsname":
+ case "profileCredentialsName": getOrCreateConfiguration(target).setProfileCredentialsName(property(camelContext, java.lang.String.class, value)); return true;
+ case "proxyhost":
+ case "proxyHost": getOrCreateConfiguration(target).setProxyHost(property(camelContext, java.lang.String.class, value)); return true;
+ case "proxyport":
+ case "proxyPort": getOrCreateConfiguration(target).setProxyPort(property(camelContext, java.lang.Integer.class, value)); return true;
+ case "proxyprotocol":
+ case "proxyProtocol": getOrCreateConfiguration(target).setProxyProtocol(property(camelContext, software.amazon.awssdk.core.Protocol.class, value)); return true;
+ case "region": getOrCreateConfiguration(target).setRegion(property(camelContext, java.lang.String.class, value)); return true;
+ case "secretkey":
+ case "secretKey": getOrCreateConfiguration(target).setSecretKey(property(camelContext, java.lang.String.class, value)); return true;
+ case "trustallcertificates":
+ case "trustAllCertificates": getOrCreateConfiguration(target).setTrustAllCertificates(property(camelContext, boolean.class, value)); return true;
+ case "uriendpointoverride":
+ case "uriEndpointOverride": getOrCreateConfiguration(target).setUriEndpointOverride(property(camelContext, java.lang.String.class, value)); return true;
+ case "usedefaultcredentialsprovider":
+ case "useDefaultCredentialsProvider": getOrCreateConfiguration(target).setUseDefaultCredentialsProvider(property(camelContext, boolean.class, value)); return true;
+ case "useprofilecredentialsprovider":
+ case "useProfileCredentialsProvider": getOrCreateConfiguration(target).setUseProfileCredentialsProvider(property(camelContext, boolean.class, value)); return true;
+ default: return false;
+ }
+ }
+
+ @Override
+ public String[] getAutowiredNames() {
+ return new String[]{"awsSfnClient"};
+ }
+
+ @Override
+ public Class> getOptionType(String name, boolean ignoreCase) {
+ switch (ignoreCase ? name.toLowerCase() : name) {
+ case "accesskey":
+ case "accessKey": return java.lang.String.class;
+ case "autowiredenabled":
+ case "autowiredEnabled": return boolean.class;
+ case "awssfnclient":
+ case "awsSfnClient": return software.amazon.awssdk.services.sfn.SfnClient.class;
+ case "configuration": return org.apache.camel.component.aws2.stepfunctions.StepFunctions2Configuration.class;
+ case "healthcheckconsumerenabled":
+ case "healthCheckConsumerEnabled": return boolean.class;
+ case "healthcheckproducerenabled":
+ case "healthCheckProducerEnabled": return boolean.class;
+ case "lazystartproducer":
+ case "lazyStartProducer": return boolean.class;
+ case "operation": return org.apache.camel.component.aws2.stepfunctions.StepFunctions2Operations.class;
+ case "overrideendpoint":
+ case "overrideEndpoint": return boolean.class;
+ case "pojorequest":
+ case "pojoRequest": return boolean.class;
+ case "profilecredentialsname":
+ case "profileCredentialsName": return java.lang.String.class;
+ case "proxyhost":
+ case "proxyHost": return java.lang.String.class;
+ case "proxyport":
+ case "proxyPort": return java.lang.Integer.class;
+ case "proxyprotocol":
+ case "proxyProtocol": return software.amazon.awssdk.core.Protocol.class;
+ case "region": return java.lang.String.class;
+ case "secretkey":
+ case "secretKey": return java.lang.String.class;
+ case "trustallcertificates":
+ case "trustAllCertificates": return boolean.class;
+ case "uriendpointoverride":
+ case "uriEndpointOverride": return java.lang.String.class;
+ case "usedefaultcredentialsprovider":
+ case "useDefaultCredentialsProvider": return boolean.class;
+ case "useprofilecredentialsprovider":
+ case "useProfileCredentialsProvider": return boolean.class;
+ default: return null;
+ }
+ }
+
+ @Override
+ public Object getOptionValue(Object obj, String name, boolean ignoreCase) {
+ StepFunctions2Component target = (StepFunctions2Component) obj;
+ switch (ignoreCase ? name.toLowerCase() : name) {
+ case "accesskey":
+ case "accessKey": return getOrCreateConfiguration(target).getAccessKey();
+ case "autowiredenabled":
+ case "autowiredEnabled": return target.isAutowiredEnabled();
+ case "awssfnclient":
+ case "awsSfnClient": return getOrCreateConfiguration(target).getAwsSfnClient();
+ case "configuration": return target.getConfiguration();
+ case "healthcheckconsumerenabled":
+ case "healthCheckConsumerEnabled": return target.isHealthCheckConsumerEnabled();
+ case "healthcheckproducerenabled":
+ case "healthCheckProducerEnabled": return target.isHealthCheckProducerEnabled();
+ case "lazystartproducer":
+ case "lazyStartProducer": return target.isLazyStartProducer();
+ case "operation": return getOrCreateConfiguration(target).getOperation();
+ case "overrideendpoint":
+ case "overrideEndpoint": return getOrCreateConfiguration(target).isOverrideEndpoint();
+ case "pojorequest":
+ case "pojoRequest": return getOrCreateConfiguration(target).isPojoRequest();
+ case "profilecredentialsname":
+ case "profileCredentialsName": return getOrCreateConfiguration(target).getProfileCredentialsName();
+ case "proxyhost":
+ case "proxyHost": return getOrCreateConfiguration(target).getProxyHost();
+ case "proxyport":
+ case "proxyPort": return getOrCreateConfiguration(target).getProxyPort();
+ case "proxyprotocol":
+ case "proxyProtocol": return getOrCreateConfiguration(target).getProxyProtocol();
+ case "region": return getOrCreateConfiguration(target).getRegion();
+ case "secretkey":
+ case "secretKey": return getOrCreateConfiguration(target).getSecretKey();
+ case "trustallcertificates":
+ case "trustAllCertificates": return getOrCreateConfiguration(target).isTrustAllCertificates();
+ case "uriendpointoverride":
+ case "uriEndpointOverride": return getOrCreateConfiguration(target).getUriEndpointOverride();
+ case "usedefaultcredentialsprovider":
+ case "useDefaultCredentialsProvider": return getOrCreateConfiguration(target).isUseDefaultCredentialsProvider();
+ case "useprofilecredentialsprovider":
+ case "useProfileCredentialsProvider": return getOrCreateConfiguration(target).isUseProfileCredentialsProvider();
+ default: return null;
+ }
+ }
+}
+
diff --git a/components/camel-aws/camel-aws2-step-functions/src/generated/java/org/apache/camel/component/aws2/stepfunctions/StepFunctions2EndpointConfigurer.java b/components/camel-aws/camel-aws2-step-functions/src/generated/java/org/apache/camel/component/aws2/stepfunctions/StepFunctions2EndpointConfigurer.java
new file mode 100644
index 0000000000000..20ca52784cd13
--- /dev/null
+++ b/components/camel-aws/camel-aws2-step-functions/src/generated/java/org/apache/camel/component/aws2/stepfunctions/StepFunctions2EndpointConfigurer.java
@@ -0,0 +1,138 @@
+/* Generated by camel build tools - do NOT edit this file! */
+package org.apache.camel.component.aws2.stepfunctions;
+
+import java.util.Map;
+
+import org.apache.camel.CamelContext;
+import org.apache.camel.spi.ExtendedPropertyConfigurerGetter;
+import org.apache.camel.spi.PropertyConfigurerGetter;
+import org.apache.camel.spi.ConfigurerStrategy;
+import org.apache.camel.spi.GeneratedPropertyConfigurer;
+import org.apache.camel.util.CaseInsensitiveMap;
+import org.apache.camel.support.component.PropertyConfigurerSupport;
+
+/**
+ * Generated by camel build tools - do NOT edit this file!
+ */
+@SuppressWarnings("unchecked")
+public class StepFunctions2EndpointConfigurer extends PropertyConfigurerSupport implements GeneratedPropertyConfigurer, PropertyConfigurerGetter {
+
+ @Override
+ public boolean configure(CamelContext camelContext, Object obj, String name, Object value, boolean ignoreCase) {
+ StepFunctions2Endpoint target = (StepFunctions2Endpoint) obj;
+ switch (ignoreCase ? name.toLowerCase() : name) {
+ case "accesskey":
+ case "accessKey": target.getConfiguration().setAccessKey(property(camelContext, java.lang.String.class, value)); return true;
+ case "awssfnclient":
+ case "awsSfnClient": target.getConfiguration().setAwsSfnClient(property(camelContext, software.amazon.awssdk.services.sfn.SfnClient.class, value)); return true;
+ case "lazystartproducer":
+ case "lazyStartProducer": target.setLazyStartProducer(property(camelContext, boolean.class, value)); return true;
+ case "operation": target.getConfiguration().setOperation(property(camelContext, org.apache.camel.component.aws2.stepfunctions.StepFunctions2Operations.class, value)); return true;
+ case "overrideendpoint":
+ case "overrideEndpoint": target.getConfiguration().setOverrideEndpoint(property(camelContext, boolean.class, value)); return true;
+ case "pojorequest":
+ case "pojoRequest": target.getConfiguration().setPojoRequest(property(camelContext, boolean.class, value)); return true;
+ case "profilecredentialsname":
+ case "profileCredentialsName": target.getConfiguration().setProfileCredentialsName(property(camelContext, java.lang.String.class, value)); return true;
+ case "proxyhost":
+ case "proxyHost": target.getConfiguration().setProxyHost(property(camelContext, java.lang.String.class, value)); return true;
+ case "proxyport":
+ case "proxyPort": target.getConfiguration().setProxyPort(property(camelContext, java.lang.Integer.class, value)); return true;
+ case "proxyprotocol":
+ case "proxyProtocol": target.getConfiguration().setProxyProtocol(property(camelContext, software.amazon.awssdk.core.Protocol.class, value)); return true;
+ case "region": target.getConfiguration().setRegion(property(camelContext, java.lang.String.class, value)); return true;
+ case "secretkey":
+ case "secretKey": target.getConfiguration().setSecretKey(property(camelContext, java.lang.String.class, value)); return true;
+ case "trustallcertificates":
+ case "trustAllCertificates": target.getConfiguration().setTrustAllCertificates(property(camelContext, boolean.class, value)); return true;
+ case "uriendpointoverride":
+ case "uriEndpointOverride": target.getConfiguration().setUriEndpointOverride(property(camelContext, java.lang.String.class, value)); return true;
+ case "usedefaultcredentialsprovider":
+ case "useDefaultCredentialsProvider": target.getConfiguration().setUseDefaultCredentialsProvider(property(camelContext, boolean.class, value)); return true;
+ case "useprofilecredentialsprovider":
+ case "useProfileCredentialsProvider": target.getConfiguration().setUseProfileCredentialsProvider(property(camelContext, boolean.class, value)); return true;
+ default: return false;
+ }
+ }
+
+ @Override
+ public String[] getAutowiredNames() {
+ return new String[]{"awsSfnClient"};
+ }
+
+ @Override
+ public Class> getOptionType(String name, boolean ignoreCase) {
+ switch (ignoreCase ? name.toLowerCase() : name) {
+ case "accesskey":
+ case "accessKey": return java.lang.String.class;
+ case "awssfnclient":
+ case "awsSfnClient": return software.amazon.awssdk.services.sfn.SfnClient.class;
+ case "lazystartproducer":
+ case "lazyStartProducer": return boolean.class;
+ case "operation": return org.apache.camel.component.aws2.stepfunctions.StepFunctions2Operations.class;
+ case "overrideendpoint":
+ case "overrideEndpoint": return boolean.class;
+ case "pojorequest":
+ case "pojoRequest": return boolean.class;
+ case "profilecredentialsname":
+ case "profileCredentialsName": return java.lang.String.class;
+ case "proxyhost":
+ case "proxyHost": return java.lang.String.class;
+ case "proxyport":
+ case "proxyPort": return java.lang.Integer.class;
+ case "proxyprotocol":
+ case "proxyProtocol": return software.amazon.awssdk.core.Protocol.class;
+ case "region": return java.lang.String.class;
+ case "secretkey":
+ case "secretKey": return java.lang.String.class;
+ case "trustallcertificates":
+ case "trustAllCertificates": return boolean.class;
+ case "uriendpointoverride":
+ case "uriEndpointOverride": return java.lang.String.class;
+ case "usedefaultcredentialsprovider":
+ case "useDefaultCredentialsProvider": return boolean.class;
+ case "useprofilecredentialsprovider":
+ case "useProfileCredentialsProvider": return boolean.class;
+ default: return null;
+ }
+ }
+
+ @Override
+ public Object getOptionValue(Object obj, String name, boolean ignoreCase) {
+ StepFunctions2Endpoint target = (StepFunctions2Endpoint) obj;
+ switch (ignoreCase ? name.toLowerCase() : name) {
+ case "accesskey":
+ case "accessKey": return target.getConfiguration().getAccessKey();
+ case "awssfnclient":
+ case "awsSfnClient": return target.getConfiguration().getAwsSfnClient();
+ case "lazystartproducer":
+ case "lazyStartProducer": return target.isLazyStartProducer();
+ case "operation": return target.getConfiguration().getOperation();
+ case "overrideendpoint":
+ case "overrideEndpoint": return target.getConfiguration().isOverrideEndpoint();
+ case "pojorequest":
+ case "pojoRequest": return target.getConfiguration().isPojoRequest();
+ case "profilecredentialsname":
+ case "profileCredentialsName": return target.getConfiguration().getProfileCredentialsName();
+ case "proxyhost":
+ case "proxyHost": return target.getConfiguration().getProxyHost();
+ case "proxyport":
+ case "proxyPort": return target.getConfiguration().getProxyPort();
+ case "proxyprotocol":
+ case "proxyProtocol": return target.getConfiguration().getProxyProtocol();
+ case "region": return target.getConfiguration().getRegion();
+ case "secretkey":
+ case "secretKey": return target.getConfiguration().getSecretKey();
+ case "trustallcertificates":
+ case "trustAllCertificates": return target.getConfiguration().isTrustAllCertificates();
+ case "uriendpointoverride":
+ case "uriEndpointOverride": return target.getConfiguration().getUriEndpointOverride();
+ case "usedefaultcredentialsprovider":
+ case "useDefaultCredentialsProvider": return target.getConfiguration().isUseDefaultCredentialsProvider();
+ case "useprofilecredentialsprovider":
+ case "useProfileCredentialsProvider": return target.getConfiguration().isUseProfileCredentialsProvider();
+ default: return null;
+ }
+ }
+}
+
diff --git a/components/camel-aws/camel-aws2-step-functions/src/generated/java/org/apache/camel/component/aws2/stepfunctions/StepFunctions2EndpointUriFactory.java b/components/camel-aws/camel-aws2-step-functions/src/generated/java/org/apache/camel/component/aws2/stepfunctions/StepFunctions2EndpointUriFactory.java
new file mode 100644
index 0000000000000..01ae0f3485d97
--- /dev/null
+++ b/components/camel-aws/camel-aws2-step-functions/src/generated/java/org/apache/camel/component/aws2/stepfunctions/StepFunctions2EndpointUriFactory.java
@@ -0,0 +1,87 @@
+/* Generated by camel build tools - do NOT edit this file! */
+package org.apache.camel.component.aws2.stepfunctions;
+
+import java.net.URISyntaxException;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Map;
+import java.util.Set;
+
+import org.apache.camel.spi.EndpointUriFactory;
+
+/**
+ * Generated by camel build tools - do NOT edit this file!
+ */
+public class StepFunctions2EndpointUriFactory extends org.apache.camel.support.component.EndpointUriFactorySupport implements EndpointUriFactory {
+
+ private static final String BASE = ":label";
+
+ private static final Set PROPERTY_NAMES;
+ private static final Set SECRET_PROPERTY_NAMES;
+ private static final Set MULTI_VALUE_PREFIXES;
+ static {
+ Set props = new HashSet<>(17);
+ props.add("accessKey");
+ props.add("awsSfnClient");
+ props.add("label");
+ props.add("lazyStartProducer");
+ props.add("operation");
+ props.add("overrideEndpoint");
+ props.add("pojoRequest");
+ props.add("profileCredentialsName");
+ props.add("proxyHost");
+ props.add("proxyPort");
+ props.add("proxyProtocol");
+ props.add("region");
+ props.add("secretKey");
+ props.add("trustAllCertificates");
+ props.add("uriEndpointOverride");
+ props.add("useDefaultCredentialsProvider");
+ props.add("useProfileCredentialsProvider");
+ PROPERTY_NAMES = Collections.unmodifiableSet(props);
+ Set secretProps = new HashSet<>(2);
+ secretProps.add("accessKey");
+ secretProps.add("secretKey");
+ SECRET_PROPERTY_NAMES = Collections.unmodifiableSet(secretProps);
+ MULTI_VALUE_PREFIXES = Collections.emptySet();
+ }
+
+ @Override
+ public boolean isEnabled(String scheme) {
+ return "aws2-step-functions".equals(scheme);
+ }
+
+ @Override
+ public String buildUri(String scheme, Map properties, boolean encode) throws URISyntaxException {
+ String syntax = scheme + BASE;
+ String uri = syntax;
+
+ Map copy = new HashMap<>(properties);
+
+ uri = buildPathParameter(syntax, uri, "label", null, true, copy);
+ uri = buildQueryParameters(uri, copy, encode);
+ return uri;
+ }
+
+ @Override
+ public Set propertyNames() {
+ return PROPERTY_NAMES;
+ }
+
+ @Override
+ public Set secretPropertyNames() {
+ return SECRET_PROPERTY_NAMES;
+ }
+
+ @Override
+ public Set multiValuePrefixes() {
+ return MULTI_VALUE_PREFIXES;
+ }
+
+ @Override
+ public boolean isLenientProperties() {
+ return false;
+ }
+}
+
diff --git a/components/camel-aws/camel-aws2-step-functions/src/generated/resources/META-INF/services/org/apache/camel/component.properties b/components/camel-aws/camel-aws2-step-functions/src/generated/resources/META-INF/services/org/apache/camel/component.properties
new file mode 100644
index 0000000000000..0f83c896fce64
--- /dev/null
+++ b/components/camel-aws/camel-aws2-step-functions/src/generated/resources/META-INF/services/org/apache/camel/component.properties
@@ -0,0 +1,7 @@
+# Generated by camel build tools - do NOT edit this file!
+components=aws2-step-functions
+groupId=org.apache.camel
+artifactId=camel-aws2-step-functions
+version=4.0.0-SNAPSHOT
+projectName=Camel :: AWS Step Functions
+projectDescription=A Camel Amazon Web Services Step Functions component
diff --git a/components/camel-aws/camel-aws2-step-functions/src/generated/resources/META-INF/services/org/apache/camel/component/aws2-step-functions b/components/camel-aws/camel-aws2-step-functions/src/generated/resources/META-INF/services/org/apache/camel/component/aws2-step-functions
new file mode 100644
index 0000000000000..a1bd4169e3dee
--- /dev/null
+++ b/components/camel-aws/camel-aws2-step-functions/src/generated/resources/META-INF/services/org/apache/camel/component/aws2-step-functions
@@ -0,0 +1,2 @@
+# Generated by camel build tools - do NOT edit this file!
+class=org.apache.camel.component.aws2.stepfunctions.StepFunctions2Component
diff --git a/components/camel-aws/camel-aws2-step-functions/src/generated/resources/META-INF/services/org/apache/camel/configurer/aws2-step-functions-component b/components/camel-aws/camel-aws2-step-functions/src/generated/resources/META-INF/services/org/apache/camel/configurer/aws2-step-functions-component
new file mode 100644
index 0000000000000..a119998f9a03c
--- /dev/null
+++ b/components/camel-aws/camel-aws2-step-functions/src/generated/resources/META-INF/services/org/apache/camel/configurer/aws2-step-functions-component
@@ -0,0 +1,2 @@
+# Generated by camel build tools - do NOT edit this file!
+class=org.apache.camel.component.aws2.stepfunctions.StepFunctions2ComponentConfigurer
diff --git a/components/camel-aws/camel-aws2-step-functions/src/generated/resources/META-INF/services/org/apache/camel/configurer/aws2-step-functions-endpoint b/components/camel-aws/camel-aws2-step-functions/src/generated/resources/META-INF/services/org/apache/camel/configurer/aws2-step-functions-endpoint
new file mode 100644
index 0000000000000..91bdfb2442d82
--- /dev/null
+++ b/components/camel-aws/camel-aws2-step-functions/src/generated/resources/META-INF/services/org/apache/camel/configurer/aws2-step-functions-endpoint
@@ -0,0 +1,2 @@
+# Generated by camel build tools - do NOT edit this file!
+class=org.apache.camel.component.aws2.stepfunctions.StepFunctions2EndpointConfigurer
diff --git a/components/camel-aws/camel-aws2-step-functions/src/generated/resources/META-INF/services/org/apache/camel/urifactory/aws2-step-functions-endpoint b/components/camel-aws/camel-aws2-step-functions/src/generated/resources/META-INF/services/org/apache/camel/urifactory/aws2-step-functions-endpoint
new file mode 100644
index 0000000000000..a2e2e7242b39b
--- /dev/null
+++ b/components/camel-aws/camel-aws2-step-functions/src/generated/resources/META-INF/services/org/apache/camel/urifactory/aws2-step-functions-endpoint
@@ -0,0 +1,2 @@
+# Generated by camel build tools - do NOT edit this file!
+class=org.apache.camel.component.aws2.stepfunctions.StepFunctions2EndpointUriFactory
diff --git a/components/camel-aws/camel-aws2-step-functions/src/generated/resources/org/apache/camel/component/aws2/stepfunctions/aws2-step-functions.json b/components/camel-aws/camel-aws2-step-functions/src/generated/resources/org/apache/camel/component/aws2/stepfunctions/aws2-step-functions.json
new file mode 100644
index 0000000000000..5d6608196f64f
--- /dev/null
+++ b/components/camel-aws/camel-aws2-step-functions/src/generated/resources/org/apache/camel/component/aws2/stepfunctions/aws2-step-functions.json
@@ -0,0 +1,85 @@
+{
+ "component": {
+ "kind": "component",
+ "name": "aws2-step-functions",
+ "title": "AWS StepFunctions",
+ "description": "Manage and invoke AWS Step functions using AWS SDK version 2.x.",
+ "deprecated": false,
+ "firstVersion": "4.0.0",
+ "label": "cloud,serverless",
+ "javaType": "org.apache.camel.component.aws2.stepfunctions.StepFunctions2Component",
+ "supportLevel": "Preview",
+ "groupId": "org.apache.camel",
+ "artifactId": "camel-aws2-step-functions",
+ "version": "4.0.0-SNAPSHOT",
+ "scheme": "aws2-step-functions",
+ "extendsScheme": "",
+ "syntax": "aws2-step-functions:label",
+ "async": false,
+ "api": false,
+ "consumerOnly": false,
+ "producerOnly": true,
+ "lenientProperties": false
+ },
+ "componentProperties": {
+ "configuration": { "index": 0, "kind": "property", "displayName": "Configuration", "group": "producer", "label": "", "required": false, "type": "object", "javaType": "org.apache.camel.component.aws2.stepfunctions.StepFunctions2Configuration", "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": "object", "javaType": "org.apache.camel.component.aws2.stepfunctions.StepFunctions2Operations", "enum": [ "createStateMachine", "deleteStateMachine", "updateStateMachine", "describeStateMachine", "listStateMachines", "createActivity", "deleteActivity", "describeActivity", "getActivityTask", "listActivities", "startExecution", "startSyncExecution", "stopExecution", "describeExecution", "listExecutions", "getExecutionHistory" ], "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.stepfunctions.StepFunctions2Configuration", "configurationField": "configuration", "description": "The operation to perform. It can be listFunctions, getFunction, createFunction, deleteFunction or invokeFunction" },
+ "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.stepfunctions.StepFunctions2Configuration", "configurationField": "configuration", "description": "Set the need for overidding the endpoint. This option needs to be used in combination with 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.stepfunctions.StepFunctions2Configuration", "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.stepfunctions.StepFunctions2Configuration", "configurationField": "configuration", "description": "If using a profile credentials provider this parameter will set the profile name" },
+ "region": { "index": 6, "kind": "property", "displayName": "Region", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.stepfunctions.StepFunctions2Configuration", "configurationField": "configuration", "description": "The region in which StepFunctions 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()" },
+ "trustAllCertificates": { "index": 7, "kind": "property", "displayName": "Trust All Certificates", "group": "producer", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.aws2.stepfunctions.StepFunctions2Configuration", "configurationField": "configuration", "description": "If we want to trust all certificates in case of overriding the endpoint" },
+ "uriEndpointOverride": { "index": 8, "kind": "property", "displayName": "Uri Endpoint Override", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.stepfunctions.StepFunctions2Configuration", "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": "producer", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.aws2.stepfunctions.StepFunctions2Configuration", "configurationField": "configuration", "description": "Set whether the StepFunctions 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": "producer", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.aws2.stepfunctions.StepFunctions2Configuration", "configurationField": "configuration", "description": "Set whether the StepFunctions client should expect to load credentials through a profile credentials provider." },
+ "autowiredEnabled": { "index": 11, "kind": "property", "displayName": "Autowired Enabled", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Whether autowiring is enabled. This is used for automatic autowiring options (the option must be marked as autowired) by looking up in the registry to find if there is a single instance of matching type, which then gets configured on the component. This can be used for automatic configuring JDBC data sources, JMS connection factories, AWS Clients, etc." },
+ "awsSfnClient": { "index": 12, "kind": "property", "displayName": "Aws Sfn Client", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "software.amazon.awssdk.services.sfn.SfnClient", "deprecated": false, "deprecationNote": "", "autowired": true, "secret": false, "configurationClass": "org.apache.camel.component.aws2.stepfunctions.StepFunctions2Configuration", "configurationField": "configuration", "description": "To use a existing configured AwsStepFunctionsClient as client" },
+ "healthCheckConsumerEnabled": { "index": 13, "kind": "property", "displayName": "Health Check Consumer Enabled", "group": "health", "label": "health", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Used for enabling or disabling all consumer based health checks from this component" },
+ "healthCheckProducerEnabled": { "index": 14, "kind": "property", "displayName": "Health Check Producer Enabled", "group": "health", "label": "health", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Used for enabling or disabling all producer based health checks from this component. Notice: Camel has by default disabled all producer based health-checks. You can turn on producer checks globally by setting camel.health.producersEnabled=true." },
+ "proxyHost": { "index": 15, "kind": "property", "displayName": "Proxy Host", "group": "proxy", "label": "proxy", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.stepfunctions.StepFunctions2Configuration", "configurationField": "configuration", "description": "To define a proxy host when instantiating the StepFunctions client" },
+ "proxyPort": { "index": 16, "kind": "property", "displayName": "Proxy Port", "group": "proxy", "label": "proxy", "required": false, "type": "integer", "javaType": "java.lang.Integer", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.stepfunctions.StepFunctions2Configuration", "configurationField": "configuration", "description": "To define a proxy port when instantiating the StepFunctions client" },
+ "proxyProtocol": { "index": 17, "kind": "property", "displayName": "Proxy Protocol", "group": "proxy", "label": "proxy", "required": false, "type": "object", "javaType": "software.amazon.awssdk.core.Protocol", "enum": [ "HTTP", "HTTPS" ], "deprecated": false, "autowired": false, "secret": false, "defaultValue": "HTTPS", "configurationClass": "org.apache.camel.component.aws2.stepfunctions.StepFunctions2Configuration", "configurationField": "configuration", "description": "To define a proxy protocol when instantiating the StepFunctions client" },
+ "accessKey": { "index": 18, "kind": "property", "displayName": "Access Key", "group": "security", "label": "security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": true, "configurationClass": "org.apache.camel.component.aws2.stepfunctions.StepFunctions2Configuration", "configurationField": "configuration", "description": "Amazon AWS Access Key" },
+ "secretKey": { "index": 19, "kind": "property", "displayName": "Secret Key", "group": "security", "label": "security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": true, "configurationClass": "org.apache.camel.component.aws2.stepfunctions.StepFunctions2Configuration", "configurationField": "configuration", "description": "Amazon AWS Secret Key" }
+ },
+ "headers": {
+ "CamelAwsStateMachineOperation": { "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.stepfunctions.StepFunctions2Constants#OPERATION" },
+ "CamelAwsStepFunctionsStateMachineName": { "index": 1, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The name of the state machine", "constantName": "org.apache.camel.component.aws2.stepfunctions.StepFunctions2Constants#STATE_MACHINE_NAME" },
+ "CamelAwsStepFunctionsStateMachineDefinition": { "index": 2, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The Amazon States Language definition of the state machine", "constantName": "org.apache.camel.component.aws2.stepfunctions.StepFunctions2Constants#STATE_MACHINE_DEFINITION" },
+ "CamelAwsStepFunctionsStateMachineType": { "index": 3, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Determines whether a Standard or Express state machine is created", "constantName": "org.apache.camel.component.aws2.stepfunctions.StepFunctions2Constants#STATE_MACHINE_TYPE" },
+ "CamelAwsStepFunctionsStateMachineRoleArn": { "index": 4, "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 IAM role to use for this state machine.", "constantName": "org.apache.camel.component.aws2.stepfunctions.StepFunctions2Constants#STATE_MACHINE_ROLE_ARN" },
+ "CamelAwsStepFunctionsStateMachineArn": { "index": 5, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The Amazon Resource Name (ARN) of state machine.", "constantName": "org.apache.camel.component.aws2.stepfunctions.StepFunctions2Constants#STATE_MACHINE_ARN" },
+ "CamelAwsStateMachinesMaxResults": { "index": 6, "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 state machines", "constantName": "org.apache.camel.component.aws2.stepfunctions.StepFunctions2Constants#STATE_MACHINES_MAX_RESULTS" },
+ "CamelAwsStepFunctionsStateMachineActivityName": { "index": 7, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The name of the state machine activity", "constantName": "org.apache.camel.component.aws2.stepfunctions.StepFunctions2Constants#ACTIVITY_NAME" },
+ "CamelAwsStepFunctionsStateMachineActivityArn": { "index": 8, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The ARN of the state machine activity", "constantName": "org.apache.camel.component.aws2.stepfunctions.StepFunctions2Constants#ACTIVITY_ARN" },
+ "CamelAwsStateMachineActivitiesMaxResults": { "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 state machines", "constantName": "org.apache.camel.component.aws2.stepfunctions.StepFunctions2Constants#ACTIVITIES_MAX_RESULTS" },
+ "CamelAwsStateMachineExecutionArn": { "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" },
+ "CamelAwsStateMachineExecutionName": { "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" },
+ "CamelAwsStateMachineExecutionInput": { "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" },
+ "CamelAwsStateMachineExecutionTraceHeader": { "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" },
+ "CamelAwsStateMachineExecutionHistoryMaxResults": { "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" },
+ "CamelAwsStateMachineExecutionHistoryIncludeExecutionData": { "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" },
+ "CamelAwsStateMachineExecutionHistoryReverseOrder": { "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" },
+ "CamelAwsStateMachineExecutionMaxResults": { "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" }
+ },
+ "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" },
+ "operation": { "index": 1, "kind": "parameter", "displayName": "Operation", "group": "producer", "label": "", "required": true, "type": "object", "javaType": "org.apache.camel.component.aws2.stepfunctions.StepFunctions2Operations", "enum": [ "createStateMachine", "deleteStateMachine", "updateStateMachine", "describeStateMachine", "listStateMachines", "createActivity", "deleteActivity", "describeActivity", "getActivityTask", "listActivities", "startExecution", "startSyncExecution", "stopExecution", "describeExecution", "listExecutions", "getExecutionHistory" ], "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.stepfunctions.StepFunctions2Configuration", "configurationField": "configuration", "description": "The operation to perform. It can be listFunctions, getFunction, createFunction, deleteFunction or invokeFunction" },
+ "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.stepfunctions.StepFunctions2Configuration", "configurationField": "configuration", "description": "Set the need for overidding the endpoint. This option needs to be used in combination with 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.stepfunctions.StepFunctions2Configuration", "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.stepfunctions.StepFunctions2Configuration", "configurationField": "configuration", "description": "If using a profile credentials provider this parameter will set the profile name" },
+ "region": { "index": 5, "kind": "parameter", "displayName": "Region", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.stepfunctions.StepFunctions2Configuration", "configurationField": "configuration", "description": "The region in which StepFunctions 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()" },
+ "trustAllCertificates": { "index": 6, "kind": "parameter", "displayName": "Trust All Certificates", "group": "producer", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.aws2.stepfunctions.StepFunctions2Configuration", "configurationField": "configuration", "description": "If we want to trust all certificates in case of overriding the endpoint" },
+ "uriEndpointOverride": { "index": 7, "kind": "parameter", "displayName": "Uri Endpoint Override", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.stepfunctions.StepFunctions2Configuration", "configurationField": "configuration", "description": "Set the overriding uri endpoint. This option needs to be used in combination with overrideEndpoint option" },
+ "useDefaultCredentialsProvider": { "index": 8, "kind": "parameter", "displayName": "Use Default Credentials Provider", "group": "producer", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.aws2.stepfunctions.StepFunctions2Configuration", "configurationField": "configuration", "description": "Set whether the StepFunctions client should expect to load credentials through a default credentials provider or to expect static credentials to be passed in." },
+ "useProfileCredentialsProvider": { "index": 9, "kind": "parameter", "displayName": "Use Profile Credentials Provider", "group": "producer", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.aws2.stepfunctions.StepFunctions2Configuration", "configurationField": "configuration", "description": "Set whether the StepFunctions client should expect to load credentials through a profile credentials provider." },
+ "lazyStartProducer": { "index": 10, "kind": "parameter", "displayName": "Lazy Start Producer", "group": "producer (advanced)", "label": "producer,advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a 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." },
+ "awsSfnClient": { "index": 11, "kind": "parameter", "displayName": "Aws Sfn Client", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "software.amazon.awssdk.services.sfn.SfnClient", "deprecated": false, "deprecationNote": "", "autowired": true, "secret": false, "configurationClass": "org.apache.camel.component.aws2.stepfunctions.StepFunctions2Configuration", "configurationField": "configuration", "description": "To use a existing configured AwsStepFunctionsClient as client" },
+ "proxyHost": { "index": 12, "kind": "parameter", "displayName": "Proxy Host", "group": "proxy", "label": "proxy", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.stepfunctions.StepFunctions2Configuration", "configurationField": "configuration", "description": "To define a proxy host when instantiating the StepFunctions client" },
+ "proxyPort": { "index": 13, "kind": "parameter", "displayName": "Proxy Port", "group": "proxy", "label": "proxy", "required": false, "type": "integer", "javaType": "java.lang.Integer", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.stepfunctions.StepFunctions2Configuration", "configurationField": "configuration", "description": "To define a proxy port when instantiating the StepFunctions client" },
+ "proxyProtocol": { "index": 14, "kind": "parameter", "displayName": "Proxy Protocol", "group": "proxy", "label": "proxy", "required": false, "type": "object", "javaType": "software.amazon.awssdk.core.Protocol", "enum": [ "HTTP", "HTTPS" ], "deprecated": false, "autowired": false, "secret": false, "defaultValue": "HTTPS", "configurationClass": "org.apache.camel.component.aws2.stepfunctions.StepFunctions2Configuration", "configurationField": "configuration", "description": "To define a proxy protocol when instantiating the StepFunctions client" },
+ "accessKey": { "index": 15, "kind": "parameter", "displayName": "Access Key", "group": "security", "label": "security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": true, "configurationClass": "org.apache.camel.component.aws2.stepfunctions.StepFunctions2Configuration", "configurationField": "configuration", "description": "Amazon AWS Access Key" },
+ "secretKey": { "index": 16, "kind": "parameter", "displayName": "Secret Key", "group": "security", "label": "security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": true, "configurationClass": "org.apache.camel.component.aws2.stepfunctions.StepFunctions2Configuration", "configurationField": "configuration", "description": "Amazon AWS Secret Key" }
+ }
+}
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
new file mode 100644
index 0000000000000..40ec25fa5e35e
--- /dev/null
+++ b/components/camel-aws/camel-aws2-step-functions/src/main/docs/aws2-step-functions-component.adoc
@@ -0,0 +1,152 @@
+= AWS StepFunctions Component
+:doctitle: AWS StepFunctions
+:shortname: aws2-step-functions
+:artifactid: camel-aws2-step-functions
+:description: Manage and invoke AWS Step functions using AWS SDK version 2.x.
+:since: 4.0
+:supportlevel: Preview
+:tabs-sync-option:
+:component-header: Only producer is supported
+//Manually maintained attributes
+:group: AWS
+:camel-spring-boot-name: aws2-step-functions
+
+*Since Camel {since}*
+
+*{component-header}*
+
+The AWS2 Step Functions component supports following operations on
+https://aws.amazon.com/step-functions/[AWS Step Functions]
+- Create, delete, update, describe, list state machines.
+- Create, delete, describe, list activities.
+- Start, start sync, stop, list, describe executions.
+- Get activities task.
+- Get execution history
+
+Prerequisites
+
+You must have a valid Amazon Web Services developer account, and be
+signed up to use Amazon Step Functions. More information is available at
+https://aws.amazon.com/step-functions/[AWS Step Functions].
+
+
+== URI Format
+
+-------------------------
+aws2-step-functions://label[?options]
+-------------------------
+
+You can append query options to the URI in the following format,
+?options=value&option2=value&...
+
+
+// component-configure options: START
+
+// component-configure options: END
+
+// component options: START
+include::partial$component-configure-options.adoc[]
+include::partial$component-endpoint-options.adoc[]
+// component options: END
+
+// endpoint options: START
+
+// endpoint options: END
+
+
+Required Step Functions component options
+
+You have to provide the awsSfnClient in the
+Registry or your accessKey and secretKey to access
+the https://aws.amazon.com/step-functions/[AWS Step Functions] service.
+
+== Usage
+
+=== Static credentials, Default Credential Provider and Profile Credentials Provider
+
+You have the possibility of avoiding the usage of explicit static credentials, by specifying the useDefaultCredentialsProvider option and set it to true.
+
+The order of evaluation for Default Credentials Provider is the following:
+
+ - Java system properties - aws.accessKeyId and aws.secretKey
+ - Environment variables - AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY.
+ - Web Identity Token from AWS STS.
+ - The shared credentials and config files.
+ - Amazon ECS container credentials - loaded from the Amazon ECS if the environment variable AWS_CONTAINER_CREDENTIALS_RELATIVE_URI is set.
+ - Amazon EC2 Instance profile credentials.
+
+You have also the possibility of using Profile Credentials Provider, by specifying the useProfileCredentialsProvider option to true and profileCredentialsName to the profile name.
+
+Only one of static, default and profile credentials could be used at the same time.
+
+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]
+
+// component headers: START
+include::partial$component-endpoint-headers.adoc[]
+// component headers: END
+
+=== Step Functions Producer operations
+
+Camel-AWS Step Functions component provides the following operation on the producer side:
+
+- createStateMachine
+- deleteStateMachine
+- updateStateMachine
+- describeStateMachine
+- listStateMachines
+- createActivity
+- deleteActivity
+- describeActivity
+- getActivityTask
+- listActivities
+- startExecution
+- startSyncExecution
+- stopExecution
+- describeExecution
+- listExecutions
+- getExecutionHistory
+
+== Producer Examples
+
+- createStateMachine: this operation will create a state machine
+
+[source,java]
+--------------------------------------------------------------------------------
+from("direct:createStateMachine")
+ .to("aws2-step-functions://test?awsSfnClient=#awsSfnClient&operation=createMachine")
+--------------------------------------------------------------------------------
+
+== Using a POJO as body
+
+Sometimes build an AWS Request can be complex, because of multiple options. We introduce the possibility to use a POJO as body.
+In AWS Step Functions there are multiple operations you can submit, as an example for Create state machine
+ request, you can do something like:
+
+[source,java]
+------------------------------------------------------------------------------------------------------
+from("direct:start")
+ .setBody(CreateStateMachineRequest.builder().name("state-machine").build())
+ .to("aws2-step-functions://test?awsSfnClient=#awsSfnClient&operation=createStateMachine&pojoRequest=true")
+------------------------------------------------------------------------------------------------------
+
+In this way you'll pass the request directly without the need of passing headers and options specifically related to this operation.
+
+== Dependencies
+
+Maven users will need to add the following dependency to their pom.xml.
+
+*pom.xml*
+
+[source,xml]
+---------------------------------------
+
+ org.apache.camel
+ camel-aws2-step-functions
+ ${camel-version}
+
+---------------------------------------
+
+where `$\{camel-version}` must be replaced by the actual version of Camel.
+
+
+include::spring-boot:partial$starter.adoc[]
diff --git a/components/camel-aws/camel-aws2-step-functions/src/main/java/org/apache/camel/component/aws2/stepfunctions/StepFunctions2Component.java b/components/camel-aws/camel-aws2-step-functions/src/main/java/org/apache/camel/component/aws2/stepfunctions/StepFunctions2Component.java
new file mode 100644
index 0000000000000..11578dd809b87
--- /dev/null
+++ b/components/camel-aws/camel-aws2-step-functions/src/main/java/org/apache/camel/component/aws2/stepfunctions/StepFunctions2Component.java
@@ -0,0 +1,69 @@
+/*
+ * 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 java.util.Map;
+
+import org.apache.camel.CamelContext;
+import org.apache.camel.Endpoint;
+import org.apache.camel.spi.Metadata;
+import org.apache.camel.spi.annotations.Component;
+import org.apache.camel.support.HealthCheckComponent;
+
+@Component(value = "aws2-step-functions")
+public class StepFunctions2Component extends HealthCheckComponent {
+
+ @Metadata
+ private StepFunctions2Configuration configuration = new StepFunctions2Configuration();
+
+ public StepFunctions2Component() {
+ this(null);
+ }
+
+ public StepFunctions2Component(CamelContext context) {
+ super(context);
+ }
+
+ @Override
+ protected Endpoint createEndpoint(String uri, String remaining, Map parameters) throws Exception {
+ StepFunctions2Configuration configuration
+ = this.configuration != null ? this.configuration.copy() : new StepFunctions2Configuration();
+ StepFunctions2Endpoint endpoint = new StepFunctions2Endpoint(uri, this, configuration);
+ setProperties(endpoint, parameters);
+ if (Boolean.FALSE.equals(configuration.isUseDefaultCredentialsProvider())
+ && Boolean.FALSE.equals(configuration.isUseProfileCredentialsProvider())
+ && configuration.getAwsSfnClient() == null
+ && (configuration.getAccessKey() == null || configuration.getSecretKey() == null)) {
+ throw new IllegalArgumentException(
+ "useDefaultCredentialsProvider is set to false, useProfileCredentialsProvider is set to false, Amazon step functions client or accessKey and secretKey must be specified");
+ }
+
+ return endpoint;
+ }
+
+ public StepFunctions2Configuration getConfiguration() {
+ return configuration;
+ }
+
+ /**
+ * Component configuration
+ */
+ public void setConfiguration(StepFunctions2Configuration configuration) {
+ this.configuration = configuration;
+ }
+
+}
diff --git a/components/camel-aws/camel-aws2-step-functions/src/main/java/org/apache/camel/component/aws2/stepfunctions/StepFunctions2Configuration.java b/components/camel-aws/camel-aws2-step-functions/src/main/java/org/apache/camel/component/aws2/stepfunctions/StepFunctions2Configuration.java
new file mode 100644
index 0000000000000..28b80c329e39e
--- /dev/null
+++ b/components/camel-aws/camel-aws2-step-functions/src/main/java/org/apache/camel/component/aws2/stepfunctions/StepFunctions2Configuration.java
@@ -0,0 +1,246 @@
+/*
+ * 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.RuntimeCamelException;
+import org.apache.camel.spi.Metadata;
+import org.apache.camel.spi.UriParam;
+import org.apache.camel.spi.UriParams;
+import org.apache.camel.spi.UriPath;
+import software.amazon.awssdk.core.Protocol;
+import software.amazon.awssdk.services.sfn.SfnClient;
+
+@UriParams
+public class StepFunctions2Configuration implements Cloneable {
+
+ @UriPath(description = "Logical name")
+ @Metadata(required = true)
+ private String label;
+ @UriParam
+ @Metadata(required = true)
+ private StepFunctions2Operations operation;
+ @UriParam(label = "security", secret = true)
+ private String accessKey;
+ @UriParam(label = "security", secret = true)
+ private String secretKey;
+ @UriParam
+ private String region;
+ @UriParam(label = "proxy", enums = "HTTP,HTTPS", defaultValue = "HTTPS")
+ private Protocol proxyProtocol = Protocol.HTTPS;
+ @UriParam(label = "proxy")
+ private String proxyHost;
+ @UriParam(label = "proxy")
+ private Integer proxyPort;
+ @UriParam(label = "advanced")
+ @Metadata(autowired = true)
+ private SfnClient awsSfnClient;
+ @UriParam(defaultValue = "false")
+ private boolean pojoRequest;
+ @UriParam(defaultValue = "false")
+ private boolean trustAllCertificates;
+ @UriParam(defaultValue = "false")
+ private boolean overrideEndpoint;
+ @UriParam
+ private String uriEndpointOverride;
+ @UriParam(defaultValue = "false")
+ private boolean useDefaultCredentialsProvider;
+ @UriParam(defaultValue = "false")
+ private boolean useProfileCredentialsProvider;
+ @UriParam
+ private String profileCredentialsName;
+
+ public SfnClient getAwsSfnClient() {
+ return awsSfnClient;
+ }
+
+ /**
+ * To use a existing configured AwsStepFunctionsClient as client
+ */
+ public void setAwsSfnClient(SfnClient awsSfnClient) {
+ this.awsSfnClient = awsSfnClient;
+ }
+
+ public String getAccessKey() {
+ return accessKey;
+ }
+
+ /**
+ * Amazon AWS Access Key
+ */
+ public void setAccessKey(String accessKey) {
+ this.accessKey = accessKey;
+ }
+
+ public String getSecretKey() {
+ return secretKey;
+ }
+
+ /**
+ * Amazon AWS Secret Key
+ */
+ public void setSecretKey(String secretKey) {
+ this.secretKey = secretKey;
+ }
+
+ public String getRegion() {
+ return region;
+ }
+
+ /**
+ * The region in which StepFunctions 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()
+ */
+ public void setRegion(String region) {
+ this.region = region;
+ }
+
+ public StepFunctions2Operations getOperation() {
+ return operation;
+ }
+
+ /**
+ * The operation to perform. It can be listFunctions, getFunction, createFunction, deleteFunction or invokeFunction
+ */
+ public void setOperation(StepFunctions2Operations operation) {
+ this.operation = operation;
+ }
+
+ public Protocol getProxyProtocol() {
+ return proxyProtocol;
+ }
+
+ /**
+ * To define a proxy protocol when instantiating the StepFunctions client
+ */
+ public void setProxyProtocol(Protocol proxyProtocol) {
+ this.proxyProtocol = proxyProtocol;
+ }
+
+ public String getProxyHost() {
+ return proxyHost;
+ }
+
+ /**
+ * To define a proxy host when instantiating the StepFunctions client
+ */
+ public void setProxyHost(String proxyHost) {
+ this.proxyHost = proxyHost;
+ }
+
+ public Integer getProxyPort() {
+ return proxyPort;
+ }
+
+ /**
+ * To define a proxy port when instantiating the StepFunctions client
+ */
+ public void setProxyPort(Integer proxyPort) {
+ this.proxyPort = proxyPort;
+ }
+
+ public boolean isPojoRequest() {
+ return pojoRequest;
+ }
+
+ /**
+ * If we want to use a POJO request as body or not
+ */
+ public void setPojoRequest(boolean pojoRequest) {
+ this.pojoRequest = pojoRequest;
+ }
+
+ public boolean isTrustAllCertificates() {
+ return trustAllCertificates;
+ }
+
+ /**
+ * If we want to trust all certificates in case of overriding the endpoint
+ */
+ public void setTrustAllCertificates(boolean trustAllCertificates) {
+ this.trustAllCertificates = trustAllCertificates;
+ }
+
+ public boolean isOverrideEndpoint() {
+ return overrideEndpoint;
+ }
+
+ /**
+ * Set the need for overidding the endpoint. This option needs to be used in combination with uriEndpointOverride
+ * option
+ */
+ public void setOverrideEndpoint(boolean overrideEndpoint) {
+ this.overrideEndpoint = overrideEndpoint;
+ }
+
+ public String getUriEndpointOverride() {
+ return uriEndpointOverride;
+ }
+
+ /**
+ * Set the overriding uri endpoint. This option needs to be used in combination with overrideEndpoint option
+ */
+ public void setUriEndpointOverride(String uriEndpointOverride) {
+ this.uriEndpointOverride = uriEndpointOverride;
+ }
+
+ /**
+ * Set whether the StepFunctions client should expect to load credentials through a default credentials provider or
+ * to expect static credentials to be passed in.
+ */
+ public void setUseDefaultCredentialsProvider(Boolean useDefaultCredentialsProvider) {
+ this.useDefaultCredentialsProvider = useDefaultCredentialsProvider;
+ }
+
+ public Boolean isUseDefaultCredentialsProvider() {
+ return useDefaultCredentialsProvider;
+ }
+
+ public boolean isUseProfileCredentialsProvider() {
+ return useProfileCredentialsProvider;
+ }
+
+ /**
+ * Set whether the StepFunctions client should expect to load credentials through a profile credentials provider.
+ */
+ public void setUseProfileCredentialsProvider(boolean useProfileCredentialsProvider) {
+ this.useProfileCredentialsProvider = useProfileCredentialsProvider;
+ }
+
+ public String getProfileCredentialsName() {
+ return profileCredentialsName;
+ }
+
+ /**
+ * If using a profile credentials provider this parameter will set the profile name
+ */
+ public void setProfileCredentialsName(String profileCredentialsName) {
+ this.profileCredentialsName = profileCredentialsName;
+ }
+
+ // *************************************************
+ //
+ // *************************************************
+
+ public StepFunctions2Configuration copy() {
+ try {
+ return (StepFunctions2Configuration) super.clone();
+ } catch (CloneNotSupportedException e) {
+ throw new RuntimeCamelException(e);
+ }
+ }
+
+}
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
new file mode 100644
index 0000000000000..8f653fa0095d7
--- /dev/null
+++ b/components/camel-aws/camel-aws2-step-functions/src/main/java/org/apache/camel/component/aws2/stepfunctions/StepFunctions2Constants.java
@@ -0,0 +1,79 @@
+/*
+ * 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.spi.Metadata;
+
+public interface StepFunctions2Constants {
+
+ @Metadata(description = "The operation we want to perform", javaType = "String")
+ String OPERATION = "CamelAwsStateMachineOperation";
+
+ @Metadata(description = "The name of the state machine", javaType = "String")
+ String STATE_MACHINE_NAME = "CamelAwsStepFunctionsStateMachineName";
+
+ @Metadata(description = "The Amazon States Language definition of the state machine", javaType = "String")
+ String STATE_MACHINE_DEFINITION = "CamelAwsStepFunctionsStateMachineDefinition";
+
+ @Metadata(description = "Determines whether a Standard or Express state machine is created", javaType = "String")
+ String STATE_MACHINE_TYPE = "CamelAwsStepFunctionsStateMachineType";
+
+ @Metadata(description = "The Amazon Resource Name (ARN) of the IAM role to use for this state machine.",
+ javaType = "String")
+ String STATE_MACHINE_ROLE_ARN = "CamelAwsStepFunctionsStateMachineRoleArn";
+
+ @Metadata(description = "The Amazon Resource Name (ARN) of state machine.", javaType = "String")
+ String STATE_MACHINE_ARN = "CamelAwsStepFunctionsStateMachineArn";
+
+ @Metadata(description = "The limit number of results while listing state machines", javaType = "Integer")
+ String STATE_MACHINES_MAX_RESULTS = "CamelAwsStateMachinesMaxResults";
+
+ @Metadata(description = "The name of the state machine activity", javaType = "String")
+ String ACTIVITY_NAME = "CamelAwsStepFunctionsStateMachineActivityName";
+
+ @Metadata(description = "The ARN of the state machine activity", javaType = "String")
+ String ACTIVITY_ARN = "CamelAwsStepFunctionsStateMachineActivityArn";
+
+ @Metadata(description = "The limit number of results while listing state machines", javaType = "Integer")
+ String ACTIVITIES_MAX_RESULTS = "CamelAwsStateMachineActivitiesMaxResults";
+
+ @Metadata(description = "The Amazon Resource Name (ARN) of the execution.", javaType = "String")
+ String EXECUTION_ARN = "CamelAwsStateMachineExecutionArn";
+
+ @Metadata(description = "Optional name of the execution.", javaType = "String")
+ String EXECUTION_NAME = "CamelAwsStateMachineExecutionName";
+
+ @Metadata(description = "The string that contains the JSON input data for the execution.", javaType = "String")
+ String EXECUTION_INPUT = "CamelAwsStateMachineExecutionInput";
+
+ @Metadata(description = "Passes the X-Ray trace header.", javaType = "String")
+ String EXECUTION_TRACE_HEADER = "CamelAwsStateMachineExecutionTraceHeader";
+
+ @Metadata(description = "The limit number of results while listing execution history", javaType = "Integer")
+ String EXECUTION_HISTORY_MAX_RESULTS = "CamelAwsStateMachineExecutionHistoryMaxResults";
+
+ @Metadata(description = "You can select whether execution data (input or output of a history event) is returned.",
+ javaType = "Boolean")
+ String EXECUTION_HISTORY_INCLUDE_EXECUTION_DATA = "CamelAwsStateMachineExecutionHistoryIncludeExecutionData";
+
+ @Metadata(description = "Lists events in descending order of their timeStamp.", javaType = "Boolean")
+ String EXECUTION_HISTORY_REVERSE_ORDER = "CamelAwsStateMachineExecutionHistoryReverseOrder";
+
+ @Metadata(description = "The limit number of results while listing executions", javaType = "Integer")
+ String EXECUTIONS_MAX_RESULTS = "CamelAwsStateMachineExecutionMaxResults";
+
+}
diff --git a/components/camel-aws/camel-aws2-step-functions/src/main/java/org/apache/camel/component/aws2/stepfunctions/StepFunctions2Endpoint.java b/components/camel-aws/camel-aws2-step-functions/src/main/java/org/apache/camel/component/aws2/stepfunctions/StepFunctions2Endpoint.java
new file mode 100644
index 0000000000000..51fc9c7faad44
--- /dev/null
+++ b/components/camel-aws/camel-aws2-step-functions/src/main/java/org/apache/camel/component/aws2/stepfunctions/StepFunctions2Endpoint.java
@@ -0,0 +1,88 @@
+/*
+ * 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.*;
+import org.apache.camel.component.aws2.stepfunctions.client.StepFunctions2ClientFactory;
+import org.apache.camel.spi.UriEndpoint;
+import org.apache.camel.spi.UriParam;
+import org.apache.camel.support.DefaultEndpoint;
+import org.apache.camel.util.ObjectHelper;
+import software.amazon.awssdk.services.sfn.SfnClient;
+
+/**
+ * Manage and invoke AWS Step functions using AWS SDK version 2.x.
+ */
+@UriEndpoint(firstVersion = "4.0.0", scheme = "aws2-step-functions", title = "AWS StepFunctions",
+ syntax = "aws2-step-functions:label",
+ producerOnly = true, category = { Category.CLOUD, Category.SERVERLESS },
+ headersClass = StepFunctions2Constants.class)
+public class StepFunctions2Endpoint extends DefaultEndpoint {
+
+ private SfnClient awsSfnClient;
+
+ @UriParam
+ private StepFunctions2Configuration configuration;
+
+ public StepFunctions2Endpoint(String uri, Component component, StepFunctions2Configuration configuration) {
+ super(uri, component);
+ this.configuration = configuration;
+ }
+
+ @Override
+ public StepFunctions2Component getComponent() {
+ return (StepFunctions2Component) super.getComponent();
+ }
+
+ @Override
+ public Consumer createConsumer(Processor processor) throws Exception {
+ throw new UnsupportedOperationException("You cannot receive messages from this endpoint");
+ }
+
+ @Override
+ public Producer createProducer() throws Exception {
+ return new StepFunctions2Producer(this);
+ }
+
+ @Override
+ public void doStart() throws Exception {
+ super.doStart();
+ awsSfnClient = configuration.getAwsSfnClient() != null
+ ? configuration.getAwsSfnClient()
+ : StepFunctions2ClientFactory.getSfnClient(configuration).getSfnClient();
+ }
+
+ @Override
+ public void doStop() throws Exception {
+
+ if (ObjectHelper.isEmpty(configuration.getAwsSfnClient())) {
+ if (awsSfnClient != null) {
+ awsSfnClient.close();
+ }
+ }
+ super.doStop();
+ }
+
+ public StepFunctions2Configuration getConfiguration() {
+ return configuration;
+ }
+
+ public SfnClient getAwsSfnClient() {
+ return awsSfnClient;
+ }
+
+}
diff --git a/components/camel-aws/camel-aws2-step-functions/src/main/java/org/apache/camel/component/aws2/stepfunctions/StepFunctions2Operations.java b/components/camel-aws/camel-aws2-step-functions/src/main/java/org/apache/camel/component/aws2/stepfunctions/StepFunctions2Operations.java
new file mode 100644
index 0000000000000..51d83526fcd4b
--- /dev/null
+++ b/components/camel-aws/camel-aws2-step-functions/src/main/java/org/apache/camel/component/aws2/stepfunctions/StepFunctions2Operations.java
@@ -0,0 +1,38 @@
+/*
+ * 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;
+
+public enum StepFunctions2Operations {
+
+ createStateMachine,
+ deleteStateMachine,
+ updateStateMachine,
+ describeStateMachine,
+ listStateMachines,
+ createActivity,
+ deleteActivity,
+ describeActivity,
+ getActivityTask,
+ listActivities,
+ startExecution,
+ startSyncExecution,
+ stopExecution,
+ describeExecution,
+ listExecutions,
+ getExecutionHistory
+
+}
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
new file mode 100644
index 0000000000000..0dde2746e5da9
--- /dev/null
+++ b/components/camel-aws/camel-aws2-step-functions/src/main/java/org/apache/camel/component/aws2/stepfunctions/StepFunctions2Producer.java
@@ -0,0 +1,729 @@
+/*
+ * 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.Endpoint;
+import org.apache.camel.Exchange;
+import org.apache.camel.InvalidPayloadException;
+import org.apache.camel.Message;
+import org.apache.camel.health.HealthCheck;
+import org.apache.camel.health.HealthCheckHelper;
+import org.apache.camel.health.WritableHealthCheckRepository;
+import org.apache.camel.support.DefaultProducer;
+import org.apache.camel.util.ObjectHelper;
+import org.apache.camel.util.URISupport;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import software.amazon.awssdk.awscore.exception.AwsServiceException;
+import software.amazon.awssdk.services.sfn.SfnClient;
+import software.amazon.awssdk.services.sfn.model.*;
+
+/**
+ * A Producer which sends messages to the Amazon Web Service Step Functions
+ * AWS Step Functions
+ */
+public class StepFunctions2Producer extends DefaultProducer {
+
+ private static final Logger LOG = LoggerFactory.getLogger(StepFunctions2Producer.class);
+
+ private transient String sfnProducerToString;
+
+ private HealthCheck producerHealthCheck;
+ private WritableHealthCheckRepository healthCheckRepository;
+
+ public StepFunctions2Producer(final Endpoint endpoint) {
+ super(endpoint);
+ }
+
+ @Override
+ public void process(final Exchange exchange) throws Exception {
+ switch (determineOperation(exchange)) {
+ case createStateMachine -> createStateMachine(getEndpoint().getAwsSfnClient(), exchange);
+ case deleteStateMachine -> deleteStateMachine(getEndpoint().getAwsSfnClient(), exchange);
+ case updateStateMachine -> updateStateMachine(getEndpoint().getAwsSfnClient(), exchange);
+ case describeStateMachine -> describeStateMachine(getEndpoint().getAwsSfnClient(), exchange);
+ case listStateMachines -> listStateMachines(getEndpoint().getAwsSfnClient(), exchange);
+ case createActivity -> createActivity(getEndpoint().getAwsSfnClient(), exchange);
+ case deleteActivity -> deleteActivity(getEndpoint().getAwsSfnClient(), exchange);
+ case describeActivity -> describeActivity(getEndpoint().getAwsSfnClient(), exchange);
+ case getActivityTask -> getActivityTask(getEndpoint().getAwsSfnClient(), exchange);
+ case listActivities -> listActivities(getEndpoint().getAwsSfnClient(), exchange);
+ case startExecution -> startExecution(getEndpoint().getAwsSfnClient(), exchange);
+ case startSyncExecution -> startSyncExecution(getEndpoint().getAwsSfnClient(), exchange);
+ case stopExecution -> stopExecution(getEndpoint().getAwsSfnClient(), exchange);
+ case describeExecution -> describeExecution(getEndpoint().getAwsSfnClient(), exchange);
+ case listExecutions -> listExecutions(getEndpoint().getAwsSfnClient(), exchange);
+ case getExecutionHistory -> getExecutionHistory(getEndpoint().getAwsSfnClient(), exchange);
+ default -> throw new IllegalArgumentException("Unsupported operation");
+ }
+ }
+
+ private StepFunctions2Operations determineOperation(Exchange exchange) {
+ StepFunctions2Operations operation
+ = exchange.getIn().getHeader(StepFunctions2Constants.OPERATION, StepFunctions2Operations.class);
+ if (operation == null) {
+ operation = getConfiguration().getOperation();
+ }
+ return operation;
+ }
+
+ protected StepFunctions2Configuration getConfiguration() {
+ return getEndpoint().getConfiguration();
+ }
+
+ @Override
+ public String toString() {
+ if (sfnProducerToString == null) {
+ sfnProducerToString = "StepFunctionsProducer[" + URISupport.sanitizeUri(getEndpoint().getEndpointUri()) + "]";
+ }
+ return sfnProducerToString;
+ }
+
+ @Override
+ public StepFunctions2Endpoint getEndpoint() {
+ return (StepFunctions2Endpoint) super.getEndpoint();
+ }
+
+ private void createStateMachine(SfnClient sfnClient, Exchange exchange) throws InvalidPayloadException {
+ if (getConfiguration().isPojoRequest()) {
+ Object payload = exchange.getIn().getMandatoryBody();
+ if (payload instanceof CreateStateMachineRequest request) {
+ CreateStateMachineResponse result;
+ try {
+ result = sfnClient.createStateMachine(request);
+ } catch (AwsServiceException ase) {
+ LOG.trace("Create State Machine command returned the error code {}", ase.awsErrorDetails().errorCode());
+ throw ase;
+ }
+ Message message = getMessageForResponse(exchange);
+ message.setBody(result);
+ }
+ } else {
+ CreateStateMachineRequest.Builder builder = CreateStateMachineRequest.builder();
+ if (ObjectHelper.isNotEmpty(exchange.getIn().getHeader(StepFunctions2Constants.STATE_MACHINE_NAME))) {
+ String stateMachineName = exchange.getIn().getHeader(StepFunctions2Constants.STATE_MACHINE_NAME, String.class);
+ builder.name(stateMachineName);
+ }
+ if (ObjectHelper.isNotEmpty(exchange.getIn().getHeader(StepFunctions2Constants.STATE_MACHINE_DEFINITION))) {
+ String stateMachineDefinition
+ = exchange.getIn().getHeader(StepFunctions2Constants.STATE_MACHINE_DEFINITION, String.class);
+ builder.definition(stateMachineDefinition);
+ }
+ if (ObjectHelper.isNotEmpty(exchange.getIn().getHeader(StepFunctions2Constants.STATE_MACHINE_TYPE))) {
+ if (exchange.getIn().getHeader(StepFunctions2Constants.STATE_MACHINE_TYPE) instanceof StateMachineType) {
+ StateMachineType stateMachineType
+ = exchange.getIn().getHeader(StepFunctions2Constants.STATE_MACHINE_TYPE, StateMachineType.class);
+ builder.type(stateMachineType);
+ } else {
+ String stateMachineType
+ = exchange.getIn().getHeader(StepFunctions2Constants.STATE_MACHINE_TYPE, String.class);
+ builder.type(stateMachineType);
+ }
+ }
+ if (ObjectHelper.isNotEmpty(exchange.getIn().getHeader(StepFunctions2Constants.STATE_MACHINE_ROLE_ARN))) {
+ String stateMachineRoleArn
+ = exchange.getIn().getHeader(StepFunctions2Constants.STATE_MACHINE_ROLE_ARN, String.class);
+ builder.roleArn(stateMachineRoleArn);
+ }
+ CreateStateMachineResponse result;
+ try {
+ result = sfnClient.createStateMachine(builder.build());
+ } catch (AwsServiceException ase) {
+ LOG.trace("Create State Machine command returned the error code {}", ase.awsErrorDetails().errorCode());
+ throw ase;
+ }
+ Message message = getMessageForResponse(exchange);
+ message.setBody(result);
+ }
+ }
+
+ private void deleteStateMachine(SfnClient sfnClient, Exchange exchange) throws InvalidPayloadException {
+ if (getConfiguration().isPojoRequest()) {
+ Object payload = exchange.getIn().getMandatoryBody();
+ if (payload instanceof DeleteStateMachineRequest request) {
+ DeleteStateMachineResponse result;
+ try {
+ result = sfnClient.deleteStateMachine(request);
+ } catch (AwsServiceException ase) {
+ LOG.trace("Delete State Machine command returned the error code {}", ase.awsErrorDetails().errorCode());
+ throw ase;
+ }
+ Message message = getMessageForResponse(exchange);
+ message.setBody(result);
+ }
+ } else {
+ DeleteStateMachineRequest.Builder builder = DeleteStateMachineRequest.builder();
+ if (ObjectHelper.isNotEmpty(exchange.getIn().getHeader(StepFunctions2Constants.STATE_MACHINE_ARN))) {
+ String stateMachineArn = exchange.getIn().getHeader(StepFunctions2Constants.STATE_MACHINE_ARN, String.class);
+ builder.stateMachineArn(stateMachineArn);
+ }
+
+ DeleteStateMachineResponse result;
+ try {
+ DeleteStateMachineRequest request = builder.build();
+ result = sfnClient.deleteStateMachine(request);
+ } catch (AwsServiceException ase) {
+ LOG.trace("Delete State Machine command returned the error code {}", ase.awsErrorDetails().errorCode());
+ throw ase;
+ }
+ Message message = getMessageForResponse(exchange);
+ message.setBody(result);
+ }
+ }
+
+ private void updateStateMachine(SfnClient sfnClient, Exchange exchange) throws InvalidPayloadException {
+ if (getConfiguration().isPojoRequest()) {
+ Object payload = exchange.getIn().getMandatoryBody();
+ if (payload instanceof UpdateStateMachineRequest request) {
+ UpdateStateMachineResponse result;
+ try {
+ result = sfnClient.updateStateMachine(request);
+ } catch (AwsServiceException ase) {
+ LOG.trace("Update State Machine command returned the error code {}", ase.awsErrorDetails().errorCode());
+ throw ase;
+ }
+ Message message = getMessageForResponse(exchange);
+ message.setBody(result);
+ }
+ } else {
+ UpdateStateMachineRequest.Builder builder = UpdateStateMachineRequest.builder();
+ if (ObjectHelper.isNotEmpty(exchange.getIn().getHeader(StepFunctions2Constants.STATE_MACHINE_ARN))) {
+ String stateMachineArn = exchange.getIn().getHeader(StepFunctions2Constants.STATE_MACHINE_ARN, String.class);
+ builder.stateMachineArn(stateMachineArn);
+ }
+ if (ObjectHelper.isNotEmpty(exchange.getIn().getHeader(StepFunctions2Constants.STATE_MACHINE_DEFINITION))) {
+ String stateMachineDefinition
+ = exchange.getIn().getHeader(StepFunctions2Constants.STATE_MACHINE_DEFINITION, String.class);
+ builder.definition(stateMachineDefinition);
+ }
+
+ if (ObjectHelper.isNotEmpty(exchange.getIn().getHeader(StepFunctions2Constants.STATE_MACHINE_ROLE_ARN))) {
+ String stateMachineRoleArn
+ = exchange.getIn().getHeader(StepFunctions2Constants.STATE_MACHINE_ROLE_ARN, String.class);
+ builder.roleArn(stateMachineRoleArn);
+ }
+ UpdateStateMachineResponse result;
+ try {
+ result = sfnClient.updateStateMachine(builder.build());
+ } catch (AwsServiceException ase) {
+ LOG.trace("Update State Machine command returned the error code {}", ase.awsErrorDetails().errorCode());
+ throw ase;
+ }
+ Message message = getMessageForResponse(exchange);
+ message.setBody(result);
+ }
+ }
+
+ private void describeStateMachine(SfnClient sfnClient, Exchange exchange) throws InvalidPayloadException {
+ if (getConfiguration().isPojoRequest()) {
+ Object payload = exchange.getIn().getMandatoryBody();
+ if (payload instanceof DescribeStateMachineRequest request) {
+ DescribeStateMachineResponse result;
+ try {
+ result = sfnClient.describeStateMachine(request);
+ } catch (AwsServiceException ase) {
+ LOG.trace("Describe State Machine command returned the error code {}", ase.awsErrorDetails().errorCode());
+ throw ase;
+ }
+ Message message = getMessageForResponse(exchange);
+ message.setBody(result);
+ }
+ } else {
+ DescribeStateMachineRequest.Builder builder = DescribeStateMachineRequest.builder();
+ if (ObjectHelper.isNotEmpty(exchange.getIn().getHeader(StepFunctions2Constants.STATE_MACHINE_ARN))) {
+ String stateMachineArn = exchange.getIn().getHeader(StepFunctions2Constants.STATE_MACHINE_ARN, String.class);
+ builder.stateMachineArn(stateMachineArn);
+ }
+
+ DescribeStateMachineResponse result;
+ try {
+ result = sfnClient.describeStateMachine(builder.build());
+ } catch (AwsServiceException ase) {
+ LOG.trace("Describe State Machine command returned the error code {}", ase.awsErrorDetails().errorCode());
+ throw ase;
+ }
+ Message message = getMessageForResponse(exchange);
+ message.setBody(result);
+ }
+ }
+
+ private void listStateMachines(SfnClient sfnClient, Exchange exchange) throws InvalidPayloadException {
+ if (getConfiguration().isPojoRequest()) {
+ Object payload = exchange.getIn().getMandatoryBody();
+ if (payload instanceof ListStateMachinesRequest request) {
+ ListStateMachinesResponse result;
+ try {
+ result = sfnClient.listStateMachines(request);
+ } catch (AwsServiceException ase) {
+ LOG.trace("List State Machines command returned the error code {}", ase.awsErrorDetails().errorCode());
+ throw ase;
+ }
+ Message message = getMessageForResponse(exchange);
+ message.setBody(result);
+ }
+ } else {
+ ListStateMachinesRequest.Builder builder = ListStateMachinesRequest.builder();
+ if (ObjectHelper.isNotEmpty(exchange.getIn().getHeader(StepFunctions2Constants.STATE_MACHINES_MAX_RESULTS))) {
+ int maxRes = exchange.getIn().getHeader(StepFunctions2Constants.STATE_MACHINES_MAX_RESULTS, Integer.class);
+ builder.maxResults(maxRes);
+ }
+
+ ListStateMachinesResponse result;
+ try {
+ result = sfnClient.listStateMachines(builder.build());
+ } catch (AwsServiceException ase) {
+ LOG.trace("List State Machines command returned the error code {}", ase.awsErrorDetails().errorCode());
+ throw ase;
+ }
+ Message message = getMessageForResponse(exchange);
+ message.setBody(result);
+ }
+ }
+
+ private void createActivity(SfnClient sfnClient, Exchange exchange) throws InvalidPayloadException {
+ if (getConfiguration().isPojoRequest()) {
+ Object payload = exchange.getIn().getMandatoryBody();
+ if (payload instanceof CreateActivityRequest request) {
+ CreateActivityResponse result;
+ try {
+ result = sfnClient.createActivity(request);
+ } catch (AwsServiceException ase) {
+ LOG.trace("Create Activity command returned the error code {}", ase.awsErrorDetails().errorCode());
+ throw ase;
+ }
+ Message message = getMessageForResponse(exchange);
+ message.setBody(result);
+ }
+ } else {
+ CreateActivityRequest.Builder builder = CreateActivityRequest.builder();
+ if (ObjectHelper.isNotEmpty(exchange.getIn().getHeader(StepFunctions2Constants.ACTIVITY_NAME))) {
+ String activityName = exchange.getIn().getHeader(StepFunctions2Constants.ACTIVITY_NAME, String.class);
+ builder.name(activityName);
+ }
+
+ CreateActivityResponse result;
+ try {
+ result = sfnClient.createActivity(builder.build());
+ } catch (AwsServiceException ase) {
+ LOG.trace("Create Activity command returned the error code {}", ase.awsErrorDetails().errorCode());
+ throw ase;
+ }
+ Message message = getMessageForResponse(exchange);
+ message.setBody(result);
+ }
+ }
+
+ private void deleteActivity(SfnClient sfnClient, Exchange exchange) throws InvalidPayloadException {
+ if (getConfiguration().isPojoRequest()) {
+ Object payload = exchange.getIn().getMandatoryBody();
+ if (payload instanceof DeleteActivityRequest request) {
+ DeleteActivityResponse result;
+ try {
+ result = sfnClient.deleteActivity(request);
+ } catch (AwsServiceException ase) {
+ LOG.trace("Delete Activity command returned the error code {}", ase.awsErrorDetails().errorCode());
+ throw ase;
+ }
+ Message message = getMessageForResponse(exchange);
+ message.setBody(result);
+ }
+ } else {
+ DeleteActivityRequest.Builder builder = DeleteActivityRequest.builder();
+ if (ObjectHelper.isNotEmpty(exchange.getIn().getHeader(StepFunctions2Constants.ACTIVITY_ARN))) {
+ String activityArn = exchange.getIn().getHeader(StepFunctions2Constants.ACTIVITY_ARN, String.class);
+ builder.activityArn(activityArn);
+ }
+
+ DeleteActivityResponse result;
+ try {
+ result = sfnClient.deleteActivity(builder.build());
+ } catch (AwsServiceException ase) {
+ LOG.trace("Delete Activity command returned the error code {}", ase.awsErrorDetails().errorCode());
+ throw ase;
+ }
+ Message message = getMessageForResponse(exchange);
+ message.setBody(result);
+ }
+ }
+
+ private void describeActivity(SfnClient sfnClient, Exchange exchange) throws InvalidPayloadException {
+ if (getConfiguration().isPojoRequest()) {
+ Object payload = exchange.getIn().getMandatoryBody();
+ if (payload instanceof DescribeActivityRequest request) {
+ DescribeActivityResponse result;
+ try {
+ result = sfnClient.describeActivity(request);
+ } catch (AwsServiceException ase) {
+ LOG.trace("Describe Activity command returned the error code {}", ase.awsErrorDetails().errorCode());
+ throw ase;
+ }
+ Message message = getMessageForResponse(exchange);
+ message.setBody(result);
+ }
+ } else {
+ DescribeActivityRequest.Builder builder = DescribeActivityRequest.builder();
+ if (ObjectHelper.isNotEmpty(exchange.getIn().getHeader(StepFunctions2Constants.ACTIVITY_ARN))) {
+ String activityArn = exchange.getIn().getHeader(StepFunctions2Constants.ACTIVITY_ARN, String.class);
+ builder.activityArn(activityArn);
+ }
+
+ DescribeActivityResponse result;
+ try {
+ result = sfnClient.describeActivity(builder.build());
+ } catch (AwsServiceException ase) {
+ LOG.trace("Describe Activity command returned the error code {}", ase.awsErrorDetails().errorCode());
+ throw ase;
+ }
+ Message message = getMessageForResponse(exchange);
+ message.setBody(result);
+ }
+ }
+
+ private void getActivityTask(SfnClient sfnClient, Exchange exchange) throws InvalidPayloadException {
+ if (getConfiguration().isPojoRequest()) {
+ Object payload = exchange.getIn().getMandatoryBody();
+ if (payload instanceof GetActivityTaskRequest request) {
+ GetActivityTaskResponse result;
+ try {
+ result = sfnClient.getActivityTask(request);
+ } catch (AwsServiceException ase) {
+ LOG.trace("Get Activity Task command returned the error code {}", ase.awsErrorDetails().errorCode());
+ throw ase;
+ }
+ Message message = getMessageForResponse(exchange);
+ message.setBody(result);
+ }
+ } else {
+ GetActivityTaskRequest.Builder builder = GetActivityTaskRequest.builder();
+ if (ObjectHelper.isNotEmpty(exchange.getIn().getHeader(StepFunctions2Constants.ACTIVITY_ARN))) {
+ String activityArn = exchange.getIn().getHeader(StepFunctions2Constants.ACTIVITY_ARN, String.class);
+ builder.activityArn(activityArn);
+ }
+
+ GetActivityTaskResponse result;
+ try {
+ result = sfnClient.getActivityTask(builder.build());
+ } catch (AwsServiceException ase) {
+ LOG.trace("Get Activity Task command returned the error code {}", ase.awsErrorDetails().errorCode());
+ throw ase;
+ }
+ Message message = getMessageForResponse(exchange);
+ message.setBody(result);
+ }
+ }
+
+ private void listActivities(SfnClient sfnClient, Exchange exchange) throws InvalidPayloadException {
+ if (getConfiguration().isPojoRequest()) {
+ Object payload = exchange.getIn().getMandatoryBody();
+ if (payload instanceof ListActivitiesRequest request) {
+ ListActivitiesResponse result;
+ try {
+ result = sfnClient.listActivities(request);
+ } catch (AwsServiceException ase) {
+ LOG.trace("List Activities command returned the error code {}", ase.awsErrorDetails().errorCode());
+ throw ase;
+ }
+ Message message = getMessageForResponse(exchange);
+ message.setBody(result);
+ }
+ } else {
+ ListActivitiesRequest.Builder builder = ListActivitiesRequest.builder();
+ if (ObjectHelper.isNotEmpty(exchange.getIn().getHeader(StepFunctions2Constants.ACTIVITIES_MAX_RESULTS))) {
+ int maxRes = exchange.getIn().getHeader(StepFunctions2Constants.ACTIVITIES_MAX_RESULTS, Integer.class);
+ builder.maxResults(maxRes);
+ }
+
+ ListActivitiesResponse result;
+ try {
+ result = sfnClient.listActivities(builder.build());
+ } catch (AwsServiceException ase) {
+ LOG.trace("List Activities command returned the error code {}", ase.awsErrorDetails().errorCode());
+ throw ase;
+ }
+ Message message = getMessageForResponse(exchange);
+ message.setBody(result);
+ }
+ }
+
+ private void startExecution(SfnClient sfnClient, Exchange exchange) throws InvalidPayloadException {
+ if (getConfiguration().isPojoRequest()) {
+ Object payload = exchange.getIn().getMandatoryBody();
+ if (payload instanceof StartExecutionRequest request) {
+ StartExecutionResponse result;
+ try {
+ result = sfnClient.startExecution(request);
+ } catch (AwsServiceException ase) {
+ LOG.trace("Start Execution command returned the error code {}", ase.awsErrorDetails().errorCode());
+ throw ase;
+ }
+ Message message = getMessageForResponse(exchange);
+ message.setBody(result);
+ }
+ } else {
+ StartExecutionRequest.Builder builder = StartExecutionRequest.builder();
+ if (ObjectHelper.isNotEmpty(exchange.getIn().getHeader(StepFunctions2Constants.STATE_MACHINE_ARN))) {
+ String stateMachineArn = exchange.getIn().getHeader(StepFunctions2Constants.STATE_MACHINE_ARN, String.class);
+ builder.stateMachineArn(stateMachineArn);
+ }
+ if (ObjectHelper.isNotEmpty(exchange.getIn().getHeader(StepFunctions2Constants.EXECUTION_NAME))) {
+ 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);
+ builder.input(executionInput);
+ }
+ if (ObjectHelper.isNotEmpty(exchange.getIn().getHeader(StepFunctions2Constants.EXECUTION_TRACE_HEADER))) {
+ String executionTraceHeader
+ = exchange.getIn().getHeader(StepFunctions2Constants.EXECUTION_TRACE_HEADER, String.class);
+ builder.traceHeader(executionTraceHeader);
+ }
+
+ StartExecutionResponse result;
+ try {
+ result = sfnClient.startExecution(builder.build());
+ } catch (AwsServiceException ase) {
+ LOG.trace("Start Execution command returned the error code {}", ase.awsErrorDetails().errorCode());
+ throw ase;
+ }
+ Message message = getMessageForResponse(exchange);
+ message.setBody(result);
+ }
+ }
+
+ private void startSyncExecution(SfnClient sfnClient, Exchange exchange) throws InvalidPayloadException {
+ if (getConfiguration().isPojoRequest()) {
+ Object payload = exchange.getIn().getMandatoryBody();
+ if (payload instanceof StartSyncExecutionRequest request) {
+ StartSyncExecutionResponse result;
+ try {
+ result = sfnClient.startSyncExecution(request);
+ } catch (AwsServiceException ase) {
+ LOG.trace("Start Sync Execution command returned the error code {}", ase.awsErrorDetails().errorCode());
+ throw ase;
+ }
+ Message message = getMessageForResponse(exchange);
+ message.setBody(result);
+ }
+ } else {
+ StartSyncExecutionRequest.Builder builder = StartSyncExecutionRequest.builder();
+ if (ObjectHelper.isNotEmpty(exchange.getIn().getHeader(StepFunctions2Constants.STATE_MACHINE_ARN))) {
+ String stateMachineArn = exchange.getIn().getHeader(StepFunctions2Constants.STATE_MACHINE_ARN, String.class);
+ builder.stateMachineArn(stateMachineArn);
+ }
+ if (ObjectHelper.isNotEmpty(exchange.getIn().getHeader(StepFunctions2Constants.EXECUTION_NAME))) {
+ 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);
+ builder.input(executionInput);
+ }
+ if (ObjectHelper.isNotEmpty(exchange.getIn().getHeader(StepFunctions2Constants.EXECUTION_TRACE_HEADER))) {
+ String executionTraceHeader
+ = exchange.getIn().getHeader(StepFunctions2Constants.EXECUTION_TRACE_HEADER, String.class);
+ builder.traceHeader(executionTraceHeader);
+ }
+
+ StartSyncExecutionResponse result;
+ try {
+ result = sfnClient.startSyncExecution(builder.build());
+ } catch (AwsServiceException ase) {
+ LOG.trace("Start Sync Execution command returned the error code {}", ase.awsErrorDetails().errorCode());
+ throw ase;
+ }
+ Message message = getMessageForResponse(exchange);
+ message.setBody(result);
+ }
+ }
+
+ private void stopExecution(SfnClient sfnClient, Exchange exchange) throws InvalidPayloadException {
+ if (getConfiguration().isPojoRequest()) {
+ Object payload = exchange.getIn().getMandatoryBody();
+ if (payload instanceof StopExecutionRequest request) {
+ StopExecutionResponse result;
+ try {
+ result = sfnClient.stopExecution(request);
+ } catch (AwsServiceException ase) {
+ LOG.trace("Stop Execution command returned the error code {}", ase.awsErrorDetails().errorCode());
+ throw ase;
+ }
+ Message message = getMessageForResponse(exchange);
+ message.setBody(result);
+ }
+ } else {
+ StopExecutionRequest.Builder builder = StopExecutionRequest.builder();
+ if (ObjectHelper.isNotEmpty(exchange.getIn().getHeader(StepFunctions2Constants.EXECUTION_ARN))) {
+ String stateMachineArn = exchange.getIn().getHeader(StepFunctions2Constants.EXECUTION_ARN, String.class);
+ builder.executionArn(stateMachineArn);
+ }
+
+ StopExecutionResponse result;
+ try {
+ result = sfnClient.stopExecution(builder.build());
+ } catch (AwsServiceException ase) {
+ LOG.trace("Stop Execution command returned the error code {}", ase.awsErrorDetails().errorCode());
+ throw ase;
+ }
+ Message message = getMessageForResponse(exchange);
+ message.setBody(result);
+ }
+ }
+
+ private void describeExecution(SfnClient sfnClient, Exchange exchange) throws InvalidPayloadException {
+ if (getConfiguration().isPojoRequest()) {
+ Object payload = exchange.getIn().getMandatoryBody();
+ if (payload instanceof DescribeExecutionRequest request) {
+ DescribeExecutionResponse result;
+ try {
+ result = sfnClient.describeExecution(request);
+ } catch (AwsServiceException ase) {
+ LOG.trace("Describe Execution command returned the error code {}", ase.awsErrorDetails().errorCode());
+ throw ase;
+ }
+ Message message = getMessageForResponse(exchange);
+ message.setBody(result);
+ }
+ } else {
+ DescribeExecutionRequest.Builder builder = DescribeExecutionRequest.builder();
+ if (ObjectHelper.isNotEmpty(exchange.getIn().getHeader(StepFunctions2Constants.EXECUTION_ARN))) {
+ String stateMachineArn = exchange.getIn().getHeader(StepFunctions2Constants.EXECUTION_ARN, String.class);
+ builder.executionArn(stateMachineArn);
+ }
+
+ DescribeExecutionResponse result;
+ try {
+ result = sfnClient.describeExecution(builder.build());
+ } catch (AwsServiceException ase) {
+ LOG.trace("Describe Execution command returned the error code {}", ase.awsErrorDetails().errorCode());
+ throw ase;
+ }
+ Message message = getMessageForResponse(exchange);
+ message.setBody(result);
+ }
+ }
+
+ private void listExecutions(SfnClient sfnClient, Exchange exchange) throws InvalidPayloadException {
+ if (getConfiguration().isPojoRequest()) {
+ Object payload = exchange.getIn().getMandatoryBody();
+ if (payload instanceof ListExecutionsRequest request) {
+ ListExecutionsResponse result;
+ try {
+ result = sfnClient.listExecutions(request);
+ } catch (AwsServiceException ase) {
+ LOG.trace("List Executions command returned the error code {}", ase.awsErrorDetails().errorCode());
+ throw ase;
+ }
+ Message message = getMessageForResponse(exchange);
+ message.setBody(result);
+ }
+ } else {
+ ListExecutionsRequest.Builder builder = ListExecutionsRequest.builder();
+ if (ObjectHelper.isNotEmpty(exchange.getIn().getHeader(StepFunctions2Constants.EXECUTIONS_MAX_RESULTS))) {
+ int maxRes = exchange.getIn().getHeader(StepFunctions2Constants.EXECUTIONS_MAX_RESULTS, Integer.class);
+ builder.maxResults(maxRes);
+ }
+
+ ListExecutionsResponse result;
+ try {
+ result = sfnClient.listExecutions(builder.build());
+ } catch (AwsServiceException ase) {
+ LOG.trace("List Executions command returned the error code {}", ase.awsErrorDetails().errorCode());
+ throw ase;
+ }
+ Message message = getMessageForResponse(exchange);
+ message.setBody(result);
+ }
+ }
+
+ private void getExecutionHistory(SfnClient sfnClient, Exchange exchange) throws InvalidPayloadException {
+ if (getConfiguration().isPojoRequest()) {
+ Object payload = exchange.getIn().getMandatoryBody();
+ if (payload instanceof GetExecutionHistoryRequest request) {
+ GetExecutionHistoryResponse result;
+ try {
+ result = sfnClient.getExecutionHistory(request);
+ } catch (AwsServiceException ase) {
+ LOG.trace("Get Execution History command returned the error code {}", ase.awsErrorDetails().errorCode());
+ throw ase;
+ }
+ Message message = getMessageForResponse(exchange);
+ message.setBody(result);
+ }
+ } else {
+ GetExecutionHistoryRequest.Builder builder = GetExecutionHistoryRequest.builder();
+ if (ObjectHelper.isNotEmpty(exchange.getIn().getHeader(StepFunctions2Constants.EXECUTION_ARN))) {
+ String executionArn = exchange.getIn().getHeader(StepFunctions2Constants.EXECUTION_ARN, String.class);
+ builder.executionArn(executionArn);
+ }
+ if (ObjectHelper.isNotEmpty(exchange.getIn().getHeader(StepFunctions2Constants.EXECUTION_HISTORY_MAX_RESULTS))) {
+ int maxRes = exchange.getIn().getHeader(StepFunctions2Constants.EXECUTION_HISTORY_MAX_RESULTS, Integer.class);
+ builder.maxResults(maxRes);
+ }
+ if (ObjectHelper
+ .isNotEmpty(exchange.getIn().getHeader(StepFunctions2Constants.EXECUTION_HISTORY_INCLUDE_EXECUTION_DATA))) {
+ boolean includeExecutionData = exchange.getIn()
+ .getHeader(StepFunctions2Constants.EXECUTION_HISTORY_INCLUDE_EXECUTION_DATA, Boolean.class);
+ builder.includeExecutionData(includeExecutionData);
+ }
+ if (ObjectHelper.isNotEmpty(exchange.getIn().getHeader(StepFunctions2Constants.EXECUTION_HISTORY_REVERSE_ORDER))) {
+ Boolean executionReverseOrder
+ = exchange.getIn().getHeader(StepFunctions2Constants.EXECUTION_HISTORY_REVERSE_ORDER, Boolean.class);
+ builder.reverseOrder(executionReverseOrder);
+ }
+
+ GetExecutionHistoryResponse result;
+ try {
+ result = sfnClient.getExecutionHistory(builder.build());
+ } catch (AwsServiceException ase) {
+ LOG.trace("Get Execution History command returned the error code {}", ase.awsErrorDetails().errorCode());
+ throw ase;
+ }
+ Message message = getMessageForResponse(exchange);
+ message.setBody(result);
+ }
+ }
+
+ public static Message getMessageForResponse(final Exchange exchange) {
+ return exchange.getMessage();
+ }
+
+ @Override
+ protected void doStart() throws Exception {
+ // health-check is optional so discover and resolve
+ healthCheckRepository = HealthCheckHelper.getHealthCheckRepository(
+ getEndpoint().getCamelContext(),
+ "producers",
+ WritableHealthCheckRepository.class);
+
+ if (healthCheckRepository != null) {
+ String id = getEndpoint().getId();
+ producerHealthCheck = new StepFunctions2ProducerHealthCheck(getEndpoint(), id);
+ producerHealthCheck.setEnabled(getEndpoint().getComponent().isHealthCheckProducerEnabled());
+ healthCheckRepository.addHealthCheck(producerHealthCheck);
+ }
+ }
+
+ @Override
+ protected void doStop() throws Exception {
+ if (healthCheckRepository != null && producerHealthCheck != null) {
+ healthCheckRepository.removeHealthCheck(producerHealthCheck);
+ producerHealthCheck = null;
+ }
+ }
+
+}
diff --git a/components/camel-aws/camel-aws2-step-functions/src/main/java/org/apache/camel/component/aws2/stepfunctions/StepFunctions2ProducerHealthCheck.java b/components/camel-aws/camel-aws2-step-functions/src/main/java/org/apache/camel/component/aws2/stepfunctions/StepFunctions2ProducerHealthCheck.java
new file mode 100644
index 0000000000000..e1a7114b8522f
--- /dev/null
+++ b/components/camel-aws/camel-aws2-step-functions/src/main/java/org/apache/camel/component/aws2/stepfunctions/StepFunctions2ProducerHealthCheck.java
@@ -0,0 +1,71 @@
+/*
+ * 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 java.util.Map;
+
+import org.apache.camel.health.HealthCheckResultBuilder;
+import org.apache.camel.impl.health.AbstractHealthCheck;
+import org.apache.camel.util.ObjectHelper;
+import software.amazon.awssdk.awscore.exception.AwsServiceException;
+import software.amazon.awssdk.regions.Region;
+import software.amazon.awssdk.services.sfn.SfnClient;
+import software.amazon.awssdk.services.sfn.model.ListStateMachinesRequest;
+
+public class StepFunctions2ProducerHealthCheck extends AbstractHealthCheck {
+
+ private final StepFunctions2Endpoint stepFunctions2Endpoint;
+
+ public StepFunctions2ProducerHealthCheck(StepFunctions2Endpoint stepFunctions2Endpoint, String clientId) {
+ super("camel", "producer:aws2-step-functions-" + clientId);
+ this.stepFunctions2Endpoint = stepFunctions2Endpoint;
+ }
+
+ @Override
+ protected void doCall(HealthCheckResultBuilder builder, Map options) {
+ StepFunctions2Configuration configuration = stepFunctions2Endpoint.getConfiguration();
+ if (ObjectHelper.isNotEmpty(configuration.getRegion())) {
+ if (!SfnClient.serviceMetadata().regions().contains(Region.of(configuration.getRegion()))) {
+ builder.message("The service is not supported in this region");
+ builder.down();
+ return;
+ }
+ }
+ try {
+ SfnClient client = stepFunctions2Endpoint.getAwsSfnClient();
+ client.listStateMachines(ListStateMachinesRequest.builder().maxResults(1).build());
+ } catch (AwsServiceException e) {
+ builder.message(e.getMessage());
+ builder.error(e);
+ if (ObjectHelper.isNotEmpty(e.statusCode())) {
+ builder.detail(SERVICE_STATUS_CODE, e.statusCode());
+ }
+ if (ObjectHelper.isNotEmpty(e.awsErrorDetails().errorCode())) {
+ builder.detail(SERVICE_ERROR_CODE, e.awsErrorDetails().errorCode());
+ }
+ builder.down();
+ return;
+ } catch (Exception e) {
+ builder.error(e);
+ builder.down();
+ return;
+ }
+ builder.up();
+ }
+
+}
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
new file mode 100644
index 0000000000000..d068fa35cb214
--- /dev/null
+++ b/components/camel-aws/camel-aws2-step-functions/src/main/java/org/apache/camel/component/aws2/stepfunctions/client/StepFunctions2ClientFactory.java
@@ -0,0 +1,41 @@
+/*
+ * 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.client;
+
+import org.apache.camel.component.aws2.stepfunctions.StepFunctions2Configuration;
+import org.apache.camel.component.aws2.stepfunctions.client.impl.StepFunctions2ClientIAMOptimizedImpl;
+import org.apache.camel.component.aws2.stepfunctions.client.impl.StepFunctions2ClientStandardImpl;
+
+/**
+ * Factory class to return the correct type of AWS StepFunctions client.
+ */
+public final class StepFunctions2ClientFactory {
+
+ private StepFunctions2ClientFactory() {
+ }
+
+ /**
+ * Return the correct AWS StepFunctions client (based on remote vs local).
+ *
+ * @param configuration configuration
+ * @return StepFunctionsClient
+ */
+ public static StepFunctions2InternalClient getSfnClient(StepFunctions2Configuration configuration) {
+ return Boolean.TRUE.equals(configuration.isUseDefaultCredentialsProvider())
+ ? new StepFunctions2ClientIAMOptimizedImpl(configuration) : new StepFunctions2ClientStandardImpl(configuration);
+ }
+}
diff --git a/components/camel-aws/camel-aws2-step-functions/src/main/java/org/apache/camel/component/aws2/stepfunctions/client/StepFunctions2InternalClient.java b/components/camel-aws/camel-aws2-step-functions/src/main/java/org/apache/camel/component/aws2/stepfunctions/client/StepFunctions2InternalClient.java
new file mode 100644
index 0000000000000..d582115e6d0e1
--- /dev/null
+++ b/components/camel-aws/camel-aws2-step-functions/src/main/java/org/apache/camel/component/aws2/stepfunctions/client/StepFunctions2InternalClient.java
@@ -0,0 +1,32 @@
+/*
+ * 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.client;
+
+import software.amazon.awssdk.services.sfn.SfnClient;
+
+/**
+ * Manage the required actions of an StepFunctions client for either local or remote.
+ */
+public interface StepFunctions2InternalClient {
+
+ /**
+ * Returns an StepFunctions client after a factory method determines which one to return.
+ *
+ * @return SfnClient SfnClient
+ */
+ SfnClient getSfnClient();
+}
diff --git a/components/camel-aws/camel-aws2-step-functions/src/main/java/org/apache/camel/component/aws2/stepfunctions/client/impl/StepFunctions2ClientIAMOptimizedImpl.java b/components/camel-aws/camel-aws2-step-functions/src/main/java/org/apache/camel/component/aws2/stepfunctions/client/impl/StepFunctions2ClientIAMOptimizedImpl.java
new file mode 100644
index 0000000000000..bb7b3b34c6d03
--- /dev/null
+++ b/components/camel-aws/camel-aws2-step-functions/src/main/java/org/apache/camel/component/aws2/stepfunctions/client/impl/StepFunctions2ClientIAMOptimizedImpl.java
@@ -0,0 +1,89 @@
+/*
+ * 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.client.impl;
+
+import java.net.URI;
+
+import org.apache.camel.component.aws2.stepfunctions.StepFunctions2Configuration;
+import org.apache.camel.component.aws2.stepfunctions.client.StepFunctions2InternalClient;
+import org.apache.camel.util.ObjectHelper;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import software.amazon.awssdk.http.SdkHttpClient;
+import software.amazon.awssdk.http.SdkHttpConfigurationOption;
+import software.amazon.awssdk.http.apache.ApacheHttpClient;
+import software.amazon.awssdk.http.apache.ProxyConfiguration;
+import software.amazon.awssdk.regions.Region;
+import software.amazon.awssdk.services.sfn.SfnClient;
+import software.amazon.awssdk.services.sfn.SfnClientBuilder;
+import software.amazon.awssdk.utils.AttributeMap;
+
+/**
+ * Manage an AWS StepFunctions client for all users to use (enabling temporary creds). This implementation is for remote
+ * instances to manage the credentials on their own (eliminating credential rotations)
+ */
+public class StepFunctions2ClientIAMOptimizedImpl implements StepFunctions2InternalClient {
+
+ private static final Logger LOG = LoggerFactory.getLogger(StepFunctions2ClientIAMOptimizedImpl.class);
+ private StepFunctions2Configuration configuration;
+
+ /**
+ * Constructor that uses the config file.
+ */
+ public StepFunctions2ClientIAMOptimizedImpl(StepFunctions2Configuration configuration) {
+ LOG.trace("Creating an AWS StepFunctions client for an ec2 instance with IAM temporary credentials (normal for ec2s).");
+ this.configuration = configuration;
+ }
+
+ /**
+ * Getting the StepFunctions aws client that is used.
+ *
+ * @return StepFunctions Client.
+ */
+ @Override
+ public SfnClient getSfnClient() {
+ SfnClient client = null;
+ SfnClientBuilder clientBuilder = SfnClient.builder();
+ ProxyConfiguration.Builder proxyConfig = null;
+ ApacheHttpClient.Builder httpClientBuilder = null;
+ if (ObjectHelper.isNotEmpty(configuration.getProxyHost()) && ObjectHelper.isNotEmpty(configuration.getProxyPort())) {
+ proxyConfig = ProxyConfiguration.builder();
+ URI proxyEndpoint = URI.create(configuration.getProxyProtocol() + "://" + configuration.getProxyHost() + ":"
+ + configuration.getProxyPort());
+ proxyConfig.endpoint(proxyEndpoint);
+ httpClientBuilder = ApacheHttpClient.builder().proxyConfiguration(proxyConfig.build());
+ clientBuilder = clientBuilder.httpClientBuilder(httpClientBuilder);
+ }
+ if (ObjectHelper.isNotEmpty(configuration.getRegion())) {
+ clientBuilder = clientBuilder.region(Region.of(configuration.getRegion()));
+ }
+ if (configuration.isOverrideEndpoint()) {
+ clientBuilder.endpointOverride(URI.create(configuration.getUriEndpointOverride()));
+ }
+ if (configuration.isTrustAllCertificates()) {
+ SdkHttpClient ahc = ApacheHttpClient.builder().buildWithDefaults(AttributeMap
+ .builder()
+ .put(
+ SdkHttpConfigurationOption.TRUST_ALL_CERTIFICATES,
+ Boolean.TRUE)
+ .build());
+ clientBuilder.httpClient(ahc);
+ }
+ client = clientBuilder.build();
+ return client;
+ }
+}
diff --git a/components/camel-aws/camel-aws2-step-functions/src/main/java/org/apache/camel/component/aws2/stepfunctions/client/impl/StepFunctions2ClientStandardImpl.java b/components/camel-aws/camel-aws2-step-functions/src/main/java/org/apache/camel/component/aws2/stepfunctions/client/impl/StepFunctions2ClientStandardImpl.java
new file mode 100644
index 0000000000000..cac8c713444c4
--- /dev/null
+++ b/components/camel-aws/camel-aws2-step-functions/src/main/java/org/apache/camel/component/aws2/stepfunctions/client/impl/StepFunctions2ClientStandardImpl.java
@@ -0,0 +1,104 @@
+/*
+ * 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.client.impl;
+
+import java.net.URI;
+
+import org.apache.camel.component.aws2.stepfunctions.StepFunctions2Configuration;
+import org.apache.camel.component.aws2.stepfunctions.client.StepFunctions2InternalClient;
+import org.apache.camel.util.ObjectHelper;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import software.amazon.awssdk.auth.credentials.AwsBasicCredentials;
+import software.amazon.awssdk.auth.credentials.StaticCredentialsProvider;
+import software.amazon.awssdk.http.SdkHttpClient;
+import software.amazon.awssdk.http.SdkHttpConfigurationOption;
+import software.amazon.awssdk.http.apache.ApacheHttpClient;
+import software.amazon.awssdk.http.apache.ProxyConfiguration;
+import software.amazon.awssdk.regions.Region;
+import software.amazon.awssdk.services.sfn.SfnClient;
+import software.amazon.awssdk.services.sfn.SfnClientBuilder;
+import software.amazon.awssdk.utils.AttributeMap;
+
+/**
+ * Manage an AWS StepFunctions client for all users to use. This implementation is for local instances to use a static
+ * and solid credential set.
+ */
+public class StepFunctions2ClientStandardImpl implements StepFunctions2InternalClient {
+ private static final Logger LOG = LoggerFactory.getLogger(StepFunctions2ClientStandardImpl.class);
+ private StepFunctions2Configuration configuration;
+
+ /**
+ * Constructor that uses the config file.
+ */
+ public StepFunctions2ClientStandardImpl(StepFunctions2Configuration configuration) {
+ LOG.trace("Creating an AWS StepFunctions manager using static credentials.");
+ this.configuration = configuration;
+ }
+
+ /**
+ * Getting the StepFunctions AWS client that is used.
+ *
+ * @return Amazon StepFunctions Client.
+ */
+ @Override
+ public SfnClient getSfnClient() {
+ SfnClient client = null;
+ SfnClientBuilder clientBuilder = SfnClient.builder();
+ ProxyConfiguration.Builder proxyConfig = null;
+ ApacheHttpClient.Builder httpClientBuilder = null;
+ boolean isClientConfigFound = false;
+ if (ObjectHelper.isNotEmpty(configuration.getProxyHost()) && ObjectHelper.isNotEmpty(configuration.getProxyPort())) {
+ proxyConfig = ProxyConfiguration.builder();
+ URI proxyEndpoint = URI.create(configuration.getProxyProtocol() + "://" + configuration.getProxyHost() + ":"
+ + configuration.getProxyPort());
+ proxyConfig.endpoint(proxyEndpoint);
+ httpClientBuilder = ApacheHttpClient.builder().proxyConfiguration(proxyConfig.build());
+ isClientConfigFound = true;
+ }
+ if (configuration.getAccessKey() != null && configuration.getSecretKey() != null) {
+ AwsBasicCredentials cred = AwsBasicCredentials.create(configuration.getAccessKey(), configuration.getSecretKey());
+ if (isClientConfigFound) {
+ clientBuilder = clientBuilder.httpClientBuilder(httpClientBuilder)
+ .credentialsProvider(StaticCredentialsProvider.create(cred));
+ } else {
+ clientBuilder = clientBuilder.credentialsProvider(StaticCredentialsProvider.create(cred));
+ }
+ } else {
+ if (!isClientConfigFound) {
+ clientBuilder = clientBuilder.httpClientBuilder(httpClientBuilder);
+ }
+ }
+ if (ObjectHelper.isNotEmpty(configuration.getRegion())) {
+ clientBuilder = clientBuilder.region(Region.of(configuration.getRegion()));
+ }
+ if (configuration.isOverrideEndpoint()) {
+ clientBuilder.endpointOverride(URI.create(configuration.getUriEndpointOverride()));
+ }
+ if (configuration.isTrustAllCertificates()) {
+ SdkHttpClient ahc = ApacheHttpClient.builder().buildWithDefaults(AttributeMap
+ .builder()
+ .put(
+ SdkHttpConfigurationOption.TRUST_ALL_CERTIFICATES,
+ Boolean.TRUE)
+ .build());
+ clientBuilder.httpClient(ahc);
+ }
+ client = clientBuilder.build();
+ return client;
+ }
+}
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
new file mode 100644
index 0000000000000..3e07a0d8186d4
--- /dev/null
+++ b/components/camel-aws/camel-aws2-step-functions/src/test/java/org/apache/camel/component/aws2/stepfunctions/AmazonStepFunctionsClientMock.java
@@ -0,0 +1,158 @@
+/*
+ * 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 java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+
+import software.amazon.awssdk.services.sfn.SfnClient;
+import software.amazon.awssdk.services.sfn.model.*;
+
+public class AmazonStepFunctionsClientMock implements SfnClient {
+
+ public AmazonStepFunctionsClientMock() {
+ }
+
+ @Override
+ public CreateActivityResponse createActivity(CreateActivityRequest createActivityRequest) {
+ CreateActivityResponse.Builder result = CreateActivityResponse.builder();
+ result.activityArn("aws:sfn-activity::test:arn");
+ return result.build();
+ }
+
+ @Override
+ public CreateStateMachineResponse createStateMachine(CreateStateMachineRequest createStateMachineRequest) {
+ CreateStateMachineResponse.Builder result = CreateStateMachineResponse.builder();
+ result.stateMachineArn("aws:sfn-state-machine::test:arn");
+ return result.build();
+ }
+
+ @Override
+ public DeleteActivityResponse deleteActivity(DeleteActivityRequest deleteActivityRequest) {
+ DeleteActivityResponse.Builder result = DeleteActivityResponse.builder();
+ return result.build();
+ }
+
+ @Override
+ public DeleteStateMachineResponse deleteStateMachine(DeleteStateMachineRequest deleteStateMachineRequest) {
+ DeleteStateMachineResponse.Builder result = DeleteStateMachineResponse.builder();
+ return result.build();
+ }
+
+ @Override
+ public DescribeActivityResponse describeActivity(DescribeActivityRequest describeActivityRequest) {
+ DescribeActivityResponse.Builder result = DescribeActivityResponse.builder();
+ result.activityArn("aws:sfn-activity::test:arn");
+ return result.build();
+ }
+
+ @Override
+ public DescribeExecutionResponse describeExecution(DescribeExecutionRequest describeExecutionRequest) {
+ DescribeExecutionResponse.Builder result = DescribeExecutionResponse.builder();
+ result.executionArn("aws:sfn-activity::test:arn");
+ return result.build();
+ }
+
+ @Override
+ public DescribeStateMachineResponse describeStateMachine(DescribeStateMachineRequest describeStateMachineRequest) {
+ DescribeStateMachineResponse.Builder result = DescribeStateMachineResponse.builder();
+ result.stateMachineArn("aws:sfn-state-machine::test-arn");
+ return result.build();
+ }
+
+ @Override
+ public GetActivityTaskResponse getActivityTask(GetActivityTaskRequest getActivityTaskRequest) {
+ GetActivityTaskResponse.Builder result = GetActivityTaskResponse.builder();
+ result.input("activity-input");
+ return result.build();
+ }
+
+ @Override
+ public GetExecutionHistoryResponse getExecutionHistory(GetExecutionHistoryRequest getExecutionHistoryRequest) {
+ GetExecutionHistoryResponse.Builder result = GetExecutionHistoryResponse.builder();
+ List events = new ArrayList<>();
+ events.add(HistoryEvent.builder().id(1L).build());
+ result.events(events);
+ return result.build();
+ }
+
+ @Override
+ public ListActivitiesResponse listActivities(ListActivitiesRequest listActivitiesRequest) {
+ ListActivitiesResponse.Builder result = ListActivitiesResponse.builder();
+ List activityListItems = new ArrayList<>();
+ activityListItems.add(ActivityListItem.builder().activityArn("aws:sfn-activity::test:arn").build());
+ result.activities(activityListItems);
+ return result.build();
+ }
+
+ @Override
+ public ListExecutionsResponse listExecutions(ListExecutionsRequest listExecutionsRequest) {
+ ListExecutionsResponse.Builder result = ListExecutionsResponse.builder();
+ List executionListItems = new ArrayList<>();
+ executionListItems.add(ExecutionListItem.builder().executionArn("aws:sfn-execution::test-arn").build());
+ result.executions(executionListItems);
+ return result.build();
+ }
+
+ @Override
+ public ListStateMachinesResponse listStateMachines(ListStateMachinesRequest listStateMachinesRequest) {
+ ListStateMachinesResponse.Builder result = ListStateMachinesResponse.builder();
+ List stateMachineListItems = new ArrayList<>();
+ stateMachineListItems.add(StateMachineListItem.builder().stateMachineArn("aws:sfn-state-machine::test-arn").build());
+ result.stateMachines(stateMachineListItems);
+ return result.build();
+ }
+
+ @Override
+ public StartExecutionResponse startExecution(StartExecutionRequest startExecutionRequest) {
+ StartExecutionResponse.Builder result = StartExecutionResponse.builder();
+ result.executionArn("aws:sfn-execution::test:arn");
+ return result.build();
+ }
+
+ @Override
+ public StartSyncExecutionResponse startSyncExecution(StartSyncExecutionRequest startSyncExecutionRequest) {
+ StartSyncExecutionResponse.Builder result = StartSyncExecutionResponse.builder();
+ result.executionArn("aws:sfn-execution::test:arn");
+ return result.build();
+ }
+
+ @Override
+ public StopExecutionResponse stopExecution(StopExecutionRequest stopExecutionRequest) {
+ StopExecutionResponse.Builder result = StopExecutionResponse.builder();
+ result.stopDate(new Date(1691423142).toInstant());
+ return result.build();
+ }
+
+ @Override
+ public UpdateStateMachineResponse updateStateMachine(UpdateStateMachineRequest updateStateMachineRequest) {
+ UpdateStateMachineResponse.Builder result = UpdateStateMachineResponse.builder();
+ result.stateMachineVersionArn("aws:sfn-state-machine:version-2::test:arn");
+ return result.build();
+ }
+
+ @Override
+ public String serviceName() {
+ return SfnClient.SERVICE_NAME;
+ }
+
+ @Override
+ public void close() {
+
+ }
+}
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..900d2a25d5675
--- /dev/null
+++ b/components/camel-aws/camel-aws2-step-functions/src/test/java/org/apache/camel/component/aws2/stepfunctions/StepFunctions2ClientFactoryTest.java
@@ -0,0 +1,51 @@
+/*
+ * 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.apache.camel.component.aws2.stepfunctions.client.StepFunctions2InternalClient;
+import org.apache.camel.component.aws2.stepfunctions.client.impl.StepFunctions2ClientIAMOptimizedImpl;
+import org.apache.camel.component.aws2.stepfunctions.client.impl.StepFunctions2ClientStandardImpl;
+import org.junit.jupiter.api.Test;
+
+import static org.junit.jupiter.api.Assertions.assertTrue;
+
+public class StepFunctions2ClientFactoryTest {
+
+ @Test
+ public void getStandardSfnClientDefault() {
+ StepFunctions2Configuration sfn2Configuration = new StepFunctions2Configuration();
+ StepFunctions2InternalClient sfnClient = StepFunctions2ClientFactory.getSfnClient(sfn2Configuration);
+ assertTrue(sfnClient instanceof StepFunctions2ClientStandardImpl);
+ }
+
+ @Test
+ public void getStandardSfnClient() {
+ StepFunctions2Configuration sfn2Configuration = new StepFunctions2Configuration();
+ sfn2Configuration.setUseDefaultCredentialsProvider(false);
+ StepFunctions2InternalClient sfnClient = StepFunctions2ClientFactory.getSfnClient(sfn2Configuration);
+ assertTrue(sfnClient instanceof StepFunctions2ClientStandardImpl);
+ }
+
+ @Test
+ public void getIAMOptimizedSfnClient() {
+ StepFunctions2Configuration sfn2Configuration = new StepFunctions2Configuration();
+ sfn2Configuration.setUseDefaultCredentialsProvider(true);
+ StepFunctions2InternalClient sfnClient = StepFunctions2ClientFactory.getSfnClient(sfn2Configuration);
+ assertTrue(sfnClient instanceof StepFunctions2ClientIAMOptimizedImpl);
+ }
+}
diff --git a/components/camel-aws/camel-aws2-step-functions/src/test/java/org/apache/camel/component/aws2/stepfunctions/StepFunctions2ComponentClientRegistryTest.java b/components/camel-aws/camel-aws2-step-functions/src/test/java/org/apache/camel/component/aws2/stepfunctions/StepFunctions2ComponentClientRegistryTest.java
new file mode 100644
index 0000000000000..f6ab0441304f7
--- /dev/null
+++ b/components/camel-aws/camel-aws2-step-functions/src/test/java/org/apache/camel/component/aws2/stepfunctions/StepFunctions2ComponentClientRegistryTest.java
@@ -0,0 +1,59 @@
+/*
+ * 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.test.junit5.CamelTestSupport;
+import org.junit.jupiter.api.Test;
+
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertSame;
+import static org.junit.jupiter.api.Assertions.assertThrows;
+
+public class StepFunctions2ComponentClientRegistryTest extends CamelTestSupport {
+
+ @Test
+ public void createEndpointWithMinimalSfnClientConfiguration() throws Exception {
+
+ AmazonStepFunctionsClientMock clientMock = new AmazonStepFunctionsClientMock();
+ context.getRegistry().bind("amazonSfnClient", clientMock);
+ StepFunctions2Component component = context.getComponent("aws2-step-functions", StepFunctions2Component.class);
+ StepFunctions2Endpoint endpoint = (StepFunctions2Endpoint) component.createEndpoint("aws2-step-functions://TestDomain");
+
+ assertNotNull(endpoint.getConfiguration().getAwsSfnClient());
+ }
+
+ @Test
+ public void createEndpointWithMinimalSfnClientMisconfiguration() {
+
+ StepFunctions2Component component = context.getComponent("aws2-step-functions", StepFunctions2Component.class);
+ assertThrows(IllegalArgumentException.class, () -> {
+ component.createEndpoint("aws2-step-functions://TestDomain");
+ });
+ }
+
+ @Test
+ public void createEndpointWithAutowired() throws Exception {
+
+ AmazonStepFunctionsClientMock clientMock = new AmazonStepFunctionsClientMock();
+ context.getRegistry().bind("awsSfnClient", clientMock);
+ StepFunctions2Component component = context.getComponent("aws2-step-functions", StepFunctions2Component.class);
+ StepFunctions2Endpoint endpoint = (StepFunctions2Endpoint) component
+ .createEndpoint("aws2-step-functions://TestDomain?accessKey=xxx&secretKey=yyy");
+
+ assertSame(clientMock, endpoint.getConfiguration().getAwsSfnClient());
+ }
+}
diff --git a/components/camel-aws/camel-aws2-step-functions/src/test/java/org/apache/camel/component/aws2/stepfunctions/StepFunctions2ComponentConfigurationTest.java b/components/camel-aws/camel-aws2-step-functions/src/test/java/org/apache/camel/component/aws2/stepfunctions/StepFunctions2ComponentConfigurationTest.java
new file mode 100644
index 0000000000000..b337654b271d5
--- /dev/null
+++ b/components/camel-aws/camel-aws2-step-functions/src/test/java/org/apache/camel/component/aws2/stepfunctions/StepFunctions2ComponentConfigurationTest.java
@@ -0,0 +1,89 @@
+/*
+ * 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.test.junit5.CamelTestSupport;
+import org.junit.jupiter.api.Test;
+import software.amazon.awssdk.core.Protocol;
+import software.amazon.awssdk.regions.Region;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertTrue;
+
+public class StepFunctions2ComponentConfigurationTest extends CamelTestSupport {
+
+ @Test
+ public void createEndpointWithComponentElements() throws Exception {
+ StepFunctions2Component component = context.getComponent("aws2-step-functions", StepFunctions2Component.class);
+ component.getConfiguration().setAccessKey("XXX");
+ component.getConfiguration().setSecretKey("YYY");
+ StepFunctions2Endpoint endpoint = (StepFunctions2Endpoint) component.createEndpoint("aws2-step-functions://label");
+
+ assertEquals("XXX", endpoint.getConfiguration().getAccessKey());
+ assertEquals("YYY", endpoint.getConfiguration().getSecretKey());
+ }
+
+ @Test
+ public void createEndpointWithComponentAndEndpointElements() throws Exception {
+ StepFunctions2Component component = context.getComponent("aws2-step-functions", StepFunctions2Component.class);
+ component.getConfiguration().setAccessKey("XXX");
+ component.getConfiguration().setSecretKey("YYY");
+ component.getConfiguration().setRegion(Region.US_WEST_1.toString());
+ StepFunctions2Endpoint endpoint
+ = (StepFunctions2Endpoint) component
+ .createEndpoint("aws2-step-functions://label?accessKey=xxxxxx&secretKey=yyyyy®ion=US_EAST_1");
+
+ assertEquals("xxxxxx", endpoint.getConfiguration().getAccessKey());
+ assertEquals("yyyyy", endpoint.getConfiguration().getSecretKey());
+ assertEquals("US_EAST_1", endpoint.getConfiguration().getRegion());
+ }
+
+ @Test
+ public void createEndpointWithComponentEndpointElementsAndProxy() throws Exception {
+ StepFunctions2Component component = context.getComponent("aws2-step-functions", StepFunctions2Component.class);
+ component.getConfiguration().setAccessKey("XXX");
+ component.getConfiguration().setSecretKey("YYY");
+ component.getConfiguration().setRegion(Region.US_WEST_1.toString());
+ StepFunctions2Endpoint endpoint = (StepFunctions2Endpoint) component
+ .createEndpoint(
+ "aws2-step-functions://label?accessKey=xxxxxx&secretKey=yyyyy®ion=US_EAST_1&proxyHost=localhost&proxyPort=9000&proxyProtocol=HTTP");
+
+ assertEquals("xxxxxx", endpoint.getConfiguration().getAccessKey());
+ assertEquals("yyyyy", endpoint.getConfiguration().getSecretKey());
+ assertEquals("US_EAST_1", endpoint.getConfiguration().getRegion());
+ assertEquals(Protocol.HTTP, endpoint.getConfiguration().getProxyProtocol());
+ assertEquals("localhost", endpoint.getConfiguration().getProxyHost());
+ assertEquals(Integer.valueOf(9000), endpoint.getConfiguration().getProxyPort());
+ }
+
+ @Test
+ public void createEndpointWithOverrideEndpoint() throws Exception {
+ StepFunctions2Component component = context.getComponent("aws2-step-functions", StepFunctions2Component.class);
+ component.getConfiguration().setAccessKey("XXX");
+ component.getConfiguration().setSecretKey("YYY");
+ component.getConfiguration().setRegion(Region.US_WEST_1.toString());
+ StepFunctions2Endpoint endpoint
+ = (StepFunctions2Endpoint) component.createEndpoint(
+ "aws2-step-functions://label?accessKey=xxxxxx&secretKey=yyyyy®ion=US_EAST_1&overrideEndpoint=true&uriEndpointOverride=http://localhost:9090");
+
+ assertEquals("xxxxxx", endpoint.getConfiguration().getAccessKey());
+ assertEquals("yyyyy", endpoint.getConfiguration().getSecretKey());
+ assertEquals("US_EAST_1", endpoint.getConfiguration().getRegion());
+ assertTrue(endpoint.getConfiguration().isOverrideEndpoint());
+ assertEquals("http://localhost:9090", endpoint.getConfiguration().getUriEndpointOverride());
+ }
+}
diff --git a/components/camel-aws/camel-aws2-step-functions/src/test/java/org/apache/camel/component/aws2/stepfunctions/StepFunctions2ProducerHealthCheckProfileCredsTest.java b/components/camel-aws/camel-aws2-step-functions/src/test/java/org/apache/camel/component/aws2/stepfunctions/StepFunctions2ProducerHealthCheckProfileCredsTest.java
new file mode 100644
index 0000000000000..b2393729f414d
--- /dev/null
+++ b/components/camel-aws/camel-aws2-step-functions/src/test/java/org/apache/camel/component/aws2/stepfunctions/StepFunctions2ProducerHealthCheckProfileCredsTest.java
@@ -0,0 +1,94 @@
+/*
+ * 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 java.util.Collection;
+import java.util.concurrent.TimeUnit;
+
+import org.apache.camel.CamelContext;
+import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.health.HealthCheck;
+import org.apache.camel.health.HealthCheckHelper;
+import org.apache.camel.health.HealthCheckRegistry;
+import org.apache.camel.health.HealthCheckRepository;
+import org.apache.camel.impl.health.DefaultHealthCheckRegistry;
+import org.apache.camel.test.junit5.CamelTestSupport;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.Test;
+
+import static org.testcontainers.shaded.org.awaitility.Awaitility.await;
+
+public class StepFunctions2ProducerHealthCheckProfileCredsTest extends CamelTestSupport {
+
+ CamelContext context;
+
+ @Override
+ protected CamelContext createCamelContext() throws Exception {
+ context = super.createCamelContext();
+ context.getPropertiesComponent().setLocation("ref:prop");
+
+ // install health check manually (yes a bit cumbersome)
+ HealthCheckRegistry registry = new DefaultHealthCheckRegistry();
+ registry.setCamelContext(context);
+ Object hc = registry.resolveById("context");
+ registry.register(hc);
+ hc = registry.resolveById("routes");
+ registry.register(hc);
+ hc = registry.resolveById("consumers");
+ registry.register(hc);
+ HealthCheckRepository hcr = (HealthCheckRepository) registry.resolveById("producers");
+ hcr.setEnabled(true);
+ registry.register(hcr);
+ context.getCamelContextExtension().addContextPlugin(HealthCheckRegistry.class, registry);
+
+ return context;
+ }
+
+ @Override
+ protected RouteBuilder createRouteBuilder() {
+ return new RouteBuilder() {
+
+ @Override
+ public void configure() {
+ from("direct:listStateMachines")
+ .to("aws2-step-functions://test?operation=listStateMachines®ion=l&useDefaultCredentialsProvider=true");
+ }
+ };
+ }
+
+ @Test
+ public void testConnectivity() {
+ Collection res = HealthCheckHelper.invokeLiveness(context);
+ boolean up = res.stream().allMatch(r -> r.getState().equals(HealthCheck.State.UP));
+ Assertions.assertTrue(up, "liveness check");
+
+ // health-check readiness should be down
+ await().atMost(20, TimeUnit.SECONDS).untilAsserted(() -> {
+ Collection res2 = HealthCheckHelper.invokeReadiness(context);
+ boolean down = res2.stream().allMatch(r -> r.getState().equals(HealthCheck.State.DOWN));
+ boolean containsAws2SfnHealthCheck = res2.stream()
+ .anyMatch(result -> result.getCheck().getId().startsWith("producer:aws2-step-functions"));
+ boolean hasRegionMessage = res2.stream()
+ .anyMatch(r -> r.getMessage().stream().anyMatch(msg -> msg.contains("region")));
+ Assertions.assertTrue(down, "liveness check");
+ Assertions.assertTrue(containsAws2SfnHealthCheck, "aws2-step-functions check");
+ Assertions.assertTrue(hasRegionMessage, "aws2-step-functions check error message");
+ });
+
+ }
+}
diff --git a/components/camel-aws/camel-aws2-step-functions/src/test/java/org/apache/camel/component/aws2/stepfunctions/StepFunctions2ProducerHealthCheckStaticCredsTest.java b/components/camel-aws/camel-aws2-step-functions/src/test/java/org/apache/camel/component/aws2/stepfunctions/StepFunctions2ProducerHealthCheckStaticCredsTest.java
new file mode 100644
index 0000000000000..067f842b5ea8c
--- /dev/null
+++ b/components/camel-aws/camel-aws2-step-functions/src/test/java/org/apache/camel/component/aws2/stepfunctions/StepFunctions2ProducerHealthCheckStaticCredsTest.java
@@ -0,0 +1,95 @@
+/*
+ * 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 java.util.Collection;
+import java.util.concurrent.TimeUnit;
+
+import org.apache.camel.CamelContext;
+import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.health.HealthCheck;
+import org.apache.camel.health.HealthCheckHelper;
+import org.apache.camel.health.HealthCheckRegistry;
+import org.apache.camel.health.HealthCheckRepository;
+import org.apache.camel.impl.health.DefaultHealthCheckRegistry;
+import org.apache.camel.test.junit5.CamelTestSupport;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.Test;
+
+import static org.testcontainers.shaded.org.awaitility.Awaitility.await;
+
+public class StepFunctions2ProducerHealthCheckStaticCredsTest extends CamelTestSupport {
+
+ CamelContext context;
+
+ @Override
+ protected CamelContext createCamelContext() throws Exception {
+ context = super.createCamelContext();
+ context.getPropertiesComponent().setLocation("ref:prop");
+
+ // install health check manually (yes a bit cumbersome)
+ HealthCheckRegistry registry = new DefaultHealthCheckRegistry();
+ registry.setCamelContext(context);
+ Object hc = registry.resolveById("context");
+ registry.register(hc);
+ hc = registry.resolveById("routes");
+ registry.register(hc);
+ hc = registry.resolveById("consumers");
+ registry.register(hc);
+ HealthCheckRepository hcr = (HealthCheckRepository) registry.resolveById("producers");
+ hcr.setEnabled(true);
+ registry.register(hcr);
+ context.getCamelContextExtension().addContextPlugin(HealthCheckRegistry.class, registry);
+
+ return context;
+ }
+
+ @Override
+ protected RouteBuilder createRouteBuilder() {
+ return new RouteBuilder() {
+
+ @Override
+ public void configure() {
+ from("direct:listStateMachines")
+ .to("aws2-step-functions://test?operation=listStateMachines®ion=l&secretKey=l&accessKey=k");
+ }
+ };
+ }
+
+ @Test
+ public void testConnectivity() {
+
+ Collection res = HealthCheckHelper.invokeLiveness(context);
+ boolean up = res.stream().allMatch(r -> r.getState().equals(HealthCheck.State.UP));
+ Assertions.assertTrue(up, "liveness check");
+
+ // health-check readiness should be down
+ await().atMost(20, TimeUnit.SECONDS).untilAsserted(() -> {
+ Collection res2 = HealthCheckHelper.invokeReadiness(context);
+ boolean down = res2.stream().allMatch(r -> r.getState().equals(HealthCheck.State.DOWN));
+ boolean containsAws2SfnHealthCheck = res2.stream()
+ .anyMatch(result -> result.getCheck().getId().startsWith("producer:aws2-step-functions"));
+ boolean hasRegionMessage = res2.stream()
+ .anyMatch(r -> r.getMessage().stream().anyMatch(msg -> msg.contains("region")));
+ Assertions.assertTrue(down, "liveness check");
+ Assertions.assertTrue(containsAws2SfnHealthCheck, "aws2-step-functions check");
+ Assertions.assertTrue(hasRegionMessage, "aws2-step-functions check error message");
+ });
+
+ }
+}
diff --git a/components/camel-aws/camel-aws2-step-functions/src/test/java/org/apache/camel/component/aws2/stepfunctions/StepFunctions2ProducerSpringTest.java b/components/camel-aws/camel-aws2-step-functions/src/test/java/org/apache/camel/component/aws2/stepfunctions/StepFunctions2ProducerSpringTest.java
new file mode 100644
index 0000000000000..2fc21c8997995
--- /dev/null
+++ b/components/camel-aws/camel-aws2-step-functions/src/test/java/org/apache/camel/component/aws2/stepfunctions/StepFunctions2ProducerSpringTest.java
@@ -0,0 +1,337 @@
+/*
+ * 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 java.util.Date;
+
+import org.apache.camel.EndpointInject;
+import org.apache.camel.Exchange;
+import org.apache.camel.Processor;
+import org.apache.camel.component.mock.MockEndpoint;
+import org.apache.camel.test.spring.junit5.CamelSpringTestSupport;
+import org.junit.jupiter.api.Test;
+import org.springframework.context.support.ClassPathXmlApplicationContext;
+import software.amazon.awssdk.services.sfn.model.*;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+
+public class StepFunctions2ProducerSpringTest extends CamelSpringTestSupport {
+
+ @EndpointInject("mock:result")
+ private MockEndpoint mock;
+
+ @Test
+ public void sfnCreateActivityTest() throws Exception {
+
+ mock.expectedMessageCount(1);
+ Exchange exchange = template.request("direct:createActivity", new Processor() {
+ @Override
+ public void process(Exchange exchange) {
+ exchange.getIn().setHeader(StepFunctions2Constants.OPERATION, StepFunctions2Operations.createActivity);
+ }
+ });
+
+ MockEndpoint.assertIsSatisfied(context);
+
+ CreateActivityResponse resultGet = (CreateActivityResponse) exchange.getIn().getBody();
+ assertEquals("aws:sfn-activity::test:arn", resultGet.activityArn());
+ }
+
+ @Test
+ public void sfnCreateActivityPojoTest() throws Exception {
+
+ mock.expectedMessageCount(1);
+ Exchange exchange = template.request("direct:createPojoActivity", new Processor() {
+ @Override
+ public void process(Exchange exchange) {
+ exchange.getIn().setHeader(StepFunctions2Constants.OPERATION, StepFunctions2Operations.createActivity);
+ exchange.getIn().setBody(CreateActivityRequest.builder().name("activity").build());
+ }
+ });
+
+ MockEndpoint.assertIsSatisfied(context);
+
+ CreateActivityResponse resultGet = (CreateActivityResponse) exchange.getIn().getBody();
+ assertEquals("aws:sfn-activity::test:arn", resultGet.activityArn());
+ }
+
+ @Test
+ public void sfnCreateStateMachineTest() throws Exception {
+
+ mock.expectedMessageCount(1);
+ Exchange exchange = template.request("direct:createStateMachine", new Processor() {
+ @Override
+ public void process(Exchange exchange) {
+ exchange.getIn().setHeader(StepFunctions2Constants.OPERATION, StepFunctions2Operations.createStateMachine);
+ }
+ });
+
+ MockEndpoint.assertIsSatisfied(context);
+
+ CreateStateMachineResponse resultGet = (CreateStateMachineResponse) exchange.getIn().getBody();
+ assertEquals("aws:sfn-state-machine::test:arn", resultGet.stateMachineArn());
+ }
+
+ @Test
+ public void sfnDeleteStateMachineTest() throws Exception {
+
+ mock.expectedMessageCount(1);
+ Exchange exchange = template.request("direct:deleteStateMachine", new Processor() {
+ @Override
+ public void process(Exchange exchange) {
+ exchange.getIn().setHeader(StepFunctions2Constants.OPERATION, StepFunctions2Operations.deleteStateMachine);
+ }
+ });
+
+ MockEndpoint.assertIsSatisfied(context);
+
+ DeleteStateMachineResponse resultGet = (DeleteStateMachineResponse) exchange.getIn().getBody();
+ assertNotNull(resultGet);
+ }
+
+ @Test
+ public void sfnUpdateStateMachineTest() throws Exception {
+
+ mock.expectedMessageCount(1);
+ Exchange exchange = template.request("direct:updateStateMachine", new Processor() {
+ @Override
+ public void process(Exchange exchange) {
+ exchange.getIn().setHeader(StepFunctions2Constants.OPERATION, StepFunctions2Operations.updateStateMachine);
+ }
+ });
+
+ MockEndpoint.assertIsSatisfied(context);
+
+ UpdateStateMachineResponse resultGet = (UpdateStateMachineResponse) exchange.getIn().getBody();
+ assertEquals("aws:sfn-state-machine:version-2::test:arn", resultGet.stateMachineVersionArn());
+ }
+
+ @Test
+ public void sfnDescribeStateMachineTest() throws Exception {
+
+ mock.expectedMessageCount(1);
+ Exchange exchange = template.request("direct:describeStateMachine", new Processor() {
+ @Override
+ public void process(Exchange exchange) {
+ exchange.getIn().setHeader(StepFunctions2Constants.OPERATION, StepFunctions2Operations.describeStateMachine);
+ }
+ });
+
+ MockEndpoint.assertIsSatisfied(context);
+
+ DescribeStateMachineResponse resultGet = (DescribeStateMachineResponse) exchange.getIn().getBody();
+ assertEquals("aws:sfn-state-machine::test-arn", resultGet.stateMachineArn());
+ }
+
+ @Test
+ public void sfnListStateMachinesTest() throws Exception {
+
+ mock.expectedMessageCount(1);
+ Exchange exchange = template.request("direct:listStateMachines", new Processor() {
+ @Override
+ public void process(Exchange exchange) {
+ exchange.getIn().setHeader(StepFunctions2Constants.OPERATION, StepFunctions2Operations.listStateMachines);
+ }
+ });
+
+ MockEndpoint.assertIsSatisfied(context);
+
+ ListStateMachinesResponse resultGet = (ListStateMachinesResponse) exchange.getIn().getBody();
+ assertEquals(1, resultGet.stateMachines().size());
+ assertEquals("aws:sfn-state-machine::test-arn", resultGet.stateMachines().get(0).stateMachineArn());
+ }
+
+ @Test
+ public void sfnDeleteActivityTest() throws Exception {
+
+ mock.expectedMessageCount(1);
+ Exchange exchange = template.request("direct:deleteActivity", new Processor() {
+ @Override
+ public void process(Exchange exchange) {
+ exchange.getIn().setHeader(StepFunctions2Constants.OPERATION, StepFunctions2Operations.deleteActivity);
+ }
+ });
+
+ MockEndpoint.assertIsSatisfied(context);
+
+ DeleteActivityResponse resultGet = (DeleteActivityResponse) exchange.getIn().getBody();
+ assertNotNull(resultGet);
+ }
+
+ @Test
+ public void sfnDescribeActivityTest() throws Exception {
+
+ mock.expectedMessageCount(1);
+ Exchange exchange = template.request("direct:describeActivity", new Processor() {
+ @Override
+ public void process(Exchange exchange) {
+ exchange.getIn().setHeader(StepFunctions2Constants.OPERATION, StepFunctions2Operations.describeActivity);
+ }
+ });
+
+ MockEndpoint.assertIsSatisfied(context);
+
+ DescribeActivityResponse resultGet = (DescribeActivityResponse) exchange.getIn().getBody();
+ assertEquals("aws:sfn-activity::test:arn", resultGet.activityArn());
+ }
+
+ @Test
+ public void sfnGetActivityTaskTest() throws Exception {
+
+ mock.expectedMessageCount(1);
+ Exchange exchange = template.request("direct:getActivityTask", new Processor() {
+ @Override
+ public void process(Exchange exchange) {
+ exchange.getIn().setHeader(StepFunctions2Constants.OPERATION, StepFunctions2Operations.getActivityTask);
+ }
+ });
+
+ MockEndpoint.assertIsSatisfied(context);
+
+ GetActivityTaskResponse resultGet = (GetActivityTaskResponse) exchange.getIn().getBody();
+ assertEquals("activity-input", resultGet.input());
+ }
+
+ @Test
+ public void sfnListActivitiesTest() throws Exception {
+
+ mock.expectedMessageCount(1);
+ Exchange exchange = template.request("direct:listActivities", new Processor() {
+ @Override
+ public void process(Exchange exchange) {
+ exchange.getIn().setHeader(StepFunctions2Constants.OPERATION, StepFunctions2Operations.listActivities);
+ }
+ });
+
+ MockEndpoint.assertIsSatisfied(context);
+
+ ListActivitiesResponse resultGet = (ListActivitiesResponse) exchange.getIn().getBody();
+ assertEquals(1, resultGet.activities().size());
+ assertEquals("aws:sfn-activity::test:arn", resultGet.activities().get(0).activityArn());
+ }
+
+ @Test
+ public void sfnStartExecutionTest() throws Exception {
+
+ mock.expectedMessageCount(1);
+ Exchange exchange = template.request("direct:startExecution", new Processor() {
+ @Override
+ public void process(Exchange exchange) {
+ exchange.getIn().setHeader(StepFunctions2Constants.OPERATION, StepFunctions2Operations.startExecution);
+ }
+ });
+
+ MockEndpoint.assertIsSatisfied(context);
+
+ StartExecutionResponse resultGet = (StartExecutionResponse) exchange.getIn().getBody();
+ assertEquals("aws:sfn-execution::test:arn", resultGet.executionArn());
+ }
+
+ @Test
+ public void sfnStartSyncExecutionTest() throws Exception {
+
+ mock.expectedMessageCount(1);
+ Exchange exchange = template.request("direct:startSyncExecution", new Processor() {
+ @Override
+ public void process(Exchange exchange) {
+ exchange.getIn().setHeader(StepFunctions2Constants.OPERATION, StepFunctions2Operations.startSyncExecution);
+ }
+ });
+
+ MockEndpoint.assertIsSatisfied(context);
+
+ StartSyncExecutionResponse resultGet = (StartSyncExecutionResponse) exchange.getIn().getBody();
+ assertEquals("aws:sfn-execution::test:arn", resultGet.executionArn());
+ }
+
+ @Test
+ public void sfnStopExecutionTest() throws Exception {
+
+ mock.expectedMessageCount(1);
+ Exchange exchange = template.request("direct:stopExecution", new Processor() {
+ @Override
+ public void process(Exchange exchange) {
+ exchange.getIn().setHeader(StepFunctions2Constants.OPERATION, StepFunctions2Operations.stopExecution);
+ }
+ });
+
+ MockEndpoint.assertIsSatisfied(context);
+
+ StopExecutionResponse resultGet = (StopExecutionResponse) exchange.getIn().getBody();
+ assertEquals(new Date(1691423142).toInstant(), resultGet.stopDate());
+ }
+
+ @Test
+ public void sfnDescribeExecutionTest() throws Exception {
+
+ mock.expectedMessageCount(1);
+ Exchange exchange = template.request("direct:describeExecution", new Processor() {
+ @Override
+ public void process(Exchange exchange) {
+ exchange.getIn().setHeader(StepFunctions2Constants.OPERATION, StepFunctions2Operations.describeExecution);
+ }
+ });
+
+ MockEndpoint.assertIsSatisfied(context);
+
+ DescribeExecutionResponse resultGet = (DescribeExecutionResponse) exchange.getIn().getBody();
+ assertEquals("aws:sfn-activity::test:arn", resultGet.executionArn());
+ }
+
+ @Test
+ public void sfnListExecutionsTest() throws Exception {
+
+ mock.expectedMessageCount(1);
+ Exchange exchange = template.request("direct:listExecutions", new Processor() {
+ @Override
+ public void process(Exchange exchange) {
+ exchange.getIn().setHeader(StepFunctions2Constants.OPERATION, StepFunctions2Operations.listExecutions);
+ }
+ });
+
+ MockEndpoint.assertIsSatisfied(context);
+
+ ListExecutionsResponse resultGet = (ListExecutionsResponse) exchange.getIn().getBody();
+ assertEquals(1, resultGet.executions().size());
+ assertEquals("aws:sfn-execution::test-arn", resultGet.executions().get(0).executionArn());
+ }
+
+ @Test
+ public void sfnGetExecutionHistoryTest() throws Exception {
+
+ mock.expectedMessageCount(1);
+ Exchange exchange = template.request("direct:getExecutionHistory", new Processor() {
+ @Override
+ public void process(Exchange exchange) {
+ exchange.getIn().setHeader(StepFunctions2Constants.OPERATION, StepFunctions2Operations.getExecutionHistory);
+ }
+ });
+
+ MockEndpoint.assertIsSatisfied(context);
+
+ GetExecutionHistoryResponse resultGet = (GetExecutionHistoryResponse) exchange.getIn().getBody();
+ assertEquals(1, resultGet.events().size());
+ assertEquals(1L, resultGet.events().get(0).id());
+ }
+
+ @Override
+ protected ClassPathXmlApplicationContext createApplicationContext() {
+ return new ClassPathXmlApplicationContext(
+ "org/apache/camel/component/aws2/stepfunctions/StepFunctionsComponentSpringTest-context.xml");
+ }
+}
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
new file mode 100644
index 0000000000000..4e2872568935a
--- /dev/null
+++ b/components/camel-aws/camel-aws2-step-functions/src/test/java/org/apache/camel/component/aws2/stepfunctions/StepFunctions2ProducerTest.java
@@ -0,0 +1,397 @@
+/*
+ * 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 java.util.Date;
+
+import org.apache.camel.BindToRegistry;
+import org.apache.camel.EndpointInject;
+import org.apache.camel.Exchange;
+import org.apache.camel.Processor;
+import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.component.mock.MockEndpoint;
+import org.apache.camel.test.junit5.CamelTestSupport;
+import org.junit.jupiter.api.Test;
+import software.amazon.awssdk.services.sfn.model.*;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+
+public class StepFunctions2ProducerTest extends CamelTestSupport {
+
+ @BindToRegistry("awsSfnClient")
+ AmazonStepFunctionsClientMock clientMock = new AmazonStepFunctionsClientMock();
+
+ @EndpointInject("mock:result")
+ private MockEndpoint mock;
+
+ @Test
+ public void sfnCreateActivityTest() throws Exception {
+
+ mock.expectedMessageCount(1);
+ Exchange exchange = template.request("direct:createActivity", new Processor() {
+ @Override
+ public void process(Exchange exchange) {
+ exchange.getIn().setHeader(StepFunctions2Constants.OPERATION, StepFunctions2Operations.createActivity);
+ }
+ });
+
+ MockEndpoint.assertIsSatisfied(context);
+
+ CreateActivityResponse resultGet = (CreateActivityResponse) exchange.getIn().getBody();
+ assertEquals("aws:sfn-activity::test:arn", resultGet.activityArn());
+ }
+
+ @Test
+ public void sfnCreateActivityPojoTest() throws Exception {
+
+ mock.expectedMessageCount(1);
+ Exchange exchange = template.request("direct:createPojoActivity", new Processor() {
+ @Override
+ public void process(Exchange exchange) {
+ exchange.getIn().setHeader(StepFunctions2Constants.OPERATION, StepFunctions2Operations.createActivity);
+ exchange.getIn().setBody(CreateActivityRequest.builder().name("activity").build());
+ }
+ });
+
+ MockEndpoint.assertIsSatisfied(context);
+
+ CreateActivityResponse resultGet = (CreateActivityResponse) exchange.getIn().getBody();
+ assertEquals("aws:sfn-activity::test:arn", resultGet.activityArn());
+ }
+
+ @Test
+ public void sfnCreateStateMachineTest() throws Exception {
+
+ mock.expectedMessageCount(1);
+ Exchange exchange = template.request("direct:createStateMachine", new Processor() {
+ @Override
+ public void process(Exchange exchange) {
+ exchange.getIn().setHeader(StepFunctions2Constants.OPERATION, StepFunctions2Operations.createStateMachine);
+ exchange.getIn().setHeader(StepFunctions2Constants.STATE_MACHINE_NAME, "state-machine");
+ }
+ });
+
+ MockEndpoint.assertIsSatisfied(context);
+
+ CreateStateMachineResponse resultGet = (CreateStateMachineResponse) exchange.getIn().getBody();
+ assertEquals("aws:sfn-state-machine::test:arn", resultGet.stateMachineArn());
+ }
+
+ @Test
+ public void sfnDeleteStateMachineTest() throws Exception {
+
+ mock.expectedMessageCount(1);
+ Exchange exchange = template.request("direct:deleteStateMachine", new Processor() {
+ @Override
+ public void process(Exchange exchange) {
+ exchange.getIn().setHeader(StepFunctions2Constants.OPERATION, StepFunctions2Operations.deleteStateMachine);
+ exchange.getIn().setHeader(StepFunctions2Constants.STATE_MACHINE_ARN, "aws:sfn-state-machine::test:arn");
+ }
+ });
+
+ MockEndpoint.assertIsSatisfied(context);
+
+ DeleteStateMachineResponse resultGet = (DeleteStateMachineResponse) exchange.getIn().getBody();
+ assertNotNull(resultGet);
+ }
+
+ @Test
+ public void sfnUpdateStateMachineTest() throws Exception {
+
+ mock.expectedMessageCount(1);
+ Exchange exchange = template.request("direct:updateStateMachine", new Processor() {
+ @Override
+ public void process(Exchange exchange) {
+ exchange.getIn().setHeader(StepFunctions2Constants.OPERATION, StepFunctions2Operations.updateStateMachine);
+ }
+ });
+
+ MockEndpoint.assertIsSatisfied(context);
+
+ UpdateStateMachineResponse resultGet = (UpdateStateMachineResponse) exchange.getIn().getBody();
+ assertEquals("aws:sfn-state-machine:version-2::test:arn", resultGet.stateMachineVersionArn());
+ }
+
+ @Test
+ public void sfnDescribeStateMachineTest() throws Exception {
+
+ mock.expectedMessageCount(1);
+ Exchange exchange = template.request("direct:describeStateMachine", new Processor() {
+ @Override
+ public void process(Exchange exchange) {
+ exchange.getIn().setHeader(StepFunctions2Constants.OPERATION, StepFunctions2Operations.describeStateMachine);
+ }
+ });
+
+ MockEndpoint.assertIsSatisfied(context);
+
+ DescribeStateMachineResponse resultGet = (DescribeStateMachineResponse) exchange.getIn().getBody();
+ assertEquals("aws:sfn-state-machine::test-arn", resultGet.stateMachineArn());
+ }
+
+ @Test
+ public void sfnListStateMachinesTest() throws Exception {
+
+ mock.expectedMessageCount(1);
+ Exchange exchange = template.request("direct:listStateMachines", new Processor() {
+ @Override
+ public void process(Exchange exchange) {
+ exchange.getIn().setHeader(StepFunctions2Constants.OPERATION, StepFunctions2Operations.listStateMachines);
+ exchange.getIn().setHeader(StepFunctions2Constants.STATE_MACHINES_MAX_RESULTS, 5);
+ }
+ });
+
+ MockEndpoint.assertIsSatisfied(context);
+
+ ListStateMachinesResponse resultGet = (ListStateMachinesResponse) exchange.getIn().getBody();
+ assertEquals(1, resultGet.stateMachines().size());
+ assertEquals("aws:sfn-state-machine::test-arn", resultGet.stateMachines().get(0).stateMachineArn());
+ }
+
+ @Test
+ public void sfnDeleteActivityTest() throws Exception {
+
+ mock.expectedMessageCount(1);
+ Exchange exchange = template.request("direct:deleteActivity", new Processor() {
+ @Override
+ public void process(Exchange exchange) {
+ exchange.getIn().setHeader(StepFunctions2Constants.OPERATION, StepFunctions2Operations.deleteActivity);
+ }
+ });
+
+ MockEndpoint.assertIsSatisfied(context);
+
+ DeleteActivityResponse resultGet = (DeleteActivityResponse) exchange.getIn().getBody();
+ assertNotNull(resultGet);
+ }
+
+ @Test
+ public void sfnDescribeActivityTest() throws Exception {
+
+ mock.expectedMessageCount(1);
+ Exchange exchange = template.request("direct:describeActivity", new Processor() {
+ @Override
+ public void process(Exchange exchange) {
+ exchange.getIn().setHeader(StepFunctions2Constants.OPERATION, StepFunctions2Operations.describeActivity);
+ }
+ });
+
+ MockEndpoint.assertIsSatisfied(context);
+
+ DescribeActivityResponse resultGet = (DescribeActivityResponse) exchange.getIn().getBody();
+ assertEquals("aws:sfn-activity::test:arn", resultGet.activityArn());
+ }
+
+ @Test
+ public void sfnGetActivityTaskTest() throws Exception {
+
+ mock.expectedMessageCount(1);
+ Exchange exchange = template.request("direct:getActivityTask", new Processor() {
+ @Override
+ public void process(Exchange exchange) {
+ exchange.getIn().setHeader(StepFunctions2Constants.OPERATION, StepFunctions2Operations.getActivityTask);
+ }
+ });
+
+ MockEndpoint.assertIsSatisfied(context);
+
+ GetActivityTaskResponse resultGet = (GetActivityTaskResponse) exchange.getIn().getBody();
+ assertEquals("activity-input", resultGet.input());
+ }
+
+ @Test
+ public void sfnListActivitiesTest() throws Exception {
+
+ mock.expectedMessageCount(1);
+ Exchange exchange = template.request("direct:listActivities", new Processor() {
+ @Override
+ public void process(Exchange exchange) {
+ exchange.getIn().setHeader(StepFunctions2Constants.OPERATION, StepFunctions2Operations.listActivities);
+ }
+ });
+
+ MockEndpoint.assertIsSatisfied(context);
+
+ ListActivitiesResponse resultGet = (ListActivitiesResponse) exchange.getIn().getBody();
+ assertEquals(1, resultGet.activities().size());
+ assertEquals("aws:sfn-activity::test:arn", resultGet.activities().get(0).activityArn());
+ }
+
+ @Test
+ public void sfnStartExecutionTest() throws Exception {
+
+ mock.expectedMessageCount(1);
+ Exchange exchange = template.request("direct:startExecution", new Processor() {
+ @Override
+ public void process(Exchange exchange) {
+ exchange.getIn().setHeader(StepFunctions2Constants.OPERATION, StepFunctions2Operations.startExecution);
+ }
+ });
+
+ MockEndpoint.assertIsSatisfied(context);
+
+ StartExecutionResponse resultGet = (StartExecutionResponse) exchange.getIn().getBody();
+ assertEquals("aws:sfn-execution::test:arn", resultGet.executionArn());
+ }
+
+ @Test
+ public void sfnStartSyncExecutionTest() throws Exception {
+
+ mock.expectedMessageCount(1);
+ Exchange exchange = template.request("direct:startSyncExecution", new Processor() {
+ @Override
+ public void process(Exchange exchange) {
+ exchange.getIn().setHeader(StepFunctions2Constants.OPERATION, StepFunctions2Operations.startSyncExecution);
+ }
+ });
+
+ MockEndpoint.assertIsSatisfied(context);
+
+ StartSyncExecutionResponse resultGet = (StartSyncExecutionResponse) exchange.getIn().getBody();
+ assertEquals("aws:sfn-execution::test:arn", resultGet.executionArn());
+ }
+
+ @Test
+ public void sfnStopExecutionTest() throws Exception {
+
+ mock.expectedMessageCount(1);
+ Exchange exchange = template.request("direct:stopExecution", new Processor() {
+ @Override
+ public void process(Exchange exchange) {
+ exchange.getIn().setHeader(StepFunctions2Constants.OPERATION, StepFunctions2Operations.stopExecution);
+ }
+ });
+
+ MockEndpoint.assertIsSatisfied(context);
+
+ StopExecutionResponse resultGet = (StopExecutionResponse) exchange.getIn().getBody();
+ assertEquals(new Date(1691423142).toInstant(), resultGet.stopDate());
+ }
+
+ @Test
+ public void sfnDescribeExecutionTest() throws Exception {
+
+ mock.expectedMessageCount(1);
+ Exchange exchange = template.request("direct:describeExecution", new Processor() {
+ @Override
+ public void process(Exchange exchange) {
+ exchange.getIn().setHeader(StepFunctions2Constants.OPERATION, StepFunctions2Operations.describeExecution);
+ }
+ });
+
+ MockEndpoint.assertIsSatisfied(context);
+
+ DescribeExecutionResponse resultGet = (DescribeExecutionResponse) exchange.getIn().getBody();
+ assertEquals("aws:sfn-activity::test:arn", resultGet.executionArn());
+ }
+
+ @Test
+ public void sfnListExecutionsTest() throws Exception {
+
+ mock.expectedMessageCount(1);
+ Exchange exchange = template.request("direct:listExecutions", new Processor() {
+ @Override
+ public void process(Exchange exchange) {
+ exchange.getIn().setHeader(StepFunctions2Constants.OPERATION, StepFunctions2Operations.listExecutions);
+ }
+ });
+
+ MockEndpoint.assertIsSatisfied(context);
+
+ ListExecutionsResponse resultGet = (ListExecutionsResponse) exchange.getIn().getBody();
+ assertEquals(1, resultGet.executions().size());
+ assertEquals("aws:sfn-execution::test-arn", resultGet.executions().get(0).executionArn());
+ }
+
+ @Test
+ public void sfnGetExecutionHistoryTest() throws Exception {
+
+ mock.expectedMessageCount(1);
+ Exchange exchange = template.request("direct:getExecutionHistory", new Processor() {
+ @Override
+ public void process(Exchange exchange) {
+ exchange.getIn().setHeader(StepFunctions2Constants.OPERATION, StepFunctions2Operations.getExecutionHistory);
+ }
+ });
+
+ MockEndpoint.assertIsSatisfied(context);
+
+ GetExecutionHistoryResponse resultGet = (GetExecutionHistoryResponse) exchange.getIn().getBody();
+ assertEquals(1, resultGet.events().size());
+ assertEquals(1L, resultGet.events().get(0).id());
+ }
+
+ @Override
+ protected RouteBuilder createRouteBuilder() {
+ return new RouteBuilder() {
+ @Override
+ public void configure() {
+ from("direct:createActivity")
+ .to("aws2-step-functions://test?awsSfnClient=#awsSfnClient&operation=createActivity")
+ .to("mock:result");
+ from("direct:createPojoActivity")
+ .to("aws2-step-functions://test?awsSfnClient=#awsSfnClient&operation=createActivity&pojoRequest=true")
+ .to("mock:result");
+ from("direct:createStateMachine")
+ .to("aws2-step-functions://test?awsSfnClient=#awsSfnClient&operation=createStateMachine")
+ .to("mock:result");
+ from("direct:deleteStateMachine")
+ .to("aws2-step-functions://test?awsSfnClient=#awsSfnClient&operation=deleteStateMachine")
+ .to("mock:result");
+ from("direct:updateStateMachine")
+ .to("aws2-step-functions://test?awsSfnClient=#awsSfnClient&operation=updateStateMachine")
+ .to("mock:result");
+ from("direct:listStateMachines")
+ .to("aws2-step-functions://test?awsSfnClient=#awsSfnClient&operation=listStateMachines")
+ .to("mock:result");
+ from("direct:deleteActivity")
+ .to("aws2-step-functions://test?awsSfnClient=#awsSfnClient&operation=deleteActivity")
+ .to("mock:result");
+ from("direct:describeActivity")
+ .to("aws2-step-functions://test?awsSfnClient=#awsSfnClient&operation=describeActivity")
+ .to("mock:result");
+ from("direct:getActivityTask")
+ .to("aws2-step-functions://test?awsSfnClient=#awsSfnClient&operation=getActivityTask")
+ .to("mock:result");
+ from("direct:listActivities")
+ .to("aws2-step-functions://test?awsSfnClient=#awsSfnClient&operation=listActivities")
+ .to("mock:result");
+ from("direct:startExecution")
+ .to("aws2-step-functions://test?awsSfnClient=#awsSfnClient&operation=startExecution")
+ .to("mock:result");
+ from("direct:startSyncExecution")
+ .to("aws2-step-functions://test?awsSfnClient=#awsSfnClient&operation=startSyncExecution")
+ .to("mock:result");
+ from("direct:stopExecution").to("aws2-step-functions://test?awsSfnClient=#awsSfnClient&operation=stopExecution")
+ .to("mock:result");
+ from("direct:describeExecution")
+ .to("aws2-step-functions://test?awsSfnClient=#awsSfnClient&operation=describeExecution")
+ .to("mock:result");
+ from("direct:listExecutions")
+ .to("aws2-step-functions://test?awsSfnClient=#awsSfnClient&operation=listExecutions")
+ .to("mock:result");
+ from("direct:getExecutionHistory")
+ .to("aws2-step-functions://test?awsSfnClient=#awsSfnClient&operation=getExecutionHistory")
+ .to("mock:result");
+ from("direct:describeStateMachine")
+ .to("aws2-step-functions://test?awsSfnClient=#awsSfnClient&operation=describeStateMachine")
+ .to("mock:result");
+ }
+ };
+ }
+}
diff --git a/components/camel-aws/camel-aws2-step-functions/src/test/resources/log4j2.properties b/components/camel-aws/camel-aws2-step-functions/src/test/resources/log4j2.properties
new file mode 100644
index 0000000000000..1d68055c3854a
--- /dev/null
+++ b/components/camel-aws/camel-aws2-step-functions/src/test/resources/log4j2.properties
@@ -0,0 +1,28 @@
+## ---------------------------------------------------------------------------
+## 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.
+## ---------------------------------------------------------------------------
+
+appender.file.type = File
+appender.file.name = file
+appender.file.fileName = target/camel-aws2-step-functions-test.log
+appender.file.layout.type = PatternLayout
+appender.file.layout.pattern = %d [%-15.15t] %-5p %-30.30c{1} - %m%n
+appender.out.type = Console
+appender.out.name = out
+appender.out.layout.type = PatternLayout
+appender.out.layout.pattern = %d [%-15.15t] %-5p %-30.30c{1} - %m%n
+rootLogger.level = INFO
+rootLogger.appenderRef.file.ref = file
diff --git a/components/camel-aws/camel-aws2-step-functions/src/test/resources/org/apache/camel/component/aws2/stepfunctions/StepFunctionsComponentSpringTest-context.xml b/components/camel-aws/camel-aws2-step-functions/src/test/resources/org/apache/camel/component/aws2/stepfunctions/StepFunctionsComponentSpringTest-context.xml
new file mode 100644
index 0000000000000..127da848b5c60
--- /dev/null
+++ b/components/camel-aws/camel-aws2-step-functions/src/test/resources/org/apache/camel/component/aws2/stepfunctions/StepFunctionsComponentSpringTest-context.xml
@@ -0,0 +1,115 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/components/camel-aws/pom.xml b/components/camel-aws/pom.xml
index c3d238d4d4a93..b373de81af447 100644
--- a/components/camel-aws/pom.xml
+++ b/components/camel-aws/pom.xml
@@ -58,6 +58,7 @@
camel-aws2-ses
camel-aws2-sns
camel-aws2-sqs
+ camel-aws2-step-functions
camel-aws2-sts
camel-aws2-translate
camel-aws-xray
diff --git a/core/camel-main/src/generated/resources/org/apache/camel/main/components.properties b/core/camel-main/src/generated/resources/org/apache/camel/main/components.properties
index d7ffb4523578b..75a7ac2930bb0 100644
--- a/core/camel-main/src/generated/resources/org/apache/camel/main/components.properties
+++ b/core/camel-main/src/generated/resources/org/apache/camel/main/components.properties
@@ -27,6 +27,7 @@ aws2-s3
aws2-ses
aws2-sns
aws2-sqs
+aws2-step-functions
aws2-sts
aws2-translate
azure-cosmosdb
diff --git a/docs/components/modules/ROOT/examples/json/aws2-step-functions.json b/docs/components/modules/ROOT/examples/json/aws2-step-functions.json
new file mode 120000
index 0000000000000..e2cd260e543f6
--- /dev/null
+++ b/docs/components/modules/ROOT/examples/json/aws2-step-functions.json
@@ -0,0 +1 @@
+../../../../../../components/camel-aws/camel-aws2-step-functions/src/generated/resources/org/apache/camel/component/aws2/stepfunctions/aws2-step-functions.json
\ No newline at end of file
diff --git a/docs/components/modules/ROOT/nav.adoc b/docs/components/modules/ROOT/nav.adoc
index cefb086c1f04b..4a42be3934fcd 100644
--- a/docs/components/modules/ROOT/nav.adoc
+++ b/docs/components/modules/ROOT/nav.adoc
@@ -33,6 +33,7 @@
*** xref:aws2-ses-component.adoc[AWS Simple Email Service (SES)]
*** xref:aws2-sns-component.adoc[AWS Simple Notification System (SNS)]
*** xref:aws2-sqs-component.adoc[AWS Simple Queue Service (SQS)]
+*** xref:aws2-step-functions-component.adoc[AWS StepFunctions]
*** xref:aws2-translate-component.adoc[AWS Translate]
** xref:azure-summary.adoc[Azure]
*** xref:azure-cosmosdb-component.adoc[Azure CosmosDB]
diff --git a/docs/components/modules/ROOT/pages/aws2-step-functions-component.adoc b/docs/components/modules/ROOT/pages/aws2-step-functions-component.adoc
new file mode 120000
index 0000000000000..bd70d4aa408c5
--- /dev/null
+++ b/docs/components/modules/ROOT/pages/aws2-step-functions-component.adoc
@@ -0,0 +1 @@
+../../../../../components/camel-aws/camel-aws2-step-functions/src/main/docs/aws2-step-functions-component.adoc
\ No newline at end of file
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 c9473e48dd55d..391422dfcf877 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
@@ -428,6 +428,19 @@ static org.apache.camel.builder.component.dsl.Aws2SnsComponentBuilderFactory.Aws
static org.apache.camel.builder.component.dsl.Aws2SqsComponentBuilderFactory.Aws2SqsComponentBuilder aws2Sqs() {
return org.apache.camel.builder.component.dsl.Aws2SqsComponentBuilderFactory.aws2Sqs();
}
+ /**
+ * AWS StepFunctions (camel-aws2-step-functions)
+ * Manage and invoke AWS Step functions using AWS SDK version 2.x.
+ *
+ * Category: cloud,serverless
+ * Since: 4.0
+ * Maven coordinates: org.apache.camel:camel-aws2-step-functions
+ *
+ * @return the dsl builder
+ */
+ static org.apache.camel.builder.component.dsl.Aws2StepFunctionsComponentBuilderFactory.Aws2StepFunctionsComponentBuilder aws2StepFunctions() {
+ return org.apache.camel.builder.component.dsl.Aws2StepFunctionsComponentBuilderFactory.aws2StepFunctions();
+ }
/**
* AWS Security Token Service (STS) (camel-aws2-sts)
* Manage AWS STS cluster instances using AWS SDK version 2.x.
diff --git a/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/Aws2StepFunctionsComponentBuilderFactory.java b/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/Aws2StepFunctionsComponentBuilderFactory.java
new file mode 100644
index 0000000000000..478a7f834dd85
--- /dev/null
+++ b/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/Aws2StepFunctionsComponentBuilderFactory.java
@@ -0,0 +1,443 @@
+/*
+ * 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.builder.component.dsl;
+
+import javax.annotation.processing.Generated;
+import org.apache.camel.Component;
+import org.apache.camel.builder.component.AbstractComponentBuilder;
+import org.apache.camel.builder.component.ComponentBuilder;
+import org.apache.camel.component.aws2.stepfunctions.StepFunctions2Component;
+
+/**
+ * Manage and invoke AWS Step functions using AWS SDK version 2.x.
+ *
+ * Generated by camel-package-maven-plugin - do not edit this file!
+ */
+@Generated("org.apache.camel.maven.packaging.ComponentDslMojo")
+public interface Aws2StepFunctionsComponentBuilderFactory {
+
+ /**
+ * AWS StepFunctions (camel-aws2-step-functions)
+ * Manage and invoke AWS Step functions using AWS SDK version 2.x.
+ *
+ * Category: cloud,serverless
+ * Since: 4.0
+ * Maven coordinates: org.apache.camel:camel-aws2-step-functions
+ *
+ * @return the dsl builder
+ */
+ static Aws2StepFunctionsComponentBuilder aws2StepFunctions() {
+ return new Aws2StepFunctionsComponentBuilderImpl();
+ }
+
+ /**
+ * Builder for the AWS StepFunctions component.
+ */
+ interface Aws2StepFunctionsComponentBuilder
+ extends
+ ComponentBuilder {
+ /**
+ * Component configuration.
+ *
+ * The option is a:
+ * <code>org.apache.camel.component.aws2.stepfunctions.StepFunctions2Configuration</code> type.
+ *
+ * Group: producer
+ *
+ * @param configuration the value to set
+ * @return the dsl builder
+ */
+ default Aws2StepFunctionsComponentBuilder configuration(
+ org.apache.camel.component.aws2.stepfunctions.StepFunctions2Configuration configuration) {
+ doSetProperty("configuration", configuration);
+ return this;
+ }
+ /**
+ * 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.
+ *
+ * The option is a: <code>boolean</code> type.
+ *
+ * Default: false
+ * Group: producer
+ *
+ * @param lazyStartProducer the value to set
+ * @return the dsl builder
+ */
+ default Aws2StepFunctionsComponentBuilder lazyStartProducer(
+ boolean lazyStartProducer) {
+ doSetProperty("lazyStartProducer", lazyStartProducer);
+ return this;
+ }
+ /**
+ * The operation to perform. It can be listFunctions, getFunction,
+ * createFunction, deleteFunction or invokeFunction.
+ *
+ * The option is a:
+ * <code>org.apache.camel.component.aws2.stepfunctions.StepFunctions2Operations</code> type.
+ *
+ * Group: producer
+ *
+ * @param operation the value to set
+ * @return the dsl builder
+ */
+ default Aws2StepFunctionsComponentBuilder operation(
+ org.apache.camel.component.aws2.stepfunctions.StepFunctions2Operations operation) {
+ doSetProperty("operation", operation);
+ return this;
+ }
+ /**
+ * Set the need for overidding the endpoint. This option needs to be
+ * used in combination with uriEndpointOverride option.
+ *
+ * The option is a: <code>boolean</code> type.
+ *
+ * Default: false
+ * Group: producer
+ *
+ * @param overrideEndpoint the value to set
+ * @return the dsl builder
+ */
+ default Aws2StepFunctionsComponentBuilder overrideEndpoint(
+ boolean overrideEndpoint) {
+ doSetProperty("overrideEndpoint", overrideEndpoint);
+ return this;
+ }
+ /**
+ * If we want to use a POJO request as body or not.
+ *
+ * The option is a: <code>boolean</code> type.
+ *
+ * Default: false
+ * Group: producer
+ *
+ * @param pojoRequest the value to set
+ * @return the dsl builder
+ */
+ default Aws2StepFunctionsComponentBuilder pojoRequest(
+ boolean pojoRequest) {
+ doSetProperty("pojoRequest", pojoRequest);
+ return this;
+ }
+ /**
+ * If using a profile credentials provider this parameter will set the
+ * profile name.
+ *
+ * The option is a: <code>java.lang.String</code> type.
+ *
+ * Group: producer
+ *
+ * @param profileCredentialsName the value to set
+ * @return the dsl builder
+ */
+ default Aws2StepFunctionsComponentBuilder profileCredentialsName(
+ java.lang.String profileCredentialsName) {
+ doSetProperty("profileCredentialsName", profileCredentialsName);
+ return this;
+ }
+ /**
+ * The region in which StepFunctions 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().
+ *
+ * The option is a: <code>java.lang.String</code> type.
+ *
+ * Group: producer
+ *
+ * @param region the value to set
+ * @return the dsl builder
+ */
+ default Aws2StepFunctionsComponentBuilder region(java.lang.String region) {
+ doSetProperty("region", region);
+ return this;
+ }
+ /**
+ * If we want to trust all certificates in case of overriding the
+ * endpoint.
+ *
+ * The option is a: <code>boolean</code> type.
+ *
+ * Default: false
+ * Group: producer
+ *
+ * @param trustAllCertificates the value to set
+ * @return the dsl builder
+ */
+ default Aws2StepFunctionsComponentBuilder trustAllCertificates(
+ boolean trustAllCertificates) {
+ doSetProperty("trustAllCertificates", trustAllCertificates);
+ return this;
+ }
+ /**
+ * Set the overriding uri endpoint. This option needs to be used in
+ * combination with overrideEndpoint option.
+ *
+ * The option is a: <code>java.lang.String</code> type.
+ *
+ * Group: producer
+ *
+ * @param uriEndpointOverride the value to set
+ * @return the dsl builder
+ */
+ default Aws2StepFunctionsComponentBuilder uriEndpointOverride(
+ java.lang.String uriEndpointOverride) {
+ doSetProperty("uriEndpointOverride", uriEndpointOverride);
+ return this;
+ }
+ /**
+ * Set whether the StepFunctions client should expect to load
+ * credentials through a default credentials provider or to expect
+ * static credentials to be passed in.
+ *
+ * The option is a: <code>boolean</code> type.
+ *
+ * Default: false
+ * Group: producer
+ *
+ * @param useDefaultCredentialsProvider the value to set
+ * @return the dsl builder
+ */
+ default Aws2StepFunctionsComponentBuilder useDefaultCredentialsProvider(
+ boolean useDefaultCredentialsProvider) {
+ doSetProperty("useDefaultCredentialsProvider", useDefaultCredentialsProvider);
+ return this;
+ }
+ /**
+ * Set whether the StepFunctions client should expect to load
+ * credentials through a profile credentials provider.
+ *
+ * The option is a: <code>boolean</code> type.
+ *
+ * Default: false
+ * Group: producer
+ *
+ * @param useProfileCredentialsProvider the value to set
+ * @return the dsl builder
+ */
+ default Aws2StepFunctionsComponentBuilder useProfileCredentialsProvider(
+ boolean useProfileCredentialsProvider) {
+ doSetProperty("useProfileCredentialsProvider", useProfileCredentialsProvider);
+ return this;
+ }
+ /**
+ * 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.
+ *
+ * The option is a: <code>boolean</code> type.
+ *
+ * Default: true
+ * Group: advanced
+ *
+ * @param autowiredEnabled the value to set
+ * @return the dsl builder
+ */
+ default Aws2StepFunctionsComponentBuilder autowiredEnabled(
+ boolean autowiredEnabled) {
+ doSetProperty("autowiredEnabled", autowiredEnabled);
+ return this;
+ }
+ /**
+ * To use a existing configured AwsStepFunctionsClient as client.
+ *
+ * The option is a:
+ * <code>software.amazon.awssdk.services.sfn.SfnClient</code> type.
+ *
+ * Group: advanced
+ *
+ * @param awsSfnClient the value to set
+ * @return the dsl builder
+ */
+ default Aws2StepFunctionsComponentBuilder awsSfnClient(
+ software.amazon.awssdk.services.sfn.SfnClient awsSfnClient) {
+ doSetProperty("awsSfnClient", awsSfnClient);
+ return this;
+ }
+ /**
+ * Used for enabling or disabling all consumer based health checks from
+ * this component.
+ *
+ * The option is a: <code>boolean</code> type.
+ *
+ * Default: true
+ * Group: health
+ *
+ * @param healthCheckConsumerEnabled the value to set
+ * @return the dsl builder
+ */
+ default Aws2StepFunctionsComponentBuilder healthCheckConsumerEnabled(
+ boolean healthCheckConsumerEnabled) {
+ doSetProperty("healthCheckConsumerEnabled", healthCheckConsumerEnabled);
+ return this;
+ }
+ /**
+ * Used for enabling or disabling all producer based health checks from
+ * this component. Notice: Camel has by default disabled all producer
+ * based health-checks. You can turn on producer checks globally by
+ * setting camel.health.producersEnabled=true.
+ *
+ * The option is a: <code>boolean</code> type.
+ *
+ * Default: true
+ * Group: health
+ *
+ * @param healthCheckProducerEnabled the value to set
+ * @return the dsl builder
+ */
+ default Aws2StepFunctionsComponentBuilder healthCheckProducerEnabled(
+ boolean healthCheckProducerEnabled) {
+ doSetProperty("healthCheckProducerEnabled", healthCheckProducerEnabled);
+ return this;
+ }
+ /**
+ * To define a proxy host when instantiating the StepFunctions client.
+ *
+ * The option is a: <code>java.lang.String</code> type.
+ *
+ * Group: proxy
+ *
+ * @param proxyHost the value to set
+ * @return the dsl builder
+ */
+ default Aws2StepFunctionsComponentBuilder proxyHost(
+ java.lang.String proxyHost) {
+ doSetProperty("proxyHost", proxyHost);
+ return this;
+ }
+ /**
+ * To define a proxy port when instantiating the StepFunctions client.
+ *
+ * The option is a: <code>java.lang.Integer</code> type.
+ *
+ * Group: proxy
+ *
+ * @param proxyPort the value to set
+ * @return the dsl builder
+ */
+ default Aws2StepFunctionsComponentBuilder proxyPort(
+ java.lang.Integer proxyPort) {
+ doSetProperty("proxyPort", proxyPort);
+ return this;
+ }
+ /**
+ * To define a proxy protocol when instantiating the StepFunctions
+ * client.
+ *
+ * The option is a:
+ * <code>software.amazon.awssdk.core.Protocol</code> type.
+ *
+ * Default: HTTPS
+ * Group: proxy
+ *
+ * @param proxyProtocol the value to set
+ * @return the dsl builder
+ */
+ default Aws2StepFunctionsComponentBuilder proxyProtocol(
+ software.amazon.awssdk.core.Protocol proxyProtocol) {
+ doSetProperty("proxyProtocol", proxyProtocol);
+ return this;
+ }
+ /**
+ * Amazon AWS Access Key.
+ *
+ * The option is a: <code>java.lang.String</code> type.
+ *
+ * Group: security
+ *
+ * @param accessKey the value to set
+ * @return the dsl builder
+ */
+ default Aws2StepFunctionsComponentBuilder accessKey(
+ java.lang.String accessKey) {
+ doSetProperty("accessKey", accessKey);
+ return this;
+ }
+ /**
+ * Amazon AWS Secret Key.
+ *
+ * The option is a: <code>java.lang.String</code> type.
+ *
+ * Group: security
+ *
+ * @param secretKey the value to set
+ * @return the dsl builder
+ */
+ default Aws2StepFunctionsComponentBuilder secretKey(
+ java.lang.String secretKey) {
+ doSetProperty("secretKey", secretKey);
+ return this;
+ }
+ }
+
+ class Aws2StepFunctionsComponentBuilderImpl
+ extends
+ AbstractComponentBuilder
+ implements
+ Aws2StepFunctionsComponentBuilder {
+ @Override
+ protected StepFunctions2Component buildConcreteComponent() {
+ return new StepFunctions2Component();
+ }
+ private org.apache.camel.component.aws2.stepfunctions.StepFunctions2Configuration getOrCreateConfiguration(
+ org.apache.camel.component.aws2.stepfunctions.StepFunctions2Component component) {
+ if (component.getConfiguration() == null) {
+ component.setConfiguration(new org.apache.camel.component.aws2.stepfunctions.StepFunctions2Configuration());
+ }
+ return component.getConfiguration();
+ }
+ @Override
+ protected boolean setPropertyOnComponent(
+ Component component,
+ String name,
+ Object value) {
+ switch (name) {
+ case "configuration": ((StepFunctions2Component) component).setConfiguration((org.apache.camel.component.aws2.stepfunctions.StepFunctions2Configuration) value); return true;
+ case "lazyStartProducer": ((StepFunctions2Component) component).setLazyStartProducer((boolean) value); return true;
+ case "operation": getOrCreateConfiguration((StepFunctions2Component) component).setOperation((org.apache.camel.component.aws2.stepfunctions.StepFunctions2Operations) value); return true;
+ case "overrideEndpoint": getOrCreateConfiguration((StepFunctions2Component) component).setOverrideEndpoint((boolean) value); return true;
+ case "pojoRequest": getOrCreateConfiguration((StepFunctions2Component) component).setPojoRequest((boolean) value); return true;
+ case "profileCredentialsName": getOrCreateConfiguration((StepFunctions2Component) component).setProfileCredentialsName((java.lang.String) value); return true;
+ case "region": getOrCreateConfiguration((StepFunctions2Component) component).setRegion((java.lang.String) value); return true;
+ case "trustAllCertificates": getOrCreateConfiguration((StepFunctions2Component) component).setTrustAllCertificates((boolean) value); return true;
+ case "uriEndpointOverride": getOrCreateConfiguration((StepFunctions2Component) component).setUriEndpointOverride((java.lang.String) value); return true;
+ case "useDefaultCredentialsProvider": getOrCreateConfiguration((StepFunctions2Component) component).setUseDefaultCredentialsProvider((boolean) value); return true;
+ case "useProfileCredentialsProvider": getOrCreateConfiguration((StepFunctions2Component) component).setUseProfileCredentialsProvider((boolean) value); return true;
+ case "autowiredEnabled": ((StepFunctions2Component) component).setAutowiredEnabled((boolean) value); return true;
+ case "awsSfnClient": getOrCreateConfiguration((StepFunctions2Component) component).setAwsSfnClient((software.amazon.awssdk.services.sfn.SfnClient) value); return true;
+ case "healthCheckConsumerEnabled": ((StepFunctions2Component) component).setHealthCheckConsumerEnabled((boolean) value); return true;
+ case "healthCheckProducerEnabled": ((StepFunctions2Component) component).setHealthCheckProducerEnabled((boolean) value); return true;
+ case "proxyHost": getOrCreateConfiguration((StepFunctions2Component) component).setProxyHost((java.lang.String) value); return true;
+ case "proxyPort": getOrCreateConfiguration((StepFunctions2Component) component).setProxyPort((java.lang.Integer) value); return true;
+ case "proxyProtocol": getOrCreateConfiguration((StepFunctions2Component) component).setProxyProtocol((software.amazon.awssdk.core.Protocol) value); return true;
+ case "accessKey": getOrCreateConfiguration((StepFunctions2Component) component).setAccessKey((java.lang.String) value); return true;
+ case "secretKey": getOrCreateConfiguration((StepFunctions2Component) component).setSecretKey((java.lang.String) value); return true;
+ default: return false;
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/dsl/camel-componentdsl/src/generated/resources/metadata.json b/dsl/camel-componentdsl/src/generated/resources/metadata.json
index 9406f52dbb9e5..370d782b0a833 100644
--- a/dsl/camel-componentdsl/src/generated/resources/metadata.json
+++ b/dsl/camel-componentdsl/src/generated/resources/metadata.json
@@ -596,6 +596,28 @@
"producerOnly": false,
"lenientProperties": false
},
+ "Aws2StepFunctionsComponentBuilderFactory": {
+ "kind": "component",
+ "name": "aws2-step-functions",
+ "title": "AWS StepFunctions",
+ "description": "Manage and invoke AWS Step functions using AWS SDK version 2.x.",
+ "deprecated": false,
+ "firstVersion": "4.0.0",
+ "label": "cloud,serverless",
+ "javaType": "org.apache.camel.component.aws2.stepfunctions.StepFunctions2Component",
+ "supportLevel": "Preview",
+ "groupId": "org.apache.camel",
+ "artifactId": "camel-aws2-step-functions",
+ "version": "4.0.0-SNAPSHOT",
+ "scheme": "aws2-step-functions",
+ "extendsScheme": "",
+ "syntax": "aws2-step-functions:label",
+ "async": false,
+ "api": false,
+ "consumerOnly": false,
+ "producerOnly": true,
+ "lenientProperties": false
+ },
"Aws2StsComponentBuilderFactory": {
"kind": "component",
"name": "aws2-sts",
diff --git a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/EndpointBuilderFactory.java b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/EndpointBuilderFactory.java
index cf13b4f992ea3..f09034f5f87d0 100644
--- a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/EndpointBuilderFactory.java
+++ b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/EndpointBuilderFactory.java
@@ -302,6 +302,7 @@ public interface EndpointBuilderFactory
org.apache.camel.builder.endpoint.dsl.Sqs2EndpointBuilderFactory.Sqs2Builders,
org.apache.camel.builder.endpoint.dsl.SshEndpointBuilderFactory.SshBuilders,
org.apache.camel.builder.endpoint.dsl.StAXEndpointBuilderFactory.StAXBuilders,
+ org.apache.camel.builder.endpoint.dsl.StepFunctions2EndpointBuilderFactory.StepFunctions2Builders,
org.apache.camel.builder.endpoint.dsl.StitchEndpointBuilderFactory.StitchBuilders,
org.apache.camel.builder.endpoint.dsl.StompEndpointBuilderFactory.StompBuilders,
org.apache.camel.builder.endpoint.dsl.StreamEndpointBuilderFactory.StreamBuilders,
diff --git a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/EndpointBuilders.java b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/EndpointBuilders.java
index f8aeb2d08c6f9..ae14a8f4e33f2 100644
--- a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/EndpointBuilders.java
+++ b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/EndpointBuilders.java
@@ -299,6 +299,7 @@ public interface EndpointBuilders
org.apache.camel.builder.endpoint.dsl.Sqs2EndpointBuilderFactory,
org.apache.camel.builder.endpoint.dsl.SshEndpointBuilderFactory,
org.apache.camel.builder.endpoint.dsl.StAXEndpointBuilderFactory,
+ org.apache.camel.builder.endpoint.dsl.StepFunctions2EndpointBuilderFactory,
org.apache.camel.builder.endpoint.dsl.StitchEndpointBuilderFactory,
org.apache.camel.builder.endpoint.dsl.StompEndpointBuilderFactory,
org.apache.camel.builder.endpoint.dsl.StreamEndpointBuilderFactory,
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 e76783d3163b7..551679cf7f9f2 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
@@ -1253,6 +1253,49 @@ public static org.apache.camel.builder.endpoint.dsl.Sqs2EndpointBuilderFactory.S
String path) {
return org.apache.camel.builder.endpoint.dsl.Sqs2EndpointBuilderFactory.endpointBuilder(componentName, path);
}
+ /**
+ * AWS StepFunctions (camel-aws2-step-functions)
+ * Manage and invoke AWS Step functions using AWS SDK version 2.x.
+ *
+ * Category: cloud,serverless
+ * Since: 4.0
+ * Maven coordinates: org.apache.camel:camel-aws2-step-functions
+ *
+ * Syntax: aws2-step-functions:label
+ *
+ * Path parameter: label (required)
+ * Logical name
+ *
+ * @param path label
+ * @return the dsl builder
+ */
+ public static org.apache.camel.builder.endpoint.dsl.StepFunctions2EndpointBuilderFactory.StepFunctions2EndpointBuilder aws2StepFunctions(
+ String path) {
+ return org.apache.camel.builder.endpoint.dsl.StepFunctions2EndpointBuilderFactory.endpointBuilder("aws2-step-functions", path);
+ }
+ /**
+ * AWS StepFunctions (camel-aws2-step-functions)
+ * Manage and invoke AWS Step functions using AWS SDK version 2.x.
+ *
+ * Category: cloud,serverless
+ * Since: 4.0
+ * Maven coordinates: org.apache.camel:camel-aws2-step-functions
+ *
+ * Syntax: aws2-step-functions:label
+ *
+ * Path parameter: label (required)
+ * Logical name
+ *
+ * @param componentName to use a custom component name for the endpoint
+ * instead of the default name
+ * @param path label
+ * @return the dsl builder
+ */
+ public static org.apache.camel.builder.endpoint.dsl.StepFunctions2EndpointBuilderFactory.StepFunctions2EndpointBuilder aws2StepFunctions(
+ String componentName,
+ String path) {
+ return org.apache.camel.builder.endpoint.dsl.StepFunctions2EndpointBuilderFactory.endpointBuilder(componentName, path);
+ }
/**
* AWS Security Token Service (STS) (camel-aws2-sts)
* Manage AWS STS cluster instances using AWS SDK version 2.x.
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
new file mode 100644
index 0000000000000..3030ff52f08d6
--- /dev/null
+++ b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/StepFunctions2EndpointBuilderFactory.java
@@ -0,0 +1,830 @@
+/*
+ * 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.builder.endpoint.dsl;
+
+import java.util.*;
+import java.util.concurrent.*;
+import java.util.function.*;
+import java.util.stream.*;
+import javax.annotation.processing.Generated;
+import org.apache.camel.builder.EndpointConsumerBuilder;
+import org.apache.camel.builder.EndpointProducerBuilder;
+import org.apache.camel.builder.endpoint.AbstractEndpointBuilder;
+
+/**
+ * Manage and invoke AWS Step functions using AWS SDK version 2.x.
+ *
+ * Generated by camel build tools - do NOT edit this file!
+ */
+@Generated("org.apache.camel.maven.packaging.EndpointDslMojo")
+public interface StepFunctions2EndpointBuilderFactory {
+
+
+ /**
+ * Builder for endpoint for the AWS StepFunctions component.
+ */
+ public interface StepFunctions2EndpointBuilder
+ extends
+ EndpointProducerBuilder {
+ default AdvancedStepFunctions2EndpointBuilder advanced() {
+ return (AdvancedStepFunctions2EndpointBuilder) this;
+ }
+ /**
+ * The operation to perform. It can be listFunctions, getFunction,
+ * createFunction, deleteFunction or invokeFunction.
+ *
+ * The option is a:
+ * <code>org.apache.camel.component.aws2.stepfunctions.StepFunctions2Operations</code> type.
+ *
+ * Required: true
+ * Group: producer
+ *
+ * @param operation the value to set
+ * @return the dsl builder
+ */
+ default StepFunctions2EndpointBuilder operation(
+ org.apache.camel.component.aws2.stepfunctions.StepFunctions2Operations operation) {
+ doSetProperty("operation", operation);
+ return this;
+ }
+ /**
+ * The operation to perform. It can be listFunctions, getFunction,
+ * createFunction, deleteFunction or invokeFunction.
+ *
+ * The option will be converted to a
+ * <code>org.apache.camel.component.aws2.stepfunctions.StepFunctions2Operations</code> type.
+ *
+ * Required: true
+ * Group: producer
+ *
+ * @param operation the value to set
+ * @return the dsl builder
+ */
+ default StepFunctions2EndpointBuilder operation(String operation) {
+ doSetProperty("operation", operation);
+ return this;
+ }
+ /**
+ * Set the need for overidding the endpoint. This option needs to be
+ * used in combination with uriEndpointOverride option.
+ *
+ * The option is a: <code>boolean</code> type.
+ *
+ * Default: false
+ * Group: producer
+ *
+ * @param overrideEndpoint the value to set
+ * @return the dsl builder
+ */
+ default StepFunctions2EndpointBuilder overrideEndpoint(
+ boolean overrideEndpoint) {
+ doSetProperty("overrideEndpoint", overrideEndpoint);
+ return this;
+ }
+ /**
+ * Set the need for overidding the endpoint. This option needs to be
+ * used in combination with uriEndpointOverride option.
+ *
+ * The option will be converted to a <code>boolean</code>
+ * type.
+ *
+ * Default: false
+ * Group: producer
+ *
+ * @param overrideEndpoint the value to set
+ * @return the dsl builder
+ */
+ default StepFunctions2EndpointBuilder overrideEndpoint(
+ String overrideEndpoint) {
+ doSetProperty("overrideEndpoint", overrideEndpoint);
+ return this;
+ }
+ /**
+ * If we want to use a POJO request as body or not.
+ *
+ * The option is a: <code>boolean</code> type.
+ *
+ * Default: false
+ * Group: producer
+ *
+ * @param pojoRequest the value to set
+ * @return the dsl builder
+ */
+ default StepFunctions2EndpointBuilder pojoRequest(boolean pojoRequest) {
+ doSetProperty("pojoRequest", pojoRequest);
+ return this;
+ }
+ /**
+ * If we want to use a POJO request as body or not.
+ *
+ * The option will be converted to a <code>boolean</code>
+ * type.
+ *
+ * Default: false
+ * Group: producer
+ *
+ * @param pojoRequest the value to set
+ * @return the dsl builder
+ */
+ default StepFunctions2EndpointBuilder pojoRequest(String pojoRequest) {
+ doSetProperty("pojoRequest", pojoRequest);
+ return this;
+ }
+ /**
+ * If using a profile credentials provider this parameter will set the
+ * profile name.
+ *
+ * The option is a: <code>java.lang.String</code> type.
+ *
+ * Group: producer
+ *
+ * @param profileCredentialsName the value to set
+ * @return the dsl builder
+ */
+ default StepFunctions2EndpointBuilder profileCredentialsName(
+ String profileCredentialsName) {
+ doSetProperty("profileCredentialsName", profileCredentialsName);
+ return this;
+ }
+ /**
+ * The region in which StepFunctions 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().
+ *
+ * The option is a: <code>java.lang.String</code> type.
+ *
+ * Group: producer
+ *
+ * @param region the value to set
+ * @return the dsl builder
+ */
+ default StepFunctions2EndpointBuilder region(String region) {
+ doSetProperty("region", region);
+ return this;
+ }
+ /**
+ * If we want to trust all certificates in case of overriding the
+ * endpoint.
+ *
+ * The option is a: <code>boolean</code> type.
+ *
+ * Default: false
+ * Group: producer
+ *
+ * @param trustAllCertificates the value to set
+ * @return the dsl builder
+ */
+ default StepFunctions2EndpointBuilder trustAllCertificates(
+ boolean trustAllCertificates) {
+ doSetProperty("trustAllCertificates", trustAllCertificates);
+ return this;
+ }
+ /**
+ * If we want to trust all certificates in case of overriding the
+ * endpoint.
+ *
+ * The option will be converted to a <code>boolean</code>
+ * type.
+ *
+ * Default: false
+ * Group: producer
+ *
+ * @param trustAllCertificates the value to set
+ * @return the dsl builder
+ */
+ default StepFunctions2EndpointBuilder trustAllCertificates(
+ String trustAllCertificates) {
+ doSetProperty("trustAllCertificates", trustAllCertificates);
+ return this;
+ }
+ /**
+ * Set the overriding uri endpoint. This option needs to be used in
+ * combination with overrideEndpoint option.
+ *
+ * The option is a: <code>java.lang.String</code> type.
+ *
+ * Group: producer
+ *
+ * @param uriEndpointOverride the value to set
+ * @return the dsl builder
+ */
+ default StepFunctions2EndpointBuilder uriEndpointOverride(
+ String uriEndpointOverride) {
+ doSetProperty("uriEndpointOverride", uriEndpointOverride);
+ return this;
+ }
+ /**
+ * Set whether the StepFunctions client should expect to load
+ * credentials through a default credentials provider or to expect
+ * static credentials to be passed in.
+ *
+ * The option is a: <code>boolean</code> type.
+ *
+ * Default: false
+ * Group: producer
+ *
+ * @param useDefaultCredentialsProvider the value to set
+ * @return the dsl builder
+ */
+ default StepFunctions2EndpointBuilder useDefaultCredentialsProvider(
+ boolean useDefaultCredentialsProvider) {
+ doSetProperty("useDefaultCredentialsProvider", useDefaultCredentialsProvider);
+ return this;
+ }
+ /**
+ * Set whether the StepFunctions client should expect to load
+ * credentials through a default credentials provider or to expect
+ * static credentials to be passed in.
+ *
+ * The option will be converted to a <code>boolean</code>
+ * type.
+ *
+ * Default: false
+ * Group: producer
+ *
+ * @param useDefaultCredentialsProvider the value to set
+ * @return the dsl builder
+ */
+ default StepFunctions2EndpointBuilder useDefaultCredentialsProvider(
+ String useDefaultCredentialsProvider) {
+ doSetProperty("useDefaultCredentialsProvider", useDefaultCredentialsProvider);
+ return this;
+ }
+ /**
+ * Set whether the StepFunctions client should expect to load
+ * credentials through a profile credentials provider.
+ *
+ * The option is a: <code>boolean</code> type.
+ *
+ * Default: false
+ * Group: producer
+ *
+ * @param useProfileCredentialsProvider the value to set
+ * @return the dsl builder
+ */
+ default StepFunctions2EndpointBuilder useProfileCredentialsProvider(
+ boolean useProfileCredentialsProvider) {
+ doSetProperty("useProfileCredentialsProvider", useProfileCredentialsProvider);
+ return this;
+ }
+ /**
+ * Set whether the StepFunctions client should expect to load
+ * credentials through a profile credentials provider.
+ *
+ * The option will be converted to a <code>boolean</code>
+ * type.
+ *
+ * Default: false
+ * Group: producer
+ *
+ * @param useProfileCredentialsProvider the value to set
+ * @return the dsl builder
+ */
+ default StepFunctions2EndpointBuilder useProfileCredentialsProvider(
+ String useProfileCredentialsProvider) {
+ doSetProperty("useProfileCredentialsProvider", useProfileCredentialsProvider);
+ return this;
+ }
+ /**
+ * To define a proxy host when instantiating the StepFunctions client.
+ *
+ * The option is a: <code>java.lang.String</code> type.
+ *
+ * Group: proxy
+ *
+ * @param proxyHost the value to set
+ * @return the dsl builder
+ */
+ default StepFunctions2EndpointBuilder proxyHost(String proxyHost) {
+ doSetProperty("proxyHost", proxyHost);
+ return this;
+ }
+ /**
+ * To define a proxy port when instantiating the StepFunctions client.
+ *
+ * The option is a: <code>java.lang.Integer</code> type.
+ *
+ * Group: proxy
+ *
+ * @param proxyPort the value to set
+ * @return the dsl builder
+ */
+ default StepFunctions2EndpointBuilder proxyPort(Integer proxyPort) {
+ doSetProperty("proxyPort", proxyPort);
+ return this;
+ }
+ /**
+ * To define a proxy port when instantiating the StepFunctions client.
+ *
+ * The option will be converted to a
+ * <code>java.lang.Integer</code> type.
+ *
+ * Group: proxy
+ *
+ * @param proxyPort the value to set
+ * @return the dsl builder
+ */
+ default StepFunctions2EndpointBuilder proxyPort(String proxyPort) {
+ doSetProperty("proxyPort", proxyPort);
+ return this;
+ }
+ /**
+ * To define a proxy protocol when instantiating the StepFunctions
+ * client.
+ *
+ * The option is a:
+ * <code>software.amazon.awssdk.core.Protocol</code> type.
+ *
+ * Default: HTTPS
+ * Group: proxy
+ *
+ * @param proxyProtocol the value to set
+ * @return the dsl builder
+ */
+ default StepFunctions2EndpointBuilder proxyProtocol(
+ software.amazon.awssdk.core.Protocol proxyProtocol) {
+ doSetProperty("proxyProtocol", proxyProtocol);
+ return this;
+ }
+ /**
+ * To define a proxy protocol when instantiating the StepFunctions
+ * client.
+ *
+ * The option will be converted to a
+ * <code>software.amazon.awssdk.core.Protocol</code> type.
+ *
+ * Default: HTTPS
+ * Group: proxy
+ *
+ * @param proxyProtocol the value to set
+ * @return the dsl builder
+ */
+ default StepFunctions2EndpointBuilder proxyProtocol(String proxyProtocol) {
+ doSetProperty("proxyProtocol", proxyProtocol);
+ return this;
+ }
+ /**
+ * Amazon AWS Access Key.
+ *
+ * The option is a: <code>java.lang.String</code> type.
+ *
+ * Group: security
+ *
+ * @param accessKey the value to set
+ * @return the dsl builder
+ */
+ default StepFunctions2EndpointBuilder accessKey(String accessKey) {
+ doSetProperty("accessKey", accessKey);
+ return this;
+ }
+ /**
+ * Amazon AWS Secret Key.
+ *
+ * The option is a: <code>java.lang.String</code> type.
+ *
+ * Group: security
+ *
+ * @param secretKey the value to set
+ * @return the dsl builder
+ */
+ default StepFunctions2EndpointBuilder secretKey(String secretKey) {
+ doSetProperty("secretKey", secretKey);
+ return this;
+ }
+ }
+
+ /**
+ * Advanced builder for endpoint for the AWS StepFunctions component.
+ */
+ public interface AdvancedStepFunctions2EndpointBuilder
+ extends
+ EndpointProducerBuilder {
+ default StepFunctions2EndpointBuilder basic() {
+ return (StepFunctions2EndpointBuilder) this;
+ }
+ /**
+ * 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.
+ *
+ * The option is a: <code>boolean</code> type.
+ *
+ * Default: false
+ * Group: producer (advanced)
+ *
+ * @param lazyStartProducer the value to set
+ * @return the dsl builder
+ */
+ default AdvancedStepFunctions2EndpointBuilder lazyStartProducer(
+ boolean lazyStartProducer) {
+ doSetProperty("lazyStartProducer", lazyStartProducer);
+ return this;
+ }
+ /**
+ * 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.
+ *
+ * The option will be converted to a <code>boolean</code>
+ * type.
+ *
+ * Default: false
+ * Group: producer (advanced)
+ *
+ * @param lazyStartProducer the value to set
+ * @return the dsl builder
+ */
+ default AdvancedStepFunctions2EndpointBuilder lazyStartProducer(
+ String lazyStartProducer) {
+ doSetProperty("lazyStartProducer", lazyStartProducer);
+ return this;
+ }
+ /**
+ * To use a existing configured AwsStepFunctionsClient as client.
+ *
+ * The option is a:
+ * <code>software.amazon.awssdk.services.sfn.SfnClient</code> type.
+ *
+ * Group: advanced
+ *
+ * @param awsSfnClient the value to set
+ * @return the dsl builder
+ */
+ default AdvancedStepFunctions2EndpointBuilder awsSfnClient(
+ software.amazon.awssdk.services.sfn.SfnClient awsSfnClient) {
+ doSetProperty("awsSfnClient", awsSfnClient);
+ return this;
+ }
+ /**
+ * To use a existing configured AwsStepFunctionsClient as client.
+ *
+ * The option will be converted to a
+ * <code>software.amazon.awssdk.services.sfn.SfnClient</code> type.
+ *
+ * Group: advanced
+ *
+ * @param awsSfnClient the value to set
+ * @return the dsl builder
+ */
+ default AdvancedStepFunctions2EndpointBuilder awsSfnClient(
+ String awsSfnClient) {
+ doSetProperty("awsSfnClient", awsSfnClient);
+ return this;
+ }
+ }
+
+ public interface StepFunctions2Builders {
+ /**
+ * AWS StepFunctions (camel-aws2-step-functions)
+ * Manage and invoke AWS Step functions using AWS SDK version 2.x.
+ *
+ * Category: cloud,serverless
+ * Since: 4.0
+ * Maven coordinates: org.apache.camel:camel-aws2-step-functions
+ *
+ * @return the dsl builder for the headers' name.
+ */
+ default StepFunctions2HeaderNameBuilder aws2StepFunctions() {
+ return StepFunctions2HeaderNameBuilder.INSTANCE;
+ }
+ /**
+ * AWS StepFunctions (camel-aws2-step-functions)
+ * Manage and invoke AWS Step functions using AWS SDK version 2.x.
+ *
+ * Category: cloud,serverless
+ * Since: 4.0
+ * Maven coordinates: org.apache.camel:camel-aws2-step-functions
+ *
+ * Syntax: aws2-step-functions:label
+ *
+ * Path parameter: label (required)
+ * Logical name
+ *
+ * @param path label
+ * @return the dsl builder
+ */
+ default StepFunctions2EndpointBuilder aws2StepFunctions(String path) {
+ return StepFunctions2EndpointBuilderFactory.endpointBuilder("aws2-step-functions", path);
+ }
+ /**
+ * AWS StepFunctions (camel-aws2-step-functions)
+ * Manage and invoke AWS Step functions using AWS SDK version 2.x.
+ *
+ * Category: cloud,serverless
+ * Since: 4.0
+ * Maven coordinates: org.apache.camel:camel-aws2-step-functions
+ *
+ * Syntax: aws2-step-functions:label
+ *
+ * Path parameter: label (required)
+ * Logical name
+ *
+ * @param componentName to use a custom component name for the endpoint
+ * instead of the default name
+ * @param path label
+ * @return the dsl builder
+ */
+ default StepFunctions2EndpointBuilder aws2StepFunctions(
+ String componentName,
+ String path) {
+ return StepFunctions2EndpointBuilderFactory.endpointBuilder(componentName, path);
+ }
+ }
+
+ /**
+ * The builder of headers' name for the AWS StepFunctions component.
+ */
+ public static class StepFunctions2HeaderNameBuilder {
+ /**
+ * The internal instance of the builder used to access to all the
+ * methods representing the name of headers.
+ */
+ private static final StepFunctions2HeaderNameBuilder INSTANCE = new StepFunctions2HeaderNameBuilder();
+
+ /**
+ * The operation we want to perform.
+ *
+ * The option is a: {@code String} type.
+ *
+ * Group: producer
+ *
+ * @return the name of the header {@code AwsStateMachineOperation}.
+ */
+ public String awsStateMachineOperation() {
+ return "AwsStateMachineOperation";
+ }
+
+ /**
+ * The name of the state machine.
+ *
+ * The option is a: {@code String} type.
+ *
+ * Group: producer
+ *
+ * @return the name of the header {@code
+ * AwsStepFunctionsStateMachineName}.
+ */
+ public String awsStepFunctionsStateMachineName() {
+ return "AwsStepFunctionsStateMachineName";
+ }
+
+ /**
+ * The Amazon States Language definition of the state machine.
+ *
+ * The option is a: {@code String} type.
+ *
+ * Group: producer
+ *
+ * @return the name of the header {@code
+ * AwsStepFunctionsStateMachineDefinition}.
+ */
+ public String awsStepFunctionsStateMachineDefinition() {
+ return "AwsStepFunctionsStateMachineDefinition";
+ }
+
+ /**
+ * Determines whether a Standard or Express state machine is created.
+ *
+ * The option is a: {@code String} type.
+ *
+ * Group: producer
+ *
+ * @return the name of the header {@code
+ * AwsStepFunctionsStateMachineType}.
+ */
+ public String awsStepFunctionsStateMachineType() {
+ return "AwsStepFunctionsStateMachineType";
+ }
+
+ /**
+ * The Amazon Resource Name (ARN) of the IAM role to use for this state
+ * machine.
+ *
+ * The option is a: {@code String} type.
+ *
+ * Group: producer
+ *
+ * @return the name of the header {@code
+ * AwsStepFunctionsStateMachineRoleArn}.
+ */
+ public String awsStepFunctionsStateMachineRoleArn() {
+ return "AwsStepFunctionsStateMachineRoleArn";
+ }
+
+ /**
+ * The Amazon Resource Name (ARN) of state machine.
+ *
+ * The option is a: {@code String} type.
+ *
+ * Group: producer
+ *
+ * @return the name of the header {@code
+ * AwsStepFunctionsStateMachineArn}.
+ */
+ public String awsStepFunctionsStateMachineArn() {
+ return "AwsStepFunctionsStateMachineArn";
+ }
+
+ /**
+ * The limit number of results while listing state machines.
+ *
+ * The option is a: {@code Integer} type.
+ *
+ * Group: producer
+ *
+ * @return the name of the header {@code AwsStateMachinesMaxResults}.
+ */
+ public String awsStateMachinesMaxResults() {
+ return "AwsStateMachinesMaxResults";
+ }
+
+ /**
+ * The name of the state machine activity.
+ *
+ * The option is a: {@code String} type.
+ *
+ * Group: producer
+ *
+ * @return the name of the header {@code
+ * AwsStepFunctionsStateMachineActivityName}.
+ */
+ public String awsStepFunctionsStateMachineActivityName() {
+ return "AwsStepFunctionsStateMachineActivityName";
+ }
+
+ /**
+ * The ARN of the state machine activity.
+ *
+ * The option is a: {@code String} type.
+ *
+ * Group: producer
+ *
+ * @return the name of the header {@code
+ * AwsStepFunctionsStateMachineActivityArn}.
+ */
+ public String awsStepFunctionsStateMachineActivityArn() {
+ return "AwsStepFunctionsStateMachineActivityArn";
+ }
+
+ /**
+ * The limit number of results while listing state machines.
+ *
+ * The option is a: {@code Integer} type.
+ *
+ * Group: producer
+ *
+ * @return the name of the header {@code
+ * AwsStateMachineActivitiesMaxResults}.
+ */
+ public String awsStateMachineActivitiesMaxResults() {
+ return "AwsStateMachineActivitiesMaxResults";
+ }
+
+ /**
+ * The Amazon Resource Name (ARN) of the execution.
+ *
+ * The option is a: {@code String} type.
+ *
+ * Group: producer
+ *
+ * @return the name of the header {@code AwsStateMachineExecutionArn}.
+ */
+ public String awsStateMachineExecutionArn() {
+ return "AwsStateMachineExecutionArn";
+ }
+
+ /**
+ * Optional name of the execution.
+ *
+ * The option is a: {@code String} type.
+ *
+ * Group: producer
+ *
+ * @return the name of the header {@code AwsStateMachineExecutionName}.
+ */
+ public String awsStateMachineExecutionName() {
+ return "AwsStateMachineExecutionName";
+ }
+
+ /**
+ * The string that contains the JSON input data for the execution.
+ *
+ * The option is a: {@code String} type.
+ *
+ * Group: producer
+ *
+ * @return the name of the header {@code AwsStateMachineExecutionInput}.
+ */
+ public String awsStateMachineExecutionInput() {
+ return "AwsStateMachineExecutionInput";
+ }
+
+ /**
+ * Passes the X-Ray trace header.
+ *
+ * The option is a: {@code String} type.
+ *
+ * Group: producer
+ *
+ * @return the name of the header {@code
+ * AwsStateMachineExecutionTraceHeader}.
+ */
+ public String awsStateMachineExecutionTraceHeader() {
+ return "AwsStateMachineExecutionTraceHeader";
+ }
+
+ /**
+ * The limit number of results while listing execution history.
+ *
+ * The option is a: {@code Integer} type.
+ *
+ * Group: producer
+ *
+ * @return the name of the header {@code
+ * AwsStateMachineExecutionHistoryMaxResults}.
+ */
+ public String awsStateMachineExecutionHistoryMaxResults() {
+ return "AwsStateMachineExecutionHistoryMaxResults";
+ }
+
+ /**
+ * You can select whether execution data (input or output of a history
+ * event) is returned.
+ *
+ * The option is a: {@code Boolean} type.
+ *
+ * Group: producer
+ *
+ * @return the name of the header {@code
+ * AwsStateMachineExecutionHistoryIncludeExecutionData}.
+ */
+ public String awsStateMachineExecutionHistoryIncludeExecutionData() {
+ return "AwsStateMachineExecutionHistoryIncludeExecutionData";
+ }
+
+ /**
+ * Lists events in descending order of their timeStamp.
+ *
+ * The option is a: {@code Boolean} type.
+ *
+ * Group: producer
+ *
+ * @return the name of the header {@code
+ * AwsStateMachineExecutionHistoryReverseOrder}.
+ */
+ public String awsStateMachineExecutionHistoryReverseOrder() {
+ return "AwsStateMachineExecutionHistoryReverseOrder";
+ }
+
+ /**
+ * The limit number of results while listing executions.
+ *
+ * The option is a: {@code Integer} type.
+ *
+ * Group: producer
+ *
+ * @return the name of the header {@code
+ * AwsStateMachineExecutionMaxResults}.
+ */
+ public String awsStateMachineExecutionMaxResults() {
+ return "AwsStateMachineExecutionMaxResults";
+ }
+ }
+ static StepFunctions2EndpointBuilder endpointBuilder(
+ String componentName,
+ String path) {
+ class StepFunctions2EndpointBuilderImpl extends AbstractEndpointBuilder implements StepFunctions2EndpointBuilder, AdvancedStepFunctions2EndpointBuilder {
+ public StepFunctions2EndpointBuilderImpl(String path) {
+ super(componentName, path);
+ }
+ }
+ return new StepFunctions2EndpointBuilderImpl(path);
+ }
+}
\ No newline at end of file
diff --git a/dsl/camel-kamelet-main/src/generated/resources/camel-component-known-dependencies.properties b/dsl/camel-kamelet-main/src/generated/resources/camel-component-known-dependencies.properties
index d473d9e0d16a2..fa5aca8ff2267 100644
--- a/dsl/camel-kamelet-main/src/generated/resources/camel-component-known-dependencies.properties
+++ b/dsl/camel-kamelet-main/src/generated/resources/camel-component-known-dependencies.properties
@@ -46,6 +46,7 @@ org.apache.camel.component.aws2.s3.AWS2S3Component=camel:aws2-s3
org.apache.camel.component.aws2.ses.Ses2Component=camel:aws2-ses
org.apache.camel.component.aws2.sns.Sns2Component=camel:aws2-sns
org.apache.camel.component.aws2.sqs.Sqs2Component=camel:aws2-sqs
+org.apache.camel.component.aws2.stepfunctions.StepFunctions2Component=camel:aws2-step-functions
org.apache.camel.component.aws2.sts.STS2Component=camel:aws2-sts
org.apache.camel.component.aws2.translate.Translate2Component=camel:aws2-translate
org.apache.camel.component.azure.cosmosdb.CosmosDbComponent=camel:azure-cosmosdb
diff --git a/parent/pom.xml b/parent/pom.xml
index 346aa2b6a1abe..de02ab1d6f197 100644
--- a/parent/pom.xml
+++ b/parent/pom.xml
@@ -814,6 +814,11 @@
camel-aws2-sqs
${project.version}
+
+ org.apache.camel
+ camel-aws2-step-functions
+ ${project.version}
+
org.apache.camel
camel-aws2-sts
diff --git a/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/MojoHelper.java b/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/MojoHelper.java
index b02bdccbc3347..6d0be19d0139a 100644
--- a/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/MojoHelper.java
+++ b/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/MojoHelper.java
@@ -83,7 +83,8 @@ public static List getComponentPath(Path dir) {
dir.resolve("camel-aws2-mq"),
dir.resolve("camel-aws2-msk"), dir.resolve("camel-aws2-s3"), dir.resolve("camel-aws2-ses"),
dir.resolve("camel-aws2-sns"),
- dir.resolve("camel-aws2-sqs"), dir.resolve("camel-aws2-sts"), dir.resolve("camel-aws2-translate"),
+ dir.resolve("camel-aws2-sqs"), dir.resolve("camel-aws2-step-functions"),
+ dir.resolve("camel-aws2-sts"), dir.resolve("camel-aws2-translate"),
dir.resolve("camel-aws-xray"), dir.resolve("camel-aws-secrets-manager"),
dir.resolve("camel-aws-cloudtrail"));
case "camel-vertx":