forked from aws/aws-sam-cli
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: Update aws-sam-translator Dependency (aws#1330)
- Loading branch information
Showing
118 changed files
with
5,255 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
tests/functional/commands/validate/lib/models/alexa_skill.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# File: sam.yml | ||
# Version: 0.9 | ||
|
||
AWSTemplateFormatVersion: '2010-09-09' | ||
Parameters: {} | ||
Resources: | ||
AlexaSkillFunc: | ||
Type: AWS::Serverless::Function | ||
Properties: | ||
CodeUri: s3://sam-demo-bucket/hello.zip | ||
Description: Created by SAM | ||
Events: | ||
AlexaSkillEvent: | ||
Type: AlexaSkill | ||
Handler: index.handler | ||
MemorySize: 1024 | ||
Runtime: nodejs4.3 | ||
Timeout: 3 | ||
|
20 changes: 20 additions & 0 deletions
20
tests/functional/commands/validate/lib/models/alexa_skill_with_skill_id.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# File: sam.yml | ||
# Version: 0.9 | ||
|
||
AWSTemplateFormatVersion: '2010-09-09' | ||
Parameters: {} | ||
Resources: | ||
AlexaSkillFunc: | ||
Type: AWS::Serverless::Function | ||
Properties: | ||
CodeUri: s3://sam-demo-bucket/hello.zip | ||
Description: Created by SAM | ||
Events: | ||
AlexaSkillEvent: | ||
Type: AlexaSkill | ||
Properties: | ||
SkillId: amzn1.ask.skill.12345678-1234-1234-1234-123456789 | ||
Handler: index.handler | ||
MemorySize: 1024 | ||
Runtime: nodejs4.3 | ||
Timeout: 3 |
148 changes: 148 additions & 0 deletions
148
tests/functional/commands/validate/lib/models/all_policy_templates.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,148 @@ | ||
# "Kitchen Sink" test containing all supported policy templates. The idea is to know every one of them is | ||
# transformable and fail on any changes in the policy template definition without updating the test | ||
# Since this not about testing the transformation logic, we will keep the policy template parameter values as literal | ||
# string | ||
|
||
Resources: | ||
KitchenSinkFunction: | ||
Type: 'AWS::Serverless::Function' | ||
Properties: | ||
CodeUri: s3://sam-demo-bucket/hello.zip | ||
Handler: hello.handler | ||
Runtime: python2.7 | ||
Policies: | ||
|
||
- SQSPollerPolicy: | ||
QueueName: name | ||
|
||
- LambdaInvokePolicy: | ||
FunctionName: name | ||
|
||
- CloudWatchPutMetricPolicy: {} | ||
|
||
- EC2DescribePolicy: {} | ||
|
||
- DynamoDBCrudPolicy: | ||
TableName: name | ||
|
||
- DynamoDBReadPolicy: | ||
TableName: name | ||
|
||
- SESSendBouncePolicy: | ||
IdentityName: name | ||
|
||
- ElasticsearchHttpPostPolicy: | ||
DomainName: name | ||
|
||
- S3ReadPolicy: | ||
BucketName: name | ||
|
||
- S3CrudPolicy: | ||
BucketName: name | ||
|
||
- AMIDescribePolicy: {} | ||
|
||
- CloudFormationDescribeStacksPolicy: {} | ||
|
||
- RekognitionNoDataAccessPolicy: | ||
CollectionId: id | ||
|
||
- RekognitionReadPolicy: | ||
CollectionId: id | ||
|
||
- RekognitionWriteOnlyAccessPolicy: | ||
CollectionId: id | ||
|
||
- SQSSendMessagePolicy: | ||
QueueName: name | ||
|
||
- SNSPublishMessagePolicy: | ||
TopicName: name | ||
|
||
- VPCAccessPolicy: {} | ||
|
||
- DynamoDBStreamReadPolicy: | ||
TableName: name | ||
StreamName: name | ||
|
||
- KinesisStreamReadPolicy: | ||
StreamName: name | ||
|
||
- SESCrudPolicy: | ||
IdentityName: name | ||
|
||
- SNSCrudPolicy: | ||
TopicName: name | ||
|
||
- KinesisCrudPolicy: | ||
StreamName: name | ||
|
||
- KMSDecryptPolicy: | ||
KeyId: keyId | ||
|
||
- PollyFullAccessPolicy: | ||
LexiconName: name | ||
|
||
- S3FullAccessPolicy: | ||
BucketName: name | ||
|
||
- CodePipelineLambdaExecutionPolicy: {} | ||
|
||
- ServerlessRepoReadWriteAccessPolicy: {} | ||
|
||
- EC2CopyImagePolicy: | ||
ImageId: id | ||
|
||
- CodePipelineReadOnlyPolicy: | ||
PipelineName: pipeline | ||
|
||
- CloudWatchDashboardPolicy: {} | ||
|
||
- RekognitionFacesPolicy: | ||
CollectionId: collection | ||
|
||
- RekognitionLabelsPolicy: {} | ||
|
||
- DynamoDBBackupFullAccessPolicy: | ||
TableName: table | ||
|
||
- DynamoDBRestoreFromBackupPolicy: | ||
TableName: table | ||
|
||
- ComprehendBasicAccessPolicy: {} | ||
|
||
- AWSSecretsManagerRotationPolicy: | ||
FunctionName: function | ||
|
||
- MobileAnalyticsWriteOnlyAccessPolicy: {} | ||
|
||
- PinpointEndpointAccessPolicy: | ||
PinpointApplicationId: id | ||
|
||
- RekognitionDetectOnlyPolicy: {} | ||
|
||
- RekognitionFacesManagementPolicy: | ||
CollectionId: collection | ||
|
||
- EKSDescribePolicy: {} | ||
|
||
- CostExplorerReadOnlyPolicy: {} | ||
|
||
- OrganizationsListAccountsPolicy: {} | ||
|
||
- DynamoDBReconfigurePolicy: | ||
TableName: name | ||
|
||
- SESBulkTemplatedCrudPolicy: | ||
IdentityName: name | ||
|
||
- SESEmailTemplateCrudPolicy: {} | ||
|
||
- FilterLogEventsPolicy: | ||
LogGroupName: name | ||
|
||
- SSMParameterReadPolicy: | ||
ParameterName: name | ||
|
||
- StepFunctionsExecutionPolicy: | ||
StateMachineName: name |
22 changes: 22 additions & 0 deletions
22
tests/functional/commands/validate/lib/models/api_cache.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
Resources: | ||
HtmlFunction: | ||
Type: AWS::Serverless::Function | ||
Properties: | ||
CodeUri: s3://sam-demo-bucket/member_portal.zip | ||
Handler: index.gethtml | ||
Runtime: nodejs4.3 | ||
Events: | ||
GetHtml: | ||
Type: Api | ||
Properties: | ||
RestApiId: HtmlApi | ||
Path: / | ||
Method: get | ||
|
||
HtmlApi: | ||
Type: AWS::Serverless::Api | ||
Properties: | ||
StageName: Prod | ||
DefinitionUri: s3://sam-demo-bucket/webpage_swagger.json | ||
CacheClusterEnabled: true | ||
CacheClusterSize: "1.6" |
31 changes: 31 additions & 0 deletions
31
tests/functional/commands/validate/lib/models/api_endpoint_configuration.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
Parameters: | ||
EndpointConfig: | ||
Type: String | ||
|
||
Globals: | ||
Api: | ||
# Overriding this property for Implicit API | ||
EndpointConfiguration: { | ||
"Ref": "EndpointConfig" | ||
} | ||
|
||
Resources: | ||
ImplicitApiFunction: | ||
Type: AWS::Serverless::Function | ||
Properties: | ||
CodeUri: s3://sam-demo-bucket/member_portal.zip | ||
Handler: index.gethtml | ||
Runtime: nodejs4.3 | ||
Events: | ||
GetHtml: | ||
Type: Api | ||
Properties: | ||
Path: / | ||
Method: get | ||
|
||
ExplicitApi: | ||
Type: AWS::Serverless::Api | ||
Properties: | ||
StageName: Prod | ||
DefinitionUri: s3://sam-demo-bucket/webpage_swagger.json | ||
EndpointConfiguration: SomeValue |
28 changes: 28 additions & 0 deletions
28
tests/functional/commands/validate/lib/models/api_request_model.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
Resources: | ||
HtmlFunction: | ||
Type: AWS::Serverless::Function | ||
Properties: | ||
CodeUri: s3://sam-demo-bucket/member_portal.zip | ||
Handler: index.gethtml | ||
Runtime: nodejs4.3 | ||
Events: | ||
GetHtml: | ||
Type: Api | ||
Properties: | ||
RestApiId: HtmlApi | ||
Path: / | ||
Method: get | ||
RequestModel: | ||
Model: User | ||
Required: true | ||
|
||
HtmlApi: | ||
Type: AWS::Serverless::Api | ||
Properties: | ||
StageName: Prod | ||
Models: | ||
User: | ||
type: object | ||
properties: | ||
username: | ||
type: string |
42 changes: 42 additions & 0 deletions
42
tests/functional/commands/validate/lib/models/api_request_model_openapi_3.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
Resources: | ||
HtmlFunction: | ||
Type: AWS::Serverless::Function | ||
Properties: | ||
CodeUri: s3://sam-demo-bucket/member_portal.zip | ||
Handler: index.gethtml | ||
Runtime: nodejs4.3 | ||
Events: | ||
GetHtml: | ||
Type: Api | ||
Properties: | ||
RestApiId: HtmlApi | ||
Path: / | ||
Method: get | ||
RequestModel: | ||
Model: User | ||
Required: true | ||
Iam: | ||
Type: Api | ||
Properties: | ||
RequestModel: | ||
Model: User | ||
Required: true | ||
RestApiId: | ||
Ref: HtmlApi | ||
Method: get | ||
Path: /iam | ||
Auth: | ||
Authorizer: AWS_IAM | ||
|
||
|
||
HtmlApi: | ||
Type: AWS::Serverless::Api | ||
Properties: | ||
StageName: Prod | ||
OpenApiVersion: '3.0.1' | ||
Models: | ||
User: | ||
type: object | ||
properties: | ||
username: | ||
type: string |
25 changes: 25 additions & 0 deletions
25
tests/functional/commands/validate/lib/models/api_with_access_log_setting.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
Globals: | ||
Api: | ||
AccessLogSetting: | ||
DestinationArn: "arn:aws:logs:us-west-2:012345678901/API-Gateway-Execution-Logs_0123456789/prod:log-stream:12345678910" | ||
Format: "$context.requestId" | ||
|
||
Resources: | ||
ImplicitApiFunction: | ||
Type: AWS::Serverless::Function | ||
Properties: | ||
CodeUri: s3://sam-demo-bucket/member_portal.zip | ||
Handler: index.gethtml | ||
Runtime: nodejs4.3 | ||
Events: | ||
GetHtml: | ||
Type: Api | ||
Properties: | ||
Path: / | ||
Method: get | ||
|
||
ExplicitApi: | ||
Type: AWS::Serverless::Api | ||
Properties: | ||
StageName: Prod | ||
DefinitionUri: s3://sam-demo-bucket/webpage_swagger.json |
Oops, something went wrong.