From 9270ceb0a35b402135990787119974cc0c8f770e Mon Sep 17 00:00:00 2001 From: shivlaks <32604953+shivlaks@users.noreply.github.com> Date: Wed, 12 Jun 2019 03:53:09 -0700 Subject: [PATCH] chore: Update SAM Resource Specification (#2832) --- packages/@aws-cdk/cfnspec/CHANGELOG.md | 32 ++ .../cfnspec/spec-source/000_sam.spec.json | 311 +++++++++++++++++- 2 files changed, 342 insertions(+), 1 deletion(-) diff --git a/packages/@aws-cdk/cfnspec/CHANGELOG.md b/packages/@aws-cdk/cfnspec/CHANGELOG.md index 6b18a0455fd00..8be4501e6a86d 100644 --- a/packages/@aws-cdk/cfnspec/CHANGELOG.md +++ b/packages/@aws-cdk/cfnspec/CHANGELOG.md @@ -1,3 +1,35 @@ + +# Serverless Application Model (SAM) Resource Specification v2016-10-31 + +## New Resource Types + + +## Attribute Changes + + +## Property Changes + +* AWS::Serverless::Function Policies.ItemTypes (__changed__) + * Added SAMPolicyTemplate + +## Property Type Changes + +* AWS::Serverless::Function.BucketSAMPT (__added__) +* AWS::Serverless::Function.CollectionSAMPT (__added__) +* AWS::Serverless::Function.DomainSAMPT (__added__) +* AWS::Serverless::Function.EmptySAMPT (__added__) +* AWS::Serverless::Function.FunctionSAMPT (__added__) +* AWS::Serverless::Function.IdentitySAMPT (__added__) +* AWS::Serverless::Function.KeySAMPT (__added__) +* AWS::Serverless::Function.LogGroupSAMPT (__added__) +* AWS::Serverless::Function.QueueSAMPT (__added__) +* AWS::Serverless::Function.SAMPolicyTemplate (__added__) +* AWS::Serverless::Function.StateMachineSAMPT (__added__) +* AWS::Serverless::Function.StreamSAMPT (__added__) +* AWS::Serverless::Function.TableSAMPT (__added__) +* AWS::Serverless::Function.TableStreamSAMPT (__added__) +* AWS::Serverless::Function.TopicSAMPT (__added__) + # CloudFormation Resource Specification v3.3.0 ## New Resource Types diff --git a/packages/@aws-cdk/cfnspec/spec-source/000_sam.spec.json b/packages/@aws-cdk/cfnspec/spec-source/000_sam.spec.json index ea5ccfff6a627..ca7757ba518e8 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/000_sam.spec.json +++ b/packages/@aws-cdk/cfnspec/spec-source/000_sam.spec.json @@ -92,6 +92,17 @@ } } }, + "AWS::Serverless::Function.BucketSAMPT": { + "Documentation": "https://github.com/awslabs/serverless-application-model/blob/master/docs/policy_templates.rst", + "Properties": { + "BucketName": { + "Documentation": "https://github.com/awslabs/serverless-application-model/blob/master/docs/policy_templates.rst", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Immutable" + } + } + }, "AWS::Serverless::Function.CloudWatchEventEvent": { "Documentation": "https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md#cloudwatchevent", "Properties": { @@ -115,6 +126,17 @@ } } }, + "AWS::Serverless::Function.CollectionSAMPT": { + "Documentation": "https://github.com/awslabs/serverless-application-model/blob/master/docs/policy_templates.rst", + "Properties": { + "CollectionId": { + "Documentation": "https://github.com/awslabs/serverless-application-model/blob/master/docs/policy_templates.rst", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Immutable" + } + } + }, "AWS::Serverless::Function.DeadLetterQueue": { "Documentation": "https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md#deadletterqueue-object", "Properties": { @@ -169,6 +191,17 @@ } } }, + "AWS::Serverless::Function.DomainSAMPT": { + "Documentation": "https://github.com/awslabs/serverless-application-model/blob/master/docs/policy_templates.rst", + "Properties": { + "DomainName": { + "Documentation": "https://github.com/awslabs/serverless-application-model/blob/master/docs/policy_templates.rst", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Immutable" + } + } + }, "AWS::Serverless::Function.DynamoDBEvent": { "Documentation": "https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md#dynamodb", "Properties": { @@ -198,6 +231,10 @@ } } }, + "AWS::Serverless::Function.EmptySAMPT": { + "Documentation": "https://github.com/awslabs/serverless-application-model/blob/master/docs/policy_templates.rst", + "Properties": {} + }, "AWS::Serverless::Function.EventSource": { "Documentation": "https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md#event-source-object", "Properties": { @@ -238,6 +275,17 @@ } } }, + "AWS::Serverless::Function.FunctionSAMPT": { + "Documentation": "https://github.com/awslabs/serverless-application-model/blob/master/docs/policy_templates.rst", + "Properties": { + "FunctionName": { + "Documentation": "https://github.com/awslabs/serverless-application-model/blob/master/docs/policy_templates.rst", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Immutable" + } + } + }, "AWS::Serverless::Function.IAMPolicyDocument": { "Documentation": "http://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies.html", "Properties": { @@ -249,6 +297,17 @@ } } }, + "AWS::Serverless::Function.IdentitySAMPT": { + "Documentation": "https://github.com/awslabs/serverless-application-model/blob/master/docs/policy_templates.rst", + "Properties": { + "IdentityName": { + "Documentation": "https://github.com/awslabs/serverless-application-model/blob/master/docs/policy_templates.rst", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Immutable" + } + } + }, "AWS::Serverless::Function.IoTRuleEvent": { "Documentation": "https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md#iotrule", "Properties": { @@ -266,6 +325,17 @@ } } }, + "AWS::Serverless::Function.KeySAMPT": { + "Documentation": "https://github.com/awslabs/serverless-application-model/blob/master/docs/policy_templates.rst", + "Properties": { + "KeyId": { + "Documentation": "https://github.com/awslabs/serverless-application-model/blob/master/docs/policy_templates.rst", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Immutable" + } + } + }, "AWS::Serverless::Function.KinesisEvent": { "Documentation": "https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md#kinesis", "Properties": { @@ -295,6 +365,28 @@ } } }, + "AWS::Serverless::Function.LogGroupSAMPT": { + "Documentation": "https://github.com/awslabs/serverless-application-model/blob/master/docs/policy_templates.rst", + "Properties": { + "LogGroupName": { + "Documentation": "https://github.com/awslabs/serverless-application-model/blob/master/docs/policy_templates.rst", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Immutable" + } + } + }, + "AWS::Serverless::Function.QueueSAMPT": { + "Documentation": "https://github.com/awslabs/serverless-application-model/blob/master/docs/policy_templates.rst", + "Properties": { + "QueueName": { + "Documentation": "https://github.com/awslabs/serverless-application-model/blob/master/docs/policy_templates.rst", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Immutable" + } + } + }, "AWS::Serverless::Function.S3Event": { "Documentation": "https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md#s3", "Properties": { @@ -356,6 +448,161 @@ } } }, + "AWS::Serverless::Function.SAMPolicyTemplate": { + "Documentation": "https://github.com/awslabs/serverless-application-model/blob/master/docs/policy_templates.rst", + "Properties": { + "AMIDescribePolicy": { + "Documentation": "https://github.com/awslabs/serverless-application-model/blob/master/docs/policy_templates.rst", + "Type": "EmptySAMPT", + "UpdateType": "Immutable" + }, + "CloudFormationDescribeStacksPolicy": { + "Documentation": "https://github.com/awslabs/serverless-application-model/blob/master/docs/policy_templates.rst", + "Type": "EmptySAMPT", + "UpdateType": "Immutable" + }, + "CloudWatchPutMetricPolicy": { + "Documentation": "https://github.com/awslabs/serverless-application-model/blob/master/docs/policy_templates.rst", + "Type": "EmptySAMPT", + "UpdateType": "Immutable" + }, + "DynamoDBCrudPolicy": { + "Documentation": "https://github.com/awslabs/serverless-application-model/blob/master/docs/policy_templates.rst", + "Type": "TableSAMPT", + "UpdateType": "Immutable" + }, + "DynamoDBReadPolicy": { + "Documentation": "https://github.com/awslabs/serverless-application-model/blob/master/docs/policy_templates.rst", + "Type": "TableSAMPT", + "UpdateType": "Immutable" + }, + "DynamoDBStreamReadPolicy": { + "Documentation": "https://github.com/awslabs/serverless-application-model/blob/master/docs/policy_templates.rst", + "Type": "TableStreamSAMPT", + "UpdateType": "Immutable" + }, + "EC2DescribePolicy": { + "Documentation": "https://github.com/awslabs/serverless-application-model/blob/master/docs/policy_templates.rst", + "Type": "EmptySAMPT", + "UpdateType": "Immutable" + }, + "ElasticsearchHttpPostPolicy": { + "Documentation": "https://github.com/awslabs/serverless-application-model/blob/master/docs/policy_templates.rst", + "Type": "DomainSAMPT", + "UpdateType": "Immutable" + }, + "FilterLogEventsPolicy": { + "Documentation": "https://github.com/awslabs/serverless-application-model/blob/master/docs/policy_templates.rst", + "Type": "LogGroupSAMPT", + "UpdateType": "Immutable" + }, + "KMSDecryptPolicy": { + "Documentation": "https://github.com/awslabs/serverless-application-model/blob/master/docs/policy_templates.rst", + "Type": "KeySAMPT", + "UpdateType": "Immutable" + }, + "KinesisCrudPolicy": { + "Documentation": "https://github.com/awslabs/serverless-application-model/blob/master/docs/policy_templates.rst", + "Type": "StreamSAMPT", + "UpdateType": "Immutable" + }, + "KinesisStreamReadPolicy": { + "Documentation": "https://github.com/awslabs/serverless-application-model/blob/master/docs/policy_templates.rst", + "Type": "StreamSAMPT", + "UpdateType": "Immutable" + }, + "LambdaInvokePolicy": { + "Documentation": "https://github.com/awslabs/serverless-application-model/blob/master/docs/policy_templates.rst", + "Type": "FunctionSAMPT", + "UpdateType": "Immutable" + }, + "RekognitionDetectOnlyPolicy": { + "Documentation": "https://github.com/awslabs/serverless-application-model/blob/master/docs/policy_templates.rst", + "Type": "EmptySAMPT", + "UpdateType": "Immutable" + }, + "RekognitionLabelsPolicy": { + "Documentation": "https://github.com/awslabs/serverless-application-model/blob/master/docs/policy_templates.rst", + "Type": "EmptySAMPT", + "UpdateType": "Immutable" + }, + "RekognitionNoDataAccessPolicy": { + "Documentation": "https://github.com/awslabs/serverless-application-model/blob/master/docs/policy_templates.rst", + "Type": "CollectionSAMPT", + "UpdateType": "Immutable" + }, + "RekognitionReadPolicy": { + "Documentation": "https://github.com/awslabs/serverless-application-model/blob/master/docs/policy_templates.rst", + "Type": "CollectionSAMPT", + "UpdateType": "Immutable" + }, + "RekognitionWriteOnlyAccessPolicy": { + "Documentation": "https://github.com/awslabs/serverless-application-model/blob/master/docs/policy_templates.rst", + "Type": "CollectionSAMPT", + "UpdateType": "Immutable" + }, + "S3CrudPolicy": { + "Documentation": "https://github.com/awslabs/serverless-application-model/blob/master/docs/policy_templates.rst", + "Type": "BucketSAMPT", + "UpdateType": "Immutable" + }, + "S3ReadPolicy": { + "Documentation": "https://github.com/awslabs/serverless-application-model/blob/master/docs/policy_templates.rst", + "Type": "BucketSAMPT", + "UpdateType": "Immutable" + }, + "SESBulkTemplatedCrudPolicy": { + "Documentation": "https://github.com/awslabs/serverless-application-model/blob/master/docs/policy_templates.rst", + "Type": "IdentitySAMPT", + "UpdateType": "Immutable" + }, + "SESCrudPolicy": { + "Documentation": "https://github.com/awslabs/serverless-application-model/blob/master/docs/policy_templates.rst", + "Type": "IdentitySAMPT", + "UpdateType": "Immutable" + }, + "SESEmailTemplateCrudPolicy": { + "Documentation": "https://github.com/awslabs/serverless-application-model/blob/master/docs/policy_templates.rst", + "Type": "EmptySAMPT", + "UpdateType": "Immutable" + }, + "SESSendBouncePolicy": { + "Documentation": "https://github.com/awslabs/serverless-application-model/blob/master/docs/policy_templates.rst", + "Type": "IdentitySAMPT", + "UpdateType": "Immutable" + }, + "SNSCrudPolicy": { + "Documentation": "https://github.com/awslabs/serverless-application-model/blob/master/docs/policy_templates.rst", + "Type": "TopicSAMPT", + "UpdateType": "Immutable" + }, + "SNSPublishMessagePolicy": { + "Documentation": "https://github.com/awslabs/serverless-application-model/blob/master/docs/policy_templates.rst", + "Type": "TopicSAMPT", + "UpdateType": "Immutable" + }, + "SQSPollerPolicy": { + "Documentation": "https://github.com/awslabs/serverless-application-model/blob/master/docs/policy_templates.rst", + "Type": "QueueSAMPT", + "UpdateType": "Immutable" + }, + "SQSSendMessagePolicy": { + "Documentation": "https://github.com/awslabs/serverless-application-model/blob/master/docs/policy_templates.rst", + "Type": "QueueSAMPT", + "UpdateType": "Immutable" + }, + "StepFunctionsExecutionPolicy": { + "Documentation": "https://github.com/awslabs/serverless-application-model/blob/master/docs/policy_templates.rst", + "Type": "StateMachineSAMPT", + "UpdateType": "Immutable" + }, + "VPCAccessPolicy": { + "Documentation": "https://github.com/awslabs/serverless-application-model/blob/master/docs/policy_templates.rst", + "Type": "EmptySAMPT", + "UpdateType": "Immutable" + } + } + }, "AWS::Serverless::Function.SNSEvent": { "Documentation": "https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md#sns", "Properties": { @@ -407,6 +654,67 @@ } } }, + "AWS::Serverless::Function.StateMachineSAMPT": { + "Documentation": "https://github.com/awslabs/serverless-application-model/blob/master/docs/policy_templates.rst", + "Properties": { + "StateMachineName": { + "Documentation": "https://github.com/awslabs/serverless-application-model/blob/master/docs/policy_templates.rst", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Immutable" + } + } + }, + "AWS::Serverless::Function.StreamSAMPT": { + "Documentation": "https://github.com/awslabs/serverless-application-model/blob/master/docs/policy_templates.rst", + "Properties": { + "StreamName": { + "Documentation": "https://github.com/awslabs/serverless-application-model/blob/master/docs/policy_templates.rst", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Immutable" + } + } + }, + "AWS::Serverless::Function.TableSAMPT": { + "Documentation": "https://github.com/awslabs/serverless-application-model/blob/master/docs/policy_templates.rst", + "Properties": { + "TableName": { + "Documentation": "https://github.com/awslabs/serverless-application-model/blob/master/docs/policy_templates.rst", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Immutable" + } + } + }, + "AWS::Serverless::Function.TableStreamSAMPT": { + "Documentation": "https://github.com/awslabs/serverless-application-model/blob/master/docs/policy_templates.rst", + "Properties": { + "StreamName": { + "Documentation": "https://github.com/awslabs/serverless-application-model/blob/master/docs/policy_templates.rst", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Immutable" + }, + "TableName": { + "Documentation": "https://github.com/awslabs/serverless-application-model/blob/master/docs/policy_templates.rst", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Immutable" + } + } + }, + "AWS::Serverless::Function.TopicSAMPT": { + "Documentation": "https://github.com/awslabs/serverless-application-model/blob/master/docs/policy_templates.rst", + "Properties": { + "TopicName": { + "Documentation": "https://github.com/awslabs/serverless-application-model/blob/master/docs/policy_templates.rst", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Immutable" + } + } + }, "AWS::Serverless::Function.VpcConfig": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-function-vpcconfig.html", "Properties": { @@ -699,7 +1007,8 @@ "Policies": { "Documentation": "https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md#awsserverlessfunction", "ItemTypes": [ - "IAMPolicyDocument" + "IAMPolicyDocument", + "SAMPolicyTemplate" ], "PrimitiveItemTypes": [ "String"