@aws-sdk/client-sagemaker-runtime 3.928.0 → 3.930.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.
- package/dist-cjs/index.js +532 -427
- package/dist-cjs/runtimeConfig.shared.js +2 -0
- package/dist-es/SageMakerRuntimeClient.js +2 -0
- package/dist-es/commands/InvokeEndpointAsyncCommand.js +3 -10
- package/dist-es/commands/InvokeEndpointCommand.js +3 -10
- package/dist-es/commands/InvokeEndpointWithResponseStreamCommand.js +3 -10
- package/dist-es/models/models_0.js +0 -51
- package/dist-es/runtimeConfig.shared.js +2 -0
- package/dist-es/schemas/schemas_0.js +519 -0
- package/dist-types/SageMakerRuntimeClient.d.ts +10 -1
- package/dist-types/models/models_0.d.ts +4 -29
- package/dist-types/runtimeConfig.browser.d.ts +1 -0
- package/dist-types/runtimeConfig.d.ts +1 -0
- package/dist-types/runtimeConfig.native.d.ts +1 -0
- package/dist-types/runtimeConfig.shared.d.ts +1 -0
- package/dist-types/schemas/schemas_0.d.ts +24 -0
- package/dist-types/ts3.4/SageMakerRuntimeClient.d.ts +4 -0
- package/dist-types/ts3.4/models/models_0.d.ts +0 -20
- package/dist-types/ts3.4/runtimeConfig.browser.d.ts +4 -0
- package/dist-types/ts3.4/runtimeConfig.d.ts +4 -0
- package/dist-types/ts3.4/runtimeConfig.native.d.ts +4 -0
- package/dist-types/ts3.4/runtimeConfig.shared.d.ts +4 -0
- package/dist-types/ts3.4/schemas/schemas_0.d.ts +29 -0
- package/package.json +37 -37
- package/dist-es/protocols/Aws_restJson1.js +0 -345
- package/dist-types/protocols/Aws_restJson1.d.ts +0 -29
- package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +0 -44
package/dist-cjs/index.js
CHANGED
|
@@ -6,6 +6,7 @@ var middlewareRecursionDetection = require('@aws-sdk/middleware-recursion-detect
|
|
|
6
6
|
var middlewareUserAgent = require('@aws-sdk/middleware-user-agent');
|
|
7
7
|
var configResolver = require('@smithy/config-resolver');
|
|
8
8
|
var core = require('@smithy/core');
|
|
9
|
+
var schema = require('@smithy/core/schema');
|
|
9
10
|
var eventstreamSerdeConfigResolver = require('@smithy/eventstream-serde-config-resolver');
|
|
10
11
|
var middlewareContentLength = require('@smithy/middleware-content-length');
|
|
11
12
|
var middlewareEndpoint = require('@smithy/middleware-endpoint');
|
|
@@ -15,8 +16,6 @@ var httpAuthSchemeProvider = require('./auth/httpAuthSchemeProvider');
|
|
|
15
16
|
var runtimeConfig = require('./runtimeConfig');
|
|
16
17
|
var regionConfigResolver = require('@aws-sdk/region-config-resolver');
|
|
17
18
|
var protocolHttp = require('@smithy/protocol-http');
|
|
18
|
-
var middlewareSerde = require('@smithy/middleware-serde');
|
|
19
|
-
var core$1 = require('@aws-sdk/core');
|
|
20
19
|
|
|
21
20
|
const resolveClientEndpointParameters = (options) => {
|
|
22
21
|
return Object.assign(options, {
|
|
@@ -93,6 +92,7 @@ class SageMakerRuntimeClient extends smithyClient.Client {
|
|
|
93
92
|
const _config_8 = httpAuthSchemeProvider.resolveHttpAuthSchemeConfig(_config_7);
|
|
94
93
|
const _config_9 = resolveRuntimeExtensions(_config_8, configuration?.extensions || []);
|
|
95
94
|
this.config = _config_9;
|
|
95
|
+
this.middlewareStack.use(schema.getSchemaSerdePlugin(this.config));
|
|
96
96
|
this.middlewareStack.use(middlewareUserAgent.getUserAgentPlugin(this.config));
|
|
97
97
|
this.middlewareStack.use(middlewareRetry.getRetryPlugin(this.config));
|
|
98
98
|
this.middlewareStack.use(middlewareContentLength.getContentLengthPlugin(this.config));
|
|
@@ -112,14 +112,14 @@ class SageMakerRuntimeClient extends smithyClient.Client {
|
|
|
112
112
|
}
|
|
113
113
|
}
|
|
114
114
|
|
|
115
|
-
class SageMakerRuntimeServiceException extends smithyClient.ServiceException {
|
|
115
|
+
let SageMakerRuntimeServiceException$1 = class SageMakerRuntimeServiceException extends smithyClient.ServiceException {
|
|
116
116
|
constructor(options) {
|
|
117
117
|
super(options);
|
|
118
118
|
Object.setPrototypeOf(this, SageMakerRuntimeServiceException.prototype);
|
|
119
119
|
}
|
|
120
|
-
}
|
|
120
|
+
};
|
|
121
121
|
|
|
122
|
-
class InternalDependencyException extends SageMakerRuntimeServiceException {
|
|
122
|
+
let InternalDependencyException$1 = class InternalDependencyException extends SageMakerRuntimeServiceException$1 {
|
|
123
123
|
name = "InternalDependencyException";
|
|
124
124
|
$fault = "server";
|
|
125
125
|
Message;
|
|
@@ -132,8 +132,8 @@ class InternalDependencyException extends SageMakerRuntimeServiceException {
|
|
|
132
132
|
Object.setPrototypeOf(this, InternalDependencyException.prototype);
|
|
133
133
|
this.Message = opts.Message;
|
|
134
134
|
}
|
|
135
|
-
}
|
|
136
|
-
class InternalFailure extends SageMakerRuntimeServiceException {
|
|
135
|
+
};
|
|
136
|
+
let InternalFailure$1 = class InternalFailure extends SageMakerRuntimeServiceException$1 {
|
|
137
137
|
name = "InternalFailure";
|
|
138
138
|
$fault = "server";
|
|
139
139
|
Message;
|
|
@@ -146,8 +146,8 @@ class InternalFailure extends SageMakerRuntimeServiceException {
|
|
|
146
146
|
Object.setPrototypeOf(this, InternalFailure.prototype);
|
|
147
147
|
this.Message = opts.Message;
|
|
148
148
|
}
|
|
149
|
-
}
|
|
150
|
-
class ModelError extends SageMakerRuntimeServiceException {
|
|
149
|
+
};
|
|
150
|
+
let ModelError$1 = class ModelError extends SageMakerRuntimeServiceException$1 {
|
|
151
151
|
name = "ModelError";
|
|
152
152
|
$fault = "client";
|
|
153
153
|
Message;
|
|
@@ -166,8 +166,8 @@ class ModelError extends SageMakerRuntimeServiceException {
|
|
|
166
166
|
this.OriginalMessage = opts.OriginalMessage;
|
|
167
167
|
this.LogStreamArn = opts.LogStreamArn;
|
|
168
168
|
}
|
|
169
|
-
}
|
|
170
|
-
class ModelNotReadyException extends SageMakerRuntimeServiceException {
|
|
169
|
+
};
|
|
170
|
+
let ModelNotReadyException$1 = class ModelNotReadyException extends SageMakerRuntimeServiceException$1 {
|
|
171
171
|
name = "ModelNotReadyException";
|
|
172
172
|
$fault = "client";
|
|
173
173
|
Message;
|
|
@@ -180,8 +180,8 @@ class ModelNotReadyException extends SageMakerRuntimeServiceException {
|
|
|
180
180
|
Object.setPrototypeOf(this, ModelNotReadyException.prototype);
|
|
181
181
|
this.Message = opts.Message;
|
|
182
182
|
}
|
|
183
|
-
}
|
|
184
|
-
class ServiceUnavailable extends SageMakerRuntimeServiceException {
|
|
183
|
+
};
|
|
184
|
+
let ServiceUnavailable$1 = class ServiceUnavailable extends SageMakerRuntimeServiceException$1 {
|
|
185
185
|
name = "ServiceUnavailable";
|
|
186
186
|
$fault = "server";
|
|
187
187
|
Message;
|
|
@@ -194,8 +194,8 @@ class ServiceUnavailable extends SageMakerRuntimeServiceException {
|
|
|
194
194
|
Object.setPrototypeOf(this, ServiceUnavailable.prototype);
|
|
195
195
|
this.Message = opts.Message;
|
|
196
196
|
}
|
|
197
|
-
}
|
|
198
|
-
class ValidationError extends SageMakerRuntimeServiceException {
|
|
197
|
+
};
|
|
198
|
+
let ValidationError$1 = class ValidationError extends SageMakerRuntimeServiceException$1 {
|
|
199
199
|
name = "ValidationError";
|
|
200
200
|
$fault = "client";
|
|
201
201
|
Message;
|
|
@@ -208,8 +208,8 @@ class ValidationError extends SageMakerRuntimeServiceException {
|
|
|
208
208
|
Object.setPrototypeOf(this, ValidationError.prototype);
|
|
209
209
|
this.Message = opts.Message;
|
|
210
210
|
}
|
|
211
|
-
}
|
|
212
|
-
class InternalStreamFailure extends SageMakerRuntimeServiceException {
|
|
211
|
+
};
|
|
212
|
+
let InternalStreamFailure$1 = class InternalStreamFailure extends SageMakerRuntimeServiceException$1 {
|
|
213
213
|
name = "InternalStreamFailure";
|
|
214
214
|
$fault = "server";
|
|
215
215
|
Message;
|
|
@@ -222,8 +222,8 @@ class InternalStreamFailure extends SageMakerRuntimeServiceException {
|
|
|
222
222
|
Object.setPrototypeOf(this, InternalStreamFailure.prototype);
|
|
223
223
|
this.Message = opts.Message;
|
|
224
224
|
}
|
|
225
|
-
}
|
|
226
|
-
class ModelStreamError extends SageMakerRuntimeServiceException {
|
|
225
|
+
};
|
|
226
|
+
let ModelStreamError$1 = class ModelStreamError extends SageMakerRuntimeServiceException$1 {
|
|
227
227
|
name = "ModelStreamError";
|
|
228
228
|
$fault = "client";
|
|
229
229
|
Message;
|
|
@@ -238,412 +238,534 @@ class ModelStreamError extends SageMakerRuntimeServiceException {
|
|
|
238
238
|
this.Message = opts.Message;
|
|
239
239
|
this.ErrorCode = opts.ErrorCode;
|
|
240
240
|
}
|
|
241
|
-
}
|
|
242
|
-
exports.ResponseStream = void 0;
|
|
243
|
-
(function (ResponseStream) {
|
|
244
|
-
ResponseStream.visit = (value, visitor) => {
|
|
245
|
-
if (value.PayloadPart !== undefined)
|
|
246
|
-
return visitor.PayloadPart(value.PayloadPart);
|
|
247
|
-
if (value.ModelStreamError !== undefined)
|
|
248
|
-
return visitor.ModelStreamError(value.ModelStreamError);
|
|
249
|
-
if (value.InternalStreamFailure !== undefined)
|
|
250
|
-
return visitor.InternalStreamFailure(value.InternalStreamFailure);
|
|
251
|
-
return visitor._(value.$unknown[0], value.$unknown[1]);
|
|
252
|
-
};
|
|
253
|
-
})(exports.ResponseStream || (exports.ResponseStream = {}));
|
|
254
|
-
const InvokeEndpointInputFilterSensitiveLog = (obj) => ({
|
|
255
|
-
...obj,
|
|
256
|
-
...(obj.Body && { Body: smithyClient.SENSITIVE_STRING }),
|
|
257
|
-
...(obj.CustomAttributes && { CustomAttributes: smithyClient.SENSITIVE_STRING }),
|
|
258
|
-
});
|
|
259
|
-
const InvokeEndpointOutputFilterSensitiveLog = (obj) => ({
|
|
260
|
-
...obj,
|
|
261
|
-
...(obj.Body && { Body: smithyClient.SENSITIVE_STRING }),
|
|
262
|
-
...(obj.CustomAttributes && { CustomAttributes: smithyClient.SENSITIVE_STRING }),
|
|
263
|
-
});
|
|
264
|
-
const InvokeEndpointAsyncInputFilterSensitiveLog = (obj) => ({
|
|
265
|
-
...obj,
|
|
266
|
-
...(obj.CustomAttributes && { CustomAttributes: smithyClient.SENSITIVE_STRING }),
|
|
267
|
-
});
|
|
268
|
-
const InvokeEndpointWithResponseStreamInputFilterSensitiveLog = (obj) => ({
|
|
269
|
-
...obj,
|
|
270
|
-
...(obj.Body && { Body: smithyClient.SENSITIVE_STRING }),
|
|
271
|
-
...(obj.CustomAttributes && { CustomAttributes: smithyClient.SENSITIVE_STRING }),
|
|
272
|
-
});
|
|
273
|
-
const PayloadPartFilterSensitiveLog = (obj) => ({
|
|
274
|
-
...obj,
|
|
275
|
-
...(obj.Bytes && { Bytes: smithyClient.SENSITIVE_STRING }),
|
|
276
|
-
});
|
|
277
|
-
const ResponseStreamFilterSensitiveLog = (obj) => {
|
|
278
|
-
if (obj.PayloadPart !== undefined)
|
|
279
|
-
return { PayloadPart: PayloadPartFilterSensitiveLog(obj.PayloadPart) };
|
|
280
|
-
if (obj.ModelStreamError !== undefined)
|
|
281
|
-
return { ModelStreamError: obj.ModelStreamError };
|
|
282
|
-
if (obj.InternalStreamFailure !== undefined)
|
|
283
|
-
return { InternalStreamFailure: obj.InternalStreamFailure };
|
|
284
|
-
if (obj.$unknown !== undefined)
|
|
285
|
-
return { [obj.$unknown[0]]: "UNKNOWN" };
|
|
286
241
|
};
|
|
287
|
-
const InvokeEndpointWithResponseStreamOutputFilterSensitiveLog = (obj) => ({
|
|
288
|
-
...obj,
|
|
289
|
-
...(obj.Body && { Body: "STREAMING_CONTENT" }),
|
|
290
|
-
...(obj.CustomAttributes && { CustomAttributes: smithyClient.SENSITIVE_STRING }),
|
|
291
|
-
});
|
|
292
242
|
|
|
293
|
-
const se_InvokeEndpointCommand = async (input, context) => {
|
|
294
|
-
const b = core.requestBuilder(input, context);
|
|
295
|
-
const headers = smithyClient.map({}, smithyClient.isSerializableHeaderValue, {
|
|
296
|
-
[_ct]: input[_CT] || "application/octet-stream",
|
|
297
|
-
[_a]: input[_A],
|
|
298
|
-
[_xasca]: input[_CA],
|
|
299
|
-
[_xastm]: input[_TM],
|
|
300
|
-
[_xastv]: input[_TV],
|
|
301
|
-
[_xastch]: input[_TCH],
|
|
302
|
-
[_xasii]: input[_II],
|
|
303
|
-
[_xasee]: input[_EE],
|
|
304
|
-
[_xasic]: input[_ICN],
|
|
305
|
-
[_xassi]: input[_SI],
|
|
306
|
-
});
|
|
307
|
-
b.bp("/endpoints/{EndpointName}/invocations");
|
|
308
|
-
b.p("EndpointName", () => input.EndpointName, "{EndpointName}", false);
|
|
309
|
-
let body;
|
|
310
|
-
if (input.Body !== undefined) {
|
|
311
|
-
body = input.Body;
|
|
312
|
-
}
|
|
313
|
-
b.m("POST").h(headers).b(body);
|
|
314
|
-
return b.build();
|
|
315
|
-
};
|
|
316
|
-
const se_InvokeEndpointAsyncCommand = async (input, context) => {
|
|
317
|
-
const b = core.requestBuilder(input, context);
|
|
318
|
-
const headers = smithyClient.map({}, smithyClient.isSerializableHeaderValue, {
|
|
319
|
-
[_xasct]: input[_CT],
|
|
320
|
-
[_xasa]: input[_A],
|
|
321
|
-
[_xasca]: input[_CA],
|
|
322
|
-
[_xasii]: input[_II],
|
|
323
|
-
[_xasi]: input[_IL],
|
|
324
|
-
[_xasr]: [() => smithyClient.isSerializableHeaderValue(input[_RTTLS]), () => input[_RTTLS].toString()],
|
|
325
|
-
[_xasi_]: [() => smithyClient.isSerializableHeaderValue(input[_ITS]), () => input[_ITS].toString()],
|
|
326
|
-
});
|
|
327
|
-
b.bp("/endpoints/{EndpointName}/async-invocations");
|
|
328
|
-
b.p("EndpointName", () => input.EndpointName, "{EndpointName}", false);
|
|
329
|
-
let body;
|
|
330
|
-
b.m("POST").h(headers).b(body);
|
|
331
|
-
return b.build();
|
|
332
|
-
};
|
|
333
|
-
const se_InvokeEndpointWithResponseStreamCommand = async (input, context) => {
|
|
334
|
-
const b = core.requestBuilder(input, context);
|
|
335
|
-
const headers = smithyClient.map({}, smithyClient.isSerializableHeaderValue, {
|
|
336
|
-
[_ct]: input[_CT] || "application/octet-stream",
|
|
337
|
-
[_xasa]: input[_A],
|
|
338
|
-
[_xasca]: input[_CA],
|
|
339
|
-
[_xastv]: input[_TV],
|
|
340
|
-
[_xastch]: input[_TCH],
|
|
341
|
-
[_xasii]: input[_II],
|
|
342
|
-
[_xasic]: input[_ICN],
|
|
343
|
-
[_xassi]: input[_SI],
|
|
344
|
-
});
|
|
345
|
-
b.bp("/endpoints/{EndpointName}/invocations-response-stream");
|
|
346
|
-
b.p("EndpointName", () => input.EndpointName, "{EndpointName}", false);
|
|
347
|
-
let body;
|
|
348
|
-
if (input.Body !== undefined) {
|
|
349
|
-
body = input.Body;
|
|
350
|
-
}
|
|
351
|
-
b.m("POST").h(headers).b(body);
|
|
352
|
-
return b.build();
|
|
353
|
-
};
|
|
354
|
-
const de_InvokeEndpointCommand = async (output, context) => {
|
|
355
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
356
|
-
return de_CommandError(output, context);
|
|
357
|
-
}
|
|
358
|
-
const contents = smithyClient.map({
|
|
359
|
-
$metadata: deserializeMetadata(output),
|
|
360
|
-
[_CT]: [, output.headers[_ct]],
|
|
361
|
-
[_IPV]: [, output.headers[_xaipv]],
|
|
362
|
-
[_CA]: [, output.headers[_xasca]],
|
|
363
|
-
[_NSI]: [, output.headers[_xasnsi]],
|
|
364
|
-
[_CSI]: [, output.headers[_xascsi]],
|
|
365
|
-
});
|
|
366
|
-
const data = await smithyClient.collectBody(output.body, context);
|
|
367
|
-
contents.Body = data;
|
|
368
|
-
return contents;
|
|
369
|
-
};
|
|
370
|
-
const de_InvokeEndpointAsyncCommand = async (output, context) => {
|
|
371
|
-
if (output.statusCode !== 202 && output.statusCode >= 300) {
|
|
372
|
-
return de_CommandError(output, context);
|
|
373
|
-
}
|
|
374
|
-
const contents = smithyClient.map({
|
|
375
|
-
$metadata: deserializeMetadata(output),
|
|
376
|
-
[_OL]: [, output.headers[_xaso]],
|
|
377
|
-
[_FL]: [, output.headers[_xasf]],
|
|
378
|
-
});
|
|
379
|
-
const data = smithyClient.expectNonNull(smithyClient.expectObject(await core$1.parseJsonBody(output.body, context)), "body");
|
|
380
|
-
const doc = smithyClient.take(data, {
|
|
381
|
-
InferenceId: smithyClient.expectString,
|
|
382
|
-
});
|
|
383
|
-
Object.assign(contents, doc);
|
|
384
|
-
return contents;
|
|
385
|
-
};
|
|
386
|
-
const de_InvokeEndpointWithResponseStreamCommand = async (output, context) => {
|
|
387
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
388
|
-
return de_CommandError(output, context);
|
|
389
|
-
}
|
|
390
|
-
const contents = smithyClient.map({
|
|
391
|
-
$metadata: deserializeMetadata(output),
|
|
392
|
-
[_CT]: [, output.headers[_xasct]],
|
|
393
|
-
[_IPV]: [, output.headers[_xaipv]],
|
|
394
|
-
[_CA]: [, output.headers[_xasca]],
|
|
395
|
-
});
|
|
396
|
-
const data = output.body;
|
|
397
|
-
contents.Body = de_ResponseStream(data, context);
|
|
398
|
-
return contents;
|
|
399
|
-
};
|
|
400
|
-
const de_CommandError = async (output, context) => {
|
|
401
|
-
const parsedOutput = {
|
|
402
|
-
...output,
|
|
403
|
-
body: await core$1.parseJsonErrorBody(output.body, context),
|
|
404
|
-
};
|
|
405
|
-
const errorCode = core$1.loadRestJsonErrorCode(output, parsedOutput.body);
|
|
406
|
-
switch (errorCode) {
|
|
407
|
-
case "InternalDependencyException":
|
|
408
|
-
case "com.amazonaws.sagemakerruntime#InternalDependencyException":
|
|
409
|
-
throw await de_InternalDependencyExceptionRes(parsedOutput);
|
|
410
|
-
case "InternalFailure":
|
|
411
|
-
case "com.amazonaws.sagemakerruntime#InternalFailure":
|
|
412
|
-
throw await de_InternalFailureRes(parsedOutput);
|
|
413
|
-
case "ModelError":
|
|
414
|
-
case "com.amazonaws.sagemakerruntime#ModelError":
|
|
415
|
-
throw await de_ModelErrorRes(parsedOutput);
|
|
416
|
-
case "ModelNotReadyException":
|
|
417
|
-
case "com.amazonaws.sagemakerruntime#ModelNotReadyException":
|
|
418
|
-
throw await de_ModelNotReadyExceptionRes(parsedOutput);
|
|
419
|
-
case "ServiceUnavailable":
|
|
420
|
-
case "com.amazonaws.sagemakerruntime#ServiceUnavailable":
|
|
421
|
-
throw await de_ServiceUnavailableRes(parsedOutput);
|
|
422
|
-
case "ValidationError":
|
|
423
|
-
case "com.amazonaws.sagemakerruntime#ValidationError":
|
|
424
|
-
throw await de_ValidationErrorRes(parsedOutput);
|
|
425
|
-
case "InternalStreamFailure":
|
|
426
|
-
case "com.amazonaws.sagemakerruntime#InternalStreamFailure":
|
|
427
|
-
throw await de_InternalStreamFailureRes(parsedOutput);
|
|
428
|
-
case "ModelStreamError":
|
|
429
|
-
case "com.amazonaws.sagemakerruntime#ModelStreamError":
|
|
430
|
-
throw await de_ModelStreamErrorRes(parsedOutput);
|
|
431
|
-
default:
|
|
432
|
-
const parsedBody = parsedOutput.body;
|
|
433
|
-
return throwDefaultError({
|
|
434
|
-
output,
|
|
435
|
-
parsedBody,
|
|
436
|
-
errorCode,
|
|
437
|
-
});
|
|
438
|
-
}
|
|
439
|
-
};
|
|
440
|
-
const throwDefaultError = smithyClient.withBaseException(SageMakerRuntimeServiceException);
|
|
441
|
-
const de_InternalDependencyExceptionRes = async (parsedOutput, context) => {
|
|
442
|
-
const contents = smithyClient.map({});
|
|
443
|
-
const data = parsedOutput.body;
|
|
444
|
-
const doc = smithyClient.take(data, {
|
|
445
|
-
Message: smithyClient.expectString,
|
|
446
|
-
});
|
|
447
|
-
Object.assign(contents, doc);
|
|
448
|
-
const exception = new InternalDependencyException({
|
|
449
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
450
|
-
...contents,
|
|
451
|
-
});
|
|
452
|
-
return smithyClient.decorateServiceException(exception, parsedOutput.body);
|
|
453
|
-
};
|
|
454
|
-
const de_InternalFailureRes = async (parsedOutput, context) => {
|
|
455
|
-
const contents = smithyClient.map({});
|
|
456
|
-
const data = parsedOutput.body;
|
|
457
|
-
const doc = smithyClient.take(data, {
|
|
458
|
-
Message: smithyClient.expectString,
|
|
459
|
-
});
|
|
460
|
-
Object.assign(contents, doc);
|
|
461
|
-
const exception = new InternalFailure({
|
|
462
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
463
|
-
...contents,
|
|
464
|
-
});
|
|
465
|
-
return smithyClient.decorateServiceException(exception, parsedOutput.body);
|
|
466
|
-
};
|
|
467
|
-
const de_InternalStreamFailureRes = async (parsedOutput, context) => {
|
|
468
|
-
const contents = smithyClient.map({});
|
|
469
|
-
const data = parsedOutput.body;
|
|
470
|
-
const doc = smithyClient.take(data, {
|
|
471
|
-
Message: smithyClient.expectString,
|
|
472
|
-
});
|
|
473
|
-
Object.assign(contents, doc);
|
|
474
|
-
const exception = new InternalStreamFailure({
|
|
475
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
476
|
-
...contents,
|
|
477
|
-
});
|
|
478
|
-
return smithyClient.decorateServiceException(exception, parsedOutput.body);
|
|
479
|
-
};
|
|
480
|
-
const de_ModelErrorRes = async (parsedOutput, context) => {
|
|
481
|
-
const contents = smithyClient.map({});
|
|
482
|
-
const data = parsedOutput.body;
|
|
483
|
-
const doc = smithyClient.take(data, {
|
|
484
|
-
LogStreamArn: smithyClient.expectString,
|
|
485
|
-
Message: smithyClient.expectString,
|
|
486
|
-
OriginalMessage: smithyClient.expectString,
|
|
487
|
-
OriginalStatusCode: smithyClient.expectInt32,
|
|
488
|
-
});
|
|
489
|
-
Object.assign(contents, doc);
|
|
490
|
-
const exception = new ModelError({
|
|
491
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
492
|
-
...contents,
|
|
493
|
-
});
|
|
494
|
-
return smithyClient.decorateServiceException(exception, parsedOutput.body);
|
|
495
|
-
};
|
|
496
|
-
const de_ModelNotReadyExceptionRes = async (parsedOutput, context) => {
|
|
497
|
-
const contents = smithyClient.map({});
|
|
498
|
-
const data = parsedOutput.body;
|
|
499
|
-
const doc = smithyClient.take(data, {
|
|
500
|
-
Message: smithyClient.expectString,
|
|
501
|
-
});
|
|
502
|
-
Object.assign(contents, doc);
|
|
503
|
-
const exception = new ModelNotReadyException({
|
|
504
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
505
|
-
...contents,
|
|
506
|
-
});
|
|
507
|
-
return smithyClient.decorateServiceException(exception, parsedOutput.body);
|
|
508
|
-
};
|
|
509
|
-
const de_ModelStreamErrorRes = async (parsedOutput, context) => {
|
|
510
|
-
const contents = smithyClient.map({});
|
|
511
|
-
const data = parsedOutput.body;
|
|
512
|
-
const doc = smithyClient.take(data, {
|
|
513
|
-
ErrorCode: smithyClient.expectString,
|
|
514
|
-
Message: smithyClient.expectString,
|
|
515
|
-
});
|
|
516
|
-
Object.assign(contents, doc);
|
|
517
|
-
const exception = new ModelStreamError({
|
|
518
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
519
|
-
...contents,
|
|
520
|
-
});
|
|
521
|
-
return smithyClient.decorateServiceException(exception, parsedOutput.body);
|
|
522
|
-
};
|
|
523
|
-
const de_ServiceUnavailableRes = async (parsedOutput, context) => {
|
|
524
|
-
const contents = smithyClient.map({});
|
|
525
|
-
const data = parsedOutput.body;
|
|
526
|
-
const doc = smithyClient.take(data, {
|
|
527
|
-
Message: smithyClient.expectString,
|
|
528
|
-
});
|
|
529
|
-
Object.assign(contents, doc);
|
|
530
|
-
const exception = new ServiceUnavailable({
|
|
531
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
532
|
-
...contents,
|
|
533
|
-
});
|
|
534
|
-
return smithyClient.decorateServiceException(exception, parsedOutput.body);
|
|
535
|
-
};
|
|
536
|
-
const de_ValidationErrorRes = async (parsedOutput, context) => {
|
|
537
|
-
const contents = smithyClient.map({});
|
|
538
|
-
const data = parsedOutput.body;
|
|
539
|
-
const doc = smithyClient.take(data, {
|
|
540
|
-
Message: smithyClient.expectString,
|
|
541
|
-
});
|
|
542
|
-
Object.assign(contents, doc);
|
|
543
|
-
const exception = new ValidationError({
|
|
544
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
545
|
-
...contents,
|
|
546
|
-
});
|
|
547
|
-
return smithyClient.decorateServiceException(exception, parsedOutput.body);
|
|
548
|
-
};
|
|
549
|
-
const de_ResponseStream = (output, context) => {
|
|
550
|
-
return context.eventStreamMarshaller.deserialize(output, async (event) => {
|
|
551
|
-
if (event["PayloadPart"] != null) {
|
|
552
|
-
return {
|
|
553
|
-
PayloadPart: await de_PayloadPart_event(event["PayloadPart"]),
|
|
554
|
-
};
|
|
555
|
-
}
|
|
556
|
-
if (event["ModelStreamError"] != null) {
|
|
557
|
-
return {
|
|
558
|
-
ModelStreamError: await de_ModelStreamError_event(event["ModelStreamError"], context),
|
|
559
|
-
};
|
|
560
|
-
}
|
|
561
|
-
if (event["InternalStreamFailure"] != null) {
|
|
562
|
-
return {
|
|
563
|
-
InternalStreamFailure: await de_InternalStreamFailure_event(event["InternalStreamFailure"], context),
|
|
564
|
-
};
|
|
565
|
-
}
|
|
566
|
-
return { $unknown: event };
|
|
567
|
-
});
|
|
568
|
-
};
|
|
569
|
-
const de_InternalStreamFailure_event = async (output, context) => {
|
|
570
|
-
const parsedOutput = {
|
|
571
|
-
...output,
|
|
572
|
-
body: await core$1.parseJsonBody(output.body, context),
|
|
573
|
-
};
|
|
574
|
-
return de_InternalStreamFailureRes(parsedOutput);
|
|
575
|
-
};
|
|
576
|
-
const de_ModelStreamError_event = async (output, context) => {
|
|
577
|
-
const parsedOutput = {
|
|
578
|
-
...output,
|
|
579
|
-
body: await core$1.parseJsonBody(output.body, context),
|
|
580
|
-
};
|
|
581
|
-
return de_ModelStreamErrorRes(parsedOutput);
|
|
582
|
-
};
|
|
583
|
-
const de_PayloadPart_event = async (output, context) => {
|
|
584
|
-
const contents = {};
|
|
585
|
-
contents.Bytes = output.body;
|
|
586
|
-
return contents;
|
|
587
|
-
};
|
|
588
|
-
const deserializeMetadata = (output) => ({
|
|
589
|
-
httpStatusCode: output.statusCode,
|
|
590
|
-
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
|
|
591
|
-
extendedRequestId: output.headers["x-amz-id-2"],
|
|
592
|
-
cfId: output.headers["x-amz-cf-id"],
|
|
593
|
-
});
|
|
594
243
|
const _A = "Accept";
|
|
244
|
+
const _B = "Body";
|
|
245
|
+
const _BB = "BodyBlob";
|
|
246
|
+
const _By = "Bytes";
|
|
595
247
|
const _CA = "CustomAttributes";
|
|
248
|
+
const _CAH = "CustomAttributesHeader";
|
|
596
249
|
const _CSI = "ClosedSessionId";
|
|
597
250
|
const _CT = "ContentType";
|
|
251
|
+
const _CT_ = "Content-Type";
|
|
252
|
+
const _EC = "ErrorCode";
|
|
598
253
|
const _EE = "EnableExplanations";
|
|
254
|
+
const _EN = "EndpointName";
|
|
599
255
|
const _FL = "FailureLocation";
|
|
600
256
|
const _ICN = "InferenceComponentName";
|
|
257
|
+
const _IDE = "InternalDependencyException";
|
|
258
|
+
const _IE = "InvokeEndpoint";
|
|
259
|
+
const _IEA = "InvokeEndpointAsync";
|
|
260
|
+
const _IEAI = "InvokeEndpointAsyncInput";
|
|
261
|
+
const _IEAO = "InvokeEndpointAsyncOutput";
|
|
262
|
+
const _IEI = "InvokeEndpointInput";
|
|
263
|
+
const _IEO = "InvokeEndpointOutput";
|
|
264
|
+
const _IEWRS = "InvokeEndpointWithResponseStream";
|
|
265
|
+
const _IEWRSI = "InvokeEndpointWithResponseStreamInput";
|
|
266
|
+
const _IEWRSO = "InvokeEndpointWithResponseStreamOutput";
|
|
267
|
+
const _IF = "InternalFailure";
|
|
601
268
|
const _II = "InferenceId";
|
|
602
269
|
const _IL = "InputLocation";
|
|
603
270
|
const _IPV = "InvokedProductionVariant";
|
|
271
|
+
const _ISF = "InternalStreamFailure";
|
|
604
272
|
const _ITS = "InvocationTimeoutSeconds";
|
|
273
|
+
const _LSA = "LogStreamArn";
|
|
274
|
+
const _M = "Message";
|
|
275
|
+
const _ME = "ModelError";
|
|
276
|
+
const _MNRE = "ModelNotReadyException";
|
|
277
|
+
const _MSE = "ModelStreamError";
|
|
605
278
|
const _NSI = "NewSessionId";
|
|
606
279
|
const _OL = "OutputLocation";
|
|
280
|
+
const _OM = "OriginalMessage";
|
|
281
|
+
const _OSC = "OriginalStatusCode";
|
|
282
|
+
const _PB = "PartBlob";
|
|
283
|
+
const _PP = "PayloadPart";
|
|
284
|
+
const _RS = "ResponseStream";
|
|
607
285
|
const _RTTLS = "RequestTTLSeconds";
|
|
608
286
|
const _SI = "SessionId";
|
|
287
|
+
const _SU = "ServiceUnavailable";
|
|
609
288
|
const _TCH = "TargetContainerHostname";
|
|
610
289
|
const _TM = "TargetModel";
|
|
611
290
|
const _TV = "TargetVariant";
|
|
612
|
-
const
|
|
613
|
-
const
|
|
614
|
-
const
|
|
615
|
-
const
|
|
616
|
-
const
|
|
617
|
-
const
|
|
618
|
-
const
|
|
619
|
-
const
|
|
620
|
-
const
|
|
621
|
-
const
|
|
622
|
-
const
|
|
623
|
-
const
|
|
624
|
-
const
|
|
625
|
-
const
|
|
626
|
-
const
|
|
627
|
-
const
|
|
628
|
-
const
|
|
629
|
-
const
|
|
630
|
-
const
|
|
631
|
-
const
|
|
291
|
+
const _VE = "ValidationError";
|
|
292
|
+
const _XASA = "X-Amzn-SageMaker-Accept";
|
|
293
|
+
const _XASCA = "X-Amzn-SageMaker-Custom-Attributes";
|
|
294
|
+
const _XASCSI = "X-Amzn-SageMaker-Closed-Session-Id";
|
|
295
|
+
const _XASCT = "X-Amzn-SageMaker-Content-Type";
|
|
296
|
+
const _XASEE = "X-Amzn-SageMaker-Enable-Explanations";
|
|
297
|
+
const _XASF = "X-Amzn-SageMaker-FailureLocation";
|
|
298
|
+
const _XASI = "X-Amzn-SageMaker-InputLocation";
|
|
299
|
+
const _XASIC = "X-Amzn-SageMaker-Inference-Component";
|
|
300
|
+
const _XASII = "X-Amzn-SageMaker-Inference-Id";
|
|
301
|
+
const _XASI_ = "X-Amzn-SageMaker-InvocationTimeoutSeconds";
|
|
302
|
+
const _XASNSI = "X-Amzn-SageMaker-New-Session-Id";
|
|
303
|
+
const _XASO = "X-Amzn-SageMaker-OutputLocation";
|
|
304
|
+
const _XASR = "X-Amzn-SageMaker-RequestTTLSeconds";
|
|
305
|
+
const _XASSI = "X-Amzn-SageMaker-Session-Id";
|
|
306
|
+
const _XASTCH = "X-Amzn-SageMaker-Target-Container-Hostname";
|
|
307
|
+
const _XASTM = "X-Amzn-SageMaker-Target-Model";
|
|
308
|
+
const _XASTV = "X-Amzn-SageMaker-Target-Variant";
|
|
309
|
+
const _aQE = "awsQueryError";
|
|
310
|
+
const _c = "client";
|
|
311
|
+
const _e = "error";
|
|
312
|
+
const _eP = "eventPayload";
|
|
313
|
+
const _h = "http";
|
|
314
|
+
const _hE = "httpError";
|
|
315
|
+
const _hH = "httpHeader";
|
|
316
|
+
const _s = "server";
|
|
317
|
+
const _sm = "smithy.ts.sdk.synthetic.com.amazonaws.sagemakerruntime";
|
|
318
|
+
const _st = "streaming";
|
|
319
|
+
const _xAIPV = "x-Amzn-Invoked-Production-Variant";
|
|
320
|
+
const n0 = "com.amazonaws.sagemakerruntime";
|
|
321
|
+
var BodyBlob = [0, n0, _BB, 8, 21];
|
|
322
|
+
var CustomAttributesHeader = [0, n0, _CAH, 8, 0];
|
|
323
|
+
var PartBlob = [0, n0, _PB, 8, 21];
|
|
324
|
+
var InternalDependencyException = [
|
|
325
|
+
-3,
|
|
326
|
+
n0,
|
|
327
|
+
_IDE,
|
|
328
|
+
{
|
|
329
|
+
[_e]: _s,
|
|
330
|
+
[_hE]: 530,
|
|
331
|
+
},
|
|
332
|
+
[_M],
|
|
333
|
+
[0],
|
|
334
|
+
];
|
|
335
|
+
schema.TypeRegistry.for(n0).registerError(InternalDependencyException, InternalDependencyException$1);
|
|
336
|
+
var InternalFailure = [
|
|
337
|
+
-3,
|
|
338
|
+
n0,
|
|
339
|
+
_IF,
|
|
340
|
+
{
|
|
341
|
+
[_e]: _s,
|
|
342
|
+
[_hE]: 500,
|
|
343
|
+
},
|
|
344
|
+
[_M],
|
|
345
|
+
[0],
|
|
346
|
+
];
|
|
347
|
+
schema.TypeRegistry.for(n0).registerError(InternalFailure, InternalFailure$1);
|
|
348
|
+
var InternalStreamFailure = [
|
|
349
|
+
-3,
|
|
350
|
+
n0,
|
|
351
|
+
_ISF,
|
|
352
|
+
{
|
|
353
|
+
[_e]: _s,
|
|
354
|
+
},
|
|
355
|
+
[_M],
|
|
356
|
+
[0],
|
|
357
|
+
];
|
|
358
|
+
schema.TypeRegistry.for(n0).registerError(InternalStreamFailure, InternalStreamFailure$1);
|
|
359
|
+
var InvokeEndpointAsyncInput = [
|
|
360
|
+
3,
|
|
361
|
+
n0,
|
|
362
|
+
_IEAI,
|
|
363
|
+
0,
|
|
364
|
+
[_EN, _CT, _A, _CA, _II, _IL, _RTTLS, _ITS],
|
|
365
|
+
[
|
|
366
|
+
[0, 1],
|
|
367
|
+
[
|
|
368
|
+
0,
|
|
369
|
+
{
|
|
370
|
+
[_hH]: _XASCT,
|
|
371
|
+
},
|
|
372
|
+
],
|
|
373
|
+
[
|
|
374
|
+
0,
|
|
375
|
+
{
|
|
376
|
+
[_hH]: _XASA,
|
|
377
|
+
},
|
|
378
|
+
],
|
|
379
|
+
[
|
|
380
|
+
() => CustomAttributesHeader,
|
|
381
|
+
{
|
|
382
|
+
[_hH]: _XASCA,
|
|
383
|
+
},
|
|
384
|
+
],
|
|
385
|
+
[
|
|
386
|
+
0,
|
|
387
|
+
{
|
|
388
|
+
[_hH]: _XASII,
|
|
389
|
+
},
|
|
390
|
+
],
|
|
391
|
+
[
|
|
392
|
+
0,
|
|
393
|
+
{
|
|
394
|
+
[_hH]: _XASI,
|
|
395
|
+
},
|
|
396
|
+
],
|
|
397
|
+
[
|
|
398
|
+
1,
|
|
399
|
+
{
|
|
400
|
+
[_hH]: _XASR,
|
|
401
|
+
},
|
|
402
|
+
],
|
|
403
|
+
[
|
|
404
|
+
1,
|
|
405
|
+
{
|
|
406
|
+
[_hH]: _XASI_,
|
|
407
|
+
},
|
|
408
|
+
],
|
|
409
|
+
],
|
|
410
|
+
];
|
|
411
|
+
var InvokeEndpointAsyncOutput = [
|
|
412
|
+
3,
|
|
413
|
+
n0,
|
|
414
|
+
_IEAO,
|
|
415
|
+
0,
|
|
416
|
+
[_II, _OL, _FL],
|
|
417
|
+
[
|
|
418
|
+
0,
|
|
419
|
+
[
|
|
420
|
+
0,
|
|
421
|
+
{
|
|
422
|
+
[_hH]: _XASO,
|
|
423
|
+
},
|
|
424
|
+
],
|
|
425
|
+
[
|
|
426
|
+
0,
|
|
427
|
+
{
|
|
428
|
+
[_hH]: _XASF,
|
|
429
|
+
},
|
|
430
|
+
],
|
|
431
|
+
],
|
|
432
|
+
];
|
|
433
|
+
var InvokeEndpointInput = [
|
|
434
|
+
3,
|
|
435
|
+
n0,
|
|
436
|
+
_IEI,
|
|
437
|
+
0,
|
|
438
|
+
[_EN, _B, _CT, _A, _CA, _TM, _TV, _TCH, _II, _EE, _ICN, _SI],
|
|
439
|
+
[
|
|
440
|
+
[0, 1],
|
|
441
|
+
[() => BodyBlob, 16],
|
|
442
|
+
[
|
|
443
|
+
0,
|
|
444
|
+
{
|
|
445
|
+
[_hH]: _CT_,
|
|
446
|
+
},
|
|
447
|
+
],
|
|
448
|
+
[
|
|
449
|
+
0,
|
|
450
|
+
{
|
|
451
|
+
[_hH]: _A,
|
|
452
|
+
},
|
|
453
|
+
],
|
|
454
|
+
[
|
|
455
|
+
() => CustomAttributesHeader,
|
|
456
|
+
{
|
|
457
|
+
[_hH]: _XASCA,
|
|
458
|
+
},
|
|
459
|
+
],
|
|
460
|
+
[
|
|
461
|
+
0,
|
|
462
|
+
{
|
|
463
|
+
[_hH]: _XASTM,
|
|
464
|
+
},
|
|
465
|
+
],
|
|
466
|
+
[
|
|
467
|
+
0,
|
|
468
|
+
{
|
|
469
|
+
[_hH]: _XASTV,
|
|
470
|
+
},
|
|
471
|
+
],
|
|
472
|
+
[
|
|
473
|
+
0,
|
|
474
|
+
{
|
|
475
|
+
[_hH]: _XASTCH,
|
|
476
|
+
},
|
|
477
|
+
],
|
|
478
|
+
[
|
|
479
|
+
0,
|
|
480
|
+
{
|
|
481
|
+
[_hH]: _XASII,
|
|
482
|
+
},
|
|
483
|
+
],
|
|
484
|
+
[
|
|
485
|
+
0,
|
|
486
|
+
{
|
|
487
|
+
[_hH]: _XASEE,
|
|
488
|
+
},
|
|
489
|
+
],
|
|
490
|
+
[
|
|
491
|
+
0,
|
|
492
|
+
{
|
|
493
|
+
[_hH]: _XASIC,
|
|
494
|
+
},
|
|
495
|
+
],
|
|
496
|
+
[
|
|
497
|
+
0,
|
|
498
|
+
{
|
|
499
|
+
[_hH]: _XASSI,
|
|
500
|
+
},
|
|
501
|
+
],
|
|
502
|
+
],
|
|
503
|
+
];
|
|
504
|
+
var InvokeEndpointOutput = [
|
|
505
|
+
3,
|
|
506
|
+
n0,
|
|
507
|
+
_IEO,
|
|
508
|
+
0,
|
|
509
|
+
[_B, _CT, _IPV, _CA, _NSI, _CSI],
|
|
510
|
+
[
|
|
511
|
+
[() => BodyBlob, 16],
|
|
512
|
+
[
|
|
513
|
+
0,
|
|
514
|
+
{
|
|
515
|
+
[_hH]: _CT_,
|
|
516
|
+
},
|
|
517
|
+
],
|
|
518
|
+
[
|
|
519
|
+
0,
|
|
520
|
+
{
|
|
521
|
+
[_hH]: _xAIPV,
|
|
522
|
+
},
|
|
523
|
+
],
|
|
524
|
+
[
|
|
525
|
+
() => CustomAttributesHeader,
|
|
526
|
+
{
|
|
527
|
+
[_hH]: _XASCA,
|
|
528
|
+
},
|
|
529
|
+
],
|
|
530
|
+
[
|
|
531
|
+
0,
|
|
532
|
+
{
|
|
533
|
+
[_hH]: _XASNSI,
|
|
534
|
+
},
|
|
535
|
+
],
|
|
536
|
+
[
|
|
537
|
+
0,
|
|
538
|
+
{
|
|
539
|
+
[_hH]: _XASCSI,
|
|
540
|
+
},
|
|
541
|
+
],
|
|
542
|
+
],
|
|
543
|
+
];
|
|
544
|
+
var InvokeEndpointWithResponseStreamInput = [
|
|
545
|
+
3,
|
|
546
|
+
n0,
|
|
547
|
+
_IEWRSI,
|
|
548
|
+
0,
|
|
549
|
+
[_EN, _B, _CT, _A, _CA, _TV, _TCH, _II, _ICN, _SI],
|
|
550
|
+
[
|
|
551
|
+
[0, 1],
|
|
552
|
+
[() => BodyBlob, 16],
|
|
553
|
+
[
|
|
554
|
+
0,
|
|
555
|
+
{
|
|
556
|
+
[_hH]: _CT_,
|
|
557
|
+
},
|
|
558
|
+
],
|
|
559
|
+
[
|
|
560
|
+
0,
|
|
561
|
+
{
|
|
562
|
+
[_hH]: _XASA,
|
|
563
|
+
},
|
|
564
|
+
],
|
|
565
|
+
[
|
|
566
|
+
() => CustomAttributesHeader,
|
|
567
|
+
{
|
|
568
|
+
[_hH]: _XASCA,
|
|
569
|
+
},
|
|
570
|
+
],
|
|
571
|
+
[
|
|
572
|
+
0,
|
|
573
|
+
{
|
|
574
|
+
[_hH]: _XASTV,
|
|
575
|
+
},
|
|
576
|
+
],
|
|
577
|
+
[
|
|
578
|
+
0,
|
|
579
|
+
{
|
|
580
|
+
[_hH]: _XASTCH,
|
|
581
|
+
},
|
|
582
|
+
],
|
|
583
|
+
[
|
|
584
|
+
0,
|
|
585
|
+
{
|
|
586
|
+
[_hH]: _XASII,
|
|
587
|
+
},
|
|
588
|
+
],
|
|
589
|
+
[
|
|
590
|
+
0,
|
|
591
|
+
{
|
|
592
|
+
[_hH]: _XASIC,
|
|
593
|
+
},
|
|
594
|
+
],
|
|
595
|
+
[
|
|
596
|
+
0,
|
|
597
|
+
{
|
|
598
|
+
[_hH]: _XASSI,
|
|
599
|
+
},
|
|
600
|
+
],
|
|
601
|
+
],
|
|
602
|
+
];
|
|
603
|
+
var InvokeEndpointWithResponseStreamOutput = [
|
|
604
|
+
3,
|
|
605
|
+
n0,
|
|
606
|
+
_IEWRSO,
|
|
607
|
+
0,
|
|
608
|
+
[_B, _CT, _IPV, _CA],
|
|
609
|
+
[
|
|
610
|
+
[() => ResponseStream, 16],
|
|
611
|
+
[
|
|
612
|
+
0,
|
|
613
|
+
{
|
|
614
|
+
[_hH]: _XASCT,
|
|
615
|
+
},
|
|
616
|
+
],
|
|
617
|
+
[
|
|
618
|
+
0,
|
|
619
|
+
{
|
|
620
|
+
[_hH]: _xAIPV,
|
|
621
|
+
},
|
|
622
|
+
],
|
|
623
|
+
[
|
|
624
|
+
() => CustomAttributesHeader,
|
|
625
|
+
{
|
|
626
|
+
[_hH]: _XASCA,
|
|
627
|
+
},
|
|
628
|
+
],
|
|
629
|
+
],
|
|
630
|
+
];
|
|
631
|
+
var ModelError = [
|
|
632
|
+
-3,
|
|
633
|
+
n0,
|
|
634
|
+
_ME,
|
|
635
|
+
{
|
|
636
|
+
[_e]: _c,
|
|
637
|
+
[_hE]: 424,
|
|
638
|
+
},
|
|
639
|
+
[_M, _OSC, _OM, _LSA],
|
|
640
|
+
[0, 1, 0, 0],
|
|
641
|
+
];
|
|
642
|
+
schema.TypeRegistry.for(n0).registerError(ModelError, ModelError$1);
|
|
643
|
+
var ModelNotReadyException = [
|
|
644
|
+
-3,
|
|
645
|
+
n0,
|
|
646
|
+
_MNRE,
|
|
647
|
+
{
|
|
648
|
+
[_e]: _c,
|
|
649
|
+
[_hE]: 429,
|
|
650
|
+
[_aQE]: [`ModelNotReadyException`, 429],
|
|
651
|
+
},
|
|
652
|
+
[_M],
|
|
653
|
+
[0],
|
|
654
|
+
];
|
|
655
|
+
schema.TypeRegistry.for(n0).registerError(ModelNotReadyException, ModelNotReadyException$1);
|
|
656
|
+
var ModelStreamError = [
|
|
657
|
+
-3,
|
|
658
|
+
n0,
|
|
659
|
+
_MSE,
|
|
660
|
+
{
|
|
661
|
+
[_e]: _c,
|
|
662
|
+
},
|
|
663
|
+
[_M, _EC],
|
|
664
|
+
[0, 0],
|
|
665
|
+
];
|
|
666
|
+
schema.TypeRegistry.for(n0).registerError(ModelStreamError, ModelStreamError$1);
|
|
667
|
+
var PayloadPart = [
|
|
668
|
+
3,
|
|
669
|
+
n0,
|
|
670
|
+
_PP,
|
|
671
|
+
0,
|
|
672
|
+
[_By],
|
|
673
|
+
[
|
|
674
|
+
[
|
|
675
|
+
() => PartBlob,
|
|
676
|
+
{
|
|
677
|
+
[_eP]: 1,
|
|
678
|
+
},
|
|
679
|
+
],
|
|
680
|
+
],
|
|
681
|
+
];
|
|
682
|
+
var ServiceUnavailable = [
|
|
683
|
+
-3,
|
|
684
|
+
n0,
|
|
685
|
+
_SU,
|
|
686
|
+
{
|
|
687
|
+
[_e]: _s,
|
|
688
|
+
[_hE]: 503,
|
|
689
|
+
},
|
|
690
|
+
[_M],
|
|
691
|
+
[0],
|
|
692
|
+
];
|
|
693
|
+
schema.TypeRegistry.for(n0).registerError(ServiceUnavailable, ServiceUnavailable$1);
|
|
694
|
+
var ValidationError = [
|
|
695
|
+
-3,
|
|
696
|
+
n0,
|
|
697
|
+
_VE,
|
|
698
|
+
{
|
|
699
|
+
[_e]: _c,
|
|
700
|
+
[_hE]: 400,
|
|
701
|
+
},
|
|
702
|
+
[_M],
|
|
703
|
+
[0],
|
|
704
|
+
];
|
|
705
|
+
schema.TypeRegistry.for(n0).registerError(ValidationError, ValidationError$1);
|
|
706
|
+
var SageMakerRuntimeServiceException = [
|
|
707
|
+
-3,
|
|
708
|
+
_sm,
|
|
709
|
+
"SageMakerRuntimeServiceException",
|
|
710
|
+
0,
|
|
711
|
+
[],
|
|
712
|
+
[],
|
|
713
|
+
];
|
|
714
|
+
schema.TypeRegistry.for(_sm).registerError(SageMakerRuntimeServiceException, SageMakerRuntimeServiceException$1);
|
|
715
|
+
var ResponseStream = [
|
|
716
|
+
3,
|
|
717
|
+
n0,
|
|
718
|
+
_RS,
|
|
719
|
+
{
|
|
720
|
+
[_st]: 1,
|
|
721
|
+
},
|
|
722
|
+
[_PP, _MSE, _ISF],
|
|
723
|
+
[
|
|
724
|
+
[() => PayloadPart, 0],
|
|
725
|
+
[() => ModelStreamError, 0],
|
|
726
|
+
[() => InternalStreamFailure, 0],
|
|
727
|
+
],
|
|
728
|
+
];
|
|
729
|
+
var InvokeEndpoint = [
|
|
730
|
+
9,
|
|
731
|
+
n0,
|
|
732
|
+
_IE,
|
|
733
|
+
{
|
|
734
|
+
[_h]: ["POST", "/endpoints/{EndpointName}/invocations", 200],
|
|
735
|
+
},
|
|
736
|
+
() => InvokeEndpointInput,
|
|
737
|
+
() => InvokeEndpointOutput,
|
|
738
|
+
];
|
|
739
|
+
var InvokeEndpointAsync = [
|
|
740
|
+
9,
|
|
741
|
+
n0,
|
|
742
|
+
_IEA,
|
|
743
|
+
{
|
|
744
|
+
[_h]: ["POST", "/endpoints/{EndpointName}/async-invocations", 202],
|
|
745
|
+
},
|
|
746
|
+
() => InvokeEndpointAsyncInput,
|
|
747
|
+
() => InvokeEndpointAsyncOutput,
|
|
748
|
+
];
|
|
749
|
+
var InvokeEndpointWithResponseStream = [
|
|
750
|
+
9,
|
|
751
|
+
n0,
|
|
752
|
+
_IEWRS,
|
|
753
|
+
{
|
|
754
|
+
[_h]: ["POST", "/endpoints/{EndpointName}/invocations-response-stream", 200],
|
|
755
|
+
},
|
|
756
|
+
() => InvokeEndpointWithResponseStreamInput,
|
|
757
|
+
() => InvokeEndpointWithResponseStreamOutput,
|
|
758
|
+
];
|
|
632
759
|
|
|
633
760
|
class InvokeEndpointAsyncCommand extends smithyClient.Command
|
|
634
761
|
.classBuilder()
|
|
635
762
|
.ep(commonParams)
|
|
636
763
|
.m(function (Command, cs, config, o) {
|
|
637
|
-
return [
|
|
638
|
-
middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize),
|
|
639
|
-
middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
|
|
640
|
-
];
|
|
764
|
+
return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
|
|
641
765
|
})
|
|
642
766
|
.s("AmazonSageMakerRuntime", "InvokeEndpointAsync", {})
|
|
643
767
|
.n("SageMakerRuntimeClient", "InvokeEndpointAsyncCommand")
|
|
644
|
-
.
|
|
645
|
-
.ser(se_InvokeEndpointAsyncCommand)
|
|
646
|
-
.de(de_InvokeEndpointAsyncCommand)
|
|
768
|
+
.sc(InvokeEndpointAsync)
|
|
647
769
|
.build() {
|
|
648
770
|
}
|
|
649
771
|
|
|
@@ -651,16 +773,11 @@ class InvokeEndpointCommand extends smithyClient.Command
|
|
|
651
773
|
.classBuilder()
|
|
652
774
|
.ep(commonParams)
|
|
653
775
|
.m(function (Command, cs, config, o) {
|
|
654
|
-
return [
|
|
655
|
-
middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize),
|
|
656
|
-
middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
|
|
657
|
-
];
|
|
776
|
+
return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
|
|
658
777
|
})
|
|
659
778
|
.s("AmazonSageMakerRuntime", "InvokeEndpoint", {})
|
|
660
779
|
.n("SageMakerRuntimeClient", "InvokeEndpointCommand")
|
|
661
|
-
.
|
|
662
|
-
.ser(se_InvokeEndpointCommand)
|
|
663
|
-
.de(de_InvokeEndpointCommand)
|
|
780
|
+
.sc(InvokeEndpoint)
|
|
664
781
|
.build() {
|
|
665
782
|
}
|
|
666
783
|
|
|
@@ -668,10 +785,7 @@ class InvokeEndpointWithResponseStreamCommand extends smithyClient.Command
|
|
|
668
785
|
.classBuilder()
|
|
669
786
|
.ep(commonParams)
|
|
670
787
|
.m(function (Command, cs, config, o) {
|
|
671
|
-
return [
|
|
672
|
-
middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize),
|
|
673
|
-
middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
|
|
674
|
-
];
|
|
788
|
+
return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
|
|
675
789
|
})
|
|
676
790
|
.s("AmazonSageMakerRuntime", "InvokeEndpointWithResponseStream", {
|
|
677
791
|
eventStream: {
|
|
@@ -679,9 +793,7 @@ class InvokeEndpointWithResponseStreamCommand extends smithyClient.Command
|
|
|
679
793
|
},
|
|
680
794
|
})
|
|
681
795
|
.n("SageMakerRuntimeClient", "InvokeEndpointWithResponseStreamCommand")
|
|
682
|
-
.
|
|
683
|
-
.ser(se_InvokeEndpointWithResponseStreamCommand)
|
|
684
|
-
.de(de_InvokeEndpointWithResponseStreamCommand)
|
|
796
|
+
.sc(InvokeEndpointWithResponseStream)
|
|
685
797
|
.build() {
|
|
686
798
|
}
|
|
687
799
|
|
|
@@ -702,24 +814,17 @@ Object.defineProperty(exports, "__Client", {
|
|
|
702
814
|
enumerable: true,
|
|
703
815
|
get: function () { return smithyClient.Client; }
|
|
704
816
|
});
|
|
705
|
-
exports.InternalDependencyException = InternalDependencyException;
|
|
706
|
-
exports.InternalFailure = InternalFailure;
|
|
707
|
-
exports.InternalStreamFailure = InternalStreamFailure;
|
|
817
|
+
exports.InternalDependencyException = InternalDependencyException$1;
|
|
818
|
+
exports.InternalFailure = InternalFailure$1;
|
|
819
|
+
exports.InternalStreamFailure = InternalStreamFailure$1;
|
|
708
820
|
exports.InvokeEndpointAsyncCommand = InvokeEndpointAsyncCommand;
|
|
709
|
-
exports.InvokeEndpointAsyncInputFilterSensitiveLog = InvokeEndpointAsyncInputFilterSensitiveLog;
|
|
710
821
|
exports.InvokeEndpointCommand = InvokeEndpointCommand;
|
|
711
|
-
exports.InvokeEndpointInputFilterSensitiveLog = InvokeEndpointInputFilterSensitiveLog;
|
|
712
|
-
exports.InvokeEndpointOutputFilterSensitiveLog = InvokeEndpointOutputFilterSensitiveLog;
|
|
713
822
|
exports.InvokeEndpointWithResponseStreamCommand = InvokeEndpointWithResponseStreamCommand;
|
|
714
|
-
exports.
|
|
715
|
-
exports.
|
|
716
|
-
exports.
|
|
717
|
-
exports.ModelNotReadyException = ModelNotReadyException;
|
|
718
|
-
exports.ModelStreamError = ModelStreamError;
|
|
719
|
-
exports.PayloadPartFilterSensitiveLog = PayloadPartFilterSensitiveLog;
|
|
720
|
-
exports.ResponseStreamFilterSensitiveLog = ResponseStreamFilterSensitiveLog;
|
|
823
|
+
exports.ModelError = ModelError$1;
|
|
824
|
+
exports.ModelNotReadyException = ModelNotReadyException$1;
|
|
825
|
+
exports.ModelStreamError = ModelStreamError$1;
|
|
721
826
|
exports.SageMakerRuntime = SageMakerRuntime;
|
|
722
827
|
exports.SageMakerRuntimeClient = SageMakerRuntimeClient;
|
|
723
|
-
exports.SageMakerRuntimeServiceException = SageMakerRuntimeServiceException;
|
|
724
|
-
exports.ServiceUnavailable = ServiceUnavailable;
|
|
725
|
-
exports.ValidationError = ValidationError;
|
|
828
|
+
exports.SageMakerRuntimeServiceException = SageMakerRuntimeServiceException$1;
|
|
829
|
+
exports.ServiceUnavailable = ServiceUnavailable$1;
|
|
830
|
+
exports.ValidationError = ValidationError$1;
|