@aws-solutions-constructs/aws-apigateway-dynamodb 2.61.0 → 2.62.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,489 @@
1
+ {
2
+ "Description": "Integration Test for aws-apigateway-dynamodb",
3
+ "Resources": {
4
+ "existingtableE51CCC93": {
5
+ "Type": "AWS::DynamoDB::Table",
6
+ "Properties": {
7
+ "AttributeDefinitions": [
8
+ {
9
+ "AttributeName": "id",
10
+ "AttributeType": "S"
11
+ }
12
+ ],
13
+ "BillingMode": "PAY_PER_REQUEST",
14
+ "KeySchema": [
15
+ {
16
+ "AttributeName": "id",
17
+ "KeyType": "HASH"
18
+ }
19
+ ],
20
+ "PointInTimeRecoverySpecification": {
21
+ "PointInTimeRecoveryEnabled": true
22
+ },
23
+ "SSESpecification": {
24
+ "SSEEnabled": true
25
+ }
26
+ },
27
+ "UpdateReplacePolicy": "Retain",
28
+ "DeletionPolicy": "Retain"
29
+ },
30
+ "testapigatewaydynamodbadditionalrequesttemplatesApiAccessLogGroupAF75D750": {
31
+ "Type": "AWS::Logs::LogGroup",
32
+ "UpdateReplacePolicy": "Retain",
33
+ "DeletionPolicy": "Retain",
34
+ "Metadata": {
35
+ "cfn_nag": {
36
+ "rules_to_suppress": [
37
+ {
38
+ "id": "W86",
39
+ "reason": "Retention period for CloudWatchLogs LogGroups are set to 'Never Expire' to preserve customer data indefinitely"
40
+ },
41
+ {
42
+ "id": "W84",
43
+ "reason": "By default CloudWatchLogs LogGroups data is encrypted using the CloudWatch server-side encryption keys (AWS Managed Keys)"
44
+ }
45
+ ]
46
+ }
47
+ }
48
+ },
49
+ "testapigatewaydynamodbadditionalrequesttemplatesRestApi03F6484C": {
50
+ "Type": "AWS::ApiGateway::RestApi",
51
+ "Properties": {
52
+ "EndpointConfiguration": {
53
+ "Types": [
54
+ "EDGE"
55
+ ]
56
+ },
57
+ "Name": "RestApi"
58
+ }
59
+ },
60
+ "testapigatewaydynamodbadditionalrequesttemplatesRestApiDeployment0AE7C47799d5eb6ebbe5fc8402f3118bd7d77b35": {
61
+ "Type": "AWS::ApiGateway::Deployment",
62
+ "Properties": {
63
+ "Description": "Automatically created by the RestApi construct",
64
+ "RestApiId": {
65
+ "Ref": "testapigatewaydynamodbadditionalrequesttemplatesRestApi03F6484C"
66
+ }
67
+ },
68
+ "DependsOn": [
69
+ "testapigatewaydynamodbadditionalrequesttemplatesRestApiidDELETEF6A7D04D",
70
+ "testapigatewaydynamodbadditionalrequesttemplatesRestApiidGET05129D15",
71
+ "testapigatewaydynamodbadditionalrequesttemplatesRestApiidA77CCE90"
72
+ ],
73
+ "Metadata": {
74
+ "cfn_nag": {
75
+ "rules_to_suppress": [
76
+ {
77
+ "id": "W45",
78
+ "reason": "ApiGateway has AccessLogging enabled in AWS::ApiGateway::Stage resource, but cfn_nag checks for it in AWS::ApiGateway::Deployment resource"
79
+ }
80
+ ]
81
+ }
82
+ }
83
+ },
84
+ "testapigatewaydynamodbadditionalrequesttemplatesRestApiDeploymentStageprod33ED5D23": {
85
+ "Type": "AWS::ApiGateway::Stage",
86
+ "Properties": {
87
+ "AccessLogSetting": {
88
+ "DestinationArn": {
89
+ "Fn::GetAtt": [
90
+ "testapigatewaydynamodbadditionalrequesttemplatesApiAccessLogGroupAF75D750",
91
+ "Arn"
92
+ ]
93
+ },
94
+ "Format": "{\"requestId\":\"$context.requestId\",\"ip\":\"$context.identity.sourceIp\",\"user\":\"$context.identity.user\",\"caller\":\"$context.identity.caller\",\"requestTime\":\"$context.requestTime\",\"httpMethod\":\"$context.httpMethod\",\"resourcePath\":\"$context.resourcePath\",\"status\":\"$context.status\",\"protocol\":\"$context.protocol\",\"responseLength\":\"$context.responseLength\"}"
95
+ },
96
+ "DeploymentId": {
97
+ "Ref": "testapigatewaydynamodbadditionalrequesttemplatesRestApiDeployment0AE7C47799d5eb6ebbe5fc8402f3118bd7d77b35"
98
+ },
99
+ "MethodSettings": [
100
+ {
101
+ "DataTraceEnabled": false,
102
+ "HttpMethod": "*",
103
+ "LoggingLevel": "INFO",
104
+ "ResourcePath": "/*"
105
+ }
106
+ ],
107
+ "RestApiId": {
108
+ "Ref": "testapigatewaydynamodbadditionalrequesttemplatesRestApi03F6484C"
109
+ },
110
+ "StageName": "prod",
111
+ "TracingEnabled": true
112
+ }
113
+ },
114
+ "testapigatewaydynamodbadditionalrequesttemplatesRestApiidA77CCE90": {
115
+ "Type": "AWS::ApiGateway::Resource",
116
+ "Properties": {
117
+ "ParentId": {
118
+ "Fn::GetAtt": [
119
+ "testapigatewaydynamodbadditionalrequesttemplatesRestApi03F6484C",
120
+ "RootResourceId"
121
+ ]
122
+ },
123
+ "PathPart": "{id}",
124
+ "RestApiId": {
125
+ "Ref": "testapigatewaydynamodbadditionalrequesttemplatesRestApi03F6484C"
126
+ }
127
+ }
128
+ },
129
+ "testapigatewaydynamodbadditionalrequesttemplatesRestApiidGET05129D15": {
130
+ "Type": "AWS::ApiGateway::Method",
131
+ "Properties": {
132
+ "AuthorizationType": "AWS_IAM",
133
+ "HttpMethod": "GET",
134
+ "Integration": {
135
+ "Credentials": {
136
+ "Fn::GetAtt": [
137
+ "testapigatewaydynamodbadditionalrequesttemplatesapigatewayroleFDAECAC6",
138
+ "Arn"
139
+ ]
140
+ },
141
+ "IntegrationHttpMethod": "POST",
142
+ "IntegrationResponses": [
143
+ {
144
+ "StatusCode": "200"
145
+ },
146
+ {
147
+ "ResponseTemplates": {
148
+ "text/html": "Error"
149
+ },
150
+ "SelectionPattern": "500",
151
+ "StatusCode": "500"
152
+ }
153
+ ],
154
+ "PassthroughBehavior": "NEVER",
155
+ "RequestParameters": {
156
+ "integration.request.header.Content-Type": "'application/json'"
157
+ },
158
+ "RequestTemplates": {
159
+ "application/json": {
160
+ "Fn::Join": [
161
+ "",
162
+ [
163
+ "{ \"TableName\": \"",
164
+ {
165
+ "Ref": "existingtableE51CCC93"
166
+ },
167
+ "\", \"KeyConditionExpression\": \"id = :v1\", \"ExpressionAttributeValues\": { \":v1\": { \"S\": \"$input.params('id')\" } } }"
168
+ ]
169
+ ]
170
+ }
171
+ },
172
+ "Type": "AWS",
173
+ "Uri": {
174
+ "Fn::Join": [
175
+ "",
176
+ [
177
+ "arn:",
178
+ {
179
+ "Ref": "AWS::Partition"
180
+ },
181
+ ":apigateway:",
182
+ {
183
+ "Ref": "AWS::Region"
184
+ },
185
+ ":dynamodb:action/Query"
186
+ ]
187
+ ]
188
+ }
189
+ },
190
+ "MethodResponses": [
191
+ {
192
+ "ResponseParameters": {
193
+ "method.response.header.Content-Type": true
194
+ },
195
+ "StatusCode": "200"
196
+ },
197
+ {
198
+ "ResponseParameters": {
199
+ "method.response.header.Content-Type": true
200
+ },
201
+ "StatusCode": "500"
202
+ }
203
+ ],
204
+ "ResourceId": {
205
+ "Ref": "testapigatewaydynamodbadditionalrequesttemplatesRestApiidA77CCE90"
206
+ },
207
+ "RestApiId": {
208
+ "Ref": "testapigatewaydynamodbadditionalrequesttemplatesRestApi03F6484C"
209
+ }
210
+ }
211
+ },
212
+ "testapigatewaydynamodbadditionalrequesttemplatesRestApiidDELETEF6A7D04D": {
213
+ "Type": "AWS::ApiGateway::Method",
214
+ "Properties": {
215
+ "AuthorizationType": "AWS_IAM",
216
+ "HttpMethod": "DELETE",
217
+ "Integration": {
218
+ "Credentials": {
219
+ "Fn::GetAtt": [
220
+ "testapigatewaydynamodbadditionalrequesttemplatesapigatewayroleFDAECAC6",
221
+ "Arn"
222
+ ]
223
+ },
224
+ "IntegrationHttpMethod": "POST",
225
+ "IntegrationResponses": [
226
+ {
227
+ "ResponseTemplates": {
228
+ "text/html": "OK"
229
+ },
230
+ "StatusCode": "200"
231
+ },
232
+ {
233
+ "ResponseTemplates": {
234
+ "text/html": "IntegrationTestError"
235
+ },
236
+ "StatusCode": "400"
237
+ }
238
+ ],
239
+ "PassthroughBehavior": "NEVER",
240
+ "RequestParameters": {
241
+ "integration.request.header.Content-Type": "'application/json'"
242
+ },
243
+ "RequestTemplates": {
244
+ "application/json": {
245
+ "Fn::Join": [
246
+ "",
247
+ [
248
+ "{ \"TableName\": \"",
249
+ {
250
+ "Ref": "existingtableE51CCC93"
251
+ },
252
+ "\", \"Key\": { \"id\": { \"S\": \"$input.params('id')\" } }, \"ReturnValues\": \"ALL_OLD\" }"
253
+ ]
254
+ ]
255
+ }
256
+ },
257
+ "Type": "AWS",
258
+ "Uri": {
259
+ "Fn::Join": [
260
+ "",
261
+ [
262
+ "arn:",
263
+ {
264
+ "Ref": "AWS::Partition"
265
+ },
266
+ ":apigateway:",
267
+ {
268
+ "Ref": "AWS::Region"
269
+ },
270
+ ":dynamodb:action/DeleteItem"
271
+ ]
272
+ ]
273
+ }
274
+ },
275
+ "MethodResponses": [
276
+ {
277
+ "StatusCode": "200"
278
+ },
279
+ {
280
+ "StatusCode": "400"
281
+ }
282
+ ],
283
+ "ResourceId": {
284
+ "Ref": "testapigatewaydynamodbadditionalrequesttemplatesRestApiidA77CCE90"
285
+ },
286
+ "RestApiId": {
287
+ "Ref": "testapigatewaydynamodbadditionalrequesttemplatesRestApi03F6484C"
288
+ }
289
+ }
290
+ },
291
+ "testapigatewaydynamodbadditionalrequesttemplatesRestApiUsagePlan905D10C7": {
292
+ "Type": "AWS::ApiGateway::UsagePlan",
293
+ "Properties": {
294
+ "ApiStages": [
295
+ {
296
+ "ApiId": {
297
+ "Ref": "testapigatewaydynamodbadditionalrequesttemplatesRestApi03F6484C"
298
+ },
299
+ "Stage": {
300
+ "Ref": "testapigatewaydynamodbadditionalrequesttemplatesRestApiDeploymentStageprod33ED5D23"
301
+ },
302
+ "Throttle": {}
303
+ }
304
+ ]
305
+ }
306
+ },
307
+ "testapigatewaydynamodbadditionalrequesttemplatesLambdaRestApiCloudWatchRole51265771": {
308
+ "Type": "AWS::IAM::Role",
309
+ "Properties": {
310
+ "AssumeRolePolicyDocument": {
311
+ "Statement": [
312
+ {
313
+ "Action": "sts:AssumeRole",
314
+ "Effect": "Allow",
315
+ "Principal": {
316
+ "Service": "apigateway.amazonaws.com"
317
+ }
318
+ }
319
+ ],
320
+ "Version": "2012-10-17"
321
+ },
322
+ "Policies": [
323
+ {
324
+ "PolicyDocument": {
325
+ "Statement": [
326
+ {
327
+ "Action": [
328
+ "logs:CreateLogGroup",
329
+ "logs:CreateLogStream",
330
+ "logs:DescribeLogGroups",
331
+ "logs:DescribeLogStreams",
332
+ "logs:FilterLogEvents",
333
+ "logs:GetLogEvents",
334
+ "logs:PutLogEvents"
335
+ ],
336
+ "Effect": "Allow",
337
+ "Resource": {
338
+ "Fn::Join": [
339
+ "",
340
+ [
341
+ "arn:",
342
+ {
343
+ "Ref": "AWS::Partition"
344
+ },
345
+ ":logs:",
346
+ {
347
+ "Ref": "AWS::Region"
348
+ },
349
+ ":",
350
+ {
351
+ "Ref": "AWS::AccountId"
352
+ },
353
+ ":*"
354
+ ]
355
+ ]
356
+ }
357
+ }
358
+ ],
359
+ "Version": "2012-10-17"
360
+ },
361
+ "PolicyName": "LambdaRestApiCloudWatchRolePolicy"
362
+ }
363
+ ]
364
+ }
365
+ },
366
+ "testapigatewaydynamodbadditionalrequesttemplatesLambdaRestApiAccount8891474D": {
367
+ "Type": "AWS::ApiGateway::Account",
368
+ "Properties": {
369
+ "CloudWatchRoleArn": {
370
+ "Fn::GetAtt": [
371
+ "testapigatewaydynamodbadditionalrequesttemplatesLambdaRestApiCloudWatchRole51265771",
372
+ "Arn"
373
+ ]
374
+ }
375
+ },
376
+ "DependsOn": [
377
+ "testapigatewaydynamodbadditionalrequesttemplatesRestApi03F6484C"
378
+ ]
379
+ },
380
+ "testapigatewaydynamodbadditionalrequesttemplatesapigatewayroleFDAECAC6": {
381
+ "Type": "AWS::IAM::Role",
382
+ "Properties": {
383
+ "AssumeRolePolicyDocument": {
384
+ "Statement": [
385
+ {
386
+ "Action": "sts:AssumeRole",
387
+ "Effect": "Allow",
388
+ "Principal": {
389
+ "Service": "apigateway.amazonaws.com"
390
+ }
391
+ }
392
+ ],
393
+ "Version": "2012-10-17"
394
+ }
395
+ }
396
+ },
397
+ "testapigatewaydynamodbadditionalrequesttemplatesapigatewayroleDefaultPolicy4C47B35E": {
398
+ "Type": "AWS::IAM::Policy",
399
+ "Properties": {
400
+ "PolicyDocument": {
401
+ "Statement": [
402
+ {
403
+ "Action": [
404
+ "dynamodb:DeleteItem",
405
+ "dynamodb:Query"
406
+ ],
407
+ "Effect": "Allow",
408
+ "Resource": {
409
+ "Fn::GetAtt": [
410
+ "existingtableE51CCC93",
411
+ "Arn"
412
+ ]
413
+ }
414
+ }
415
+ ],
416
+ "Version": "2012-10-17"
417
+ },
418
+ "PolicyName": "testapigatewaydynamodbadditionalrequesttemplatesapigatewayroleDefaultPolicy4C47B35E",
419
+ "Roles": [
420
+ {
421
+ "Ref": "testapigatewaydynamodbadditionalrequesttemplatesapigatewayroleFDAECAC6"
422
+ }
423
+ ]
424
+ }
425
+ }
426
+ },
427
+ "Outputs": {
428
+ "testapigatewaydynamodbadditionalrequesttemplatesRestApiEndpoint855E7762": {
429
+ "Value": {
430
+ "Fn::Join": [
431
+ "",
432
+ [
433
+ "https://",
434
+ {
435
+ "Ref": "testapigatewaydynamodbadditionalrequesttemplatesRestApi03F6484C"
436
+ },
437
+ ".execute-api.",
438
+ {
439
+ "Ref": "AWS::Region"
440
+ },
441
+ ".",
442
+ {
443
+ "Ref": "AWS::URLSuffix"
444
+ },
445
+ "/",
446
+ {
447
+ "Ref": "testapigatewaydynamodbadditionalrequesttemplatesRestApiDeploymentStageprod33ED5D23"
448
+ },
449
+ "/"
450
+ ]
451
+ ]
452
+ }
453
+ }
454
+ },
455
+ "Parameters": {
456
+ "BootstrapVersion": {
457
+ "Type": "AWS::SSM::Parameter::Value<String>",
458
+ "Default": "/cdk-bootstrap/hnb659fds/version",
459
+ "Description": "Version of the CDK Bootstrap resources in this environment, automatically retrieved from SSM Parameter Store. [cdk:skip]"
460
+ }
461
+ },
462
+ "Rules": {
463
+ "CheckBootstrapVersion": {
464
+ "Assertions": [
465
+ {
466
+ "Assert": {
467
+ "Fn::Not": [
468
+ {
469
+ "Fn::Contains": [
470
+ [
471
+ "1",
472
+ "2",
473
+ "3",
474
+ "4",
475
+ "5"
476
+ ],
477
+ {
478
+ "Ref": "BootstrapVersion"
479
+ }
480
+ ]
481
+ }
482
+ ]
483
+ },
484
+ "AssertDescription": "CDK bootstrap stack version 6 required. Please run 'cdk bootstrap' with a recent version of the CDK CLI."
485
+ }
486
+ ]
487
+ }
488
+ }
489
+ }
@@ -0,0 +1,19 @@
1
+ {
2
+ "version": "36.0.0",
3
+ "files": {
4
+ "21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22": {
5
+ "source": {
6
+ "path": "apiddbcustommethodresponseIntegDefaultTestDeployAssertAC6F68EC.template.json",
7
+ "packaging": "file"
8
+ },
9
+ "destinations": {
10
+ "current_account-current_region": {
11
+ "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}",
12
+ "objectKey": "21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22.json",
13
+ "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}"
14
+ }
15
+ }
16
+ }
17
+ },
18
+ "dockerImages": {}
19
+ }
@@ -0,0 +1,36 @@
1
+ {
2
+ "Parameters": {
3
+ "BootstrapVersion": {
4
+ "Type": "AWS::SSM::Parameter::Value<String>",
5
+ "Default": "/cdk-bootstrap/hnb659fds/version",
6
+ "Description": "Version of the CDK Bootstrap resources in this environment, automatically retrieved from SSM Parameter Store. [cdk:skip]"
7
+ }
8
+ },
9
+ "Rules": {
10
+ "CheckBootstrapVersion": {
11
+ "Assertions": [
12
+ {
13
+ "Assert": {
14
+ "Fn::Not": [
15
+ {
16
+ "Fn::Contains": [
17
+ [
18
+ "1",
19
+ "2",
20
+ "3",
21
+ "4",
22
+ "5"
23
+ ],
24
+ {
25
+ "Ref": "BootstrapVersion"
26
+ }
27
+ ]
28
+ }
29
+ ]
30
+ },
31
+ "AssertDescription": "CDK bootstrap stack version 6 required. Please run 'cdk bootstrap' with a recent version of the CDK CLI."
32
+ }
33
+ ]
34
+ }
35
+ }
36
+ }
@@ -0,0 +1 @@
1
+ {"version":"36.0.0"}
@@ -0,0 +1,12 @@
1
+ {
2
+ "version": "36.0.0",
3
+ "testCases": {
4
+ "apiddb-custom-method-response/Integ/DefaultTest": {
5
+ "stacks": [
6
+ "apiddb-custom-method-response"
7
+ ],
8
+ "assertionStack": "apiddb-custom-method-response/Integ/DefaultTest/DeployAssert",
9
+ "assertionStackName": "apiddbcustommethodresponseIntegDefaultTestDeployAssertAC6F68EC"
10
+ }
11
+ }
12
+ }