Skip to content

Latest commit

 

History

History
106 lines (56 loc) · 4.47 KB

File metadata and controls

106 lines (56 loc) · 4.47 KB

API Reference

Classes

Name Description
ScheduleFunction No description

Structs

Name Description
ScheduleFunctionProps No description
TargetFunctionProps No description

class ScheduleFunction

Implements: IConstruct, IDependable Extends: Construct

Initializer

new ScheduleFunction(scope: Construct, id: string, props?: ScheduleFunctionProps)
  • scope (Construct) No description
  • id (string) No description
  • props (ScheduleFunctionProps) No description
    • dispatchTargetFunctionTimeout (Duration) Specify the dispatch target function's timeout config. Default: Duration.seconds(10)
    • enabled (boolean) Enable / Disable event rule. Default: true
    • recentMinutes (Duration) Set recent minutes, ex: Duration.minutes(5) will limit the schedule must grand 5 minutes than now. Default: Duration.minutes(3)

Properties

Name Type Description
createScheduleFunction aws_lambda.Function Put new schedule into table, you can trigger by API Gateway or other AWS service.
deleteScheduleFunction aws_lambda.Function Delete schedule data, you can trigger by API Gateway or other AWS service.
dispatchTargetFunctionTimeout Duration
dispatchTargetRule aws_events.Rule Set a event rule to invoke dispatch target function every minutes.
fetchScheduleFunction aws_lambda.Function Fetch schedule from table, you can trigger by API Gateway or other AWS service.
listSchedulesFunction aws_lambda.Function List all schedules from table, you can trigger by API Gateway or other AWS service.
recentMinutes Duration
scheduleTable aws_dynamodb.Table Store all of schedules in DynamoDB table.
updateScheduleFunction aws_lambda.Function Update schedule data, you can trigger by API Gateway or other AWS service.

Methods

addTargetFunction(targetType, targetFunctionProps)

Add a target function by targetType.

addTargetFunction(targetType: string, targetFunctionProps: TargetFunctionProps): ScheduleFunction

Returns:

struct ScheduleFunctionProps

Name Type Description
dispatchTargetFunctionTimeout? Duration Specify the dispatch target function's timeout config.
Default: Duration.seconds(10)
enabled? boolean Enable / Disable event rule.
Default: true
recentMinutes? Duration Set recent minutes, ex: Duration.minutes(5) will limit the schedule must grand 5 minutes than now.
Default: Duration.minutes(3)

struct TargetFunctionProps

Name Type Description
targetFunction aws_lambda.Function Specify lambda function to invoke on schedule time.