Skip to content

Commit

Permalink
feat(sam): add SAM CognitoEvent EventSource (awslabs#570)
Browse files Browse the repository at this point in the history
  • Loading branch information
jarreds committed Mar 30, 2023
1 parent 78f4f5e commit 701fb3d
Show file tree
Hide file tree
Showing 6 changed files with 214 additions and 2 deletions.
42 changes: 42 additions & 0 deletions cloudformation/serverless/aws-serverless-function_cognitoevent.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 11 additions & 1 deletion cloudformation/serverless/function_properties.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

76 changes: 76 additions & 0 deletions cloudformation/serverless/function_trigger.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

24 changes: 23 additions & 1 deletion generate/sam-2016-10-31.json
Original file line number Diff line number Diff line change
Expand Up @@ -857,7 +857,8 @@
"IoTRuleEvent",
"AlexaSkillEvent",
"EventBridgeRuleEvent",
"HttpApiEvent"
"HttpApiEvent",
"CognitoEvent"
],
"UpdateType": "Immutable"
}
Expand Down Expand Up @@ -1149,6 +1150,27 @@
}
}
},
"AWS::Serverless::Function.CognitoEvent": {
"Documentation": "https://github.com/aws/serverless-application-model/blob/master/versions/2016-10-31.md#cognito",
"Properties": {
"UserPool": {
"Documentation": "https://github.com/aws/serverless-application-model/blob/master/versions/2016-10-31.md#cognito",
"Required": true,
"PrimitiveType": "String",
"UpdateType": "Immutable"
},
"Trigger": {
"Documentation": "https://github.com/aws/serverless-application-model/blob/master/versions/2016-10-31.md#cognito",
"Required": true,
"PrimitiveTypes": [
"String"
],
"PrimitiveItemTypes": [
"String"
]
}
}
},
"AWS::Serverless::Function.RouteSettings": {
"Documentation": "https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigatewayv2-stage-routesettings.html",
"Properties": {
Expand Down
31 changes: 31 additions & 0 deletions schema/sam.go
Original file line number Diff line number Diff line change
Expand Up @@ -173474,6 +173474,34 @@ var SamSchema = `{
],
"type": "object"
},
"AWS::Serverless::Function.CognitoEvent": {
"additionalProperties": false,
"properties": {
"Trigger": {
"anyOf": [
{
"type": [
"string"
]
},
{
"items": {
"type": "string"
},
"type": "array"
}
]
},
"UserPool": {
"type": "string"
}
},
"required": [
"Trigger",
"UserPool"
],
"type": "object"
},
"AWS::Serverless::Function.CollectionSAMPT": {
"additionalProperties": false,
"properties": {
Expand Down Expand Up @@ -173711,6 +173739,9 @@ var SamSchema = `{
},
{
"$ref": "#/definitions/AWS::Serverless::Function.HttpApiEvent"
},
{
"$ref": "#/definitions/AWS::Serverless::Function.CognitoEvent"
}
]
},
Expand Down
31 changes: 31 additions & 0 deletions schema/sam.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -173469,6 +173469,34 @@
],
"type": "object"
},
"AWS::Serverless::Function.CognitoEvent": {
"additionalProperties": false,
"properties": {
"Trigger": {
"anyOf": [
{
"type": [
"string"
]
},
{
"items": {
"type": "string"
},
"type": "array"
}
]
},
"UserPool": {
"type": "string"
}
},
"required": [
"Trigger",
"UserPool"
],
"type": "object"
},
"AWS::Serverless::Function.CollectionSAMPT": {
"additionalProperties": false,
"properties": {
Expand Down Expand Up @@ -173706,6 +173734,9 @@
},
{
"$ref": "#/definitions/AWS::Serverless::Function.HttpApiEvent"
},
{
"$ref": "#/definitions/AWS::Serverless::Function.CognitoEvent"
}
]
},
Expand Down

0 comments on commit 701fb3d

Please sign in to comment.