# HttpStepFunctionsIntegrationProps

Properties to initialize `HttpStepFunctionsIntegration`.

Extends: HttpStepFunctionsIntegrationProps
Used as props by: HttpStepFunctionsIntegration

- Source: [`aws-apigatewayv2-integrations/lib/http/stepfunctions.ts`](https://github.com/aws/aws-cdk/blob/v2.275.0/packages/aws-cdk-lib/aws-apigatewayv2-integrations/lib/http/stepfunctions.ts#L10)
- Type last changed: v2.131.0 · 1 Mar 2024

## 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

- `parameterMapping`: [ParameterMapping](/cdk/api/v2/docs/aws-cdk-lib.aws_apigatewayv2.ParameterMapping.html) — 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.

- `stateMachine`: [StateMachine](/cdk/api/v2/docs/aws-cdk-lib.aws_stepfunctions.StateMachine.html) (required) — Statemachine that Integrates with API Gateway.

- `subtype`: [HttpIntegrationSubtype](/cdk/api/v2/docs/aws-cdk-lib.aws_apigatewayv2.HttpIntegrationSubtype.html) — The subtype of the HTTP integration.

  **Default:** HttpIntegrationSubtype.STEPFUNCTIONS_START_EXECUTION

  Only subtypes starting with STEPFUNCTIONS_ can be specified.
