HttpStepFunctionsIntegrationProps Struct
Properties to initialize HttpStepFunctionsIntegration.
Example
ts
import { HttpStepFunctionsIntegration } from 'aws-cdk-lib/aws-apigatewayv2-integrations';
import * as sfn from 'aws-cdk-lib/aws-stepfunctions';
declare const stateMachine: sfn.StateMachine;
declare const httpApi: apigwv2.HttpApi;
httpApi.addRoutes({
path: '/start',
methods: [ apigwv2.HttpMethod.POST ],
integration: new HttpStepFunctionsIntegration('StartExecutionIntegration', {
stateMachine,
subtype: apigwv2.HttpIntegrationSubtype.STEPFUNCTIONS_START_EXECUTION,
}),
});
httpApi.addRoutes({
path: '/start-sync',
methods: [ apigwv2.HttpMethod.POST ],
integration: new HttpStepFunctionsIntegration('StartSyncExecutionIntegration', {
stateMachine,
subtype: apigwv2.HttpIntegrationSubtype.STEPFUNCTIONS_START_SYNC_EXECUTION,
}),
});
httpApi.addRoutes({
path: '/stop',
methods: [ apigwv2.HttpMethod.POST ],
integration: new HttpStepFunctionsIntegration('StopExecutionIntegration', {
stateMachine,
subtype: apigwv2.HttpIntegrationSubtype.STEPFUNCTIONS_STOP_EXECUTION,
// For the `STOP_EXECUTION` subtype, it is necessary to specify the `executionArn`.
parameterMapping: new apigwv2.ParameterMapping()
.custom('ExecutionArn', '$request.querystring.executionArn'),
}),
});
Properties
parameterMappingoptionalParameterMappingparameter_mappingoptionalParameterMappingparameterMappingoptionalParameterMappingParameterMappingoptionalParameterMappingParameterMappingoptionalParameterMapping#Specifies how to transform HTTP requests before sending them to the backend.
Default: specify only StateMachineArn
When the subtype is either START_EXECUTION or START_SYNC_EXECUTION, it is necessary to specify the StateMachineArn. Conversely, when the subtype is STOP_EXECUTION, the ExecutionArn must be specified.
stateMachineStateMachinestate_machineStateMachinestateMachineStateMachineStateMachineStateMachineStateMachineStateMachinerequired#Statemachine that Integrates with API Gateway.
subtypeoptionalHttpIntegrationSubtypesubtypeoptionalHttpIntegrationSubtypesubtypeoptionalHttpIntegrationSubtypeSubtypeoptionalHttpIntegrationSubtypeSubtypeoptionalHttpIntegrationSubtype#The subtype of the HTTP integration.
Default: HttpIntegrationSubtype.STEPFUNCTIONS_START_EXECUTION
Only subtypes starting with STEPFUNCTIONS_ can be specified.