Class SnsPublish
java.lang.Object
software.amazon.jsii.JsiiObject
software.amazon.awscdk.services.scheduler.targets.ScheduleTargetBase
software.amazon.awscdk.services.scheduler.targets.SnsPublish
- All Implemented Interfaces:
IScheduleTarget,software.amazon.jsii.JsiiSerializable
@Generated(value="jsii-pacmak/1.121.0 (build d7af9b9)",
date="2025-12-18T18:20:17.765Z")
@Stability(Stable)
public class SnsPublish
extends ScheduleTargetBase
implements IScheduleTarget
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();
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationModeNested classes/interfaces inherited from interface software.amazon.awscdk.services.scheduler.IScheduleTarget
IScheduleTarget.Jsii$Default, IScheduleTarget.Jsii$Proxy -
Constructor Summary
ConstructorsModifierConstructorDescriptionSnsPublish(ITopic topic) SnsPublish(ITopic topic, ScheduleTargetBaseProps props) protectedSnsPublish(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedSnsPublish(software.amazon.jsii.JsiiObjectRef objRef) -
Method Summary
Methods inherited from class software.amazon.awscdk.services.scheduler.targets.ScheduleTargetBase
bind, bindBaseTargetConfig, getTargetArnMethods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface software.amazon.awscdk.services.scheduler.IScheduleTarget
bindMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Constructor Details
-
SnsPublish
protected SnsPublish(software.amazon.jsii.JsiiObjectRef objRef) -
SnsPublish
protected SnsPublish(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
SnsPublish
@Stability(Stable) public SnsPublish(@NotNull ITopic topic, @Nullable ScheduleTargetBaseProps props) - Parameters:
topic- This parameter is required.props-
-
SnsPublish
- Parameters:
topic- This parameter is required.
-
-
Method Details
-
addTargetActionToRole
- Specified by:
addTargetActionToRolein classScheduleTargetBase- Parameters:
role- This parameter is required.
-