@aws-solutions-constructs/aws-apigateway-dynamodb 2.51.0 → 2.52.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.
Files changed (65) hide show
  1. package/.eslintignore +2 -0
  2. package/.jsii +49 -4
  3. package/integ.config.json +7 -0
  4. package/lib/index.js +1 -1
  5. package/package.json +9 -8
  6. package/test/integ.apiddb-additional-request-templates-custom-resource-name.js +5 -2
  7. package/test/integ.apiddb-additional-request-templates-custom-resource-name.js.snapshot/apiddb-additional-request-templates-custom-resource-name.assets.json +19 -0
  8. package/test/integ.apiddb-additional-request-templates-custom-resource-name.js.snapshot/apiddb-additional-request-templates-custom-resource-name.template.json +426 -0
  9. package/test/integ.apiddb-additional-request-templates-custom-resource-name.js.snapshot/apiddbadditionalrequesttemplatescustomresourcenameIntegDefaultTestDeployAssertABD5B2B6.assets.json +19 -0
  10. package/test/integ.apiddb-additional-request-templates-custom-resource-name.js.snapshot/apiddbadditionalrequesttemplatescustomresourcenameIntegDefaultTestDeployAssertABD5B2B6.template.json +36 -0
  11. package/test/integ.apiddb-additional-request-templates-custom-resource-name.js.snapshot/cdk.out +1 -0
  12. package/test/integ.apiddb-additional-request-templates-custom-resource-name.js.snapshot/integ.json +12 -0
  13. package/test/integ.apiddb-additional-request-templates-custom-resource-name.js.snapshot/manifest.json +185 -0
  14. package/test/integ.apiddb-additional-request-templates-custom-resource-name.js.snapshot/tree.json +684 -0
  15. package/test/integ.apiddb-additional-request-templates.js +5 -2
  16. package/test/integ.apiddb-additional-request-templates.js.snapshot/apiddb-additional-request-templates.assets.json +19 -0
  17. package/test/integ.apiddb-additional-request-templates.js.snapshot/apiddb-additional-request-templates.template.json +418 -0
  18. package/test/integ.apiddb-additional-request-templates.js.snapshot/apiddbadditionalrequesttemplatesIntegDefaultTestDeployAssert01278153.assets.json +19 -0
  19. package/test/integ.apiddb-additional-request-templates.js.snapshot/apiddbadditionalrequesttemplatesIntegDefaultTestDeployAssert01278153.template.json +36 -0
  20. package/test/integ.apiddb-additional-request-templates.js.snapshot/cdk.out +1 -0
  21. package/test/integ.apiddb-additional-request-templates.js.snapshot/integ.json +12 -0
  22. package/test/integ.apiddb-additional-request-templates.js.snapshot/manifest.json +185 -0
  23. package/test/integ.apiddb-additional-request-templates.js.snapshot/tree.json +676 -0
  24. package/test/integ.apiddb-apigateway-dynamodb-CRUD.js +5 -2
  25. package/test/integ.apiddb-apigateway-dynamodb-CRUD.js.snapshot/apiddb-apigateway-dynamodb-CRUD.assets.json +19 -0
  26. package/test/integ.apiddb-apigateway-dynamodb-CRUD.js.snapshot/apiddb-apigateway-dynamodb-CRUD.template.json +666 -0
  27. package/test/integ.apiddb-apigateway-dynamodb-CRUD.js.snapshot/apiddbapigatewaydynamodbCRUDIntegDefaultTestDeployAssert492DC8FE.assets.json +19 -0
  28. package/test/integ.apiddb-apigateway-dynamodb-CRUD.js.snapshot/apiddbapigatewaydynamodbCRUDIntegDefaultTestDeployAssert492DC8FE.template.json +36 -0
  29. package/test/integ.apiddb-apigateway-dynamodb-CRUD.js.snapshot/cdk.out +1 -0
  30. package/test/integ.apiddb-apigateway-dynamodb-CRUD.js.snapshot/integ.json +12 -0
  31. package/test/integ.apiddb-apigateway-dynamodb-CRUD.js.snapshot/manifest.json +203 -0
  32. package/test/integ.apiddb-apigateway-dynamodb-CRUD.js.snapshot/tree.json +975 -0
  33. package/test/integ.apiddb-apigateway-dynamodb-existing-table.js +5 -2
  34. package/test/integ.apiddb-apigateway-dynamodb-existing-table.js.snapshot/apiddb-apigateway-dynamodb-existing-table.assets.json +19 -0
  35. package/test/integ.apiddb-apigateway-dynamodb-existing-table.js.snapshot/apiddb-apigateway-dynamodb-existing-table.template.json +406 -0
  36. package/test/integ.apiddb-apigateway-dynamodb-existing-table.js.snapshot/apiddbapigatewaydynamodbexistingtableIntegDefaultTestDeployAssertD38D4AB2.assets.json +19 -0
  37. package/test/integ.apiddb-apigateway-dynamodb-existing-table.js.snapshot/apiddbapigatewaydynamodbexistingtableIntegDefaultTestDeployAssertD38D4AB2.template.json +36 -0
  38. package/test/integ.apiddb-apigateway-dynamodb-existing-table.js.snapshot/cdk.out +1 -0
  39. package/test/integ.apiddb-apigateway-dynamodb-existing-table.js.snapshot/integ.json +12 -0
  40. package/test/integ.apiddb-apigateway-dynamodb-existing-table.js.snapshot/manifest.json +185 -0
  41. package/test/integ.apiddb-apigateway-dynamodb-existing-table.js.snapshot/tree.json +664 -0
  42. package/test/integ.apiddb-custom-integration-responses.js +5 -2
  43. package/test/integ.apiddb-custom-integration-responses.js.snapshot/apiddb-custom-integration-responses.assets.json +19 -0
  44. package/test/integ.apiddb-custom-integration-responses.js.snapshot/apiddb-custom-integration-responses.template.json +406 -0
  45. package/test/integ.apiddb-custom-integration-responses.js.snapshot/apiddbcustomintegrationresponsesIntegDefaultTestDeployAssert9F4582C4.assets.json +19 -0
  46. package/test/integ.apiddb-custom-integration-responses.js.snapshot/apiddbcustomintegrationresponsesIntegDefaultTestDeployAssert9F4582C4.template.json +36 -0
  47. package/test/integ.apiddb-custom-integration-responses.js.snapshot/cdk.out +1 -0
  48. package/test/integ.apiddb-custom-integration-responses.js.snapshot/integ.json +12 -0
  49. package/test/integ.apiddb-custom-integration-responses.js.snapshot/manifest.json +185 -0
  50. package/test/integ.apiddb-custom-integration-responses.js.snapshot/tree.json +664 -0
  51. package/test/integ.apiddb-no-arguments.js +5 -2
  52. package/test/integ.apiddb-no-arguments.js.snapshot/apiddb-no-arguments.assets.json +19 -0
  53. package/test/integ.apiddb-no-arguments.js.snapshot/apiddb-no-arguments.template.json +406 -0
  54. package/test/integ.apiddb-no-arguments.js.snapshot/apiddbnoargumentsIntegDefaultTestDeployAssert79BAC49F.assets.json +19 -0
  55. package/test/integ.apiddb-no-arguments.js.snapshot/apiddbnoargumentsIntegDefaultTestDeployAssert79BAC49F.template.json +36 -0
  56. package/test/integ.apiddb-no-arguments.js.snapshot/cdk.out +1 -0
  57. package/test/integ.apiddb-no-arguments.js.snapshot/integ.json +12 -0
  58. package/test/integ.apiddb-no-arguments.js.snapshot/manifest.json +185 -0
  59. package/test/integ.apiddb-no-arguments.js.snapshot/tree.json +664 -0
  60. package/test/integ.apiddb-additional-request-templates-custom-resource-name.expected.json +0 -426
  61. package/test/integ.apiddb-additional-request-templates.expected.json +0 -418
  62. package/test/integ.apiddb-apigateway-dynamodb-CRUD.expected.json +0 -691
  63. package/test/integ.apiddb-apigateway-dynamodb-existing-table.expected.json +0 -406
  64. package/test/integ.apiddb-custom-integration-responses.expected.json +0 -406
  65. package/test/integ.apiddb-no-arguments.expected.json +0 -406
