Class CloudWatchScheduler
- java.lang.Object
-
- software.amazon.cloudformation.scheduler.CloudWatchScheduler
-
public class CloudWatchScheduler extends Object
-
-
Constructor Summary
Constructors Constructor Description CloudWatchScheduler(CloudWatchEventsProvider cloudWatchEventsProvider, Logger loggerProxy, Serializer serializer)CloudWatchScheduler(CloudWatchEventsProvider cloudWatchEventsProvider, Logger loggerProxy, CronHelper cronHelper, Serializer serializer)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcleanupCloudWatchEvents(String cloudWatchEventsRuleName, String cloudWatchEventsTargetId)After a re-invocation, the CWE rule which generated the reinvocation should be scrubbedvoidrefreshClient()On Lambda re-invoke we need to supply a new set of client credentials so this function must be called whenever credentials are refreshed/changed in the owning entity<ResourceT,CallbackT>
voidrescheduleAfterMinutes(String functionArn, int minutesFromNow, HandlerRequest<ResourceT,CallbackT> handlerRequest)Schedule a re-invocation of the executing handler no less than 1 minute from now
-
-
-
Constructor Detail
-
CloudWatchScheduler
public CloudWatchScheduler(CloudWatchEventsProvider cloudWatchEventsProvider, Logger loggerProxy, Serializer serializer)
-
CloudWatchScheduler
public CloudWatchScheduler(CloudWatchEventsProvider cloudWatchEventsProvider, Logger loggerProxy, CronHelper cronHelper, Serializer serializer)
-
-
Method Detail
-
refreshClient
public void refreshClient()
On Lambda re-invoke we need to supply a new set of client credentials so this function must be called whenever credentials are refreshed/changed in the owning entity
-
rescheduleAfterMinutes
public <ResourceT,CallbackT> void rescheduleAfterMinutes(String functionArn, int minutesFromNow, HandlerRequest<ResourceT,CallbackT> handlerRequest)
Schedule a re-invocation of the executing handler no less than 1 minute from now- Type Parameters:
ResourceT- resource model state configuration to applyCallbackT- callback context associated with reschedule context- Parameters:
functionArn- the ARN of the Lambda function to be invokedminutesFromNow- the minimum minutes from now that the re-invocation will occur. CWE provides only minute-granularityhandlerRequest- additional context which the handler can provide itself for re-invocation
-
cleanupCloudWatchEvents
public void cleanupCloudWatchEvents(String cloudWatchEventsRuleName, String cloudWatchEventsTargetId)
After a re-invocation, the CWE rule which generated the reinvocation should be scrubbed- Parameters:
cloudWatchEventsRuleName- the name of the CWE rule which triggered a re-invocationcloudWatchEventsTargetId- the target of the CWE rule which triggered a re-invocation
-
-