HttpStepFunctionsIntegrationProps
- class aws_cdk.aws_apigatewayv2_integrations.HttpStepFunctionsIntegrationProps(*, state_machine, parameter_mapping=None, subtype=None)
Bases:
objectProperties to initialize
HttpStepFunctionsIntegration.- Parameters:
state_machine (
StateMachine) – Statemachine that Integrates with API Gateway.parameter_mapping (
Optional[ParameterMapping]) – Specifies how to transform HTTP requests before sending them to the backend. When the subtype is eitherSTART_EXECUTIONorSTART_SYNC_EXECUTION, it is necessary to specify theStateMachineArn. Conversely, when the subtype isSTOP_EXECUTION, theExecutionArnmust be specified. Default: - specify onlyStateMachineArnsubtype (
Optional[HttpIntegrationSubtype]) – The subtype of the HTTP integration. Only subtypes starting with STEPFUNCTIONS_ can be specified. Default: HttpIntegrationSubtype.STEPFUNCTIONS_START_EXECUTION
- ExampleMetadata:
infused
Example:
from aws_cdk.aws_apigatewayv2_integrations import HttpStepFunctionsIntegration import aws_cdk.aws_stepfunctions as sfn # state_machine: sfn.StateMachine # http_api: apigwv2.HttpApi http_api.add_routes( path="/start", methods=[apigwv2.HttpMethod.POST], integration=HttpStepFunctionsIntegration("StartExecutionIntegration", state_machine=state_machine, subtype=apigwv2.HttpIntegrationSubtype.STEPFUNCTIONS_START_EXECUTION ) ) http_api.add_routes( path="/start-sync", methods=[apigwv2.HttpMethod.POST], integration=HttpStepFunctionsIntegration("StartSyncExecutionIntegration", state_machine=state_machine, subtype=apigwv2.HttpIntegrationSubtype.STEPFUNCTIONS_START_SYNC_EXECUTION ) ) http_api.add_routes( path="/stop", methods=[apigwv2.HttpMethod.POST], integration=HttpStepFunctionsIntegration("StopExecutionIntegration", state_machine=state_machine, subtype=apigwv2.HttpIntegrationSubtype.STEPFUNCTIONS_STOP_EXECUTION, # For the `STOP_EXECUTION` subtype, it is necessary to specify the `executionArn`. parameter_mapping=apigwv2.ParameterMapping().custom("ExecutionArn", "$request.querystring.executionArn") ) )
Attributes
- parameter_mapping
Specifies how to transform HTTP requests before sending them to the backend.
When the subtype is either
START_EXECUTIONorSTART_SYNC_EXECUTION, it is necessary to specify theStateMachineArn. Conversely, when the subtype isSTOP_EXECUTION, theExecutionArnmust be specified.- Default:
specify only
StateMachineArn
- See:
- state_machine
Statemachine that Integrates with API Gateway.
- subtype
The subtype of the HTTP integration.
Only subtypes starting with STEPFUNCTIONS_ can be specified.
- Default:
HttpIntegrationSubtype.STEPFUNCTIONS_START_EXECUTION