Class EventBridgeSchedulerTarget
java.lang.Object
software.amazon.jsii.JsiiObject
software.amazon.awscdk.services.stepfunctions.tasks.EventBridgeSchedulerTarget
- All Implemented Interfaces:
software.amazon.jsii.JsiiSerializable
@Generated(value="jsii-pacmak/1.104.0 (build e79254c)",
date="2024-11-22T02:24:10.385Z")
@Stability(Stable)
public class EventBridgeSchedulerTarget
extends software.amazon.jsii.JsiiObject
The target that EventBridge Scheduler will invoke.
Example:
import software.amazon.awscdk.services.scheduler.*; import software.amazon.awscdk.services.kms.*; Key key; CfnScheduleGroup scheduleGroup; Queue targetQueue; Queue deadLetterQueue; Role schedulerRole = Role.Builder.create(this, "SchedulerRole") .assumedBy(new ServicePrincipal("scheduler.amazonaws.com")) .build(); // To send the message to the queue // This policy changes depending on the type of target. schedulerRole.addToPrincipalPolicy(PolicyStatement.Builder.create() .actions(List.of("sqs:SendMessage")) .resources(List.of(targetQueue.getQueueArn())) .build()); EventBridgeSchedulerCreateScheduleTask createScheduleTask1 = EventBridgeSchedulerCreateScheduleTask.Builder.create(this, "createSchedule") .scheduleName("TestSchedule") .actionAfterCompletion(ActionAfterCompletion.NONE) .clientToken("testToken") .description("TestDescription") .startDate(new Date()) .endDate(new Date(new Date().getTime() + 1000 * 60 * 60)) .flexibleTimeWindow(Duration.minutes(5)) .groupName(scheduleGroup.getRef()) .kmsKey(key) .schedule(Schedule.rate(Duration.minutes(5))) .timezone("UTC") .enabled(true) .target(EventBridgeSchedulerTarget.Builder.create() .arn(targetQueue.getQueueArn()) .role(schedulerRole) .retryPolicy(RetryPolicy.builder() .maximumRetryAttempts(2) .maximumEventAge(Duration.minutes(5)) .build()) .deadLetterQueue(deadLetterQueue) .build()) .build();
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic final class
A fluent builder forEventBridgeSchedulerTarget
.Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationMode
-
Constructor Summary
ModifierConstructorDescriptionprotected
EventBridgeSchedulerTarget
(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protected
EventBridgeSchedulerTarget
(software.amazon.jsii.JsiiObjectRef objRef) -
Method Summary
Modifier and TypeMethodDescriptiongetArn()
The Amazon Resource Name (ARN) of the target.Dead letter queue for failed events.getInput()
The input to the target.The retry policy settings.getRole()
The IAM role that EventBridge Scheduler will use for this target when the schedule is invoked.return the target object for the EventBridge Scheduler.void
The Amazon Resource Name (ARN) of the target.void
setDeadLetterQueue
(IQueue value) Dead letter queue for failed events.void
The input to the target.void
setRetryPolicy
(RetryPolicy value) The retry policy settings.void
The IAM role that EventBridge Scheduler will use for this target when the schedule is invoked.Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Constructor Details
-
EventBridgeSchedulerTarget
protected EventBridgeSchedulerTarget(software.amazon.jsii.JsiiObjectRef objRef) -
EventBridgeSchedulerTarget
protected EventBridgeSchedulerTarget(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
EventBridgeSchedulerTarget
@Stability(Stable) public EventBridgeSchedulerTarget(@NotNull EventBridgeSchedulerTargetProps props) - Parameters:
props
- This parameter is required.
-
-
Method Details
-
renderTargetObject
return the target object for the EventBridge Scheduler. -
getArn
The Amazon Resource Name (ARN) of the target. -
setArn
The Amazon Resource Name (ARN) of the target. -
getRole
The IAM role that EventBridge Scheduler will use for this target when the schedule is invoked. -
setRole
The IAM role that EventBridge Scheduler will use for this target when the schedule is invoked. -
getDeadLetterQueue
Dead letter queue for failed events. -
setDeadLetterQueue
Dead letter queue for failed events. -
getInput
The input to the target. -
setInput
The input to the target. -
getRetryPolicy
The retry policy settings. -
setRetryPolicy
The retry policy settings.
-