@aws-sdk/client-sagemaker-a2i-runtime 3.50.0 → 3.53.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/CHANGELOG.md +27 -0
- package/dist-cjs/index.js +3 -0
- package/dist-cjs/models/SageMakerA2IRuntimeServiceException.js +11 -0
- package/dist-cjs/models/models_0.js +86 -1
- package/dist-cjs/protocols/Aws_restJson1.js +81 -219
- package/dist-es/index.js +1 -0
- package/dist-es/models/SageMakerA2IRuntimeServiceException.js +12 -0
- package/dist-es/models/models_0.js +80 -1
- package/dist-es/protocols/Aws_restJson1.js +131 -246
- package/dist-types/index.d.ts +1 -0
- package/dist-types/models/SageMakerA2IRuntimeServiceException.d.ts +10 -0
- package/dist-types/models/models_0.d.ts +44 -19
- package/dist-types/ts3.4/SageMakerA2IRuntime.d.ts +30 -0
- package/dist-types/ts3.4/SageMakerA2IRuntimeClient.d.ts +78 -0
- package/dist-types/ts3.4/commands/DeleteHumanLoopCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/DescribeHumanLoopCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/ListHumanLoopsCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/StartHumanLoopCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/StopHumanLoopCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/index.d.ts +5 -0
- package/dist-types/ts3.4/endpoints.d.ts +2 -0
- package/dist-types/ts3.4/index.d.ts +6 -0
- package/dist-types/ts3.4/models/SageMakerA2IRuntimeServiceException.d.ts +6 -0
- package/dist-types/ts3.4/models/index.d.ts +1 -0
- package/dist-types/ts3.4/models/models_0.d.ts +217 -0
- package/dist-types/ts3.4/pagination/Interfaces.d.ts +6 -0
- package/dist-types/ts3.4/pagination/ListHumanLoopsPaginator.d.ts +4 -0
- package/dist-types/ts3.4/pagination/index.d.ts +2 -0
- package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +17 -0
- package/dist-types/ts3.4/runtimeConfig.browser.d.ts +38 -0
- package/dist-types/ts3.4/runtimeConfig.d.ts +38 -0
- package/dist-types/ts3.4/runtimeConfig.native.d.ts +37 -0
- package/dist-types/ts3.4/runtimeConfig.shared.d.ts +11 -0
- package/package.json +33 -33
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,33 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# [3.53.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.52.0...v3.53.0) (2022-02-24)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* **clients:** generate service exceptions as classes ([#3267](https://github.com/aws/aws-sdk-js-v3/issues/3267)) ([ca64fee](https://github.com/aws/aws-sdk-js-v3/commit/ca64feed3351c394c07dc26b782a5760a396a074))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
# [3.52.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.51.0...v3.52.0) (2022-02-18)
|
|
18
|
+
|
|
19
|
+
**Note:** Version bump only for package @aws-sdk/client-sagemaker-a2i-runtime
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
# [3.51.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.50.0...v3.51.0) (2022-02-12)
|
|
26
|
+
|
|
27
|
+
**Note:** Version bump only for package @aws-sdk/client-sagemaker-a2i-runtime
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
|
|
6
33
|
# [3.50.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.49.0...v3.50.0) (2022-02-08)
|
|
7
34
|
|
|
8
35
|
**Note:** Version bump only for package @aws-sdk/client-sagemaker-a2i-runtime
|
package/dist-cjs/index.js
CHANGED
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SageMakerA2IRuntimeServiceException = void 0;
|
|
3
4
|
const tslib_1 = require("tslib");
|
|
4
5
|
tslib_1.__exportStar(require("./SageMakerA2IRuntime"), exports);
|
|
5
6
|
tslib_1.__exportStar(require("./SageMakerA2IRuntimeClient"), exports);
|
|
6
7
|
tslib_1.__exportStar(require("./commands"), exports);
|
|
7
8
|
tslib_1.__exportStar(require("./models"), exports);
|
|
8
9
|
tslib_1.__exportStar(require("./pagination"), exports);
|
|
10
|
+
var SageMakerA2IRuntimeServiceException_1 = require("./models/SageMakerA2IRuntimeServiceException");
|
|
11
|
+
Object.defineProperty(exports, "SageMakerA2IRuntimeServiceException", { enumerable: true, get: function () { return SageMakerA2IRuntimeServiceException_1.SageMakerA2IRuntimeServiceException; } });
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SageMakerA2IRuntimeServiceException = void 0;
|
|
4
|
+
const smithy_client_1 = require("@aws-sdk/smithy-client");
|
|
5
|
+
class SageMakerA2IRuntimeServiceException extends smithy_client_1.ServiceException {
|
|
6
|
+
constructor(options) {
|
|
7
|
+
super(options);
|
|
8
|
+
Object.setPrototypeOf(this, SageMakerA2IRuntimeServiceException.prototype);
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
exports.SageMakerA2IRuntimeServiceException = SageMakerA2IRuntimeServiceException;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.StopHumanLoopResponse = exports.StopHumanLoopRequest = exports.StartHumanLoopResponse = exports.StartHumanLoopRequest = exports.HumanLoopInput = exports.HumanLoopDataAttributes = exports.ContentClassifier = exports.ListHumanLoopsResponse = exports.HumanLoopSummary = exports.ListHumanLoopsRequest = exports.SortOrder = exports.DescribeHumanLoopResponse = exports.HumanLoopStatus = exports.HumanLoopOutput = exports.DescribeHumanLoopRequest = exports.DeleteHumanLoopResponse = exports.DeleteHumanLoopRequest = void 0;
|
|
3
|
+
exports.StopHumanLoopResponse = exports.StopHumanLoopRequest = exports.StartHumanLoopResponse = exports.StartHumanLoopRequest = exports.HumanLoopInput = exports.HumanLoopDataAttributes = exports.ContentClassifier = exports.ServiceQuotaExceededException = exports.ConflictException = exports.ListHumanLoopsResponse = exports.HumanLoopSummary = exports.ListHumanLoopsRequest = exports.SortOrder = exports.DescribeHumanLoopResponse = exports.HumanLoopStatus = exports.HumanLoopOutput = exports.DescribeHumanLoopRequest = exports.ValidationException = exports.ThrottlingException = exports.ResourceNotFoundException = exports.InternalServerException = exports.DeleteHumanLoopResponse = exports.DeleteHumanLoopRequest = void 0;
|
|
4
|
+
const SageMakerA2IRuntimeServiceException_1 = require("./SageMakerA2IRuntimeServiceException");
|
|
4
5
|
var DeleteHumanLoopRequest;
|
|
5
6
|
(function (DeleteHumanLoopRequest) {
|
|
6
7
|
DeleteHumanLoopRequest.filterSensitiveLog = (obj) => ({
|
|
@@ -13,6 +14,62 @@ var DeleteHumanLoopResponse;
|
|
|
13
14
|
...obj,
|
|
14
15
|
});
|
|
15
16
|
})(DeleteHumanLoopResponse = exports.DeleteHumanLoopResponse || (exports.DeleteHumanLoopResponse = {}));
|
|
17
|
+
class InternalServerException extends SageMakerA2IRuntimeServiceException_1.SageMakerA2IRuntimeServiceException {
|
|
18
|
+
constructor(opts) {
|
|
19
|
+
super({
|
|
20
|
+
name: "InternalServerException",
|
|
21
|
+
$fault: "server",
|
|
22
|
+
...opts,
|
|
23
|
+
});
|
|
24
|
+
this.name = "InternalServerException";
|
|
25
|
+
this.$fault = "server";
|
|
26
|
+
Object.setPrototypeOf(this, InternalServerException.prototype);
|
|
27
|
+
this.Message = opts.Message;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
exports.InternalServerException = InternalServerException;
|
|
31
|
+
class ResourceNotFoundException extends SageMakerA2IRuntimeServiceException_1.SageMakerA2IRuntimeServiceException {
|
|
32
|
+
constructor(opts) {
|
|
33
|
+
super({
|
|
34
|
+
name: "ResourceNotFoundException",
|
|
35
|
+
$fault: "client",
|
|
36
|
+
...opts,
|
|
37
|
+
});
|
|
38
|
+
this.name = "ResourceNotFoundException";
|
|
39
|
+
this.$fault = "client";
|
|
40
|
+
Object.setPrototypeOf(this, ResourceNotFoundException.prototype);
|
|
41
|
+
this.Message = opts.Message;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
exports.ResourceNotFoundException = ResourceNotFoundException;
|
|
45
|
+
class ThrottlingException extends SageMakerA2IRuntimeServiceException_1.SageMakerA2IRuntimeServiceException {
|
|
46
|
+
constructor(opts) {
|
|
47
|
+
super({
|
|
48
|
+
name: "ThrottlingException",
|
|
49
|
+
$fault: "client",
|
|
50
|
+
...opts,
|
|
51
|
+
});
|
|
52
|
+
this.name = "ThrottlingException";
|
|
53
|
+
this.$fault = "client";
|
|
54
|
+
Object.setPrototypeOf(this, ThrottlingException.prototype);
|
|
55
|
+
this.Message = opts.Message;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
exports.ThrottlingException = ThrottlingException;
|
|
59
|
+
class ValidationException extends SageMakerA2IRuntimeServiceException_1.SageMakerA2IRuntimeServiceException {
|
|
60
|
+
constructor(opts) {
|
|
61
|
+
super({
|
|
62
|
+
name: "ValidationException",
|
|
63
|
+
$fault: "client",
|
|
64
|
+
...opts,
|
|
65
|
+
});
|
|
66
|
+
this.name = "ValidationException";
|
|
67
|
+
this.$fault = "client";
|
|
68
|
+
Object.setPrototypeOf(this, ValidationException.prototype);
|
|
69
|
+
this.Message = opts.Message;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
exports.ValidationException = ValidationException;
|
|
16
73
|
var DescribeHumanLoopRequest;
|
|
17
74
|
(function (DescribeHumanLoopRequest) {
|
|
18
75
|
DescribeHumanLoopRequest.filterSensitiveLog = (obj) => ({
|
|
@@ -62,6 +119,34 @@ var ListHumanLoopsResponse;
|
|
|
62
119
|
...obj,
|
|
63
120
|
});
|
|
64
121
|
})(ListHumanLoopsResponse = exports.ListHumanLoopsResponse || (exports.ListHumanLoopsResponse = {}));
|
|
122
|
+
class ConflictException extends SageMakerA2IRuntimeServiceException_1.SageMakerA2IRuntimeServiceException {
|
|
123
|
+
constructor(opts) {
|
|
124
|
+
super({
|
|
125
|
+
name: "ConflictException",
|
|
126
|
+
$fault: "client",
|
|
127
|
+
...opts,
|
|
128
|
+
});
|
|
129
|
+
this.name = "ConflictException";
|
|
130
|
+
this.$fault = "client";
|
|
131
|
+
Object.setPrototypeOf(this, ConflictException.prototype);
|
|
132
|
+
this.Message = opts.Message;
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
exports.ConflictException = ConflictException;
|
|
136
|
+
class ServiceQuotaExceededException extends SageMakerA2IRuntimeServiceException_1.SageMakerA2IRuntimeServiceException {
|
|
137
|
+
constructor(opts) {
|
|
138
|
+
super({
|
|
139
|
+
name: "ServiceQuotaExceededException",
|
|
140
|
+
$fault: "client",
|
|
141
|
+
...opts,
|
|
142
|
+
});
|
|
143
|
+
this.name = "ServiceQuotaExceededException";
|
|
144
|
+
this.$fault = "client";
|
|
145
|
+
Object.setPrototypeOf(this, ServiceQuotaExceededException.prototype);
|
|
146
|
+
this.Message = opts.Message;
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
exports.ServiceQuotaExceededException = ServiceQuotaExceededException;
|
|
65
150
|
var ContentClassifier;
|
|
66
151
|
(function (ContentClassifier) {
|
|
67
152
|
ContentClassifier["FREE_OF_ADULT_CONTENT"] = "FreeOfAdultContent";
|
|
@@ -3,6 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.deserializeAws_restJson1StopHumanLoopCommand = exports.deserializeAws_restJson1StartHumanLoopCommand = exports.deserializeAws_restJson1ListHumanLoopsCommand = exports.deserializeAws_restJson1DescribeHumanLoopCommand = exports.deserializeAws_restJson1DeleteHumanLoopCommand = exports.serializeAws_restJson1StopHumanLoopCommand = exports.serializeAws_restJson1StartHumanLoopCommand = exports.serializeAws_restJson1ListHumanLoopsCommand = exports.serializeAws_restJson1DescribeHumanLoopCommand = exports.serializeAws_restJson1DeleteHumanLoopCommand = void 0;
|
|
4
4
|
const protocol_http_1 = require("@aws-sdk/protocol-http");
|
|
5
5
|
const smithy_client_1 = require("@aws-sdk/smithy-client");
|
|
6
|
+
const models_0_1 = require("../models/models_0");
|
|
7
|
+
const SageMakerA2IRuntimeServiceException_1 = require("../models/SageMakerA2IRuntimeServiceException");
|
|
6
8
|
const serializeAws_restJson1DeleteHumanLoopCommand = async (input, context) => {
|
|
7
9
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
8
10
|
const headers = {};
|
|
@@ -158,51 +160,25 @@ const deserializeAws_restJson1DeleteHumanLoopCommandError = async (output, conte
|
|
|
158
160
|
switch (errorCode) {
|
|
159
161
|
case "InternalServerException":
|
|
160
162
|
case "com.amazonaws.sagemakera2iruntime#InternalServerException":
|
|
161
|
-
|
|
162
|
-
...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
|
|
163
|
-
name: errorCode,
|
|
164
|
-
$metadata: deserializeMetadata(output),
|
|
165
|
-
};
|
|
166
|
-
break;
|
|
163
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
167
164
|
case "ResourceNotFoundException":
|
|
168
165
|
case "com.amazonaws.sagemakera2iruntime#ResourceNotFoundException":
|
|
169
|
-
|
|
170
|
-
...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
171
|
-
name: errorCode,
|
|
172
|
-
$metadata: deserializeMetadata(output),
|
|
173
|
-
};
|
|
174
|
-
break;
|
|
166
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
175
167
|
case "ThrottlingException":
|
|
176
168
|
case "com.amazonaws.sagemakera2iruntime#ThrottlingException":
|
|
177
|
-
|
|
178
|
-
...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
|
|
179
|
-
name: errorCode,
|
|
180
|
-
$metadata: deserializeMetadata(output),
|
|
181
|
-
};
|
|
182
|
-
break;
|
|
169
|
+
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
183
170
|
case "ValidationException":
|
|
184
171
|
case "com.amazonaws.sagemakera2iruntime#ValidationException":
|
|
185
|
-
|
|
186
|
-
...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
|
|
187
|
-
name: errorCode,
|
|
188
|
-
$metadata: deserializeMetadata(output),
|
|
189
|
-
};
|
|
190
|
-
break;
|
|
172
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
191
173
|
default:
|
|
192
174
|
const parsedBody = parsedOutput.body;
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
...parsedBody,
|
|
196
|
-
name: `${errorCode}`,
|
|
197
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
175
|
+
response = new SageMakerA2IRuntimeServiceException_1.SageMakerA2IRuntimeServiceException({
|
|
176
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
198
177
|
$fault: "client",
|
|
199
178
|
$metadata: deserializeMetadata(output),
|
|
200
|
-
};
|
|
179
|
+
});
|
|
180
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
201
181
|
}
|
|
202
|
-
const message = response.message || response.Message || errorCode;
|
|
203
|
-
response.message = message;
|
|
204
|
-
delete response.Message;
|
|
205
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
206
182
|
};
|
|
207
183
|
const deserializeAws_restJson1DescribeHumanLoopCommand = async (output, context) => {
|
|
208
184
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
@@ -258,51 +234,25 @@ const deserializeAws_restJson1DescribeHumanLoopCommandError = async (output, con
|
|
|
258
234
|
switch (errorCode) {
|
|
259
235
|
case "InternalServerException":
|
|
260
236
|
case "com.amazonaws.sagemakera2iruntime#InternalServerException":
|
|
261
|
-
|
|
262
|
-
...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
|
|
263
|
-
name: errorCode,
|
|
264
|
-
$metadata: deserializeMetadata(output),
|
|
265
|
-
};
|
|
266
|
-
break;
|
|
237
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
267
238
|
case "ResourceNotFoundException":
|
|
268
239
|
case "com.amazonaws.sagemakera2iruntime#ResourceNotFoundException":
|
|
269
|
-
|
|
270
|
-
...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
271
|
-
name: errorCode,
|
|
272
|
-
$metadata: deserializeMetadata(output),
|
|
273
|
-
};
|
|
274
|
-
break;
|
|
240
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
275
241
|
case "ThrottlingException":
|
|
276
242
|
case "com.amazonaws.sagemakera2iruntime#ThrottlingException":
|
|
277
|
-
|
|
278
|
-
...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
|
|
279
|
-
name: errorCode,
|
|
280
|
-
$metadata: deserializeMetadata(output),
|
|
281
|
-
};
|
|
282
|
-
break;
|
|
243
|
+
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
283
244
|
case "ValidationException":
|
|
284
245
|
case "com.amazonaws.sagemakera2iruntime#ValidationException":
|
|
285
|
-
|
|
286
|
-
...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
|
|
287
|
-
name: errorCode,
|
|
288
|
-
$metadata: deserializeMetadata(output),
|
|
289
|
-
};
|
|
290
|
-
break;
|
|
246
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
291
247
|
default:
|
|
292
248
|
const parsedBody = parsedOutput.body;
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
...parsedBody,
|
|
296
|
-
name: `${errorCode}`,
|
|
297
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
249
|
+
response = new SageMakerA2IRuntimeServiceException_1.SageMakerA2IRuntimeServiceException({
|
|
250
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
298
251
|
$fault: "client",
|
|
299
252
|
$metadata: deserializeMetadata(output),
|
|
300
|
-
};
|
|
253
|
+
});
|
|
254
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
301
255
|
}
|
|
302
|
-
const message = response.message || response.Message || errorCode;
|
|
303
|
-
response.message = message;
|
|
304
|
-
delete response.Message;
|
|
305
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
306
256
|
};
|
|
307
257
|
const deserializeAws_restJson1ListHumanLoopsCommand = async (output, context) => {
|
|
308
258
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
@@ -334,51 +284,25 @@ const deserializeAws_restJson1ListHumanLoopsCommandError = async (output, contex
|
|
|
334
284
|
switch (errorCode) {
|
|
335
285
|
case "InternalServerException":
|
|
336
286
|
case "com.amazonaws.sagemakera2iruntime#InternalServerException":
|
|
337
|
-
|
|
338
|
-
...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
|
|
339
|
-
name: errorCode,
|
|
340
|
-
$metadata: deserializeMetadata(output),
|
|
341
|
-
};
|
|
342
|
-
break;
|
|
287
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
343
288
|
case "ResourceNotFoundException":
|
|
344
289
|
case "com.amazonaws.sagemakera2iruntime#ResourceNotFoundException":
|
|
345
|
-
|
|
346
|
-
...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
347
|
-
name: errorCode,
|
|
348
|
-
$metadata: deserializeMetadata(output),
|
|
349
|
-
};
|
|
350
|
-
break;
|
|
290
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
351
291
|
case "ThrottlingException":
|
|
352
292
|
case "com.amazonaws.sagemakera2iruntime#ThrottlingException":
|
|
353
|
-
|
|
354
|
-
...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
|
|
355
|
-
name: errorCode,
|
|
356
|
-
$metadata: deserializeMetadata(output),
|
|
357
|
-
};
|
|
358
|
-
break;
|
|
293
|
+
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
359
294
|
case "ValidationException":
|
|
360
295
|
case "com.amazonaws.sagemakera2iruntime#ValidationException":
|
|
361
|
-
|
|
362
|
-
...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
|
|
363
|
-
name: errorCode,
|
|
364
|
-
$metadata: deserializeMetadata(output),
|
|
365
|
-
};
|
|
366
|
-
break;
|
|
296
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
367
297
|
default:
|
|
368
298
|
const parsedBody = parsedOutput.body;
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
...parsedBody,
|
|
372
|
-
name: `${errorCode}`,
|
|
373
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
299
|
+
response = new SageMakerA2IRuntimeServiceException_1.SageMakerA2IRuntimeServiceException({
|
|
300
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
374
301
|
$fault: "client",
|
|
375
302
|
$metadata: deserializeMetadata(output),
|
|
376
|
-
};
|
|
303
|
+
});
|
|
304
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
377
305
|
}
|
|
378
|
-
const message = response.message || response.Message || errorCode;
|
|
379
|
-
response.message = message;
|
|
380
|
-
delete response.Message;
|
|
381
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
382
306
|
};
|
|
383
307
|
const deserializeAws_restJson1StartHumanLoopCommand = async (output, context) => {
|
|
384
308
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
@@ -406,59 +330,28 @@ const deserializeAws_restJson1StartHumanLoopCommandError = async (output, contex
|
|
|
406
330
|
switch (errorCode) {
|
|
407
331
|
case "ConflictException":
|
|
408
332
|
case "com.amazonaws.sagemakera2iruntime#ConflictException":
|
|
409
|
-
|
|
410
|
-
...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)),
|
|
411
|
-
name: errorCode,
|
|
412
|
-
$metadata: deserializeMetadata(output),
|
|
413
|
-
};
|
|
414
|
-
break;
|
|
333
|
+
throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
|
|
415
334
|
case "InternalServerException":
|
|
416
335
|
case "com.amazonaws.sagemakera2iruntime#InternalServerException":
|
|
417
|
-
|
|
418
|
-
...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
|
|
419
|
-
name: errorCode,
|
|
420
|
-
$metadata: deserializeMetadata(output),
|
|
421
|
-
};
|
|
422
|
-
break;
|
|
336
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
423
337
|
case "ServiceQuotaExceededException":
|
|
424
338
|
case "com.amazonaws.sagemakera2iruntime#ServiceQuotaExceededException":
|
|
425
|
-
|
|
426
|
-
...(await deserializeAws_restJson1ServiceQuotaExceededExceptionResponse(parsedOutput, context)),
|
|
427
|
-
name: errorCode,
|
|
428
|
-
$metadata: deserializeMetadata(output),
|
|
429
|
-
};
|
|
430
|
-
break;
|
|
339
|
+
throw await deserializeAws_restJson1ServiceQuotaExceededExceptionResponse(parsedOutput, context);
|
|
431
340
|
case "ThrottlingException":
|
|
432
341
|
case "com.amazonaws.sagemakera2iruntime#ThrottlingException":
|
|
433
|
-
|
|
434
|
-
...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
|
|
435
|
-
name: errorCode,
|
|
436
|
-
$metadata: deserializeMetadata(output),
|
|
437
|
-
};
|
|
438
|
-
break;
|
|
342
|
+
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
439
343
|
case "ValidationException":
|
|
440
344
|
case "com.amazonaws.sagemakera2iruntime#ValidationException":
|
|
441
|
-
|
|
442
|
-
...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
|
|
443
|
-
name: errorCode,
|
|
444
|
-
$metadata: deserializeMetadata(output),
|
|
445
|
-
};
|
|
446
|
-
break;
|
|
345
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
447
346
|
default:
|
|
448
347
|
const parsedBody = parsedOutput.body;
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
...parsedBody,
|
|
452
|
-
name: `${errorCode}`,
|
|
453
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
348
|
+
response = new SageMakerA2IRuntimeServiceException_1.SageMakerA2IRuntimeServiceException({
|
|
349
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
454
350
|
$fault: "client",
|
|
455
351
|
$metadata: deserializeMetadata(output),
|
|
456
|
-
};
|
|
352
|
+
});
|
|
353
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
457
354
|
}
|
|
458
|
-
const message = response.message || response.Message || errorCode;
|
|
459
|
-
response.message = message;
|
|
460
|
-
delete response.Message;
|
|
461
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
462
355
|
};
|
|
463
356
|
const deserializeAws_restJson1StopHumanLoopCommand = async (output, context) => {
|
|
464
357
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
@@ -482,129 +375,97 @@ const deserializeAws_restJson1StopHumanLoopCommandError = async (output, context
|
|
|
482
375
|
switch (errorCode) {
|
|
483
376
|
case "InternalServerException":
|
|
484
377
|
case "com.amazonaws.sagemakera2iruntime#InternalServerException":
|
|
485
|
-
|
|
486
|
-
...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
|
|
487
|
-
name: errorCode,
|
|
488
|
-
$metadata: deserializeMetadata(output),
|
|
489
|
-
};
|
|
490
|
-
break;
|
|
378
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
491
379
|
case "ResourceNotFoundException":
|
|
492
380
|
case "com.amazonaws.sagemakera2iruntime#ResourceNotFoundException":
|
|
493
|
-
|
|
494
|
-
...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
495
|
-
name: errorCode,
|
|
496
|
-
$metadata: deserializeMetadata(output),
|
|
497
|
-
};
|
|
498
|
-
break;
|
|
381
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
499
382
|
case "ThrottlingException":
|
|
500
383
|
case "com.amazonaws.sagemakera2iruntime#ThrottlingException":
|
|
501
|
-
|
|
502
|
-
...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
|
|
503
|
-
name: errorCode,
|
|
504
|
-
$metadata: deserializeMetadata(output),
|
|
505
|
-
};
|
|
506
|
-
break;
|
|
384
|
+
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
507
385
|
case "ValidationException":
|
|
508
386
|
case "com.amazonaws.sagemakera2iruntime#ValidationException":
|
|
509
|
-
|
|
510
|
-
...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
|
|
511
|
-
name: errorCode,
|
|
512
|
-
$metadata: deserializeMetadata(output),
|
|
513
|
-
};
|
|
514
|
-
break;
|
|
387
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
515
388
|
default:
|
|
516
389
|
const parsedBody = parsedOutput.body;
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
...parsedBody,
|
|
520
|
-
name: `${errorCode}`,
|
|
521
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
390
|
+
response = new SageMakerA2IRuntimeServiceException_1.SageMakerA2IRuntimeServiceException({
|
|
391
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
522
392
|
$fault: "client",
|
|
523
393
|
$metadata: deserializeMetadata(output),
|
|
524
|
-
};
|
|
394
|
+
});
|
|
395
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
525
396
|
}
|
|
526
|
-
const message = response.message || response.Message || errorCode;
|
|
527
|
-
response.message = message;
|
|
528
|
-
delete response.Message;
|
|
529
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
530
397
|
};
|
|
531
398
|
const deserializeAws_restJson1ConflictExceptionResponse = async (parsedOutput, context) => {
|
|
532
|
-
const contents = {
|
|
533
|
-
name: "ConflictException",
|
|
534
|
-
$fault: "client",
|
|
535
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
536
|
-
Message: undefined,
|
|
537
|
-
};
|
|
399
|
+
const contents = {};
|
|
538
400
|
const data = parsedOutput.body;
|
|
539
401
|
if (data.Message !== undefined && data.Message !== null) {
|
|
540
402
|
contents.Message = smithy_client_1.expectString(data.Message);
|
|
541
403
|
}
|
|
542
|
-
|
|
404
|
+
const exception = new models_0_1.ConflictException({
|
|
405
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
406
|
+
...contents,
|
|
407
|
+
});
|
|
408
|
+
return smithy_client_1.decorateServiceException(exception, parsedOutput.body);
|
|
543
409
|
};
|
|
544
410
|
const deserializeAws_restJson1InternalServerExceptionResponse = async (parsedOutput, context) => {
|
|
545
|
-
const contents = {
|
|
546
|
-
name: "InternalServerException",
|
|
547
|
-
$fault: "server",
|
|
548
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
549
|
-
Message: undefined,
|
|
550
|
-
};
|
|
411
|
+
const contents = {};
|
|
551
412
|
const data = parsedOutput.body;
|
|
552
413
|
if (data.Message !== undefined && data.Message !== null) {
|
|
553
414
|
contents.Message = smithy_client_1.expectString(data.Message);
|
|
554
415
|
}
|
|
555
|
-
|
|
416
|
+
const exception = new models_0_1.InternalServerException({
|
|
417
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
418
|
+
...contents,
|
|
419
|
+
});
|
|
420
|
+
return smithy_client_1.decorateServiceException(exception, parsedOutput.body);
|
|
556
421
|
};
|
|
557
422
|
const deserializeAws_restJson1ResourceNotFoundExceptionResponse = async (parsedOutput, context) => {
|
|
558
|
-
const contents = {
|
|
559
|
-
name: "ResourceNotFoundException",
|
|
560
|
-
$fault: "client",
|
|
561
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
562
|
-
Message: undefined,
|
|
563
|
-
};
|
|
423
|
+
const contents = {};
|
|
564
424
|
const data = parsedOutput.body;
|
|
565
425
|
if (data.Message !== undefined && data.Message !== null) {
|
|
566
426
|
contents.Message = smithy_client_1.expectString(data.Message);
|
|
567
427
|
}
|
|
568
|
-
|
|
428
|
+
const exception = new models_0_1.ResourceNotFoundException({
|
|
429
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
430
|
+
...contents,
|
|
431
|
+
});
|
|
432
|
+
return smithy_client_1.decorateServiceException(exception, parsedOutput.body);
|
|
569
433
|
};
|
|
570
434
|
const deserializeAws_restJson1ServiceQuotaExceededExceptionResponse = async (parsedOutput, context) => {
|
|
571
|
-
const contents = {
|
|
572
|
-
name: "ServiceQuotaExceededException",
|
|
573
|
-
$fault: "client",
|
|
574
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
575
|
-
Message: undefined,
|
|
576
|
-
};
|
|
435
|
+
const contents = {};
|
|
577
436
|
const data = parsedOutput.body;
|
|
578
437
|
if (data.Message !== undefined && data.Message !== null) {
|
|
579
438
|
contents.Message = smithy_client_1.expectString(data.Message);
|
|
580
439
|
}
|
|
581
|
-
|
|
440
|
+
const exception = new models_0_1.ServiceQuotaExceededException({
|
|
441
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
442
|
+
...contents,
|
|
443
|
+
});
|
|
444
|
+
return smithy_client_1.decorateServiceException(exception, parsedOutput.body);
|
|
582
445
|
};
|
|
583
446
|
const deserializeAws_restJson1ThrottlingExceptionResponse = async (parsedOutput, context) => {
|
|
584
|
-
const contents = {
|
|
585
|
-
name: "ThrottlingException",
|
|
586
|
-
$fault: "client",
|
|
587
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
588
|
-
Message: undefined,
|
|
589
|
-
};
|
|
447
|
+
const contents = {};
|
|
590
448
|
const data = parsedOutput.body;
|
|
591
449
|
if (data.Message !== undefined && data.Message !== null) {
|
|
592
450
|
contents.Message = smithy_client_1.expectString(data.Message);
|
|
593
451
|
}
|
|
594
|
-
|
|
452
|
+
const exception = new models_0_1.ThrottlingException({
|
|
453
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
454
|
+
...contents,
|
|
455
|
+
});
|
|
456
|
+
return smithy_client_1.decorateServiceException(exception, parsedOutput.body);
|
|
595
457
|
};
|
|
596
458
|
const deserializeAws_restJson1ValidationExceptionResponse = async (parsedOutput, context) => {
|
|
597
|
-
const contents = {
|
|
598
|
-
name: "ValidationException",
|
|
599
|
-
$fault: "client",
|
|
600
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
601
|
-
Message: undefined,
|
|
602
|
-
};
|
|
459
|
+
const contents = {};
|
|
603
460
|
const data = parsedOutput.body;
|
|
604
461
|
if (data.Message !== undefined && data.Message !== null) {
|
|
605
462
|
contents.Message = smithy_client_1.expectString(data.Message);
|
|
606
463
|
}
|
|
607
|
-
|
|
464
|
+
const exception = new models_0_1.ValidationException({
|
|
465
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
466
|
+
...contents,
|
|
467
|
+
});
|
|
468
|
+
return smithy_client_1.decorateServiceException(exception, parsedOutput.body);
|
|
608
469
|
};
|
|
609
470
|
const serializeAws_restJson1ContentClassifiers = (input, context) => {
|
|
610
471
|
return input
|
|
@@ -635,7 +496,7 @@ const deserializeAws_restJson1HumanLoopOutput = (output, context) => {
|
|
|
635
496
|
};
|
|
636
497
|
};
|
|
637
498
|
const deserializeAws_restJson1HumanLoopSummaries = (output, context) => {
|
|
638
|
-
|
|
499
|
+
const retVal = (output || [])
|
|
639
500
|
.filter((e) => e != null)
|
|
640
501
|
.map((entry) => {
|
|
641
502
|
if (entry === null) {
|
|
@@ -643,6 +504,7 @@ const deserializeAws_restJson1HumanLoopSummaries = (output, context) => {
|
|
|
643
504
|
}
|
|
644
505
|
return deserializeAws_restJson1HumanLoopSummary(entry, context);
|
|
645
506
|
});
|
|
507
|
+
return retVal;
|
|
646
508
|
};
|
|
647
509
|
const deserializeAws_restJson1HumanLoopSummary = (output, context) => {
|
|
648
510
|
return {
|
package/dist-es/index.js
CHANGED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { __extends } from "tslib";
|
|
2
|
+
import { ServiceException as __ServiceException, } from "@aws-sdk/smithy-client";
|
|
3
|
+
var SageMakerA2IRuntimeServiceException = (function (_super) {
|
|
4
|
+
__extends(SageMakerA2IRuntimeServiceException, _super);
|
|
5
|
+
function SageMakerA2IRuntimeServiceException(options) {
|
|
6
|
+
var _this = _super.call(this, options) || this;
|
|
7
|
+
Object.setPrototypeOf(_this, SageMakerA2IRuntimeServiceException.prototype);
|
|
8
|
+
return _this;
|
|
9
|
+
}
|
|
10
|
+
return SageMakerA2IRuntimeServiceException;
|
|
11
|
+
}(__ServiceException));
|
|
12
|
+
export { SageMakerA2IRuntimeServiceException };
|