@aws-sdk/client-iot-jobs-data-plane 3.312.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.
|
@@ -11,7 +11,7 @@ const se_DescribeJobExecutionCommand = async (input, context) => {
|
|
|
11
11
|
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/things/{thingName}/jobs/{jobId}";
|
|
12
12
|
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "jobId", () => input.jobId, "{jobId}", false);
|
|
13
13
|
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "thingName", () => input.thingName, "{thingName}", false);
|
|
14
|
-
const query = map({
|
|
14
|
+
const query = (0, smithy_client_1.map)({
|
|
15
15
|
includeJobDocument: [() => input.includeJobDocument !== void 0, () => input.includeJobDocument.toString()],
|
|
16
16
|
executionNumber: [() => input.executionNumber !== void 0, () => input.executionNumber.toString()],
|
|
17
17
|
});
|
|
@@ -53,10 +53,10 @@ const se_StartNextPendingJobExecutionCommand = async (input, context) => {
|
|
|
53
53
|
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/things/{thingName}/jobs/$next";
|
|
54
54
|
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "thingName", () => input.thingName, "{thingName}", false);
|
|
55
55
|
let body;
|
|
56
|
-
body = JSON.stringify({
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
});
|
|
56
|
+
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
57
|
+
statusDetails: (_) => (0, smithy_client_1._json)(_),
|
|
58
|
+
stepTimeoutInMinutes: [],
|
|
59
|
+
}));
|
|
60
60
|
return new protocol_http_1.HttpRequest({
|
|
61
61
|
protocol,
|
|
62
62
|
hostname,
|
|
@@ -77,15 +77,15 @@ const se_UpdateJobExecutionCommand = async (input, context) => {
|
|
|
77
77
|
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "jobId", () => input.jobId, "{jobId}", false);
|
|
78
78
|
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "thingName", () => input.thingName, "{thingName}", false);
|
|
79
79
|
let body;
|
|
80
|
-
body = JSON.stringify({
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
});
|
|
80
|
+
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
81
|
+
executionNumber: [],
|
|
82
|
+
expectedVersion: [],
|
|
83
|
+
includeJobDocument: [],
|
|
84
|
+
includeJobExecutionState: [],
|
|
85
|
+
status: [],
|
|
86
|
+
statusDetails: (_) => (0, smithy_client_1._json)(_),
|
|
87
|
+
stepTimeoutInMinutes: [],
|
|
88
|
+
}));
|
|
89
89
|
return new protocol_http_1.HttpRequest({
|
|
90
90
|
protocol,
|
|
91
91
|
hostname,
|
|
@@ -101,13 +101,14 @@ const de_DescribeJobExecutionCommand = async (output, context) => {
|
|
|
101
101
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
102
102
|
return de_DescribeJobExecutionCommandError(output, context);
|
|
103
103
|
}
|
|
104
|
-
const contents = map({
|
|
104
|
+
const contents = (0, smithy_client_1.map)({
|
|
105
105
|
$metadata: deserializeMetadata(output),
|
|
106
106
|
});
|
|
107
107
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
}
|
|
108
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
109
|
+
execution: smithy_client_1._json,
|
|
110
|
+
});
|
|
111
|
+
Object.assign(contents, doc);
|
|
111
112
|
return contents;
|
|
112
113
|
};
|
|
113
114
|
exports.de_DescribeJobExecutionCommand = de_DescribeJobExecutionCommand;
|
|
@@ -138,10 +139,9 @@ const de_DescribeJobExecutionCommandError = async (output, context) => {
|
|
|
138
139
|
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
139
140
|
default:
|
|
140
141
|
const parsedBody = parsedOutput.body;
|
|
141
|
-
|
|
142
|
+
return throwDefaultError({
|
|
142
143
|
output,
|
|
143
144
|
parsedBody,
|
|
144
|
-
exceptionCtor: IoTJobsDataPlaneServiceException_1.IoTJobsDataPlaneServiceException,
|
|
145
145
|
errorCode,
|
|
146
146
|
});
|
|
147
147
|
}
|
|
@@ -150,16 +150,15 @@ const de_GetPendingJobExecutionsCommand = async (output, context) => {
|
|
|
150
150
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
151
151
|
return de_GetPendingJobExecutionsCommandError(output, context);
|
|
152
152
|
}
|
|
153
|
-
const contents = map({
|
|
153
|
+
const contents = (0, smithy_client_1.map)({
|
|
154
154
|
$metadata: deserializeMetadata(output),
|
|
155
155
|
});
|
|
156
156
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
}
|
|
157
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
158
|
+
inProgressJobs: smithy_client_1._json,
|
|
159
|
+
queuedJobs: smithy_client_1._json,
|
|
160
|
+
});
|
|
161
|
+
Object.assign(contents, doc);
|
|
163
162
|
return contents;
|
|
164
163
|
};
|
|
165
164
|
exports.de_GetPendingJobExecutionsCommand = de_GetPendingJobExecutionsCommand;
|
|
@@ -187,10 +186,9 @@ const de_GetPendingJobExecutionsCommandError = async (output, context) => {
|
|
|
187
186
|
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
188
187
|
default:
|
|
189
188
|
const parsedBody = parsedOutput.body;
|
|
190
|
-
|
|
189
|
+
return throwDefaultError({
|
|
191
190
|
output,
|
|
192
191
|
parsedBody,
|
|
193
|
-
exceptionCtor: IoTJobsDataPlaneServiceException_1.IoTJobsDataPlaneServiceException,
|
|
194
192
|
errorCode,
|
|
195
193
|
});
|
|
196
194
|
}
|
|
@@ -199,13 +197,14 @@ const de_StartNextPendingJobExecutionCommand = async (output, context) => {
|
|
|
199
197
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
200
198
|
return de_StartNextPendingJobExecutionCommandError(output, context);
|
|
201
199
|
}
|
|
202
|
-
const contents = map({
|
|
200
|
+
const contents = (0, smithy_client_1.map)({
|
|
203
201
|
$metadata: deserializeMetadata(output),
|
|
204
202
|
});
|
|
205
203
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
}
|
|
204
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
205
|
+
execution: smithy_client_1._json,
|
|
206
|
+
});
|
|
207
|
+
Object.assign(contents, doc);
|
|
209
208
|
return contents;
|
|
210
209
|
};
|
|
211
210
|
exports.de_StartNextPendingJobExecutionCommand = de_StartNextPendingJobExecutionCommand;
|
|
@@ -233,10 +232,9 @@ const de_StartNextPendingJobExecutionCommandError = async (output, context) => {
|
|
|
233
232
|
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
234
233
|
default:
|
|
235
234
|
const parsedBody = parsedOutput.body;
|
|
236
|
-
|
|
235
|
+
return throwDefaultError({
|
|
237
236
|
output,
|
|
238
237
|
parsedBody,
|
|
239
|
-
exceptionCtor: IoTJobsDataPlaneServiceException_1.IoTJobsDataPlaneServiceException,
|
|
240
238
|
errorCode,
|
|
241
239
|
});
|
|
242
240
|
}
|
|
@@ -245,16 +243,15 @@ const de_UpdateJobExecutionCommand = async (output, context) => {
|
|
|
245
243
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
246
244
|
return de_UpdateJobExecutionCommandError(output, context);
|
|
247
245
|
}
|
|
248
|
-
const contents = map({
|
|
246
|
+
const contents = (0, smithy_client_1.map)({
|
|
249
247
|
$metadata: deserializeMetadata(output),
|
|
250
248
|
});
|
|
251
249
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
}
|
|
250
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
251
|
+
executionState: smithy_client_1._json,
|
|
252
|
+
jobDocument: smithy_client_1.expectString,
|
|
253
|
+
});
|
|
254
|
+
Object.assign(contents, doc);
|
|
258
255
|
return contents;
|
|
259
256
|
};
|
|
260
257
|
exports.de_UpdateJobExecutionCommand = de_UpdateJobExecutionCommand;
|
|
@@ -285,21 +282,21 @@ const de_UpdateJobExecutionCommandError = async (output, context) => {
|
|
|
285
282
|
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
286
283
|
default:
|
|
287
284
|
const parsedBody = parsedOutput.body;
|
|
288
|
-
|
|
285
|
+
return throwDefaultError({
|
|
289
286
|
output,
|
|
290
287
|
parsedBody,
|
|
291
|
-
exceptionCtor: IoTJobsDataPlaneServiceException_1.IoTJobsDataPlaneServiceException,
|
|
292
288
|
errorCode,
|
|
293
289
|
});
|
|
294
290
|
}
|
|
295
291
|
};
|
|
296
|
-
const
|
|
292
|
+
const throwDefaultError = (0, smithy_client_1.withBaseException)(IoTJobsDataPlaneServiceException_1.IoTJobsDataPlaneServiceException);
|
|
297
293
|
const de_CertificateValidationExceptionRes = async (parsedOutput, context) => {
|
|
298
|
-
const contents = map({});
|
|
294
|
+
const contents = (0, smithy_client_1.map)({});
|
|
299
295
|
const data = parsedOutput.body;
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
}
|
|
296
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
297
|
+
message: smithy_client_1.expectString,
|
|
298
|
+
});
|
|
299
|
+
Object.assign(contents, doc);
|
|
303
300
|
const exception = new models_0_1.CertificateValidationException({
|
|
304
301
|
$metadata: deserializeMetadata(parsedOutput),
|
|
305
302
|
...contents,
|
|
@@ -307,11 +304,12 @@ const de_CertificateValidationExceptionRes = async (parsedOutput, context) => {
|
|
|
307
304
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
308
305
|
};
|
|
309
306
|
const de_InvalidRequestExceptionRes = async (parsedOutput, context) => {
|
|
310
|
-
const contents = map({});
|
|
307
|
+
const contents = (0, smithy_client_1.map)({});
|
|
311
308
|
const data = parsedOutput.body;
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
}
|
|
309
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
310
|
+
message: smithy_client_1.expectString,
|
|
311
|
+
});
|
|
312
|
+
Object.assign(contents, doc);
|
|
315
313
|
const exception = new models_0_1.InvalidRequestException({
|
|
316
314
|
$metadata: deserializeMetadata(parsedOutput),
|
|
317
315
|
...contents,
|
|
@@ -319,11 +317,12 @@ const de_InvalidRequestExceptionRes = async (parsedOutput, context) => {
|
|
|
319
317
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
320
318
|
};
|
|
321
319
|
const de_InvalidStateTransitionExceptionRes = async (parsedOutput, context) => {
|
|
322
|
-
const contents = map({});
|
|
320
|
+
const contents = (0, smithy_client_1.map)({});
|
|
323
321
|
const data = parsedOutput.body;
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
}
|
|
322
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
323
|
+
message: smithy_client_1.expectString,
|
|
324
|
+
});
|
|
325
|
+
Object.assign(contents, doc);
|
|
327
326
|
const exception = new models_0_1.InvalidStateTransitionException({
|
|
328
327
|
$metadata: deserializeMetadata(parsedOutput),
|
|
329
328
|
...contents,
|
|
@@ -331,11 +330,12 @@ const de_InvalidStateTransitionExceptionRes = async (parsedOutput, context) => {
|
|
|
331
330
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
332
331
|
};
|
|
333
332
|
const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
|
|
334
|
-
const contents = map({});
|
|
333
|
+
const contents = (0, smithy_client_1.map)({});
|
|
335
334
|
const data = parsedOutput.body;
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
}
|
|
335
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
336
|
+
message: smithy_client_1.expectString,
|
|
337
|
+
});
|
|
338
|
+
Object.assign(contents, doc);
|
|
339
339
|
const exception = new models_0_1.ResourceNotFoundException({
|
|
340
340
|
$metadata: deserializeMetadata(parsedOutput),
|
|
341
341
|
...contents,
|
|
@@ -343,11 +343,12 @@ const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
|
|
|
343
343
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
344
344
|
};
|
|
345
345
|
const de_ServiceUnavailableExceptionRes = async (parsedOutput, context) => {
|
|
346
|
-
const contents = map({});
|
|
346
|
+
const contents = (0, smithy_client_1.map)({});
|
|
347
347
|
const data = parsedOutput.body;
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
}
|
|
348
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
349
|
+
message: smithy_client_1.expectString,
|
|
350
|
+
});
|
|
351
|
+
Object.assign(contents, doc);
|
|
351
352
|
const exception = new models_0_1.ServiceUnavailableException({
|
|
352
353
|
$metadata: deserializeMetadata(parsedOutput),
|
|
353
354
|
...contents,
|
|
@@ -355,11 +356,12 @@ const de_ServiceUnavailableExceptionRes = async (parsedOutput, context) => {
|
|
|
355
356
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
356
357
|
};
|
|
357
358
|
const de_TerminalStateExceptionRes = async (parsedOutput, context) => {
|
|
358
|
-
const contents = map({});
|
|
359
|
+
const contents = (0, smithy_client_1.map)({});
|
|
359
360
|
const data = parsedOutput.body;
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
}
|
|
361
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
362
|
+
message: smithy_client_1.expectString,
|
|
363
|
+
});
|
|
364
|
+
Object.assign(contents, doc);
|
|
363
365
|
const exception = new models_0_1.TerminalStateException({
|
|
364
366
|
$metadata: deserializeMetadata(parsedOutput),
|
|
365
367
|
...contents,
|
|
@@ -367,81 +369,19 @@ const de_TerminalStateExceptionRes = async (parsedOutput, context) => {
|
|
|
367
369
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
368
370
|
};
|
|
369
371
|
const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
|
|
370
|
-
const contents = map({});
|
|
372
|
+
const contents = (0, smithy_client_1.map)({});
|
|
371
373
|
const data = parsedOutput.body;
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
}
|
|
374
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
375
|
+
message: smithy_client_1.expectString,
|
|
376
|
+
payload: context.base64Decoder,
|
|
377
|
+
});
|
|
378
|
+
Object.assign(contents, doc);
|
|
378
379
|
const exception = new models_0_1.ThrottlingException({
|
|
379
380
|
$metadata: deserializeMetadata(parsedOutput),
|
|
380
381
|
...contents,
|
|
381
382
|
});
|
|
382
383
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
383
384
|
};
|
|
384
|
-
const se_DetailsMap = (input, context) => {
|
|
385
|
-
return Object.entries(input).reduce((acc, [key, value]) => {
|
|
386
|
-
if (value === null) {
|
|
387
|
-
return acc;
|
|
388
|
-
}
|
|
389
|
-
acc[key] = value;
|
|
390
|
-
return acc;
|
|
391
|
-
}, {});
|
|
392
|
-
};
|
|
393
|
-
const de_DetailsMap = (output, context) => {
|
|
394
|
-
return Object.entries(output).reduce((acc, [key, value]) => {
|
|
395
|
-
if (value === null) {
|
|
396
|
-
return acc;
|
|
397
|
-
}
|
|
398
|
-
acc[key] = (0, smithy_client_1.expectString)(value);
|
|
399
|
-
return acc;
|
|
400
|
-
}, {});
|
|
401
|
-
};
|
|
402
|
-
const de_JobExecution = (output, context) => {
|
|
403
|
-
return {
|
|
404
|
-
approximateSecondsBeforeTimedOut: (0, smithy_client_1.expectLong)(output.approximateSecondsBeforeTimedOut),
|
|
405
|
-
executionNumber: (0, smithy_client_1.expectLong)(output.executionNumber),
|
|
406
|
-
jobDocument: (0, smithy_client_1.expectString)(output.jobDocument),
|
|
407
|
-
jobId: (0, smithy_client_1.expectString)(output.jobId),
|
|
408
|
-
lastUpdatedAt: (0, smithy_client_1.expectLong)(output.lastUpdatedAt),
|
|
409
|
-
queuedAt: (0, smithy_client_1.expectLong)(output.queuedAt),
|
|
410
|
-
startedAt: (0, smithy_client_1.expectLong)(output.startedAt),
|
|
411
|
-
status: (0, smithy_client_1.expectString)(output.status),
|
|
412
|
-
statusDetails: output.statusDetails != null ? de_DetailsMap(output.statusDetails, context) : undefined,
|
|
413
|
-
thingName: (0, smithy_client_1.expectString)(output.thingName),
|
|
414
|
-
versionNumber: (0, smithy_client_1.expectLong)(output.versionNumber),
|
|
415
|
-
};
|
|
416
|
-
};
|
|
417
|
-
const de_JobExecutionState = (output, context) => {
|
|
418
|
-
return {
|
|
419
|
-
status: (0, smithy_client_1.expectString)(output.status),
|
|
420
|
-
statusDetails: output.statusDetails != null ? de_DetailsMap(output.statusDetails, context) : undefined,
|
|
421
|
-
versionNumber: (0, smithy_client_1.expectLong)(output.versionNumber),
|
|
422
|
-
};
|
|
423
|
-
};
|
|
424
|
-
const de_JobExecutionSummary = (output, context) => {
|
|
425
|
-
return {
|
|
426
|
-
executionNumber: (0, smithy_client_1.expectLong)(output.executionNumber),
|
|
427
|
-
jobId: (0, smithy_client_1.expectString)(output.jobId),
|
|
428
|
-
lastUpdatedAt: (0, smithy_client_1.expectLong)(output.lastUpdatedAt),
|
|
429
|
-
queuedAt: (0, smithy_client_1.expectLong)(output.queuedAt),
|
|
430
|
-
startedAt: (0, smithy_client_1.expectLong)(output.startedAt),
|
|
431
|
-
versionNumber: (0, smithy_client_1.expectLong)(output.versionNumber),
|
|
432
|
-
};
|
|
433
|
-
};
|
|
434
|
-
const de_JobExecutionSummaryList = (output, context) => {
|
|
435
|
-
const retVal = (output || [])
|
|
436
|
-
.filter((e) => e != null)
|
|
437
|
-
.map((entry) => {
|
|
438
|
-
if (entry === null) {
|
|
439
|
-
return null;
|
|
440
|
-
}
|
|
441
|
-
return de_JobExecutionSummary(entry, context);
|
|
442
|
-
});
|
|
443
|
-
return retVal;
|
|
444
|
-
};
|
|
445
385
|
const deserializeMetadata = (output) => ({
|
|
446
386
|
httpStatusCode: output.statusCode,
|
|
447
387
|
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { HttpRequest as __HttpRequest } from "@aws-sdk/protocol-http";
|
|
2
|
-
import { decorateServiceException as __decorateServiceException,
|
|
2
|
+
import { _json, decorateServiceException as __decorateServiceException, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, map, resolvedPath as __resolvedPath, take, withBaseException, } from "@aws-sdk/smithy-client";
|
|
3
3
|
import { IoTJobsDataPlaneServiceException as __BaseException } from "../models/IoTJobsDataPlaneServiceException";
|
|
4
4
|
import { CertificateValidationException, InvalidRequestException, InvalidStateTransitionException, ResourceNotFoundException, ServiceUnavailableException, TerminalStateException, ThrottlingException, } from "../models/models_0";
|
|
5
5
|
export const se_DescribeJobExecutionCommand = async (input, context) => {
|
|
@@ -48,10 +48,10 @@ export const se_StartNextPendingJobExecutionCommand = async (input, context) =>
|
|
|
48
48
|
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/things/{thingName}/jobs/$next";
|
|
49
49
|
resolvedPath = __resolvedPath(resolvedPath, input, "thingName", () => input.thingName, "{thingName}", false);
|
|
50
50
|
let body;
|
|
51
|
-
body = JSON.stringify({
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
});
|
|
51
|
+
body = JSON.stringify(take(input, {
|
|
52
|
+
statusDetails: (_) => _json(_),
|
|
53
|
+
stepTimeoutInMinutes: [],
|
|
54
|
+
}));
|
|
55
55
|
return new __HttpRequest({
|
|
56
56
|
protocol,
|
|
57
57
|
hostname,
|
|
@@ -71,15 +71,15 @@ export const se_UpdateJobExecutionCommand = async (input, context) => {
|
|
|
71
71
|
resolvedPath = __resolvedPath(resolvedPath, input, "jobId", () => input.jobId, "{jobId}", false);
|
|
72
72
|
resolvedPath = __resolvedPath(resolvedPath, input, "thingName", () => input.thingName, "{thingName}", false);
|
|
73
73
|
let body;
|
|
74
|
-
body = JSON.stringify({
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
});
|
|
74
|
+
body = JSON.stringify(take(input, {
|
|
75
|
+
executionNumber: [],
|
|
76
|
+
expectedVersion: [],
|
|
77
|
+
includeJobDocument: [],
|
|
78
|
+
includeJobExecutionState: [],
|
|
79
|
+
status: [],
|
|
80
|
+
statusDetails: (_) => _json(_),
|
|
81
|
+
stepTimeoutInMinutes: [],
|
|
82
|
+
}));
|
|
83
83
|
return new __HttpRequest({
|
|
84
84
|
protocol,
|
|
85
85
|
hostname,
|
|
@@ -98,9 +98,10 @@ export const de_DescribeJobExecutionCommand = async (output, context) => {
|
|
|
98
98
|
$metadata: deserializeMetadata(output),
|
|
99
99
|
});
|
|
100
100
|
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
}
|
|
101
|
+
const doc = take(data, {
|
|
102
|
+
execution: _json,
|
|
103
|
+
});
|
|
104
|
+
Object.assign(contents, doc);
|
|
104
105
|
return contents;
|
|
105
106
|
};
|
|
106
107
|
const de_DescribeJobExecutionCommandError = async (output, context) => {
|
|
@@ -130,10 +131,9 @@ const de_DescribeJobExecutionCommandError = async (output, context) => {
|
|
|
130
131
|
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
131
132
|
default:
|
|
132
133
|
const parsedBody = parsedOutput.body;
|
|
133
|
-
throwDefaultError({
|
|
134
|
+
return throwDefaultError({
|
|
134
135
|
output,
|
|
135
136
|
parsedBody,
|
|
136
|
-
exceptionCtor: __BaseException,
|
|
137
137
|
errorCode,
|
|
138
138
|
});
|
|
139
139
|
}
|
|
@@ -146,12 +146,11 @@ export const de_GetPendingJobExecutionsCommand = async (output, context) => {
|
|
|
146
146
|
$metadata: deserializeMetadata(output),
|
|
147
147
|
});
|
|
148
148
|
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
}
|
|
149
|
+
const doc = take(data, {
|
|
150
|
+
inProgressJobs: _json,
|
|
151
|
+
queuedJobs: _json,
|
|
152
|
+
});
|
|
153
|
+
Object.assign(contents, doc);
|
|
155
154
|
return contents;
|
|
156
155
|
};
|
|
157
156
|
const de_GetPendingJobExecutionsCommandError = async (output, context) => {
|
|
@@ -178,10 +177,9 @@ const de_GetPendingJobExecutionsCommandError = async (output, context) => {
|
|
|
178
177
|
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
179
178
|
default:
|
|
180
179
|
const parsedBody = parsedOutput.body;
|
|
181
|
-
throwDefaultError({
|
|
180
|
+
return throwDefaultError({
|
|
182
181
|
output,
|
|
183
182
|
parsedBody,
|
|
184
|
-
exceptionCtor: __BaseException,
|
|
185
183
|
errorCode,
|
|
186
184
|
});
|
|
187
185
|
}
|
|
@@ -194,9 +192,10 @@ export const de_StartNextPendingJobExecutionCommand = async (output, context) =>
|
|
|
194
192
|
$metadata: deserializeMetadata(output),
|
|
195
193
|
});
|
|
196
194
|
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
}
|
|
195
|
+
const doc = take(data, {
|
|
196
|
+
execution: _json,
|
|
197
|
+
});
|
|
198
|
+
Object.assign(contents, doc);
|
|
200
199
|
return contents;
|
|
201
200
|
};
|
|
202
201
|
const de_StartNextPendingJobExecutionCommandError = async (output, context) => {
|
|
@@ -223,10 +222,9 @@ const de_StartNextPendingJobExecutionCommandError = async (output, context) => {
|
|
|
223
222
|
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
224
223
|
default:
|
|
225
224
|
const parsedBody = parsedOutput.body;
|
|
226
|
-
throwDefaultError({
|
|
225
|
+
return throwDefaultError({
|
|
227
226
|
output,
|
|
228
227
|
parsedBody,
|
|
229
|
-
exceptionCtor: __BaseException,
|
|
230
228
|
errorCode,
|
|
231
229
|
});
|
|
232
230
|
}
|
|
@@ -239,12 +237,11 @@ export const de_UpdateJobExecutionCommand = async (output, context) => {
|
|
|
239
237
|
$metadata: deserializeMetadata(output),
|
|
240
238
|
});
|
|
241
239
|
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
}
|
|
240
|
+
const doc = take(data, {
|
|
241
|
+
executionState: _json,
|
|
242
|
+
jobDocument: __expectString,
|
|
243
|
+
});
|
|
244
|
+
Object.assign(contents, doc);
|
|
248
245
|
return contents;
|
|
249
246
|
};
|
|
250
247
|
const de_UpdateJobExecutionCommandError = async (output, context) => {
|
|
@@ -274,21 +271,21 @@ const de_UpdateJobExecutionCommandError = async (output, context) => {
|
|
|
274
271
|
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
275
272
|
default:
|
|
276
273
|
const parsedBody = parsedOutput.body;
|
|
277
|
-
throwDefaultError({
|
|
274
|
+
return throwDefaultError({
|
|
278
275
|
output,
|
|
279
276
|
parsedBody,
|
|
280
|
-
exceptionCtor: __BaseException,
|
|
281
277
|
errorCode,
|
|
282
278
|
});
|
|
283
279
|
}
|
|
284
280
|
};
|
|
285
|
-
const
|
|
281
|
+
const throwDefaultError = withBaseException(__BaseException);
|
|
286
282
|
const de_CertificateValidationExceptionRes = async (parsedOutput, context) => {
|
|
287
283
|
const contents = map({});
|
|
288
284
|
const data = parsedOutput.body;
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
}
|
|
285
|
+
const doc = take(data, {
|
|
286
|
+
message: __expectString,
|
|
287
|
+
});
|
|
288
|
+
Object.assign(contents, doc);
|
|
292
289
|
const exception = new CertificateValidationException({
|
|
293
290
|
$metadata: deserializeMetadata(parsedOutput),
|
|
294
291
|
...contents,
|
|
@@ -298,9 +295,10 @@ const de_CertificateValidationExceptionRes = async (parsedOutput, context) => {
|
|
|
298
295
|
const de_InvalidRequestExceptionRes = async (parsedOutput, context) => {
|
|
299
296
|
const contents = map({});
|
|
300
297
|
const data = parsedOutput.body;
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
}
|
|
298
|
+
const doc = take(data, {
|
|
299
|
+
message: __expectString,
|
|
300
|
+
});
|
|
301
|
+
Object.assign(contents, doc);
|
|
304
302
|
const exception = new InvalidRequestException({
|
|
305
303
|
$metadata: deserializeMetadata(parsedOutput),
|
|
306
304
|
...contents,
|
|
@@ -310,9 +308,10 @@ const de_InvalidRequestExceptionRes = async (parsedOutput, context) => {
|
|
|
310
308
|
const de_InvalidStateTransitionExceptionRes = async (parsedOutput, context) => {
|
|
311
309
|
const contents = map({});
|
|
312
310
|
const data = parsedOutput.body;
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
}
|
|
311
|
+
const doc = take(data, {
|
|
312
|
+
message: __expectString,
|
|
313
|
+
});
|
|
314
|
+
Object.assign(contents, doc);
|
|
316
315
|
const exception = new InvalidStateTransitionException({
|
|
317
316
|
$metadata: deserializeMetadata(parsedOutput),
|
|
318
317
|
...contents,
|
|
@@ -322,9 +321,10 @@ const de_InvalidStateTransitionExceptionRes = async (parsedOutput, context) => {
|
|
|
322
321
|
const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
|
|
323
322
|
const contents = map({});
|
|
324
323
|
const data = parsedOutput.body;
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
}
|
|
324
|
+
const doc = take(data, {
|
|
325
|
+
message: __expectString,
|
|
326
|
+
});
|
|
327
|
+
Object.assign(contents, doc);
|
|
328
328
|
const exception = new ResourceNotFoundException({
|
|
329
329
|
$metadata: deserializeMetadata(parsedOutput),
|
|
330
330
|
...contents,
|
|
@@ -334,9 +334,10 @@ const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
|
|
|
334
334
|
const de_ServiceUnavailableExceptionRes = async (parsedOutput, context) => {
|
|
335
335
|
const contents = map({});
|
|
336
336
|
const data = parsedOutput.body;
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
}
|
|
337
|
+
const doc = take(data, {
|
|
338
|
+
message: __expectString,
|
|
339
|
+
});
|
|
340
|
+
Object.assign(contents, doc);
|
|
340
341
|
const exception = new ServiceUnavailableException({
|
|
341
342
|
$metadata: deserializeMetadata(parsedOutput),
|
|
342
343
|
...contents,
|
|
@@ -346,9 +347,10 @@ const de_ServiceUnavailableExceptionRes = async (parsedOutput, context) => {
|
|
|
346
347
|
const de_TerminalStateExceptionRes = async (parsedOutput, context) => {
|
|
347
348
|
const contents = map({});
|
|
348
349
|
const data = parsedOutput.body;
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
}
|
|
350
|
+
const doc = take(data, {
|
|
351
|
+
message: __expectString,
|
|
352
|
+
});
|
|
353
|
+
Object.assign(contents, doc);
|
|
352
354
|
const exception = new TerminalStateException({
|
|
353
355
|
$metadata: deserializeMetadata(parsedOutput),
|
|
354
356
|
...contents,
|
|
@@ -358,79 +360,17 @@ const de_TerminalStateExceptionRes = async (parsedOutput, context) => {
|
|
|
358
360
|
const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
|
|
359
361
|
const contents = map({});
|
|
360
362
|
const data = parsedOutput.body;
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
}
|
|
363
|
+
const doc = take(data, {
|
|
364
|
+
message: __expectString,
|
|
365
|
+
payload: context.base64Decoder,
|
|
366
|
+
});
|
|
367
|
+
Object.assign(contents, doc);
|
|
367
368
|
const exception = new ThrottlingException({
|
|
368
369
|
$metadata: deserializeMetadata(parsedOutput),
|
|
369
370
|
...contents,
|
|
370
371
|
});
|
|
371
372
|
return __decorateServiceException(exception, parsedOutput.body);
|
|
372
373
|
};
|
|
373
|
-
const se_DetailsMap = (input, context) => {
|
|
374
|
-
return Object.entries(input).reduce((acc, [key, value]) => {
|
|
375
|
-
if (value === null) {
|
|
376
|
-
return acc;
|
|
377
|
-
}
|
|
378
|
-
acc[key] = value;
|
|
379
|
-
return acc;
|
|
380
|
-
}, {});
|
|
381
|
-
};
|
|
382
|
-
const de_DetailsMap = (output, context) => {
|
|
383
|
-
return Object.entries(output).reduce((acc, [key, value]) => {
|
|
384
|
-
if (value === null) {
|
|
385
|
-
return acc;
|
|
386
|
-
}
|
|
387
|
-
acc[key] = __expectString(value);
|
|
388
|
-
return acc;
|
|
389
|
-
}, {});
|
|
390
|
-
};
|
|
391
|
-
const de_JobExecution = (output, context) => {
|
|
392
|
-
return {
|
|
393
|
-
approximateSecondsBeforeTimedOut: __expectLong(output.approximateSecondsBeforeTimedOut),
|
|
394
|
-
executionNumber: __expectLong(output.executionNumber),
|
|
395
|
-
jobDocument: __expectString(output.jobDocument),
|
|
396
|
-
jobId: __expectString(output.jobId),
|
|
397
|
-
lastUpdatedAt: __expectLong(output.lastUpdatedAt),
|
|
398
|
-
queuedAt: __expectLong(output.queuedAt),
|
|
399
|
-
startedAt: __expectLong(output.startedAt),
|
|
400
|
-
status: __expectString(output.status),
|
|
401
|
-
statusDetails: output.statusDetails != null ? de_DetailsMap(output.statusDetails, context) : undefined,
|
|
402
|
-
thingName: __expectString(output.thingName),
|
|
403
|
-
versionNumber: __expectLong(output.versionNumber),
|
|
404
|
-
};
|
|
405
|
-
};
|
|
406
|
-
const de_JobExecutionState = (output, context) => {
|
|
407
|
-
return {
|
|
408
|
-
status: __expectString(output.status),
|
|
409
|
-
statusDetails: output.statusDetails != null ? de_DetailsMap(output.statusDetails, context) : undefined,
|
|
410
|
-
versionNumber: __expectLong(output.versionNumber),
|
|
411
|
-
};
|
|
412
|
-
};
|
|
413
|
-
const de_JobExecutionSummary = (output, context) => {
|
|
414
|
-
return {
|
|
415
|
-
executionNumber: __expectLong(output.executionNumber),
|
|
416
|
-
jobId: __expectString(output.jobId),
|
|
417
|
-
lastUpdatedAt: __expectLong(output.lastUpdatedAt),
|
|
418
|
-
queuedAt: __expectLong(output.queuedAt),
|
|
419
|
-
startedAt: __expectLong(output.startedAt),
|
|
420
|
-
versionNumber: __expectLong(output.versionNumber),
|
|
421
|
-
};
|
|
422
|
-
};
|
|
423
|
-
const de_JobExecutionSummaryList = (output, context) => {
|
|
424
|
-
const retVal = (output || [])
|
|
425
|
-
.filter((e) => e != null)
|
|
426
|
-
.map((entry) => {
|
|
427
|
-
if (entry === null) {
|
|
428
|
-
return null;
|
|
429
|
-
}
|
|
430
|
-
return de_JobExecutionSummary(entry, context);
|
|
431
|
-
});
|
|
432
|
-
return retVal;
|
|
433
|
-
};
|
|
434
374
|
const deserializeMetadata = (output) => ({
|
|
435
375
|
httpStatusCode: output.statusCode,
|
|
436
376
|
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/client-iot-jobs-data-plane",
|
|
3
3
|
"description": "AWS SDK for JavaScript Iot Jobs Data Plane 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",
|