@aws-sdk/client-iot-jobs-data-plane 3.131.0 → 3.142.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 +33 -0
- package/README.md +1 -1
- package/dist-cjs/commands/DescribeJobExecutionCommand.js +2 -2
- package/dist-cjs/commands/GetPendingJobExecutionsCommand.js +2 -2
- package/dist-cjs/commands/StartNextPendingJobExecutionCommand.js +2 -2
- package/dist-cjs/commands/UpdateJobExecutionCommand.js +2 -2
- package/dist-cjs/models/models_0.js +45 -67
- package/dist-cjs/protocols/Aws_restJson1.js +64 -135
- package/dist-es/commands/DescribeJobExecutionCommand.js +3 -3
- package/dist-es/commands/GetPendingJobExecutionsCommand.js +3 -3
- package/dist-es/commands/StartNextPendingJobExecutionCommand.js +3 -3
- package/dist-es/commands/UpdateJobExecutionCommand.js +3 -3
- package/dist-es/models/models_0.js +11 -44
- package/dist-es/protocols/Aws_restJson1.js +81 -137
- package/dist-types/models/models_0.d.ts +44 -66
- package/dist-types/ts3.4/models/models_0.d.ts +22 -44
- package/package.json +6 -6
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,39 @@
|
|
|
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.142.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.141.0...v3.142.0) (2022-08-02)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* **codegen:** general data mapping function ([#3830](https://github.com/aws/aws-sdk-js-v3/issues/3830)) ([9417eae](https://github.com/aws/aws-sdk-js-v3/commit/9417eae722806799fb4c15c07921574268c1165c))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
# [3.141.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.140.0...v3.141.0) (2022-08-01)
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
### Features
|
|
21
|
+
|
|
22
|
+
* **clients:** update client endpoints as of 2022-08-01 ([aaf49f2](https://github.com/aws/aws-sdk-js-v3/commit/aaf49f21b371412e6ea7e00890b71a7b31991b66))
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
# [3.137.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.136.1...v3.137.0) (2022-07-26)
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
### Features
|
|
32
|
+
|
|
33
|
+
* **namespaces:** remove namespaces with only a log filter ([#3823](https://github.com/aws/aws-sdk-js-v3/issues/3823)) ([33e6822](https://github.com/aws/aws-sdk-js-v3/commit/33e68228fb64c53dd8f89e6be76dd5f46edc3cfd))
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
|
|
6
39
|
# [3.131.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.130.0...v3.131.0) (2022-07-15)
|
|
7
40
|
|
|
8
41
|
**Note:** Version bump only for package @aws-sdk/client-iot-jobs-data-plane
|
package/README.md
CHANGED
|
@@ -175,7 +175,7 @@ try {
|
|
|
175
175
|
const data = await client.send(command);
|
|
176
176
|
// process data.
|
|
177
177
|
} catch (error) {
|
|
178
|
-
const { requestId, cfId, extendedRequestId } = error
|
|
178
|
+
const { requestId, cfId, extendedRequestId } = error.$$metadata;
|
|
179
179
|
console.log({ requestId, cfId, extendedRequestId });
|
|
180
180
|
/**
|
|
181
181
|
* The keys within exceptions are also parsed.
|
|
@@ -20,8 +20,8 @@ class DescribeJobExecutionCommand extends smithy_client_1.Command {
|
|
|
20
20
|
logger,
|
|
21
21
|
clientName,
|
|
22
22
|
commandName,
|
|
23
|
-
inputFilterSensitiveLog: models_0_1.
|
|
24
|
-
outputFilterSensitiveLog: models_0_1.
|
|
23
|
+
inputFilterSensitiveLog: models_0_1.DescribeJobExecutionRequestFilterSensitiveLog,
|
|
24
|
+
outputFilterSensitiveLog: models_0_1.DescribeJobExecutionResponseFilterSensitiveLog,
|
|
25
25
|
};
|
|
26
26
|
const { requestHandler } = configuration;
|
|
27
27
|
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
|
|
@@ -20,8 +20,8 @@ class GetPendingJobExecutionsCommand extends smithy_client_1.Command {
|
|
|
20
20
|
logger,
|
|
21
21
|
clientName,
|
|
22
22
|
commandName,
|
|
23
|
-
inputFilterSensitiveLog: models_0_1.
|
|
24
|
-
outputFilterSensitiveLog: models_0_1.
|
|
23
|
+
inputFilterSensitiveLog: models_0_1.GetPendingJobExecutionsRequestFilterSensitiveLog,
|
|
24
|
+
outputFilterSensitiveLog: models_0_1.GetPendingJobExecutionsResponseFilterSensitiveLog,
|
|
25
25
|
};
|
|
26
26
|
const { requestHandler } = configuration;
|
|
27
27
|
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
|
|
@@ -20,8 +20,8 @@ class StartNextPendingJobExecutionCommand extends smithy_client_1.Command {
|
|
|
20
20
|
logger,
|
|
21
21
|
clientName,
|
|
22
22
|
commandName,
|
|
23
|
-
inputFilterSensitiveLog: models_0_1.
|
|
24
|
-
outputFilterSensitiveLog: models_0_1.
|
|
23
|
+
inputFilterSensitiveLog: models_0_1.StartNextPendingJobExecutionRequestFilterSensitiveLog,
|
|
24
|
+
outputFilterSensitiveLog: models_0_1.StartNextPendingJobExecutionResponseFilterSensitiveLog,
|
|
25
25
|
};
|
|
26
26
|
const { requestHandler } = configuration;
|
|
27
27
|
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
|
|
@@ -20,8 +20,8 @@ class UpdateJobExecutionCommand extends smithy_client_1.Command {
|
|
|
20
20
|
logger,
|
|
21
21
|
clientName,
|
|
22
22
|
commandName,
|
|
23
|
-
inputFilterSensitiveLog: models_0_1.
|
|
24
|
-
outputFilterSensitiveLog: models_0_1.
|
|
23
|
+
inputFilterSensitiveLog: models_0_1.UpdateJobExecutionRequestFilterSensitiveLog,
|
|
24
|
+
outputFilterSensitiveLog: models_0_1.UpdateJobExecutionResponseFilterSensitiveLog,
|
|
25
25
|
};
|
|
26
26
|
const { requestHandler } = configuration;
|
|
27
27
|
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.UpdateJobExecutionResponseFilterSensitiveLog = exports.JobExecutionStateFilterSensitiveLog = exports.UpdateJobExecutionRequestFilterSensitiveLog = exports.StartNextPendingJobExecutionResponseFilterSensitiveLog = exports.StartNextPendingJobExecutionRequestFilterSensitiveLog = exports.GetPendingJobExecutionsResponseFilterSensitiveLog = exports.JobExecutionSummaryFilterSensitiveLog = exports.GetPendingJobExecutionsRequestFilterSensitiveLog = exports.DescribeJobExecutionResponseFilterSensitiveLog = exports.JobExecutionFilterSensitiveLog = exports.DescribeJobExecutionRequestFilterSensitiveLog = exports.InvalidStateTransitionException = exports.ThrottlingException = exports.TerminalStateException = exports.ServiceUnavailableException = exports.ResourceNotFoundException = exports.InvalidRequestException = exports.JobExecutionStatus = exports.CertificateValidationException = void 0;
|
|
4
4
|
const IoTJobsDataPlaneServiceException_1 = require("./IoTJobsDataPlaneServiceException");
|
|
5
5
|
class CertificateValidationException extends IoTJobsDataPlaneServiceException_1.IoTJobsDataPlaneServiceException {
|
|
6
6
|
constructor(opts) {
|
|
@@ -15,12 +15,6 @@ class CertificateValidationException extends IoTJobsDataPlaneServiceException_1.
|
|
|
15
15
|
}
|
|
16
16
|
}
|
|
17
17
|
exports.CertificateValidationException = CertificateValidationException;
|
|
18
|
-
var DescribeJobExecutionRequest;
|
|
19
|
-
(function (DescribeJobExecutionRequest) {
|
|
20
|
-
DescribeJobExecutionRequest.filterSensitiveLog = (obj) => ({
|
|
21
|
-
...obj,
|
|
22
|
-
});
|
|
23
|
-
})(DescribeJobExecutionRequest = exports.DescribeJobExecutionRequest || (exports.DescribeJobExecutionRequest = {}));
|
|
24
18
|
var JobExecutionStatus;
|
|
25
19
|
(function (JobExecutionStatus) {
|
|
26
20
|
JobExecutionStatus["CANCELED"] = "CANCELED";
|
|
@@ -32,18 +26,6 @@ var JobExecutionStatus;
|
|
|
32
26
|
JobExecutionStatus["SUCCEEDED"] = "SUCCEEDED";
|
|
33
27
|
JobExecutionStatus["TIMED_OUT"] = "TIMED_OUT";
|
|
34
28
|
})(JobExecutionStatus = exports.JobExecutionStatus || (exports.JobExecutionStatus = {}));
|
|
35
|
-
var JobExecution;
|
|
36
|
-
(function (JobExecution) {
|
|
37
|
-
JobExecution.filterSensitiveLog = (obj) => ({
|
|
38
|
-
...obj,
|
|
39
|
-
});
|
|
40
|
-
})(JobExecution = exports.JobExecution || (exports.JobExecution = {}));
|
|
41
|
-
var DescribeJobExecutionResponse;
|
|
42
|
-
(function (DescribeJobExecutionResponse) {
|
|
43
|
-
DescribeJobExecutionResponse.filterSensitiveLog = (obj) => ({
|
|
44
|
-
...obj,
|
|
45
|
-
});
|
|
46
|
-
})(DescribeJobExecutionResponse = exports.DescribeJobExecutionResponse || (exports.DescribeJobExecutionResponse = {}));
|
|
47
29
|
class InvalidRequestException extends IoTJobsDataPlaneServiceException_1.IoTJobsDataPlaneServiceException {
|
|
48
30
|
constructor(opts) {
|
|
49
31
|
super({
|
|
@@ -110,24 +92,6 @@ class ThrottlingException extends IoTJobsDataPlaneServiceException_1.IoTJobsData
|
|
|
110
92
|
}
|
|
111
93
|
}
|
|
112
94
|
exports.ThrottlingException = ThrottlingException;
|
|
113
|
-
var GetPendingJobExecutionsRequest;
|
|
114
|
-
(function (GetPendingJobExecutionsRequest) {
|
|
115
|
-
GetPendingJobExecutionsRequest.filterSensitiveLog = (obj) => ({
|
|
116
|
-
...obj,
|
|
117
|
-
});
|
|
118
|
-
})(GetPendingJobExecutionsRequest = exports.GetPendingJobExecutionsRequest || (exports.GetPendingJobExecutionsRequest = {}));
|
|
119
|
-
var JobExecutionSummary;
|
|
120
|
-
(function (JobExecutionSummary) {
|
|
121
|
-
JobExecutionSummary.filterSensitiveLog = (obj) => ({
|
|
122
|
-
...obj,
|
|
123
|
-
});
|
|
124
|
-
})(JobExecutionSummary = exports.JobExecutionSummary || (exports.JobExecutionSummary = {}));
|
|
125
|
-
var GetPendingJobExecutionsResponse;
|
|
126
|
-
(function (GetPendingJobExecutionsResponse) {
|
|
127
|
-
GetPendingJobExecutionsResponse.filterSensitiveLog = (obj) => ({
|
|
128
|
-
...obj,
|
|
129
|
-
});
|
|
130
|
-
})(GetPendingJobExecutionsResponse = exports.GetPendingJobExecutionsResponse || (exports.GetPendingJobExecutionsResponse = {}));
|
|
131
95
|
class InvalidStateTransitionException extends IoTJobsDataPlaneServiceException_1.IoTJobsDataPlaneServiceException {
|
|
132
96
|
constructor(opts) {
|
|
133
97
|
super({
|
|
@@ -141,33 +105,47 @@ class InvalidStateTransitionException extends IoTJobsDataPlaneServiceException_1
|
|
|
141
105
|
}
|
|
142
106
|
}
|
|
143
107
|
exports.InvalidStateTransitionException = InvalidStateTransitionException;
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
108
|
+
const DescribeJobExecutionRequestFilterSensitiveLog = (obj) => ({
|
|
109
|
+
...obj,
|
|
110
|
+
});
|
|
111
|
+
exports.DescribeJobExecutionRequestFilterSensitiveLog = DescribeJobExecutionRequestFilterSensitiveLog;
|
|
112
|
+
const JobExecutionFilterSensitiveLog = (obj) => ({
|
|
113
|
+
...obj,
|
|
114
|
+
});
|
|
115
|
+
exports.JobExecutionFilterSensitiveLog = JobExecutionFilterSensitiveLog;
|
|
116
|
+
const DescribeJobExecutionResponseFilterSensitiveLog = (obj) => ({
|
|
117
|
+
...obj,
|
|
118
|
+
});
|
|
119
|
+
exports.DescribeJobExecutionResponseFilterSensitiveLog = DescribeJobExecutionResponseFilterSensitiveLog;
|
|
120
|
+
const GetPendingJobExecutionsRequestFilterSensitiveLog = (obj) => ({
|
|
121
|
+
...obj,
|
|
122
|
+
});
|
|
123
|
+
exports.GetPendingJobExecutionsRequestFilterSensitiveLog = GetPendingJobExecutionsRequestFilterSensitiveLog;
|
|
124
|
+
const JobExecutionSummaryFilterSensitiveLog = (obj) => ({
|
|
125
|
+
...obj,
|
|
126
|
+
});
|
|
127
|
+
exports.JobExecutionSummaryFilterSensitiveLog = JobExecutionSummaryFilterSensitiveLog;
|
|
128
|
+
const GetPendingJobExecutionsResponseFilterSensitiveLog = (obj) => ({
|
|
129
|
+
...obj,
|
|
130
|
+
});
|
|
131
|
+
exports.GetPendingJobExecutionsResponseFilterSensitiveLog = GetPendingJobExecutionsResponseFilterSensitiveLog;
|
|
132
|
+
const StartNextPendingJobExecutionRequestFilterSensitiveLog = (obj) => ({
|
|
133
|
+
...obj,
|
|
134
|
+
});
|
|
135
|
+
exports.StartNextPendingJobExecutionRequestFilterSensitiveLog = StartNextPendingJobExecutionRequestFilterSensitiveLog;
|
|
136
|
+
const StartNextPendingJobExecutionResponseFilterSensitiveLog = (obj) => ({
|
|
137
|
+
...obj,
|
|
138
|
+
});
|
|
139
|
+
exports.StartNextPendingJobExecutionResponseFilterSensitiveLog = StartNextPendingJobExecutionResponseFilterSensitiveLog;
|
|
140
|
+
const UpdateJobExecutionRequestFilterSensitiveLog = (obj) => ({
|
|
141
|
+
...obj,
|
|
142
|
+
});
|
|
143
|
+
exports.UpdateJobExecutionRequestFilterSensitiveLog = UpdateJobExecutionRequestFilterSensitiveLog;
|
|
144
|
+
const JobExecutionStateFilterSensitiveLog = (obj) => ({
|
|
145
|
+
...obj,
|
|
146
|
+
});
|
|
147
|
+
exports.JobExecutionStateFilterSensitiveLog = JobExecutionStateFilterSensitiveLog;
|
|
148
|
+
const UpdateJobExecutionResponseFilterSensitiveLog = (obj) => ({
|
|
149
|
+
...obj,
|
|
150
|
+
});
|
|
151
|
+
exports.UpdateJobExecutionResponseFilterSensitiveLog = UpdateJobExecutionResponseFilterSensitiveLog;
|
|
@@ -9,30 +9,12 @@ const serializeAws_restJson1DescribeJobExecutionCommand = async (input, context)
|
|
|
9
9
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
10
10
|
const headers = {};
|
|
11
11
|
let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/things/{thingName}/jobs/{jobId}";
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
}
|
|
19
|
-
else {
|
|
20
|
-
throw new Error("No value provided for input HTTP label: jobId.");
|
|
21
|
-
}
|
|
22
|
-
if (input.thingName !== undefined) {
|
|
23
|
-
const labelValue = input.thingName;
|
|
24
|
-
if (labelValue.length <= 0) {
|
|
25
|
-
throw new Error("Empty value provided for input HTTP label: thingName.");
|
|
26
|
-
}
|
|
27
|
-
resolvedPath = resolvedPath.replace("{thingName}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
|
|
28
|
-
}
|
|
29
|
-
else {
|
|
30
|
-
throw new Error("No value provided for input HTTP label: thingName.");
|
|
31
|
-
}
|
|
32
|
-
const query = {
|
|
33
|
-
...(input.includeJobDocument !== undefined && { includeJobDocument: input.includeJobDocument.toString() }),
|
|
34
|
-
...(input.executionNumber !== undefined && { executionNumber: input.executionNumber.toString() }),
|
|
35
|
-
};
|
|
12
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "jobId", () => input.jobId, "{jobId}", false);
|
|
13
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "thingName", () => input.thingName, "{thingName}", false);
|
|
14
|
+
const query = map({
|
|
15
|
+
includeJobDocument: [() => input.includeJobDocument !== void 0, () => input.includeJobDocument.toString()],
|
|
16
|
+
executionNumber: [() => input.executionNumber !== void 0, () => input.executionNumber.toString()],
|
|
17
|
+
});
|
|
36
18
|
let body;
|
|
37
19
|
return new protocol_http_1.HttpRequest({
|
|
38
20
|
protocol,
|
|
@@ -50,16 +32,7 @@ const serializeAws_restJson1GetPendingJobExecutionsCommand = async (input, conte
|
|
|
50
32
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
51
33
|
const headers = {};
|
|
52
34
|
let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/things/{thingName}/jobs";
|
|
53
|
-
|
|
54
|
-
const labelValue = input.thingName;
|
|
55
|
-
if (labelValue.length <= 0) {
|
|
56
|
-
throw new Error("Empty value provided for input HTTP label: thingName.");
|
|
57
|
-
}
|
|
58
|
-
resolvedPath = resolvedPath.replace("{thingName}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
|
|
59
|
-
}
|
|
60
|
-
else {
|
|
61
|
-
throw new Error("No value provided for input HTTP label: thingName.");
|
|
62
|
-
}
|
|
35
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "thingName", () => input.thingName, "{thingName}", false);
|
|
63
36
|
let body;
|
|
64
37
|
return new protocol_http_1.HttpRequest({
|
|
65
38
|
protocol,
|
|
@@ -78,16 +51,7 @@ const serializeAws_restJson1StartNextPendingJobExecutionCommand = async (input,
|
|
|
78
51
|
"content-type": "application/json",
|
|
79
52
|
};
|
|
80
53
|
let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/things/{thingName}/jobs/$next";
|
|
81
|
-
|
|
82
|
-
const labelValue = input.thingName;
|
|
83
|
-
if (labelValue.length <= 0) {
|
|
84
|
-
throw new Error("Empty value provided for input HTTP label: thingName.");
|
|
85
|
-
}
|
|
86
|
-
resolvedPath = resolvedPath.replace("{thingName}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
|
|
87
|
-
}
|
|
88
|
-
else {
|
|
89
|
-
throw new Error("No value provided for input HTTP label: thingName.");
|
|
90
|
-
}
|
|
54
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "thingName", () => input.thingName, "{thingName}", false);
|
|
91
55
|
let body;
|
|
92
56
|
body = JSON.stringify({
|
|
93
57
|
...(input.statusDetails != null && {
|
|
@@ -112,26 +76,8 @@ const serializeAws_restJson1UpdateJobExecutionCommand = async (input, context) =
|
|
|
112
76
|
"content-type": "application/json",
|
|
113
77
|
};
|
|
114
78
|
let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/things/{thingName}/jobs/{jobId}";
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
if (labelValue.length <= 0) {
|
|
118
|
-
throw new Error("Empty value provided for input HTTP label: jobId.");
|
|
119
|
-
}
|
|
120
|
-
resolvedPath = resolvedPath.replace("{jobId}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
|
|
121
|
-
}
|
|
122
|
-
else {
|
|
123
|
-
throw new Error("No value provided for input HTTP label: jobId.");
|
|
124
|
-
}
|
|
125
|
-
if (input.thingName !== undefined) {
|
|
126
|
-
const labelValue = input.thingName;
|
|
127
|
-
if (labelValue.length <= 0) {
|
|
128
|
-
throw new Error("Empty value provided for input HTTP label: thingName.");
|
|
129
|
-
}
|
|
130
|
-
resolvedPath = resolvedPath.replace("{thingName}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
|
|
131
|
-
}
|
|
132
|
-
else {
|
|
133
|
-
throw new Error("No value provided for input HTTP label: thingName.");
|
|
134
|
-
}
|
|
79
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "jobId", () => input.jobId, "{jobId}", false);
|
|
80
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "thingName", () => input.thingName, "{thingName}", false);
|
|
135
81
|
let body;
|
|
136
82
|
body = JSON.stringify({
|
|
137
83
|
...(input.executionNumber != null && { executionNumber: input.executionNumber }),
|
|
@@ -159,15 +105,14 @@ const deserializeAws_restJson1DescribeJobExecutionCommand = async (output, conte
|
|
|
159
105
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
160
106
|
return deserializeAws_restJson1DescribeJobExecutionCommandError(output, context);
|
|
161
107
|
}
|
|
162
|
-
const contents = {
|
|
108
|
+
const contents = map({
|
|
163
109
|
$metadata: deserializeMetadata(output),
|
|
164
|
-
|
|
165
|
-
};
|
|
110
|
+
});
|
|
166
111
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
167
|
-
if (data.execution
|
|
112
|
+
if (data.execution != null) {
|
|
168
113
|
contents.execution = deserializeAws_restJson1JobExecution(data.execution, context);
|
|
169
114
|
}
|
|
170
|
-
return
|
|
115
|
+
return contents;
|
|
171
116
|
};
|
|
172
117
|
exports.deserializeAws_restJson1DescribeJobExecutionCommand = deserializeAws_restJson1DescribeJobExecutionCommand;
|
|
173
118
|
const deserializeAws_restJson1DescribeJobExecutionCommandError = async (output, context) => {
|
|
@@ -175,7 +120,6 @@ const deserializeAws_restJson1DescribeJobExecutionCommandError = async (output,
|
|
|
175
120
|
...output,
|
|
176
121
|
body: await parseBody(output.body, context),
|
|
177
122
|
};
|
|
178
|
-
let response;
|
|
179
123
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
180
124
|
switch (errorCode) {
|
|
181
125
|
case "CertificateValidationException":
|
|
@@ -198,33 +142,29 @@ const deserializeAws_restJson1DescribeJobExecutionCommandError = async (output,
|
|
|
198
142
|
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
199
143
|
default:
|
|
200
144
|
const parsedBody = parsedOutput.body;
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
$metadata,
|
|
145
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
146
|
+
output,
|
|
147
|
+
parsedBody,
|
|
148
|
+
exceptionCtor: IoTJobsDataPlaneServiceException_1.IoTJobsDataPlaneServiceException,
|
|
149
|
+
errorCode,
|
|
207
150
|
});
|
|
208
|
-
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
209
151
|
}
|
|
210
152
|
};
|
|
211
153
|
const deserializeAws_restJson1GetPendingJobExecutionsCommand = async (output, context) => {
|
|
212
154
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
213
155
|
return deserializeAws_restJson1GetPendingJobExecutionsCommandError(output, context);
|
|
214
156
|
}
|
|
215
|
-
const contents = {
|
|
157
|
+
const contents = map({
|
|
216
158
|
$metadata: deserializeMetadata(output),
|
|
217
|
-
|
|
218
|
-
queuedJobs: undefined,
|
|
219
|
-
};
|
|
159
|
+
});
|
|
220
160
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
221
|
-
if (data.inProgressJobs
|
|
161
|
+
if (data.inProgressJobs != null) {
|
|
222
162
|
contents.inProgressJobs = deserializeAws_restJson1JobExecutionSummaryList(data.inProgressJobs, context);
|
|
223
163
|
}
|
|
224
|
-
if (data.queuedJobs
|
|
164
|
+
if (data.queuedJobs != null) {
|
|
225
165
|
contents.queuedJobs = deserializeAws_restJson1JobExecutionSummaryList(data.queuedJobs, context);
|
|
226
166
|
}
|
|
227
|
-
return
|
|
167
|
+
return contents;
|
|
228
168
|
};
|
|
229
169
|
exports.deserializeAws_restJson1GetPendingJobExecutionsCommand = deserializeAws_restJson1GetPendingJobExecutionsCommand;
|
|
230
170
|
const deserializeAws_restJson1GetPendingJobExecutionsCommandError = async (output, context) => {
|
|
@@ -232,7 +172,6 @@ const deserializeAws_restJson1GetPendingJobExecutionsCommandError = async (outpu
|
|
|
232
172
|
...output,
|
|
233
173
|
body: await parseBody(output.body, context),
|
|
234
174
|
};
|
|
235
|
-
let response;
|
|
236
175
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
237
176
|
switch (errorCode) {
|
|
238
177
|
case "CertificateValidationException":
|
|
@@ -252,29 +191,26 @@ const deserializeAws_restJson1GetPendingJobExecutionsCommandError = async (outpu
|
|
|
252
191
|
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
253
192
|
default:
|
|
254
193
|
const parsedBody = parsedOutput.body;
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
$metadata,
|
|
194
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
195
|
+
output,
|
|
196
|
+
parsedBody,
|
|
197
|
+
exceptionCtor: IoTJobsDataPlaneServiceException_1.IoTJobsDataPlaneServiceException,
|
|
198
|
+
errorCode,
|
|
261
199
|
});
|
|
262
|
-
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
263
200
|
}
|
|
264
201
|
};
|
|
265
202
|
const deserializeAws_restJson1StartNextPendingJobExecutionCommand = async (output, context) => {
|
|
266
203
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
267
204
|
return deserializeAws_restJson1StartNextPendingJobExecutionCommandError(output, context);
|
|
268
205
|
}
|
|
269
|
-
const contents = {
|
|
206
|
+
const contents = map({
|
|
270
207
|
$metadata: deserializeMetadata(output),
|
|
271
|
-
|
|
272
|
-
};
|
|
208
|
+
});
|
|
273
209
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
274
|
-
if (data.execution
|
|
210
|
+
if (data.execution != null) {
|
|
275
211
|
contents.execution = deserializeAws_restJson1JobExecution(data.execution, context);
|
|
276
212
|
}
|
|
277
|
-
return
|
|
213
|
+
return contents;
|
|
278
214
|
};
|
|
279
215
|
exports.deserializeAws_restJson1StartNextPendingJobExecutionCommand = deserializeAws_restJson1StartNextPendingJobExecutionCommand;
|
|
280
216
|
const deserializeAws_restJson1StartNextPendingJobExecutionCommandError = async (output, context) => {
|
|
@@ -282,7 +218,6 @@ const deserializeAws_restJson1StartNextPendingJobExecutionCommandError = async (
|
|
|
282
218
|
...output,
|
|
283
219
|
body: await parseBody(output.body, context),
|
|
284
220
|
};
|
|
285
|
-
let response;
|
|
286
221
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
287
222
|
switch (errorCode) {
|
|
288
223
|
case "CertificateValidationException":
|
|
@@ -302,33 +237,29 @@ const deserializeAws_restJson1StartNextPendingJobExecutionCommandError = async (
|
|
|
302
237
|
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
303
238
|
default:
|
|
304
239
|
const parsedBody = parsedOutput.body;
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
$metadata,
|
|
240
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
241
|
+
output,
|
|
242
|
+
parsedBody,
|
|
243
|
+
exceptionCtor: IoTJobsDataPlaneServiceException_1.IoTJobsDataPlaneServiceException,
|
|
244
|
+
errorCode,
|
|
311
245
|
});
|
|
312
|
-
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
313
246
|
}
|
|
314
247
|
};
|
|
315
248
|
const deserializeAws_restJson1UpdateJobExecutionCommand = async (output, context) => {
|
|
316
249
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
317
250
|
return deserializeAws_restJson1UpdateJobExecutionCommandError(output, context);
|
|
318
251
|
}
|
|
319
|
-
const contents = {
|
|
252
|
+
const contents = map({
|
|
320
253
|
$metadata: deserializeMetadata(output),
|
|
321
|
-
|
|
322
|
-
jobDocument: undefined,
|
|
323
|
-
};
|
|
254
|
+
});
|
|
324
255
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
325
|
-
if (data.executionState
|
|
256
|
+
if (data.executionState != null) {
|
|
326
257
|
contents.executionState = deserializeAws_restJson1JobExecutionState(data.executionState, context);
|
|
327
258
|
}
|
|
328
|
-
if (data.jobDocument
|
|
259
|
+
if (data.jobDocument != null) {
|
|
329
260
|
contents.jobDocument = (0, smithy_client_1.expectString)(data.jobDocument);
|
|
330
261
|
}
|
|
331
|
-
return
|
|
262
|
+
return contents;
|
|
332
263
|
};
|
|
333
264
|
exports.deserializeAws_restJson1UpdateJobExecutionCommand = deserializeAws_restJson1UpdateJobExecutionCommand;
|
|
334
265
|
const deserializeAws_restJson1UpdateJobExecutionCommandError = async (output, context) => {
|
|
@@ -336,7 +267,6 @@ const deserializeAws_restJson1UpdateJobExecutionCommandError = async (output, co
|
|
|
336
267
|
...output,
|
|
337
268
|
body: await parseBody(output.body, context),
|
|
338
269
|
};
|
|
339
|
-
let response;
|
|
340
270
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
341
271
|
switch (errorCode) {
|
|
342
272
|
case "CertificateValidationException":
|
|
@@ -359,20 +289,19 @@ const deserializeAws_restJson1UpdateJobExecutionCommandError = async (output, co
|
|
|
359
289
|
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
360
290
|
default:
|
|
361
291
|
const parsedBody = parsedOutput.body;
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
$metadata,
|
|
292
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
293
|
+
output,
|
|
294
|
+
parsedBody,
|
|
295
|
+
exceptionCtor: IoTJobsDataPlaneServiceException_1.IoTJobsDataPlaneServiceException,
|
|
296
|
+
errorCode,
|
|
368
297
|
});
|
|
369
|
-
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
370
298
|
}
|
|
371
299
|
};
|
|
300
|
+
const map = smithy_client_1.map;
|
|
372
301
|
const deserializeAws_restJson1CertificateValidationExceptionResponse = async (parsedOutput, context) => {
|
|
373
|
-
const contents = {};
|
|
302
|
+
const contents = map({});
|
|
374
303
|
const data = parsedOutput.body;
|
|
375
|
-
if (data.message
|
|
304
|
+
if (data.message != null) {
|
|
376
305
|
contents.message = (0, smithy_client_1.expectString)(data.message);
|
|
377
306
|
}
|
|
378
307
|
const exception = new models_0_1.CertificateValidationException({
|
|
@@ -382,9 +311,9 @@ const deserializeAws_restJson1CertificateValidationExceptionResponse = async (pa
|
|
|
382
311
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
383
312
|
};
|
|
384
313
|
const deserializeAws_restJson1InvalidRequestExceptionResponse = async (parsedOutput, context) => {
|
|
385
|
-
const contents = {};
|
|
314
|
+
const contents = map({});
|
|
386
315
|
const data = parsedOutput.body;
|
|
387
|
-
if (data.message
|
|
316
|
+
if (data.message != null) {
|
|
388
317
|
contents.message = (0, smithy_client_1.expectString)(data.message);
|
|
389
318
|
}
|
|
390
319
|
const exception = new models_0_1.InvalidRequestException({
|
|
@@ -394,9 +323,9 @@ const deserializeAws_restJson1InvalidRequestExceptionResponse = async (parsedOut
|
|
|
394
323
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
395
324
|
};
|
|
396
325
|
const deserializeAws_restJson1InvalidStateTransitionExceptionResponse = async (parsedOutput, context) => {
|
|
397
|
-
const contents = {};
|
|
326
|
+
const contents = map({});
|
|
398
327
|
const data = parsedOutput.body;
|
|
399
|
-
if (data.message
|
|
328
|
+
if (data.message != null) {
|
|
400
329
|
contents.message = (0, smithy_client_1.expectString)(data.message);
|
|
401
330
|
}
|
|
402
331
|
const exception = new models_0_1.InvalidStateTransitionException({
|
|
@@ -406,9 +335,9 @@ const deserializeAws_restJson1InvalidStateTransitionExceptionResponse = async (p
|
|
|
406
335
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
407
336
|
};
|
|
408
337
|
const deserializeAws_restJson1ResourceNotFoundExceptionResponse = async (parsedOutput, context) => {
|
|
409
|
-
const contents = {};
|
|
338
|
+
const contents = map({});
|
|
410
339
|
const data = parsedOutput.body;
|
|
411
|
-
if (data.message
|
|
340
|
+
if (data.message != null) {
|
|
412
341
|
contents.message = (0, smithy_client_1.expectString)(data.message);
|
|
413
342
|
}
|
|
414
343
|
const exception = new models_0_1.ResourceNotFoundException({
|
|
@@ -418,9 +347,9 @@ const deserializeAws_restJson1ResourceNotFoundExceptionResponse = async (parsedO
|
|
|
418
347
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
419
348
|
};
|
|
420
349
|
const deserializeAws_restJson1ServiceUnavailableExceptionResponse = async (parsedOutput, context) => {
|
|
421
|
-
const contents = {};
|
|
350
|
+
const contents = map({});
|
|
422
351
|
const data = parsedOutput.body;
|
|
423
|
-
if (data.message
|
|
352
|
+
if (data.message != null) {
|
|
424
353
|
contents.message = (0, smithy_client_1.expectString)(data.message);
|
|
425
354
|
}
|
|
426
355
|
const exception = new models_0_1.ServiceUnavailableException({
|
|
@@ -430,9 +359,9 @@ const deserializeAws_restJson1ServiceUnavailableExceptionResponse = async (parse
|
|
|
430
359
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
431
360
|
};
|
|
432
361
|
const deserializeAws_restJson1TerminalStateExceptionResponse = async (parsedOutput, context) => {
|
|
433
|
-
const contents = {};
|
|
362
|
+
const contents = map({});
|
|
434
363
|
const data = parsedOutput.body;
|
|
435
|
-
if (data.message
|
|
364
|
+
if (data.message != null) {
|
|
436
365
|
contents.message = (0, smithy_client_1.expectString)(data.message);
|
|
437
366
|
}
|
|
438
367
|
const exception = new models_0_1.TerminalStateException({
|
|
@@ -442,12 +371,12 @@ const deserializeAws_restJson1TerminalStateExceptionResponse = async (parsedOutp
|
|
|
442
371
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
443
372
|
};
|
|
444
373
|
const deserializeAws_restJson1ThrottlingExceptionResponse = async (parsedOutput, context) => {
|
|
445
|
-
const contents = {};
|
|
374
|
+
const contents = map({});
|
|
446
375
|
const data = parsedOutput.body;
|
|
447
|
-
if (data.message
|
|
376
|
+
if (data.message != null) {
|
|
448
377
|
contents.message = (0, smithy_client_1.expectString)(data.message);
|
|
449
378
|
}
|
|
450
|
-
if (data.payload
|
|
379
|
+
if (data.payload != null) {
|
|
451
380
|
contents.payload = context.base64Decoder(data.payload);
|
|
452
381
|
}
|
|
453
382
|
const exception = new models_0_1.ThrottlingException({
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { __extends } from "tslib";
|
|
2
2
|
import { getSerdePlugin } from "@aws-sdk/middleware-serde";
|
|
3
3
|
import { Command as $Command } from "@aws-sdk/smithy-client";
|
|
4
|
-
import {
|
|
4
|
+
import { DescribeJobExecutionRequestFilterSensitiveLog, DescribeJobExecutionResponseFilterSensitiveLog, } from "../models/models_0";
|
|
5
5
|
import { deserializeAws_restJson1DescribeJobExecutionCommand, serializeAws_restJson1DescribeJobExecutionCommand, } from "../protocols/Aws_restJson1";
|
|
6
6
|
var DescribeJobExecutionCommand = (function (_super) {
|
|
7
7
|
__extends(DescribeJobExecutionCommand, _super);
|
|
@@ -20,8 +20,8 @@ var DescribeJobExecutionCommand = (function (_super) {
|
|
|
20
20
|
logger: logger,
|
|
21
21
|
clientName: clientName,
|
|
22
22
|
commandName: commandName,
|
|
23
|
-
inputFilterSensitiveLog:
|
|
24
|
-
outputFilterSensitiveLog:
|
|
23
|
+
inputFilterSensitiveLog: DescribeJobExecutionRequestFilterSensitiveLog,
|
|
24
|
+
outputFilterSensitiveLog: DescribeJobExecutionResponseFilterSensitiveLog,
|
|
25
25
|
};
|
|
26
26
|
var requestHandler = configuration.requestHandler;
|
|
27
27
|
return stack.resolve(function (request) {
|