Skip to content

Commit ffb3140

Browse files
authored
add "graphqlapi:createdBy": "SAM" tag (#3254)
1 parent 251b6c8 commit ffb3140

File tree

64 files changed

+310
-20
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

64 files changed

+310
-20
lines changed

samtranslator/model/sam_resources.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2298,8 +2298,10 @@ def _construct_appsync_api_resources(
22982298
self._construct_lambda_auth_connector(api, arn, i) for i, arn in enumerate(lambda_auth_arns, 1)
22992299
]
23002300

2301-
if model.Tags:
2302-
api.Tags = get_tag_list(model.Tags)
2301+
if not model.Tags:
2302+
model.Tags = {}
2303+
model.Tags["graphqlapi:createdBy"] = "SAM"
2304+
api.Tags = get_tag_list(model.Tags)
23032305

23042306
# Logging has 3 possible types: dict, bool, and None.
23052307
# GraphQLApi will not include logging if and only if the user explicity sets Logging as false boolean.

tests/translator/output/aws-cn/graphqlapi_api_cache.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@
2121
{
2222
"Key": "key2",
2323
"Value": "value2"
24+
},
25+
{
26+
"Key": "graphqlapi:createdBy",
27+
"Value": "SAM"
2428
}
2529
],
2630
"XrayEnabled": true

tests/translator/output/aws-cn/graphqlapi_api_keys.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@
2121
{
2222
"Key": "key2",
2323
"Value": "value2"
24+
},
25+
{
26+
"Key": "graphqlapi:createdBy",
27+
"Value": "SAM"
2428
}
2529
],
2630
"XrayEnabled": true

tests/translator/output/aws-cn/graphqlapi_cognito_default_auth.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@
2121
{
2222
"Key": "key2",
2323
"Value": "value2"
24+
},
25+
{
26+
"Key": "graphqlapi:createdBy",
27+
"Value": "SAM"
2428
}
2529
],
2630
"UserPoolConfig": {

tests/translator/output/aws-cn/graphqlapi_ddb_datasource_all_properties.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@
2121
{
2222
"Key": "key2",
2323
"Value": "value2"
24+
},
25+
{
26+
"Key": "graphqlapi:createdBy",
27+
"Value": "SAM"
2428
}
2529
],
2630
"XrayEnabled": true

tests/translator/output/aws-cn/graphqlapi_ddb_datasource_connector.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@
2121
{
2222
"Key": "key2",
2323
"Value": "value2"
24+
},
25+
{
26+
"Key": "graphqlapi:createdBy",
27+
"Value": "SAM"
2428
}
2529
],
2630
"XrayEnabled": true

tests/translator/output/aws-cn/graphqlapi_ddb_datasource_no_table_arn.json

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,13 @@
1919
},
2020
"FieldLogLevel": "ALL"
2121
},
22-
"Name": "SuperCoolAPI"
22+
"Name": "SuperCoolAPI",
23+
"Tags": [
24+
{
25+
"Key": "graphqlapi:createdBy",
26+
"Value": "SAM"
27+
}
28+
]
2329
},
2430
"Type": "AWS::AppSync::GraphQLApi"
2531
},

tests/translator/output/aws-cn/graphqlapi_default_logging.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@
2121
{
2222
"Key": "key2",
2323
"Value": "value2"
24+
},
25+
{
26+
"Key": "graphqlapi:createdBy",
27+
"Value": "SAM"
2428
}
2529
],
2630
"XrayEnabled": true

tests/translator/output/aws-cn/graphqlapi_defined_name.json

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,13 @@
1212
},
1313
"FieldLogLevel": "ALL"
1414
},
15-
"Name": "SuperDuperCoolAPI"
15+
"Name": "SuperDuperCoolAPI",
16+
"Tags": [
17+
{
18+
"Key": "graphqlapi:createdBy",
19+
"Value": "SAM"
20+
}
21+
]
1622
},
1723
"Type": "AWS::AppSync::GraphQLApi"
1824
},

tests/translator/output/aws-cn/graphqlapi_domain_name.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@
2121
{
2222
"Key": "key2",
2323
"Value": "value2"
24+
},
25+
{
26+
"Key": "graphqlapi:createdBy",
27+
"Value": "SAM"
2428
}
2529
],
2630
"XrayEnabled": true

0 commit comments

Comments
 (0)