Skip to content

Commit bfa40b1

Browse files
author
Sam Goodwin
authored
feat(serverless): add AWS::Serverless::Application to CFN spec (#1634)
Update SAM specification from goformation and patch minor bugs in it. Brings in `AWS::Serverless::Application` and updates `AWS::Serverless::Api` with authorizers.
1 parent ebb8aa1 commit bfa40b1

File tree

7 files changed

+369
-7
lines changed

7 files changed

+369
-7
lines changed
Lines changed: 39 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,42 @@
1-
import { Test, testCase } from 'nodeunit';
2-
import {} from '../lib';
1+
import {expect} from '@aws-cdk/assert';
2+
import cdk = require('@aws-cdk/cdk');
3+
import { Test } from 'nodeunit';
4+
import { CfnApplication } from '../lib';
5+
6+
export = {
7+
'construct an AWS::Serverless::Application'(test: Test) {
8+
const stack = new cdk.Stack();
9+
10+
new CfnApplication(stack, 'App', {
11+
location: {
12+
applicationId: 'arn:aws:serverlessrepo:us-east-1:077246666028:applications/aws-serverless-twitter-event-source',
13+
semanticVersion: '2.0.0'
14+
},
15+
parameters: {
16+
SearchText: '#serverless -filter:nativeretweets',
17+
TweetProcessorFunctionName: 'test'
18+
}
19+
});
20+
21+
expect(stack).toMatch({
22+
Transform: 'AWS::Serverless-2016-10-31',
23+
Resources: {
24+
App: {
25+
Type: 'AWS::Serverless::Application',
26+
Properties: {
27+
Location: {
28+
ApplicationId: 'arn:aws:serverlessrepo:us-east-1:077246666028:applications/aws-serverless-twitter-event-source',
29+
SemanticVersion: '2.0.0'
30+
},
31+
Parameters: {
32+
SearchText: '#serverless -filter:nativeretweets',
33+
TweetProcessorFunctionName: 'test'
34+
}
35+
}
36+
}
37+
}
38+
});
339

4-
export = testCase({
5-
notTested(test: Test) {
6-
test.ok(true, 'No tests are specified for this package.');
740
test.done();
841
}
9-
});
42+
};

packages/@aws-cdk/cfnspec/CHANGELOG.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,34 @@
1+
# Serverless Application Model (SAM) Resource Specification v2016-10-31
2+
3+
## New Resource Types
4+
5+
* AWS::Serverless::Application
6+
* AWS::Serverless::LayerVersion
7+
8+
## Attribute Changes
9+
10+
11+
## Property Changes
12+
13+
* AWS::Serverless::Api Auth (__added__)
14+
* AWS::Serverless::Api BinaryMediaTypes (__added__)
15+
* AWS::Serverless::Api Cors (__added__)
16+
* AWS::Serverless::Api EndpointConfiguration (__added__)
17+
* AWS::Serverless::Function AutoPublishAlias (__added__)
18+
* AWS::Serverless::Function DeploymentPreference (__added__)
19+
* AWS::Serverless::Function Layers (__added__)
20+
* AWS::Serverless::Function ReservedConcurrentExecutions (__added__)
21+
* AWS::Serverless::SimpleTable SSESpecification (__added__)
22+
* AWS::Serverless::SimpleTable TableName (__added__)
23+
* AWS::Serverless::SimpleTable Tags (__added__)
24+
25+
## Property Type Changes
26+
27+
* AWS::Serverless::Api.Auth (__added__)
28+
* AWS::Serverless::Function.DeploymentPreference (__added__)
29+
* AWS::Serverless::SimpleTable.SSESpecification (__added__)
30+
31+
132

233
# CloudFormation Resource Specification v2.21.0
334

0 commit comments

Comments
 (0)