Skip to content

Commit a7c526a

Browse files
authored
docs(stepfunctions): integrationPattern update (#29015)
### 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*
1 parent 0e6e37e commit a7c526a

File tree

2 files changed

+20
-2
lines changed

2 files changed

+20
-2
lines changed

packages/aws-cdk-lib/aws-stepfunctions/README.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -708,6 +708,22 @@ const submitJob = new tasks.LambdaInvoke(this, 'Submit Job', {
708708
See [the AWS documentation](https://docs.aws.amazon.com/step-functions/latest/dg/concepts-access-cross-acct-resources.html)
709709
to learn more about AWS Step Functions support for accessing resources in other AWS accounts.
710710

711+
## Service Integration Patterns
712+
713+
AWS Step functions integrate directly with other services, either through an optimised integration pattern, or through the AWS SDK.
714+
Therefore, it is possible to change the `integrationPattern` of services, to enable additional functionality of the said AWS Service:
715+
716+
```ts
717+
import * as glue from "@aws-cdk/aws-glue-alpha";
718+
719+
declare const submitGlue: glue.Job;
720+
721+
const submitJob = new tasks.GlueStartJobRun(this, "Submit Job", {
722+
glueJobName: submitGlue.jobName,
723+
integrationPattern: sfn.IntegrationPattern.RUN_JOB,
724+
});
725+
```
726+
711727
## State Machine Fragments
712728

713729
It is possible to define reusable (or abstracted) mini-state machines by

packages/aws-cdk-lib/aws-stepfunctions/lib/states/task-base.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,9 +111,11 @@ export interface TaskStateBaseProps {
111111

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

0 commit comments

Comments
 (0)