File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -12,11 +12,16 @@ export interface Notifications {
1212 // readonly slack?: Slack;
1313}
1414
15+ export interface TimeoutOption {
16+ readonly stateMachineTimeout ?: Duration ;
17+ }
18+
1519export interface StepFunctionsExecutionStatueChangeNotificationStackProps extends StackProps {
1620 // readonly targetResource: TargetResource;
1721 readonly enableRule ?: boolean ;
1822 readonly notifications ?: Notifications ;
1923 // readonly resourceNamingOption?: ResourceNamingOption;
24+ readonly timeoutOption ?: TimeoutOption ;
2025}
2126
2227export class StepFunctionsExecutionStatueChangeNotificationStack extends Stack {
@@ -38,8 +43,13 @@ export class StepFunctionsExecutionStatueChangeNotificationStack extends Stack {
3843 // 👇 Create State Machine
3944 const stateMachine = new NotificationStateMachine ( this , 'StateMachine' , {
4045 stateMachineName : undefined ,
41- timeout : Duration . minutes ( 1 ) ,
4246 notificationTopic : topic ,
47+ timeout : ( ( ) => {
48+ if ( props . timeoutOption ?. stateMachineTimeout ) {
49+ return props . timeoutOption ?. stateMachineTimeout ;
50+ }
51+ return Duration . minutes ( 3 ) ;
52+ } ) ( ) ,
4353 } ) ;
4454
4555 // @ts -ignore
You can’t perform that action at this time.
0 commit comments