@aws-solutions-constructs/aws-apigateway-sagemakerendpoint 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 (35) hide show
  1. package/.eslintignore +3 -1
  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.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,395 +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
- "testapigatewaysagemakerendpointdefaultRestApiDeployment04BFEB63b4264c277dbe6aa60ff584ba21d5d060": {
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": "testapigatewaysagemakerendpointdefaultRestApiDeployment04BFEB63b4264c277dbe6aa60ff584ba21d5d060"
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
- },
136
- "Type": "AWS",
137
- "Uri": {
138
- "Fn::Join": [
139
- "",
140
- [
141
- "arn:",
142
- {
143
- "Ref": "AWS::Partition"
144
- },
145
- ":apigateway:",
146
- {
147
- "Ref": "AWS::Region"
148
- },
149
- ":runtime.sagemaker:path/endpoints/my-endpoint/invocations"
150
- ]
151
- ]
152
- }
153
- },
154
- "MethodResponses": [
155
- {
156
- "StatusCode": "200"
157
- },
158
- {
159
- "StatusCode": "500"
160
- },
161
- {
162
- "StatusCode": "400"
163
- }
164
- ],
165
- "RequestValidatorId": {
166
- "Ref": "testapigatewaysagemakerendpointdefaultRestApirequestvalidator1A23C251"
167
- },
168
- "ResourceId": {
169
- "Ref": "testapigatewaysagemakerendpointdefaultRestApiuserid9952BA11"
170
- },
171
- "RestApiId": {
172
- "Ref": "testapigatewaysagemakerendpointdefaultRestApi7D1DA11B"
173
- }
174
- }
175
- },
176
- "testapigatewaysagemakerendpointdefaultRestApiUsagePlan7C5B0716": {
177
- "Type": "AWS::ApiGateway::UsagePlan",
178
- "Properties": {
179
- "ApiStages": [
180
- {
181
- "ApiId": {
182
- "Ref": "testapigatewaysagemakerendpointdefaultRestApi7D1DA11B"
183
- },
184
- "Stage": {
185
- "Ref": "testapigatewaysagemakerendpointdefaultRestApiDeploymentStageprodFD1743A7"
186
- },
187
- "Throttle": {}
188
- }
189
- ]
190
- }
191
- },
192
- "testapigatewaysagemakerendpointdefaultRestApirequestvalidator1A23C251": {
193
- "Type": "AWS::ApiGateway::RequestValidator",
194
- "Properties": {
195
- "Name": "request-param-validator",
196
- "RestApiId": {
197
- "Ref": "testapigatewaysagemakerendpointdefaultRestApi7D1DA11B"
198
- },
199
- "ValidateRequestParameters": true
200
- }
201
- },
202
- "testapigatewaysagemakerendpointdefaultLambdaRestApiCloudWatchRole56EE67C8": {
203
- "Type": "AWS::IAM::Role",
204
- "Properties": {
205
- "AssumeRolePolicyDocument": {
206
- "Statement": [
207
- {
208
- "Action": "sts:AssumeRole",
209
- "Effect": "Allow",
210
- "Principal": {
211
- "Service": "apigateway.amazonaws.com"
212
- }
213
- }
214
- ],
215
- "Version": "2012-10-17"
216
- },
217
- "Policies": [
218
- {
219
- "PolicyDocument": {
220
- "Statement": [
221
- {
222
- "Action": [
223
- "logs:CreateLogGroup",
224
- "logs:CreateLogStream",
225
- "logs:DescribeLogGroups",
226
- "logs:DescribeLogStreams",
227
- "logs:PutLogEvents",
228
- "logs:GetLogEvents",
229
- "logs:FilterLogEvents"
230
- ],
231
- "Effect": "Allow",
232
- "Resource": {
233
- "Fn::Join": [
234
- "",
235
- [
236
- "arn:",
237
- {
238
- "Ref": "AWS::Partition"
239
- },
240
- ":logs:",
241
- {
242
- "Ref": "AWS::Region"
243
- },
244
- ":",
245
- {
246
- "Ref": "AWS::AccountId"
247
- },
248
- ":*"
249
- ]
250
- ]
251
- }
252
- }
253
- ],
254
- "Version": "2012-10-17"
255
- },
256
- "PolicyName": "LambdaRestApiCloudWatchRolePolicy"
257
- }
258
- ]
259
- }
260
- },
261
- "testapigatewaysagemakerendpointdefaultLambdaRestApiAccount6B3C7FDD": {
262
- "Type": "AWS::ApiGateway::Account",
263
- "Properties": {
264
- "CloudWatchRoleArn": {
265
- "Fn::GetAtt": [
266
- "testapigatewaysagemakerendpointdefaultLambdaRestApiCloudWatchRole56EE67C8",
267
- "Arn"
268
- ]
269
- }
270
- },
271
- "DependsOn": [
272
- "testapigatewaysagemakerendpointdefaultRestApi7D1DA11B"
273
- ]
274
- },
275
- "testapigatewaysagemakerendpointdefaultapigatewayrole8EA61BE4": {
276
- "Type": "AWS::IAM::Role",
277
- "Properties": {
278
- "AssumeRolePolicyDocument": {
279
- "Statement": [
280
- {
281
- "Action": "sts:AssumeRole",
282
- "Effect": "Allow",
283
- "Principal": {
284
- "Service": "apigateway.amazonaws.com"
285
- }
286
- }
287
- ],
288
- "Version": "2012-10-17"
289
- }
290
- }
291
- },
292
- "testapigatewaysagemakerendpointdefaultInvokeEndpointPolicyB835D2B2": {
293
- "Type": "AWS::IAM::Policy",
294
- "Properties": {
295
- "PolicyDocument": {
296
- "Statement": [
297
- {
298
- "Action": "sagemaker:InvokeEndpoint",
299
- "Effect": "Allow",
300
- "Resource": {
301
- "Fn::Join": [
302
- "",
303
- [
304
- "arn:",
305
- {
306
- "Ref": "AWS::Partition"
307
- },
308
- ":sagemaker:",
309
- {
310
- "Ref": "AWS::Region"
311
- },
312
- ":",
313
- {
314
- "Ref": "AWS::AccountId"
315
- },
316
- ":endpoint/my-endpoint"
317
- ]
318
- ]
319
- }
320
- }
321
- ],
322
- "Version": "2012-10-17"
323
- },
324
- "PolicyName": "testapigatewaysagemakerendpointdefaultInvokeEndpointPolicyB835D2B2",
325
- "Roles": [
326
- {
327
- "Ref": "testapigatewaysagemakerendpointdefaultapigatewayrole8EA61BE4"
328
- }
329
- ]
330
- }
331
- }
332
- },
333
- "Outputs": {
334
- "testapigatewaysagemakerendpointdefaultRestApiEndpoint1EFF6760": {
335
- "Value": {
336
- "Fn::Join": [
337
- "",
338
- [
339
- "https://",
340
- {
341
- "Ref": "testapigatewaysagemakerendpointdefaultRestApi7D1DA11B"
342
- },
343
- ".execute-api.",
344
- {
345
- "Ref": "AWS::Region"
346
- },
347
- ".",
348
- {
349
- "Ref": "AWS::URLSuffix"
350
- },
351
- "/",
352
- {
353
- "Ref": "testapigatewaysagemakerendpointdefaultRestApiDeploymentStageprodFD1743A7"
354
- },
355
- "/"
356
- ]
357
- ]
358
- }
359
- }
360
- },
361
- "Parameters": {
362
- "BootstrapVersion": {
363
- "Type": "AWS::SSM::Parameter::Value<String>",
364
- "Default": "/cdk-bootstrap/hnb659fds/version",
365
- "Description": "Version of the CDK Bootstrap resources in this environment, automatically retrieved from SSM Parameter Store. [cdk:skip]"
366
- }
367
- },
368
- "Rules": {
369
- "CheckBootstrapVersion": {
370
- "Assertions": [
371
- {
372
- "Assert": {
373
- "Fn::Not": [
374
- {
375
- "Fn::Contains": [
376
- [
377
- "1",
378
- "2",
379
- "3",
380
- "4",
381
- "5"
382
- ],
383
- {
384
- "Ref": "BootstrapVersion"
385
- }
386
- ]
387
- }
388
- ]
389
- },
390
- "AssertDescription": "CDK bootstrap stack version 6 required. Please run 'cdk bootstrap' with a recent version of the CDK CLI."
391
- }
392
- ]
393
- }
394
- }
395
- }