File tree Expand file tree Collapse file tree
packages/cdkConstructs/src/constructs Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -63,7 +63,21 @@ export class ExpressStateMachine extends Construct {
6363 public readonly executionPolicy : ManagedPolicy
6464 public readonly stateMachine : StateMachine
6565
66- /** Provisions an Express Step Functions workflow with logging, tracing, and invoke permissions. */
66+ /**
67+ * Provisions an Express Step Functions workflow with logging, tracing, and invoke permissions.
68+ * @example
69+ * ```ts
70+ * const sm = new ExpressStateMachine(this, "MyWorkflow", {
71+ * stackName: "my-service",
72+ * stateMachineName: "my-service-workflow",
73+ * definition: new Pass(this, "Start"),
74+ * logRetentionInDays: 30,
75+ * additionalPolicies: [myLambdaInvokePolicy]
76+ * })
77+ * // Attach the generated execution policy to an API Gateway role
78+ * apiGatewayRole.addManagedPolicy(sm.executionPolicy)
79+ * ```
80+ */
6781 public constructor ( scope : Construct , id : string , props : StateMachineProps ) {
6882 super ( scope , id )
6983
You can’t perform that action at this time.
0 commit comments