Skip to content

Commit

Permalink
docs(stepfunctions): integrationPattern update (#29015)
Browse files Browse the repository at this point in the history
### Issue # (if applicable)

Closes #21915 . (Doesn't close it, but solves a point that was mentioned here)

### Reason for this change

The prop is pretty useful, but hasn't received enough documentation from my perspective. This adds documentation to the overview `README` as well it's own jsdoc.

### Description of changes

Added a section for the `integrationPattern` into the README, and updated the jsdoc to include more detailed information.

### Description of how you validated changes

No validation.

### Checklist
- [x] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md)

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
  • Loading branch information
Rizxcviii authored and TheRealAmazonKendra committed Feb 9, 2024
1 parent dec7de0 commit a824566
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 2 deletions.
16 changes: 16 additions & 0 deletions packages/aws-cdk-lib/aws-stepfunctions/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -708,6 +708,22 @@ const submitJob = new tasks.LambdaInvoke(this, 'Submit Job', {
See [the AWS documentation](https://docs.aws.amazon.com/step-functions/latest/dg/concepts-access-cross-acct-resources.html)
to learn more about AWS Step Functions support for accessing resources in other AWS accounts.

## Service Integration Patterns

AWS Step functions integrate directly with other services, either through an optimised integration pattern, or through the AWS SDK.
Therefore, it is possible to change the `integrationPattern` of services, to enable additional functionality of the said AWS Service:

```ts
import * as glue from "@aws-cdk/aws-glue-alpha";

declare const submitGlue: glue.Job;

const submitJob = new tasks.GlueStartJobRun(this, "Submit Job", {
glueJobName: submitGlue.jobName,
integrationPattern: sfn.IntegrationPattern.RUN_JOB,
});
```

## State Machine Fragments

It is possible to define reusable (or abstracted) mini-state machines by
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,9 +111,11 @@ export interface TaskStateBaseProps {

/**
* AWS Step Functions integrates with services directly in the Amazon States Language.
* You can control these AWS services using service integration patterns
* You can control these AWS services using service integration patterns.
*
* @see https://docs.aws.amazon.com/step-functions/latest/dg/connect-to-resource.html#connect-wait-token
* Depending on the AWS Service, the Service Integration Pattern availability will vary.
*
* @see https://docs.aws.amazon.com/step-functions/latest/dg/connect-supported-services.html
*
* @default - `IntegrationPattern.REQUEST_RESPONSE` for most tasks.
* `IntegrationPattern.RUN_JOB` for the following exceptions:
Expand Down

0 comments on commit a824566

Please sign in to comment.