Skip to content

Commit

Permalink
feat(AWS S3): Recognize ExpirationInDays property for s3 events
Browse files Browse the repository at this point in the history
  • Loading branch information
ROSeaboyer committed Oct 13, 2021
1 parent c4cb0f3 commit 8e6dcd1
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
7 changes: 3 additions & 4 deletions lib/plugins/aws/package/compile/events/s3/configSchema.js
@@ -1,5 +1,7 @@
'use strict';

const { cfValue } = require('../../../../../../utils/aws-schema-get-cf-value');

const destination = {
type: 'object',
properties: {
Expand Down Expand Up @@ -275,10 +277,7 @@ module.exports = {
type: 'string',
format: 'date-time',
},
ExpirationInDays: {
type: 'integer',
minimum: 0,
},
ExpirationInDays: cfValue({ type: 'integer', minimum: 0 }),
Id: {
type: 'string',
maxLength: 255,
Expand Down
7 changes: 7 additions & 0 deletions lib/utils/aws-schema-get-cf-value.js
@@ -0,0 +1,7 @@
'use strict';

module.exports.cfValue = (value) => {
return {
anyOf: [value, { $ref: '#/definitions/awsCfFunction' }, { $ref: '#/definitions/awsCfIf' }],
};
};

0 comments on commit 8e6dcd1

Please sign in to comment.