Class CloudWatchScheduler

java.lang.Object
software.amazon.cloudformation.scheduler.CloudWatchScheduler

public class CloudWatchScheduler extends Object
  • Constructor Details

  • Method Details

    • 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, ConfigurationT> void rescheduleAfterMinutes(String functionArn, int minutesFromNow, HandlerRequest<ResourceT,CallbackT,ConfigurationT> handlerRequest)
      Schedule a re-invocation of the executing handler no less than 1 minute from now
      Type Parameters:
      ResourceT - resource model state configuration to apply
      CallbackT - callback context associated with reschedule context
      Parameters:
      functionArn - the ARN of the Lambda function to be invoked
      minutesFromNow - the minimum minutes from now that the re-invocation will occur. CWE provides only minute-granularity
      handlerRequest - 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-invocation
      cloudWatchEventsTargetId - the target of the CWE rule which triggered a re-invocation