-
Notifications
You must be signed in to change notification settings - Fork 4k
Commit
This PR added support for start and end time of the schedule. ## Description Currently, users cannot set a start time and an end time for the schedule. A schedule without a start date will begin as soon as it is created and available, and without an end date, it will continue to invoke its target indefinitely. With this feature, users can set the start and end dates of a schedule, allowing for more flexible schedule configurations. https://docs.aws.amazon.com/ja_jp/AWSCloudFormation/latest/UserGuide/aws-resource-scheduler-schedule.html#cfn-scheduler-schedule-startdate https://docs.aws.amazon.com/ja_jp/AWSCloudFormation/latest/UserGuide/aws-resource-scheduler-schedule.html#cfn-scheduler-schedule-enddate In CloudFormation, users can use this feature as follows: ```yaml TestSchedule: Type: AWS::Scheduler::Schedule Properties: StartDate: "2024-12-01T13:09:00.000Z" EndDate: "2025-12-01T00:00:00.001Z" ScheduleExpression: "at(2023-01-01T00:00:00)" State: "ENABLED" Target: # target ``` ## Major changes ### add property to ScheduleProps interface Added startDate and endDate properties, and typed these values as string based on the following PR comments. #26819 (comment) It is not necessary to specify both startDate and endDate, they can be set independently. Validation is performed on the following points. - Error if not following ISO 8601 format. - Must include milliseconds (yyyy-MM-ddTHH:mm:ss.SSSZ) - Error if startDate is later than endDate If a time before the current time is specified, the following error occurs in CFn, but no validation is performed because the timing of validation in CDK and the timing of actual deployment are different. `The StartDate you specify cannot be earlier than 5 minutes ago.` ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
- Loading branch information
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.