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