java.lang.Object
software.amazon.jsii.JsiiObject
software.amazon.awscdk.services.scheduler.targets.alpha.ScheduleTargetBase
software.amazon.awscdk.services.scheduler.targets.alpha.SnsPublish
All Implemented Interfaces:
IScheduleTarget, software.amazon.jsii.JsiiSerializable

@Generated(value="jsii-pacmak/1.104.0 (build e79254c)", date="2024-11-22T02:24:11.993Z") @Stability(Experimental) public class SnsPublish extends ScheduleTargetBase implements IScheduleTarget
(experimental) Use an Amazon SNS topic as a target for AWS EventBridge Scheduler.

Example:

 import software.amazon.awscdk.services.sns.*;
 Topic topic = new Topic(this, "Topic");
 Map<String, String> payload = Map.of(
         "message", "Hello scheduler!");
 SnsPublish target = SnsPublish.Builder.create(topic)
         .input(ScheduleTargetInput.fromObject(payload))
         .build();
 Schedule.Builder.create(this, "Schedule")
         .schedule(ScheduleExpression.rate(Duration.hours(1)))
         .target(target)
         .build();
 
  • Constructor Details

    • SnsPublish

      protected SnsPublish(software.amazon.jsii.JsiiObjectRef objRef)
    • SnsPublish

      protected SnsPublish(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
    • SnsPublish

      @Stability(Experimental) public SnsPublish(@NotNull ITopic topic, @Nullable ScheduleTargetBaseProps props)
      Parameters:
      topic - This parameter is required.
      props -
    • SnsPublish

      @Stability(Experimental) public SnsPublish(@NotNull ITopic topic)
      Parameters:
      topic - This parameter is required.
  • Method Details

    • addTargetActionToRole

      @Stability(Experimental) protected void addTargetActionToRole(@NotNull IRole role)
      Specified by:
      addTargetActionToRole in class ScheduleTargetBase
      Parameters:
      role - This parameter is required.