I have created an API Gateway using AWS::Serverless::API in SAM and now I want to add Tags to Gateway in order to enforce security constraints on every Gateway with the same tag.
Type: AWS::Serverless::Api
Properties:
Name: PrivateApi
StageName: v1
Tags:
- Key: TagName
Value: TagValue
MethodSettings:
...
After looking at the documentation I have came up with the code above. As the documentation states it supports Tags in the way shown above but when I deploy I get the following error.
samcli.commands.validate.lib.exceptions.InvalidSamDocumentException: [InvalidResourceException('PrivateApi', "Type of property 'Tags' is invalid.")] ('PrivateApi', "Type of property 'Tags' is invalid.")
Link to Documentation about Tags: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-resource-tags.html
Any help on this would be appreciated!