Skip to content

Commit

Permalink
feat(serverless): add AWS::Serverless::Application to CFN spec (aws#1634
Browse files Browse the repository at this point in the history
)

Update SAM specification from goformation and patch minor bugs in it. Brings in `AWS::Serverless::Application` and updates `AWS::Serverless::Api` with authorizers.
  • Loading branch information
Sam Goodwin authored Feb 5, 2019
1 parent ebb8aa1 commit bfa40b1
Show file tree
Hide file tree
Showing 7 changed files with 369 additions and 7 deletions.
45 changes: 39 additions & 6 deletions packages/@aws-cdk/aws-serverless/test/test.serverless.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,42 @@
import { Test, testCase } from 'nodeunit';
import {} from '../lib';
import {expect} from '@aws-cdk/assert';
import cdk = require('@aws-cdk/cdk');
import { Test } from 'nodeunit';
import { CfnApplication } from '../lib';

export = {
'construct an AWS::Serverless::Application'(test: Test) {
const stack = new cdk.Stack();

new CfnApplication(stack, 'App', {
location: {
applicationId: 'arn:aws:serverlessrepo:us-east-1:077246666028:applications/aws-serverless-twitter-event-source',
semanticVersion: '2.0.0'
},
parameters: {
SearchText: '#serverless -filter:nativeretweets',
TweetProcessorFunctionName: 'test'
}
});

expect(stack).toMatch({
Transform: 'AWS::Serverless-2016-10-31',
Resources: {
App: {
Type: 'AWS::Serverless::Application',
Properties: {
Location: {
ApplicationId: 'arn:aws:serverlessrepo:us-east-1:077246666028:applications/aws-serverless-twitter-event-source',
SemanticVersion: '2.0.0'
},
Parameters: {
SearchText: '#serverless -filter:nativeretweets',
TweetProcessorFunctionName: 'test'
}
}
}
}
});

export = testCase({
notTested(test: Test) {
test.ok(true, 'No tests are specified for this package.');
test.done();
}
});
};
31 changes: 31 additions & 0 deletions packages/@aws-cdk/cfnspec/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,34 @@
# Serverless Application Model (SAM) Resource Specification v2016-10-31

## New Resource Types

* AWS::Serverless::Application
* AWS::Serverless::LayerVersion

## Attribute Changes


## Property Changes

* AWS::Serverless::Api Auth (__added__)
* AWS::Serverless::Api BinaryMediaTypes (__added__)
* AWS::Serverless::Api Cors (__added__)
* AWS::Serverless::Api EndpointConfiguration (__added__)
* AWS::Serverless::Function AutoPublishAlias (__added__)
* AWS::Serverless::Function DeploymentPreference (__added__)
* AWS::Serverless::Function Layers (__added__)
* AWS::Serverless::Function ReservedConcurrentExecutions (__added__)
* AWS::Serverless::SimpleTable SSESpecification (__added__)
* AWS::Serverless::SimpleTable TableName (__added__)
* AWS::Serverless::SimpleTable Tags (__added__)

## Property Type Changes

* AWS::Serverless::Api.Auth (__added__)
* AWS::Serverless::Function.DeploymentPreference (__added__)
* AWS::Serverless::SimpleTable.SSESpecification (__added__)



# CloudFormation Resource Specification v2.21.0

Expand Down
Loading

0 comments on commit bfa40b1

Please sign in to comment.