UNPKG

1.26 kBTypeScriptView Raw
1import * as events from '@aws-cdk/aws-events';
2import * as iam from '@aws-cdk/aws-iam';
3import * as sfn from '@aws-cdk/aws-stepfunctions';
4import { TargetBaseProps } from './util';
5/**
6 * Customize the Step Functions State Machine target
7 */
8export interface SfnStateMachineProps extends TargetBaseProps {
9 /**
10 * The input to the state machine execution
11 *
12 * @default the entire EventBridge event
13 */
14 readonly input?: events.RuleTargetInput;
15 /**
16 * The IAM role to be assumed to execute the State Machine
17 *
18 * @default - a new role will be created
19 */
20 readonly role?: iam.IRole;
21}
22/**
23 * Use a StepFunctions state machine as a target for Amazon EventBridge rules.
24 */
25export declare class SfnStateMachine implements events.IRuleTarget {
26 readonly machine: sfn.IStateMachine;
27 private readonly props;
28 private readonly role;
29 constructor(machine: sfn.IStateMachine, props?: SfnStateMachineProps);
30 /**
31 * Returns a properties that are used in an Rule to trigger this State Machine
32 *
33 * @see https://docs.aws.amazon.com/eventbridge/latest/userguide/resource-based-policies-eventbridge.html#sns-permissions
34 */
35 bind(_rule: events.IRule, _id?: string): events.RuleTargetConfig;
36}