-
Notifications
You must be signed in to change notification settings - Fork 24
Expand file tree
/
Copy pathservice-2.json
More file actions
614 lines (614 loc) · 36.4 KB
/
service-2.json
File metadata and controls
614 lines (614 loc) · 36.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
{
"version":"2.0",
"metadata":{
"apiVersion":"2017-05-13",
"endpointPrefix":"runtime.sagemaker",
"jsonVersion":"1.1",
"protocol":"rest-json",
"protocols":["rest-json"],
"serviceFullName":"Amazon SageMaker Runtime",
"serviceId":"SageMaker Runtime",
"signatureVersion":"v4",
"signingName":"sagemaker",
"uid":"runtime.sagemaker-2017-05-13",
"auth":["aws.auth#sigv4"]
},
"operations":{
"InvokeEndpoint":{
"name":"InvokeEndpoint",
"http":{
"method":"POST",
"requestUri":"/endpoints/{EndpointName}/invocations"
},
"input":{"shape":"InvokeEndpointInput"},
"output":{"shape":"InvokeEndpointOutput"},
"errors":[
{"shape":"InternalFailure"},
{"shape":"ServiceUnavailable"},
{"shape":"ValidationError"},
{"shape":"ModelError"},
{"shape":"InternalDependencyException"},
{"shape":"ModelNotReadyException"}
],
"documentation":"<p>After you deploy a model into production using Amazon SageMaker AI hosting services, your client applications use this API to get inferences from the model hosted at the specified endpoint. </p> <p>For an overview of Amazon SageMaker AI, see <a href=\"https://docs.aws.amazon.com/sagemaker/latest/dg/how-it-works.html\">How It Works</a>. </p> <p>Amazon SageMaker AI strips all POST headers except those supported by the API. Amazon SageMaker AI might add additional headers. You should not rely on the behavior of headers outside those enumerated in the request syntax. </p> <p>Calls to <code>InvokeEndpoint</code> are authenticated by using Amazon Web Services Signature Version 4. For information, see <a href=\"https://docs.aws.amazon.com/AmazonS3/latest/API/sig-v4-authenticating-requests.html\">Authenticating Requests (Amazon Web Services Signature Version 4)</a> in the <i>Amazon S3 API Reference</i>.</p> <p>A customer's model containers must respond to requests within 60 seconds. The model itself can have a maximum processing time of 60 seconds before responding to invocations. If your model is going to take 50-60 seconds of processing time, the SDK socket timeout should be set to be 70 seconds.</p> <note> <p>Endpoints are scoped to an individual account, and are not public. The URL does not contain the account ID, but Amazon SageMaker AI determines the account ID from the authentication token that is supplied by the caller.</p> </note>"
},
"InvokeEndpointAsync":{
"name":"InvokeEndpointAsync",
"http":{
"method":"POST",
"requestUri":"/endpoints/{EndpointName}/async-invocations",
"responseCode":202
},
"input":{"shape":"InvokeEndpointAsyncInput"},
"output":{"shape":"InvokeEndpointAsyncOutput"},
"errors":[
{"shape":"InternalFailure"},
{"shape":"ServiceUnavailable"},
{"shape":"ValidationError"}
],
"documentation":"<p>After you deploy a model into production using Amazon SageMaker AI hosting services, your client applications use this API to get inferences from the model hosted at the specified endpoint in an asynchronous manner.</p> <p>Inference requests sent to this API are enqueued for asynchronous processing. The processing of the inference request may or may not complete before you receive a response from this API. The response from this API will not contain the result of the inference request but contain information about where you can locate it.</p> <p>Amazon SageMaker AI strips all POST headers except those supported by the API. Amazon SageMaker AI might add additional headers. You should not rely on the behavior of headers outside those enumerated in the request syntax. </p> <p>Calls to <code>InvokeEndpointAsync</code> are authenticated by using Amazon Web Services Signature Version 4. For information, see <a href=\"https://docs.aws.amazon.com/AmazonS3/latest/API/sig-v4-authenticating-requests.html\">Authenticating Requests (Amazon Web Services Signature Version 4)</a> in the <i>Amazon S3 API Reference</i>.</p>"
},
"InvokeEndpointWithResponseStream":{
"name":"InvokeEndpointWithResponseStream",
"http":{
"method":"POST",
"requestUri":"/endpoints/{EndpointName}/invocations-response-stream"
},
"input":{"shape":"InvokeEndpointWithResponseStreamInput"},
"output":{"shape":"InvokeEndpointWithResponseStreamOutput"},
"errors":[
{"shape":"InternalFailure"},
{"shape":"ServiceUnavailable"},
{"shape":"ValidationError"},
{"shape":"ModelError"},
{"shape":"ModelStreamError"},
{"shape":"InternalStreamFailure"}
],
"documentation":"<p>Invokes a model at the specified endpoint to return the inference response as a stream. The inference stream provides the response payload incrementally as a series of parts. Before you can get an inference stream, you must have access to a model that's deployed using Amazon SageMaker AI hosting services, and the container for that model must support inference streaming.</p> <p>For more information that can help you use this API, see the following sections in the <i>Amazon SageMaker AI Developer Guide</i>:</p> <ul> <li> <p>For information about how to add streaming support to a model, see <a href=\"https://docs.aws.amazon.com/sagemaker/latest/dg/your-algorithms-inference-code.html#your-algorithms-inference-code-how-containe-serves-requests\">How Containers Serve Requests</a>.</p> </li> <li> <p>For information about how to process the streaming response, see <a href=\"https://docs.aws.amazon.com/sagemaker/latest/dg/realtime-endpoints-test-endpoints.html\">Invoke real-time endpoints</a>.</p> </li> </ul> <p>Before you can use this operation, your IAM permissions must allow the <code>sagemaker:InvokeEndpoint</code> action. For more information about Amazon SageMaker AI actions for IAM policies, see <a href=\"https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazonsagemaker.html\">Actions, resources, and condition keys for Amazon SageMaker AI</a> in the <i>IAM Service Authorization Reference</i>.</p> <p>Amazon SageMaker AI strips all POST headers except those supported by the API. Amazon SageMaker AI might add additional headers. You should not rely on the behavior of headers outside those enumerated in the request syntax. </p> <p>Calls to <code>InvokeEndpointWithResponseStream</code> are authenticated by using Amazon Web Services Signature Version 4. For information, see <a href=\"https://docs.aws.amazon.com/AmazonS3/latest/API/sig-v4-authenticating-requests.html\">Authenticating Requests (Amazon Web Services Signature Version 4)</a> in the <i>Amazon S3 API Reference</i>.</p>"
}
},
"shapes":{
"BodyBlob":{
"type":"blob",
"max":6291456,
"sensitive":true
},
"CustomAttributesHeader":{
"type":"string",
"max":1024,
"pattern":"\\p{ASCII}*",
"sensitive":true
},
"EnableExplanationsHeader":{
"type":"string",
"max":64,
"min":1,
"pattern":".*"
},
"EndpointName":{
"type":"string",
"max":63,
"pattern":"^[a-zA-Z0-9](-*[a-zA-Z0-9])*"
},
"ErrorCode":{"type":"string"},
"FilenameHeader":{
"type":"string",
"max":32,
"min":1,
"pattern":"^(?!.*\\..*\\.)[a-zA-Z0-9][a-zA-Z0-9-_\\.]*$"
},
"Header":{
"type":"string",
"max":1024,
"pattern":"\\p{ASCII}*"
},
"InferenceComponentHeader":{
"type":"string",
"max":63,
"pattern":"^[a-zA-Z0-9]([\\-a-zA-Z0-9]*[a-zA-Z0-9])?$"
},
"InferenceId":{
"type":"string",
"max":64,
"min":1,
"pattern":"\\A\\S[\\p{Print}]*\\z"
},
"InputLocationHeader":{
"type":"string",
"max":1024,
"min":1,
"pattern":"^(https|s3)://([^/]+)/?(.*)$"
},
"InternalDependencyException":{
"type":"structure",
"members":{
"Message":{"shape":"Message"}
},
"documentation":"<p>Your request caused an exception with an internal dependency. Contact customer support. </p>",
"error":{"httpStatusCode":530},
"exception":true,
"fault":true,
"synthetic":true
},
"InternalFailure":{
"type":"structure",
"members":{
"Message":{"shape":"Message"}
},
"documentation":"<p> An internal failure occurred. </p>",
"error":{"httpStatusCode":500},
"exception":true,
"fault":true,
"synthetic":true
},
"InternalStreamFailure":{
"type":"structure",
"members":{
"Message":{"shape":"Message"}
},
"documentation":"<p>The stream processing failed because of an unknown error, exception or failure. Try your request again.</p>",
"exception":true,
"fault":true,
"synthetic":true
},
"InvocationTimeoutSecondsHeader":{
"type":"integer",
"max":3600,
"min":1
},
"InvokeEndpointAsyncInput":{
"type":"structure",
"required":[
"EndpointName",
"InputLocation"
],
"members":{
"EndpointName":{
"shape":"EndpointName",
"documentation":"<p>The name of the endpoint that you specified when you created the endpoint using the <a href=\"https://docs.aws.amazon.com/sagemaker/latest/dg/API_CreateEndpoint.html\">CreateEndpoint</a> API.</p>",
"location":"uri",
"locationName":"EndpointName"
},
"ContentType":{
"shape":"Header",
"documentation":"<p>The MIME type of the input data in the request body.</p>",
"location":"header",
"locationName":"X-Amzn-SageMaker-Content-Type"
},
"Accept":{
"shape":"Header",
"documentation":"<p>The desired MIME type of the inference response from the model container.</p>",
"location":"header",
"locationName":"X-Amzn-SageMaker-Accept"
},
"CustomAttributes":{
"shape":"CustomAttributesHeader",
"documentation":"<p>Provides additional information about a request for an inference submitted to a model hosted at an Amazon SageMaker AI endpoint. The information is an opaque value that is forwarded verbatim. You could use this value, for example, to provide an ID that you can use to track a request or to provide other metadata that a service endpoint was programmed to process. The value must consist of no more than 1024 visible US-ASCII characters as specified in <a href=\"https://datatracker.ietf.org/doc/html/rfc7230#section-3.2.6\">Section 3.3.6. Field Value Components</a> of the Hypertext Transfer Protocol (HTTP/1.1). </p> <p>The code in your model is responsible for setting or updating any custom attributes in the response. If your code does not set this value in the response, an empty value is returned. For example, if a custom attribute represents the trace ID, your model can prepend the custom attribute with <code>Trace ID:</code> in your post-processing function. </p> <p>This feature is currently supported in the Amazon Web Services SDKs but not in the Amazon SageMaker AI Python SDK. </p>",
"location":"header",
"locationName":"X-Amzn-SageMaker-Custom-Attributes"
},
"InferenceId":{
"shape":"InferenceId",
"documentation":"<p>The identifier for the inference request. Amazon SageMaker AI will generate an identifier for you if none is specified. </p>",
"location":"header",
"locationName":"X-Amzn-SageMaker-Inference-Id"
},
"InputLocation":{
"shape":"InputLocationHeader",
"documentation":"<p>The Amazon S3 URI where the inference request payload is stored.</p>",
"location":"header",
"locationName":"X-Amzn-SageMaker-InputLocation"
},
"S3OutputPathExtension":{
"shape":"S3OutputPathExtensionHeader",
"documentation":"<p>The path extension that is appended to the Amazon S3 output path where the inference response payload is stored.</p>",
"location":"header",
"locationName":"X-Amzn-SageMaker-S3OutputPathExtension"
},
"Filename":{
"shape":"FilenameHeader",
"documentation":"<p>The filename for the inference response payload stored in Amazon S3. If not specified, Amazon SageMaker AI generates a filename based on the inference ID.</p>",
"location":"header",
"locationName":"X-Amzn-SageMaker-Filename"
},
"RequestTTLSeconds":{
"shape":"RequestTTLSecondsHeader",
"documentation":"<p>Maximum age in seconds a request can be in the queue before it is marked as expired. The default is 6 hours, or 21,600 seconds.</p>",
"location":"header",
"locationName":"X-Amzn-SageMaker-RequestTTLSeconds"
},
"InvocationTimeoutSeconds":{
"shape":"InvocationTimeoutSecondsHeader",
"documentation":"<p>Maximum amount of time in seconds a request can be processed before it is marked as expired. The default is 15 minutes, or 900 seconds.</p>",
"location":"header",
"locationName":"X-Amzn-SageMaker-InvocationTimeoutSeconds"
}
}
},
"InvokeEndpointAsyncOutput":{
"type":"structure",
"members":{
"InferenceId":{
"shape":"Header",
"documentation":"<p>Identifier for an inference request. This will be the same as the <code>InferenceId</code> specified in the input. Amazon SageMaker AI will generate an identifier for you if you do not specify one.</p>"
},
"OutputLocation":{
"shape":"Header",
"documentation":"<p>The Amazon S3 URI where the inference response payload is stored.</p>",
"location":"header",
"locationName":"X-Amzn-SageMaker-OutputLocation"
},
"FailureLocation":{
"shape":"Header",
"documentation":"<p>The Amazon S3 URI where the inference failure response payload is stored.</p>",
"location":"header",
"locationName":"X-Amzn-SageMaker-FailureLocation"
}
}
},
"InvokeEndpointInput":{
"type":"structure",
"required":[
"EndpointName",
"Body"
],
"members":{
"EndpointName":{
"shape":"EndpointName",
"documentation":"<p>The name of the endpoint that you specified when you created the endpoint using the <a href=\"https://docs.aws.amazon.com/sagemaker/latest/dg/API_CreateEndpoint.html\">CreateEndpoint</a> API.</p>",
"location":"uri",
"locationName":"EndpointName"
},
"Body":{
"shape":"BodyBlob",
"documentation":"<p>Provides input data, in the format specified in the <code>ContentType</code> request header. Amazon SageMaker AI passes all of the data in the body to the model. </p> <p>For information about the format of the request body, see <a href=\"https://docs.aws.amazon.com/sagemaker/latest/dg/cdf-inference.html\">Common Data Formats-Inference</a>.</p>"
},
"ContentType":{
"shape":"Header",
"documentation":"<p>The MIME type of the input data in the request body.</p>",
"location":"header",
"locationName":"Content-Type"
},
"Accept":{
"shape":"Header",
"documentation":"<p>The desired MIME type of the inference response from the model container.</p>",
"location":"header",
"locationName":"Accept"
},
"CustomAttributes":{
"shape":"CustomAttributesHeader",
"documentation":"<p>Provides additional information about a request for an inference submitted to a model hosted at an Amazon SageMaker AI endpoint. The information is an opaque value that is forwarded verbatim. You could use this value, for example, to provide an ID that you can use to track a request or to provide other metadata that a service endpoint was programmed to process. The value must consist of no more than 1024 visible US-ASCII characters as specified in <a href=\"https://datatracker.ietf.org/doc/html/rfc7230#section-3.2.6\">Section 3.3.6. Field Value Components</a> of the Hypertext Transfer Protocol (HTTP/1.1). </p> <p>The code in your model is responsible for setting or updating any custom attributes in the response. If your code does not set this value in the response, an empty value is returned. For example, if a custom attribute represents the trace ID, your model can prepend the custom attribute with <code>Trace ID:</code> in your post-processing function. </p> <p>This feature is currently supported in the Amazon Web Services SDKs but not in the Amazon SageMaker AI Python SDK. </p>",
"location":"header",
"locationName":"X-Amzn-SageMaker-Custom-Attributes"
},
"TargetModel":{
"shape":"TargetModelHeader",
"documentation":"<p>The model to request for inference when invoking a multi-model endpoint.</p>",
"location":"header",
"locationName":"X-Amzn-SageMaker-Target-Model"
},
"TargetVariant":{
"shape":"TargetVariantHeader",
"documentation":"<p>Specify the production variant to send the inference request to when invoking an endpoint that is running two or more variants. Note that this parameter overrides the default behavior for the endpoint, which is to distribute the invocation traffic based on the variant weights.</p> <p>For information about how to use variant targeting to perform a/b testing, see <a href=\"https://docs.aws.amazon.com/sagemaker/latest/dg/model-ab-testing.html\">Test models in production</a> </p>",
"location":"header",
"locationName":"X-Amzn-SageMaker-Target-Variant"
},
"TargetContainerHostname":{
"shape":"TargetContainerHostnameHeader",
"documentation":"<p>If the endpoint hosts multiple containers and is configured to use direct invocation, this parameter specifies the host name of the container to invoke.</p>",
"location":"header",
"locationName":"X-Amzn-SageMaker-Target-Container-Hostname"
},
"InferenceId":{
"shape":"InferenceId",
"documentation":"<p>If you provide a value, it is added to the captured data when you enable data capture on the endpoint. For information about data capture, see <a href=\"https://docs.aws.amazon.com/sagemaker/latest/dg/model-monitor-data-capture.html\">Capture Data</a>.</p>",
"location":"header",
"locationName":"X-Amzn-SageMaker-Inference-Id"
},
"EnableExplanations":{
"shape":"EnableExplanationsHeader",
"documentation":"<p>An optional JMESPath expression used to override the <code>EnableExplanations</code> parameter of the <code>ClarifyExplainerConfig</code> API. See the <a href=\"https://docs.aws.amazon.com/sagemaker/latest/dg/clarify-online-explainability-create-endpoint.html#clarify-online-explainability-create-endpoint-enable\">EnableExplanations</a> section in the developer guide for more information. </p>",
"location":"header",
"locationName":"X-Amzn-SageMaker-Enable-Explanations"
},
"InferenceComponentName":{
"shape":"InferenceComponentHeader",
"documentation":"<p>If the endpoint hosts one or more inference components, this parameter specifies the name of inference component to invoke.</p>",
"location":"header",
"locationName":"X-Amzn-SageMaker-Inference-Component"
},
"SessionId":{
"shape":"SessionIdOrNewSessionConstantHeader",
"documentation":"<p>Creates a stateful session or identifies an existing one. You can do one of the following:</p> <ul> <li> <p>Create a stateful session by specifying the value <code>NEW_SESSION</code>.</p> </li> <li> <p>Send your request to an existing stateful session by specifying the ID of that session.</p> </li> </ul> <p>With a stateful session, you can send multiple requests to a stateful model. When you create a session with a stateful model, the model must create the session ID and set the expiration time. The model must also provide that information in the response to your request. You can get the ID and timestamp from the <code>NewSessionId</code> response parameter. For any subsequent request where you specify that session ID, SageMaker AI routes the request to the same instance that supports the session.</p>",
"location":"header",
"locationName":"X-Amzn-SageMaker-Session-Id"
}
},
"payload":"Body"
},
"InvokeEndpointOutput":{
"type":"structure",
"required":["Body"],
"members":{
"Body":{
"shape":"BodyBlob",
"documentation":"<p>Includes the inference provided by the model. </p> <p>For information about the format of the response body, see <a href=\"https://docs.aws.amazon.com/sagemaker/latest/dg/cdf-inference.html\">Common Data Formats-Inference</a>.</p> <p>If the explainer is activated, the body includes the explanations provided by the model. For more information, see the <b>Response section</b> under <a href=\"https://docs.aws.amazon.com/sagemaker/latest/dg/clarify-online-explainability-invoke-endpoint.html#clarify-online-explainability-response\">Invoke the Endpoint</a> in the Developer Guide.</p>"
},
"ContentType":{
"shape":"Header",
"documentation":"<p>The MIME type of the inference returned from the model container.</p>",
"location":"header",
"locationName":"Content-Type"
},
"InvokedProductionVariant":{
"shape":"Header",
"documentation":"<p>Identifies the production variant that was invoked.</p>",
"location":"header",
"locationName":"x-Amzn-Invoked-Production-Variant"
},
"CustomAttributes":{
"shape":"CustomAttributesHeader",
"documentation":"<p>Provides additional information in the response about the inference returned by a model hosted at an Amazon SageMaker AI endpoint. The information is an opaque value that is forwarded verbatim. You could use this value, for example, to return an ID received in the <code>CustomAttributes</code> header of a request or other metadata that a service endpoint was programmed to produce. The value must consist of no more than 1024 visible US-ASCII characters as specified in <a href=\"https://tools.ietf.org/html/rfc7230#section-3.2.6\">Section 3.3.6. Field Value Components</a> of the Hypertext Transfer Protocol (HTTP/1.1). If the customer wants the custom attribute returned, the model must set the custom attribute to be included on the way back. </p> <p>The code in your model is responsible for setting or updating any custom attributes in the response. If your code does not set this value in the response, an empty value is returned. For example, if a custom attribute represents the trace ID, your model can prepend the custom attribute with <code>Trace ID:</code> in your post-processing function.</p> <p>This feature is currently supported in the Amazon Web Services SDKs but not in the Amazon SageMaker AI Python SDK.</p>",
"location":"header",
"locationName":"X-Amzn-SageMaker-Custom-Attributes"
},
"NewSessionId":{
"shape":"NewSessionResponseHeader",
"documentation":"<p>If you created a stateful session with your request, the ID and expiration time that the model assigns to that session.</p>",
"location":"header",
"locationName":"X-Amzn-SageMaker-New-Session-Id"
},
"ClosedSessionId":{
"shape":"SessionIdHeader",
"documentation":"<p>If you closed a stateful session with your request, the ID of that session.</p>",
"location":"header",
"locationName":"X-Amzn-SageMaker-Closed-Session-Id"
}
},
"payload":"Body"
},
"InvokeEndpointWithResponseStreamInput":{
"type":"structure",
"required":[
"EndpointName",
"Body"
],
"members":{
"EndpointName":{
"shape":"EndpointName",
"documentation":"<p>The name of the endpoint that you specified when you created the endpoint using the <a href=\"https://docs.aws.amazon.com/sagemaker/latest/dg/API_CreateEndpoint.html\">CreateEndpoint</a> API.</p>",
"location":"uri",
"locationName":"EndpointName"
},
"Body":{
"shape":"BodyBlob",
"documentation":"<p>Provides input data, in the format specified in the <code>ContentType</code> request header. Amazon SageMaker AI passes all of the data in the body to the model. </p> <p>For information about the format of the request body, see <a href=\"https://docs.aws.amazon.com/sagemaker/latest/dg/cdf-inference.html\">Common Data Formats-Inference</a>.</p>"
},
"ContentType":{
"shape":"Header",
"documentation":"<p>The MIME type of the input data in the request body.</p>",
"location":"header",
"locationName":"Content-Type"
},
"Accept":{
"shape":"Header",
"documentation":"<p>The desired MIME type of the inference response from the model container.</p>",
"location":"header",
"locationName":"X-Amzn-SageMaker-Accept"
},
"CustomAttributes":{
"shape":"CustomAttributesHeader",
"documentation":"<p>Provides additional information about a request for an inference submitted to a model hosted at an Amazon SageMaker AI endpoint. The information is an opaque value that is forwarded verbatim. You could use this value, for example, to provide an ID that you can use to track a request or to provide other metadata that a service endpoint was programmed to process. The value must consist of no more than 1024 visible US-ASCII characters as specified in <a href=\"https://datatracker.ietf.org/doc/html/rfc7230#section-3.2.6\">Section 3.3.6. Field Value Components</a> of the Hypertext Transfer Protocol (HTTP/1.1). </p> <p>The code in your model is responsible for setting or updating any custom attributes in the response. If your code does not set this value in the response, an empty value is returned. For example, if a custom attribute represents the trace ID, your model can prepend the custom attribute with <code>Trace ID:</code> in your post-processing function. </p> <p>This feature is currently supported in the Amazon Web Services SDKs but not in the Amazon SageMaker AI Python SDK. </p>",
"location":"header",
"locationName":"X-Amzn-SageMaker-Custom-Attributes"
},
"TargetVariant":{
"shape":"TargetVariantHeader",
"documentation":"<p>Specify the production variant to send the inference request to when invoking an endpoint that is running two or more variants. Note that this parameter overrides the default behavior for the endpoint, which is to distribute the invocation traffic based on the variant weights.</p> <p>For information about how to use variant targeting to perform a/b testing, see <a href=\"https://docs.aws.amazon.com/sagemaker/latest/dg/model-ab-testing.html\">Test models in production</a> </p>",
"location":"header",
"locationName":"X-Amzn-SageMaker-Target-Variant"
},
"TargetContainerHostname":{
"shape":"TargetContainerHostnameHeader",
"documentation":"<p>If the endpoint hosts multiple containers and is configured to use direct invocation, this parameter specifies the host name of the container to invoke.</p>",
"location":"header",
"locationName":"X-Amzn-SageMaker-Target-Container-Hostname"
},
"InferenceId":{
"shape":"InferenceId",
"documentation":"<p>An identifier that you assign to your request.</p>",
"location":"header",
"locationName":"X-Amzn-SageMaker-Inference-Id"
},
"InferenceComponentName":{
"shape":"InferenceComponentHeader",
"documentation":"<p>If the endpoint hosts one or more inference components, this parameter specifies the name of inference component to invoke for a streaming response.</p>",
"location":"header",
"locationName":"X-Amzn-SageMaker-Inference-Component"
},
"SessionId":{
"shape":"SessionIdHeader",
"documentation":"<p>The ID of a stateful session to handle your request.</p> <p>You can't create a stateful session by using the <code>InvokeEndpointWithResponseStream</code> action. Instead, you can create one by using the <code> <a>InvokeEndpoint</a> </code> action. In your request, you specify <code>NEW_SESSION</code> for the <code>SessionId</code> request parameter. The response to that request provides the session ID for the <code>NewSessionId</code> response parameter.</p>",
"location":"header",
"locationName":"X-Amzn-SageMaker-Session-Id"
}
},
"payload":"Body"
},
"InvokeEndpointWithResponseStreamOutput":{
"type":"structure",
"required":["Body"],
"members":{
"Body":{"shape":"ResponseStream"},
"ContentType":{
"shape":"Header",
"documentation":"<p>The MIME type of the inference returned from the model container.</p>",
"location":"header",
"locationName":"X-Amzn-SageMaker-Content-Type"
},
"InvokedProductionVariant":{
"shape":"Header",
"documentation":"<p>Identifies the production variant that was invoked.</p>",
"location":"header",
"locationName":"x-Amzn-Invoked-Production-Variant"
},
"CustomAttributes":{
"shape":"CustomAttributesHeader",
"documentation":"<p>Provides additional information in the response about the inference returned by a model hosted at an Amazon SageMaker AI endpoint. The information is an opaque value that is forwarded verbatim. You could use this value, for example, to return an ID received in the <code>CustomAttributes</code> header of a request or other metadata that a service endpoint was programmed to produce. The value must consist of no more than 1024 visible US-ASCII characters as specified in <a href=\"https://tools.ietf.org/html/rfc7230#section-3.2.6\">Section 3.3.6. Field Value Components</a> of the Hypertext Transfer Protocol (HTTP/1.1). If the customer wants the custom attribute returned, the model must set the custom attribute to be included on the way back. </p> <p>The code in your model is responsible for setting or updating any custom attributes in the response. If your code does not set this value in the response, an empty value is returned. For example, if a custom attribute represents the trace ID, your model can prepend the custom attribute with <code>Trace ID:</code> in your post-processing function.</p> <p>This feature is currently supported in the Amazon Web Services SDKs but not in the Amazon SageMaker AI Python SDK.</p>",
"location":"header",
"locationName":"X-Amzn-SageMaker-Custom-Attributes"
}
},
"payload":"Body"
},
"LogStreamArn":{"type":"string"},
"Message":{
"type":"string",
"max":2048
},
"ModelError":{
"type":"structure",
"members":{
"Message":{"shape":"Message"},
"OriginalStatusCode":{
"shape":"StatusCode",
"documentation":"<p> Original status code. </p>"
},
"OriginalMessage":{
"shape":"Message",
"documentation":"<p> Original message. </p>"
},
"LogStreamArn":{
"shape":"LogStreamArn",
"documentation":"<p> The Amazon Resource Name (ARN) of the log stream. </p>"
}
},
"documentation":"<p> Model (owned by the customer in the container) returned 4xx or 5xx error code. </p>",
"error":{"httpStatusCode":424},
"exception":true
},
"ModelNotReadyException":{
"type":"structure",
"members":{
"Message":{"shape":"Message"}
},
"documentation":"<p>Either a serverless endpoint variant's resources are still being provisioned, or a multi-model endpoint is still downloading or loading the target model. Wait and try your request again.</p>",
"error":{"httpStatusCode":429},
"exception":true,
"synthetic":true
},
"ModelStreamError":{
"type":"structure",
"members":{
"Message":{"shape":"Message"},
"ErrorCode":{
"shape":"ErrorCode",
"documentation":"<p>This error can have the following error codes:</p> <dl> <dt>ModelInvocationTimeExceeded</dt> <dd> <p>The model failed to finish sending the response within the timeout period allowed by Amazon SageMaker AI.</p> </dd> <dt>StreamBroken</dt> <dd> <p>The Transmission Control Protocol (TCP) connection between the client and the model was reset or closed.</p> </dd> </dl>"
}
},
"documentation":"<p> An error occurred while streaming the response body. This error can have the following error codes:</p> <dl> <dt>ModelInvocationTimeExceeded</dt> <dd> <p>The model failed to finish sending the response within the timeout period allowed by Amazon SageMaker AI.</p> </dd> <dt>StreamBroken</dt> <dd> <p>The Transmission Control Protocol (TCP) connection between the client and the model was reset or closed.</p> </dd> </dl>",
"exception":true,
"synthetic":true
},
"NewSessionResponseHeader":{
"type":"string",
"max":256,
"pattern":"^[a-zA-Z0-9](-*[a-zA-Z0-9])*;\\sExpires=[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}Z$"
},
"PartBlob":{
"type":"blob",
"sensitive":true
},
"PayloadPart":{
"type":"structure",
"members":{
"Bytes":{
"shape":"PartBlob",
"documentation":"<p>A blob that contains part of the response for your streaming inference request.</p>",
"eventpayload":true
}
},
"documentation":"<p>A wrapper for pieces of the payload that's returned in response to a streaming inference request. A streaming inference response consists of one or more payload parts. </p>",
"event":true
},
"RequestTTLSecondsHeader":{
"type":"integer",
"max":21600,
"min":60
},
"ResponseStream":{
"type":"structure",
"members":{
"PayloadPart":{
"shape":"PayloadPart",
"documentation":"<p>A wrapper for pieces of the payload that's returned in response to a streaming inference request. A streaming inference response consists of one or more payload parts. </p>"
},
"ModelStreamError":{
"shape":"ModelStreamError",
"documentation":"<p> An error occurred while streaming the response body. This error can have the following error codes:</p> <dl> <dt>ModelInvocationTimeExceeded</dt> <dd> <p>The model failed to finish sending the response within the timeout period allowed by Amazon SageMaker AI.</p> </dd> <dt>StreamBroken</dt> <dd> <p>The Transmission Control Protocol (TCP) connection between the client and the model was reset or closed.</p> </dd> </dl>"
},
"InternalStreamFailure":{
"shape":"InternalStreamFailure",
"documentation":"<p>The stream processing failed because of an unknown error, exception or failure. Try your request again.</p>"
}
},
"documentation":"<p>A stream of payload parts. Each part contains a portion of the response for a streaming inference request.</p>",
"eventstream":true
},
"S3OutputPathExtensionHeader":{
"type":"string",
"max":512,
"min":1,
"pattern":"^(?!s3:|https:)[a-zA-Z0-9!_.*'()/-]+$"
},
"ServiceUnavailable":{
"type":"structure",
"members":{
"Message":{"shape":"Message"}
},
"documentation":"<p> The service is unavailable. Try your call again. </p>",
"error":{"httpStatusCode":503},
"exception":true,
"fault":true,
"synthetic":true
},
"SessionIdHeader":{
"type":"string",
"max":256,
"pattern":"^[a-zA-Z0-9](-*[a-zA-Z0-9])*$"
},
"SessionIdOrNewSessionConstantHeader":{
"type":"string",
"max":256,
"pattern":"^(NEW_SESSION)$|^[a-zA-Z0-9](-*[a-zA-Z0-9])*$"
},
"StatusCode":{"type":"integer"},
"TargetContainerHostnameHeader":{
"type":"string",
"max":63,
"pattern":"^[a-zA-Z0-9](-*[a-zA-Z0-9])*"
},
"TargetModelHeader":{
"type":"string",
"max":1024,
"min":1,
"pattern":"\\A\\S[\\p{Print}]*\\z"
},
"TargetVariantHeader":{
"type":"string",
"max":63,
"pattern":"^[a-zA-Z0-9](-*[a-zA-Z0-9])*"
},
"ValidationError":{
"type":"structure",
"members":{
"Message":{"shape":"Message"}
},
"documentation":"<p> Inspect your request and try again. </p>",
"error":{"httpStatusCode":400},
"exception":true,
"synthetic":true
}
},
"documentation":"<p> The Amazon SageMaker AI runtime API. </p>"
}