@aws-sdk/client-iot-jobs-data-plane 3.52.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 +11 -0
- package/dist-cjs/index.js +3 -0
- package/dist-cjs/models/IoTJobsDataPlaneServiceException.js +11 -0
- package/dist-cjs/models/models_0.js +94 -1
- package/dist-cjs/protocols/Aws_restJson1.js +84 -223
- package/dist-es/index.js +1 -0
- package/dist-es/models/IoTJobsDataPlaneServiceException.js +12 -0
- package/dist-es/models/models_0.js +87 -1
- package/dist-es/protocols/Aws_restJson1.js +125 -247
- package/dist-types/index.d.ts +1 -0
- package/dist-types/models/IoTJobsDataPlaneServiceException.d.ts +10 -0
- package/dist-types/models/models_0.d.ts +43 -36
- package/dist-types/ts3.4/index.d.ts +1 -0
- package/dist-types/ts3.4/models/IoTJobsDataPlaneServiceException.d.ts +6 -0
- package/dist-types/ts3.4/models/models_0.d.ts +33 -30
- package/package.json +25 -25
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,17 @@
|
|
|
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
|
+
|
|
6
17
|
# [3.52.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.51.0...v3.52.0) (2022-02-18)
|
|
7
18
|
|
|
8
19
|
**Note:** Version bump only for package @aws-sdk/client-iot-jobs-data-plane
|
package/dist-cjs/index.js
CHANGED
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.IoTJobsDataPlaneServiceException = void 0;
|
|
3
4
|
const tslib_1 = require("tslib");
|
|
4
5
|
tslib_1.__exportStar(require("./IoTJobsDataPlane"), exports);
|
|
5
6
|
tslib_1.__exportStar(require("./IoTJobsDataPlaneClient"), exports);
|
|
6
7
|
tslib_1.__exportStar(require("./commands"), exports);
|
|
7
8
|
tslib_1.__exportStar(require("./models"), exports);
|
|
9
|
+
var IoTJobsDataPlaneServiceException_1 = require("./models/IoTJobsDataPlaneServiceException");
|
|
10
|
+
Object.defineProperty(exports, "IoTJobsDataPlaneServiceException", { enumerable: true, get: function () { return IoTJobsDataPlaneServiceException_1.IoTJobsDataPlaneServiceException; } });
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.IoTJobsDataPlaneServiceException = void 0;
|
|
4
|
+
const smithy_client_1 = require("@aws-sdk/smithy-client");
|
|
5
|
+
class IoTJobsDataPlaneServiceException extends smithy_client_1.ServiceException {
|
|
6
|
+
constructor(options) {
|
|
7
|
+
super(options);
|
|
8
|
+
Object.setPrototypeOf(this, IoTJobsDataPlaneServiceException.prototype);
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
exports.IoTJobsDataPlaneServiceException = IoTJobsDataPlaneServiceException;
|
|
@@ -1,6 +1,20 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.UpdateJobExecutionResponse = exports.JobExecutionState = exports.UpdateJobExecutionRequest = exports.StartNextPendingJobExecutionResponse = exports.StartNextPendingJobExecutionRequest = exports.GetPendingJobExecutionsResponse = exports.JobExecutionSummary = exports.GetPendingJobExecutionsRequest = exports.DescribeJobExecutionResponse = exports.JobExecution = exports.JobExecutionStatus = exports.DescribeJobExecutionRequest = void 0;
|
|
3
|
+
exports.UpdateJobExecutionResponse = exports.JobExecutionState = exports.UpdateJobExecutionRequest = exports.StartNextPendingJobExecutionResponse = exports.StartNextPendingJobExecutionRequest = exports.InvalidStateTransitionException = exports.GetPendingJobExecutionsResponse = exports.JobExecutionSummary = exports.GetPendingJobExecutionsRequest = exports.ThrottlingException = exports.TerminalStateException = exports.ServiceUnavailableException = exports.ResourceNotFoundException = exports.InvalidRequestException = exports.DescribeJobExecutionResponse = exports.JobExecution = exports.JobExecutionStatus = exports.DescribeJobExecutionRequest = exports.CertificateValidationException = void 0;
|
|
4
|
+
const IoTJobsDataPlaneServiceException_1 = require("./IoTJobsDataPlaneServiceException");
|
|
5
|
+
class CertificateValidationException extends IoTJobsDataPlaneServiceException_1.IoTJobsDataPlaneServiceException {
|
|
6
|
+
constructor(opts) {
|
|
7
|
+
super({
|
|
8
|
+
name: "CertificateValidationException",
|
|
9
|
+
$fault: "client",
|
|
10
|
+
...opts,
|
|
11
|
+
});
|
|
12
|
+
this.name = "CertificateValidationException";
|
|
13
|
+
this.$fault = "client";
|
|
14
|
+
Object.setPrototypeOf(this, CertificateValidationException.prototype);
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
exports.CertificateValidationException = CertificateValidationException;
|
|
4
18
|
var DescribeJobExecutionRequest;
|
|
5
19
|
(function (DescribeJobExecutionRequest) {
|
|
6
20
|
DescribeJobExecutionRequest.filterSensitiveLog = (obj) => ({
|
|
@@ -30,6 +44,72 @@ var DescribeJobExecutionResponse;
|
|
|
30
44
|
...obj,
|
|
31
45
|
});
|
|
32
46
|
})(DescribeJobExecutionResponse = exports.DescribeJobExecutionResponse || (exports.DescribeJobExecutionResponse = {}));
|
|
47
|
+
class InvalidRequestException extends IoTJobsDataPlaneServiceException_1.IoTJobsDataPlaneServiceException {
|
|
48
|
+
constructor(opts) {
|
|
49
|
+
super({
|
|
50
|
+
name: "InvalidRequestException",
|
|
51
|
+
$fault: "client",
|
|
52
|
+
...opts,
|
|
53
|
+
});
|
|
54
|
+
this.name = "InvalidRequestException";
|
|
55
|
+
this.$fault = "client";
|
|
56
|
+
Object.setPrototypeOf(this, InvalidRequestException.prototype);
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
exports.InvalidRequestException = InvalidRequestException;
|
|
60
|
+
class ResourceNotFoundException extends IoTJobsDataPlaneServiceException_1.IoTJobsDataPlaneServiceException {
|
|
61
|
+
constructor(opts) {
|
|
62
|
+
super({
|
|
63
|
+
name: "ResourceNotFoundException",
|
|
64
|
+
$fault: "client",
|
|
65
|
+
...opts,
|
|
66
|
+
});
|
|
67
|
+
this.name = "ResourceNotFoundException";
|
|
68
|
+
this.$fault = "client";
|
|
69
|
+
Object.setPrototypeOf(this, ResourceNotFoundException.prototype);
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
exports.ResourceNotFoundException = ResourceNotFoundException;
|
|
73
|
+
class ServiceUnavailableException extends IoTJobsDataPlaneServiceException_1.IoTJobsDataPlaneServiceException {
|
|
74
|
+
constructor(opts) {
|
|
75
|
+
super({
|
|
76
|
+
name: "ServiceUnavailableException",
|
|
77
|
+
$fault: "server",
|
|
78
|
+
...opts,
|
|
79
|
+
});
|
|
80
|
+
this.name = "ServiceUnavailableException";
|
|
81
|
+
this.$fault = "server";
|
|
82
|
+
Object.setPrototypeOf(this, ServiceUnavailableException.prototype);
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
exports.ServiceUnavailableException = ServiceUnavailableException;
|
|
86
|
+
class TerminalStateException extends IoTJobsDataPlaneServiceException_1.IoTJobsDataPlaneServiceException {
|
|
87
|
+
constructor(opts) {
|
|
88
|
+
super({
|
|
89
|
+
name: "TerminalStateException",
|
|
90
|
+
$fault: "client",
|
|
91
|
+
...opts,
|
|
92
|
+
});
|
|
93
|
+
this.name = "TerminalStateException";
|
|
94
|
+
this.$fault = "client";
|
|
95
|
+
Object.setPrototypeOf(this, TerminalStateException.prototype);
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
exports.TerminalStateException = TerminalStateException;
|
|
99
|
+
class ThrottlingException extends IoTJobsDataPlaneServiceException_1.IoTJobsDataPlaneServiceException {
|
|
100
|
+
constructor(opts) {
|
|
101
|
+
super({
|
|
102
|
+
name: "ThrottlingException",
|
|
103
|
+
$fault: "client",
|
|
104
|
+
...opts,
|
|
105
|
+
});
|
|
106
|
+
this.name = "ThrottlingException";
|
|
107
|
+
this.$fault = "client";
|
|
108
|
+
Object.setPrototypeOf(this, ThrottlingException.prototype);
|
|
109
|
+
this.payload = opts.payload;
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
exports.ThrottlingException = ThrottlingException;
|
|
33
113
|
var GetPendingJobExecutionsRequest;
|
|
34
114
|
(function (GetPendingJobExecutionsRequest) {
|
|
35
115
|
GetPendingJobExecutionsRequest.filterSensitiveLog = (obj) => ({
|
|
@@ -48,6 +128,19 @@ var GetPendingJobExecutionsResponse;
|
|
|
48
128
|
...obj,
|
|
49
129
|
});
|
|
50
130
|
})(GetPendingJobExecutionsResponse = exports.GetPendingJobExecutionsResponse || (exports.GetPendingJobExecutionsResponse = {}));
|
|
131
|
+
class InvalidStateTransitionException extends IoTJobsDataPlaneServiceException_1.IoTJobsDataPlaneServiceException {
|
|
132
|
+
constructor(opts) {
|
|
133
|
+
super({
|
|
134
|
+
name: "InvalidStateTransitionException",
|
|
135
|
+
$fault: "client",
|
|
136
|
+
...opts,
|
|
137
|
+
});
|
|
138
|
+
this.name = "InvalidStateTransitionException";
|
|
139
|
+
this.$fault = "client";
|
|
140
|
+
Object.setPrototypeOf(this, InvalidStateTransitionException.prototype);
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
exports.InvalidStateTransitionException = InvalidStateTransitionException;
|
|
51
144
|
var StartNextPendingJobExecutionRequest;
|
|
52
145
|
(function (StartNextPendingJobExecutionRequest) {
|
|
53
146
|
StartNextPendingJobExecutionRequest.filterSensitiveLog = (obj) => ({
|
|
@@ -3,6 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.deserializeAws_restJson1UpdateJobExecutionCommand = exports.deserializeAws_restJson1StartNextPendingJobExecutionCommand = exports.deserializeAws_restJson1GetPendingJobExecutionsCommand = exports.deserializeAws_restJson1DescribeJobExecutionCommand = exports.serializeAws_restJson1UpdateJobExecutionCommand = exports.serializeAws_restJson1StartNextPendingJobExecutionCommand = exports.serializeAws_restJson1GetPendingJobExecutionsCommand = exports.serializeAws_restJson1DescribeJobExecutionCommand = 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 IoTJobsDataPlaneServiceException_1 = require("../models/IoTJobsDataPlaneServiceException");
|
|
7
|
+
const models_0_1 = require("../models/models_0");
|
|
6
8
|
const serializeAws_restJson1DescribeJobExecutionCommand = async (input, context) => {
|
|
7
9
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
8
10
|
const headers = {};
|
|
@@ -187,67 +189,31 @@ const deserializeAws_restJson1DescribeJobExecutionCommandError = async (output,
|
|
|
187
189
|
switch (errorCode) {
|
|
188
190
|
case "CertificateValidationException":
|
|
189
191
|
case "com.amazonaws.iotjobsdataplane#CertificateValidationException":
|
|
190
|
-
|
|
191
|
-
...(await deserializeAws_restJson1CertificateValidationExceptionResponse(parsedOutput, context)),
|
|
192
|
-
name: errorCode,
|
|
193
|
-
$metadata: deserializeMetadata(output),
|
|
194
|
-
};
|
|
195
|
-
break;
|
|
192
|
+
throw await deserializeAws_restJson1CertificateValidationExceptionResponse(parsedOutput, context);
|
|
196
193
|
case "InvalidRequestException":
|
|
197
194
|
case "com.amazonaws.iotjobsdataplane#InvalidRequestException":
|
|
198
|
-
|
|
199
|
-
...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)),
|
|
200
|
-
name: errorCode,
|
|
201
|
-
$metadata: deserializeMetadata(output),
|
|
202
|
-
};
|
|
203
|
-
break;
|
|
195
|
+
throw await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context);
|
|
204
196
|
case "ResourceNotFoundException":
|
|
205
197
|
case "com.amazonaws.iotjobsdataplane#ResourceNotFoundException":
|
|
206
|
-
|
|
207
|
-
...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
208
|
-
name: errorCode,
|
|
209
|
-
$metadata: deserializeMetadata(output),
|
|
210
|
-
};
|
|
211
|
-
break;
|
|
198
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
212
199
|
case "ServiceUnavailableException":
|
|
213
200
|
case "com.amazonaws.iotjobsdataplane#ServiceUnavailableException":
|
|
214
|
-
|
|
215
|
-
...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)),
|
|
216
|
-
name: errorCode,
|
|
217
|
-
$metadata: deserializeMetadata(output),
|
|
218
|
-
};
|
|
219
|
-
break;
|
|
201
|
+
throw await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context);
|
|
220
202
|
case "TerminalStateException":
|
|
221
203
|
case "com.amazonaws.iotjobsdataplane#TerminalStateException":
|
|
222
|
-
|
|
223
|
-
...(await deserializeAws_restJson1TerminalStateExceptionResponse(parsedOutput, context)),
|
|
224
|
-
name: errorCode,
|
|
225
|
-
$metadata: deserializeMetadata(output),
|
|
226
|
-
};
|
|
227
|
-
break;
|
|
204
|
+
throw await deserializeAws_restJson1TerminalStateExceptionResponse(parsedOutput, context);
|
|
228
205
|
case "ThrottlingException":
|
|
229
206
|
case "com.amazonaws.iotjobsdataplane#ThrottlingException":
|
|
230
|
-
|
|
231
|
-
...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
|
|
232
|
-
name: errorCode,
|
|
233
|
-
$metadata: deserializeMetadata(output),
|
|
234
|
-
};
|
|
235
|
-
break;
|
|
207
|
+
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
236
208
|
default:
|
|
237
209
|
const parsedBody = parsedOutput.body;
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
...parsedBody,
|
|
241
|
-
name: `${errorCode}`,
|
|
242
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
210
|
+
response = new IoTJobsDataPlaneServiceException_1.IoTJobsDataPlaneServiceException({
|
|
211
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
243
212
|
$fault: "client",
|
|
244
213
|
$metadata: deserializeMetadata(output),
|
|
245
|
-
};
|
|
214
|
+
});
|
|
215
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
246
216
|
}
|
|
247
|
-
const message = response.message || response.Message || errorCode;
|
|
248
|
-
response.message = message;
|
|
249
|
-
delete response.Message;
|
|
250
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
251
217
|
};
|
|
252
218
|
const deserializeAws_restJson1GetPendingJobExecutionsCommand = async (output, context) => {
|
|
253
219
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
@@ -279,59 +245,28 @@ const deserializeAws_restJson1GetPendingJobExecutionsCommandError = async (outpu
|
|
|
279
245
|
switch (errorCode) {
|
|
280
246
|
case "CertificateValidationException":
|
|
281
247
|
case "com.amazonaws.iotjobsdataplane#CertificateValidationException":
|
|
282
|
-
|
|
283
|
-
...(await deserializeAws_restJson1CertificateValidationExceptionResponse(parsedOutput, context)),
|
|
284
|
-
name: errorCode,
|
|
285
|
-
$metadata: deserializeMetadata(output),
|
|
286
|
-
};
|
|
287
|
-
break;
|
|
248
|
+
throw await deserializeAws_restJson1CertificateValidationExceptionResponse(parsedOutput, context);
|
|
288
249
|
case "InvalidRequestException":
|
|
289
250
|
case "com.amazonaws.iotjobsdataplane#InvalidRequestException":
|
|
290
|
-
|
|
291
|
-
...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)),
|
|
292
|
-
name: errorCode,
|
|
293
|
-
$metadata: deserializeMetadata(output),
|
|
294
|
-
};
|
|
295
|
-
break;
|
|
251
|
+
throw await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context);
|
|
296
252
|
case "ResourceNotFoundException":
|
|
297
253
|
case "com.amazonaws.iotjobsdataplane#ResourceNotFoundException":
|
|
298
|
-
|
|
299
|
-
...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
300
|
-
name: errorCode,
|
|
301
|
-
$metadata: deserializeMetadata(output),
|
|
302
|
-
};
|
|
303
|
-
break;
|
|
254
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
304
255
|
case "ServiceUnavailableException":
|
|
305
256
|
case "com.amazonaws.iotjobsdataplane#ServiceUnavailableException":
|
|
306
|
-
|
|
307
|
-
...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)),
|
|
308
|
-
name: errorCode,
|
|
309
|
-
$metadata: deserializeMetadata(output),
|
|
310
|
-
};
|
|
311
|
-
break;
|
|
257
|
+
throw await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context);
|
|
312
258
|
case "ThrottlingException":
|
|
313
259
|
case "com.amazonaws.iotjobsdataplane#ThrottlingException":
|
|
314
|
-
|
|
315
|
-
...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
|
|
316
|
-
name: errorCode,
|
|
317
|
-
$metadata: deserializeMetadata(output),
|
|
318
|
-
};
|
|
319
|
-
break;
|
|
260
|
+
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
320
261
|
default:
|
|
321
262
|
const parsedBody = parsedOutput.body;
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
...parsedBody,
|
|
325
|
-
name: `${errorCode}`,
|
|
326
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
263
|
+
response = new IoTJobsDataPlaneServiceException_1.IoTJobsDataPlaneServiceException({
|
|
264
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
327
265
|
$fault: "client",
|
|
328
266
|
$metadata: deserializeMetadata(output),
|
|
329
|
-
};
|
|
267
|
+
});
|
|
268
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
330
269
|
}
|
|
331
|
-
const message = response.message || response.Message || errorCode;
|
|
332
|
-
response.message = message;
|
|
333
|
-
delete response.Message;
|
|
334
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
335
270
|
};
|
|
336
271
|
const deserializeAws_restJson1StartNextPendingJobExecutionCommand = async (output, context) => {
|
|
337
272
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
@@ -359,59 +294,28 @@ const deserializeAws_restJson1StartNextPendingJobExecutionCommandError = async (
|
|
|
359
294
|
switch (errorCode) {
|
|
360
295
|
case "CertificateValidationException":
|
|
361
296
|
case "com.amazonaws.iotjobsdataplane#CertificateValidationException":
|
|
362
|
-
|
|
363
|
-
...(await deserializeAws_restJson1CertificateValidationExceptionResponse(parsedOutput, context)),
|
|
364
|
-
name: errorCode,
|
|
365
|
-
$metadata: deserializeMetadata(output),
|
|
366
|
-
};
|
|
367
|
-
break;
|
|
297
|
+
throw await deserializeAws_restJson1CertificateValidationExceptionResponse(parsedOutput, context);
|
|
368
298
|
case "InvalidRequestException":
|
|
369
299
|
case "com.amazonaws.iotjobsdataplane#InvalidRequestException":
|
|
370
|
-
|
|
371
|
-
...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)),
|
|
372
|
-
name: errorCode,
|
|
373
|
-
$metadata: deserializeMetadata(output),
|
|
374
|
-
};
|
|
375
|
-
break;
|
|
300
|
+
throw await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context);
|
|
376
301
|
case "ResourceNotFoundException":
|
|
377
302
|
case "com.amazonaws.iotjobsdataplane#ResourceNotFoundException":
|
|
378
|
-
|
|
379
|
-
...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
380
|
-
name: errorCode,
|
|
381
|
-
$metadata: deserializeMetadata(output),
|
|
382
|
-
};
|
|
383
|
-
break;
|
|
303
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
384
304
|
case "ServiceUnavailableException":
|
|
385
305
|
case "com.amazonaws.iotjobsdataplane#ServiceUnavailableException":
|
|
386
|
-
|
|
387
|
-
...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)),
|
|
388
|
-
name: errorCode,
|
|
389
|
-
$metadata: deserializeMetadata(output),
|
|
390
|
-
};
|
|
391
|
-
break;
|
|
306
|
+
throw await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context);
|
|
392
307
|
case "ThrottlingException":
|
|
393
308
|
case "com.amazonaws.iotjobsdataplane#ThrottlingException":
|
|
394
|
-
|
|
395
|
-
...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
|
|
396
|
-
name: errorCode,
|
|
397
|
-
$metadata: deserializeMetadata(output),
|
|
398
|
-
};
|
|
399
|
-
break;
|
|
309
|
+
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
400
310
|
default:
|
|
401
311
|
const parsedBody = parsedOutput.body;
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
...parsedBody,
|
|
405
|
-
name: `${errorCode}`,
|
|
406
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
312
|
+
response = new IoTJobsDataPlaneServiceException_1.IoTJobsDataPlaneServiceException({
|
|
313
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
407
314
|
$fault: "client",
|
|
408
315
|
$metadata: deserializeMetadata(output),
|
|
409
|
-
};
|
|
316
|
+
});
|
|
317
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
410
318
|
}
|
|
411
|
-
const message = response.message || response.Message || errorCode;
|
|
412
|
-
response.message = message;
|
|
413
|
-
delete response.Message;
|
|
414
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
415
319
|
};
|
|
416
320
|
const deserializeAws_restJson1UpdateJobExecutionCommand = async (output, context) => {
|
|
417
321
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
@@ -443,154 +347,106 @@ const deserializeAws_restJson1UpdateJobExecutionCommandError = async (output, co
|
|
|
443
347
|
switch (errorCode) {
|
|
444
348
|
case "CertificateValidationException":
|
|
445
349
|
case "com.amazonaws.iotjobsdataplane#CertificateValidationException":
|
|
446
|
-
|
|
447
|
-
...(await deserializeAws_restJson1CertificateValidationExceptionResponse(parsedOutput, context)),
|
|
448
|
-
name: errorCode,
|
|
449
|
-
$metadata: deserializeMetadata(output),
|
|
450
|
-
};
|
|
451
|
-
break;
|
|
350
|
+
throw await deserializeAws_restJson1CertificateValidationExceptionResponse(parsedOutput, context);
|
|
452
351
|
case "InvalidRequestException":
|
|
453
352
|
case "com.amazonaws.iotjobsdataplane#InvalidRequestException":
|
|
454
|
-
|
|
455
|
-
...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)),
|
|
456
|
-
name: errorCode,
|
|
457
|
-
$metadata: deserializeMetadata(output),
|
|
458
|
-
};
|
|
459
|
-
break;
|
|
353
|
+
throw await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context);
|
|
460
354
|
case "InvalidStateTransitionException":
|
|
461
355
|
case "com.amazonaws.iotjobsdataplane#InvalidStateTransitionException":
|
|
462
|
-
|
|
463
|
-
...(await deserializeAws_restJson1InvalidStateTransitionExceptionResponse(parsedOutput, context)),
|
|
464
|
-
name: errorCode,
|
|
465
|
-
$metadata: deserializeMetadata(output),
|
|
466
|
-
};
|
|
467
|
-
break;
|
|
356
|
+
throw await deserializeAws_restJson1InvalidStateTransitionExceptionResponse(parsedOutput, context);
|
|
468
357
|
case "ResourceNotFoundException":
|
|
469
358
|
case "com.amazonaws.iotjobsdataplane#ResourceNotFoundException":
|
|
470
|
-
|
|
471
|
-
...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
472
|
-
name: errorCode,
|
|
473
|
-
$metadata: deserializeMetadata(output),
|
|
474
|
-
};
|
|
475
|
-
break;
|
|
359
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
476
360
|
case "ServiceUnavailableException":
|
|
477
361
|
case "com.amazonaws.iotjobsdataplane#ServiceUnavailableException":
|
|
478
|
-
|
|
479
|
-
...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)),
|
|
480
|
-
name: errorCode,
|
|
481
|
-
$metadata: deserializeMetadata(output),
|
|
482
|
-
};
|
|
483
|
-
break;
|
|
362
|
+
throw await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context);
|
|
484
363
|
case "ThrottlingException":
|
|
485
364
|
case "com.amazonaws.iotjobsdataplane#ThrottlingException":
|
|
486
|
-
|
|
487
|
-
...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
|
|
488
|
-
name: errorCode,
|
|
489
|
-
$metadata: deserializeMetadata(output),
|
|
490
|
-
};
|
|
491
|
-
break;
|
|
365
|
+
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
492
366
|
default:
|
|
493
367
|
const parsedBody = parsedOutput.body;
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
...parsedBody,
|
|
497
|
-
name: `${errorCode}`,
|
|
498
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
368
|
+
response = new IoTJobsDataPlaneServiceException_1.IoTJobsDataPlaneServiceException({
|
|
369
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
499
370
|
$fault: "client",
|
|
500
371
|
$metadata: deserializeMetadata(output),
|
|
501
|
-
};
|
|
372
|
+
});
|
|
373
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
502
374
|
}
|
|
503
|
-
const message = response.message || response.Message || errorCode;
|
|
504
|
-
response.message = message;
|
|
505
|
-
delete response.Message;
|
|
506
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
507
375
|
};
|
|
508
376
|
const deserializeAws_restJson1CertificateValidationExceptionResponse = async (parsedOutput, context) => {
|
|
509
|
-
const contents = {
|
|
510
|
-
name: "CertificateValidationException",
|
|
511
|
-
$fault: "client",
|
|
512
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
513
|
-
message: undefined,
|
|
514
|
-
};
|
|
377
|
+
const contents = {};
|
|
515
378
|
const data = parsedOutput.body;
|
|
516
379
|
if (data.message !== undefined && data.message !== null) {
|
|
517
380
|
contents.message = smithy_client_1.expectString(data.message);
|
|
518
381
|
}
|
|
519
|
-
|
|
382
|
+
const exception = new models_0_1.CertificateValidationException({
|
|
383
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
384
|
+
...contents,
|
|
385
|
+
});
|
|
386
|
+
return smithy_client_1.decorateServiceException(exception, parsedOutput.body);
|
|
520
387
|
};
|
|
521
388
|
const deserializeAws_restJson1InvalidRequestExceptionResponse = async (parsedOutput, context) => {
|
|
522
|
-
const contents = {
|
|
523
|
-
name: "InvalidRequestException",
|
|
524
|
-
$fault: "client",
|
|
525
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
526
|
-
message: undefined,
|
|
527
|
-
};
|
|
389
|
+
const contents = {};
|
|
528
390
|
const data = parsedOutput.body;
|
|
529
391
|
if (data.message !== undefined && data.message !== null) {
|
|
530
392
|
contents.message = smithy_client_1.expectString(data.message);
|
|
531
393
|
}
|
|
532
|
-
|
|
394
|
+
const exception = new models_0_1.InvalidRequestException({
|
|
395
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
396
|
+
...contents,
|
|
397
|
+
});
|
|
398
|
+
return smithy_client_1.decorateServiceException(exception, parsedOutput.body);
|
|
533
399
|
};
|
|
534
400
|
const deserializeAws_restJson1InvalidStateTransitionExceptionResponse = async (parsedOutput, context) => {
|
|
535
|
-
const contents = {
|
|
536
|
-
name: "InvalidStateTransitionException",
|
|
537
|
-
$fault: "client",
|
|
538
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
539
|
-
message: undefined,
|
|
540
|
-
};
|
|
401
|
+
const contents = {};
|
|
541
402
|
const data = parsedOutput.body;
|
|
542
403
|
if (data.message !== undefined && data.message !== null) {
|
|
543
404
|
contents.message = smithy_client_1.expectString(data.message);
|
|
544
405
|
}
|
|
545
|
-
|
|
406
|
+
const exception = new models_0_1.InvalidStateTransitionException({
|
|
407
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
408
|
+
...contents,
|
|
409
|
+
});
|
|
410
|
+
return smithy_client_1.decorateServiceException(exception, parsedOutput.body);
|
|
546
411
|
};
|
|
547
412
|
const deserializeAws_restJson1ResourceNotFoundExceptionResponse = async (parsedOutput, context) => {
|
|
548
|
-
const contents = {
|
|
549
|
-
name: "ResourceNotFoundException",
|
|
550
|
-
$fault: "client",
|
|
551
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
552
|
-
message: undefined,
|
|
553
|
-
};
|
|
413
|
+
const contents = {};
|
|
554
414
|
const data = parsedOutput.body;
|
|
555
415
|
if (data.message !== undefined && data.message !== null) {
|
|
556
416
|
contents.message = smithy_client_1.expectString(data.message);
|
|
557
417
|
}
|
|
558
|
-
|
|
418
|
+
const exception = new models_0_1.ResourceNotFoundException({
|
|
419
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
420
|
+
...contents,
|
|
421
|
+
});
|
|
422
|
+
return smithy_client_1.decorateServiceException(exception, parsedOutput.body);
|
|
559
423
|
};
|
|
560
424
|
const deserializeAws_restJson1ServiceUnavailableExceptionResponse = async (parsedOutput, context) => {
|
|
561
|
-
const contents = {
|
|
562
|
-
name: "ServiceUnavailableException",
|
|
563
|
-
$fault: "server",
|
|
564
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
565
|
-
message: undefined,
|
|
566
|
-
};
|
|
425
|
+
const contents = {};
|
|
567
426
|
const data = parsedOutput.body;
|
|
568
427
|
if (data.message !== undefined && data.message !== null) {
|
|
569
428
|
contents.message = smithy_client_1.expectString(data.message);
|
|
570
429
|
}
|
|
571
|
-
|
|
430
|
+
const exception = new models_0_1.ServiceUnavailableException({
|
|
431
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
432
|
+
...contents,
|
|
433
|
+
});
|
|
434
|
+
return smithy_client_1.decorateServiceException(exception, parsedOutput.body);
|
|
572
435
|
};
|
|
573
436
|
const deserializeAws_restJson1TerminalStateExceptionResponse = async (parsedOutput, context) => {
|
|
574
|
-
const contents = {
|
|
575
|
-
name: "TerminalStateException",
|
|
576
|
-
$fault: "client",
|
|
577
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
578
|
-
message: undefined,
|
|
579
|
-
};
|
|
437
|
+
const contents = {};
|
|
580
438
|
const data = parsedOutput.body;
|
|
581
439
|
if (data.message !== undefined && data.message !== null) {
|
|
582
440
|
contents.message = smithy_client_1.expectString(data.message);
|
|
583
441
|
}
|
|
584
|
-
|
|
442
|
+
const exception = new models_0_1.TerminalStateException({
|
|
443
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
444
|
+
...contents,
|
|
445
|
+
});
|
|
446
|
+
return smithy_client_1.decorateServiceException(exception, parsedOutput.body);
|
|
585
447
|
};
|
|
586
448
|
const deserializeAws_restJson1ThrottlingExceptionResponse = async (parsedOutput, context) => {
|
|
587
|
-
const contents = {
|
|
588
|
-
name: "ThrottlingException",
|
|
589
|
-
$fault: "client",
|
|
590
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
591
|
-
message: undefined,
|
|
592
|
-
payload: undefined,
|
|
593
|
-
};
|
|
449
|
+
const contents = {};
|
|
594
450
|
const data = parsedOutput.body;
|
|
595
451
|
if (data.message !== undefined && data.message !== null) {
|
|
596
452
|
contents.message = smithy_client_1.expectString(data.message);
|
|
@@ -598,7 +454,11 @@ const deserializeAws_restJson1ThrottlingExceptionResponse = async (parsedOutput,
|
|
|
598
454
|
if (data.payload !== undefined && data.payload !== null) {
|
|
599
455
|
contents.payload = context.base64Decoder(data.payload);
|
|
600
456
|
}
|
|
601
|
-
|
|
457
|
+
const exception = new models_0_1.ThrottlingException({
|
|
458
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
459
|
+
...contents,
|
|
460
|
+
});
|
|
461
|
+
return smithy_client_1.decorateServiceException(exception, parsedOutput.body);
|
|
602
462
|
};
|
|
603
463
|
const serializeAws_restJson1DetailsMap = (input, context) => {
|
|
604
464
|
return Object.entries(input).reduce((acc, [key, value]) => {
|
|
@@ -659,7 +519,7 @@ const deserializeAws_restJson1JobExecutionSummary = (output, context) => {
|
|
|
659
519
|
};
|
|
660
520
|
};
|
|
661
521
|
const deserializeAws_restJson1JobExecutionSummaryList = (output, context) => {
|
|
662
|
-
|
|
522
|
+
const retVal = (output || [])
|
|
663
523
|
.filter((e) => e != null)
|
|
664
524
|
.map((entry) => {
|
|
665
525
|
if (entry === null) {
|
|
@@ -667,6 +527,7 @@ const deserializeAws_restJson1JobExecutionSummaryList = (output, context) => {
|
|
|
667
527
|
}
|
|
668
528
|
return deserializeAws_restJson1JobExecutionSummary(entry, context);
|
|
669
529
|
});
|
|
530
|
+
return retVal;
|
|
670
531
|
};
|
|
671
532
|
const deserializeMetadata = (output) => {
|
|
672
533
|
var _a;
|
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 IoTJobsDataPlaneServiceException = (function (_super) {
|
|
4
|
+
__extends(IoTJobsDataPlaneServiceException, _super);
|
|
5
|
+
function IoTJobsDataPlaneServiceException(options) {
|
|
6
|
+
var _this = _super.call(this, options) || this;
|
|
7
|
+
Object.setPrototypeOf(_this, IoTJobsDataPlaneServiceException.prototype);
|
|
8
|
+
return _this;
|
|
9
|
+
}
|
|
10
|
+
return IoTJobsDataPlaneServiceException;
|
|
11
|
+
}(__ServiceException));
|
|
12
|
+
export { IoTJobsDataPlaneServiceException };
|