@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,406 +0,0 @@
1
- {
2
- "Description": "Integration Test for aws-apigateway-dynamodb",
3
- "Resources": {
4
- "testapigatewaydynamodbdefaultDynamoTable0720D92C": {
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
- "testapigatewaydynamodbdefaultApiAccessLogGroup0192183A": {
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
- "testapigatewaydynamodbdefaultRestApi9102FDF9": {
50
- "Type": "AWS::ApiGateway::RestApi",
51
- "Properties": {
52
- "EndpointConfiguration": {
53
- "Types": [
54
- "EDGE"
55
- ]
56
- },
57
- "Name": "RestApi"
58
- }
59
- },
60
- "testapigatewaydynamodbdefaultRestApiDeploymentFAC726F3818e0ad130f9a49152a4afbd35ada7b6": {
61
- "Type": "AWS::ApiGateway::Deployment",
62
- "Properties": {
63
- "Description": "Automatically created by the RestApi construct",
64
- "RestApiId": {
65
- "Ref": "testapigatewaydynamodbdefaultRestApi9102FDF9"
66
- }
67
- },
68
- "DependsOn": [
69
- "testapigatewaydynamodbdefaultRestApiidGET94B6F433",
70
- "testapigatewaydynamodbdefaultRestApiidFD6A9E91"
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
- "testapigatewaydynamodbdefaultRestApiDeploymentStageprod7834D304": {
84
- "Type": "AWS::ApiGateway::Stage",
85
- "Properties": {
86
- "AccessLogSetting": {
87
- "DestinationArn": {
88
- "Fn::GetAtt": [
89
- "testapigatewaydynamodbdefaultApiAccessLogGroup0192183A",
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": "testapigatewaydynamodbdefaultRestApiDeploymentFAC726F3818e0ad130f9a49152a4afbd35ada7b6"
97
- },
98
- "MethodSettings": [
99
- {
100
- "DataTraceEnabled": false,
101
- "HttpMethod": "*",
102
- "LoggingLevel": "INFO",
103
- "ResourcePath": "/*"
104
- }
105
- ],
106
- "RestApiId": {
107
- "Ref": "testapigatewaydynamodbdefaultRestApi9102FDF9"
108
- },
109
- "StageName": "prod",
110
- "TracingEnabled": true
111
- }
112
- },
113
- "testapigatewaydynamodbdefaultRestApiidFD6A9E91": {
114
- "Type": "AWS::ApiGateway::Resource",
115
- "Properties": {
116
- "ParentId": {
117
- "Fn::GetAtt": [
118
- "testapigatewaydynamodbdefaultRestApi9102FDF9",
119
- "RootResourceId"
120
- ]
121
- },
122
- "PathPart": "{id}",
123
- "RestApiId": {
124
- "Ref": "testapigatewaydynamodbdefaultRestApi9102FDF9"
125
- }
126
- }
127
- },
128
- "testapigatewaydynamodbdefaultRestApiidGET94B6F433": {
129
- "Type": "AWS::ApiGateway::Method",
130
- "Properties": {
131
- "AuthorizationType": "AWS_IAM",
132
- "HttpMethod": "GET",
133
- "Integration": {
134
- "Credentials": {
135
- "Fn::GetAtt": [
136
- "testapigatewaydynamodbdefaultapigatewayrole0CDF008A",
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": "testapigatewaydynamodbdefaultDynamoTable0720D92C"
165
- },
166
- "\", \"KeyConditionExpression\": \"id = :v1\", \"ExpressionAttributeValues\": { \":v1\": { \"S\": \"$input.params('id')\" } } }"
167
- ]
168
- ]
169
- }
170
- },
171
- "Type": "AWS",
172
- "Uri": {
173
- "Fn::Join": [
174
- "",
175
- [
176
- "arn:",
177
- {
178
- "Ref": "AWS::Partition"
179
- },
180
- ":apigateway:",
181
- {
182
- "Ref": "AWS::Region"
183
- },
184
- ":dynamodb:action/Query"
185
- ]
186
- ]
187
- }
188
- },
189
- "MethodResponses": [
190
- {
191
- "ResponseParameters": {
192
- "method.response.header.Content-Type": true
193
- },
194
- "StatusCode": "200"
195
- },
196
- {
197
- "ResponseParameters": {
198
- "method.response.header.Content-Type": true
199
- },
200
- "StatusCode": "500"
201
- }
202
- ],
203
- "ResourceId": {
204
- "Ref": "testapigatewaydynamodbdefaultRestApiidFD6A9E91"
205
- },
206
- "RestApiId": {
207
- "Ref": "testapigatewaydynamodbdefaultRestApi9102FDF9"
208
- }
209
- }
210
- },
211
- "testapigatewaydynamodbdefaultRestApiUsagePlanA266BB3D": {
212
- "Type": "AWS::ApiGateway::UsagePlan",
213
- "Properties": {
214
- "ApiStages": [
215
- {
216
- "ApiId": {
217
- "Ref": "testapigatewaydynamodbdefaultRestApi9102FDF9"
218
- },
219
- "Stage": {
220
- "Ref": "testapigatewaydynamodbdefaultRestApiDeploymentStageprod7834D304"
221
- },
222
- "Throttle": {}
223
- }
224
- ]
225
- }
226
- },
227
- "testapigatewaydynamodbdefaultLambdaRestApiCloudWatchRoleEF1FBFD7": {
228
- "Type": "AWS::IAM::Role",
229
- "Properties": {
230
- "AssumeRolePolicyDocument": {
231
- "Statement": [
232
- {
233
- "Action": "sts:AssumeRole",
234
- "Effect": "Allow",
235
- "Principal": {
236
- "Service": "apigateway.amazonaws.com"
237
- }
238
- }
239
- ],
240
- "Version": "2012-10-17"
241
- },
242
- "Policies": [
243
- {
244
- "PolicyDocument": {
245
- "Statement": [
246
- {
247
- "Action": [
248
- "logs:CreateLogGroup",
249
- "logs:CreateLogStream",
250
- "logs:DescribeLogGroups",
251
- "logs:DescribeLogStreams",
252
- "logs:PutLogEvents",
253
- "logs:GetLogEvents",
254
- "logs:FilterLogEvents"
255
- ],
256
- "Effect": "Allow",
257
- "Resource": {
258
- "Fn::Join": [
259
- "",
260
- [
261
- "arn:",
262
- {
263
- "Ref": "AWS::Partition"
264
- },
265
- ":logs:",
266
- {
267
- "Ref": "AWS::Region"
268
- },
269
- ":",
270
- {
271
- "Ref": "AWS::AccountId"
272
- },
273
- ":*"
274
- ]
275
- ]
276
- }
277
- }
278
- ],
279
- "Version": "2012-10-17"
280
- },
281
- "PolicyName": "LambdaRestApiCloudWatchRolePolicy"
282
- }
283
- ]
284
- }
285
- },
286
- "testapigatewaydynamodbdefaultLambdaRestApiAccountE6585EBB": {
287
- "Type": "AWS::ApiGateway::Account",
288
- "Properties": {
289
- "CloudWatchRoleArn": {
290
- "Fn::GetAtt": [
291
- "testapigatewaydynamodbdefaultLambdaRestApiCloudWatchRoleEF1FBFD7",
292
- "Arn"
293
- ]
294
- }
295
- },
296
- "DependsOn": [
297
- "testapigatewaydynamodbdefaultRestApi9102FDF9"
298
- ]
299
- },
300
- "testapigatewaydynamodbdefaultapigatewayrole0CDF008A": {
301
- "Type": "AWS::IAM::Role",
302
- "Properties": {
303
- "AssumeRolePolicyDocument": {
304
- "Statement": [
305
- {
306
- "Action": "sts:AssumeRole",
307
- "Effect": "Allow",
308
- "Principal": {
309
- "Service": "apigateway.amazonaws.com"
310
- }
311
- }
312
- ],
313
- "Version": "2012-10-17"
314
- }
315
- }
316
- },
317
- "testapigatewaydynamodbdefaultapigatewayroleDefaultPolicyE0B5E59D": {
318
- "Type": "AWS::IAM::Policy",
319
- "Properties": {
320
- "PolicyDocument": {
321
- "Statement": [
322
- {
323
- "Action": "dynamodb:Query",
324
- "Effect": "Allow",
325
- "Resource": {
326
- "Fn::GetAtt": [
327
- "testapigatewaydynamodbdefaultDynamoTable0720D92C",
328
- "Arn"
329
- ]
330
- }
331
- }
332
- ],
333
- "Version": "2012-10-17"
334
- },
335
- "PolicyName": "testapigatewaydynamodbdefaultapigatewayroleDefaultPolicyE0B5E59D",
336
- "Roles": [
337
- {
338
- "Ref": "testapigatewaydynamodbdefaultapigatewayrole0CDF008A"
339
- }
340
- ]
341
- }
342
- }
343
- },
344
- "Outputs": {
345
- "testapigatewaydynamodbdefaultRestApiEndpointD5AD8DB9": {
346
- "Value": {
347
- "Fn::Join": [
348
- "",
349
- [
350
- "https://",
351
- {
352
- "Ref": "testapigatewaydynamodbdefaultRestApi9102FDF9"
353
- },
354
- ".execute-api.",
355
- {
356
- "Ref": "AWS::Region"
357
- },
358
- ".",
359
- {
360
- "Ref": "AWS::URLSuffix"
361
- },
362
- "/",
363
- {
364
- "Ref": "testapigatewaydynamodbdefaultRestApiDeploymentStageprod7834D304"
365
- },
366
- "/"
367
- ]
368
- ]
369
- }
370
- }
371
- },
372
- "Parameters": {
373
- "BootstrapVersion": {
374
- "Type": "AWS::SSM::Parameter::Value<String>",
375
- "Default": "/cdk-bootstrap/hnb659fds/version",
376
- "Description": "Version of the CDK Bootstrap resources in this environment, automatically retrieved from SSM Parameter Store. [cdk:skip]"
377
- }
378
- },
379
- "Rules": {
380
- "CheckBootstrapVersion": {
381
- "Assertions": [
382
- {
383
- "Assert": {
384
- "Fn::Not": [
385
- {
386
- "Fn::Contains": [
387
- [
388
- "1",
389
- "2",
390
- "3",
391
- "4",
392
- "5"
393
- ],
394
- {
395
- "Ref": "BootstrapVersion"
396
- }
397
- ]
398
- }
399
- ]
400
- },
401
- "AssertDescription": "CDK bootstrap stack version 6 required. Please run 'cdk bootstrap' with a recent version of the CDK CLI."
402
- }
403
- ]
404
- }
405
- }
406
- }