Skip to content

Commit

Permalink
Update schema.js to support AWS::Scheduler::Schedule (#353)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexw23 authored Oct 2, 2024
1 parent 2fd6e60 commit d8b6d0b
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/schema.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ function extendServerlessSchema(serverless) {
const cronSyntax = '^cron\\(\\S+ \\S+ \\S+ \\S+ \\S+ \\S+\\)$';
const scheduleSyntax = `${rateSyntax}|${cronSyntax}`;

const METHOD_SCHEDULER = 'scheduler';
const METHOD_EVENT_BUS = 'eventBus';

const globalConfigSchemaProperties = {
folderName: { type: 'string' },
cleanFolder: { type: 'boolean' },
Expand Down Expand Up @@ -84,6 +87,14 @@ function extendServerlessSchema(serverless) {
required: ['inputTemplate'],
additionalProperties: false,
},
method: {
type: 'string',
enum: [METHOD_EVENT_BUS, METHOD_SCHEDULER],
},
timezone: {
type: 'string',
pattern: '[\\w\\-\\/]+',
},
},
required: ['rate'],
additionalProperties: false,
Expand Down

0 comments on commit d8b6d0b

Please sign in to comment.