Skip to content

Commit

Permalink
Merge pull request aws#3883 from groundbreaker/develop
Browse files Browse the repository at this point in the history
support AWS::Type::AppSync::FunctionConfiguration in artifact_exporter
  • Loading branch information
kyleknap authored Feb 21, 2019
2 parents d4ae7a1 + 591f683 commit d645479
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 1 deletion.
18 changes: 18 additions & 0 deletions awscli/customizations/cloudformation/artifact_exporter.py
Original file line number Diff line number Diff line change
Expand Up @@ -344,6 +344,22 @@ class AppSyncResolverResponseTemplateResource(Resource):
PACKAGE_NULL_PROPERTY = False


class AppSyncFunctionConfigurationRequestTemplateResource(Resource):
RESOURCE_TYPE = "AWS::AppSync::FunctionConfiguration"
PROPERTY_NAME = "RequestMappingTemplateS3Location"
# Don't package the directory if RequestMappingTemplateS3Location is omitted.
# Necessary to support RequestMappingTemplate
PACKAGE_NULL_PROPERTY = False


class AppSyncFunctionConfigurationResponseTemplateResource(Resource):
RESOURCE_TYPE = "AWS::AppSync::FunctionConfiguration"
PROPERTY_NAME = "ResponseMappingTemplateS3Location"
# Don't package the directory if ResponseMappingTemplateS3Location is omitted.
# Necessary to support ResponseMappingTemplate
PACKAGE_NULL_PROPERTY = False


class LambdaFunctionResource(ResourceWithS3UrlDict):
RESOURCE_TYPE = "AWS::Lambda::Function"
PROPERTY_NAME = "Code"
Expand Down Expand Up @@ -462,6 +478,8 @@ class ServerlessApplicationResource(CloudFormationStackResource):
GraphQLSchemaResource,
AppSyncResolverRequestTemplateResource,
AppSyncResolverResponseTemplateResource,
AppSyncFunctionConfigurationRequestTemplateResource,
AppSyncFunctionConfigurationResponseTemplateResource,
ApiGatewayRestApiResource,
LambdaFunctionResource,
ElasticBeanstalkApplicationVersion,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,11 @@
ServerlessApplicationResource, LambdaLayerVersionResource, \
copy_to_temp_dir, include_transform_export_handler, GLOBAL_EXPORT_DICT, \
ServerlessLayerVersionResource, ServerlessRepoApplicationLicense, \
ServerlessRepoApplicationReadme
ServerlessRepoApplicationReadme, \
AppSyncResolverRequestTemplateResource, \
AppSyncResolverResponseTemplateResource, \
AppSyncFunctionConfigurationRequestTemplateResource, \
AppSyncFunctionConfigurationResponseTemplateResource


def test_is_s3_url():
Expand Down Expand Up @@ -78,6 +82,26 @@ def test_all_resources_export():
"expected_result": uploaded_s3_url
},

{
"class": AppSyncResolverRequestTemplateResource,
"expected_result": uploaded_s3_url
},

{
"class": AppSyncResolverResponseTemplateResource,
"expected_result": uploaded_s3_url
},

{
"class": AppSyncFunctionConfigurationRequestTemplateResource,
"expected_result": uploaded_s3_url
},

{
"class": AppSyncFunctionConfigurationResponseTemplateResource,
"expected_result": uploaded_s3_url
},

{
"class": ApiGatewayRestApiResource,
"expected_result": {
Expand Down Expand Up @@ -112,6 +136,10 @@ def test_all_resources_export():
"class": ServerlessRepoApplicationReadme,
"expected_result": uploaded_s3_url
},
{
"class": ServerlessRepoApplicationLicense,
"expected_result": uploaded_s3_url
},
{
"class": ServerlessRepoApplicationLicense,
"expected_result": uploaded_s3_url
Expand Down

0 comments on commit d645479

Please sign in to comment.