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