@aws-sdk/client-iot-events-data 3.928.0 → 3.929.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/index.js +692 -625
- package/dist-cjs/runtimeConfig.shared.js +2 -0
- package/dist-es/IoTEventsDataClient.js +2 -0
- package/dist-es/commands/BatchAcknowledgeAlarmCommand.js +3 -9
- package/dist-es/commands/BatchDeleteDetectorCommand.js +3 -9
- package/dist-es/commands/BatchDisableAlarmCommand.js +3 -9
- package/dist-es/commands/BatchEnableAlarmCommand.js +3 -9
- package/dist-es/commands/BatchPutMessageCommand.js +3 -9
- package/dist-es/commands/BatchResetAlarmCommand.js +3 -9
- package/dist-es/commands/BatchSnoozeAlarmCommand.js +3 -9
- package/dist-es/commands/BatchUpdateDetectorCommand.js +3 -9
- package/dist-es/commands/DescribeAlarmCommand.js +3 -9
- package/dist-es/commands/DescribeDetectorCommand.js +3 -9
- package/dist-es/commands/ListAlarmsCommand.js +3 -9
- package/dist-es/commands/ListDetectorsCommand.js +3 -9
- package/dist-es/runtimeConfig.shared.js +2 -0
- package/dist-es/schemas/schemas_0.js +656 -0
- package/dist-types/IoTEventsDataClient.d.ts +10 -1
- package/dist-types/runtimeConfig.browser.d.ts +1 -0
- package/dist-types/runtimeConfig.d.ts +1 -0
- package/dist-types/runtimeConfig.native.d.ts +1 -0
- package/dist-types/runtimeConfig.shared.d.ts +1 -0
- package/dist-types/schemas/schemas_0.d.ts +97 -0
- package/dist-types/ts3.4/IoTEventsDataClient.d.ts +4 -0
- package/dist-types/ts3.4/runtimeConfig.browser.d.ts +4 -0
- package/dist-types/ts3.4/runtimeConfig.d.ts +4 -0
- package/dist-types/ts3.4/runtimeConfig.native.d.ts +4 -0
- package/dist-types/ts3.4/runtimeConfig.shared.d.ts +4 -0
- package/dist-types/ts3.4/schemas/schemas_0.d.ts +102 -0
- package/package.json +2 -2
- package/dist-es/protocols/Aws_restJson1.js +0 -531
- package/dist-types/protocols/Aws_restJson1.d.ts +0 -110
- package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +0 -149
|
@@ -1,531 +0,0 @@
|
|
|
1
|
-
import { loadRestJsonErrorCode, parseJsonBody as parseBody, parseJsonErrorBody as parseErrorBody } from "@aws-sdk/core";
|
|
2
|
-
import { requestBuilder as rb } from "@smithy/core";
|
|
3
|
-
import { _json, collectBody, decorateServiceException as __decorateServiceException, expectInt32 as __expectInt32, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectObject as __expectObject, expectString as __expectString, map, parseEpochTimestamp as __parseEpochTimestamp, take, withBaseException, } from "@smithy/smithy-client";
|
|
4
|
-
import { IoTEventsDataServiceException as __BaseException } from "../models/IoTEventsDataServiceException";
|
|
5
|
-
import { InternalFailureException, InvalidRequestException, ResourceNotFoundException, ServiceUnavailableException, ThrottlingException, } from "../models/models_0";
|
|
6
|
-
export const se_BatchAcknowledgeAlarmCommand = async (input, context) => {
|
|
7
|
-
const b = rb(input, context);
|
|
8
|
-
const headers = {
|
|
9
|
-
"content-type": "application/json",
|
|
10
|
-
};
|
|
11
|
-
b.bp("/alarms/acknowledge");
|
|
12
|
-
let body;
|
|
13
|
-
body = JSON.stringify(take(input, {
|
|
14
|
-
acknowledgeActionRequests: (_) => _json(_),
|
|
15
|
-
}));
|
|
16
|
-
b.m("POST").h(headers).b(body);
|
|
17
|
-
return b.build();
|
|
18
|
-
};
|
|
19
|
-
export const se_BatchDeleteDetectorCommand = async (input, context) => {
|
|
20
|
-
const b = rb(input, context);
|
|
21
|
-
const headers = {
|
|
22
|
-
"content-type": "application/json",
|
|
23
|
-
};
|
|
24
|
-
b.bp("/detectors/delete");
|
|
25
|
-
let body;
|
|
26
|
-
body = JSON.stringify(take(input, {
|
|
27
|
-
detectors: (_) => _json(_),
|
|
28
|
-
}));
|
|
29
|
-
b.m("POST").h(headers).b(body);
|
|
30
|
-
return b.build();
|
|
31
|
-
};
|
|
32
|
-
export const se_BatchDisableAlarmCommand = async (input, context) => {
|
|
33
|
-
const b = rb(input, context);
|
|
34
|
-
const headers = {
|
|
35
|
-
"content-type": "application/json",
|
|
36
|
-
};
|
|
37
|
-
b.bp("/alarms/disable");
|
|
38
|
-
let body;
|
|
39
|
-
body = JSON.stringify(take(input, {
|
|
40
|
-
disableActionRequests: (_) => _json(_),
|
|
41
|
-
}));
|
|
42
|
-
b.m("POST").h(headers).b(body);
|
|
43
|
-
return b.build();
|
|
44
|
-
};
|
|
45
|
-
export const se_BatchEnableAlarmCommand = async (input, context) => {
|
|
46
|
-
const b = rb(input, context);
|
|
47
|
-
const headers = {
|
|
48
|
-
"content-type": "application/json",
|
|
49
|
-
};
|
|
50
|
-
b.bp("/alarms/enable");
|
|
51
|
-
let body;
|
|
52
|
-
body = JSON.stringify(take(input, {
|
|
53
|
-
enableActionRequests: (_) => _json(_),
|
|
54
|
-
}));
|
|
55
|
-
b.m("POST").h(headers).b(body);
|
|
56
|
-
return b.build();
|
|
57
|
-
};
|
|
58
|
-
export const se_BatchPutMessageCommand = async (input, context) => {
|
|
59
|
-
const b = rb(input, context);
|
|
60
|
-
const headers = {
|
|
61
|
-
"content-type": "application/json",
|
|
62
|
-
};
|
|
63
|
-
b.bp("/inputs/messages");
|
|
64
|
-
let body;
|
|
65
|
-
body = JSON.stringify(take(input, {
|
|
66
|
-
messages: (_) => se_Messages(_, context),
|
|
67
|
-
}));
|
|
68
|
-
b.m("POST").h(headers).b(body);
|
|
69
|
-
return b.build();
|
|
70
|
-
};
|
|
71
|
-
export const se_BatchResetAlarmCommand = async (input, context) => {
|
|
72
|
-
const b = rb(input, context);
|
|
73
|
-
const headers = {
|
|
74
|
-
"content-type": "application/json",
|
|
75
|
-
};
|
|
76
|
-
b.bp("/alarms/reset");
|
|
77
|
-
let body;
|
|
78
|
-
body = JSON.stringify(take(input, {
|
|
79
|
-
resetActionRequests: (_) => _json(_),
|
|
80
|
-
}));
|
|
81
|
-
b.m("POST").h(headers).b(body);
|
|
82
|
-
return b.build();
|
|
83
|
-
};
|
|
84
|
-
export const se_BatchSnoozeAlarmCommand = async (input, context) => {
|
|
85
|
-
const b = rb(input, context);
|
|
86
|
-
const headers = {
|
|
87
|
-
"content-type": "application/json",
|
|
88
|
-
};
|
|
89
|
-
b.bp("/alarms/snooze");
|
|
90
|
-
let body;
|
|
91
|
-
body = JSON.stringify(take(input, {
|
|
92
|
-
snoozeActionRequests: (_) => _json(_),
|
|
93
|
-
}));
|
|
94
|
-
b.m("POST").h(headers).b(body);
|
|
95
|
-
return b.build();
|
|
96
|
-
};
|
|
97
|
-
export const se_BatchUpdateDetectorCommand = async (input, context) => {
|
|
98
|
-
const b = rb(input, context);
|
|
99
|
-
const headers = {
|
|
100
|
-
"content-type": "application/json",
|
|
101
|
-
};
|
|
102
|
-
b.bp("/detectors");
|
|
103
|
-
let body;
|
|
104
|
-
body = JSON.stringify(take(input, {
|
|
105
|
-
detectors: (_) => _json(_),
|
|
106
|
-
}));
|
|
107
|
-
b.m("POST").h(headers).b(body);
|
|
108
|
-
return b.build();
|
|
109
|
-
};
|
|
110
|
-
export const se_DescribeAlarmCommand = async (input, context) => {
|
|
111
|
-
const b = rb(input, context);
|
|
112
|
-
const headers = {};
|
|
113
|
-
b.bp("/alarms/{alarmModelName}/keyValues");
|
|
114
|
-
b.p("alarmModelName", () => input.alarmModelName, "{alarmModelName}", false);
|
|
115
|
-
const query = map({
|
|
116
|
-
[_kV]: [, input[_kV]],
|
|
117
|
-
});
|
|
118
|
-
let body;
|
|
119
|
-
b.m("GET").h(headers).q(query).b(body);
|
|
120
|
-
return b.build();
|
|
121
|
-
};
|
|
122
|
-
export const se_DescribeDetectorCommand = async (input, context) => {
|
|
123
|
-
const b = rb(input, context);
|
|
124
|
-
const headers = {};
|
|
125
|
-
b.bp("/detectors/{detectorModelName}/keyValues");
|
|
126
|
-
b.p("detectorModelName", () => input.detectorModelName, "{detectorModelName}", false);
|
|
127
|
-
const query = map({
|
|
128
|
-
[_kV]: [, input[_kV]],
|
|
129
|
-
});
|
|
130
|
-
let body;
|
|
131
|
-
b.m("GET").h(headers).q(query).b(body);
|
|
132
|
-
return b.build();
|
|
133
|
-
};
|
|
134
|
-
export const se_ListAlarmsCommand = async (input, context) => {
|
|
135
|
-
const b = rb(input, context);
|
|
136
|
-
const headers = {};
|
|
137
|
-
b.bp("/alarms/{alarmModelName}");
|
|
138
|
-
b.p("alarmModelName", () => input.alarmModelName, "{alarmModelName}", false);
|
|
139
|
-
const query = map({
|
|
140
|
-
[_nT]: [, input[_nT]],
|
|
141
|
-
[_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
|
|
142
|
-
});
|
|
143
|
-
let body;
|
|
144
|
-
b.m("GET").h(headers).q(query).b(body);
|
|
145
|
-
return b.build();
|
|
146
|
-
};
|
|
147
|
-
export const se_ListDetectorsCommand = async (input, context) => {
|
|
148
|
-
const b = rb(input, context);
|
|
149
|
-
const headers = {};
|
|
150
|
-
b.bp("/detectors/{detectorModelName}");
|
|
151
|
-
b.p("detectorModelName", () => input.detectorModelName, "{detectorModelName}", false);
|
|
152
|
-
const query = map({
|
|
153
|
-
[_sN]: [, input[_sN]],
|
|
154
|
-
[_nT]: [, input[_nT]],
|
|
155
|
-
[_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
|
|
156
|
-
});
|
|
157
|
-
let body;
|
|
158
|
-
b.m("GET").h(headers).q(query).b(body);
|
|
159
|
-
return b.build();
|
|
160
|
-
};
|
|
161
|
-
export const de_BatchAcknowledgeAlarmCommand = async (output, context) => {
|
|
162
|
-
if (output.statusCode !== 202 && output.statusCode >= 300) {
|
|
163
|
-
return de_CommandError(output, context);
|
|
164
|
-
}
|
|
165
|
-
const contents = map({
|
|
166
|
-
$metadata: deserializeMetadata(output),
|
|
167
|
-
});
|
|
168
|
-
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
169
|
-
const doc = take(data, {
|
|
170
|
-
errorEntries: _json,
|
|
171
|
-
});
|
|
172
|
-
Object.assign(contents, doc);
|
|
173
|
-
return contents;
|
|
174
|
-
};
|
|
175
|
-
export const de_BatchDeleteDetectorCommand = async (output, context) => {
|
|
176
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
177
|
-
return de_CommandError(output, context);
|
|
178
|
-
}
|
|
179
|
-
const contents = map({
|
|
180
|
-
$metadata: deserializeMetadata(output),
|
|
181
|
-
});
|
|
182
|
-
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
183
|
-
const doc = take(data, {
|
|
184
|
-
batchDeleteDetectorErrorEntries: _json,
|
|
185
|
-
});
|
|
186
|
-
Object.assign(contents, doc);
|
|
187
|
-
return contents;
|
|
188
|
-
};
|
|
189
|
-
export const de_BatchDisableAlarmCommand = async (output, context) => {
|
|
190
|
-
if (output.statusCode !== 202 && output.statusCode >= 300) {
|
|
191
|
-
return de_CommandError(output, context);
|
|
192
|
-
}
|
|
193
|
-
const contents = map({
|
|
194
|
-
$metadata: deserializeMetadata(output),
|
|
195
|
-
});
|
|
196
|
-
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
197
|
-
const doc = take(data, {
|
|
198
|
-
errorEntries: _json,
|
|
199
|
-
});
|
|
200
|
-
Object.assign(contents, doc);
|
|
201
|
-
return contents;
|
|
202
|
-
};
|
|
203
|
-
export const de_BatchEnableAlarmCommand = async (output, context) => {
|
|
204
|
-
if (output.statusCode !== 202 && output.statusCode >= 300) {
|
|
205
|
-
return de_CommandError(output, context);
|
|
206
|
-
}
|
|
207
|
-
const contents = map({
|
|
208
|
-
$metadata: deserializeMetadata(output),
|
|
209
|
-
});
|
|
210
|
-
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
211
|
-
const doc = take(data, {
|
|
212
|
-
errorEntries: _json,
|
|
213
|
-
});
|
|
214
|
-
Object.assign(contents, doc);
|
|
215
|
-
return contents;
|
|
216
|
-
};
|
|
217
|
-
export const de_BatchPutMessageCommand = async (output, context) => {
|
|
218
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
219
|
-
return de_CommandError(output, context);
|
|
220
|
-
}
|
|
221
|
-
const contents = map({
|
|
222
|
-
$metadata: deserializeMetadata(output),
|
|
223
|
-
});
|
|
224
|
-
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
225
|
-
const doc = take(data, {
|
|
226
|
-
BatchPutMessageErrorEntries: _json,
|
|
227
|
-
});
|
|
228
|
-
Object.assign(contents, doc);
|
|
229
|
-
return contents;
|
|
230
|
-
};
|
|
231
|
-
export const de_BatchResetAlarmCommand = async (output, context) => {
|
|
232
|
-
if (output.statusCode !== 202 && output.statusCode >= 300) {
|
|
233
|
-
return de_CommandError(output, context);
|
|
234
|
-
}
|
|
235
|
-
const contents = map({
|
|
236
|
-
$metadata: deserializeMetadata(output),
|
|
237
|
-
});
|
|
238
|
-
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
239
|
-
const doc = take(data, {
|
|
240
|
-
errorEntries: _json,
|
|
241
|
-
});
|
|
242
|
-
Object.assign(contents, doc);
|
|
243
|
-
return contents;
|
|
244
|
-
};
|
|
245
|
-
export const de_BatchSnoozeAlarmCommand = async (output, context) => {
|
|
246
|
-
if (output.statusCode !== 202 && output.statusCode >= 300) {
|
|
247
|
-
return de_CommandError(output, context);
|
|
248
|
-
}
|
|
249
|
-
const contents = map({
|
|
250
|
-
$metadata: deserializeMetadata(output),
|
|
251
|
-
});
|
|
252
|
-
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
253
|
-
const doc = take(data, {
|
|
254
|
-
errorEntries: _json,
|
|
255
|
-
});
|
|
256
|
-
Object.assign(contents, doc);
|
|
257
|
-
return contents;
|
|
258
|
-
};
|
|
259
|
-
export const de_BatchUpdateDetectorCommand = async (output, context) => {
|
|
260
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
261
|
-
return de_CommandError(output, context);
|
|
262
|
-
}
|
|
263
|
-
const contents = map({
|
|
264
|
-
$metadata: deserializeMetadata(output),
|
|
265
|
-
});
|
|
266
|
-
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
267
|
-
const doc = take(data, {
|
|
268
|
-
batchUpdateDetectorErrorEntries: _json,
|
|
269
|
-
});
|
|
270
|
-
Object.assign(contents, doc);
|
|
271
|
-
return contents;
|
|
272
|
-
};
|
|
273
|
-
export const de_DescribeAlarmCommand = async (output, context) => {
|
|
274
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
275
|
-
return de_CommandError(output, context);
|
|
276
|
-
}
|
|
277
|
-
const contents = map({
|
|
278
|
-
$metadata: deserializeMetadata(output),
|
|
279
|
-
});
|
|
280
|
-
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
281
|
-
const doc = take(data, {
|
|
282
|
-
alarm: (_) => de_Alarm(_, context),
|
|
283
|
-
});
|
|
284
|
-
Object.assign(contents, doc);
|
|
285
|
-
return contents;
|
|
286
|
-
};
|
|
287
|
-
export const de_DescribeDetectorCommand = async (output, context) => {
|
|
288
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
289
|
-
return de_CommandError(output, context);
|
|
290
|
-
}
|
|
291
|
-
const contents = map({
|
|
292
|
-
$metadata: deserializeMetadata(output),
|
|
293
|
-
});
|
|
294
|
-
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
295
|
-
const doc = take(data, {
|
|
296
|
-
detector: (_) => de_Detector(_, context),
|
|
297
|
-
});
|
|
298
|
-
Object.assign(contents, doc);
|
|
299
|
-
return contents;
|
|
300
|
-
};
|
|
301
|
-
export const de_ListAlarmsCommand = async (output, context) => {
|
|
302
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
303
|
-
return de_CommandError(output, context);
|
|
304
|
-
}
|
|
305
|
-
const contents = map({
|
|
306
|
-
$metadata: deserializeMetadata(output),
|
|
307
|
-
});
|
|
308
|
-
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
309
|
-
const doc = take(data, {
|
|
310
|
-
alarmSummaries: (_) => de_AlarmSummaries(_, context),
|
|
311
|
-
nextToken: __expectString,
|
|
312
|
-
});
|
|
313
|
-
Object.assign(contents, doc);
|
|
314
|
-
return contents;
|
|
315
|
-
};
|
|
316
|
-
export const de_ListDetectorsCommand = async (output, context) => {
|
|
317
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
318
|
-
return de_CommandError(output, context);
|
|
319
|
-
}
|
|
320
|
-
const contents = map({
|
|
321
|
-
$metadata: deserializeMetadata(output),
|
|
322
|
-
});
|
|
323
|
-
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
324
|
-
const doc = take(data, {
|
|
325
|
-
detectorSummaries: (_) => de_DetectorSummaries(_, context),
|
|
326
|
-
nextToken: __expectString,
|
|
327
|
-
});
|
|
328
|
-
Object.assign(contents, doc);
|
|
329
|
-
return contents;
|
|
330
|
-
};
|
|
331
|
-
const de_CommandError = async (output, context) => {
|
|
332
|
-
const parsedOutput = {
|
|
333
|
-
...output,
|
|
334
|
-
body: await parseErrorBody(output.body, context),
|
|
335
|
-
};
|
|
336
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
337
|
-
switch (errorCode) {
|
|
338
|
-
case "InternalFailureException":
|
|
339
|
-
case "com.amazonaws.ioteventsdata#InternalFailureException":
|
|
340
|
-
throw await de_InternalFailureExceptionRes(parsedOutput, context);
|
|
341
|
-
case "InvalidRequestException":
|
|
342
|
-
case "com.amazonaws.ioteventsdata#InvalidRequestException":
|
|
343
|
-
throw await de_InvalidRequestExceptionRes(parsedOutput, context);
|
|
344
|
-
case "ServiceUnavailableException":
|
|
345
|
-
case "com.amazonaws.ioteventsdata#ServiceUnavailableException":
|
|
346
|
-
throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
|
|
347
|
-
case "ThrottlingException":
|
|
348
|
-
case "com.amazonaws.ioteventsdata#ThrottlingException":
|
|
349
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
350
|
-
case "ResourceNotFoundException":
|
|
351
|
-
case "com.amazonaws.ioteventsdata#ResourceNotFoundException":
|
|
352
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
353
|
-
default:
|
|
354
|
-
const parsedBody = parsedOutput.body;
|
|
355
|
-
return throwDefaultError({
|
|
356
|
-
output,
|
|
357
|
-
parsedBody,
|
|
358
|
-
errorCode,
|
|
359
|
-
});
|
|
360
|
-
}
|
|
361
|
-
};
|
|
362
|
-
const throwDefaultError = withBaseException(__BaseException);
|
|
363
|
-
const de_InternalFailureExceptionRes = async (parsedOutput, context) => {
|
|
364
|
-
const contents = map({});
|
|
365
|
-
const data = parsedOutput.body;
|
|
366
|
-
const doc = take(data, {
|
|
367
|
-
message: __expectString,
|
|
368
|
-
});
|
|
369
|
-
Object.assign(contents, doc);
|
|
370
|
-
const exception = new InternalFailureException({
|
|
371
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
372
|
-
...contents,
|
|
373
|
-
});
|
|
374
|
-
return __decorateServiceException(exception, parsedOutput.body);
|
|
375
|
-
};
|
|
376
|
-
const de_InvalidRequestExceptionRes = async (parsedOutput, context) => {
|
|
377
|
-
const contents = map({});
|
|
378
|
-
const data = parsedOutput.body;
|
|
379
|
-
const doc = take(data, {
|
|
380
|
-
message: __expectString,
|
|
381
|
-
});
|
|
382
|
-
Object.assign(contents, doc);
|
|
383
|
-
const exception = new InvalidRequestException({
|
|
384
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
385
|
-
...contents,
|
|
386
|
-
});
|
|
387
|
-
return __decorateServiceException(exception, parsedOutput.body);
|
|
388
|
-
};
|
|
389
|
-
const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
|
|
390
|
-
const contents = map({});
|
|
391
|
-
const data = parsedOutput.body;
|
|
392
|
-
const doc = take(data, {
|
|
393
|
-
message: __expectString,
|
|
394
|
-
});
|
|
395
|
-
Object.assign(contents, doc);
|
|
396
|
-
const exception = new ResourceNotFoundException({
|
|
397
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
398
|
-
...contents,
|
|
399
|
-
});
|
|
400
|
-
return __decorateServiceException(exception, parsedOutput.body);
|
|
401
|
-
};
|
|
402
|
-
const de_ServiceUnavailableExceptionRes = async (parsedOutput, context) => {
|
|
403
|
-
const contents = map({});
|
|
404
|
-
const data = parsedOutput.body;
|
|
405
|
-
const doc = take(data, {
|
|
406
|
-
message: __expectString,
|
|
407
|
-
});
|
|
408
|
-
Object.assign(contents, doc);
|
|
409
|
-
const exception = new ServiceUnavailableException({
|
|
410
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
411
|
-
...contents,
|
|
412
|
-
});
|
|
413
|
-
return __decorateServiceException(exception, parsedOutput.body);
|
|
414
|
-
};
|
|
415
|
-
const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
|
|
416
|
-
const contents = map({});
|
|
417
|
-
const data = parsedOutput.body;
|
|
418
|
-
const doc = take(data, {
|
|
419
|
-
message: __expectString,
|
|
420
|
-
});
|
|
421
|
-
Object.assign(contents, doc);
|
|
422
|
-
const exception = new ThrottlingException({
|
|
423
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
424
|
-
...contents,
|
|
425
|
-
});
|
|
426
|
-
return __decorateServiceException(exception, parsedOutput.body);
|
|
427
|
-
};
|
|
428
|
-
const se_Message = (input, context) => {
|
|
429
|
-
return take(input, {
|
|
430
|
-
inputName: [],
|
|
431
|
-
messageId: [],
|
|
432
|
-
payload: context.base64Encoder,
|
|
433
|
-
timestamp: _json,
|
|
434
|
-
});
|
|
435
|
-
};
|
|
436
|
-
const se_Messages = (input, context) => {
|
|
437
|
-
return input
|
|
438
|
-
.filter((e) => e != null)
|
|
439
|
-
.map((entry) => {
|
|
440
|
-
return se_Message(entry, context);
|
|
441
|
-
});
|
|
442
|
-
};
|
|
443
|
-
const de_Alarm = (output, context) => {
|
|
444
|
-
return take(output, {
|
|
445
|
-
alarmModelName: __expectString,
|
|
446
|
-
alarmModelVersion: __expectString,
|
|
447
|
-
alarmState: _json,
|
|
448
|
-
creationTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
|
|
449
|
-
keyValue: __expectString,
|
|
450
|
-
lastUpdateTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
|
|
451
|
-
severity: __expectInt32,
|
|
452
|
-
});
|
|
453
|
-
};
|
|
454
|
-
const de_AlarmSummaries = (output, context) => {
|
|
455
|
-
const retVal = (output || [])
|
|
456
|
-
.filter((e) => e != null)
|
|
457
|
-
.map((entry) => {
|
|
458
|
-
return de_AlarmSummary(entry, context);
|
|
459
|
-
});
|
|
460
|
-
return retVal;
|
|
461
|
-
};
|
|
462
|
-
const de_AlarmSummary = (output, context) => {
|
|
463
|
-
return take(output, {
|
|
464
|
-
alarmModelName: __expectString,
|
|
465
|
-
alarmModelVersion: __expectString,
|
|
466
|
-
creationTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
|
|
467
|
-
keyValue: __expectString,
|
|
468
|
-
lastUpdateTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
|
|
469
|
-
stateName: __expectString,
|
|
470
|
-
});
|
|
471
|
-
};
|
|
472
|
-
const de_Detector = (output, context) => {
|
|
473
|
-
return take(output, {
|
|
474
|
-
creationTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
|
|
475
|
-
detectorModelName: __expectString,
|
|
476
|
-
detectorModelVersion: __expectString,
|
|
477
|
-
keyValue: __expectString,
|
|
478
|
-
lastUpdateTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
|
|
479
|
-
state: (_) => de_DetectorState(_, context),
|
|
480
|
-
});
|
|
481
|
-
};
|
|
482
|
-
const de_DetectorState = (output, context) => {
|
|
483
|
-
return take(output, {
|
|
484
|
-
stateName: __expectString,
|
|
485
|
-
timers: (_) => de_Timers(_, context),
|
|
486
|
-
variables: _json,
|
|
487
|
-
});
|
|
488
|
-
};
|
|
489
|
-
const de_DetectorSummaries = (output, context) => {
|
|
490
|
-
const retVal = (output || [])
|
|
491
|
-
.filter((e) => e != null)
|
|
492
|
-
.map((entry) => {
|
|
493
|
-
return de_DetectorSummary(entry, context);
|
|
494
|
-
});
|
|
495
|
-
return retVal;
|
|
496
|
-
};
|
|
497
|
-
const de_DetectorSummary = (output, context) => {
|
|
498
|
-
return take(output, {
|
|
499
|
-
creationTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
|
|
500
|
-
detectorModelName: __expectString,
|
|
501
|
-
detectorModelVersion: __expectString,
|
|
502
|
-
keyValue: __expectString,
|
|
503
|
-
lastUpdateTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
|
|
504
|
-
state: _json,
|
|
505
|
-
});
|
|
506
|
-
};
|
|
507
|
-
const de_Timer = (output, context) => {
|
|
508
|
-
return take(output, {
|
|
509
|
-
name: __expectString,
|
|
510
|
-
timestamp: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
|
|
511
|
-
});
|
|
512
|
-
};
|
|
513
|
-
const de_Timers = (output, context) => {
|
|
514
|
-
const retVal = (output || [])
|
|
515
|
-
.filter((e) => e != null)
|
|
516
|
-
.map((entry) => {
|
|
517
|
-
return de_Timer(entry, context);
|
|
518
|
-
});
|
|
519
|
-
return retVal;
|
|
520
|
-
};
|
|
521
|
-
const deserializeMetadata = (output) => ({
|
|
522
|
-
httpStatusCode: output.statusCode,
|
|
523
|
-
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
|
|
524
|
-
extendedRequestId: output.headers["x-amz-id-2"],
|
|
525
|
-
cfId: output.headers["x-amz-cf-id"],
|
|
526
|
-
});
|
|
527
|
-
const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
|
|
528
|
-
const _kV = "keyValue";
|
|
529
|
-
const _mR = "maxResults";
|
|
530
|
-
const _nT = "nextToken";
|
|
531
|
-
const _sN = "stateName";
|
|
@@ -1,110 +0,0 @@
|
|
|
1
|
-
import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http";
|
|
2
|
-
import { SerdeContext as __SerdeContext } from "@smithy/types";
|
|
3
|
-
import { BatchAcknowledgeAlarmCommandInput, BatchAcknowledgeAlarmCommandOutput } from "../commands/BatchAcknowledgeAlarmCommand";
|
|
4
|
-
import { BatchDeleteDetectorCommandInput, BatchDeleteDetectorCommandOutput } from "../commands/BatchDeleteDetectorCommand";
|
|
5
|
-
import { BatchDisableAlarmCommandInput, BatchDisableAlarmCommandOutput } from "../commands/BatchDisableAlarmCommand";
|
|
6
|
-
import { BatchEnableAlarmCommandInput, BatchEnableAlarmCommandOutput } from "../commands/BatchEnableAlarmCommand";
|
|
7
|
-
import { BatchPutMessageCommandInput, BatchPutMessageCommandOutput } from "../commands/BatchPutMessageCommand";
|
|
8
|
-
import { BatchResetAlarmCommandInput, BatchResetAlarmCommandOutput } from "../commands/BatchResetAlarmCommand";
|
|
9
|
-
import { BatchSnoozeAlarmCommandInput, BatchSnoozeAlarmCommandOutput } from "../commands/BatchSnoozeAlarmCommand";
|
|
10
|
-
import { BatchUpdateDetectorCommandInput, BatchUpdateDetectorCommandOutput } from "../commands/BatchUpdateDetectorCommand";
|
|
11
|
-
import { DescribeAlarmCommandInput, DescribeAlarmCommandOutput } from "../commands/DescribeAlarmCommand";
|
|
12
|
-
import { DescribeDetectorCommandInput, DescribeDetectorCommandOutput } from "../commands/DescribeDetectorCommand";
|
|
13
|
-
import { ListAlarmsCommandInput, ListAlarmsCommandOutput } from "../commands/ListAlarmsCommand";
|
|
14
|
-
import { ListDetectorsCommandInput, ListDetectorsCommandOutput } from "../commands/ListDetectorsCommand";
|
|
15
|
-
/**
|
|
16
|
-
* serializeAws_restJson1BatchAcknowledgeAlarmCommand
|
|
17
|
-
*/
|
|
18
|
-
export declare const se_BatchAcknowledgeAlarmCommand: (input: BatchAcknowledgeAlarmCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
|
|
19
|
-
/**
|
|
20
|
-
* serializeAws_restJson1BatchDeleteDetectorCommand
|
|
21
|
-
*/
|
|
22
|
-
export declare const se_BatchDeleteDetectorCommand: (input: BatchDeleteDetectorCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
|
|
23
|
-
/**
|
|
24
|
-
* serializeAws_restJson1BatchDisableAlarmCommand
|
|
25
|
-
*/
|
|
26
|
-
export declare const se_BatchDisableAlarmCommand: (input: BatchDisableAlarmCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
|
|
27
|
-
/**
|
|
28
|
-
* serializeAws_restJson1BatchEnableAlarmCommand
|
|
29
|
-
*/
|
|
30
|
-
export declare const se_BatchEnableAlarmCommand: (input: BatchEnableAlarmCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
|
|
31
|
-
/**
|
|
32
|
-
* serializeAws_restJson1BatchPutMessageCommand
|
|
33
|
-
*/
|
|
34
|
-
export declare const se_BatchPutMessageCommand: (input: BatchPutMessageCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
|
|
35
|
-
/**
|
|
36
|
-
* serializeAws_restJson1BatchResetAlarmCommand
|
|
37
|
-
*/
|
|
38
|
-
export declare const se_BatchResetAlarmCommand: (input: BatchResetAlarmCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
|
|
39
|
-
/**
|
|
40
|
-
* serializeAws_restJson1BatchSnoozeAlarmCommand
|
|
41
|
-
*/
|
|
42
|
-
export declare const se_BatchSnoozeAlarmCommand: (input: BatchSnoozeAlarmCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
|
|
43
|
-
/**
|
|
44
|
-
* serializeAws_restJson1BatchUpdateDetectorCommand
|
|
45
|
-
*/
|
|
46
|
-
export declare const se_BatchUpdateDetectorCommand: (input: BatchUpdateDetectorCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
|
|
47
|
-
/**
|
|
48
|
-
* serializeAws_restJson1DescribeAlarmCommand
|
|
49
|
-
*/
|
|
50
|
-
export declare const se_DescribeAlarmCommand: (input: DescribeAlarmCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
|
|
51
|
-
/**
|
|
52
|
-
* serializeAws_restJson1DescribeDetectorCommand
|
|
53
|
-
*/
|
|
54
|
-
export declare const se_DescribeDetectorCommand: (input: DescribeDetectorCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
|
|
55
|
-
/**
|
|
56
|
-
* serializeAws_restJson1ListAlarmsCommand
|
|
57
|
-
*/
|
|
58
|
-
export declare const se_ListAlarmsCommand: (input: ListAlarmsCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
|
|
59
|
-
/**
|
|
60
|
-
* serializeAws_restJson1ListDetectorsCommand
|
|
61
|
-
*/
|
|
62
|
-
export declare const se_ListDetectorsCommand: (input: ListDetectorsCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
|
|
63
|
-
/**
|
|
64
|
-
* deserializeAws_restJson1BatchAcknowledgeAlarmCommand
|
|
65
|
-
*/
|
|
66
|
-
export declare const de_BatchAcknowledgeAlarmCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<BatchAcknowledgeAlarmCommandOutput>;
|
|
67
|
-
/**
|
|
68
|
-
* deserializeAws_restJson1BatchDeleteDetectorCommand
|
|
69
|
-
*/
|
|
70
|
-
export declare const de_BatchDeleteDetectorCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<BatchDeleteDetectorCommandOutput>;
|
|
71
|
-
/**
|
|
72
|
-
* deserializeAws_restJson1BatchDisableAlarmCommand
|
|
73
|
-
*/
|
|
74
|
-
export declare const de_BatchDisableAlarmCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<BatchDisableAlarmCommandOutput>;
|
|
75
|
-
/**
|
|
76
|
-
* deserializeAws_restJson1BatchEnableAlarmCommand
|
|
77
|
-
*/
|
|
78
|
-
export declare const de_BatchEnableAlarmCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<BatchEnableAlarmCommandOutput>;
|
|
79
|
-
/**
|
|
80
|
-
* deserializeAws_restJson1BatchPutMessageCommand
|
|
81
|
-
*/
|
|
82
|
-
export declare const de_BatchPutMessageCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<BatchPutMessageCommandOutput>;
|
|
83
|
-
/**
|
|
84
|
-
* deserializeAws_restJson1BatchResetAlarmCommand
|
|
85
|
-
*/
|
|
86
|
-
export declare const de_BatchResetAlarmCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<BatchResetAlarmCommandOutput>;
|
|
87
|
-
/**
|
|
88
|
-
* deserializeAws_restJson1BatchSnoozeAlarmCommand
|
|
89
|
-
*/
|
|
90
|
-
export declare const de_BatchSnoozeAlarmCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<BatchSnoozeAlarmCommandOutput>;
|
|
91
|
-
/**
|
|
92
|
-
* deserializeAws_restJson1BatchUpdateDetectorCommand
|
|
93
|
-
*/
|
|
94
|
-
export declare const de_BatchUpdateDetectorCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<BatchUpdateDetectorCommandOutput>;
|
|
95
|
-
/**
|
|
96
|
-
* deserializeAws_restJson1DescribeAlarmCommand
|
|
97
|
-
*/
|
|
98
|
-
export declare const de_DescribeAlarmCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<DescribeAlarmCommandOutput>;
|
|
99
|
-
/**
|
|
100
|
-
* deserializeAws_restJson1DescribeDetectorCommand
|
|
101
|
-
*/
|
|
102
|
-
export declare const de_DescribeDetectorCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<DescribeDetectorCommandOutput>;
|
|
103
|
-
/**
|
|
104
|
-
* deserializeAws_restJson1ListAlarmsCommand
|
|
105
|
-
*/
|
|
106
|
-
export declare const de_ListAlarmsCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<ListAlarmsCommandOutput>;
|
|
107
|
-
/**
|
|
108
|
-
* deserializeAws_restJson1ListDetectorsCommand
|
|
109
|
-
*/
|
|
110
|
-
export declare const de_ListDetectorsCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<ListDetectorsCommandOutput>;
|