Skip to content
This repository was archived by the owner on Oct 17, 2024. It is now read-only.

Commit 701fb3d

Browse files
authored
feat(sam): add SAM CognitoEvent EventSource (#570)
1 parent 78f4f5e commit 701fb3d

File tree

6 files changed

+214
-2
lines changed

6 files changed

+214
-2
lines changed

cloudformation/serverless/aws-serverless-function_cognitoevent.go

+42
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

cloudformation/serverless/function_properties.go

+11-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

cloudformation/serverless/function_trigger.go

+76
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

generate/sam-2016-10-31.json

+23-1
Original file line numberDiff line numberDiff line change
@@ -857,7 +857,8 @@
857857
"IoTRuleEvent",
858858
"AlexaSkillEvent",
859859
"EventBridgeRuleEvent",
860-
"HttpApiEvent"
860+
"HttpApiEvent",
861+
"CognitoEvent"
861862
],
862863
"UpdateType": "Immutable"
863864
}
@@ -1149,6 +1150,27 @@
11491150
}
11501151
}
11511152
},
1153+
"AWS::Serverless::Function.CognitoEvent": {
1154+
"Documentation": "https://github.com/aws/serverless-application-model/blob/master/versions/2016-10-31.md#cognito",
1155+
"Properties": {
1156+
"UserPool": {
1157+
"Documentation": "https://github.com/aws/serverless-application-model/blob/master/versions/2016-10-31.md#cognito",
1158+
"Required": true,
1159+
"PrimitiveType": "String",
1160+
"UpdateType": "Immutable"
1161+
},
1162+
"Trigger": {
1163+
"Documentation": "https://github.com/aws/serverless-application-model/blob/master/versions/2016-10-31.md#cognito",
1164+
"Required": true,
1165+
"PrimitiveTypes": [
1166+
"String"
1167+
],
1168+
"PrimitiveItemTypes": [
1169+
"String"
1170+
]
1171+
}
1172+
}
1173+
},
11521174
"AWS::Serverless::Function.RouteSettings": {
11531175
"Documentation": "https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigatewayv2-stage-routesettings.html",
11541176
"Properties": {

schema/sam.go

+31
Original file line numberDiff line numberDiff line change
@@ -173474,6 +173474,34 @@ var SamSchema = `{
173474173474
],
173475173475
"type": "object"
173476173476
},
173477+
"AWS::Serverless::Function.CognitoEvent": {
173478+
"additionalProperties": false,
173479+
"properties": {
173480+
"Trigger": {
173481+
"anyOf": [
173482+
{
173483+
"type": [
173484+
"string"
173485+
]
173486+
},
173487+
{
173488+
"items": {
173489+
"type": "string"
173490+
},
173491+
"type": "array"
173492+
}
173493+
]
173494+
},
173495+
"UserPool": {
173496+
"type": "string"
173497+
}
173498+
},
173499+
"required": [
173500+
"Trigger",
173501+
"UserPool"
173502+
],
173503+
"type": "object"
173504+
},
173477173505
"AWS::Serverless::Function.CollectionSAMPT": {
173478173506
"additionalProperties": false,
173479173507
"properties": {
@@ -173711,6 +173739,9 @@ var SamSchema = `{
173711173739
},
173712173740
{
173713173741
"$ref": "#/definitions/AWS::Serverless::Function.HttpApiEvent"
173742+
},
173743+
{
173744+
"$ref": "#/definitions/AWS::Serverless::Function.CognitoEvent"
173714173745
}
173715173746
]
173716173747
},

schema/sam.schema.json

+31
Original file line numberDiff line numberDiff line change
@@ -173469,6 +173469,34 @@
173469173469
],
173470173470
"type": "object"
173471173471
},
173472+
"AWS::Serverless::Function.CognitoEvent": {
173473+
"additionalProperties": false,
173474+
"properties": {
173475+
"Trigger": {
173476+
"anyOf": [
173477+
{
173478+
"type": [
173479+
"string"
173480+
]
173481+
},
173482+
{
173483+
"items": {
173484+
"type": "string"
173485+
},
173486+
"type": "array"
173487+
}
173488+
]
173489+
},
173490+
"UserPool": {
173491+
"type": "string"
173492+
}
173493+
},
173494+
"required": [
173495+
"Trigger",
173496+
"UserPool"
173497+
],
173498+
"type": "object"
173499+
},
173472173500
"AWS::Serverless::Function.CollectionSAMPT": {
173473173501
"additionalProperties": false,
173474173502
"properties": {
@@ -173706,6 +173734,9 @@
173706173734
},
173707173735
{
173708173736
"$ref": "#/definitions/AWS::Serverless::Function.HttpApiEvent"
173737+
},
173738+
{
173739+
"$ref": "#/definitions/AWS::Serverless::Function.CognitoEvent"
173709173740
}
173710173741
]
173711173742
},

0 commit comments

Comments
 (0)