Skip to content

Commit

Permalink
Add Regex validation of schedule
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisPates committed Oct 27, 2023
1 parent 6bce498 commit 7745881
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ Parameters:
Type: String
Description: Schedule for trigger the execution of ssosync (see CloudWatch schedule expressions)
Default: rate(15 minutes)
AllowedPattern: '^rate\((?:1\s(?:hour|minute|day)|(?:[2-9]|[1-9][0-9]+)\s(?:hours|minutes|days))\)|cron\(\s*(?:\*|(?<minutes>0|[1-5]{0,1}[0-9]?)(?:(?:,(?P>minutes))*|(?:-(?P>minutes)){0,1}(?:\/[[:digit:]]){0,1}))\s\s*(?:\*|(?<hours>0|[1]{0,1}[0-9]?|2[0-3])(?:(?:,(?P>hours))*|(?:-(?P>hours)){0,1}(?:\/[[:digit:]]){0,1}))\s\s*(?:(?<qDays>\?)|\*(?<days>[1-2]{0,1}[1-9]?|31|10|20|30)(?:(?:,(?P>days))*|(?:-(?P>days)){0,1}(?:\/[[:digit:]]){0,1}|L|W))\s\s*(?:\*|(?<month>[1-9]|1[0-2])(?:(?:,(?P>month))*|(?:-(?P>month)){0,1}(?:\/[[:digit:]]){0,1})|(?<alphamonth>JAN|FEB|MAR|APR|MAY|JUN|JUL|AUG|SEP|OCT|NOV|DEC)(?:(?:,(?P>alphamonth))*|(?:-(?P>alphamonth)){0,1}(?:\/[[:digit:]]){0,1}))\s\s*(?(<qDays>)(?:\*|(?<week>[1-7])(?:(?:,(?P>week))*|(?:-(?P>week)){0,1}(?:\/[[:digit:]]){0,1}|L|#[1-5])|(?<alphaweek>MON|TUE|WED|THU|FRI|SAT|SUN)(?:(?:,(?P>alphaweek))*|(?:-(?P>alphaweek)){0,1}(?:\/[[:digit:]]){0,1}))|\?)\s\s*(?:\*|(?<year>19[7-9][0-9]|2[0-1][0-9][0-9])(?:(?:,(?P>year))*|(?:-(?P>year)){0,1}(?:\/[[:digit:]]){0,1}))\s*\)$
h'
LogLevel:
Type: String
Description: Log level for Lambda function logging
Expand Down

0 comments on commit 7745881

Please sign in to comment.