@aws-sdk/client-iot-jobs-data-plane 3.489.0 → 3.495.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/dist-cjs/IoTJobsDataPlane.js +1 -19
- package/dist-cjs/IoTJobsDataPlaneClient.js +1 -43
- package/dist-cjs/commands/DescribeJobExecutionCommand.js +1 -28
- package/dist-cjs/commands/GetPendingJobExecutionsCommand.js +1 -28
- package/dist-cjs/commands/StartNextPendingJobExecutionCommand.js +1 -28
- package/dist-cjs/commands/UpdateJobExecutionCommand.js +1 -28
- package/dist-cjs/commands/index.js +1 -7
- package/dist-cjs/endpoint/EndpointParameters.js +1 -18
- package/dist-cjs/extensionConfiguration.js +1 -2
- package/dist-cjs/index.js +778 -10
- package/dist-cjs/models/IoTJobsDataPlaneServiceException.js +1 -12
- package/dist-cjs/models/index.js +1 -4
- package/dist-cjs/models/models_0.js +1 -106
- package/dist-cjs/protocols/Aws_restJson1.js +1 -409
- package/dist-cjs/runtimeExtensions.js +1 -22
- package/package.json +40 -40
|
@@ -1,12 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.IoTJobsDataPlaneServiceException = exports.__ServiceException = void 0;
|
|
4
|
-
const smithy_client_1 = require("@smithy/smithy-client");
|
|
5
|
-
Object.defineProperty(exports, "__ServiceException", { enumerable: true, get: function () { return smithy_client_1.ServiceException; } });
|
|
6
|
-
class IoTJobsDataPlaneServiceException extends smithy_client_1.ServiceException {
|
|
7
|
-
constructor(options) {
|
|
8
|
-
super(options);
|
|
9
|
-
Object.setPrototypeOf(this, IoTJobsDataPlaneServiceException.prototype);
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
exports.IoTJobsDataPlaneServiceException = IoTJobsDataPlaneServiceException;
|
|
1
|
+
module.exports = require("../index.js");
|
package/dist-cjs/models/index.js
CHANGED
|
@@ -1,106 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.InvalidStateTransitionException = exports.ThrottlingException = exports.TerminalStateException = exports.ServiceUnavailableException = exports.ResourceNotFoundException = exports.InvalidRequestException = exports.JobExecutionStatus = 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;
|
|
18
|
-
exports.JobExecutionStatus = {
|
|
19
|
-
CANCELED: "CANCELED",
|
|
20
|
-
FAILED: "FAILED",
|
|
21
|
-
IN_PROGRESS: "IN_PROGRESS",
|
|
22
|
-
QUEUED: "QUEUED",
|
|
23
|
-
REJECTED: "REJECTED",
|
|
24
|
-
REMOVED: "REMOVED",
|
|
25
|
-
SUCCEEDED: "SUCCEEDED",
|
|
26
|
-
TIMED_OUT: "TIMED_OUT",
|
|
27
|
-
};
|
|
28
|
-
class InvalidRequestException extends IoTJobsDataPlaneServiceException_1.IoTJobsDataPlaneServiceException {
|
|
29
|
-
constructor(opts) {
|
|
30
|
-
super({
|
|
31
|
-
name: "InvalidRequestException",
|
|
32
|
-
$fault: "client",
|
|
33
|
-
...opts,
|
|
34
|
-
});
|
|
35
|
-
this.name = "InvalidRequestException";
|
|
36
|
-
this.$fault = "client";
|
|
37
|
-
Object.setPrototypeOf(this, InvalidRequestException.prototype);
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
exports.InvalidRequestException = InvalidRequestException;
|
|
41
|
-
class ResourceNotFoundException extends IoTJobsDataPlaneServiceException_1.IoTJobsDataPlaneServiceException {
|
|
42
|
-
constructor(opts) {
|
|
43
|
-
super({
|
|
44
|
-
name: "ResourceNotFoundException",
|
|
45
|
-
$fault: "client",
|
|
46
|
-
...opts,
|
|
47
|
-
});
|
|
48
|
-
this.name = "ResourceNotFoundException";
|
|
49
|
-
this.$fault = "client";
|
|
50
|
-
Object.setPrototypeOf(this, ResourceNotFoundException.prototype);
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
exports.ResourceNotFoundException = ResourceNotFoundException;
|
|
54
|
-
class ServiceUnavailableException extends IoTJobsDataPlaneServiceException_1.IoTJobsDataPlaneServiceException {
|
|
55
|
-
constructor(opts) {
|
|
56
|
-
super({
|
|
57
|
-
name: "ServiceUnavailableException",
|
|
58
|
-
$fault: "server",
|
|
59
|
-
...opts,
|
|
60
|
-
});
|
|
61
|
-
this.name = "ServiceUnavailableException";
|
|
62
|
-
this.$fault = "server";
|
|
63
|
-
Object.setPrototypeOf(this, ServiceUnavailableException.prototype);
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
exports.ServiceUnavailableException = ServiceUnavailableException;
|
|
67
|
-
class TerminalStateException extends IoTJobsDataPlaneServiceException_1.IoTJobsDataPlaneServiceException {
|
|
68
|
-
constructor(opts) {
|
|
69
|
-
super({
|
|
70
|
-
name: "TerminalStateException",
|
|
71
|
-
$fault: "client",
|
|
72
|
-
...opts,
|
|
73
|
-
});
|
|
74
|
-
this.name = "TerminalStateException";
|
|
75
|
-
this.$fault = "client";
|
|
76
|
-
Object.setPrototypeOf(this, TerminalStateException.prototype);
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
exports.TerminalStateException = TerminalStateException;
|
|
80
|
-
class ThrottlingException extends IoTJobsDataPlaneServiceException_1.IoTJobsDataPlaneServiceException {
|
|
81
|
-
constructor(opts) {
|
|
82
|
-
super({
|
|
83
|
-
name: "ThrottlingException",
|
|
84
|
-
$fault: "client",
|
|
85
|
-
...opts,
|
|
86
|
-
});
|
|
87
|
-
this.name = "ThrottlingException";
|
|
88
|
-
this.$fault = "client";
|
|
89
|
-
Object.setPrototypeOf(this, ThrottlingException.prototype);
|
|
90
|
-
this.payload = opts.payload;
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
exports.ThrottlingException = ThrottlingException;
|
|
94
|
-
class InvalidStateTransitionException extends IoTJobsDataPlaneServiceException_1.IoTJobsDataPlaneServiceException {
|
|
95
|
-
constructor(opts) {
|
|
96
|
-
super({
|
|
97
|
-
name: "InvalidStateTransitionException",
|
|
98
|
-
$fault: "client",
|
|
99
|
-
...opts,
|
|
100
|
-
});
|
|
101
|
-
this.name = "InvalidStateTransitionException";
|
|
102
|
-
this.$fault = "client";
|
|
103
|
-
Object.setPrototypeOf(this, InvalidStateTransitionException.prototype);
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
exports.InvalidStateTransitionException = InvalidStateTransitionException;
|
|
1
|
+
module.exports = require("../index.js");
|
|
@@ -1,409 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.de_UpdateJobExecutionCommand = exports.de_StartNextPendingJobExecutionCommand = exports.de_GetPendingJobExecutionsCommand = exports.de_DescribeJobExecutionCommand = exports.se_UpdateJobExecutionCommand = exports.se_StartNextPendingJobExecutionCommand = exports.se_GetPendingJobExecutionsCommand = exports.se_DescribeJobExecutionCommand = void 0;
|
|
4
|
-
const core_1 = require("@smithy/core");
|
|
5
|
-
const smithy_client_1 = require("@smithy/smithy-client");
|
|
6
|
-
const IoTJobsDataPlaneServiceException_1 = require("../models/IoTJobsDataPlaneServiceException");
|
|
7
|
-
const models_0_1 = require("../models/models_0");
|
|
8
|
-
const se_DescribeJobExecutionCommand = async (input, context) => {
|
|
9
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
10
|
-
const headers = {};
|
|
11
|
-
b.bp("/things/{thingName}/jobs/{jobId}");
|
|
12
|
-
b.p("jobId", () => input.jobId, "{jobId}", false);
|
|
13
|
-
b.p("thingName", () => input.thingName, "{thingName}", false);
|
|
14
|
-
const query = (0, smithy_client_1.map)({
|
|
15
|
-
[_iJD]: [() => input.includeJobDocument !== void 0, () => input[_iJD].toString()],
|
|
16
|
-
[_eN]: [() => input.executionNumber !== void 0, () => input[_eN].toString()],
|
|
17
|
-
});
|
|
18
|
-
let body;
|
|
19
|
-
b.m("GET").h(headers).q(query).b(body);
|
|
20
|
-
return b.build();
|
|
21
|
-
};
|
|
22
|
-
exports.se_DescribeJobExecutionCommand = se_DescribeJobExecutionCommand;
|
|
23
|
-
const se_GetPendingJobExecutionsCommand = async (input, context) => {
|
|
24
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
25
|
-
const headers = {};
|
|
26
|
-
b.bp("/things/{thingName}/jobs");
|
|
27
|
-
b.p("thingName", () => input.thingName, "{thingName}", false);
|
|
28
|
-
let body;
|
|
29
|
-
b.m("GET").h(headers).b(body);
|
|
30
|
-
return b.build();
|
|
31
|
-
};
|
|
32
|
-
exports.se_GetPendingJobExecutionsCommand = se_GetPendingJobExecutionsCommand;
|
|
33
|
-
const se_StartNextPendingJobExecutionCommand = async (input, context) => {
|
|
34
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
35
|
-
const headers = {
|
|
36
|
-
"content-type": "application/json",
|
|
37
|
-
};
|
|
38
|
-
b.bp("/things/{thingName}/jobs/$next");
|
|
39
|
-
b.p("thingName", () => input.thingName, "{thingName}", false);
|
|
40
|
-
let body;
|
|
41
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
42
|
-
statusDetails: (_) => (0, smithy_client_1._json)(_),
|
|
43
|
-
stepTimeoutInMinutes: [],
|
|
44
|
-
}));
|
|
45
|
-
b.m("PUT").h(headers).b(body);
|
|
46
|
-
return b.build();
|
|
47
|
-
};
|
|
48
|
-
exports.se_StartNextPendingJobExecutionCommand = se_StartNextPendingJobExecutionCommand;
|
|
49
|
-
const se_UpdateJobExecutionCommand = async (input, context) => {
|
|
50
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
51
|
-
const headers = {
|
|
52
|
-
"content-type": "application/json",
|
|
53
|
-
};
|
|
54
|
-
b.bp("/things/{thingName}/jobs/{jobId}");
|
|
55
|
-
b.p("jobId", () => input.jobId, "{jobId}", false);
|
|
56
|
-
b.p("thingName", () => input.thingName, "{thingName}", false);
|
|
57
|
-
let body;
|
|
58
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
59
|
-
executionNumber: [],
|
|
60
|
-
expectedVersion: [],
|
|
61
|
-
includeJobDocument: [],
|
|
62
|
-
includeJobExecutionState: [],
|
|
63
|
-
status: [],
|
|
64
|
-
statusDetails: (_) => (0, smithy_client_1._json)(_),
|
|
65
|
-
stepTimeoutInMinutes: [],
|
|
66
|
-
}));
|
|
67
|
-
b.m("POST").h(headers).b(body);
|
|
68
|
-
return b.build();
|
|
69
|
-
};
|
|
70
|
-
exports.se_UpdateJobExecutionCommand = se_UpdateJobExecutionCommand;
|
|
71
|
-
const de_DescribeJobExecutionCommand = async (output, context) => {
|
|
72
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
73
|
-
return de_DescribeJobExecutionCommandError(output, context);
|
|
74
|
-
}
|
|
75
|
-
const contents = (0, smithy_client_1.map)({
|
|
76
|
-
$metadata: deserializeMetadata(output),
|
|
77
|
-
});
|
|
78
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
79
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
80
|
-
execution: smithy_client_1._json,
|
|
81
|
-
});
|
|
82
|
-
Object.assign(contents, doc);
|
|
83
|
-
return contents;
|
|
84
|
-
};
|
|
85
|
-
exports.de_DescribeJobExecutionCommand = de_DescribeJobExecutionCommand;
|
|
86
|
-
const de_DescribeJobExecutionCommandError = async (output, context) => {
|
|
87
|
-
const parsedOutput = {
|
|
88
|
-
...output,
|
|
89
|
-
body: await parseErrorBody(output.body, context),
|
|
90
|
-
};
|
|
91
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
92
|
-
switch (errorCode) {
|
|
93
|
-
case "CertificateValidationException":
|
|
94
|
-
case "com.amazonaws.iotjobsdataplane#CertificateValidationException":
|
|
95
|
-
throw await de_CertificateValidationExceptionRes(parsedOutput, context);
|
|
96
|
-
case "InvalidRequestException":
|
|
97
|
-
case "com.amazonaws.iotjobsdataplane#InvalidRequestException":
|
|
98
|
-
throw await de_InvalidRequestExceptionRes(parsedOutput, context);
|
|
99
|
-
case "ResourceNotFoundException":
|
|
100
|
-
case "com.amazonaws.iotjobsdataplane#ResourceNotFoundException":
|
|
101
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
102
|
-
case "ServiceUnavailableException":
|
|
103
|
-
case "com.amazonaws.iotjobsdataplane#ServiceUnavailableException":
|
|
104
|
-
throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
|
|
105
|
-
case "TerminalStateException":
|
|
106
|
-
case "com.amazonaws.iotjobsdataplane#TerminalStateException":
|
|
107
|
-
throw await de_TerminalStateExceptionRes(parsedOutput, context);
|
|
108
|
-
case "ThrottlingException":
|
|
109
|
-
case "com.amazonaws.iotjobsdataplane#ThrottlingException":
|
|
110
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
111
|
-
default:
|
|
112
|
-
const parsedBody = parsedOutput.body;
|
|
113
|
-
return throwDefaultError({
|
|
114
|
-
output,
|
|
115
|
-
parsedBody,
|
|
116
|
-
errorCode,
|
|
117
|
-
});
|
|
118
|
-
}
|
|
119
|
-
};
|
|
120
|
-
const de_GetPendingJobExecutionsCommand = async (output, context) => {
|
|
121
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
122
|
-
return de_GetPendingJobExecutionsCommandError(output, context);
|
|
123
|
-
}
|
|
124
|
-
const contents = (0, smithy_client_1.map)({
|
|
125
|
-
$metadata: deserializeMetadata(output),
|
|
126
|
-
});
|
|
127
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
128
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
129
|
-
inProgressJobs: smithy_client_1._json,
|
|
130
|
-
queuedJobs: smithy_client_1._json,
|
|
131
|
-
});
|
|
132
|
-
Object.assign(contents, doc);
|
|
133
|
-
return contents;
|
|
134
|
-
};
|
|
135
|
-
exports.de_GetPendingJobExecutionsCommand = de_GetPendingJobExecutionsCommand;
|
|
136
|
-
const de_GetPendingJobExecutionsCommandError = async (output, context) => {
|
|
137
|
-
const parsedOutput = {
|
|
138
|
-
...output,
|
|
139
|
-
body: await parseErrorBody(output.body, context),
|
|
140
|
-
};
|
|
141
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
142
|
-
switch (errorCode) {
|
|
143
|
-
case "CertificateValidationException":
|
|
144
|
-
case "com.amazonaws.iotjobsdataplane#CertificateValidationException":
|
|
145
|
-
throw await de_CertificateValidationExceptionRes(parsedOutput, context);
|
|
146
|
-
case "InvalidRequestException":
|
|
147
|
-
case "com.amazonaws.iotjobsdataplane#InvalidRequestException":
|
|
148
|
-
throw await de_InvalidRequestExceptionRes(parsedOutput, context);
|
|
149
|
-
case "ResourceNotFoundException":
|
|
150
|
-
case "com.amazonaws.iotjobsdataplane#ResourceNotFoundException":
|
|
151
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
152
|
-
case "ServiceUnavailableException":
|
|
153
|
-
case "com.amazonaws.iotjobsdataplane#ServiceUnavailableException":
|
|
154
|
-
throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
|
|
155
|
-
case "ThrottlingException":
|
|
156
|
-
case "com.amazonaws.iotjobsdataplane#ThrottlingException":
|
|
157
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
158
|
-
default:
|
|
159
|
-
const parsedBody = parsedOutput.body;
|
|
160
|
-
return throwDefaultError({
|
|
161
|
-
output,
|
|
162
|
-
parsedBody,
|
|
163
|
-
errorCode,
|
|
164
|
-
});
|
|
165
|
-
}
|
|
166
|
-
};
|
|
167
|
-
const de_StartNextPendingJobExecutionCommand = async (output, context) => {
|
|
168
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
169
|
-
return de_StartNextPendingJobExecutionCommandError(output, context);
|
|
170
|
-
}
|
|
171
|
-
const contents = (0, smithy_client_1.map)({
|
|
172
|
-
$metadata: deserializeMetadata(output),
|
|
173
|
-
});
|
|
174
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
175
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
176
|
-
execution: smithy_client_1._json,
|
|
177
|
-
});
|
|
178
|
-
Object.assign(contents, doc);
|
|
179
|
-
return contents;
|
|
180
|
-
};
|
|
181
|
-
exports.de_StartNextPendingJobExecutionCommand = de_StartNextPendingJobExecutionCommand;
|
|
182
|
-
const de_StartNextPendingJobExecutionCommandError = async (output, context) => {
|
|
183
|
-
const parsedOutput = {
|
|
184
|
-
...output,
|
|
185
|
-
body: await parseErrorBody(output.body, context),
|
|
186
|
-
};
|
|
187
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
188
|
-
switch (errorCode) {
|
|
189
|
-
case "CertificateValidationException":
|
|
190
|
-
case "com.amazonaws.iotjobsdataplane#CertificateValidationException":
|
|
191
|
-
throw await de_CertificateValidationExceptionRes(parsedOutput, context);
|
|
192
|
-
case "InvalidRequestException":
|
|
193
|
-
case "com.amazonaws.iotjobsdataplane#InvalidRequestException":
|
|
194
|
-
throw await de_InvalidRequestExceptionRes(parsedOutput, context);
|
|
195
|
-
case "ResourceNotFoundException":
|
|
196
|
-
case "com.amazonaws.iotjobsdataplane#ResourceNotFoundException":
|
|
197
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
198
|
-
case "ServiceUnavailableException":
|
|
199
|
-
case "com.amazonaws.iotjobsdataplane#ServiceUnavailableException":
|
|
200
|
-
throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
|
|
201
|
-
case "ThrottlingException":
|
|
202
|
-
case "com.amazonaws.iotjobsdataplane#ThrottlingException":
|
|
203
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
204
|
-
default:
|
|
205
|
-
const parsedBody = parsedOutput.body;
|
|
206
|
-
return throwDefaultError({
|
|
207
|
-
output,
|
|
208
|
-
parsedBody,
|
|
209
|
-
errorCode,
|
|
210
|
-
});
|
|
211
|
-
}
|
|
212
|
-
};
|
|
213
|
-
const de_UpdateJobExecutionCommand = async (output, context) => {
|
|
214
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
215
|
-
return de_UpdateJobExecutionCommandError(output, context);
|
|
216
|
-
}
|
|
217
|
-
const contents = (0, smithy_client_1.map)({
|
|
218
|
-
$metadata: deserializeMetadata(output),
|
|
219
|
-
});
|
|
220
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
221
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
222
|
-
executionState: smithy_client_1._json,
|
|
223
|
-
jobDocument: smithy_client_1.expectString,
|
|
224
|
-
});
|
|
225
|
-
Object.assign(contents, doc);
|
|
226
|
-
return contents;
|
|
227
|
-
};
|
|
228
|
-
exports.de_UpdateJobExecutionCommand = de_UpdateJobExecutionCommand;
|
|
229
|
-
const de_UpdateJobExecutionCommandError = async (output, context) => {
|
|
230
|
-
const parsedOutput = {
|
|
231
|
-
...output,
|
|
232
|
-
body: await parseErrorBody(output.body, context),
|
|
233
|
-
};
|
|
234
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
235
|
-
switch (errorCode) {
|
|
236
|
-
case "CertificateValidationException":
|
|
237
|
-
case "com.amazonaws.iotjobsdataplane#CertificateValidationException":
|
|
238
|
-
throw await de_CertificateValidationExceptionRes(parsedOutput, context);
|
|
239
|
-
case "InvalidRequestException":
|
|
240
|
-
case "com.amazonaws.iotjobsdataplane#InvalidRequestException":
|
|
241
|
-
throw await de_InvalidRequestExceptionRes(parsedOutput, context);
|
|
242
|
-
case "InvalidStateTransitionException":
|
|
243
|
-
case "com.amazonaws.iotjobsdataplane#InvalidStateTransitionException":
|
|
244
|
-
throw await de_InvalidStateTransitionExceptionRes(parsedOutput, context);
|
|
245
|
-
case "ResourceNotFoundException":
|
|
246
|
-
case "com.amazonaws.iotjobsdataplane#ResourceNotFoundException":
|
|
247
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
248
|
-
case "ServiceUnavailableException":
|
|
249
|
-
case "com.amazonaws.iotjobsdataplane#ServiceUnavailableException":
|
|
250
|
-
throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
|
|
251
|
-
case "ThrottlingException":
|
|
252
|
-
case "com.amazonaws.iotjobsdataplane#ThrottlingException":
|
|
253
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
254
|
-
default:
|
|
255
|
-
const parsedBody = parsedOutput.body;
|
|
256
|
-
return throwDefaultError({
|
|
257
|
-
output,
|
|
258
|
-
parsedBody,
|
|
259
|
-
errorCode,
|
|
260
|
-
});
|
|
261
|
-
}
|
|
262
|
-
};
|
|
263
|
-
const throwDefaultError = (0, smithy_client_1.withBaseException)(IoTJobsDataPlaneServiceException_1.IoTJobsDataPlaneServiceException);
|
|
264
|
-
const de_CertificateValidationExceptionRes = async (parsedOutput, context) => {
|
|
265
|
-
const contents = (0, smithy_client_1.map)({});
|
|
266
|
-
const data = parsedOutput.body;
|
|
267
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
268
|
-
message: smithy_client_1.expectString,
|
|
269
|
-
});
|
|
270
|
-
Object.assign(contents, doc);
|
|
271
|
-
const exception = new models_0_1.CertificateValidationException({
|
|
272
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
273
|
-
...contents,
|
|
274
|
-
});
|
|
275
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
276
|
-
};
|
|
277
|
-
const de_InvalidRequestExceptionRes = async (parsedOutput, context) => {
|
|
278
|
-
const contents = (0, smithy_client_1.map)({});
|
|
279
|
-
const data = parsedOutput.body;
|
|
280
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
281
|
-
message: smithy_client_1.expectString,
|
|
282
|
-
});
|
|
283
|
-
Object.assign(contents, doc);
|
|
284
|
-
const exception = new models_0_1.InvalidRequestException({
|
|
285
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
286
|
-
...contents,
|
|
287
|
-
});
|
|
288
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
289
|
-
};
|
|
290
|
-
const de_InvalidStateTransitionExceptionRes = async (parsedOutput, context) => {
|
|
291
|
-
const contents = (0, smithy_client_1.map)({});
|
|
292
|
-
const data = parsedOutput.body;
|
|
293
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
294
|
-
message: smithy_client_1.expectString,
|
|
295
|
-
});
|
|
296
|
-
Object.assign(contents, doc);
|
|
297
|
-
const exception = new models_0_1.InvalidStateTransitionException({
|
|
298
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
299
|
-
...contents,
|
|
300
|
-
});
|
|
301
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
302
|
-
};
|
|
303
|
-
const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
|
|
304
|
-
const contents = (0, smithy_client_1.map)({});
|
|
305
|
-
const data = parsedOutput.body;
|
|
306
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
307
|
-
message: smithy_client_1.expectString,
|
|
308
|
-
});
|
|
309
|
-
Object.assign(contents, doc);
|
|
310
|
-
const exception = new models_0_1.ResourceNotFoundException({
|
|
311
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
312
|
-
...contents,
|
|
313
|
-
});
|
|
314
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
315
|
-
};
|
|
316
|
-
const de_ServiceUnavailableExceptionRes = async (parsedOutput, context) => {
|
|
317
|
-
const contents = (0, smithy_client_1.map)({});
|
|
318
|
-
const data = parsedOutput.body;
|
|
319
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
320
|
-
message: smithy_client_1.expectString,
|
|
321
|
-
});
|
|
322
|
-
Object.assign(contents, doc);
|
|
323
|
-
const exception = new models_0_1.ServiceUnavailableException({
|
|
324
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
325
|
-
...contents,
|
|
326
|
-
});
|
|
327
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
328
|
-
};
|
|
329
|
-
const de_TerminalStateExceptionRes = async (parsedOutput, context) => {
|
|
330
|
-
const contents = (0, smithy_client_1.map)({});
|
|
331
|
-
const data = parsedOutput.body;
|
|
332
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
333
|
-
message: smithy_client_1.expectString,
|
|
334
|
-
});
|
|
335
|
-
Object.assign(contents, doc);
|
|
336
|
-
const exception = new models_0_1.TerminalStateException({
|
|
337
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
338
|
-
...contents,
|
|
339
|
-
});
|
|
340
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
341
|
-
};
|
|
342
|
-
const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
|
|
343
|
-
const contents = (0, smithy_client_1.map)({});
|
|
344
|
-
const data = parsedOutput.body;
|
|
345
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
346
|
-
message: smithy_client_1.expectString,
|
|
347
|
-
payload: context.base64Decoder,
|
|
348
|
-
});
|
|
349
|
-
Object.assign(contents, doc);
|
|
350
|
-
const exception = new models_0_1.ThrottlingException({
|
|
351
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
352
|
-
...contents,
|
|
353
|
-
});
|
|
354
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
355
|
-
};
|
|
356
|
-
const deserializeMetadata = (output) => ({
|
|
357
|
-
httpStatusCode: output.statusCode,
|
|
358
|
-
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
|
|
359
|
-
extendedRequestId: output.headers["x-amz-id-2"],
|
|
360
|
-
cfId: output.headers["x-amz-cf-id"],
|
|
361
|
-
});
|
|
362
|
-
const collectBodyString = (streamBody, context) => (0, smithy_client_1.collectBody)(streamBody, context).then((body) => context.utf8Encoder(body));
|
|
363
|
-
const isSerializableHeaderValue = (value) => value !== undefined &&
|
|
364
|
-
value !== null &&
|
|
365
|
-
value !== "" &&
|
|
366
|
-
(!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
|
|
367
|
-
(!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
|
|
368
|
-
const _eN = "executionNumber";
|
|
369
|
-
const _iJD = "includeJobDocument";
|
|
370
|
-
const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
|
|
371
|
-
if (encoded.length) {
|
|
372
|
-
return JSON.parse(encoded);
|
|
373
|
-
}
|
|
374
|
-
return {};
|
|
375
|
-
});
|
|
376
|
-
const parseErrorBody = async (errorBody, context) => {
|
|
377
|
-
const value = await parseBody(errorBody, context);
|
|
378
|
-
value.message = value.message ?? value.Message;
|
|
379
|
-
return value;
|
|
380
|
-
};
|
|
381
|
-
const loadRestJsonErrorCode = (output, data) => {
|
|
382
|
-
const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
|
|
383
|
-
const sanitizeErrorCode = (rawValue) => {
|
|
384
|
-
let cleanValue = rawValue;
|
|
385
|
-
if (typeof cleanValue === "number") {
|
|
386
|
-
cleanValue = cleanValue.toString();
|
|
387
|
-
}
|
|
388
|
-
if (cleanValue.indexOf(",") >= 0) {
|
|
389
|
-
cleanValue = cleanValue.split(",")[0];
|
|
390
|
-
}
|
|
391
|
-
if (cleanValue.indexOf(":") >= 0) {
|
|
392
|
-
cleanValue = cleanValue.split(":")[0];
|
|
393
|
-
}
|
|
394
|
-
if (cleanValue.indexOf("#") >= 0) {
|
|
395
|
-
cleanValue = cleanValue.split("#")[1];
|
|
396
|
-
}
|
|
397
|
-
return cleanValue;
|
|
398
|
-
};
|
|
399
|
-
const headerKey = findKey(output.headers, "x-amzn-errortype");
|
|
400
|
-
if (headerKey !== undefined) {
|
|
401
|
-
return sanitizeErrorCode(output.headers[headerKey]);
|
|
402
|
-
}
|
|
403
|
-
if (data.code !== undefined) {
|
|
404
|
-
return sanitizeErrorCode(data.code);
|
|
405
|
-
}
|
|
406
|
-
if (data["__type"] !== undefined) {
|
|
407
|
-
return sanitizeErrorCode(data["__type"]);
|
|
408
|
-
}
|
|
409
|
-
};
|
|
1
|
+
module.exports = require("../index.js");
|
|
@@ -1,22 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.resolveRuntimeExtensions = void 0;
|
|
4
|
-
const region_config_resolver_1 = require("@aws-sdk/region-config-resolver");
|
|
5
|
-
const protocol_http_1 = require("@smithy/protocol-http");
|
|
6
|
-
const smithy_client_1 = require("@smithy/smithy-client");
|
|
7
|
-
const asPartial = (t) => t;
|
|
8
|
-
const resolveRuntimeExtensions = (runtimeConfig, extensions) => {
|
|
9
|
-
const extensionConfiguration = {
|
|
10
|
-
...asPartial((0, region_config_resolver_1.getAwsRegionExtensionConfiguration)(runtimeConfig)),
|
|
11
|
-
...asPartial((0, smithy_client_1.getDefaultExtensionConfiguration)(runtimeConfig)),
|
|
12
|
-
...asPartial((0, protocol_http_1.getHttpHandlerExtensionConfiguration)(runtimeConfig)),
|
|
13
|
-
};
|
|
14
|
-
extensions.forEach((extension) => extension.configure(extensionConfiguration));
|
|
15
|
-
return {
|
|
16
|
-
...runtimeConfig,
|
|
17
|
-
...(0, region_config_resolver_1.resolveAwsRegionExtensionConfiguration)(extensionConfiguration),
|
|
18
|
-
...(0, smithy_client_1.resolveDefaultRuntimeConfig)(extensionConfiguration),
|
|
19
|
-
...(0, protocol_http_1.resolveHttpHandlerRuntimeConfig)(extensionConfiguration),
|
|
20
|
-
};
|
|
21
|
-
};
|
|
22
|
-
exports.resolveRuntimeExtensions = resolveRuntimeExtensions;
|
|
1
|
+
module.exports = require("./index.js");
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
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.495.0",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
|
|
7
|
-
"build:cjs": "
|
|
7
|
+
"build:cjs": "node ../../scripts/compilation/inline client-iot-jobs-data-plane",
|
|
8
8
|
"build:es": "tsc -p tsconfig.es.json",
|
|
9
9
|
"build:include:deps": "lerna run --scope $npm_package_name --include-dependencies build",
|
|
10
10
|
"build:types": "tsc -p tsconfig.types.json",
|
|
@@ -20,47 +20,47 @@
|
|
|
20
20
|
"dependencies": {
|
|
21
21
|
"@aws-crypto/sha256-browser": "3.0.0",
|
|
22
22
|
"@aws-crypto/sha256-js": "3.0.0",
|
|
23
|
-
"@aws-sdk/client-sts": "3.
|
|
24
|
-
"@aws-sdk/core": "3.
|
|
25
|
-
"@aws-sdk/credential-provider-node": "3.
|
|
26
|
-
"@aws-sdk/middleware-host-header": "3.
|
|
27
|
-
"@aws-sdk/middleware-logger": "3.
|
|
28
|
-
"@aws-sdk/middleware-recursion-detection": "3.
|
|
29
|
-
"@aws-sdk/middleware-signing": "3.
|
|
30
|
-
"@aws-sdk/middleware-user-agent": "3.
|
|
31
|
-
"@aws-sdk/region-config-resolver": "3.
|
|
32
|
-
"@aws-sdk/types": "3.
|
|
33
|
-
"@aws-sdk/util-endpoints": "3.
|
|
34
|
-
"@aws-sdk/util-user-agent-browser": "3.
|
|
35
|
-
"@aws-sdk/util-user-agent-node": "3.
|
|
36
|
-
"@smithy/config-resolver": "^2.0
|
|
37
|
-
"@smithy/core": "^1.
|
|
38
|
-
"@smithy/fetch-http-handler": "^2.
|
|
39
|
-
"@smithy/hash-node": "^2.0
|
|
40
|
-
"@smithy/invalid-dependency": "^2.0
|
|
41
|
-
"@smithy/middleware-content-length": "^2.0
|
|
42
|
-
"@smithy/middleware-endpoint": "^2.
|
|
43
|
-
"@smithy/middleware-retry": "^2.0
|
|
44
|
-
"@smithy/middleware-serde": "^2.0
|
|
45
|
-
"@smithy/middleware-stack": "^2.0
|
|
46
|
-
"@smithy/node-config-provider": "^2.
|
|
47
|
-
"@smithy/node-http-handler": "^2.
|
|
48
|
-
"@smithy/protocol-http": "^3.0
|
|
49
|
-
"@smithy/smithy-client": "^2.
|
|
50
|
-
"@smithy/types": "^2.
|
|
51
|
-
"@smithy/url-parser": "^2.0
|
|
52
|
-
"@smithy/util-base64": "^2.0
|
|
53
|
-
"@smithy/util-body-length-browser": "^2.0
|
|
54
|
-
"@smithy/util-body-length-node": "^2.
|
|
55
|
-
"@smithy/util-defaults-mode-browser": "^2.0
|
|
56
|
-
"@smithy/util-defaults-mode-node": "^2.0
|
|
57
|
-
"@smithy/util-endpoints": "^1.0
|
|
58
|
-
"@smithy/util-retry": "^2.0
|
|
59
|
-
"@smithy/util-utf8": "^2.0
|
|
23
|
+
"@aws-sdk/client-sts": "3.495.0",
|
|
24
|
+
"@aws-sdk/core": "3.495.0",
|
|
25
|
+
"@aws-sdk/credential-provider-node": "3.495.0",
|
|
26
|
+
"@aws-sdk/middleware-host-header": "3.495.0",
|
|
27
|
+
"@aws-sdk/middleware-logger": "3.495.0",
|
|
28
|
+
"@aws-sdk/middleware-recursion-detection": "3.495.0",
|
|
29
|
+
"@aws-sdk/middleware-signing": "3.495.0",
|
|
30
|
+
"@aws-sdk/middleware-user-agent": "3.495.0",
|
|
31
|
+
"@aws-sdk/region-config-resolver": "3.495.0",
|
|
32
|
+
"@aws-sdk/types": "3.495.0",
|
|
33
|
+
"@aws-sdk/util-endpoints": "3.495.0",
|
|
34
|
+
"@aws-sdk/util-user-agent-browser": "3.495.0",
|
|
35
|
+
"@aws-sdk/util-user-agent-node": "3.495.0",
|
|
36
|
+
"@smithy/config-resolver": "^2.1.0",
|
|
37
|
+
"@smithy/core": "^1.3.0",
|
|
38
|
+
"@smithy/fetch-http-handler": "^2.4.0",
|
|
39
|
+
"@smithy/hash-node": "^2.1.0",
|
|
40
|
+
"@smithy/invalid-dependency": "^2.1.0",
|
|
41
|
+
"@smithy/middleware-content-length": "^2.1.0",
|
|
42
|
+
"@smithy/middleware-endpoint": "^2.4.0",
|
|
43
|
+
"@smithy/middleware-retry": "^2.1.0",
|
|
44
|
+
"@smithy/middleware-serde": "^2.1.0",
|
|
45
|
+
"@smithy/middleware-stack": "^2.1.0",
|
|
46
|
+
"@smithy/node-config-provider": "^2.2.0",
|
|
47
|
+
"@smithy/node-http-handler": "^2.3.0",
|
|
48
|
+
"@smithy/protocol-http": "^3.1.0",
|
|
49
|
+
"@smithy/smithy-client": "^2.3.0",
|
|
50
|
+
"@smithy/types": "^2.9.0",
|
|
51
|
+
"@smithy/url-parser": "^2.1.0",
|
|
52
|
+
"@smithy/util-base64": "^2.1.0",
|
|
53
|
+
"@smithy/util-body-length-browser": "^2.1.0",
|
|
54
|
+
"@smithy/util-body-length-node": "^2.2.0",
|
|
55
|
+
"@smithy/util-defaults-mode-browser": "^2.1.0",
|
|
56
|
+
"@smithy/util-defaults-mode-node": "^2.1.0",
|
|
57
|
+
"@smithy/util-endpoints": "^1.1.0",
|
|
58
|
+
"@smithy/util-retry": "^2.1.0",
|
|
59
|
+
"@smithy/util-utf8": "^2.1.0",
|
|
60
60
|
"tslib": "^2.5.0"
|
|
61
61
|
},
|
|
62
62
|
"devDependencies": {
|
|
63
|
-
"@smithy/service-client-documentation-generator": "^2.
|
|
63
|
+
"@smithy/service-client-documentation-generator": "^2.1.0",
|
|
64
64
|
"@tsconfig/node14": "1.0.3",
|
|
65
65
|
"@types/node": "^14.14.31",
|
|
66
66
|
"concurrently": "7.0.0",
|