@aws-sdk/client-iot-events 3.476.0 → 3.477.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/protocols/Aws_restJson1.js +144 -332
- package/dist-es/protocols/Aws_restJson1.js +145 -333
- package/package.json +5 -4
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
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,
|
|
1
|
+
import { requestBuilder as rb } from "@smithy/core";
|
|
2
|
+
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";
|
|
3
3
|
import { IoTEventsServiceException as __BaseException } from "../models/IoTEventsServiceException";
|
|
4
4
|
import { InternalFailureException, InvalidRequestException, LimitExceededException, ResourceAlreadyExistsException, ResourceInUseException, ResourceNotFoundException, ServiceUnavailableException, ThrottlingException, UnsupportedOperationException, } from "../models/models_0";
|
|
5
5
|
export const se_CreateAlarmModelCommand = async (input, context) => {
|
|
6
|
-
const
|
|
6
|
+
const b = rb(input, context);
|
|
7
7
|
const headers = {
|
|
8
8
|
"content-type": "application/json",
|
|
9
9
|
};
|
|
10
|
-
|
|
10
|
+
b.bp("/alarm-models");
|
|
11
11
|
let body;
|
|
12
12
|
body = JSON.stringify(take(input, {
|
|
13
13
|
alarmCapabilities: (_) => _json(_),
|
|
@@ -21,22 +21,15 @@ export const se_CreateAlarmModelCommand = async (input, context) => {
|
|
|
21
21
|
severity: [],
|
|
22
22
|
tags: (_) => _json(_),
|
|
23
23
|
}));
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
hostname,
|
|
27
|
-
port,
|
|
28
|
-
method: "POST",
|
|
29
|
-
headers,
|
|
30
|
-
path: resolvedPath,
|
|
31
|
-
body,
|
|
32
|
-
});
|
|
24
|
+
b.m("POST").h(headers).b(body);
|
|
25
|
+
return b.build();
|
|
33
26
|
};
|
|
34
27
|
export const se_CreateDetectorModelCommand = async (input, context) => {
|
|
35
|
-
const
|
|
28
|
+
const b = rb(input, context);
|
|
36
29
|
const headers = {
|
|
37
30
|
"content-type": "application/json",
|
|
38
31
|
};
|
|
39
|
-
|
|
32
|
+
b.bp("/detector-models");
|
|
40
33
|
let body;
|
|
41
34
|
body = JSON.stringify(take(input, {
|
|
42
35
|
detectorModelDefinition: (_) => se_DetectorModelDefinition(_, context),
|
|
@@ -47,22 +40,15 @@ export const se_CreateDetectorModelCommand = async (input, context) => {
|
|
|
47
40
|
roleArn: [],
|
|
48
41
|
tags: (_) => _json(_),
|
|
49
42
|
}));
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
hostname,
|
|
53
|
-
port,
|
|
54
|
-
method: "POST",
|
|
55
|
-
headers,
|
|
56
|
-
path: resolvedPath,
|
|
57
|
-
body,
|
|
58
|
-
});
|
|
43
|
+
b.m("POST").h(headers).b(body);
|
|
44
|
+
return b.build();
|
|
59
45
|
};
|
|
60
46
|
export const se_CreateInputCommand = async (input, context) => {
|
|
61
|
-
const
|
|
47
|
+
const b = rb(input, context);
|
|
62
48
|
const headers = {
|
|
63
49
|
"content-type": "application/json",
|
|
64
50
|
};
|
|
65
|
-
|
|
51
|
+
b.bp("/inputs");
|
|
66
52
|
let body;
|
|
67
53
|
body = JSON.stringify(take(input, {
|
|
68
54
|
inputDefinition: (_) => _json(_),
|
|
@@ -70,414 +56,254 @@ export const se_CreateInputCommand = async (input, context) => {
|
|
|
70
56
|
inputName: [],
|
|
71
57
|
tags: (_) => _json(_),
|
|
72
58
|
}));
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
hostname,
|
|
76
|
-
port,
|
|
77
|
-
method: "POST",
|
|
78
|
-
headers,
|
|
79
|
-
path: resolvedPath,
|
|
80
|
-
body,
|
|
81
|
-
});
|
|
59
|
+
b.m("POST").h(headers).b(body);
|
|
60
|
+
return b.build();
|
|
82
61
|
};
|
|
83
62
|
export const se_DeleteAlarmModelCommand = async (input, context) => {
|
|
84
|
-
const
|
|
63
|
+
const b = rb(input, context);
|
|
85
64
|
const headers = {};
|
|
86
|
-
|
|
87
|
-
|
|
65
|
+
b.bp("/alarm-models/{alarmModelName}");
|
|
66
|
+
b.p("alarmModelName", () => input.alarmModelName, "{alarmModelName}", false);
|
|
88
67
|
let body;
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
hostname,
|
|
92
|
-
port,
|
|
93
|
-
method: "DELETE",
|
|
94
|
-
headers,
|
|
95
|
-
path: resolvedPath,
|
|
96
|
-
body,
|
|
97
|
-
});
|
|
68
|
+
b.m("DELETE").h(headers).b(body);
|
|
69
|
+
return b.build();
|
|
98
70
|
};
|
|
99
71
|
export const se_DeleteDetectorModelCommand = async (input, context) => {
|
|
100
|
-
const
|
|
72
|
+
const b = rb(input, context);
|
|
101
73
|
const headers = {};
|
|
102
|
-
|
|
103
|
-
|
|
74
|
+
b.bp("/detector-models/{detectorModelName}");
|
|
75
|
+
b.p("detectorModelName", () => input.detectorModelName, "{detectorModelName}", false);
|
|
104
76
|
let body;
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
hostname,
|
|
108
|
-
port,
|
|
109
|
-
method: "DELETE",
|
|
110
|
-
headers,
|
|
111
|
-
path: resolvedPath,
|
|
112
|
-
body,
|
|
113
|
-
});
|
|
77
|
+
b.m("DELETE").h(headers).b(body);
|
|
78
|
+
return b.build();
|
|
114
79
|
};
|
|
115
80
|
export const se_DeleteInputCommand = async (input, context) => {
|
|
116
|
-
const
|
|
81
|
+
const b = rb(input, context);
|
|
117
82
|
const headers = {};
|
|
118
|
-
|
|
119
|
-
|
|
83
|
+
b.bp("/inputs/{inputName}");
|
|
84
|
+
b.p("inputName", () => input.inputName, "{inputName}", false);
|
|
120
85
|
let body;
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
hostname,
|
|
124
|
-
port,
|
|
125
|
-
method: "DELETE",
|
|
126
|
-
headers,
|
|
127
|
-
path: resolvedPath,
|
|
128
|
-
body,
|
|
129
|
-
});
|
|
86
|
+
b.m("DELETE").h(headers).b(body);
|
|
87
|
+
return b.build();
|
|
130
88
|
};
|
|
131
89
|
export const se_DescribeAlarmModelCommand = async (input, context) => {
|
|
132
|
-
const
|
|
90
|
+
const b = rb(input, context);
|
|
133
91
|
const headers = {};
|
|
134
|
-
|
|
135
|
-
|
|
92
|
+
b.bp("/alarm-models/{alarmModelName}");
|
|
93
|
+
b.p("alarmModelName", () => input.alarmModelName, "{alarmModelName}", false);
|
|
136
94
|
const query = map({
|
|
137
|
-
|
|
95
|
+
[_v]: [, input[_aMV]],
|
|
138
96
|
});
|
|
139
97
|
let body;
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
hostname,
|
|
143
|
-
port,
|
|
144
|
-
method: "GET",
|
|
145
|
-
headers,
|
|
146
|
-
path: resolvedPath,
|
|
147
|
-
query,
|
|
148
|
-
body,
|
|
149
|
-
});
|
|
98
|
+
b.m("GET").h(headers).q(query).b(body);
|
|
99
|
+
return b.build();
|
|
150
100
|
};
|
|
151
101
|
export const se_DescribeDetectorModelCommand = async (input, context) => {
|
|
152
|
-
const
|
|
102
|
+
const b = rb(input, context);
|
|
153
103
|
const headers = {};
|
|
154
|
-
|
|
155
|
-
|
|
104
|
+
b.bp("/detector-models/{detectorModelName}");
|
|
105
|
+
b.p("detectorModelName", () => input.detectorModelName, "{detectorModelName}", false);
|
|
156
106
|
const query = map({
|
|
157
|
-
|
|
107
|
+
[_v]: [, input[_dMV]],
|
|
158
108
|
});
|
|
159
109
|
let body;
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
hostname,
|
|
163
|
-
port,
|
|
164
|
-
method: "GET",
|
|
165
|
-
headers,
|
|
166
|
-
path: resolvedPath,
|
|
167
|
-
query,
|
|
168
|
-
body,
|
|
169
|
-
});
|
|
110
|
+
b.m("GET").h(headers).q(query).b(body);
|
|
111
|
+
return b.build();
|
|
170
112
|
};
|
|
171
113
|
export const se_DescribeDetectorModelAnalysisCommand = async (input, context) => {
|
|
172
|
-
const
|
|
114
|
+
const b = rb(input, context);
|
|
173
115
|
const headers = {};
|
|
174
|
-
|
|
175
|
-
|
|
116
|
+
b.bp("/analysis/detector-models/{analysisId}");
|
|
117
|
+
b.p("analysisId", () => input.analysisId, "{analysisId}", false);
|
|
176
118
|
let body;
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
hostname,
|
|
180
|
-
port,
|
|
181
|
-
method: "GET",
|
|
182
|
-
headers,
|
|
183
|
-
path: resolvedPath,
|
|
184
|
-
body,
|
|
185
|
-
});
|
|
119
|
+
b.m("GET").h(headers).b(body);
|
|
120
|
+
return b.build();
|
|
186
121
|
};
|
|
187
122
|
export const se_DescribeInputCommand = async (input, context) => {
|
|
188
|
-
const
|
|
123
|
+
const b = rb(input, context);
|
|
189
124
|
const headers = {};
|
|
190
|
-
|
|
191
|
-
|
|
125
|
+
b.bp("/inputs/{inputName}");
|
|
126
|
+
b.p("inputName", () => input.inputName, "{inputName}", false);
|
|
192
127
|
let body;
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
hostname,
|
|
196
|
-
port,
|
|
197
|
-
method: "GET",
|
|
198
|
-
headers,
|
|
199
|
-
path: resolvedPath,
|
|
200
|
-
body,
|
|
201
|
-
});
|
|
128
|
+
b.m("GET").h(headers).b(body);
|
|
129
|
+
return b.build();
|
|
202
130
|
};
|
|
203
131
|
export const se_DescribeLoggingOptionsCommand = async (input, context) => {
|
|
204
|
-
const
|
|
132
|
+
const b = rb(input, context);
|
|
205
133
|
const headers = {
|
|
206
134
|
"content-type": "application/json",
|
|
207
135
|
};
|
|
208
|
-
|
|
136
|
+
b.bp("/logging");
|
|
209
137
|
let body;
|
|
210
138
|
body = "";
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
hostname,
|
|
214
|
-
port,
|
|
215
|
-
method: "GET",
|
|
216
|
-
headers,
|
|
217
|
-
path: resolvedPath,
|
|
218
|
-
body,
|
|
219
|
-
});
|
|
139
|
+
b.m("GET").h(headers).b(body);
|
|
140
|
+
return b.build();
|
|
220
141
|
};
|
|
221
142
|
export const se_GetDetectorModelAnalysisResultsCommand = async (input, context) => {
|
|
222
|
-
const
|
|
143
|
+
const b = rb(input, context);
|
|
223
144
|
const headers = {};
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
resolvedPath = __resolvedPath(resolvedPath, input, "analysisId", () => input.analysisId, "{analysisId}", false);
|
|
145
|
+
b.bp("/analysis/detector-models/{analysisId}/results");
|
|
146
|
+
b.p("analysisId", () => input.analysisId, "{analysisId}", false);
|
|
227
147
|
const query = map({
|
|
228
|
-
|
|
229
|
-
|
|
148
|
+
[_nT]: [, input[_nT]],
|
|
149
|
+
[_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
|
|
230
150
|
});
|
|
231
151
|
let body;
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
hostname,
|
|
235
|
-
port,
|
|
236
|
-
method: "GET",
|
|
237
|
-
headers,
|
|
238
|
-
path: resolvedPath,
|
|
239
|
-
query,
|
|
240
|
-
body,
|
|
241
|
-
});
|
|
152
|
+
b.m("GET").h(headers).q(query).b(body);
|
|
153
|
+
return b.build();
|
|
242
154
|
};
|
|
243
155
|
export const se_ListAlarmModelsCommand = async (input, context) => {
|
|
244
|
-
const
|
|
156
|
+
const b = rb(input, context);
|
|
245
157
|
const headers = {};
|
|
246
|
-
|
|
158
|
+
b.bp("/alarm-models");
|
|
247
159
|
const query = map({
|
|
248
|
-
|
|
249
|
-
|
|
160
|
+
[_nT]: [, input[_nT]],
|
|
161
|
+
[_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
|
|
250
162
|
});
|
|
251
163
|
let body;
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
hostname,
|
|
255
|
-
port,
|
|
256
|
-
method: "GET",
|
|
257
|
-
headers,
|
|
258
|
-
path: resolvedPath,
|
|
259
|
-
query,
|
|
260
|
-
body,
|
|
261
|
-
});
|
|
164
|
+
b.m("GET").h(headers).q(query).b(body);
|
|
165
|
+
return b.build();
|
|
262
166
|
};
|
|
263
167
|
export const se_ListAlarmModelVersionsCommand = async (input, context) => {
|
|
264
|
-
const
|
|
168
|
+
const b = rb(input, context);
|
|
265
169
|
const headers = {};
|
|
266
|
-
|
|
267
|
-
|
|
170
|
+
b.bp("/alarm-models/{alarmModelName}/versions");
|
|
171
|
+
b.p("alarmModelName", () => input.alarmModelName, "{alarmModelName}", false);
|
|
268
172
|
const query = map({
|
|
269
|
-
|
|
270
|
-
|
|
173
|
+
[_nT]: [, input[_nT]],
|
|
174
|
+
[_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
|
|
271
175
|
});
|
|
272
176
|
let body;
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
hostname,
|
|
276
|
-
port,
|
|
277
|
-
method: "GET",
|
|
278
|
-
headers,
|
|
279
|
-
path: resolvedPath,
|
|
280
|
-
query,
|
|
281
|
-
body,
|
|
282
|
-
});
|
|
177
|
+
b.m("GET").h(headers).q(query).b(body);
|
|
178
|
+
return b.build();
|
|
283
179
|
};
|
|
284
180
|
export const se_ListDetectorModelsCommand = async (input, context) => {
|
|
285
|
-
const
|
|
181
|
+
const b = rb(input, context);
|
|
286
182
|
const headers = {};
|
|
287
|
-
|
|
183
|
+
b.bp("/detector-models");
|
|
288
184
|
const query = map({
|
|
289
|
-
|
|
290
|
-
|
|
185
|
+
[_nT]: [, input[_nT]],
|
|
186
|
+
[_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
|
|
291
187
|
});
|
|
292
188
|
let body;
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
hostname,
|
|
296
|
-
port,
|
|
297
|
-
method: "GET",
|
|
298
|
-
headers,
|
|
299
|
-
path: resolvedPath,
|
|
300
|
-
query,
|
|
301
|
-
body,
|
|
302
|
-
});
|
|
189
|
+
b.m("GET").h(headers).q(query).b(body);
|
|
190
|
+
return b.build();
|
|
303
191
|
};
|
|
304
192
|
export const se_ListDetectorModelVersionsCommand = async (input, context) => {
|
|
305
|
-
const
|
|
193
|
+
const b = rb(input, context);
|
|
306
194
|
const headers = {};
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
resolvedPath = __resolvedPath(resolvedPath, input, "detectorModelName", () => input.detectorModelName, "{detectorModelName}", false);
|
|
195
|
+
b.bp("/detector-models/{detectorModelName}/versions");
|
|
196
|
+
b.p("detectorModelName", () => input.detectorModelName, "{detectorModelName}", false);
|
|
310
197
|
const query = map({
|
|
311
|
-
|
|
312
|
-
|
|
198
|
+
[_nT]: [, input[_nT]],
|
|
199
|
+
[_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
|
|
313
200
|
});
|
|
314
201
|
let body;
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
hostname,
|
|
318
|
-
port,
|
|
319
|
-
method: "GET",
|
|
320
|
-
headers,
|
|
321
|
-
path: resolvedPath,
|
|
322
|
-
query,
|
|
323
|
-
body,
|
|
324
|
-
});
|
|
202
|
+
b.m("GET").h(headers).q(query).b(body);
|
|
203
|
+
return b.build();
|
|
325
204
|
};
|
|
326
205
|
export const se_ListInputRoutingsCommand = async (input, context) => {
|
|
327
|
-
const
|
|
206
|
+
const b = rb(input, context);
|
|
328
207
|
const headers = {
|
|
329
208
|
"content-type": "application/json",
|
|
330
209
|
};
|
|
331
|
-
|
|
210
|
+
b.bp("/input-routings");
|
|
332
211
|
let body;
|
|
333
212
|
body = JSON.stringify(take(input, {
|
|
334
213
|
inputIdentifier: (_) => _json(_),
|
|
335
214
|
maxResults: [],
|
|
336
215
|
nextToken: [],
|
|
337
216
|
}));
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
hostname,
|
|
341
|
-
port,
|
|
342
|
-
method: "POST",
|
|
343
|
-
headers,
|
|
344
|
-
path: resolvedPath,
|
|
345
|
-
body,
|
|
346
|
-
});
|
|
217
|
+
b.m("POST").h(headers).b(body);
|
|
218
|
+
return b.build();
|
|
347
219
|
};
|
|
348
220
|
export const se_ListInputsCommand = async (input, context) => {
|
|
349
|
-
const
|
|
221
|
+
const b = rb(input, context);
|
|
350
222
|
const headers = {};
|
|
351
|
-
|
|
223
|
+
b.bp("/inputs");
|
|
352
224
|
const query = map({
|
|
353
|
-
|
|
354
|
-
|
|
225
|
+
[_nT]: [, input[_nT]],
|
|
226
|
+
[_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
|
|
355
227
|
});
|
|
356
228
|
let body;
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
hostname,
|
|
360
|
-
port,
|
|
361
|
-
method: "GET",
|
|
362
|
-
headers,
|
|
363
|
-
path: resolvedPath,
|
|
364
|
-
query,
|
|
365
|
-
body,
|
|
366
|
-
});
|
|
229
|
+
b.m("GET").h(headers).q(query).b(body);
|
|
230
|
+
return b.build();
|
|
367
231
|
};
|
|
368
232
|
export const se_ListTagsForResourceCommand = async (input, context) => {
|
|
369
|
-
const
|
|
233
|
+
const b = rb(input, context);
|
|
370
234
|
const headers = {};
|
|
371
|
-
|
|
235
|
+
b.bp("/tags");
|
|
372
236
|
const query = map({
|
|
373
|
-
|
|
237
|
+
[_rA]: [, __expectNonNull(input[_rA], `resourceArn`)],
|
|
374
238
|
});
|
|
375
239
|
let body;
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
hostname,
|
|
379
|
-
port,
|
|
380
|
-
method: "GET",
|
|
381
|
-
headers,
|
|
382
|
-
path: resolvedPath,
|
|
383
|
-
query,
|
|
384
|
-
body,
|
|
385
|
-
});
|
|
240
|
+
b.m("GET").h(headers).q(query).b(body);
|
|
241
|
+
return b.build();
|
|
386
242
|
};
|
|
387
243
|
export const se_PutLoggingOptionsCommand = async (input, context) => {
|
|
388
|
-
const
|
|
244
|
+
const b = rb(input, context);
|
|
389
245
|
const headers = {
|
|
390
246
|
"content-type": "application/json",
|
|
391
247
|
};
|
|
392
|
-
|
|
248
|
+
b.bp("/logging");
|
|
393
249
|
let body;
|
|
394
250
|
body = JSON.stringify(take(input, {
|
|
395
251
|
loggingOptions: (_) => _json(_),
|
|
396
252
|
}));
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
hostname,
|
|
400
|
-
port,
|
|
401
|
-
method: "PUT",
|
|
402
|
-
headers,
|
|
403
|
-
path: resolvedPath,
|
|
404
|
-
body,
|
|
405
|
-
});
|
|
253
|
+
b.m("PUT").h(headers).b(body);
|
|
254
|
+
return b.build();
|
|
406
255
|
};
|
|
407
256
|
export const se_StartDetectorModelAnalysisCommand = async (input, context) => {
|
|
408
|
-
const
|
|
257
|
+
const b = rb(input, context);
|
|
409
258
|
const headers = {
|
|
410
259
|
"content-type": "application/json",
|
|
411
260
|
};
|
|
412
|
-
|
|
261
|
+
b.bp("/analysis/detector-models");
|
|
413
262
|
let body;
|
|
414
263
|
body = JSON.stringify(take(input, {
|
|
415
264
|
detectorModelDefinition: (_) => se_DetectorModelDefinition(_, context),
|
|
416
265
|
}));
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
hostname,
|
|
420
|
-
port,
|
|
421
|
-
method: "POST",
|
|
422
|
-
headers,
|
|
423
|
-
path: resolvedPath,
|
|
424
|
-
body,
|
|
425
|
-
});
|
|
266
|
+
b.m("POST").h(headers).b(body);
|
|
267
|
+
return b.build();
|
|
426
268
|
};
|
|
427
269
|
export const se_TagResourceCommand = async (input, context) => {
|
|
428
|
-
const
|
|
270
|
+
const b = rb(input, context);
|
|
429
271
|
const headers = {
|
|
430
272
|
"content-type": "application/json",
|
|
431
273
|
};
|
|
432
|
-
|
|
274
|
+
b.bp("/tags");
|
|
433
275
|
const query = map({
|
|
434
|
-
|
|
276
|
+
[_rA]: [, __expectNonNull(input[_rA], `resourceArn`)],
|
|
435
277
|
});
|
|
436
278
|
let body;
|
|
437
279
|
body = JSON.stringify(take(input, {
|
|
438
280
|
tags: (_) => _json(_),
|
|
439
281
|
}));
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
hostname,
|
|
443
|
-
port,
|
|
444
|
-
method: "POST",
|
|
445
|
-
headers,
|
|
446
|
-
path: resolvedPath,
|
|
447
|
-
query,
|
|
448
|
-
body,
|
|
449
|
-
});
|
|
282
|
+
b.m("POST").h(headers).q(query).b(body);
|
|
283
|
+
return b.build();
|
|
450
284
|
};
|
|
451
285
|
export const se_UntagResourceCommand = async (input, context) => {
|
|
452
|
-
const
|
|
286
|
+
const b = rb(input, context);
|
|
453
287
|
const headers = {};
|
|
454
|
-
|
|
288
|
+
b.bp("/tags");
|
|
455
289
|
const query = map({
|
|
456
|
-
|
|
457
|
-
|
|
290
|
+
[_rA]: [, __expectNonNull(input[_rA], `resourceArn`)],
|
|
291
|
+
[_tK]: [
|
|
458
292
|
__expectNonNull(input.tagKeys, `tagKeys`) != null,
|
|
459
|
-
() => (input
|
|
293
|
+
() => (input[_tK] || []).map((_entry) => _entry),
|
|
460
294
|
],
|
|
461
295
|
});
|
|
462
296
|
let body;
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
hostname,
|
|
466
|
-
port,
|
|
467
|
-
method: "DELETE",
|
|
468
|
-
headers,
|
|
469
|
-
path: resolvedPath,
|
|
470
|
-
query,
|
|
471
|
-
body,
|
|
472
|
-
});
|
|
297
|
+
b.m("DELETE").h(headers).q(query).b(body);
|
|
298
|
+
return b.build();
|
|
473
299
|
};
|
|
474
300
|
export const se_UpdateAlarmModelCommand = async (input, context) => {
|
|
475
|
-
const
|
|
301
|
+
const b = rb(input, context);
|
|
476
302
|
const headers = {
|
|
477
303
|
"content-type": "application/json",
|
|
478
304
|
};
|
|
479
|
-
|
|
480
|
-
|
|
305
|
+
b.bp("/alarm-models/{alarmModelName}");
|
|
306
|
+
b.p("alarmModelName", () => input.alarmModelName, "{alarmModelName}", false);
|
|
481
307
|
let body;
|
|
482
308
|
body = JSON.stringify(take(input, {
|
|
483
309
|
alarmCapabilities: (_) => _json(_),
|
|
@@ -488,23 +314,16 @@ export const se_UpdateAlarmModelCommand = async (input, context) => {
|
|
|
488
314
|
roleArn: [],
|
|
489
315
|
severity: [],
|
|
490
316
|
}));
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
hostname,
|
|
494
|
-
port,
|
|
495
|
-
method: "POST",
|
|
496
|
-
headers,
|
|
497
|
-
path: resolvedPath,
|
|
498
|
-
body,
|
|
499
|
-
});
|
|
317
|
+
b.m("POST").h(headers).b(body);
|
|
318
|
+
return b.build();
|
|
500
319
|
};
|
|
501
320
|
export const se_UpdateDetectorModelCommand = async (input, context) => {
|
|
502
|
-
const
|
|
321
|
+
const b = rb(input, context);
|
|
503
322
|
const headers = {
|
|
504
323
|
"content-type": "application/json",
|
|
505
324
|
};
|
|
506
|
-
|
|
507
|
-
|
|
325
|
+
b.bp("/detector-models/{detectorModelName}");
|
|
326
|
+
b.p("detectorModelName", () => input.detectorModelName, "{detectorModelName}", false);
|
|
508
327
|
let body;
|
|
509
328
|
body = JSON.stringify(take(input, {
|
|
510
329
|
detectorModelDefinition: (_) => se_DetectorModelDefinition(_, context),
|
|
@@ -512,37 +331,23 @@ export const se_UpdateDetectorModelCommand = async (input, context) => {
|
|
|
512
331
|
evaluationMethod: [],
|
|
513
332
|
roleArn: [],
|
|
514
333
|
}));
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
hostname,
|
|
518
|
-
port,
|
|
519
|
-
method: "POST",
|
|
520
|
-
headers,
|
|
521
|
-
path: resolvedPath,
|
|
522
|
-
body,
|
|
523
|
-
});
|
|
334
|
+
b.m("POST").h(headers).b(body);
|
|
335
|
+
return b.build();
|
|
524
336
|
};
|
|
525
337
|
export const se_UpdateInputCommand = async (input, context) => {
|
|
526
|
-
const
|
|
338
|
+
const b = rb(input, context);
|
|
527
339
|
const headers = {
|
|
528
340
|
"content-type": "application/json",
|
|
529
341
|
};
|
|
530
|
-
|
|
531
|
-
|
|
342
|
+
b.bp("/inputs/{inputName}");
|
|
343
|
+
b.p("inputName", () => input.inputName, "{inputName}", false);
|
|
532
344
|
let body;
|
|
533
345
|
body = JSON.stringify(take(input, {
|
|
534
346
|
inputDefinition: (_) => _json(_),
|
|
535
347
|
inputDescription: [],
|
|
536
348
|
}));
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
hostname,
|
|
540
|
-
port,
|
|
541
|
-
method: "PUT",
|
|
542
|
-
headers,
|
|
543
|
-
path: resolvedPath,
|
|
544
|
-
body,
|
|
545
|
-
});
|
|
349
|
+
b.m("PUT").h(headers).b(body);
|
|
350
|
+
return b.build();
|
|
546
351
|
};
|
|
547
352
|
export const de_CreateAlarmModelCommand = async (output, context) => {
|
|
548
353
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
@@ -2017,6 +1822,13 @@ const isSerializableHeaderValue = (value) => value !== undefined &&
|
|
|
2017
1822
|
value !== "" &&
|
|
2018
1823
|
(!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
|
|
2019
1824
|
(!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
|
|
1825
|
+
const _aMV = "alarmModelVersion";
|
|
1826
|
+
const _dMV = "detectorModelVersion";
|
|
1827
|
+
const _mR = "maxResults";
|
|
1828
|
+
const _nT = "nextToken";
|
|
1829
|
+
const _rA = "resourceArn";
|
|
1830
|
+
const _tK = "tagKeys";
|
|
1831
|
+
const _v = "version";
|
|
2020
1832
|
const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
|
|
2021
1833
|
if (encoded.length) {
|
|
2022
1834
|
return JSON.parse(encoded);
|