Skip to content

Commit

Permalink
feat(sam): Add support for AWS::Serverless::Api.TracingEnabled, `AW…
Browse files Browse the repository at this point in the history
…S::Serverless::Function.PermissionsBoundary`, `AWS::Serverless::Function.DynamoEvent.Enabled`, `AWS::Serverless::Function.KinesisEvent.Enabled`, and `AWS::Serverless::Function.SQSEvent.Enabled` (awslabs#191)
  • Loading branch information
Graham Jenson authored and PaulMaddox committed Mar 20, 2019
1 parent 8eff90a commit 38f0187
Show file tree
Hide file tree
Showing 8 changed files with 85 additions and 0 deletions.
5 changes: 5 additions & 0 deletions cloudformation/resources/aws-serverless-api.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,11 @@ type AWSServerlessApi struct {
// See: https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md#awsserverlessapi
StageName string `json:"StageName,omitempty"`

// TracingEnabled AWS CloudFormation Property
// Required: false
// See: https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md#awsserverlessapi
TracingEnabled bool `json:"TracingEnabled,omitempty"`

// Variables AWS CloudFormation Property
// Required: false
// See: https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md#awsserverlessapi
Expand Down
5 changes: 5 additions & 0 deletions cloudformation/resources/aws-serverless-function.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,11 @@ type AWSServerlessFunction struct {
// See: https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md#awsserverlessfunction
MemorySize int `json:"MemorySize,omitempty"`

// PermissionsBoundary AWS CloudFormation Property
// Required: false
// See: https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md#awsserverlessfunction
PermissionsBoundary string `json:"PermissionsBoundary,omitempty"`

// Policies AWS CloudFormation Property
// Required: false
// See: https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md#awsserverlessfunction
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ type AWSServerlessFunction_DynamoDBEvent struct {
// See: https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md#dynamodb
BatchSize int `json:"BatchSize,omitempty"`

// Enabled AWS CloudFormation Property
// Required: false
// See: https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md#dynamodb
Enabled bool `json:"Enabled,omitempty"`

// StartingPosition AWS CloudFormation Property
// Required: true
// See: https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md#dynamodb
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ type AWSServerlessFunction_KinesisEvent struct {
// See: https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md#kinesis
BatchSize int `json:"BatchSize,omitempty"`

// Enabled AWS CloudFormation Property
// Required: false
// See: https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md#kinesis
Enabled bool `json:"Enabled,omitempty"`

// StartingPosition AWS CloudFormation Property
// Required: true
// See: https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md#kinesis
Expand Down
5 changes: 5 additions & 0 deletions cloudformation/resources/aws-serverless-function_sqsevent.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ type AWSServerlessFunction_SQSEvent struct {
// See: https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md#sqs
BatchSize int `json:"BatchSize,omitempty"`

// Enabled AWS CloudFormation Property
// Required: false
// See: https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md#sqs
Enabled bool `json:"Enabled,omitempty"`

// Queue AWS CloudFormation Property
// Required: true
// See: https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md#sqs
Expand Down
30 changes: 30 additions & 0 deletions generate/sam-2016-10-31.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,12 @@
],
"UpdateType": "Immutable"
},
"PermissionsBoundary": {
"Documentation": "https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md#awsserverlessfunction",
"Required": false,
"PrimitiveType": "String",
"UpdateType": "Immutable"
},
"Environment": {
"Documentation": "https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md#awsserverlessfunction",
"Required": false,
Expand Down Expand Up @@ -227,6 +233,12 @@
"Required": false,
"Type": "Auth",
"UpdateType": "Immutable"
},
"TracingEnabled": {
"Documentation": "https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md#awsserverlessapi",
"Required": false,
"PrimitiveType": "Boolean",
"UpdateType": "Immutable"
}
}
},
Expand Down Expand Up @@ -486,6 +498,12 @@
"Required": false,
"PrimitiveType": "Integer",
"UpdateType": "Immutable"
},
"Enabled": {
"Documentation": "https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md#kinesis",
"Required": false,
"PrimitiveType": "Boolean",
"UpdateType": "Immutable"
}
}
},
Expand All @@ -509,6 +527,12 @@
"Required": false,
"PrimitiveType": "Integer",
"UpdateType": "Immutable"
},
"Enabled": {
"Documentation": "https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md#dynamodb",
"Required": false,
"PrimitiveType": "Boolean",
"UpdateType": "Immutable"
}
}
},
Expand All @@ -526,6 +550,12 @@
"Required": false,
"PrimitiveType": "Integer",
"UpdateType": "Immutable"
},
"Enabled": {
"Documentation": "https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md#sqs",
"Required": false,
"PrimitiveType": "Boolean",
"UpdateType": "Immutable"
}
}
},
Expand Down
15 changes: 15 additions & 0 deletions schema/sam.go
Original file line number Diff line number Diff line change
Expand Up @@ -39838,6 +39838,9 @@ var SamSchema = `{
"StageName": {
"type": "string"
},
"TracingEnabled": {
"type": "boolean"
},
"Variables": {
"additionalProperties": true,
"patternProperties": {
Expand Down Expand Up @@ -40090,6 +40093,9 @@ var SamSchema = `{
"MemorySize": {
"type": "number"
},
"PermissionsBoundary": {
"type": "string"
},
"Policies": {
"anyOf": [
{
Expand Down Expand Up @@ -40266,6 +40272,9 @@ var SamSchema = `{
"BatchSize": {
"type": "number"
},
"Enabled": {
"type": "boolean"
},
"StartingPosition": {
"type": "string"
},
Expand Down Expand Up @@ -40377,6 +40386,9 @@ var SamSchema = `{
"BatchSize": {
"type": "number"
},
"Enabled": {
"type": "boolean"
},
"StartingPosition": {
"type": "string"
},
Expand Down Expand Up @@ -40471,6 +40483,9 @@ var SamSchema = `{
"BatchSize": {
"type": "number"
},
"Enabled": {
"type": "boolean"
},
"Queue": {
"type": "string"
}
Expand Down
15 changes: 15 additions & 0 deletions schema/sam.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -39835,6 +39835,9 @@
"StageName": {
"type": "string"
},
"TracingEnabled": {
"type": "boolean"
},
"Variables": {
"additionalProperties": true,
"patternProperties": {
Expand Down Expand Up @@ -40087,6 +40090,9 @@
"MemorySize": {
"type": "number"
},
"PermissionsBoundary": {
"type": "string"
},
"Policies": {
"anyOf": [
{
Expand Down Expand Up @@ -40263,6 +40269,9 @@
"BatchSize": {
"type": "number"
},
"Enabled": {
"type": "boolean"
},
"StartingPosition": {
"type": "string"
},
Expand Down Expand Up @@ -40374,6 +40383,9 @@
"BatchSize": {
"type": "number"
},
"Enabled": {
"type": "boolean"
},
"StartingPosition": {
"type": "string"
},
Expand Down Expand Up @@ -40468,6 +40480,9 @@
"BatchSize": {
"type": "number"
},
"Enabled": {
"type": "boolean"
},
"Queue": {
"type": "string"
}
Expand Down

0 comments on commit 38f0187

Please sign in to comment.