@aws-sdk/client-sagemaker-runtime 3.986.0 → 3.988.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 +22 -341
- package/dist-cjs/models/SageMakerRuntimeServiceException.js +12 -0
- package/dist-cjs/models/errors.js +132 -0
- package/dist-cjs/runtimeConfig.shared.js +2 -0
- package/dist-cjs/schemas/schemas_0.js +192 -0
- package/dist-es/runtimeConfig.shared.js +2 -0
- package/dist-es/schemas/schemas_0.js +49 -43
- package/dist-types/schemas/schemas_0.d.ts +13 -6
- package/dist-types/ts3.4/schemas/schemas_0.d.ts +8 -6
- package/package.json +14 -14
package/dist-cjs/index.js
CHANGED
|
@@ -16,6 +16,9 @@ var httpAuthSchemeProvider = require('./auth/httpAuthSchemeProvider');
|
|
|
16
16
|
var runtimeConfig = require('./runtimeConfig');
|
|
17
17
|
var regionConfigResolver = require('@aws-sdk/region-config-resolver');
|
|
18
18
|
var protocolHttp = require('@smithy/protocol-http');
|
|
19
|
+
var schemas_0 = require('./schemas/schemas_0');
|
|
20
|
+
var errors = require('./models/errors');
|
|
21
|
+
var SageMakerRuntimeServiceException = require('./models/SageMakerRuntimeServiceException');
|
|
19
22
|
|
|
20
23
|
const resolveClientEndpointParameters = (options) => {
|
|
21
24
|
return Object.assign(options, {
|
|
@@ -112,315 +115,6 @@ class SageMakerRuntimeClient extends smithyClient.Client {
|
|
|
112
115
|
}
|
|
113
116
|
}
|
|
114
117
|
|
|
115
|
-
class SageMakerRuntimeServiceException extends smithyClient.ServiceException {
|
|
116
|
-
constructor(options) {
|
|
117
|
-
super(options);
|
|
118
|
-
Object.setPrototypeOf(this, SageMakerRuntimeServiceException.prototype);
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
class InternalDependencyException extends SageMakerRuntimeServiceException {
|
|
123
|
-
name = "InternalDependencyException";
|
|
124
|
-
$fault = "server";
|
|
125
|
-
Message;
|
|
126
|
-
constructor(opts) {
|
|
127
|
-
super({
|
|
128
|
-
name: "InternalDependencyException",
|
|
129
|
-
$fault: "server",
|
|
130
|
-
...opts,
|
|
131
|
-
});
|
|
132
|
-
Object.setPrototypeOf(this, InternalDependencyException.prototype);
|
|
133
|
-
this.Message = opts.Message;
|
|
134
|
-
}
|
|
135
|
-
}
|
|
136
|
-
class InternalFailure extends SageMakerRuntimeServiceException {
|
|
137
|
-
name = "InternalFailure";
|
|
138
|
-
$fault = "server";
|
|
139
|
-
Message;
|
|
140
|
-
constructor(opts) {
|
|
141
|
-
super({
|
|
142
|
-
name: "InternalFailure",
|
|
143
|
-
$fault: "server",
|
|
144
|
-
...opts,
|
|
145
|
-
});
|
|
146
|
-
Object.setPrototypeOf(this, InternalFailure.prototype);
|
|
147
|
-
this.Message = opts.Message;
|
|
148
|
-
}
|
|
149
|
-
}
|
|
150
|
-
class ModelError extends SageMakerRuntimeServiceException {
|
|
151
|
-
name = "ModelError";
|
|
152
|
-
$fault = "client";
|
|
153
|
-
Message;
|
|
154
|
-
OriginalStatusCode;
|
|
155
|
-
OriginalMessage;
|
|
156
|
-
LogStreamArn;
|
|
157
|
-
constructor(opts) {
|
|
158
|
-
super({
|
|
159
|
-
name: "ModelError",
|
|
160
|
-
$fault: "client",
|
|
161
|
-
...opts,
|
|
162
|
-
});
|
|
163
|
-
Object.setPrototypeOf(this, ModelError.prototype);
|
|
164
|
-
this.Message = opts.Message;
|
|
165
|
-
this.OriginalStatusCode = opts.OriginalStatusCode;
|
|
166
|
-
this.OriginalMessage = opts.OriginalMessage;
|
|
167
|
-
this.LogStreamArn = opts.LogStreamArn;
|
|
168
|
-
}
|
|
169
|
-
}
|
|
170
|
-
class ModelNotReadyException extends SageMakerRuntimeServiceException {
|
|
171
|
-
name = "ModelNotReadyException";
|
|
172
|
-
$fault = "client";
|
|
173
|
-
Message;
|
|
174
|
-
constructor(opts) {
|
|
175
|
-
super({
|
|
176
|
-
name: "ModelNotReadyException",
|
|
177
|
-
$fault: "client",
|
|
178
|
-
...opts,
|
|
179
|
-
});
|
|
180
|
-
Object.setPrototypeOf(this, ModelNotReadyException.prototype);
|
|
181
|
-
this.Message = opts.Message;
|
|
182
|
-
}
|
|
183
|
-
}
|
|
184
|
-
class ServiceUnavailable extends SageMakerRuntimeServiceException {
|
|
185
|
-
name = "ServiceUnavailable";
|
|
186
|
-
$fault = "server";
|
|
187
|
-
Message;
|
|
188
|
-
constructor(opts) {
|
|
189
|
-
super({
|
|
190
|
-
name: "ServiceUnavailable",
|
|
191
|
-
$fault: "server",
|
|
192
|
-
...opts,
|
|
193
|
-
});
|
|
194
|
-
Object.setPrototypeOf(this, ServiceUnavailable.prototype);
|
|
195
|
-
this.Message = opts.Message;
|
|
196
|
-
}
|
|
197
|
-
}
|
|
198
|
-
class ValidationError extends SageMakerRuntimeServiceException {
|
|
199
|
-
name = "ValidationError";
|
|
200
|
-
$fault = "client";
|
|
201
|
-
Message;
|
|
202
|
-
constructor(opts) {
|
|
203
|
-
super({
|
|
204
|
-
name: "ValidationError",
|
|
205
|
-
$fault: "client",
|
|
206
|
-
...opts,
|
|
207
|
-
});
|
|
208
|
-
Object.setPrototypeOf(this, ValidationError.prototype);
|
|
209
|
-
this.Message = opts.Message;
|
|
210
|
-
}
|
|
211
|
-
}
|
|
212
|
-
class InternalStreamFailure extends SageMakerRuntimeServiceException {
|
|
213
|
-
name = "InternalStreamFailure";
|
|
214
|
-
$fault = "server";
|
|
215
|
-
Message;
|
|
216
|
-
constructor(opts) {
|
|
217
|
-
super({
|
|
218
|
-
name: "InternalStreamFailure",
|
|
219
|
-
$fault: "server",
|
|
220
|
-
...opts,
|
|
221
|
-
});
|
|
222
|
-
Object.setPrototypeOf(this, InternalStreamFailure.prototype);
|
|
223
|
-
this.Message = opts.Message;
|
|
224
|
-
}
|
|
225
|
-
}
|
|
226
|
-
class ModelStreamError extends SageMakerRuntimeServiceException {
|
|
227
|
-
name = "ModelStreamError";
|
|
228
|
-
$fault = "client";
|
|
229
|
-
Message;
|
|
230
|
-
ErrorCode;
|
|
231
|
-
constructor(opts) {
|
|
232
|
-
super({
|
|
233
|
-
name: "ModelStreamError",
|
|
234
|
-
$fault: "client",
|
|
235
|
-
...opts,
|
|
236
|
-
});
|
|
237
|
-
Object.setPrototypeOf(this, ModelStreamError.prototype);
|
|
238
|
-
this.Message = opts.Message;
|
|
239
|
-
this.ErrorCode = opts.ErrorCode;
|
|
240
|
-
}
|
|
241
|
-
}
|
|
242
|
-
|
|
243
|
-
const _A = "Accept";
|
|
244
|
-
const _B = "Body";
|
|
245
|
-
const _BB = "BodyBlob";
|
|
246
|
-
const _By = "Bytes";
|
|
247
|
-
const _CA = "CustomAttributes";
|
|
248
|
-
const _CAH = "CustomAttributesHeader";
|
|
249
|
-
const _CSI = "ClosedSessionId";
|
|
250
|
-
const _CT = "ContentType";
|
|
251
|
-
const _CT_ = "Content-Type";
|
|
252
|
-
const _EC = "ErrorCode";
|
|
253
|
-
const _EE = "EnableExplanations";
|
|
254
|
-
const _EN = "EndpointName";
|
|
255
|
-
const _FL = "FailureLocation";
|
|
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";
|
|
268
|
-
const _II = "InferenceId";
|
|
269
|
-
const _IL = "InputLocation";
|
|
270
|
-
const _IPV = "InvokedProductionVariant";
|
|
271
|
-
const _ISF = "InternalStreamFailure";
|
|
272
|
-
const _ITS = "InvocationTimeoutSeconds";
|
|
273
|
-
const _LSA = "LogStreamArn";
|
|
274
|
-
const _M = "Message";
|
|
275
|
-
const _ME = "ModelError";
|
|
276
|
-
const _MNRE = "ModelNotReadyException";
|
|
277
|
-
const _MSE = "ModelStreamError";
|
|
278
|
-
const _NSI = "NewSessionId";
|
|
279
|
-
const _OL = "OutputLocation";
|
|
280
|
-
const _OM = "OriginalMessage";
|
|
281
|
-
const _OSC = "OriginalStatusCode";
|
|
282
|
-
const _PB = "PartBlob";
|
|
283
|
-
const _PP = "PayloadPart";
|
|
284
|
-
const _RS = "ResponseStream";
|
|
285
|
-
const _RTTLS = "RequestTTLSeconds";
|
|
286
|
-
const _SI = "SessionId";
|
|
287
|
-
const _SU = "ServiceUnavailable";
|
|
288
|
-
const _TCH = "TargetContainerHostname";
|
|
289
|
-
const _TM = "TargetModel";
|
|
290
|
-
const _TV = "TargetVariant";
|
|
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$ = [-3, n0, _IDE,
|
|
325
|
-
{ [_e]: _s, [_hE]: 530 },
|
|
326
|
-
[_M],
|
|
327
|
-
[0]
|
|
328
|
-
];
|
|
329
|
-
schema.TypeRegistry.for(n0).registerError(InternalDependencyException$, InternalDependencyException);
|
|
330
|
-
var InternalFailure$ = [-3, n0, _IF,
|
|
331
|
-
{ [_e]: _s, [_hE]: 500 },
|
|
332
|
-
[_M],
|
|
333
|
-
[0]
|
|
334
|
-
];
|
|
335
|
-
schema.TypeRegistry.for(n0).registerError(InternalFailure$, InternalFailure);
|
|
336
|
-
var InternalStreamFailure$ = [-3, n0, _ISF,
|
|
337
|
-
{ [_e]: _s },
|
|
338
|
-
[_M],
|
|
339
|
-
[0]
|
|
340
|
-
];
|
|
341
|
-
schema.TypeRegistry.for(n0).registerError(InternalStreamFailure$, InternalStreamFailure);
|
|
342
|
-
var InvokeEndpointAsyncInput$ = [3, n0, _IEAI,
|
|
343
|
-
0,
|
|
344
|
-
[_EN, _IL, _CT, _A, _CA, _II, _RTTLS, _ITS],
|
|
345
|
-
[[0, 1], [0, { [_hH]: _XASI }], [0, { [_hH]: _XASCT }], [0, { [_hH]: _XASA }], [() => CustomAttributesHeader, { [_hH]: _XASCA }], [0, { [_hH]: _XASII }], [1, { [_hH]: _XASR }], [1, { [_hH]: _XASI_ }]], 2
|
|
346
|
-
];
|
|
347
|
-
var InvokeEndpointAsyncOutput$ = [3, n0, _IEAO,
|
|
348
|
-
0,
|
|
349
|
-
[_II, _OL, _FL],
|
|
350
|
-
[0, [0, { [_hH]: _XASO }], [0, { [_hH]: _XASF }]]
|
|
351
|
-
];
|
|
352
|
-
var InvokeEndpointInput$ = [3, n0, _IEI,
|
|
353
|
-
0,
|
|
354
|
-
[_EN, _B, _CT, _A, _CA, _TM, _TV, _TCH, _II, _EE, _ICN, _SI],
|
|
355
|
-
[[0, 1], [() => BodyBlob, 16], [0, { [_hH]: _CT_ }], [0, { [_hH]: _A }], [() => CustomAttributesHeader, { [_hH]: _XASCA }], [0, { [_hH]: _XASTM }], [0, { [_hH]: _XASTV }], [0, { [_hH]: _XASTCH }], [0, { [_hH]: _XASII }], [0, { [_hH]: _XASEE }], [0, { [_hH]: _XASIC }], [0, { [_hH]: _XASSI }]], 2
|
|
356
|
-
];
|
|
357
|
-
var InvokeEndpointOutput$ = [3, n0, _IEO,
|
|
358
|
-
0,
|
|
359
|
-
[_B, _CT, _IPV, _CA, _NSI, _CSI],
|
|
360
|
-
[[() => BodyBlob, 16], [0, { [_hH]: _CT_ }], [0, { [_hH]: _xAIPV }], [() => CustomAttributesHeader, { [_hH]: _XASCA }], [0, { [_hH]: _XASNSI }], [0, { [_hH]: _XASCSI }]], 1
|
|
361
|
-
];
|
|
362
|
-
var InvokeEndpointWithResponseStreamInput$ = [3, n0, _IEWRSI,
|
|
363
|
-
0,
|
|
364
|
-
[_EN, _B, _CT, _A, _CA, _TV, _TCH, _II, _ICN, _SI],
|
|
365
|
-
[[0, 1], [() => BodyBlob, 16], [0, { [_hH]: _CT_ }], [0, { [_hH]: _XASA }], [() => CustomAttributesHeader, { [_hH]: _XASCA }], [0, { [_hH]: _XASTV }], [0, { [_hH]: _XASTCH }], [0, { [_hH]: _XASII }], [0, { [_hH]: _XASIC }], [0, { [_hH]: _XASSI }]], 2
|
|
366
|
-
];
|
|
367
|
-
var InvokeEndpointWithResponseStreamOutput$ = [3, n0, _IEWRSO,
|
|
368
|
-
0,
|
|
369
|
-
[_B, _CT, _IPV, _CA],
|
|
370
|
-
[[() => ResponseStream$, 16], [0, { [_hH]: _XASCT }], [0, { [_hH]: _xAIPV }], [() => CustomAttributesHeader, { [_hH]: _XASCA }]], 1
|
|
371
|
-
];
|
|
372
|
-
var ModelError$ = [-3, n0, _ME,
|
|
373
|
-
{ [_e]: _c, [_hE]: 424 },
|
|
374
|
-
[_M, _OSC, _OM, _LSA],
|
|
375
|
-
[0, 1, 0, 0]
|
|
376
|
-
];
|
|
377
|
-
schema.TypeRegistry.for(n0).registerError(ModelError$, ModelError);
|
|
378
|
-
var ModelNotReadyException$ = [-3, n0, _MNRE,
|
|
379
|
-
{ [_aQE]: [`ModelNotReadyException`, 429], [_e]: _c, [_hE]: 429 },
|
|
380
|
-
[_M],
|
|
381
|
-
[0]
|
|
382
|
-
];
|
|
383
|
-
schema.TypeRegistry.for(n0).registerError(ModelNotReadyException$, ModelNotReadyException);
|
|
384
|
-
var ModelStreamError$ = [-3, n0, _MSE,
|
|
385
|
-
{ [_e]: _c },
|
|
386
|
-
[_M, _EC],
|
|
387
|
-
[0, 0]
|
|
388
|
-
];
|
|
389
|
-
schema.TypeRegistry.for(n0).registerError(ModelStreamError$, ModelStreamError);
|
|
390
|
-
var PayloadPart$ = [3, n0, _PP,
|
|
391
|
-
0,
|
|
392
|
-
[_By],
|
|
393
|
-
[[() => PartBlob, { [_eP]: 1 }]]
|
|
394
|
-
];
|
|
395
|
-
var ServiceUnavailable$ = [-3, n0, _SU,
|
|
396
|
-
{ [_e]: _s, [_hE]: 503 },
|
|
397
|
-
[_M],
|
|
398
|
-
[0]
|
|
399
|
-
];
|
|
400
|
-
schema.TypeRegistry.for(n0).registerError(ServiceUnavailable$, ServiceUnavailable);
|
|
401
|
-
var ValidationError$ = [-3, n0, _VE,
|
|
402
|
-
{ [_e]: _c, [_hE]: 400 },
|
|
403
|
-
[_M],
|
|
404
|
-
[0]
|
|
405
|
-
];
|
|
406
|
-
schema.TypeRegistry.for(n0).registerError(ValidationError$, ValidationError);
|
|
407
|
-
var SageMakerRuntimeServiceException$ = [-3, _sm, "SageMakerRuntimeServiceException", 0, [], []];
|
|
408
|
-
schema.TypeRegistry.for(_sm).registerError(SageMakerRuntimeServiceException$, SageMakerRuntimeServiceException);
|
|
409
|
-
var ResponseStream$ = [4, n0, _RS,
|
|
410
|
-
{ [_st]: 1 },
|
|
411
|
-
[_PP, _MSE, _ISF],
|
|
412
|
-
[[() => PayloadPart$, 0], [() => ModelStreamError$, 0], [() => InternalStreamFailure$, 0]]
|
|
413
|
-
];
|
|
414
|
-
var InvokeEndpoint$ = [9, n0, _IE,
|
|
415
|
-
{ [_h]: ["POST", "/endpoints/{EndpointName}/invocations", 200] }, () => InvokeEndpointInput$, () => InvokeEndpointOutput$
|
|
416
|
-
];
|
|
417
|
-
var InvokeEndpointAsync$ = [9, n0, _IEA,
|
|
418
|
-
{ [_h]: ["POST", "/endpoints/{EndpointName}/async-invocations", 202] }, () => InvokeEndpointAsyncInput$, () => InvokeEndpointAsyncOutput$
|
|
419
|
-
];
|
|
420
|
-
var InvokeEndpointWithResponseStream$ = [9, n0, _IEWRS,
|
|
421
|
-
{ [_h]: ["POST", "/endpoints/{EndpointName}/invocations-response-stream", 200] }, () => InvokeEndpointWithResponseStreamInput$, () => InvokeEndpointWithResponseStreamOutput$
|
|
422
|
-
];
|
|
423
|
-
|
|
424
118
|
class InvokeEndpointAsyncCommand extends smithyClient.Command
|
|
425
119
|
.classBuilder()
|
|
426
120
|
.ep(commonParams)
|
|
@@ -429,7 +123,7 @@ class InvokeEndpointAsyncCommand extends smithyClient.Command
|
|
|
429
123
|
})
|
|
430
124
|
.s("AmazonSageMakerRuntime", "InvokeEndpointAsync", {})
|
|
431
125
|
.n("SageMakerRuntimeClient", "InvokeEndpointAsyncCommand")
|
|
432
|
-
.sc(InvokeEndpointAsync$)
|
|
126
|
+
.sc(schemas_0.InvokeEndpointAsync$)
|
|
433
127
|
.build() {
|
|
434
128
|
}
|
|
435
129
|
|
|
@@ -441,7 +135,7 @@ class InvokeEndpointCommand extends smithyClient.Command
|
|
|
441
135
|
})
|
|
442
136
|
.s("AmazonSageMakerRuntime", "InvokeEndpoint", {})
|
|
443
137
|
.n("SageMakerRuntimeClient", "InvokeEndpointCommand")
|
|
444
|
-
.sc(InvokeEndpoint$)
|
|
138
|
+
.sc(schemas_0.InvokeEndpoint$)
|
|
445
139
|
.build() {
|
|
446
140
|
}
|
|
447
141
|
|
|
@@ -457,7 +151,7 @@ class InvokeEndpointWithResponseStreamCommand extends smithyClient.Command
|
|
|
457
151
|
},
|
|
458
152
|
})
|
|
459
153
|
.n("SageMakerRuntimeClient", "InvokeEndpointWithResponseStreamCommand")
|
|
460
|
-
.sc(InvokeEndpointWithResponseStream$)
|
|
154
|
+
.sc(schemas_0.InvokeEndpointWithResponseStream$)
|
|
461
155
|
.build() {
|
|
462
156
|
}
|
|
463
157
|
|
|
@@ -478,37 +172,24 @@ Object.defineProperty(exports, "__Client", {
|
|
|
478
172
|
enumerable: true,
|
|
479
173
|
get: function () { return smithyClient.Client; }
|
|
480
174
|
});
|
|
481
|
-
exports
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
exports.InternalStreamFailure = InternalStreamFailure;
|
|
486
|
-
exports.InternalStreamFailure$ = InternalStreamFailure$;
|
|
487
|
-
exports.InvokeEndpoint$ = InvokeEndpoint$;
|
|
488
|
-
exports.InvokeEndpointAsync$ = InvokeEndpointAsync$;
|
|
175
|
+
Object.defineProperty(exports, "SageMakerRuntimeServiceException", {
|
|
176
|
+
enumerable: true,
|
|
177
|
+
get: function () { return SageMakerRuntimeServiceException.SageMakerRuntimeServiceException; }
|
|
178
|
+
});
|
|
489
179
|
exports.InvokeEndpointAsyncCommand = InvokeEndpointAsyncCommand;
|
|
490
|
-
exports.InvokeEndpointAsyncInput$ = InvokeEndpointAsyncInput$;
|
|
491
|
-
exports.InvokeEndpointAsyncOutput$ = InvokeEndpointAsyncOutput$;
|
|
492
180
|
exports.InvokeEndpointCommand = InvokeEndpointCommand;
|
|
493
|
-
exports.InvokeEndpointInput$ = InvokeEndpointInput$;
|
|
494
|
-
exports.InvokeEndpointOutput$ = InvokeEndpointOutput$;
|
|
495
|
-
exports.InvokeEndpointWithResponseStream$ = InvokeEndpointWithResponseStream$;
|
|
496
181
|
exports.InvokeEndpointWithResponseStreamCommand = InvokeEndpointWithResponseStreamCommand;
|
|
497
|
-
exports.InvokeEndpointWithResponseStreamInput$ = InvokeEndpointWithResponseStreamInput$;
|
|
498
|
-
exports.InvokeEndpointWithResponseStreamOutput$ = InvokeEndpointWithResponseStreamOutput$;
|
|
499
|
-
exports.ModelError = ModelError;
|
|
500
|
-
exports.ModelError$ = ModelError$;
|
|
501
|
-
exports.ModelNotReadyException = ModelNotReadyException;
|
|
502
|
-
exports.ModelNotReadyException$ = ModelNotReadyException$;
|
|
503
|
-
exports.ModelStreamError = ModelStreamError;
|
|
504
|
-
exports.ModelStreamError$ = ModelStreamError$;
|
|
505
|
-
exports.PayloadPart$ = PayloadPart$;
|
|
506
|
-
exports.ResponseStream$ = ResponseStream$;
|
|
507
182
|
exports.SageMakerRuntime = SageMakerRuntime;
|
|
508
183
|
exports.SageMakerRuntimeClient = SageMakerRuntimeClient;
|
|
509
|
-
|
|
510
|
-
exports.
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
184
|
+
Object.keys(schemas_0).forEach(function (k) {
|
|
185
|
+
if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
|
|
186
|
+
enumerable: true,
|
|
187
|
+
get: function () { return schemas_0[k]; }
|
|
188
|
+
});
|
|
189
|
+
});
|
|
190
|
+
Object.keys(errors).forEach(function (k) {
|
|
191
|
+
if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
|
|
192
|
+
enumerable: true,
|
|
193
|
+
get: function () { return errors[k]; }
|
|
194
|
+
});
|
|
195
|
+
});
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SageMakerRuntimeServiceException = exports.__ServiceException = void 0;
|
|
4
|
+
const smithy_client_1 = require("@smithy/smithy-client");
|
|
5
|
+
Object.defineProperty(exports, "__ServiceException", { enumerable: true, get: function () { return smithy_client_1.ServiceException; } });
|
|
6
|
+
class SageMakerRuntimeServiceException extends smithy_client_1.ServiceException {
|
|
7
|
+
constructor(options) {
|
|
8
|
+
super(options);
|
|
9
|
+
Object.setPrototypeOf(this, SageMakerRuntimeServiceException.prototype);
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
exports.SageMakerRuntimeServiceException = SageMakerRuntimeServiceException;
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ModelStreamError = exports.InternalStreamFailure = exports.ValidationError = exports.ServiceUnavailable = exports.ModelNotReadyException = exports.ModelError = exports.InternalFailure = exports.InternalDependencyException = void 0;
|
|
4
|
+
const SageMakerRuntimeServiceException_1 = require("./SageMakerRuntimeServiceException");
|
|
5
|
+
class InternalDependencyException extends SageMakerRuntimeServiceException_1.SageMakerRuntimeServiceException {
|
|
6
|
+
name = "InternalDependencyException";
|
|
7
|
+
$fault = "server";
|
|
8
|
+
Message;
|
|
9
|
+
constructor(opts) {
|
|
10
|
+
super({
|
|
11
|
+
name: "InternalDependencyException",
|
|
12
|
+
$fault: "server",
|
|
13
|
+
...opts,
|
|
14
|
+
});
|
|
15
|
+
Object.setPrototypeOf(this, InternalDependencyException.prototype);
|
|
16
|
+
this.Message = opts.Message;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
exports.InternalDependencyException = InternalDependencyException;
|
|
20
|
+
class InternalFailure extends SageMakerRuntimeServiceException_1.SageMakerRuntimeServiceException {
|
|
21
|
+
name = "InternalFailure";
|
|
22
|
+
$fault = "server";
|
|
23
|
+
Message;
|
|
24
|
+
constructor(opts) {
|
|
25
|
+
super({
|
|
26
|
+
name: "InternalFailure",
|
|
27
|
+
$fault: "server",
|
|
28
|
+
...opts,
|
|
29
|
+
});
|
|
30
|
+
Object.setPrototypeOf(this, InternalFailure.prototype);
|
|
31
|
+
this.Message = opts.Message;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
exports.InternalFailure = InternalFailure;
|
|
35
|
+
class ModelError extends SageMakerRuntimeServiceException_1.SageMakerRuntimeServiceException {
|
|
36
|
+
name = "ModelError";
|
|
37
|
+
$fault = "client";
|
|
38
|
+
Message;
|
|
39
|
+
OriginalStatusCode;
|
|
40
|
+
OriginalMessage;
|
|
41
|
+
LogStreamArn;
|
|
42
|
+
constructor(opts) {
|
|
43
|
+
super({
|
|
44
|
+
name: "ModelError",
|
|
45
|
+
$fault: "client",
|
|
46
|
+
...opts,
|
|
47
|
+
});
|
|
48
|
+
Object.setPrototypeOf(this, ModelError.prototype);
|
|
49
|
+
this.Message = opts.Message;
|
|
50
|
+
this.OriginalStatusCode = opts.OriginalStatusCode;
|
|
51
|
+
this.OriginalMessage = opts.OriginalMessage;
|
|
52
|
+
this.LogStreamArn = opts.LogStreamArn;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
exports.ModelError = ModelError;
|
|
56
|
+
class ModelNotReadyException extends SageMakerRuntimeServiceException_1.SageMakerRuntimeServiceException {
|
|
57
|
+
name = "ModelNotReadyException";
|
|
58
|
+
$fault = "client";
|
|
59
|
+
Message;
|
|
60
|
+
constructor(opts) {
|
|
61
|
+
super({
|
|
62
|
+
name: "ModelNotReadyException",
|
|
63
|
+
$fault: "client",
|
|
64
|
+
...opts,
|
|
65
|
+
});
|
|
66
|
+
Object.setPrototypeOf(this, ModelNotReadyException.prototype);
|
|
67
|
+
this.Message = opts.Message;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
exports.ModelNotReadyException = ModelNotReadyException;
|
|
71
|
+
class ServiceUnavailable extends SageMakerRuntimeServiceException_1.SageMakerRuntimeServiceException {
|
|
72
|
+
name = "ServiceUnavailable";
|
|
73
|
+
$fault = "server";
|
|
74
|
+
Message;
|
|
75
|
+
constructor(opts) {
|
|
76
|
+
super({
|
|
77
|
+
name: "ServiceUnavailable",
|
|
78
|
+
$fault: "server",
|
|
79
|
+
...opts,
|
|
80
|
+
});
|
|
81
|
+
Object.setPrototypeOf(this, ServiceUnavailable.prototype);
|
|
82
|
+
this.Message = opts.Message;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
exports.ServiceUnavailable = ServiceUnavailable;
|
|
86
|
+
class ValidationError extends SageMakerRuntimeServiceException_1.SageMakerRuntimeServiceException {
|
|
87
|
+
name = "ValidationError";
|
|
88
|
+
$fault = "client";
|
|
89
|
+
Message;
|
|
90
|
+
constructor(opts) {
|
|
91
|
+
super({
|
|
92
|
+
name: "ValidationError",
|
|
93
|
+
$fault: "client",
|
|
94
|
+
...opts,
|
|
95
|
+
});
|
|
96
|
+
Object.setPrototypeOf(this, ValidationError.prototype);
|
|
97
|
+
this.Message = opts.Message;
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
exports.ValidationError = ValidationError;
|
|
101
|
+
class InternalStreamFailure extends SageMakerRuntimeServiceException_1.SageMakerRuntimeServiceException {
|
|
102
|
+
name = "InternalStreamFailure";
|
|
103
|
+
$fault = "server";
|
|
104
|
+
Message;
|
|
105
|
+
constructor(opts) {
|
|
106
|
+
super({
|
|
107
|
+
name: "InternalStreamFailure",
|
|
108
|
+
$fault: "server",
|
|
109
|
+
...opts,
|
|
110
|
+
});
|
|
111
|
+
Object.setPrototypeOf(this, InternalStreamFailure.prototype);
|
|
112
|
+
this.Message = opts.Message;
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
exports.InternalStreamFailure = InternalStreamFailure;
|
|
116
|
+
class ModelStreamError extends SageMakerRuntimeServiceException_1.SageMakerRuntimeServiceException {
|
|
117
|
+
name = "ModelStreamError";
|
|
118
|
+
$fault = "client";
|
|
119
|
+
Message;
|
|
120
|
+
ErrorCode;
|
|
121
|
+
constructor(opts) {
|
|
122
|
+
super({
|
|
123
|
+
name: "ModelStreamError",
|
|
124
|
+
$fault: "client",
|
|
125
|
+
...opts,
|
|
126
|
+
});
|
|
127
|
+
Object.setPrototypeOf(this, ModelStreamError.prototype);
|
|
128
|
+
this.Message = opts.Message;
|
|
129
|
+
this.ErrorCode = opts.ErrorCode;
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
exports.ModelStreamError = ModelStreamError;
|
|
@@ -9,6 +9,7 @@ const util_base64_1 = require("@smithy/util-base64");
|
|
|
9
9
|
const util_utf8_1 = require("@smithy/util-utf8");
|
|
10
10
|
const httpAuthSchemeProvider_1 = require("./auth/httpAuthSchemeProvider");
|
|
11
11
|
const endpointResolver_1 = require("./endpoint/endpointResolver");
|
|
12
|
+
const schemas_0_1 = require("./schemas/schemas_0");
|
|
12
13
|
const getRuntimeConfig = (config) => {
|
|
13
14
|
return {
|
|
14
15
|
apiVersion: "2017-05-13",
|
|
@@ -29,6 +30,7 @@ const getRuntimeConfig = (config) => {
|
|
|
29
30
|
protocol: config?.protocol ?? protocols_1.AwsRestJsonProtocol,
|
|
30
31
|
protocolSettings: config?.protocolSettings ?? {
|
|
31
32
|
defaultNamespace: "com.amazonaws.sagemakerruntime",
|
|
33
|
+
errorTypeRegistries: schemas_0_1.errorTypeRegistries,
|
|
32
34
|
version: "2017-05-13",
|
|
33
35
|
serviceTarget: "AmazonSageMakerRuntime",
|
|
34
36
|
},
|
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.InvokeEndpointWithResponseStream$ = exports.InvokeEndpointAsync$ = exports.InvokeEndpoint$ = exports.ResponseStream$ = exports.PayloadPart$ = exports.InvokeEndpointWithResponseStreamOutput$ = exports.InvokeEndpointWithResponseStreamInput$ = exports.InvokeEndpointOutput$ = exports.InvokeEndpointInput$ = exports.InvokeEndpointAsyncOutput$ = exports.InvokeEndpointAsyncInput$ = exports.errorTypeRegistries = exports.ValidationError$ = exports.ServiceUnavailable$ = exports.ModelStreamError$ = exports.ModelNotReadyException$ = exports.ModelError$ = exports.InternalStreamFailure$ = exports.InternalFailure$ = exports.InternalDependencyException$ = exports.SageMakerRuntimeServiceException$ = void 0;
|
|
4
|
+
const _A = "Accept";
|
|
5
|
+
const _B = "Body";
|
|
6
|
+
const _BB = "BodyBlob";
|
|
7
|
+
const _By = "Bytes";
|
|
8
|
+
const _CA = "CustomAttributes";
|
|
9
|
+
const _CAH = "CustomAttributesHeader";
|
|
10
|
+
const _CSI = "ClosedSessionId";
|
|
11
|
+
const _CT = "ContentType";
|
|
12
|
+
const _CT_ = "Content-Type";
|
|
13
|
+
const _EC = "ErrorCode";
|
|
14
|
+
const _EE = "EnableExplanations";
|
|
15
|
+
const _EN = "EndpointName";
|
|
16
|
+
const _FL = "FailureLocation";
|
|
17
|
+
const _ICN = "InferenceComponentName";
|
|
18
|
+
const _IDE = "InternalDependencyException";
|
|
19
|
+
const _IE = "InvokeEndpoint";
|
|
20
|
+
const _IEA = "InvokeEndpointAsync";
|
|
21
|
+
const _IEAI = "InvokeEndpointAsyncInput";
|
|
22
|
+
const _IEAO = "InvokeEndpointAsyncOutput";
|
|
23
|
+
const _IEI = "InvokeEndpointInput";
|
|
24
|
+
const _IEO = "InvokeEndpointOutput";
|
|
25
|
+
const _IEWRS = "InvokeEndpointWithResponseStream";
|
|
26
|
+
const _IEWRSI = "InvokeEndpointWithResponseStreamInput";
|
|
27
|
+
const _IEWRSO = "InvokeEndpointWithResponseStreamOutput";
|
|
28
|
+
const _IF = "InternalFailure";
|
|
29
|
+
const _II = "InferenceId";
|
|
30
|
+
const _IL = "InputLocation";
|
|
31
|
+
const _IPV = "InvokedProductionVariant";
|
|
32
|
+
const _ISF = "InternalStreamFailure";
|
|
33
|
+
const _ITS = "InvocationTimeoutSeconds";
|
|
34
|
+
const _LSA = "LogStreamArn";
|
|
35
|
+
const _M = "Message";
|
|
36
|
+
const _ME = "ModelError";
|
|
37
|
+
const _MNRE = "ModelNotReadyException";
|
|
38
|
+
const _MSE = "ModelStreamError";
|
|
39
|
+
const _NSI = "NewSessionId";
|
|
40
|
+
const _OL = "OutputLocation";
|
|
41
|
+
const _OM = "OriginalMessage";
|
|
42
|
+
const _OSC = "OriginalStatusCode";
|
|
43
|
+
const _PB = "PartBlob";
|
|
44
|
+
const _PP = "PayloadPart";
|
|
45
|
+
const _RS = "ResponseStream";
|
|
46
|
+
const _RTTLS = "RequestTTLSeconds";
|
|
47
|
+
const _SI = "SessionId";
|
|
48
|
+
const _SU = "ServiceUnavailable";
|
|
49
|
+
const _TCH = "TargetContainerHostname";
|
|
50
|
+
const _TM = "TargetModel";
|
|
51
|
+
const _TV = "TargetVariant";
|
|
52
|
+
const _VE = "ValidationError";
|
|
53
|
+
const _XASA = "X-Amzn-SageMaker-Accept";
|
|
54
|
+
const _XASCA = "X-Amzn-SageMaker-Custom-Attributes";
|
|
55
|
+
const _XASCSI = "X-Amzn-SageMaker-Closed-Session-Id";
|
|
56
|
+
const _XASCT = "X-Amzn-SageMaker-Content-Type";
|
|
57
|
+
const _XASEE = "X-Amzn-SageMaker-Enable-Explanations";
|
|
58
|
+
const _XASF = "X-Amzn-SageMaker-FailureLocation";
|
|
59
|
+
const _XASI = "X-Amzn-SageMaker-InputLocation";
|
|
60
|
+
const _XASIC = "X-Amzn-SageMaker-Inference-Component";
|
|
61
|
+
const _XASII = "X-Amzn-SageMaker-Inference-Id";
|
|
62
|
+
const _XASI_ = "X-Amzn-SageMaker-InvocationTimeoutSeconds";
|
|
63
|
+
const _XASNSI = "X-Amzn-SageMaker-New-Session-Id";
|
|
64
|
+
const _XASO = "X-Amzn-SageMaker-OutputLocation";
|
|
65
|
+
const _XASR = "X-Amzn-SageMaker-RequestTTLSeconds";
|
|
66
|
+
const _XASSI = "X-Amzn-SageMaker-Session-Id";
|
|
67
|
+
const _XASTCH = "X-Amzn-SageMaker-Target-Container-Hostname";
|
|
68
|
+
const _XASTM = "X-Amzn-SageMaker-Target-Model";
|
|
69
|
+
const _XASTV = "X-Amzn-SageMaker-Target-Variant";
|
|
70
|
+
const _aQE = "awsQueryError";
|
|
71
|
+
const _c = "client";
|
|
72
|
+
const _e = "error";
|
|
73
|
+
const _eP = "eventPayload";
|
|
74
|
+
const _h = "http";
|
|
75
|
+
const _hE = "httpError";
|
|
76
|
+
const _hH = "httpHeader";
|
|
77
|
+
const _s = "smithy.ts.sdk.synthetic.com.amazonaws.sagemakerruntime";
|
|
78
|
+
const _se = "server";
|
|
79
|
+
const _st = "streaming";
|
|
80
|
+
const _xAIPV = "x-Amzn-Invoked-Production-Variant";
|
|
81
|
+
const n0 = "com.amazonaws.sagemakerruntime";
|
|
82
|
+
const schema_1 = require("@smithy/core/schema");
|
|
83
|
+
const errors_1 = require("../models/errors");
|
|
84
|
+
const SageMakerRuntimeServiceException_1 = require("../models/SageMakerRuntimeServiceException");
|
|
85
|
+
const _s_registry = schema_1.TypeRegistry.for(_s);
|
|
86
|
+
exports.SageMakerRuntimeServiceException$ = [-3, _s, "SageMakerRuntimeServiceException", 0, [], []];
|
|
87
|
+
_s_registry.registerError(exports.SageMakerRuntimeServiceException$, SageMakerRuntimeServiceException_1.SageMakerRuntimeServiceException);
|
|
88
|
+
const n0_registry = schema_1.TypeRegistry.for(n0);
|
|
89
|
+
exports.InternalDependencyException$ = [-3, n0, _IDE,
|
|
90
|
+
{ [_e]: _se, [_hE]: 530 },
|
|
91
|
+
[_M],
|
|
92
|
+
[0]
|
|
93
|
+
];
|
|
94
|
+
n0_registry.registerError(exports.InternalDependencyException$, errors_1.InternalDependencyException);
|
|
95
|
+
exports.InternalFailure$ = [-3, n0, _IF,
|
|
96
|
+
{ [_e]: _se, [_hE]: 500 },
|
|
97
|
+
[_M],
|
|
98
|
+
[0]
|
|
99
|
+
];
|
|
100
|
+
n0_registry.registerError(exports.InternalFailure$, errors_1.InternalFailure);
|
|
101
|
+
exports.InternalStreamFailure$ = [-3, n0, _ISF,
|
|
102
|
+
{ [_e]: _se },
|
|
103
|
+
[_M],
|
|
104
|
+
[0]
|
|
105
|
+
];
|
|
106
|
+
n0_registry.registerError(exports.InternalStreamFailure$, errors_1.InternalStreamFailure);
|
|
107
|
+
exports.ModelError$ = [-3, n0, _ME,
|
|
108
|
+
{ [_e]: _c, [_hE]: 424 },
|
|
109
|
+
[_M, _OSC, _OM, _LSA],
|
|
110
|
+
[0, 1, 0, 0]
|
|
111
|
+
];
|
|
112
|
+
n0_registry.registerError(exports.ModelError$, errors_1.ModelError);
|
|
113
|
+
exports.ModelNotReadyException$ = [-3, n0, _MNRE,
|
|
114
|
+
{ [_aQE]: [`ModelNotReadyException`, 429], [_e]: _c, [_hE]: 429 },
|
|
115
|
+
[_M],
|
|
116
|
+
[0]
|
|
117
|
+
];
|
|
118
|
+
n0_registry.registerError(exports.ModelNotReadyException$, errors_1.ModelNotReadyException);
|
|
119
|
+
exports.ModelStreamError$ = [-3, n0, _MSE,
|
|
120
|
+
{ [_e]: _c },
|
|
121
|
+
[_M, _EC],
|
|
122
|
+
[0, 0]
|
|
123
|
+
];
|
|
124
|
+
n0_registry.registerError(exports.ModelStreamError$, errors_1.ModelStreamError);
|
|
125
|
+
exports.ServiceUnavailable$ = [-3, n0, _SU,
|
|
126
|
+
{ [_e]: _se, [_hE]: 503 },
|
|
127
|
+
[_M],
|
|
128
|
+
[0]
|
|
129
|
+
];
|
|
130
|
+
n0_registry.registerError(exports.ServiceUnavailable$, errors_1.ServiceUnavailable);
|
|
131
|
+
exports.ValidationError$ = [-3, n0, _VE,
|
|
132
|
+
{ [_e]: _c, [_hE]: 400 },
|
|
133
|
+
[_M],
|
|
134
|
+
[0]
|
|
135
|
+
];
|
|
136
|
+
n0_registry.registerError(exports.ValidationError$, errors_1.ValidationError);
|
|
137
|
+
exports.errorTypeRegistries = [
|
|
138
|
+
_s_registry,
|
|
139
|
+
n0_registry,
|
|
140
|
+
];
|
|
141
|
+
var BodyBlob = [0, n0, _BB, 8, 21];
|
|
142
|
+
var CustomAttributesHeader = [0, n0, _CAH, 8, 0];
|
|
143
|
+
var PartBlob = [0, n0, _PB, 8, 21];
|
|
144
|
+
exports.InvokeEndpointAsyncInput$ = [3, n0, _IEAI,
|
|
145
|
+
0,
|
|
146
|
+
[_EN, _IL, _CT, _A, _CA, _II, _RTTLS, _ITS],
|
|
147
|
+
[[0, 1], [0, { [_hH]: _XASI }], [0, { [_hH]: _XASCT }], [0, { [_hH]: _XASA }], [() => CustomAttributesHeader, { [_hH]: _XASCA }], [0, { [_hH]: _XASII }], [1, { [_hH]: _XASR }], [1, { [_hH]: _XASI_ }]], 2
|
|
148
|
+
];
|
|
149
|
+
exports.InvokeEndpointAsyncOutput$ = [3, n0, _IEAO,
|
|
150
|
+
0,
|
|
151
|
+
[_II, _OL, _FL],
|
|
152
|
+
[0, [0, { [_hH]: _XASO }], [0, { [_hH]: _XASF }]]
|
|
153
|
+
];
|
|
154
|
+
exports.InvokeEndpointInput$ = [3, n0, _IEI,
|
|
155
|
+
0,
|
|
156
|
+
[_EN, _B, _CT, _A, _CA, _TM, _TV, _TCH, _II, _EE, _ICN, _SI],
|
|
157
|
+
[[0, 1], [() => BodyBlob, 16], [0, { [_hH]: _CT_ }], [0, { [_hH]: _A }], [() => CustomAttributesHeader, { [_hH]: _XASCA }], [0, { [_hH]: _XASTM }], [0, { [_hH]: _XASTV }], [0, { [_hH]: _XASTCH }], [0, { [_hH]: _XASII }], [0, { [_hH]: _XASEE }], [0, { [_hH]: _XASIC }], [0, { [_hH]: _XASSI }]], 2
|
|
158
|
+
];
|
|
159
|
+
exports.InvokeEndpointOutput$ = [3, n0, _IEO,
|
|
160
|
+
0,
|
|
161
|
+
[_B, _CT, _IPV, _CA, _NSI, _CSI],
|
|
162
|
+
[[() => BodyBlob, 16], [0, { [_hH]: _CT_ }], [0, { [_hH]: _xAIPV }], [() => CustomAttributesHeader, { [_hH]: _XASCA }], [0, { [_hH]: _XASNSI }], [0, { [_hH]: _XASCSI }]], 1
|
|
163
|
+
];
|
|
164
|
+
exports.InvokeEndpointWithResponseStreamInput$ = [3, n0, _IEWRSI,
|
|
165
|
+
0,
|
|
166
|
+
[_EN, _B, _CT, _A, _CA, _TV, _TCH, _II, _ICN, _SI],
|
|
167
|
+
[[0, 1], [() => BodyBlob, 16], [0, { [_hH]: _CT_ }], [0, { [_hH]: _XASA }], [() => CustomAttributesHeader, { [_hH]: _XASCA }], [0, { [_hH]: _XASTV }], [0, { [_hH]: _XASTCH }], [0, { [_hH]: _XASII }], [0, { [_hH]: _XASIC }], [0, { [_hH]: _XASSI }]], 2
|
|
168
|
+
];
|
|
169
|
+
exports.InvokeEndpointWithResponseStreamOutput$ = [3, n0, _IEWRSO,
|
|
170
|
+
0,
|
|
171
|
+
[_B, _CT, _IPV, _CA],
|
|
172
|
+
[[() => exports.ResponseStream$, 16], [0, { [_hH]: _XASCT }], [0, { [_hH]: _xAIPV }], [() => CustomAttributesHeader, { [_hH]: _XASCA }]], 1
|
|
173
|
+
];
|
|
174
|
+
exports.PayloadPart$ = [3, n0, _PP,
|
|
175
|
+
0,
|
|
176
|
+
[_By],
|
|
177
|
+
[[() => PartBlob, { [_eP]: 1 }]]
|
|
178
|
+
];
|
|
179
|
+
exports.ResponseStream$ = [4, n0, _RS,
|
|
180
|
+
{ [_st]: 1 },
|
|
181
|
+
[_PP, _MSE, _ISF],
|
|
182
|
+
[[() => exports.PayloadPart$, 0], [() => exports.ModelStreamError$, 0], [() => exports.InternalStreamFailure$, 0]]
|
|
183
|
+
];
|
|
184
|
+
exports.InvokeEndpoint$ = [9, n0, _IE,
|
|
185
|
+
{ [_h]: ["POST", "/endpoints/{EndpointName}/invocations", 200] }, () => exports.InvokeEndpointInput$, () => exports.InvokeEndpointOutput$
|
|
186
|
+
];
|
|
187
|
+
exports.InvokeEndpointAsync$ = [9, n0, _IEA,
|
|
188
|
+
{ [_h]: ["POST", "/endpoints/{EndpointName}/async-invocations", 202] }, () => exports.InvokeEndpointAsyncInput$, () => exports.InvokeEndpointAsyncOutput$
|
|
189
|
+
];
|
|
190
|
+
exports.InvokeEndpointWithResponseStream$ = [9, n0, _IEWRS,
|
|
191
|
+
{ [_h]: ["POST", "/endpoints/{EndpointName}/invocations-response-stream", 200] }, () => exports.InvokeEndpointWithResponseStreamInput$, () => exports.InvokeEndpointWithResponseStreamOutput$
|
|
192
|
+
];
|
|
@@ -6,6 +6,7 @@ import { fromBase64, toBase64 } from "@smithy/util-base64";
|
|
|
6
6
|
import { fromUtf8, toUtf8 } from "@smithy/util-utf8";
|
|
7
7
|
import { defaultSageMakerRuntimeHttpAuthSchemeProvider } from "./auth/httpAuthSchemeProvider";
|
|
8
8
|
import { defaultEndpointResolver } from "./endpoint/endpointResolver";
|
|
9
|
+
import { errorTypeRegistries } from "./schemas/schemas_0";
|
|
9
10
|
export const getRuntimeConfig = (config) => {
|
|
10
11
|
return {
|
|
11
12
|
apiVersion: "2017-05-13",
|
|
@@ -26,6 +27,7 @@ export const getRuntimeConfig = (config) => {
|
|
|
26
27
|
protocol: config?.protocol ?? AwsRestJsonProtocol,
|
|
27
28
|
protocolSettings: config?.protocolSettings ?? {
|
|
28
29
|
defaultNamespace: "com.amazonaws.sagemakerruntime",
|
|
30
|
+
errorTypeRegistries,
|
|
29
31
|
version: "2017-05-13",
|
|
30
32
|
serviceTarget: "AmazonSageMakerRuntime",
|
|
31
33
|
},
|
|
@@ -71,35 +71,73 @@ const _eP = "eventPayload";
|
|
|
71
71
|
const _h = "http";
|
|
72
72
|
const _hE = "httpError";
|
|
73
73
|
const _hH = "httpHeader";
|
|
74
|
-
const _s = "
|
|
75
|
-
const
|
|
74
|
+
const _s = "smithy.ts.sdk.synthetic.com.amazonaws.sagemakerruntime";
|
|
75
|
+
const _se = "server";
|
|
76
76
|
const _st = "streaming";
|
|
77
77
|
const _xAIPV = "x-Amzn-Invoked-Production-Variant";
|
|
78
78
|
const n0 = "com.amazonaws.sagemakerruntime";
|
|
79
79
|
import { TypeRegistry } from "@smithy/core/schema";
|
|
80
80
|
import { InternalDependencyException, InternalFailure, InternalStreamFailure, ModelError, ModelNotReadyException, ModelStreamError, ServiceUnavailable, ValidationError, } from "../models/errors";
|
|
81
81
|
import { SageMakerRuntimeServiceException } from "../models/SageMakerRuntimeServiceException";
|
|
82
|
-
|
|
83
|
-
var
|
|
84
|
-
|
|
82
|
+
const _s_registry = TypeRegistry.for(_s);
|
|
83
|
+
export var SageMakerRuntimeServiceException$ = [-3, _s, "SageMakerRuntimeServiceException", 0, [], []];
|
|
84
|
+
_s_registry.registerError(SageMakerRuntimeServiceException$, SageMakerRuntimeServiceException);
|
|
85
|
+
const n0_registry = TypeRegistry.for(n0);
|
|
85
86
|
export var InternalDependencyException$ = [-3, n0, _IDE,
|
|
86
|
-
{ [_e]:
|
|
87
|
+
{ [_e]: _se, [_hE]: 530 },
|
|
87
88
|
[_M],
|
|
88
89
|
[0]
|
|
89
90
|
];
|
|
90
|
-
|
|
91
|
+
n0_registry.registerError(InternalDependencyException$, InternalDependencyException);
|
|
91
92
|
export var InternalFailure$ = [-3, n0, _IF,
|
|
92
|
-
{ [_e]:
|
|
93
|
+
{ [_e]: _se, [_hE]: 500 },
|
|
93
94
|
[_M],
|
|
94
95
|
[0]
|
|
95
96
|
];
|
|
96
|
-
|
|
97
|
+
n0_registry.registerError(InternalFailure$, InternalFailure);
|
|
97
98
|
export var InternalStreamFailure$ = [-3, n0, _ISF,
|
|
98
|
-
{ [_e]:
|
|
99
|
+
{ [_e]: _se },
|
|
100
|
+
[_M],
|
|
101
|
+
[0]
|
|
102
|
+
];
|
|
103
|
+
n0_registry.registerError(InternalStreamFailure$, InternalStreamFailure);
|
|
104
|
+
export var ModelError$ = [-3, n0, _ME,
|
|
105
|
+
{ [_e]: _c, [_hE]: 424 },
|
|
106
|
+
[_M, _OSC, _OM, _LSA],
|
|
107
|
+
[0, 1, 0, 0]
|
|
108
|
+
];
|
|
109
|
+
n0_registry.registerError(ModelError$, ModelError);
|
|
110
|
+
export var ModelNotReadyException$ = [-3, n0, _MNRE,
|
|
111
|
+
{ [_aQE]: [`ModelNotReadyException`, 429], [_e]: _c, [_hE]: 429 },
|
|
112
|
+
[_M],
|
|
113
|
+
[0]
|
|
114
|
+
];
|
|
115
|
+
n0_registry.registerError(ModelNotReadyException$, ModelNotReadyException);
|
|
116
|
+
export var ModelStreamError$ = [-3, n0, _MSE,
|
|
117
|
+
{ [_e]: _c },
|
|
118
|
+
[_M, _EC],
|
|
119
|
+
[0, 0]
|
|
120
|
+
];
|
|
121
|
+
n0_registry.registerError(ModelStreamError$, ModelStreamError);
|
|
122
|
+
export var ServiceUnavailable$ = [-3, n0, _SU,
|
|
123
|
+
{ [_e]: _se, [_hE]: 503 },
|
|
99
124
|
[_M],
|
|
100
125
|
[0]
|
|
101
126
|
];
|
|
102
|
-
|
|
127
|
+
n0_registry.registerError(ServiceUnavailable$, ServiceUnavailable);
|
|
128
|
+
export var ValidationError$ = [-3, n0, _VE,
|
|
129
|
+
{ [_e]: _c, [_hE]: 400 },
|
|
130
|
+
[_M],
|
|
131
|
+
[0]
|
|
132
|
+
];
|
|
133
|
+
n0_registry.registerError(ValidationError$, ValidationError);
|
|
134
|
+
export const errorTypeRegistries = [
|
|
135
|
+
_s_registry,
|
|
136
|
+
n0_registry,
|
|
137
|
+
];
|
|
138
|
+
var BodyBlob = [0, n0, _BB, 8, 21];
|
|
139
|
+
var CustomAttributesHeader = [0, n0, _CAH, 8, 0];
|
|
140
|
+
var PartBlob = [0, n0, _PB, 8, 21];
|
|
103
141
|
export var InvokeEndpointAsyncInput$ = [3, n0, _IEAI,
|
|
104
142
|
0,
|
|
105
143
|
[_EN, _IL, _CT, _A, _CA, _II, _RTTLS, _ITS],
|
|
@@ -130,43 +168,11 @@ export var InvokeEndpointWithResponseStreamOutput$ = [3, n0, _IEWRSO,
|
|
|
130
168
|
[_B, _CT, _IPV, _CA],
|
|
131
169
|
[[() => ResponseStream$, 16], [0, { [_hH]: _XASCT }], [0, { [_hH]: _xAIPV }], [() => CustomAttributesHeader, { [_hH]: _XASCA }]], 1
|
|
132
170
|
];
|
|
133
|
-
export var ModelError$ = [-3, n0, _ME,
|
|
134
|
-
{ [_e]: _c, [_hE]: 424 },
|
|
135
|
-
[_M, _OSC, _OM, _LSA],
|
|
136
|
-
[0, 1, 0, 0]
|
|
137
|
-
];
|
|
138
|
-
TypeRegistry.for(n0).registerError(ModelError$, ModelError);
|
|
139
|
-
export var ModelNotReadyException$ = [-3, n0, _MNRE,
|
|
140
|
-
{ [_aQE]: [`ModelNotReadyException`, 429], [_e]: _c, [_hE]: 429 },
|
|
141
|
-
[_M],
|
|
142
|
-
[0]
|
|
143
|
-
];
|
|
144
|
-
TypeRegistry.for(n0).registerError(ModelNotReadyException$, ModelNotReadyException);
|
|
145
|
-
export var ModelStreamError$ = [-3, n0, _MSE,
|
|
146
|
-
{ [_e]: _c },
|
|
147
|
-
[_M, _EC],
|
|
148
|
-
[0, 0]
|
|
149
|
-
];
|
|
150
|
-
TypeRegistry.for(n0).registerError(ModelStreamError$, ModelStreamError);
|
|
151
171
|
export var PayloadPart$ = [3, n0, _PP,
|
|
152
172
|
0,
|
|
153
173
|
[_By],
|
|
154
174
|
[[() => PartBlob, { [_eP]: 1 }]]
|
|
155
175
|
];
|
|
156
|
-
export var ServiceUnavailable$ = [-3, n0, _SU,
|
|
157
|
-
{ [_e]: _s, [_hE]: 503 },
|
|
158
|
-
[_M],
|
|
159
|
-
[0]
|
|
160
|
-
];
|
|
161
|
-
TypeRegistry.for(n0).registerError(ServiceUnavailable$, ServiceUnavailable);
|
|
162
|
-
export var ValidationError$ = [-3, n0, _VE,
|
|
163
|
-
{ [_e]: _c, [_hE]: 400 },
|
|
164
|
-
[_M],
|
|
165
|
-
[0]
|
|
166
|
-
];
|
|
167
|
-
TypeRegistry.for(n0).registerError(ValidationError$, ValidationError);
|
|
168
|
-
export var SageMakerRuntimeServiceException$ = [-3, _sm, "SageMakerRuntimeServiceException", 0, [], []];
|
|
169
|
-
TypeRegistry.for(_sm).registerError(SageMakerRuntimeServiceException$, SageMakerRuntimeServiceException);
|
|
170
176
|
export var ResponseStream$ = [4, n0, _RS,
|
|
171
177
|
{ [_st]: 1 },
|
|
172
178
|
[_PP, _MSE, _ISF],
|
|
@@ -1,20 +1,27 @@
|
|
|
1
|
+
import { TypeRegistry } from "@smithy/core/schema";
|
|
1
2
|
import type { StaticErrorSchema, StaticOperationSchema, StaticStructureSchema, StaticUnionSchema } from "@smithy/types";
|
|
3
|
+
export declare var SageMakerRuntimeServiceException$: StaticErrorSchema;
|
|
2
4
|
export declare var InternalDependencyException$: StaticErrorSchema;
|
|
3
5
|
export declare var InternalFailure$: StaticErrorSchema;
|
|
4
6
|
export declare var InternalStreamFailure$: StaticErrorSchema;
|
|
7
|
+
export declare var ModelError$: StaticErrorSchema;
|
|
8
|
+
export declare var ModelNotReadyException$: StaticErrorSchema;
|
|
9
|
+
export declare var ModelStreamError$: StaticErrorSchema;
|
|
10
|
+
export declare var ServiceUnavailable$: StaticErrorSchema;
|
|
11
|
+
export declare var ValidationError$: StaticErrorSchema;
|
|
12
|
+
/**
|
|
13
|
+
* TypeRegistry instances containing modeled errors.
|
|
14
|
+
* @internal
|
|
15
|
+
*
|
|
16
|
+
*/
|
|
17
|
+
export declare const errorTypeRegistries: TypeRegistry[];
|
|
5
18
|
export declare var InvokeEndpointAsyncInput$: StaticStructureSchema;
|
|
6
19
|
export declare var InvokeEndpointAsyncOutput$: StaticStructureSchema;
|
|
7
20
|
export declare var InvokeEndpointInput$: StaticStructureSchema;
|
|
8
21
|
export declare var InvokeEndpointOutput$: StaticStructureSchema;
|
|
9
22
|
export declare var InvokeEndpointWithResponseStreamInput$: StaticStructureSchema;
|
|
10
23
|
export declare var InvokeEndpointWithResponseStreamOutput$: StaticStructureSchema;
|
|
11
|
-
export declare var ModelError$: StaticErrorSchema;
|
|
12
|
-
export declare var ModelNotReadyException$: StaticErrorSchema;
|
|
13
|
-
export declare var ModelStreamError$: StaticErrorSchema;
|
|
14
24
|
export declare var PayloadPart$: StaticStructureSchema;
|
|
15
|
-
export declare var ServiceUnavailable$: StaticErrorSchema;
|
|
16
|
-
export declare var ValidationError$: StaticErrorSchema;
|
|
17
|
-
export declare var SageMakerRuntimeServiceException$: StaticErrorSchema;
|
|
18
25
|
export declare var ResponseStream$: StaticUnionSchema;
|
|
19
26
|
export declare var InvokeEndpoint$: StaticOperationSchema;
|
|
20
27
|
export declare var InvokeEndpointAsync$: StaticOperationSchema;
|
|
@@ -1,25 +1,27 @@
|
|
|
1
|
+
import { TypeRegistry } from "@smithy/core/schema";
|
|
1
2
|
import {
|
|
2
3
|
StaticErrorSchema,
|
|
3
4
|
StaticOperationSchema,
|
|
4
5
|
StaticStructureSchema,
|
|
5
6
|
StaticUnionSchema,
|
|
6
7
|
} from "@smithy/types";
|
|
8
|
+
export declare var SageMakerRuntimeServiceException$: StaticErrorSchema;
|
|
7
9
|
export declare var InternalDependencyException$: StaticErrorSchema;
|
|
8
10
|
export declare var InternalFailure$: StaticErrorSchema;
|
|
9
11
|
export declare var InternalStreamFailure$: StaticErrorSchema;
|
|
12
|
+
export declare var ModelError$: StaticErrorSchema;
|
|
13
|
+
export declare var ModelNotReadyException$: StaticErrorSchema;
|
|
14
|
+
export declare var ModelStreamError$: StaticErrorSchema;
|
|
15
|
+
export declare var ServiceUnavailable$: StaticErrorSchema;
|
|
16
|
+
export declare var ValidationError$: StaticErrorSchema;
|
|
17
|
+
export declare const errorTypeRegistries: TypeRegistry[];
|
|
10
18
|
export declare var InvokeEndpointAsyncInput$: StaticStructureSchema;
|
|
11
19
|
export declare var InvokeEndpointAsyncOutput$: StaticStructureSchema;
|
|
12
20
|
export declare var InvokeEndpointInput$: StaticStructureSchema;
|
|
13
21
|
export declare var InvokeEndpointOutput$: StaticStructureSchema;
|
|
14
22
|
export declare var InvokeEndpointWithResponseStreamInput$: StaticStructureSchema;
|
|
15
23
|
export declare var InvokeEndpointWithResponseStreamOutput$: StaticStructureSchema;
|
|
16
|
-
export declare var ModelError$: StaticErrorSchema;
|
|
17
|
-
export declare var ModelNotReadyException$: StaticErrorSchema;
|
|
18
|
-
export declare var ModelStreamError$: StaticErrorSchema;
|
|
19
24
|
export declare var PayloadPart$: StaticStructureSchema;
|
|
20
|
-
export declare var ServiceUnavailable$: StaticErrorSchema;
|
|
21
|
-
export declare var ValidationError$: StaticErrorSchema;
|
|
22
|
-
export declare var SageMakerRuntimeServiceException$: StaticErrorSchema;
|
|
23
25
|
export declare var ResponseStream$: StaticUnionSchema;
|
|
24
26
|
export declare var InvokeEndpoint$: StaticOperationSchema;
|
|
25
27
|
export declare var InvokeEndpointAsync$: StaticOperationSchema;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/client-sagemaker-runtime",
|
|
3
3
|
"description": "AWS SDK for JavaScript Sagemaker Runtime Client for Node.js, Browser and React Native",
|
|
4
|
-
"version": "3.
|
|
4
|
+
"version": "3.988.0",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "concurrently 'yarn:build:types' 'yarn:build:es' && yarn build:cjs",
|
|
7
7
|
"build:cjs": "node ../../scripts/compilation/inline client-sagemaker-runtime",
|
|
@@ -21,19 +21,19 @@
|
|
|
21
21
|
"dependencies": {
|
|
22
22
|
"@aws-crypto/sha256-browser": "5.2.0",
|
|
23
23
|
"@aws-crypto/sha256-js": "5.2.0",
|
|
24
|
-
"@aws-sdk/core": "^3.973.
|
|
25
|
-
"@aws-sdk/credential-provider-node": "^3.972.
|
|
24
|
+
"@aws-sdk/core": "^3.973.8",
|
|
25
|
+
"@aws-sdk/credential-provider-node": "^3.972.7",
|
|
26
26
|
"@aws-sdk/middleware-host-header": "^3.972.3",
|
|
27
27
|
"@aws-sdk/middleware-logger": "^3.972.3",
|
|
28
28
|
"@aws-sdk/middleware-recursion-detection": "^3.972.3",
|
|
29
|
-
"@aws-sdk/middleware-user-agent": "^3.972.
|
|
29
|
+
"@aws-sdk/middleware-user-agent": "^3.972.8",
|
|
30
30
|
"@aws-sdk/region-config-resolver": "^3.972.3",
|
|
31
31
|
"@aws-sdk/types": "^3.973.1",
|
|
32
|
-
"@aws-sdk/util-endpoints": "3.
|
|
32
|
+
"@aws-sdk/util-endpoints": "3.988.0",
|
|
33
33
|
"@aws-sdk/util-user-agent-browser": "^3.972.3",
|
|
34
|
-
"@aws-sdk/util-user-agent-node": "^3.972.
|
|
34
|
+
"@aws-sdk/util-user-agent-node": "^3.972.6",
|
|
35
35
|
"@smithy/config-resolver": "^4.4.6",
|
|
36
|
-
"@smithy/core": "^3.
|
|
36
|
+
"@smithy/core": "^3.23.0",
|
|
37
37
|
"@smithy/eventstream-serde-browser": "^4.2.8",
|
|
38
38
|
"@smithy/eventstream-serde-config-resolver": "^4.3.8",
|
|
39
39
|
"@smithy/eventstream-serde-node": "^4.2.8",
|
|
@@ -41,25 +41,25 @@
|
|
|
41
41
|
"@smithy/hash-node": "^4.2.8",
|
|
42
42
|
"@smithy/invalid-dependency": "^4.2.8",
|
|
43
43
|
"@smithy/middleware-content-length": "^4.2.8",
|
|
44
|
-
"@smithy/middleware-endpoint": "^4.4.
|
|
45
|
-
"@smithy/middleware-retry": "^4.4.
|
|
44
|
+
"@smithy/middleware-endpoint": "^4.4.14",
|
|
45
|
+
"@smithy/middleware-retry": "^4.4.31",
|
|
46
46
|
"@smithy/middleware-serde": "^4.2.9",
|
|
47
47
|
"@smithy/middleware-stack": "^4.2.8",
|
|
48
48
|
"@smithy/node-config-provider": "^4.3.8",
|
|
49
|
-
"@smithy/node-http-handler": "^4.4.
|
|
49
|
+
"@smithy/node-http-handler": "^4.4.10",
|
|
50
50
|
"@smithy/protocol-http": "^5.3.8",
|
|
51
|
-
"@smithy/smithy-client": "^4.11.
|
|
51
|
+
"@smithy/smithy-client": "^4.11.3",
|
|
52
52
|
"@smithy/types": "^4.12.0",
|
|
53
53
|
"@smithy/url-parser": "^4.2.8",
|
|
54
54
|
"@smithy/util-base64": "^4.3.0",
|
|
55
55
|
"@smithy/util-body-length-browser": "^4.2.0",
|
|
56
56
|
"@smithy/util-body-length-node": "^4.2.1",
|
|
57
|
-
"@smithy/util-defaults-mode-browser": "^4.3.
|
|
58
|
-
"@smithy/util-defaults-mode-node": "^4.2.
|
|
57
|
+
"@smithy/util-defaults-mode-browser": "^4.3.30",
|
|
58
|
+
"@smithy/util-defaults-mode-node": "^4.2.33",
|
|
59
59
|
"@smithy/util-endpoints": "^3.2.8",
|
|
60
60
|
"@smithy/util-middleware": "^4.2.8",
|
|
61
61
|
"@smithy/util-retry": "^4.2.8",
|
|
62
|
-
"@smithy/util-stream": "^4.5.
|
|
62
|
+
"@smithy/util-stream": "^4.5.12",
|
|
63
63
|
"@smithy/util-utf8": "^4.2.0",
|
|
64
64
|
"tslib": "^2.6.2"
|
|
65
65
|
},
|