@aws-sdk/client-sagemaker-runtime 3.310.0 → 3.315.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.
|
@@ -7,7 +7,7 @@ const models_0_1 = require("../models/models_0");
|
|
|
7
7
|
const SageMakerRuntimeServiceException_1 = require("../models/SageMakerRuntimeServiceException");
|
|
8
8
|
const se_InvokeEndpointCommand = async (input, context) => {
|
|
9
9
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
10
|
-
const headers = map({}, isSerializableHeaderValue, {
|
|
10
|
+
const headers = (0, smithy_client_1.map)({}, isSerializableHeaderValue, {
|
|
11
11
|
"content-type": input.ContentType || "application/octet-stream",
|
|
12
12
|
accept: input.Accept,
|
|
13
13
|
"x-amzn-sagemaker-custom-attributes": input.CustomAttributes,
|
|
@@ -36,7 +36,7 @@ const se_InvokeEndpointCommand = async (input, context) => {
|
|
|
36
36
|
exports.se_InvokeEndpointCommand = se_InvokeEndpointCommand;
|
|
37
37
|
const se_InvokeEndpointAsyncCommand = async (input, context) => {
|
|
38
38
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
39
|
-
const headers = map({}, isSerializableHeaderValue, {
|
|
39
|
+
const headers = (0, smithy_client_1.map)({}, isSerializableHeaderValue, {
|
|
40
40
|
"x-amzn-sagemaker-content-type": input.ContentType,
|
|
41
41
|
"x-amzn-sagemaker-accept": input.Accept,
|
|
42
42
|
"x-amzn-sagemaker-custom-attributes": input.CustomAttributes,
|
|
@@ -70,7 +70,7 @@ const de_InvokeEndpointCommand = async (output, context) => {
|
|
|
70
70
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
71
71
|
return de_InvokeEndpointCommandError(output, context);
|
|
72
72
|
}
|
|
73
|
-
const contents = map({
|
|
73
|
+
const contents = (0, smithy_client_1.map)({
|
|
74
74
|
$metadata: deserializeMetadata(output),
|
|
75
75
|
ContentType: [, output.headers["content-type"]],
|
|
76
76
|
InvokedProductionVariant: [, output.headers["x-amzn-invoked-production-variant"]],
|
|
@@ -108,10 +108,9 @@ const de_InvokeEndpointCommandError = async (output, context) => {
|
|
|
108
108
|
throw await de_ValidationErrorRes(parsedOutput, context);
|
|
109
109
|
default:
|
|
110
110
|
const parsedBody = parsedOutput.body;
|
|
111
|
-
|
|
111
|
+
return throwDefaultError({
|
|
112
112
|
output,
|
|
113
113
|
parsedBody,
|
|
114
|
-
exceptionCtor: SageMakerRuntimeServiceException_1.SageMakerRuntimeServiceException,
|
|
115
114
|
errorCode,
|
|
116
115
|
});
|
|
117
116
|
}
|
|
@@ -120,15 +119,16 @@ const de_InvokeEndpointAsyncCommand = async (output, context) => {
|
|
|
120
119
|
if (output.statusCode !== 202 && output.statusCode >= 300) {
|
|
121
120
|
return de_InvokeEndpointAsyncCommandError(output, context);
|
|
122
121
|
}
|
|
123
|
-
const contents = map({
|
|
122
|
+
const contents = (0, smithy_client_1.map)({
|
|
124
123
|
$metadata: deserializeMetadata(output),
|
|
125
124
|
OutputLocation: [, output.headers["x-amzn-sagemaker-outputlocation"]],
|
|
126
125
|
FailureLocation: [, output.headers["x-amzn-sagemaker-failurelocation"]],
|
|
127
126
|
});
|
|
128
127
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
}
|
|
128
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
129
|
+
InferenceId: smithy_client_1.expectString,
|
|
130
|
+
});
|
|
131
|
+
Object.assign(contents, doc);
|
|
132
132
|
return contents;
|
|
133
133
|
};
|
|
134
134
|
exports.de_InvokeEndpointAsyncCommand = de_InvokeEndpointAsyncCommand;
|
|
@@ -150,21 +150,21 @@ const de_InvokeEndpointAsyncCommandError = async (output, context) => {
|
|
|
150
150
|
throw await de_ValidationErrorRes(parsedOutput, context);
|
|
151
151
|
default:
|
|
152
152
|
const parsedBody = parsedOutput.body;
|
|
153
|
-
|
|
153
|
+
return throwDefaultError({
|
|
154
154
|
output,
|
|
155
155
|
parsedBody,
|
|
156
|
-
exceptionCtor: SageMakerRuntimeServiceException_1.SageMakerRuntimeServiceException,
|
|
157
156
|
errorCode,
|
|
158
157
|
});
|
|
159
158
|
}
|
|
160
159
|
};
|
|
161
|
-
const
|
|
160
|
+
const throwDefaultError = (0, smithy_client_1.withBaseException)(SageMakerRuntimeServiceException_1.SageMakerRuntimeServiceException);
|
|
162
161
|
const de_InternalDependencyExceptionRes = async (parsedOutput, context) => {
|
|
163
|
-
const contents = map({});
|
|
162
|
+
const contents = (0, smithy_client_1.map)({});
|
|
164
163
|
const data = parsedOutput.body;
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
}
|
|
164
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
165
|
+
Message: smithy_client_1.expectString,
|
|
166
|
+
});
|
|
167
|
+
Object.assign(contents, doc);
|
|
168
168
|
const exception = new models_0_1.InternalDependencyException({
|
|
169
169
|
$metadata: deserializeMetadata(parsedOutput),
|
|
170
170
|
...contents,
|
|
@@ -172,11 +172,12 @@ const de_InternalDependencyExceptionRes = async (parsedOutput, context) => {
|
|
|
172
172
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
173
173
|
};
|
|
174
174
|
const de_InternalFailureRes = async (parsedOutput, context) => {
|
|
175
|
-
const contents = map({});
|
|
175
|
+
const contents = (0, smithy_client_1.map)({});
|
|
176
176
|
const data = parsedOutput.body;
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
}
|
|
177
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
178
|
+
Message: smithy_client_1.expectString,
|
|
179
|
+
});
|
|
180
|
+
Object.assign(contents, doc);
|
|
180
181
|
const exception = new models_0_1.InternalFailure({
|
|
181
182
|
$metadata: deserializeMetadata(parsedOutput),
|
|
182
183
|
...contents,
|
|
@@ -184,20 +185,15 @@ const de_InternalFailureRes = async (parsedOutput, context) => {
|
|
|
184
185
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
185
186
|
};
|
|
186
187
|
const de_ModelErrorRes = async (parsedOutput, context) => {
|
|
187
|
-
const contents = map({});
|
|
188
|
+
const contents = (0, smithy_client_1.map)({});
|
|
188
189
|
const data = parsedOutput.body;
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
}
|
|
195
|
-
|
|
196
|
-
contents.OriginalMessage = (0, smithy_client_1.expectString)(data.OriginalMessage);
|
|
197
|
-
}
|
|
198
|
-
if (data.OriginalStatusCode != null) {
|
|
199
|
-
contents.OriginalStatusCode = (0, smithy_client_1.expectInt32)(data.OriginalStatusCode);
|
|
200
|
-
}
|
|
190
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
191
|
+
LogStreamArn: smithy_client_1.expectString,
|
|
192
|
+
Message: smithy_client_1.expectString,
|
|
193
|
+
OriginalMessage: smithy_client_1.expectString,
|
|
194
|
+
OriginalStatusCode: smithy_client_1.expectInt32,
|
|
195
|
+
});
|
|
196
|
+
Object.assign(contents, doc);
|
|
201
197
|
const exception = new models_0_1.ModelError({
|
|
202
198
|
$metadata: deserializeMetadata(parsedOutput),
|
|
203
199
|
...contents,
|
|
@@ -205,11 +201,12 @@ const de_ModelErrorRes = async (parsedOutput, context) => {
|
|
|
205
201
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
206
202
|
};
|
|
207
203
|
const de_ModelNotReadyExceptionRes = async (parsedOutput, context) => {
|
|
208
|
-
const contents = map({});
|
|
204
|
+
const contents = (0, smithy_client_1.map)({});
|
|
209
205
|
const data = parsedOutput.body;
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
}
|
|
206
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
207
|
+
Message: smithy_client_1.expectString,
|
|
208
|
+
});
|
|
209
|
+
Object.assign(contents, doc);
|
|
213
210
|
const exception = new models_0_1.ModelNotReadyException({
|
|
214
211
|
$metadata: deserializeMetadata(parsedOutput),
|
|
215
212
|
...contents,
|
|
@@ -217,11 +214,12 @@ const de_ModelNotReadyExceptionRes = async (parsedOutput, context) => {
|
|
|
217
214
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
218
215
|
};
|
|
219
216
|
const de_ServiceUnavailableRes = async (parsedOutput, context) => {
|
|
220
|
-
const contents = map({});
|
|
217
|
+
const contents = (0, smithy_client_1.map)({});
|
|
221
218
|
const data = parsedOutput.body;
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
}
|
|
219
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
220
|
+
Message: smithy_client_1.expectString,
|
|
221
|
+
});
|
|
222
|
+
Object.assign(contents, doc);
|
|
225
223
|
const exception = new models_0_1.ServiceUnavailable({
|
|
226
224
|
$metadata: deserializeMetadata(parsedOutput),
|
|
227
225
|
...contents,
|
|
@@ -229,11 +227,12 @@ const de_ServiceUnavailableRes = async (parsedOutput, context) => {
|
|
|
229
227
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
230
228
|
};
|
|
231
229
|
const de_ValidationErrorRes = async (parsedOutput, context) => {
|
|
232
|
-
const contents = map({});
|
|
230
|
+
const contents = (0, smithy_client_1.map)({});
|
|
233
231
|
const data = parsedOutput.body;
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
}
|
|
232
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
233
|
+
Message: smithy_client_1.expectString,
|
|
234
|
+
});
|
|
235
|
+
Object.assign(contents, doc);
|
|
237
236
|
const exception = new models_0_1.ValidationError({
|
|
238
237
|
$metadata: deserializeMetadata(parsedOutput),
|
|
239
238
|
...contents,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { HttpRequest as __HttpRequest } from "@aws-sdk/protocol-http";
|
|
2
|
-
import { decorateServiceException as __decorateServiceException, expectInt32 as __expectInt32, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, map
|
|
2
|
+
import { decorateServiceException as __decorateServiceException, expectInt32 as __expectInt32, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, map, resolvedPath as __resolvedPath, take, withBaseException, } from "@aws-sdk/smithy-client";
|
|
3
3
|
import { InternalDependencyException, InternalFailure, ModelError, ModelNotReadyException, ServiceUnavailable, ValidationError, } from "../models/models_0";
|
|
4
4
|
import { SageMakerRuntimeServiceException as __BaseException } from "../models/SageMakerRuntimeServiceException";
|
|
5
5
|
export const se_InvokeEndpointCommand = async (input, context) => {
|
|
@@ -102,10 +102,9 @@ const de_InvokeEndpointCommandError = async (output, context) => {
|
|
|
102
102
|
throw await de_ValidationErrorRes(parsedOutput, context);
|
|
103
103
|
default:
|
|
104
104
|
const parsedBody = parsedOutput.body;
|
|
105
|
-
throwDefaultError({
|
|
105
|
+
return throwDefaultError({
|
|
106
106
|
output,
|
|
107
107
|
parsedBody,
|
|
108
|
-
exceptionCtor: __BaseException,
|
|
109
108
|
errorCode,
|
|
110
109
|
});
|
|
111
110
|
}
|
|
@@ -120,9 +119,10 @@ export const de_InvokeEndpointAsyncCommand = async (output, context) => {
|
|
|
120
119
|
FailureLocation: [, output.headers["x-amzn-sagemaker-failurelocation"]],
|
|
121
120
|
});
|
|
122
121
|
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
}
|
|
122
|
+
const doc = take(data, {
|
|
123
|
+
InferenceId: __expectString,
|
|
124
|
+
});
|
|
125
|
+
Object.assign(contents, doc);
|
|
126
126
|
return contents;
|
|
127
127
|
};
|
|
128
128
|
const de_InvokeEndpointAsyncCommandError = async (output, context) => {
|
|
@@ -143,21 +143,21 @@ const de_InvokeEndpointAsyncCommandError = async (output, context) => {
|
|
|
143
143
|
throw await de_ValidationErrorRes(parsedOutput, context);
|
|
144
144
|
default:
|
|
145
145
|
const parsedBody = parsedOutput.body;
|
|
146
|
-
throwDefaultError({
|
|
146
|
+
return throwDefaultError({
|
|
147
147
|
output,
|
|
148
148
|
parsedBody,
|
|
149
|
-
exceptionCtor: __BaseException,
|
|
150
149
|
errorCode,
|
|
151
150
|
});
|
|
152
151
|
}
|
|
153
152
|
};
|
|
154
|
-
const
|
|
153
|
+
const throwDefaultError = withBaseException(__BaseException);
|
|
155
154
|
const de_InternalDependencyExceptionRes = async (parsedOutput, context) => {
|
|
156
155
|
const contents = map({});
|
|
157
156
|
const data = parsedOutput.body;
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
}
|
|
157
|
+
const doc = take(data, {
|
|
158
|
+
Message: __expectString,
|
|
159
|
+
});
|
|
160
|
+
Object.assign(contents, doc);
|
|
161
161
|
const exception = new InternalDependencyException({
|
|
162
162
|
$metadata: deserializeMetadata(parsedOutput),
|
|
163
163
|
...contents,
|
|
@@ -167,9 +167,10 @@ const de_InternalDependencyExceptionRes = async (parsedOutput, context) => {
|
|
|
167
167
|
const de_InternalFailureRes = async (parsedOutput, context) => {
|
|
168
168
|
const contents = map({});
|
|
169
169
|
const data = parsedOutput.body;
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
}
|
|
170
|
+
const doc = take(data, {
|
|
171
|
+
Message: __expectString,
|
|
172
|
+
});
|
|
173
|
+
Object.assign(contents, doc);
|
|
173
174
|
const exception = new InternalFailure({
|
|
174
175
|
$metadata: deserializeMetadata(parsedOutput),
|
|
175
176
|
...contents,
|
|
@@ -179,18 +180,13 @@ const de_InternalFailureRes = async (parsedOutput, context) => {
|
|
|
179
180
|
const de_ModelErrorRes = async (parsedOutput, context) => {
|
|
180
181
|
const contents = map({});
|
|
181
182
|
const data = parsedOutput.body;
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
}
|
|
188
|
-
|
|
189
|
-
contents.OriginalMessage = __expectString(data.OriginalMessage);
|
|
190
|
-
}
|
|
191
|
-
if (data.OriginalStatusCode != null) {
|
|
192
|
-
contents.OriginalStatusCode = __expectInt32(data.OriginalStatusCode);
|
|
193
|
-
}
|
|
183
|
+
const doc = take(data, {
|
|
184
|
+
LogStreamArn: __expectString,
|
|
185
|
+
Message: __expectString,
|
|
186
|
+
OriginalMessage: __expectString,
|
|
187
|
+
OriginalStatusCode: __expectInt32,
|
|
188
|
+
});
|
|
189
|
+
Object.assign(contents, doc);
|
|
194
190
|
const exception = new ModelError({
|
|
195
191
|
$metadata: deserializeMetadata(parsedOutput),
|
|
196
192
|
...contents,
|
|
@@ -200,9 +196,10 @@ const de_ModelErrorRes = async (parsedOutput, context) => {
|
|
|
200
196
|
const de_ModelNotReadyExceptionRes = async (parsedOutput, context) => {
|
|
201
197
|
const contents = map({});
|
|
202
198
|
const data = parsedOutput.body;
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
}
|
|
199
|
+
const doc = take(data, {
|
|
200
|
+
Message: __expectString,
|
|
201
|
+
});
|
|
202
|
+
Object.assign(contents, doc);
|
|
206
203
|
const exception = new ModelNotReadyException({
|
|
207
204
|
$metadata: deserializeMetadata(parsedOutput),
|
|
208
205
|
...contents,
|
|
@@ -212,9 +209,10 @@ const de_ModelNotReadyExceptionRes = async (parsedOutput, context) => {
|
|
|
212
209
|
const de_ServiceUnavailableRes = async (parsedOutput, context) => {
|
|
213
210
|
const contents = map({});
|
|
214
211
|
const data = parsedOutput.body;
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
}
|
|
212
|
+
const doc = take(data, {
|
|
213
|
+
Message: __expectString,
|
|
214
|
+
});
|
|
215
|
+
Object.assign(contents, doc);
|
|
218
216
|
const exception = new ServiceUnavailable({
|
|
219
217
|
$metadata: deserializeMetadata(parsedOutput),
|
|
220
218
|
...contents,
|
|
@@ -224,9 +222,10 @@ const de_ServiceUnavailableRes = async (parsedOutput, context) => {
|
|
|
224
222
|
const de_ValidationErrorRes = async (parsedOutput, context) => {
|
|
225
223
|
const contents = map({});
|
|
226
224
|
const data = parsedOutput.body;
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
}
|
|
225
|
+
const doc = take(data, {
|
|
226
|
+
Message: __expectString,
|
|
227
|
+
});
|
|
228
|
+
Object.assign(contents, doc);
|
|
230
229
|
const exception = new ValidationError({
|
|
231
230
|
$metadata: deserializeMetadata(parsedOutput),
|
|
232
231
|
...contents,
|
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.315.0",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
|
|
7
7
|
"build:cjs": "tsc -p tsconfig.cjs.json",
|
|
@@ -21,9 +21,9 @@
|
|
|
21
21
|
"dependencies": {
|
|
22
22
|
"@aws-crypto/sha256-browser": "3.0.0",
|
|
23
23
|
"@aws-crypto/sha256-js": "3.0.0",
|
|
24
|
-
"@aws-sdk/client-sts": "3.
|
|
24
|
+
"@aws-sdk/client-sts": "3.315.0",
|
|
25
25
|
"@aws-sdk/config-resolver": "3.310.0",
|
|
26
|
-
"@aws-sdk/credential-provider-node": "3.
|
|
26
|
+
"@aws-sdk/credential-provider-node": "3.315.0",
|
|
27
27
|
"@aws-sdk/fetch-http-handler": "3.310.0",
|
|
28
28
|
"@aws-sdk/hash-node": "3.310.0",
|
|
29
29
|
"@aws-sdk/invalid-dependency": "3.310.0",
|
|
@@ -40,14 +40,14 @@
|
|
|
40
40
|
"@aws-sdk/node-config-provider": "3.310.0",
|
|
41
41
|
"@aws-sdk/node-http-handler": "3.310.0",
|
|
42
42
|
"@aws-sdk/protocol-http": "3.310.0",
|
|
43
|
-
"@aws-sdk/smithy-client": "3.
|
|
43
|
+
"@aws-sdk/smithy-client": "3.315.0",
|
|
44
44
|
"@aws-sdk/types": "3.310.0",
|
|
45
45
|
"@aws-sdk/url-parser": "3.310.0",
|
|
46
46
|
"@aws-sdk/util-base64": "3.310.0",
|
|
47
47
|
"@aws-sdk/util-body-length-browser": "3.310.0",
|
|
48
48
|
"@aws-sdk/util-body-length-node": "3.310.0",
|
|
49
|
-
"@aws-sdk/util-defaults-mode-browser": "3.
|
|
50
|
-
"@aws-sdk/util-defaults-mode-node": "3.
|
|
49
|
+
"@aws-sdk/util-defaults-mode-browser": "3.315.0",
|
|
50
|
+
"@aws-sdk/util-defaults-mode-node": "3.315.0",
|
|
51
51
|
"@aws-sdk/util-endpoints": "3.310.0",
|
|
52
52
|
"@aws-sdk/util-retry": "3.310.0",
|
|
53
53
|
"@aws-sdk/util-user-agent-browser": "3.310.0",
|