diff --git a/samtranslator/plugins/api/implicit_api_plugin.py b/samtranslator/plugins/api/implicit_api_plugin.py index a878f0ba7..287131b2b 100644 --- a/samtranslator/plugins/api/implicit_api_plugin.py +++ b/samtranslator/plugins/api/implicit_api_plugin.py @@ -108,8 +108,11 @@ def _add_tags_to_implicit_api_if_necessary( implicit_api_resource = template.get(self.IMPLICIT_API_LOGICAL_ID) globals_var = template.get_globals().get(SamResourceType(resource.type).name) or {} - should_propagate_tags = resource.properties.get("PropagateTags") or globals_var.get("PropagateTags") - tags_properties = resource.properties.get("Tags") or globals_var.get("Tags") + local_propagate_tags = resource.properties.get("PropagateTags") + should_propagate_tags = ( + local_propagate_tags if local_propagate_tags is not None else globals_var.get("PropagateTags") + ) + tags_properties = {**(globals_var.get("Tags") or {}), **(resource.properties.get("Tags") or {})} if implicit_api_resource and tags_properties and should_propagate_tags: # This makes an assumption that the SAM resource has 'Tags' property and is a dictionary. diff --git a/tests/translator/input/function_with_local_and_global_tags_merge.yaml b/tests/translator/input/function_with_local_and_global_tags_merge.yaml new file mode 100644 index 000000000..7975c6cbe --- /dev/null +++ b/tests/translator/input/function_with_local_and_global_tags_merge.yaml @@ -0,0 +1,23 @@ +Globals: + Function: + Tags: + env: prod + +Resources: + ApiFunction: # Adds a GET api endpoint at "/" to the ApiGatewayApi via an Api event + Type: AWS::Serverless::Function + Properties: + PropagateTags: true + Tags: + app: foo + Events: + ApiEvent: + Type: Api + Properties: + Path: / + Method: get + Runtime: python3.7 + Handler: index.handler + InlineCode: |- + def handler(event, context): + return {'body': 'Hello World!', 'statusCode': 200} diff --git a/tests/translator/input/function_with_local_propagate_tags_false_overrides_global_true.yaml b/tests/translator/input/function_with_local_propagate_tags_false_overrides_global_true.yaml new file mode 100644 index 000000000..820cc0f40 --- /dev/null +++ b/tests/translator/input/function_with_local_propagate_tags_false_overrides_global_true.yaml @@ -0,0 +1,22 @@ +Globals: + Function: + PropagateTags: true + Tags: + test: 'yes' + +Resources: + ApiFunction: # Adds a GET api endpoint at "/" to the ApiGatewayApi via an Api event + Type: AWS::Serverless::Function + Properties: + PropagateTags: false + Events: + ApiEvent: + Type: Api + Properties: + Path: / + Method: get + Runtime: python3.7 + Handler: index.handler + InlineCode: |- + def handler(event, context): + return {'body': 'Hello World!', 'statusCode': 200} diff --git a/tests/translator/output/aws-cn/function_with_local_and_global_tags_merge.json b/tests/translator/output/aws-cn/function_with_local_and_global_tags_merge.json new file mode 100644 index 000000000..9fd5910fc --- /dev/null +++ b/tests/translator/output/aws-cn/function_with_local_and_global_tags_merge.json @@ -0,0 +1,163 @@ +{ + "Resources": { + "ApiFunction": { + "Properties": { + "Code": { + "ZipFile": "def handler(event, context):\n return {'body': 'Hello World!', 'statusCode': 200}" + }, + "Handler": "index.handler", + "Role": { + "Fn::GetAtt": [ + "ApiFunctionRole", + "Arn" + ] + }, + "Runtime": "python3.7", + "Tags": [ + { + "Key": "env", + "Value": "prod" + }, + { + "Key": "app", + "Value": "foo" + } + ] + }, + "Type": "AWS::Lambda::Function" + }, + "ApiFunctionApiEventPermissionProd": { + "Properties": { + "Action": "lambda:InvokeFunction", + "FunctionName": { + "Ref": "ApiFunction" + }, + "Principal": "apigateway.amazonaws.com", + "SourceArn": { + "Fn::Sub": [ + "arn:aws-cn:execute-api:${AWS::Region}:${AWS::AccountId}:${__ApiId__}/${__Stage__}/GET/", + { + "__ApiId__": { + "Ref": "ServerlessRestApi" + }, + "__Stage__": "*" + } + ] + } + }, + "Type": "AWS::Lambda::Permission" + }, + "ApiFunctionRole": { + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": [ + "sts:AssumeRole" + ], + "Effect": "Allow", + "Principal": { + "Service": [ + "lambda.amazonaws.com" + ] + } + } + ], + "Version": "2012-10-17" + }, + "ManagedPolicyArns": [ + "arn:aws-cn:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" + ], + "Tags": [ + { + "Key": "env", + "Value": "prod" + }, + { + "Key": "app", + "Value": "foo" + } + ] + }, + "Type": "AWS::IAM::Role" + }, + "ServerlessRestApi": { + "Properties": { + "Body": { + "info": { + "title": { + "Ref": "AWS::StackName" + }, + "version": "1.0" + }, + "paths": { + "/": { + "get": { + "responses": {}, + "x-amazon-apigateway-integration": { + "httpMethod": "POST", + "type": "aws_proxy", + "uri": { + "Fn::Sub": "arn:aws-cn:apigateway:${AWS::Region}:lambda:path/2015-03-31/functions/${ApiFunction.Arn}/invocations" + } + } + } + } + }, + "swagger": "2.0" + }, + "EndpointConfiguration": { + "Types": [ + "REGIONAL" + ] + }, + "Parameters": { + "endpointConfigurationTypes": "REGIONAL" + }, + "Tags": [ + { + "Key": "env", + "Value": "prod" + }, + { + "Key": "app", + "Value": "foo" + } + ] + }, + "Type": "AWS::ApiGateway::RestApi" + }, + "ServerlessRestApiDeploymentb0ed1521b2": { + "Properties": { + "Description": "RestApi deployment id: b0ed1521b2c5e65da74d55d16b139143ae483503", + "RestApiId": { + "Ref": "ServerlessRestApi" + }, + "StageName": "Stage" + }, + "Type": "AWS::ApiGateway::Deployment" + }, + "ServerlessRestApiProdStage": { + "Properties": { + "DeploymentId": { + "Ref": "ServerlessRestApiDeploymentb0ed1521b2" + }, + "RestApiId": { + "Ref": "ServerlessRestApi" + }, + "StageName": "Prod", + "Tags": [ + { + "Key": "env", + "Value": "prod" + }, + { + "Key": "app", + "Value": "foo" + } + ] + }, + "Type": "AWS::ApiGateway::Stage" + } + } +} diff --git a/tests/translator/output/aws-cn/function_with_local_propagate_tags_false_overrides_global_true.json b/tests/translator/output/aws-cn/function_with_local_propagate_tags_false_overrides_global_true.json new file mode 100644 index 000000000..f0296268d --- /dev/null +++ b/tests/translator/output/aws-cn/function_with_local_propagate_tags_false_overrides_global_true.json @@ -0,0 +1,143 @@ +{ + "Resources": { + "ApiFunction": { + "Properties": { + "Code": { + "ZipFile": "def handler(event, context):\n return {'body': 'Hello World!', 'statusCode': 200}" + }, + "Handler": "index.handler", + "Role": { + "Fn::GetAtt": [ + "ApiFunctionRole", + "Arn" + ] + }, + "Runtime": "python3.7", + "Tags": [ + { + "Key": "lambda:createdBy", + "Value": "SAM" + }, + { + "Key": "test", + "Value": "yes" + } + ] + }, + "Type": "AWS::Lambda::Function" + }, + "ApiFunctionApiEventPermissionProd": { + "Properties": { + "Action": "lambda:InvokeFunction", + "FunctionName": { + "Ref": "ApiFunction" + }, + "Principal": "apigateway.amazonaws.com", + "SourceArn": { + "Fn::Sub": [ + "arn:aws-cn:execute-api:${AWS::Region}:${AWS::AccountId}:${__ApiId__}/${__Stage__}/GET/", + { + "__ApiId__": { + "Ref": "ServerlessRestApi" + }, + "__Stage__": "*" + } + ] + } + }, + "Type": "AWS::Lambda::Permission" + }, + "ApiFunctionRole": { + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": [ + "sts:AssumeRole" + ], + "Effect": "Allow", + "Principal": { + "Service": [ + "lambda.amazonaws.com" + ] + } + } + ], + "Version": "2012-10-17" + }, + "ManagedPolicyArns": [ + "arn:aws-cn:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" + ], + "Tags": [ + { + "Key": "lambda:createdBy", + "Value": "SAM" + }, + { + "Key": "test", + "Value": "yes" + } + ] + }, + "Type": "AWS::IAM::Role" + }, + "ServerlessRestApi": { + "Properties": { + "Body": { + "info": { + "title": { + "Ref": "AWS::StackName" + }, + "version": "1.0" + }, + "paths": { + "/": { + "get": { + "responses": {}, + "x-amazon-apigateway-integration": { + "httpMethod": "POST", + "type": "aws_proxy", + "uri": { + "Fn::Sub": "arn:aws-cn:apigateway:${AWS::Region}:lambda:path/2015-03-31/functions/${ApiFunction.Arn}/invocations" + } + } + } + } + }, + "swagger": "2.0" + }, + "EndpointConfiguration": { + "Types": [ + "REGIONAL" + ] + }, + "Parameters": { + "endpointConfigurationTypes": "REGIONAL" + } + }, + "Type": "AWS::ApiGateway::RestApi" + }, + "ServerlessRestApiDeploymentb0ed1521b2": { + "Properties": { + "Description": "RestApi deployment id: b0ed1521b2c5e65da74d55d16b139143ae483503", + "RestApiId": { + "Ref": "ServerlessRestApi" + }, + "StageName": "Stage" + }, + "Type": "AWS::ApiGateway::Deployment" + }, + "ServerlessRestApiProdStage": { + "Properties": { + "DeploymentId": { + "Ref": "ServerlessRestApiDeploymentb0ed1521b2" + }, + "RestApiId": { + "Ref": "ServerlessRestApi" + }, + "StageName": "Prod" + }, + "Type": "AWS::ApiGateway::Stage" + } + } +} diff --git a/tests/translator/output/aws-us-gov/function_with_local_and_global_tags_merge.json b/tests/translator/output/aws-us-gov/function_with_local_and_global_tags_merge.json new file mode 100644 index 000000000..8c9d31f46 --- /dev/null +++ b/tests/translator/output/aws-us-gov/function_with_local_and_global_tags_merge.json @@ -0,0 +1,163 @@ +{ + "Resources": { + "ApiFunction": { + "Properties": { + "Code": { + "ZipFile": "def handler(event, context):\n return {'body': 'Hello World!', 'statusCode': 200}" + }, + "Handler": "index.handler", + "Role": { + "Fn::GetAtt": [ + "ApiFunctionRole", + "Arn" + ] + }, + "Runtime": "python3.7", + "Tags": [ + { + "Key": "env", + "Value": "prod" + }, + { + "Key": "app", + "Value": "foo" + } + ] + }, + "Type": "AWS::Lambda::Function" + }, + "ApiFunctionApiEventPermissionProd": { + "Properties": { + "Action": "lambda:InvokeFunction", + "FunctionName": { + "Ref": "ApiFunction" + }, + "Principal": "apigateway.amazonaws.com", + "SourceArn": { + "Fn::Sub": [ + "arn:aws-us-gov:execute-api:${AWS::Region}:${AWS::AccountId}:${__ApiId__}/${__Stage__}/GET/", + { + "__ApiId__": { + "Ref": "ServerlessRestApi" + }, + "__Stage__": "*" + } + ] + } + }, + "Type": "AWS::Lambda::Permission" + }, + "ApiFunctionRole": { + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": [ + "sts:AssumeRole" + ], + "Effect": "Allow", + "Principal": { + "Service": [ + "lambda.amazonaws.com" + ] + } + } + ], + "Version": "2012-10-17" + }, + "ManagedPolicyArns": [ + "arn:aws-us-gov:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" + ], + "Tags": [ + { + "Key": "env", + "Value": "prod" + }, + { + "Key": "app", + "Value": "foo" + } + ] + }, + "Type": "AWS::IAM::Role" + }, + "ServerlessRestApi": { + "Properties": { + "Body": { + "info": { + "title": { + "Ref": "AWS::StackName" + }, + "version": "1.0" + }, + "paths": { + "/": { + "get": { + "responses": {}, + "x-amazon-apigateway-integration": { + "httpMethod": "POST", + "type": "aws_proxy", + "uri": { + "Fn::Sub": "arn:aws-us-gov:apigateway:${AWS::Region}:lambda:path/2015-03-31/functions/${ApiFunction.Arn}/invocations" + } + } + } + } + }, + "swagger": "2.0" + }, + "EndpointConfiguration": { + "Types": [ + "REGIONAL" + ] + }, + "Parameters": { + "endpointConfigurationTypes": "REGIONAL" + }, + "Tags": [ + { + "Key": "env", + "Value": "prod" + }, + { + "Key": "app", + "Value": "foo" + } + ] + }, + "Type": "AWS::ApiGateway::RestApi" + }, + "ServerlessRestApiDeployment4539d6d48c": { + "Properties": { + "Description": "RestApi deployment id: 4539d6d48c1b3fdc71e492190aa2eeff27526d7f", + "RestApiId": { + "Ref": "ServerlessRestApi" + }, + "StageName": "Stage" + }, + "Type": "AWS::ApiGateway::Deployment" + }, + "ServerlessRestApiProdStage": { + "Properties": { + "DeploymentId": { + "Ref": "ServerlessRestApiDeployment4539d6d48c" + }, + "RestApiId": { + "Ref": "ServerlessRestApi" + }, + "StageName": "Prod", + "Tags": [ + { + "Key": "env", + "Value": "prod" + }, + { + "Key": "app", + "Value": "foo" + } + ] + }, + "Type": "AWS::ApiGateway::Stage" + } + } +} diff --git a/tests/translator/output/aws-us-gov/function_with_local_propagate_tags_false_overrides_global_true.json b/tests/translator/output/aws-us-gov/function_with_local_propagate_tags_false_overrides_global_true.json new file mode 100644 index 000000000..2b3dcb8c5 --- /dev/null +++ b/tests/translator/output/aws-us-gov/function_with_local_propagate_tags_false_overrides_global_true.json @@ -0,0 +1,143 @@ +{ + "Resources": { + "ApiFunction": { + "Properties": { + "Code": { + "ZipFile": "def handler(event, context):\n return {'body': 'Hello World!', 'statusCode': 200}" + }, + "Handler": "index.handler", + "Role": { + "Fn::GetAtt": [ + "ApiFunctionRole", + "Arn" + ] + }, + "Runtime": "python3.7", + "Tags": [ + { + "Key": "lambda:createdBy", + "Value": "SAM" + }, + { + "Key": "test", + "Value": "yes" + } + ] + }, + "Type": "AWS::Lambda::Function" + }, + "ApiFunctionApiEventPermissionProd": { + "Properties": { + "Action": "lambda:InvokeFunction", + "FunctionName": { + "Ref": "ApiFunction" + }, + "Principal": "apigateway.amazonaws.com", + "SourceArn": { + "Fn::Sub": [ + "arn:aws-us-gov:execute-api:${AWS::Region}:${AWS::AccountId}:${__ApiId__}/${__Stage__}/GET/", + { + "__ApiId__": { + "Ref": "ServerlessRestApi" + }, + "__Stage__": "*" + } + ] + } + }, + "Type": "AWS::Lambda::Permission" + }, + "ApiFunctionRole": { + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": [ + "sts:AssumeRole" + ], + "Effect": "Allow", + "Principal": { + "Service": [ + "lambda.amazonaws.com" + ] + } + } + ], + "Version": "2012-10-17" + }, + "ManagedPolicyArns": [ + "arn:aws-us-gov:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" + ], + "Tags": [ + { + "Key": "lambda:createdBy", + "Value": "SAM" + }, + { + "Key": "test", + "Value": "yes" + } + ] + }, + "Type": "AWS::IAM::Role" + }, + "ServerlessRestApi": { + "Properties": { + "Body": { + "info": { + "title": { + "Ref": "AWS::StackName" + }, + "version": "1.0" + }, + "paths": { + "/": { + "get": { + "responses": {}, + "x-amazon-apigateway-integration": { + "httpMethod": "POST", + "type": "aws_proxy", + "uri": { + "Fn::Sub": "arn:aws-us-gov:apigateway:${AWS::Region}:lambda:path/2015-03-31/functions/${ApiFunction.Arn}/invocations" + } + } + } + } + }, + "swagger": "2.0" + }, + "EndpointConfiguration": { + "Types": [ + "REGIONAL" + ] + }, + "Parameters": { + "endpointConfigurationTypes": "REGIONAL" + } + }, + "Type": "AWS::ApiGateway::RestApi" + }, + "ServerlessRestApiDeployment4539d6d48c": { + "Properties": { + "Description": "RestApi deployment id: 4539d6d48c1b3fdc71e492190aa2eeff27526d7f", + "RestApiId": { + "Ref": "ServerlessRestApi" + }, + "StageName": "Stage" + }, + "Type": "AWS::ApiGateway::Deployment" + }, + "ServerlessRestApiProdStage": { + "Properties": { + "DeploymentId": { + "Ref": "ServerlessRestApiDeployment4539d6d48c" + }, + "RestApiId": { + "Ref": "ServerlessRestApi" + }, + "StageName": "Prod" + }, + "Type": "AWS::ApiGateway::Stage" + } + } +} diff --git a/tests/translator/output/function_with_local_and_global_tags_merge.json b/tests/translator/output/function_with_local_and_global_tags_merge.json new file mode 100644 index 000000000..d6c12ff9d --- /dev/null +++ b/tests/translator/output/function_with_local_and_global_tags_merge.json @@ -0,0 +1,155 @@ +{ + "Resources": { + "ApiFunction": { + "Properties": { + "Code": { + "ZipFile": "def handler(event, context):\n return {'body': 'Hello World!', 'statusCode': 200}" + }, + "Handler": "index.handler", + "Role": { + "Fn::GetAtt": [ + "ApiFunctionRole", + "Arn" + ] + }, + "Runtime": "python3.7", + "Tags": [ + { + "Key": "env", + "Value": "prod" + }, + { + "Key": "app", + "Value": "foo" + } + ] + }, + "Type": "AWS::Lambda::Function" + }, + "ApiFunctionApiEventPermissionProd": { + "Properties": { + "Action": "lambda:InvokeFunction", + "FunctionName": { + "Ref": "ApiFunction" + }, + "Principal": "apigateway.amazonaws.com", + "SourceArn": { + "Fn::Sub": [ + "arn:aws:execute-api:${AWS::Region}:${AWS::AccountId}:${__ApiId__}/${__Stage__}/GET/", + { + "__ApiId__": { + "Ref": "ServerlessRestApi" + }, + "__Stage__": "*" + } + ] + } + }, + "Type": "AWS::Lambda::Permission" + }, + "ApiFunctionRole": { + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": [ + "sts:AssumeRole" + ], + "Effect": "Allow", + "Principal": { + "Service": [ + "lambda.amazonaws.com" + ] + } + } + ], + "Version": "2012-10-17" + }, + "ManagedPolicyArns": [ + "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" + ], + "Tags": [ + { + "Key": "env", + "Value": "prod" + }, + { + "Key": "app", + "Value": "foo" + } + ] + }, + "Type": "AWS::IAM::Role" + }, + "ServerlessRestApi": { + "Properties": { + "Body": { + "info": { + "title": { + "Ref": "AWS::StackName" + }, + "version": "1.0" + }, + "paths": { + "/": { + "get": { + "responses": {}, + "x-amazon-apigateway-integration": { + "httpMethod": "POST", + "type": "aws_proxy", + "uri": { + "Fn::Sub": "arn:aws:apigateway:${AWS::Region}:lambda:path/2015-03-31/functions/${ApiFunction.Arn}/invocations" + } + } + } + } + }, + "swagger": "2.0" + }, + "Tags": [ + { + "Key": "env", + "Value": "prod" + }, + { + "Key": "app", + "Value": "foo" + } + ] + }, + "Type": "AWS::ApiGateway::RestApi" + }, + "ServerlessRestApiDeploymentf96bc9abda": { + "Properties": { + "Description": "RestApi deployment id: f96bc9abdad53c001153ce8ba04f1667c7b0a004", + "RestApiId": { + "Ref": "ServerlessRestApi" + }, + "StageName": "Stage" + }, + "Type": "AWS::ApiGateway::Deployment" + }, + "ServerlessRestApiProdStage": { + "Properties": { + "DeploymentId": { + "Ref": "ServerlessRestApiDeploymentf96bc9abda" + }, + "RestApiId": { + "Ref": "ServerlessRestApi" + }, + "StageName": "Prod", + "Tags": [ + { + "Key": "env", + "Value": "prod" + }, + { + "Key": "app", + "Value": "foo" + } + ] + }, + "Type": "AWS::ApiGateway::Stage" + } + } +} diff --git a/tests/translator/output/function_with_local_propagate_tags_false_overrides_global_true.json b/tests/translator/output/function_with_local_propagate_tags_false_overrides_global_true.json new file mode 100644 index 000000000..bff7ed8df --- /dev/null +++ b/tests/translator/output/function_with_local_propagate_tags_false_overrides_global_true.json @@ -0,0 +1,135 @@ +{ + "Resources": { + "ApiFunction": { + "Properties": { + "Code": { + "ZipFile": "def handler(event, context):\n return {'body': 'Hello World!', 'statusCode': 200}" + }, + "Handler": "index.handler", + "Role": { + "Fn::GetAtt": [ + "ApiFunctionRole", + "Arn" + ] + }, + "Runtime": "python3.7", + "Tags": [ + { + "Key": "lambda:createdBy", + "Value": "SAM" + }, + { + "Key": "test", + "Value": "yes" + } + ] + }, + "Type": "AWS::Lambda::Function" + }, + "ApiFunctionApiEventPermissionProd": { + "Properties": { + "Action": "lambda:InvokeFunction", + "FunctionName": { + "Ref": "ApiFunction" + }, + "Principal": "apigateway.amazonaws.com", + "SourceArn": { + "Fn::Sub": [ + "arn:aws:execute-api:${AWS::Region}:${AWS::AccountId}:${__ApiId__}/${__Stage__}/GET/", + { + "__ApiId__": { + "Ref": "ServerlessRestApi" + }, + "__Stage__": "*" + } + ] + } + }, + "Type": "AWS::Lambda::Permission" + }, + "ApiFunctionRole": { + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": [ + "sts:AssumeRole" + ], + "Effect": "Allow", + "Principal": { + "Service": [ + "lambda.amazonaws.com" + ] + } + } + ], + "Version": "2012-10-17" + }, + "ManagedPolicyArns": [ + "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" + ], + "Tags": [ + { + "Key": "lambda:createdBy", + "Value": "SAM" + }, + { + "Key": "test", + "Value": "yes" + } + ] + }, + "Type": "AWS::IAM::Role" + }, + "ServerlessRestApi": { + "Properties": { + "Body": { + "info": { + "title": { + "Ref": "AWS::StackName" + }, + "version": "1.0" + }, + "paths": { + "/": { + "get": { + "responses": {}, + "x-amazon-apigateway-integration": { + "httpMethod": "POST", + "type": "aws_proxy", + "uri": { + "Fn::Sub": "arn:aws:apigateway:${AWS::Region}:lambda:path/2015-03-31/functions/${ApiFunction.Arn}/invocations" + } + } + } + } + }, + "swagger": "2.0" + } + }, + "Type": "AWS::ApiGateway::RestApi" + }, + "ServerlessRestApiDeploymentf96bc9abda": { + "Properties": { + "Description": "RestApi deployment id: f96bc9abdad53c001153ce8ba04f1667c7b0a004", + "RestApiId": { + "Ref": "ServerlessRestApi" + }, + "StageName": "Stage" + }, + "Type": "AWS::ApiGateway::Deployment" + }, + "ServerlessRestApiProdStage": { + "Properties": { + "DeploymentId": { + "Ref": "ServerlessRestApiDeploymentf96bc9abda" + }, + "RestApiId": { + "Ref": "ServerlessRestApi" + }, + "StageName": "Prod" + }, + "Type": "AWS::ApiGateway::Stage" + } + } +}