Automatically delete schedules upon completion with Amazon EventBridge Scheduler in AWS SDK Java V2 #4259
Unanswered
luisruizpavon
asked this question in
Q&A
Replies: 1 comment
-
@luisruizpavon in general, AWS CLI examples are a good "template" of how to write a request call using the SDKs, but in any case here's the same example using the Java SDK v2: CreateScheduleRequest request = CreateScheduleRequest.builder()
.name("SendEmailOnce")
.scheduleExpression("at(2023-08-02T17:35:00)")
.scheduleExpressionTimezone("Europe/Helsinki")
.flexibleTimeWindow(FlexibleTimeWindow.builder().mode(FlexibleTimeWindowMode.OFF).build())
.target(t -> t.arn("arn:aws:sns:us-east-1:xxx:test-send-email")
.roleArn("arn:aws:iam::xxxx:role/sam_scheduler_role"))
.actionAfterCompletion(ActionAfterCompletion.DELETE)
.build();
CreateScheduleResponse response = client.createSchedule(request); |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi everyone!
Has this functionality been already implemented in AWS SDK Java V2?
https://aws.amazon.com/es/blogs/compute/automatically-delete-schedules-upon-completion-with-amazon-eventbridge-scheduler/
Can you provide an example?
Regards!
Beta Was this translation helpful? Give feedback.
All reactions