@@ -1,418 +0,0 @@
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
- "testapigatewaydynamodbadditionalrequesttemplatesRestApiDeployment0AE7C47741477f52c0bb6da128d2999e75c543fc": {
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
- "testapigatewaydynamodbadditionalrequesttemplatesRestApiidGET05129D15",
70
- "testapigatewaydynamodbadditionalrequesttemplatesRestApiidA77CCE90"
71
- ],
72
- "Metadata": {
73
- "cfn_nag": {
74
- "rules_to_suppress": [
75
- {
76
- "id": "W45",
77
- "reason": "ApiGateway has AccessLogging enabled in AWS::ApiGateway::Stage resource, but cfn_nag checks for it in AWS::ApiGateway::Deployment resource"
78
- }
79
- ]
80
- }
81
- }
82
- },
83
- "testapigatewaydynamodbadditionalrequesttemplatesRestApiDeploymentStageprod33ED5D23": {
84
- "Type": "AWS::ApiGateway::Stage",
85
- "Properties": {
86
- "AccessLogSetting": {
87
- "DestinationArn": {
88
- "Fn::GetAtt": [
89
- "testapigatewaydynamodbadditionalrequesttemplatesApiAccessLogGroupAF75D750",
90
- "Arn"
91
- ]
92
- },
93
- "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\"}"
94
- },
95
- "DeploymentId": {
96
- "Ref": "testapigatewaydynamodbadditionalrequesttemplatesRestApiDeployment0AE7C47741477f52c0bb6da128d2999e75c543fc"
97
- },
98
- "MethodSettings": [
99
- {
100
- "DataTraceEnabled": false,
101
- "HttpMethod": "*",
102
- "LoggingLevel": "INFO",
103
- "ResourcePath": "/*"
104
- }
105
- ],
106
- "RestApiId": {
107
- "Ref": "testapigatewaydynamodbadditionalrequesttemplatesRestApi03F6484C"
108
- },
109
- "StageName": "prod",
110
- "TracingEnabled": true
111
- }
112
- },
113
- "testapigatewaydynamodbadditionalrequesttemplatesRestApiidA77CCE90": {
114
- "Type": "AWS::ApiGateway::Resource",
115
- "Properties": {
116
- "ParentId": {
117
- "Fn::GetAtt": [
118
- "testapigatewaydynamodbadditionalrequesttemplatesRestApi03F6484C",
119
- "RootResourceId"
120
- ]
121
- },
122
- "PathPart": "{id}",
123
- "RestApiId": {
124
- "Ref": "testapigatewaydynamodbadditionalrequesttemplatesRestApi03F6484C"
125
- }
126
- }
127
- },
128
- "testapigatewaydynamodbadditionalrequesttemplatesRestApiidGET05129D15": {
129
- "Type": "AWS::ApiGateway::Method",
130
- "Properties": {
131
- "AuthorizationType": "AWS_IAM",
132
- "HttpMethod": "GET",
133
- "Integration": {
134
- "Credentials": {
135
- "Fn::GetAtt": [
136
- "testapigatewaydynamodbadditionalrequesttemplatesapigatewayroleFDAECAC6",
137
- "Arn"
138
- ]
139
- },
140
- "IntegrationHttpMethod": "POST",
141
- "IntegrationResponses": [
142
- {
143
- "StatusCode": "200"
144
- },
145
- {
146
- "ResponseTemplates": {
147
- "text/html": "Error"
148
- },
149
- "SelectionPattern": "500",
150
- "StatusCode": "500"
151
- }
152
- ],
153
- "PassthroughBehavior": "NEVER",
154
- "RequestParameters": {
155
- "integration.request.header.Content-Type": "'application/json'"
156
- },
157
- "RequestTemplates": {
158
- "application/json": {
159
- "Fn::Join": [
160
- "",
161
- [
162
- "{ \"TableName\": \"",
163
- {
164
- "Ref": "existingtableE51CCC93"
165
- },
166
- "\", \"KeyConditionExpression\": \"id = :v1\", \"ExpressionAttributeValues\": { \":v1\": { \"S\": \"$input.params('id')\" } } }"
167
- ]
168
- ]
169
- },
170
- "text/plain": {
171
- "Fn::Join": [
172
- "",
173
- [
174
- "{ \"TableName\": \"",
175
- {
176
- "Ref": "existingtableE51CCC93"
177
- },
178
- "\", \"KeyConditionExpression\": \"id = :v1\", \"ExpressionAttributeValues\": { \":v1\": { \"S\": \"$input.params('id')\" } } }"
179
- ]
180
- ]
181
- }
182
- },
183
- "Type": "AWS",
184
- "Uri": {
185
- "Fn::Join": [
186
- "",
187
- [
188
- "arn:",
189
- {
190
- "Ref": "AWS::Partition"
191
- },
192
- ":apigateway:",
193
- {
194
- "Ref": "AWS::Region"
195
- },
196
- ":dynamodb:action/Query"
197
- ]
198
- ]
199
- }
200
- },
201
- "MethodResponses": [
202
- {
203
- "ResponseParameters": {
204
- "method.response.header.Content-Type": true
205
- },
206
- "StatusCode": "200"
207
- },
208
- {
209
- "ResponseParameters": {
210
- "method.response.header.Content-Type": true
211
- },
212
- "StatusCode": "500"
213
- }
214
- ],
215
- "ResourceId": {
216
- "Ref": "testapigatewaydynamodbadditionalrequesttemplatesRestApiidA77CCE90"
217
- },
218
- "RestApiId": {
219
- "Ref": "testapigatewaydynamodbadditionalrequesttemplatesRestApi03F6484C"
220
- }
221
- }
222
- },
223
- "testapigatewaydynamodbadditionalrequesttemplatesRestApiUsagePlan905D10C7": {
224
- "Type": "AWS::ApiGateway::UsagePlan",
225
- "Properties": {
226
- "ApiStages": [
227
- {
228
- "ApiId": {
229
- "Ref": "testapigatewaydynamodbadditionalrequesttemplatesRestApi03F6484C"
230
- },
231
- "Stage": {
232
- "Ref": "testapigatewaydynamodbadditionalrequesttemplatesRestApiDeploymentStageprod33ED5D23"
233
- },
234
- "Throttle": {}
235
- }
236
- ]
237
- }
238
- },
239
- "testapigatewaydynamodbadditionalrequesttemplatesLambdaRestApiCloudWatchRole51265771": {
240
- "Type": "AWS::IAM::Role",
241
- "Properties": {
242
- "AssumeRolePolicyDocument": {
243
- "Statement": [
244
- {
245
- "Action": "sts:AssumeRole",
246
- "Effect": "Allow",
247
- "Principal": {
248
- "Service": "apigateway.amazonaws.com"
249
- }
250
- }
251
- ],
252
- "Version": "2012-10-17"
253
- },
254
- "Policies": [
255
- {
256
- "PolicyDocument": {
257
- "Statement": [
258
- {
259
- "Action": [
260
- "logs:CreateLogGroup",
261
- "logs:CreateLogStream",
262
- "logs:DescribeLogGroups",
263
- "logs:DescribeLogStreams",
264
- "logs:PutLogEvents",
265
- "logs:GetLogEvents",
266
- "logs:FilterLogEvents"
267
- ],
268
- "Effect": "Allow",
269
- "Resource": {
270
- "Fn::Join": [
271
- "",
272
- [
273
- "arn:",
274
- {
275
- "Ref": "AWS::Partition"
276
- },
277
- ":logs:",
278
- {
279
- "Ref": "AWS::Region"
280
- },
281
- ":",
282
- {
283
- "Ref": "AWS::AccountId"
284
- },
285
- ":*"
286
- ]
287
- ]
288
- }
289
- }
290
- ],
291
- "Version": "2012-10-17"
292
- },
293
- "PolicyName": "LambdaRestApiCloudWatchRolePolicy"
294
- }
295
- ]
296
- }
297
- },
298
- "testapigatewaydynamodbadditionalrequesttemplatesLambdaRestApiAccount8891474D": {
299
- "Type": "AWS::ApiGateway::Account",
300
- "Properties": {
301
- "CloudWatchRoleArn": {
302
- "Fn::GetAtt": [
303
- "testapigatewaydynamodbadditionalrequesttemplatesLambdaRestApiCloudWatchRole51265771",
304
- "Arn"
305
- ]
306
- }
307
- },
308
- "DependsOn": [
309
- "testapigatewaydynamodbadditionalrequesttemplatesRestApi03F6484C"
310
- ]
311
- },
312
- "testapigatewaydynamodbadditionalrequesttemplatesapigatewayroleFDAECAC6": {
313
- "Type": "AWS::IAM::Role",
314
- "Properties": {
315
- "AssumeRolePolicyDocument": {
316
- "Statement": [
317
- {
318
- "Action": "sts:AssumeRole",
319
- "Effect": "Allow",
320
- "Principal": {
321
- "Service": "apigateway.amazonaws.com"
322
- }
323
- }
324
- ],
325
- "Version": "2012-10-17"
326
- }
327
- }
328
- },
329
- "testapigatewaydynamodbadditionalrequesttemplatesapigatewayroleDefaultPolicy4C47B35E": {
330
- "Type": "AWS::IAM::Policy",
331
- "Properties": {
332
- "PolicyDocument": {
333
- "Statement": [
334
- {
335
- "Action": "dynamodb:Query",
336
- "Effect": "Allow",
337
- "Resource": {
338
- "Fn::GetAtt": [
339
- "existingtableE51CCC93",
340
- "Arn"
341
- ]
342
- }
343
- }
344
- ],
345
- "Version": "2012-10-17"
346
- },
347
- "PolicyName": "testapigatewaydynamodbadditionalrequesttemplatesapigatewayroleDefaultPolicy4C47B35E",
348
- "Roles": [
349
- {
350
- "Ref": "testapigatewaydynamodbadditionalrequesttemplatesapigatewayroleFDAECAC6"
351
- }
352
- ]
353
- }
354
- }
355
- },
356
- "Outputs": {
357
- "testapigatewaydynamodbadditionalrequesttemplatesRestApiEndpoint855E7762": {
358
- "Value": {
359
- "Fn::Join": [
360
- "",
361
- [
362
- "https://",
363
- {
364
- "Ref": "testapigatewaydynamodbadditionalrequesttemplatesRestApi03F6484C"
365
- },
366
- ".execute-api.",
367
- {
368
- "Ref": "AWS::Region"
369
- },
370
- ".",
371
- {
372
- "Ref": "AWS::URLSuffix"
373
- },
374
- "/",
375
- {
376
- "Ref": "testapigatewaydynamodbadditionalrequesttemplatesRestApiDeploymentStageprod33ED5D23"
377
- },
378
- "/"
379
- ]
380
- ]
381
- }
382
- }
383
- },
384
- "Parameters": {
385
- "BootstrapVersion": {
386
- "Type": "AWS::SSM::Parameter::Value<String>",
387
- "Default": "/cdk-bootstrap/hnb659fds/version",
388
- "Description": "Version of the CDK Bootstrap resources in this environment, automatically retrieved from SSM Parameter Store. [cdk:skip]"
389
- }
390
- },
391
- "Rules": {
392
- "CheckBootstrapVersion": {
393
- "Assertions": [
394
- {
395
- "Assert": {
396
- "Fn::Not": [
397
- {
398
- "Fn::Contains": [
399
- [
400
- "1",
401
- "2",
402
- "3",
403
- "4",
404
- "5"
405
- ],
406
- {
407
- "Ref": "BootstrapVersion"
408
- }
409
- ]
410
- }
411
- ]
412
- },
413
- "AssertDescription": "CDK bootstrap stack version 6 required. Please run 'cdk bootstrap' with a recent version of the CDK CLI."
414
- }
415
- ]
416
- }
417
- }
418
- }