Class CloudWatchScheduler

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

public class CloudWatchScheduler
extends java.lang.Object
  • Constructor Summary

    Constructors
    Constructor Description
    CloudWatchScheduler​(CloudWatchEventsProvider cloudWatchEventsProvider, Logger loggerProxy, Serializer serializer)  
    CloudWatchScheduler​(CloudWatchEventsProvider cloudWatchEventsProvider, Logger loggerProxy, CronHelper cronHelper, Serializer serializer)  
  • Method Summary

    Modifier and Type Method Description
    void cleanupCloudWatchEvents​(java.lang.String cloudWatchEventsRuleName, java.lang.String cloudWatchEventsTargetId)
    After a re-invocation, the CWE rule which generated the reinvocation should be scrubbed
    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
    <ResourceT,​ CallbackT>
    void
    rescheduleAfterMinutes​(java.lang.String functionArn, int minutesFromNow, HandlerRequest<ResourceT,​CallbackT> handlerRequest)
    Schedule a re-invocation of the executing handler no less than 1 minute from now

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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> void rescheduleAfterMinutes​(java.lang.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 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​(java.lang.String cloudWatchEventsRuleName, java.lang.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