@aws-sdk/client-auto-scaling-plans 3.185.0 → 3.188.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 +16 -0
- package/dist-es/AutoScalingPlans.js +26 -33
- package/dist-es/AutoScalingPlansClient.js +22 -28
- package/dist-es/commands/CreateScalingPlanCommand.js +21 -28
- package/dist-es/commands/DeleteScalingPlanCommand.js +21 -28
- package/dist-es/commands/DescribeScalingPlanResourcesCommand.js +21 -28
- package/dist-es/commands/DescribeScalingPlansCommand.js +21 -28
- package/dist-es/commands/GetScalingPlanResourceForecastDataCommand.js +21 -28
- package/dist-es/commands/UpdateScalingPlanCommand.js +21 -28
- package/dist-es/endpoints.js +8 -8
- package/dist-es/models/AutoScalingPlansServiceException.js +5 -10
- package/dist-es/models/models_0.js +147 -98
- package/dist-es/protocols/Aws_json1_1.js +622 -700
- package/dist-es/runtimeConfig.browser.js +26 -12
- package/dist-es/runtimeConfig.js +30 -12
- package/dist-es/runtimeConfig.native.js +8 -5
- package/dist-es/runtimeConfig.shared.js +8 -11
- package/package.json +33 -33
|
@@ -1,639 +1,584 @@
|
|
|
1
|
-
import { __assign, __awaiter, __generator } from "tslib";
|
|
2
1
|
import { HttpRequest as __HttpRequest } from "@aws-sdk/protocol-http";
|
|
3
2
|
import { decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, expectLong as __expectLong, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectString as __expectString, limitedParseDouble as __limitedParseDouble, parseEpochTimestamp as __parseEpochTimestamp, serializeFloat as __serializeFloat, throwDefaultError, } from "@aws-sdk/smithy-client";
|
|
4
3
|
import { AutoScalingPlansServiceException as __BaseException } from "../models/AutoScalingPlansServiceException";
|
|
5
4
|
import { ConcurrentUpdateException, InternalServiceException, InvalidNextTokenException, LimitExceededException, ObjectNotFoundException, ValidationException, } from "../models/models_0";
|
|
6
|
-
export
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
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
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
export var deserializeAws_json1_1DescribeScalingPlanResourcesCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
199
|
-
var data, contents, response;
|
|
200
|
-
return __generator(this, function (_a) {
|
|
201
|
-
switch (_a.label) {
|
|
202
|
-
case 0:
|
|
203
|
-
if (output.statusCode >= 300) {
|
|
204
|
-
return [2, deserializeAws_json1_1DescribeScalingPlanResourcesCommandError(output, context)];
|
|
205
|
-
}
|
|
206
|
-
return [4, parseBody(output.body, context)];
|
|
207
|
-
case 1:
|
|
208
|
-
data = _a.sent();
|
|
209
|
-
contents = {};
|
|
210
|
-
contents = deserializeAws_json1_1DescribeScalingPlanResourcesResponse(data, context);
|
|
211
|
-
response = __assign({ $metadata: deserializeMetadata(output) }, contents);
|
|
212
|
-
return [2, Promise.resolve(response)];
|
|
213
|
-
}
|
|
214
|
-
});
|
|
215
|
-
}); };
|
|
216
|
-
var deserializeAws_json1_1DescribeScalingPlanResourcesCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
217
|
-
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
218
|
-
var _c;
|
|
219
|
-
return __generator(this, function (_d) {
|
|
220
|
-
switch (_d.label) {
|
|
221
|
-
case 0:
|
|
222
|
-
_a = [__assign({}, output)];
|
|
223
|
-
_c = {};
|
|
224
|
-
return [4, parseErrorBody(output.body, context)];
|
|
225
|
-
case 1:
|
|
226
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
227
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
228
|
-
_b = errorCode;
|
|
229
|
-
switch (_b) {
|
|
230
|
-
case "ConcurrentUpdateException": return [3, 2];
|
|
231
|
-
case "com.amazonaws.autoscalingplans#ConcurrentUpdateException": return [3, 2];
|
|
232
|
-
case "InternalServiceException": return [3, 4];
|
|
233
|
-
case "com.amazonaws.autoscalingplans#InternalServiceException": return [3, 4];
|
|
234
|
-
case "InvalidNextTokenException": return [3, 6];
|
|
235
|
-
case "com.amazonaws.autoscalingplans#InvalidNextTokenException": return [3, 6];
|
|
236
|
-
case "ValidationException": return [3, 8];
|
|
237
|
-
case "com.amazonaws.autoscalingplans#ValidationException": return [3, 8];
|
|
238
|
-
}
|
|
239
|
-
return [3, 10];
|
|
240
|
-
case 2: return [4, deserializeAws_json1_1ConcurrentUpdateExceptionResponse(parsedOutput, context)];
|
|
241
|
-
case 3: throw _d.sent();
|
|
242
|
-
case 4: return [4, deserializeAws_json1_1InternalServiceExceptionResponse(parsedOutput, context)];
|
|
243
|
-
case 5: throw _d.sent();
|
|
244
|
-
case 6: return [4, deserializeAws_json1_1InvalidNextTokenExceptionResponse(parsedOutput, context)];
|
|
245
|
-
case 7: throw _d.sent();
|
|
246
|
-
case 8: return [4, deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context)];
|
|
247
|
-
case 9: throw _d.sent();
|
|
248
|
-
case 10:
|
|
249
|
-
parsedBody = parsedOutput.body;
|
|
250
|
-
throwDefaultError({
|
|
251
|
-
output: output,
|
|
252
|
-
parsedBody: parsedBody,
|
|
253
|
-
exceptionCtor: __BaseException,
|
|
254
|
-
errorCode: errorCode,
|
|
255
|
-
});
|
|
256
|
-
_d.label = 11;
|
|
257
|
-
case 11: return [2];
|
|
258
|
-
}
|
|
259
|
-
});
|
|
260
|
-
}); };
|
|
261
|
-
export var deserializeAws_json1_1DescribeScalingPlansCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
262
|
-
var data, contents, response;
|
|
263
|
-
return __generator(this, function (_a) {
|
|
264
|
-
switch (_a.label) {
|
|
265
|
-
case 0:
|
|
266
|
-
if (output.statusCode >= 300) {
|
|
267
|
-
return [2, deserializeAws_json1_1DescribeScalingPlansCommandError(output, context)];
|
|
268
|
-
}
|
|
269
|
-
return [4, parseBody(output.body, context)];
|
|
270
|
-
case 1:
|
|
271
|
-
data = _a.sent();
|
|
272
|
-
contents = {};
|
|
273
|
-
contents = deserializeAws_json1_1DescribeScalingPlansResponse(data, context);
|
|
274
|
-
response = __assign({ $metadata: deserializeMetadata(output) }, contents);
|
|
275
|
-
return [2, Promise.resolve(response)];
|
|
276
|
-
}
|
|
277
|
-
});
|
|
278
|
-
}); };
|
|
279
|
-
var deserializeAws_json1_1DescribeScalingPlansCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
280
|
-
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
281
|
-
var _c;
|
|
282
|
-
return __generator(this, function (_d) {
|
|
283
|
-
switch (_d.label) {
|
|
284
|
-
case 0:
|
|
285
|
-
_a = [__assign({}, output)];
|
|
286
|
-
_c = {};
|
|
287
|
-
return [4, parseErrorBody(output.body, context)];
|
|
288
|
-
case 1:
|
|
289
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
290
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
291
|
-
_b = errorCode;
|
|
292
|
-
switch (_b) {
|
|
293
|
-
case "ConcurrentUpdateException": return [3, 2];
|
|
294
|
-
case "com.amazonaws.autoscalingplans#ConcurrentUpdateException": return [3, 2];
|
|
295
|
-
case "InternalServiceException": return [3, 4];
|
|
296
|
-
case "com.amazonaws.autoscalingplans#InternalServiceException": return [3, 4];
|
|
297
|
-
case "InvalidNextTokenException": return [3, 6];
|
|
298
|
-
case "com.amazonaws.autoscalingplans#InvalidNextTokenException": return [3, 6];
|
|
299
|
-
case "ValidationException": return [3, 8];
|
|
300
|
-
case "com.amazonaws.autoscalingplans#ValidationException": return [3, 8];
|
|
301
|
-
}
|
|
302
|
-
return [3, 10];
|
|
303
|
-
case 2: return [4, deserializeAws_json1_1ConcurrentUpdateExceptionResponse(parsedOutput, context)];
|
|
304
|
-
case 3: throw _d.sent();
|
|
305
|
-
case 4: return [4, deserializeAws_json1_1InternalServiceExceptionResponse(parsedOutput, context)];
|
|
306
|
-
case 5: throw _d.sent();
|
|
307
|
-
case 6: return [4, deserializeAws_json1_1InvalidNextTokenExceptionResponse(parsedOutput, context)];
|
|
308
|
-
case 7: throw _d.sent();
|
|
309
|
-
case 8: return [4, deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context)];
|
|
310
|
-
case 9: throw _d.sent();
|
|
311
|
-
case 10:
|
|
312
|
-
parsedBody = parsedOutput.body;
|
|
313
|
-
throwDefaultError({
|
|
314
|
-
output: output,
|
|
315
|
-
parsedBody: parsedBody,
|
|
316
|
-
exceptionCtor: __BaseException,
|
|
317
|
-
errorCode: errorCode,
|
|
318
|
-
});
|
|
319
|
-
_d.label = 11;
|
|
320
|
-
case 11: return [2];
|
|
321
|
-
}
|
|
322
|
-
});
|
|
323
|
-
}); };
|
|
324
|
-
export var deserializeAws_json1_1GetScalingPlanResourceForecastDataCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
325
|
-
var data, contents, response;
|
|
326
|
-
return __generator(this, function (_a) {
|
|
327
|
-
switch (_a.label) {
|
|
328
|
-
case 0:
|
|
329
|
-
if (output.statusCode >= 300) {
|
|
330
|
-
return [2, deserializeAws_json1_1GetScalingPlanResourceForecastDataCommandError(output, context)];
|
|
331
|
-
}
|
|
332
|
-
return [4, parseBody(output.body, context)];
|
|
333
|
-
case 1:
|
|
334
|
-
data = _a.sent();
|
|
335
|
-
contents = {};
|
|
336
|
-
contents = deserializeAws_json1_1GetScalingPlanResourceForecastDataResponse(data, context);
|
|
337
|
-
response = __assign({ $metadata: deserializeMetadata(output) }, contents);
|
|
338
|
-
return [2, Promise.resolve(response)];
|
|
339
|
-
}
|
|
340
|
-
});
|
|
341
|
-
}); };
|
|
342
|
-
var deserializeAws_json1_1GetScalingPlanResourceForecastDataCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
343
|
-
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
344
|
-
var _c;
|
|
345
|
-
return __generator(this, function (_d) {
|
|
346
|
-
switch (_d.label) {
|
|
347
|
-
case 0:
|
|
348
|
-
_a = [__assign({}, output)];
|
|
349
|
-
_c = {};
|
|
350
|
-
return [4, parseErrorBody(output.body, context)];
|
|
351
|
-
case 1:
|
|
352
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
353
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
354
|
-
_b = errorCode;
|
|
355
|
-
switch (_b) {
|
|
356
|
-
case "InternalServiceException": return [3, 2];
|
|
357
|
-
case "com.amazonaws.autoscalingplans#InternalServiceException": return [3, 2];
|
|
358
|
-
case "ValidationException": return [3, 4];
|
|
359
|
-
case "com.amazonaws.autoscalingplans#ValidationException": return [3, 4];
|
|
360
|
-
}
|
|
361
|
-
return [3, 6];
|
|
362
|
-
case 2: return [4, deserializeAws_json1_1InternalServiceExceptionResponse(parsedOutput, context)];
|
|
363
|
-
case 3: throw _d.sent();
|
|
364
|
-
case 4: return [4, deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context)];
|
|
365
|
-
case 5: throw _d.sent();
|
|
366
|
-
case 6:
|
|
367
|
-
parsedBody = parsedOutput.body;
|
|
368
|
-
throwDefaultError({
|
|
369
|
-
output: output,
|
|
370
|
-
parsedBody: parsedBody,
|
|
371
|
-
exceptionCtor: __BaseException,
|
|
372
|
-
errorCode: errorCode,
|
|
373
|
-
});
|
|
374
|
-
_d.label = 7;
|
|
375
|
-
case 7: return [2];
|
|
376
|
-
}
|
|
377
|
-
});
|
|
378
|
-
}); };
|
|
379
|
-
export var deserializeAws_json1_1UpdateScalingPlanCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
380
|
-
var data, contents, response;
|
|
381
|
-
return __generator(this, function (_a) {
|
|
382
|
-
switch (_a.label) {
|
|
383
|
-
case 0:
|
|
384
|
-
if (output.statusCode >= 300) {
|
|
385
|
-
return [2, deserializeAws_json1_1UpdateScalingPlanCommandError(output, context)];
|
|
386
|
-
}
|
|
387
|
-
return [4, parseBody(output.body, context)];
|
|
388
|
-
case 1:
|
|
389
|
-
data = _a.sent();
|
|
390
|
-
contents = {};
|
|
391
|
-
contents = deserializeAws_json1_1UpdateScalingPlanResponse(data, context);
|
|
392
|
-
response = __assign({ $metadata: deserializeMetadata(output) }, contents);
|
|
393
|
-
return [2, Promise.resolve(response)];
|
|
394
|
-
}
|
|
395
|
-
});
|
|
396
|
-
}); };
|
|
397
|
-
var deserializeAws_json1_1UpdateScalingPlanCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
398
|
-
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
399
|
-
var _c;
|
|
400
|
-
return __generator(this, function (_d) {
|
|
401
|
-
switch (_d.label) {
|
|
402
|
-
case 0:
|
|
403
|
-
_a = [__assign({}, output)];
|
|
404
|
-
_c = {};
|
|
405
|
-
return [4, parseErrorBody(output.body, context)];
|
|
406
|
-
case 1:
|
|
407
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
408
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
409
|
-
_b = errorCode;
|
|
410
|
-
switch (_b) {
|
|
411
|
-
case "ConcurrentUpdateException": return [3, 2];
|
|
412
|
-
case "com.amazonaws.autoscalingplans#ConcurrentUpdateException": return [3, 2];
|
|
413
|
-
case "InternalServiceException": return [3, 4];
|
|
414
|
-
case "com.amazonaws.autoscalingplans#InternalServiceException": return [3, 4];
|
|
415
|
-
case "ObjectNotFoundException": return [3, 6];
|
|
416
|
-
case "com.amazonaws.autoscalingplans#ObjectNotFoundException": return [3, 6];
|
|
417
|
-
case "ValidationException": return [3, 8];
|
|
418
|
-
case "com.amazonaws.autoscalingplans#ValidationException": return [3, 8];
|
|
419
|
-
}
|
|
420
|
-
return [3, 10];
|
|
421
|
-
case 2: return [4, deserializeAws_json1_1ConcurrentUpdateExceptionResponse(parsedOutput, context)];
|
|
422
|
-
case 3: throw _d.sent();
|
|
423
|
-
case 4: return [4, deserializeAws_json1_1InternalServiceExceptionResponse(parsedOutput, context)];
|
|
424
|
-
case 5: throw _d.sent();
|
|
425
|
-
case 6: return [4, deserializeAws_json1_1ObjectNotFoundExceptionResponse(parsedOutput, context)];
|
|
426
|
-
case 7: throw _d.sent();
|
|
427
|
-
case 8: return [4, deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context)];
|
|
428
|
-
case 9: throw _d.sent();
|
|
429
|
-
case 10:
|
|
430
|
-
parsedBody = parsedOutput.body;
|
|
431
|
-
throwDefaultError({
|
|
432
|
-
output: output,
|
|
433
|
-
parsedBody: parsedBody,
|
|
434
|
-
exceptionCtor: __BaseException,
|
|
435
|
-
errorCode: errorCode,
|
|
436
|
-
});
|
|
437
|
-
_d.label = 11;
|
|
438
|
-
case 11: return [2];
|
|
439
|
-
}
|
|
440
|
-
});
|
|
441
|
-
}); };
|
|
442
|
-
var deserializeAws_json1_1ConcurrentUpdateExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
443
|
-
var body, deserialized, exception;
|
|
444
|
-
return __generator(this, function (_a) {
|
|
445
|
-
body = parsedOutput.body;
|
|
446
|
-
deserialized = deserializeAws_json1_1ConcurrentUpdateException(body, context);
|
|
447
|
-
exception = new ConcurrentUpdateException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
|
|
448
|
-
return [2, __decorateServiceException(exception, body)];
|
|
449
|
-
});
|
|
450
|
-
}); };
|
|
451
|
-
var deserializeAws_json1_1InternalServiceExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
452
|
-
var body, deserialized, exception;
|
|
453
|
-
return __generator(this, function (_a) {
|
|
454
|
-
body = parsedOutput.body;
|
|
455
|
-
deserialized = deserializeAws_json1_1InternalServiceException(body, context);
|
|
456
|
-
exception = new InternalServiceException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
|
|
457
|
-
return [2, __decorateServiceException(exception, body)];
|
|
458
|
-
});
|
|
459
|
-
}); };
|
|
460
|
-
var deserializeAws_json1_1InvalidNextTokenExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
461
|
-
var body, deserialized, exception;
|
|
462
|
-
return __generator(this, function (_a) {
|
|
463
|
-
body = parsedOutput.body;
|
|
464
|
-
deserialized = deserializeAws_json1_1InvalidNextTokenException(body, context);
|
|
465
|
-
exception = new InvalidNextTokenException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
|
|
466
|
-
return [2, __decorateServiceException(exception, body)];
|
|
467
|
-
});
|
|
468
|
-
}); };
|
|
469
|
-
var deserializeAws_json1_1LimitExceededExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
470
|
-
var body, deserialized, exception;
|
|
471
|
-
return __generator(this, function (_a) {
|
|
472
|
-
body = parsedOutput.body;
|
|
473
|
-
deserialized = deserializeAws_json1_1LimitExceededException(body, context);
|
|
474
|
-
exception = new LimitExceededException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
|
|
475
|
-
return [2, __decorateServiceException(exception, body)];
|
|
476
|
-
});
|
|
477
|
-
}); };
|
|
478
|
-
var deserializeAws_json1_1ObjectNotFoundExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
479
|
-
var body, deserialized, exception;
|
|
480
|
-
return __generator(this, function (_a) {
|
|
481
|
-
body = parsedOutput.body;
|
|
482
|
-
deserialized = deserializeAws_json1_1ObjectNotFoundException(body, context);
|
|
483
|
-
exception = new ObjectNotFoundException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
|
|
484
|
-
return [2, __decorateServiceException(exception, body)];
|
|
485
|
-
});
|
|
486
|
-
}); };
|
|
487
|
-
var deserializeAws_json1_1ValidationExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
488
|
-
var body, deserialized, exception;
|
|
489
|
-
return __generator(this, function (_a) {
|
|
490
|
-
body = parsedOutput.body;
|
|
491
|
-
deserialized = deserializeAws_json1_1ValidationException(body, context);
|
|
492
|
-
exception = new ValidationException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
|
|
493
|
-
return [2, __decorateServiceException(exception, body)];
|
|
494
|
-
});
|
|
495
|
-
}); };
|
|
496
|
-
var serializeAws_json1_1ApplicationSource = function (input, context) {
|
|
497
|
-
return __assign(__assign({}, (input.CloudFormationStackARN != null && { CloudFormationStackARN: input.CloudFormationStackARN })), (input.TagFilters != null && { TagFilters: serializeAws_json1_1TagFilters(input.TagFilters, context) }));
|
|
5
|
+
export const serializeAws_json1_1CreateScalingPlanCommand = async (input, context) => {
|
|
6
|
+
const headers = {
|
|
7
|
+
"content-type": "application/x-amz-json-1.1",
|
|
8
|
+
"x-amz-target": "AnyScaleScalingPlannerFrontendService.CreateScalingPlan",
|
|
9
|
+
};
|
|
10
|
+
let body;
|
|
11
|
+
body = JSON.stringify(serializeAws_json1_1CreateScalingPlanRequest(input, context));
|
|
12
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
13
|
+
};
|
|
14
|
+
export const serializeAws_json1_1DeleteScalingPlanCommand = async (input, context) => {
|
|
15
|
+
const headers = {
|
|
16
|
+
"content-type": "application/x-amz-json-1.1",
|
|
17
|
+
"x-amz-target": "AnyScaleScalingPlannerFrontendService.DeleteScalingPlan",
|
|
18
|
+
};
|
|
19
|
+
let body;
|
|
20
|
+
body = JSON.stringify(serializeAws_json1_1DeleteScalingPlanRequest(input, context));
|
|
21
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
22
|
+
};
|
|
23
|
+
export const serializeAws_json1_1DescribeScalingPlanResourcesCommand = async (input, context) => {
|
|
24
|
+
const headers = {
|
|
25
|
+
"content-type": "application/x-amz-json-1.1",
|
|
26
|
+
"x-amz-target": "AnyScaleScalingPlannerFrontendService.DescribeScalingPlanResources",
|
|
27
|
+
};
|
|
28
|
+
let body;
|
|
29
|
+
body = JSON.stringify(serializeAws_json1_1DescribeScalingPlanResourcesRequest(input, context));
|
|
30
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
31
|
+
};
|
|
32
|
+
export const serializeAws_json1_1DescribeScalingPlansCommand = async (input, context) => {
|
|
33
|
+
const headers = {
|
|
34
|
+
"content-type": "application/x-amz-json-1.1",
|
|
35
|
+
"x-amz-target": "AnyScaleScalingPlannerFrontendService.DescribeScalingPlans",
|
|
36
|
+
};
|
|
37
|
+
let body;
|
|
38
|
+
body = JSON.stringify(serializeAws_json1_1DescribeScalingPlansRequest(input, context));
|
|
39
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
40
|
+
};
|
|
41
|
+
export const serializeAws_json1_1GetScalingPlanResourceForecastDataCommand = async (input, context) => {
|
|
42
|
+
const headers = {
|
|
43
|
+
"content-type": "application/x-amz-json-1.1",
|
|
44
|
+
"x-amz-target": "AnyScaleScalingPlannerFrontendService.GetScalingPlanResourceForecastData",
|
|
45
|
+
};
|
|
46
|
+
let body;
|
|
47
|
+
body = JSON.stringify(serializeAws_json1_1GetScalingPlanResourceForecastDataRequest(input, context));
|
|
48
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
49
|
+
};
|
|
50
|
+
export const serializeAws_json1_1UpdateScalingPlanCommand = async (input, context) => {
|
|
51
|
+
const headers = {
|
|
52
|
+
"content-type": "application/x-amz-json-1.1",
|
|
53
|
+
"x-amz-target": "AnyScaleScalingPlannerFrontendService.UpdateScalingPlan",
|
|
54
|
+
};
|
|
55
|
+
let body;
|
|
56
|
+
body = JSON.stringify(serializeAws_json1_1UpdateScalingPlanRequest(input, context));
|
|
57
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
58
|
+
};
|
|
59
|
+
export const deserializeAws_json1_1CreateScalingPlanCommand = async (output, context) => {
|
|
60
|
+
if (output.statusCode >= 300) {
|
|
61
|
+
return deserializeAws_json1_1CreateScalingPlanCommandError(output, context);
|
|
62
|
+
}
|
|
63
|
+
const data = await parseBody(output.body, context);
|
|
64
|
+
let contents = {};
|
|
65
|
+
contents = deserializeAws_json1_1CreateScalingPlanResponse(data, context);
|
|
66
|
+
const response = {
|
|
67
|
+
$metadata: deserializeMetadata(output),
|
|
68
|
+
...contents,
|
|
69
|
+
};
|
|
70
|
+
return Promise.resolve(response);
|
|
71
|
+
};
|
|
72
|
+
const deserializeAws_json1_1CreateScalingPlanCommandError = async (output, context) => {
|
|
73
|
+
const parsedOutput = {
|
|
74
|
+
...output,
|
|
75
|
+
body: await parseErrorBody(output.body, context),
|
|
76
|
+
};
|
|
77
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
78
|
+
switch (errorCode) {
|
|
79
|
+
case "ConcurrentUpdateException":
|
|
80
|
+
case "com.amazonaws.autoscalingplans#ConcurrentUpdateException":
|
|
81
|
+
throw await deserializeAws_json1_1ConcurrentUpdateExceptionResponse(parsedOutput, context);
|
|
82
|
+
case "InternalServiceException":
|
|
83
|
+
case "com.amazonaws.autoscalingplans#InternalServiceException":
|
|
84
|
+
throw await deserializeAws_json1_1InternalServiceExceptionResponse(parsedOutput, context);
|
|
85
|
+
case "LimitExceededException":
|
|
86
|
+
case "com.amazonaws.autoscalingplans#LimitExceededException":
|
|
87
|
+
throw await deserializeAws_json1_1LimitExceededExceptionResponse(parsedOutput, context);
|
|
88
|
+
case "ValidationException":
|
|
89
|
+
case "com.amazonaws.autoscalingplans#ValidationException":
|
|
90
|
+
throw await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context);
|
|
91
|
+
default:
|
|
92
|
+
const parsedBody = parsedOutput.body;
|
|
93
|
+
throwDefaultError({
|
|
94
|
+
output,
|
|
95
|
+
parsedBody,
|
|
96
|
+
exceptionCtor: __BaseException,
|
|
97
|
+
errorCode,
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
};
|
|
101
|
+
export const deserializeAws_json1_1DeleteScalingPlanCommand = async (output, context) => {
|
|
102
|
+
if (output.statusCode >= 300) {
|
|
103
|
+
return deserializeAws_json1_1DeleteScalingPlanCommandError(output, context);
|
|
104
|
+
}
|
|
105
|
+
const data = await parseBody(output.body, context);
|
|
106
|
+
let contents = {};
|
|
107
|
+
contents = deserializeAws_json1_1DeleteScalingPlanResponse(data, context);
|
|
108
|
+
const response = {
|
|
109
|
+
$metadata: deserializeMetadata(output),
|
|
110
|
+
...contents,
|
|
111
|
+
};
|
|
112
|
+
return Promise.resolve(response);
|
|
113
|
+
};
|
|
114
|
+
const deserializeAws_json1_1DeleteScalingPlanCommandError = async (output, context) => {
|
|
115
|
+
const parsedOutput = {
|
|
116
|
+
...output,
|
|
117
|
+
body: await parseErrorBody(output.body, context),
|
|
118
|
+
};
|
|
119
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
120
|
+
switch (errorCode) {
|
|
121
|
+
case "ConcurrentUpdateException":
|
|
122
|
+
case "com.amazonaws.autoscalingplans#ConcurrentUpdateException":
|
|
123
|
+
throw await deserializeAws_json1_1ConcurrentUpdateExceptionResponse(parsedOutput, context);
|
|
124
|
+
case "InternalServiceException":
|
|
125
|
+
case "com.amazonaws.autoscalingplans#InternalServiceException":
|
|
126
|
+
throw await deserializeAws_json1_1InternalServiceExceptionResponse(parsedOutput, context);
|
|
127
|
+
case "ObjectNotFoundException":
|
|
128
|
+
case "com.amazonaws.autoscalingplans#ObjectNotFoundException":
|
|
129
|
+
throw await deserializeAws_json1_1ObjectNotFoundExceptionResponse(parsedOutput, context);
|
|
130
|
+
case "ValidationException":
|
|
131
|
+
case "com.amazonaws.autoscalingplans#ValidationException":
|
|
132
|
+
throw await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context);
|
|
133
|
+
default:
|
|
134
|
+
const parsedBody = parsedOutput.body;
|
|
135
|
+
throwDefaultError({
|
|
136
|
+
output,
|
|
137
|
+
parsedBody,
|
|
138
|
+
exceptionCtor: __BaseException,
|
|
139
|
+
errorCode,
|
|
140
|
+
});
|
|
141
|
+
}
|
|
142
|
+
};
|
|
143
|
+
export const deserializeAws_json1_1DescribeScalingPlanResourcesCommand = async (output, context) => {
|
|
144
|
+
if (output.statusCode >= 300) {
|
|
145
|
+
return deserializeAws_json1_1DescribeScalingPlanResourcesCommandError(output, context);
|
|
146
|
+
}
|
|
147
|
+
const data = await parseBody(output.body, context);
|
|
148
|
+
let contents = {};
|
|
149
|
+
contents = deserializeAws_json1_1DescribeScalingPlanResourcesResponse(data, context);
|
|
150
|
+
const response = {
|
|
151
|
+
$metadata: deserializeMetadata(output),
|
|
152
|
+
...contents,
|
|
153
|
+
};
|
|
154
|
+
return Promise.resolve(response);
|
|
155
|
+
};
|
|
156
|
+
const deserializeAws_json1_1DescribeScalingPlanResourcesCommandError = async (output, context) => {
|
|
157
|
+
const parsedOutput = {
|
|
158
|
+
...output,
|
|
159
|
+
body: await parseErrorBody(output.body, context),
|
|
160
|
+
};
|
|
161
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
162
|
+
switch (errorCode) {
|
|
163
|
+
case "ConcurrentUpdateException":
|
|
164
|
+
case "com.amazonaws.autoscalingplans#ConcurrentUpdateException":
|
|
165
|
+
throw await deserializeAws_json1_1ConcurrentUpdateExceptionResponse(parsedOutput, context);
|
|
166
|
+
case "InternalServiceException":
|
|
167
|
+
case "com.amazonaws.autoscalingplans#InternalServiceException":
|
|
168
|
+
throw await deserializeAws_json1_1InternalServiceExceptionResponse(parsedOutput, context);
|
|
169
|
+
case "InvalidNextTokenException":
|
|
170
|
+
case "com.amazonaws.autoscalingplans#InvalidNextTokenException":
|
|
171
|
+
throw await deserializeAws_json1_1InvalidNextTokenExceptionResponse(parsedOutput, context);
|
|
172
|
+
case "ValidationException":
|
|
173
|
+
case "com.amazonaws.autoscalingplans#ValidationException":
|
|
174
|
+
throw await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context);
|
|
175
|
+
default:
|
|
176
|
+
const parsedBody = parsedOutput.body;
|
|
177
|
+
throwDefaultError({
|
|
178
|
+
output,
|
|
179
|
+
parsedBody,
|
|
180
|
+
exceptionCtor: __BaseException,
|
|
181
|
+
errorCode,
|
|
182
|
+
});
|
|
183
|
+
}
|
|
184
|
+
};
|
|
185
|
+
export const deserializeAws_json1_1DescribeScalingPlansCommand = async (output, context) => {
|
|
186
|
+
if (output.statusCode >= 300) {
|
|
187
|
+
return deserializeAws_json1_1DescribeScalingPlansCommandError(output, context);
|
|
188
|
+
}
|
|
189
|
+
const data = await parseBody(output.body, context);
|
|
190
|
+
let contents = {};
|
|
191
|
+
contents = deserializeAws_json1_1DescribeScalingPlansResponse(data, context);
|
|
192
|
+
const response = {
|
|
193
|
+
$metadata: deserializeMetadata(output),
|
|
194
|
+
...contents,
|
|
195
|
+
};
|
|
196
|
+
return Promise.resolve(response);
|
|
498
197
|
};
|
|
499
|
-
|
|
198
|
+
const deserializeAws_json1_1DescribeScalingPlansCommandError = async (output, context) => {
|
|
199
|
+
const parsedOutput = {
|
|
200
|
+
...output,
|
|
201
|
+
body: await parseErrorBody(output.body, context),
|
|
202
|
+
};
|
|
203
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
204
|
+
switch (errorCode) {
|
|
205
|
+
case "ConcurrentUpdateException":
|
|
206
|
+
case "com.amazonaws.autoscalingplans#ConcurrentUpdateException":
|
|
207
|
+
throw await deserializeAws_json1_1ConcurrentUpdateExceptionResponse(parsedOutput, context);
|
|
208
|
+
case "InternalServiceException":
|
|
209
|
+
case "com.amazonaws.autoscalingplans#InternalServiceException":
|
|
210
|
+
throw await deserializeAws_json1_1InternalServiceExceptionResponse(parsedOutput, context);
|
|
211
|
+
case "InvalidNextTokenException":
|
|
212
|
+
case "com.amazonaws.autoscalingplans#InvalidNextTokenException":
|
|
213
|
+
throw await deserializeAws_json1_1InvalidNextTokenExceptionResponse(parsedOutput, context);
|
|
214
|
+
case "ValidationException":
|
|
215
|
+
case "com.amazonaws.autoscalingplans#ValidationException":
|
|
216
|
+
throw await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context);
|
|
217
|
+
default:
|
|
218
|
+
const parsedBody = parsedOutput.body;
|
|
219
|
+
throwDefaultError({
|
|
220
|
+
output,
|
|
221
|
+
parsedBody,
|
|
222
|
+
exceptionCtor: __BaseException,
|
|
223
|
+
errorCode,
|
|
224
|
+
});
|
|
225
|
+
}
|
|
226
|
+
};
|
|
227
|
+
export const deserializeAws_json1_1GetScalingPlanResourceForecastDataCommand = async (output, context) => {
|
|
228
|
+
if (output.statusCode >= 300) {
|
|
229
|
+
return deserializeAws_json1_1GetScalingPlanResourceForecastDataCommandError(output, context);
|
|
230
|
+
}
|
|
231
|
+
const data = await parseBody(output.body, context);
|
|
232
|
+
let contents = {};
|
|
233
|
+
contents = deserializeAws_json1_1GetScalingPlanResourceForecastDataResponse(data, context);
|
|
234
|
+
const response = {
|
|
235
|
+
$metadata: deserializeMetadata(output),
|
|
236
|
+
...contents,
|
|
237
|
+
};
|
|
238
|
+
return Promise.resolve(response);
|
|
239
|
+
};
|
|
240
|
+
const deserializeAws_json1_1GetScalingPlanResourceForecastDataCommandError = async (output, context) => {
|
|
241
|
+
const parsedOutput = {
|
|
242
|
+
...output,
|
|
243
|
+
body: await parseErrorBody(output.body, context),
|
|
244
|
+
};
|
|
245
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
246
|
+
switch (errorCode) {
|
|
247
|
+
case "InternalServiceException":
|
|
248
|
+
case "com.amazonaws.autoscalingplans#InternalServiceException":
|
|
249
|
+
throw await deserializeAws_json1_1InternalServiceExceptionResponse(parsedOutput, context);
|
|
250
|
+
case "ValidationException":
|
|
251
|
+
case "com.amazonaws.autoscalingplans#ValidationException":
|
|
252
|
+
throw await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context);
|
|
253
|
+
default:
|
|
254
|
+
const parsedBody = parsedOutput.body;
|
|
255
|
+
throwDefaultError({
|
|
256
|
+
output,
|
|
257
|
+
parsedBody,
|
|
258
|
+
exceptionCtor: __BaseException,
|
|
259
|
+
errorCode,
|
|
260
|
+
});
|
|
261
|
+
}
|
|
262
|
+
};
|
|
263
|
+
export const deserializeAws_json1_1UpdateScalingPlanCommand = async (output, context) => {
|
|
264
|
+
if (output.statusCode >= 300) {
|
|
265
|
+
return deserializeAws_json1_1UpdateScalingPlanCommandError(output, context);
|
|
266
|
+
}
|
|
267
|
+
const data = await parseBody(output.body, context);
|
|
268
|
+
let contents = {};
|
|
269
|
+
contents = deserializeAws_json1_1UpdateScalingPlanResponse(data, context);
|
|
270
|
+
const response = {
|
|
271
|
+
$metadata: deserializeMetadata(output),
|
|
272
|
+
...contents,
|
|
273
|
+
};
|
|
274
|
+
return Promise.resolve(response);
|
|
275
|
+
};
|
|
276
|
+
const deserializeAws_json1_1UpdateScalingPlanCommandError = async (output, context) => {
|
|
277
|
+
const parsedOutput = {
|
|
278
|
+
...output,
|
|
279
|
+
body: await parseErrorBody(output.body, context),
|
|
280
|
+
};
|
|
281
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
282
|
+
switch (errorCode) {
|
|
283
|
+
case "ConcurrentUpdateException":
|
|
284
|
+
case "com.amazonaws.autoscalingplans#ConcurrentUpdateException":
|
|
285
|
+
throw await deserializeAws_json1_1ConcurrentUpdateExceptionResponse(parsedOutput, context);
|
|
286
|
+
case "InternalServiceException":
|
|
287
|
+
case "com.amazonaws.autoscalingplans#InternalServiceException":
|
|
288
|
+
throw await deserializeAws_json1_1InternalServiceExceptionResponse(parsedOutput, context);
|
|
289
|
+
case "ObjectNotFoundException":
|
|
290
|
+
case "com.amazonaws.autoscalingplans#ObjectNotFoundException":
|
|
291
|
+
throw await deserializeAws_json1_1ObjectNotFoundExceptionResponse(parsedOutput, context);
|
|
292
|
+
case "ValidationException":
|
|
293
|
+
case "com.amazonaws.autoscalingplans#ValidationException":
|
|
294
|
+
throw await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context);
|
|
295
|
+
default:
|
|
296
|
+
const parsedBody = parsedOutput.body;
|
|
297
|
+
throwDefaultError({
|
|
298
|
+
output,
|
|
299
|
+
parsedBody,
|
|
300
|
+
exceptionCtor: __BaseException,
|
|
301
|
+
errorCode,
|
|
302
|
+
});
|
|
303
|
+
}
|
|
304
|
+
};
|
|
305
|
+
const deserializeAws_json1_1ConcurrentUpdateExceptionResponse = async (parsedOutput, context) => {
|
|
306
|
+
const body = parsedOutput.body;
|
|
307
|
+
const deserialized = deserializeAws_json1_1ConcurrentUpdateException(body, context);
|
|
308
|
+
const exception = new ConcurrentUpdateException({
|
|
309
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
310
|
+
...deserialized,
|
|
311
|
+
});
|
|
312
|
+
return __decorateServiceException(exception, body);
|
|
313
|
+
};
|
|
314
|
+
const deserializeAws_json1_1InternalServiceExceptionResponse = async (parsedOutput, context) => {
|
|
315
|
+
const body = parsedOutput.body;
|
|
316
|
+
const deserialized = deserializeAws_json1_1InternalServiceException(body, context);
|
|
317
|
+
const exception = new InternalServiceException({
|
|
318
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
319
|
+
...deserialized,
|
|
320
|
+
});
|
|
321
|
+
return __decorateServiceException(exception, body);
|
|
322
|
+
};
|
|
323
|
+
const deserializeAws_json1_1InvalidNextTokenExceptionResponse = async (parsedOutput, context) => {
|
|
324
|
+
const body = parsedOutput.body;
|
|
325
|
+
const deserialized = deserializeAws_json1_1InvalidNextTokenException(body, context);
|
|
326
|
+
const exception = new InvalidNextTokenException({
|
|
327
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
328
|
+
...deserialized,
|
|
329
|
+
});
|
|
330
|
+
return __decorateServiceException(exception, body);
|
|
331
|
+
};
|
|
332
|
+
const deserializeAws_json1_1LimitExceededExceptionResponse = async (parsedOutput, context) => {
|
|
333
|
+
const body = parsedOutput.body;
|
|
334
|
+
const deserialized = deserializeAws_json1_1LimitExceededException(body, context);
|
|
335
|
+
const exception = new LimitExceededException({
|
|
336
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
337
|
+
...deserialized,
|
|
338
|
+
});
|
|
339
|
+
return __decorateServiceException(exception, body);
|
|
340
|
+
};
|
|
341
|
+
const deserializeAws_json1_1ObjectNotFoundExceptionResponse = async (parsedOutput, context) => {
|
|
342
|
+
const body = parsedOutput.body;
|
|
343
|
+
const deserialized = deserializeAws_json1_1ObjectNotFoundException(body, context);
|
|
344
|
+
const exception = new ObjectNotFoundException({
|
|
345
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
346
|
+
...deserialized,
|
|
347
|
+
});
|
|
348
|
+
return __decorateServiceException(exception, body);
|
|
349
|
+
};
|
|
350
|
+
const deserializeAws_json1_1ValidationExceptionResponse = async (parsedOutput, context) => {
|
|
351
|
+
const body = parsedOutput.body;
|
|
352
|
+
const deserialized = deserializeAws_json1_1ValidationException(body, context);
|
|
353
|
+
const exception = new ValidationException({
|
|
354
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
355
|
+
...deserialized,
|
|
356
|
+
});
|
|
357
|
+
return __decorateServiceException(exception, body);
|
|
358
|
+
};
|
|
359
|
+
const serializeAws_json1_1ApplicationSource = (input, context) => {
|
|
360
|
+
return {
|
|
361
|
+
...(input.CloudFormationStackARN != null && { CloudFormationStackARN: input.CloudFormationStackARN }),
|
|
362
|
+
...(input.TagFilters != null && { TagFilters: serializeAws_json1_1TagFilters(input.TagFilters, context) }),
|
|
363
|
+
};
|
|
364
|
+
};
|
|
365
|
+
const serializeAws_json1_1ApplicationSources = (input, context) => {
|
|
500
366
|
return input
|
|
501
|
-
.filter(
|
|
502
|
-
.map(
|
|
367
|
+
.filter((e) => e != null)
|
|
368
|
+
.map((entry) => {
|
|
503
369
|
return serializeAws_json1_1ApplicationSource(entry, context);
|
|
504
370
|
});
|
|
505
371
|
};
|
|
506
|
-
|
|
507
|
-
return
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
372
|
+
const serializeAws_json1_1CreateScalingPlanRequest = (input, context) => {
|
|
373
|
+
return {
|
|
374
|
+
...(input.ApplicationSource != null && {
|
|
375
|
+
ApplicationSource: serializeAws_json1_1ApplicationSource(input.ApplicationSource, context),
|
|
376
|
+
}),
|
|
377
|
+
...(input.ScalingInstructions != null && {
|
|
378
|
+
ScalingInstructions: serializeAws_json1_1ScalingInstructions(input.ScalingInstructions, context),
|
|
379
|
+
}),
|
|
380
|
+
...(input.ScalingPlanName != null && { ScalingPlanName: input.ScalingPlanName }),
|
|
381
|
+
};
|
|
512
382
|
};
|
|
513
|
-
|
|
514
|
-
return
|
|
383
|
+
const serializeAws_json1_1CustomizedLoadMetricSpecification = (input, context) => {
|
|
384
|
+
return {
|
|
385
|
+
...(input.Dimensions != null && { Dimensions: serializeAws_json1_1MetricDimensions(input.Dimensions, context) }),
|
|
386
|
+
...(input.MetricName != null && { MetricName: input.MetricName }),
|
|
387
|
+
...(input.Namespace != null && { Namespace: input.Namespace }),
|
|
388
|
+
...(input.Statistic != null && { Statistic: input.Statistic }),
|
|
389
|
+
...(input.Unit != null && { Unit: input.Unit }),
|
|
390
|
+
};
|
|
515
391
|
};
|
|
516
|
-
|
|
517
|
-
return
|
|
392
|
+
const serializeAws_json1_1CustomizedScalingMetricSpecification = (input, context) => {
|
|
393
|
+
return {
|
|
394
|
+
...(input.Dimensions != null && { Dimensions: serializeAws_json1_1MetricDimensions(input.Dimensions, context) }),
|
|
395
|
+
...(input.MetricName != null && { MetricName: input.MetricName }),
|
|
396
|
+
...(input.Namespace != null && { Namespace: input.Namespace }),
|
|
397
|
+
...(input.Statistic != null && { Statistic: input.Statistic }),
|
|
398
|
+
...(input.Unit != null && { Unit: input.Unit }),
|
|
399
|
+
};
|
|
518
400
|
};
|
|
519
|
-
|
|
520
|
-
return
|
|
401
|
+
const serializeAws_json1_1DeleteScalingPlanRequest = (input, context) => {
|
|
402
|
+
return {
|
|
403
|
+
...(input.ScalingPlanName != null && { ScalingPlanName: input.ScalingPlanName }),
|
|
404
|
+
...(input.ScalingPlanVersion != null && { ScalingPlanVersion: input.ScalingPlanVersion }),
|
|
405
|
+
};
|
|
521
406
|
};
|
|
522
|
-
|
|
523
|
-
return
|
|
407
|
+
const serializeAws_json1_1DescribeScalingPlanResourcesRequest = (input, context) => {
|
|
408
|
+
return {
|
|
409
|
+
...(input.MaxResults != null && { MaxResults: input.MaxResults }),
|
|
410
|
+
...(input.NextToken != null && { NextToken: input.NextToken }),
|
|
411
|
+
...(input.ScalingPlanName != null && { ScalingPlanName: input.ScalingPlanName }),
|
|
412
|
+
...(input.ScalingPlanVersion != null && { ScalingPlanVersion: input.ScalingPlanVersion }),
|
|
413
|
+
};
|
|
524
414
|
};
|
|
525
|
-
|
|
526
|
-
return
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
415
|
+
const serializeAws_json1_1DescribeScalingPlansRequest = (input, context) => {
|
|
416
|
+
return {
|
|
417
|
+
...(input.ApplicationSources != null && {
|
|
418
|
+
ApplicationSources: serializeAws_json1_1ApplicationSources(input.ApplicationSources, context),
|
|
419
|
+
}),
|
|
420
|
+
...(input.MaxResults != null && { MaxResults: input.MaxResults }),
|
|
421
|
+
...(input.NextToken != null && { NextToken: input.NextToken }),
|
|
422
|
+
...(input.ScalingPlanNames != null && {
|
|
423
|
+
ScalingPlanNames: serializeAws_json1_1ScalingPlanNames(input.ScalingPlanNames, context),
|
|
424
|
+
}),
|
|
425
|
+
...(input.ScalingPlanVersion != null && { ScalingPlanVersion: input.ScalingPlanVersion }),
|
|
426
|
+
};
|
|
531
427
|
};
|
|
532
|
-
|
|
533
|
-
return
|
|
428
|
+
const serializeAws_json1_1GetScalingPlanResourceForecastDataRequest = (input, context) => {
|
|
429
|
+
return {
|
|
430
|
+
...(input.EndTime != null && { EndTime: Math.round(input.EndTime.getTime() / 1000) }),
|
|
431
|
+
...(input.ForecastDataType != null && { ForecastDataType: input.ForecastDataType }),
|
|
432
|
+
...(input.ResourceId != null && { ResourceId: input.ResourceId }),
|
|
433
|
+
...(input.ScalableDimension != null && { ScalableDimension: input.ScalableDimension }),
|
|
434
|
+
...(input.ScalingPlanName != null && { ScalingPlanName: input.ScalingPlanName }),
|
|
435
|
+
...(input.ScalingPlanVersion != null && { ScalingPlanVersion: input.ScalingPlanVersion }),
|
|
436
|
+
...(input.ServiceNamespace != null && { ServiceNamespace: input.ServiceNamespace }),
|
|
437
|
+
...(input.StartTime != null && { StartTime: Math.round(input.StartTime.getTime() / 1000) }),
|
|
438
|
+
};
|
|
534
439
|
};
|
|
535
|
-
|
|
536
|
-
return
|
|
440
|
+
const serializeAws_json1_1MetricDimension = (input, context) => {
|
|
441
|
+
return {
|
|
442
|
+
...(input.Name != null && { Name: input.Name }),
|
|
443
|
+
...(input.Value != null && { Value: input.Value }),
|
|
444
|
+
};
|
|
537
445
|
};
|
|
538
|
-
|
|
446
|
+
const serializeAws_json1_1MetricDimensions = (input, context) => {
|
|
539
447
|
return input
|
|
540
|
-
.filter(
|
|
541
|
-
.map(
|
|
448
|
+
.filter((e) => e != null)
|
|
449
|
+
.map((entry) => {
|
|
542
450
|
return serializeAws_json1_1MetricDimension(entry, context);
|
|
543
451
|
});
|
|
544
452
|
};
|
|
545
|
-
|
|
546
|
-
return
|
|
547
|
-
}
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
453
|
+
const serializeAws_json1_1PredefinedLoadMetricSpecification = (input, context) => {
|
|
454
|
+
return {
|
|
455
|
+
...(input.PredefinedLoadMetricType != null && { PredefinedLoadMetricType: input.PredefinedLoadMetricType }),
|
|
456
|
+
...(input.ResourceLabel != null && { ResourceLabel: input.ResourceLabel }),
|
|
457
|
+
};
|
|
458
|
+
};
|
|
459
|
+
const serializeAws_json1_1PredefinedScalingMetricSpecification = (input, context) => {
|
|
460
|
+
return {
|
|
461
|
+
...(input.PredefinedScalingMetricType != null && {
|
|
462
|
+
PredefinedScalingMetricType: input.PredefinedScalingMetricType,
|
|
463
|
+
}),
|
|
464
|
+
...(input.ResourceLabel != null && { ResourceLabel: input.ResourceLabel }),
|
|
465
|
+
};
|
|
466
|
+
};
|
|
467
|
+
const serializeAws_json1_1ScalingInstruction = (input, context) => {
|
|
468
|
+
return {
|
|
469
|
+
...(input.CustomizedLoadMetricSpecification != null && {
|
|
470
|
+
CustomizedLoadMetricSpecification: serializeAws_json1_1CustomizedLoadMetricSpecification(input.CustomizedLoadMetricSpecification, context),
|
|
471
|
+
}),
|
|
472
|
+
...(input.DisableDynamicScaling != null && { DisableDynamicScaling: input.DisableDynamicScaling }),
|
|
473
|
+
...(input.MaxCapacity != null && { MaxCapacity: input.MaxCapacity }),
|
|
474
|
+
...(input.MinCapacity != null && { MinCapacity: input.MinCapacity }),
|
|
475
|
+
...(input.PredefinedLoadMetricSpecification != null && {
|
|
476
|
+
PredefinedLoadMetricSpecification: serializeAws_json1_1PredefinedLoadMetricSpecification(input.PredefinedLoadMetricSpecification, context),
|
|
477
|
+
}),
|
|
478
|
+
...(input.PredictiveScalingMaxCapacityBehavior != null && {
|
|
479
|
+
PredictiveScalingMaxCapacityBehavior: input.PredictiveScalingMaxCapacityBehavior,
|
|
480
|
+
}),
|
|
481
|
+
...(input.PredictiveScalingMaxCapacityBuffer != null && {
|
|
482
|
+
PredictiveScalingMaxCapacityBuffer: input.PredictiveScalingMaxCapacityBuffer,
|
|
483
|
+
}),
|
|
484
|
+
...(input.PredictiveScalingMode != null && { PredictiveScalingMode: input.PredictiveScalingMode }),
|
|
485
|
+
...(input.ResourceId != null && { ResourceId: input.ResourceId }),
|
|
486
|
+
...(input.ScalableDimension != null && { ScalableDimension: input.ScalableDimension }),
|
|
487
|
+
...(input.ScalingPolicyUpdateBehavior != null && {
|
|
488
|
+
ScalingPolicyUpdateBehavior: input.ScalingPolicyUpdateBehavior,
|
|
489
|
+
}),
|
|
490
|
+
...(input.ScheduledActionBufferTime != null && { ScheduledActionBufferTime: input.ScheduledActionBufferTime }),
|
|
491
|
+
...(input.ServiceNamespace != null && { ServiceNamespace: input.ServiceNamespace }),
|
|
492
|
+
...(input.TargetTrackingConfigurations != null && {
|
|
493
|
+
TargetTrackingConfigurations: serializeAws_json1_1TargetTrackingConfigurations(input.TargetTrackingConfigurations, context),
|
|
494
|
+
}),
|
|
495
|
+
};
|
|
496
|
+
};
|
|
497
|
+
const serializeAws_json1_1ScalingInstructions = (input, context) => {
|
|
569
498
|
return input
|
|
570
|
-
.filter(
|
|
571
|
-
.map(
|
|
499
|
+
.filter((e) => e != null)
|
|
500
|
+
.map((entry) => {
|
|
572
501
|
return serializeAws_json1_1ScalingInstruction(entry, context);
|
|
573
502
|
});
|
|
574
503
|
};
|
|
575
|
-
|
|
504
|
+
const serializeAws_json1_1ScalingPlanNames = (input, context) => {
|
|
576
505
|
return input
|
|
577
|
-
.filter(
|
|
578
|
-
.map(
|
|
506
|
+
.filter((e) => e != null)
|
|
507
|
+
.map((entry) => {
|
|
579
508
|
return entry;
|
|
580
509
|
});
|
|
581
510
|
};
|
|
582
|
-
|
|
583
|
-
return
|
|
511
|
+
const serializeAws_json1_1TagFilter = (input, context) => {
|
|
512
|
+
return {
|
|
513
|
+
...(input.Key != null && { Key: input.Key }),
|
|
514
|
+
...(input.Values != null && { Values: serializeAws_json1_1TagValues(input.Values, context) }),
|
|
515
|
+
};
|
|
584
516
|
};
|
|
585
|
-
|
|
517
|
+
const serializeAws_json1_1TagFilters = (input, context) => {
|
|
586
518
|
return input
|
|
587
|
-
.filter(
|
|
588
|
-
.map(
|
|
519
|
+
.filter((e) => e != null)
|
|
520
|
+
.map((entry) => {
|
|
589
521
|
return serializeAws_json1_1TagFilter(entry, context);
|
|
590
522
|
});
|
|
591
523
|
};
|
|
592
|
-
|
|
524
|
+
const serializeAws_json1_1TagValues = (input, context) => {
|
|
593
525
|
return input
|
|
594
|
-
.filter(
|
|
595
|
-
.map(
|
|
526
|
+
.filter((e) => e != null)
|
|
527
|
+
.map((entry) => {
|
|
596
528
|
return entry;
|
|
597
529
|
});
|
|
598
530
|
};
|
|
599
|
-
|
|
600
|
-
return
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
531
|
+
const serializeAws_json1_1TargetTrackingConfiguration = (input, context) => {
|
|
532
|
+
return {
|
|
533
|
+
...(input.CustomizedScalingMetricSpecification != null && {
|
|
534
|
+
CustomizedScalingMetricSpecification: serializeAws_json1_1CustomizedScalingMetricSpecification(input.CustomizedScalingMetricSpecification, context),
|
|
535
|
+
}),
|
|
536
|
+
...(input.DisableScaleIn != null && { DisableScaleIn: input.DisableScaleIn }),
|
|
537
|
+
...(input.EstimatedInstanceWarmup != null && { EstimatedInstanceWarmup: input.EstimatedInstanceWarmup }),
|
|
538
|
+
...(input.PredefinedScalingMetricSpecification != null && {
|
|
539
|
+
PredefinedScalingMetricSpecification: serializeAws_json1_1PredefinedScalingMetricSpecification(input.PredefinedScalingMetricSpecification, context),
|
|
540
|
+
}),
|
|
541
|
+
...(input.ScaleInCooldown != null && { ScaleInCooldown: input.ScaleInCooldown }),
|
|
542
|
+
...(input.ScaleOutCooldown != null && { ScaleOutCooldown: input.ScaleOutCooldown }),
|
|
543
|
+
...(input.TargetValue != null && { TargetValue: __serializeFloat(input.TargetValue) }),
|
|
544
|
+
};
|
|
605
545
|
};
|
|
606
|
-
|
|
546
|
+
const serializeAws_json1_1TargetTrackingConfigurations = (input, context) => {
|
|
607
547
|
return input
|
|
608
|
-
.filter(
|
|
609
|
-
.map(
|
|
548
|
+
.filter((e) => e != null)
|
|
549
|
+
.map((entry) => {
|
|
610
550
|
return serializeAws_json1_1TargetTrackingConfiguration(entry, context);
|
|
611
551
|
});
|
|
612
552
|
};
|
|
613
|
-
|
|
614
|
-
return
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
553
|
+
const serializeAws_json1_1UpdateScalingPlanRequest = (input, context) => {
|
|
554
|
+
return {
|
|
555
|
+
...(input.ApplicationSource != null && {
|
|
556
|
+
ApplicationSource: serializeAws_json1_1ApplicationSource(input.ApplicationSource, context),
|
|
557
|
+
}),
|
|
558
|
+
...(input.ScalingInstructions != null && {
|
|
559
|
+
ScalingInstructions: serializeAws_json1_1ScalingInstructions(input.ScalingInstructions, context),
|
|
560
|
+
}),
|
|
561
|
+
...(input.ScalingPlanName != null && { ScalingPlanName: input.ScalingPlanName }),
|
|
562
|
+
...(input.ScalingPlanVersion != null && { ScalingPlanVersion: input.ScalingPlanVersion }),
|
|
563
|
+
};
|
|
619
564
|
};
|
|
620
|
-
|
|
565
|
+
const deserializeAws_json1_1ApplicationSource = (output, context) => {
|
|
621
566
|
return {
|
|
622
567
|
CloudFormationStackARN: __expectString(output.CloudFormationStackARN),
|
|
623
568
|
TagFilters: output.TagFilters != null ? deserializeAws_json1_1TagFilters(output.TagFilters, context) : undefined,
|
|
624
569
|
};
|
|
625
570
|
};
|
|
626
|
-
|
|
571
|
+
const deserializeAws_json1_1ConcurrentUpdateException = (output, context) => {
|
|
627
572
|
return {
|
|
628
573
|
Message: __expectString(output.Message),
|
|
629
574
|
};
|
|
630
575
|
};
|
|
631
|
-
|
|
576
|
+
const deserializeAws_json1_1CreateScalingPlanResponse = (output, context) => {
|
|
632
577
|
return {
|
|
633
578
|
ScalingPlanVersion: __expectLong(output.ScalingPlanVersion),
|
|
634
579
|
};
|
|
635
580
|
};
|
|
636
|
-
|
|
581
|
+
const deserializeAws_json1_1CustomizedLoadMetricSpecification = (output, context) => {
|
|
637
582
|
return {
|
|
638
583
|
Dimensions: output.Dimensions != null ? deserializeAws_json1_1MetricDimensions(output.Dimensions, context) : undefined,
|
|
639
584
|
MetricName: __expectString(output.MetricName),
|
|
@@ -642,7 +587,7 @@ var deserializeAws_json1_1CustomizedLoadMetricSpecification = function (output,
|
|
|
642
587
|
Unit: __expectString(output.Unit),
|
|
643
588
|
};
|
|
644
589
|
};
|
|
645
|
-
|
|
590
|
+
const deserializeAws_json1_1CustomizedScalingMetricSpecification = (output, context) => {
|
|
646
591
|
return {
|
|
647
592
|
Dimensions: output.Dimensions != null ? deserializeAws_json1_1MetricDimensions(output.Dimensions, context) : undefined,
|
|
648
593
|
MetricName: __expectString(output.MetricName),
|
|
@@ -651,16 +596,16 @@ var deserializeAws_json1_1CustomizedScalingMetricSpecification = function (outpu
|
|
|
651
596
|
Unit: __expectString(output.Unit),
|
|
652
597
|
};
|
|
653
598
|
};
|
|
654
|
-
|
|
599
|
+
const deserializeAws_json1_1Datapoint = (output, context) => {
|
|
655
600
|
return {
|
|
656
601
|
Timestamp: output.Timestamp != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.Timestamp))) : undefined,
|
|
657
602
|
Value: __limitedParseDouble(output.Value),
|
|
658
603
|
};
|
|
659
604
|
};
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
.filter(
|
|
663
|
-
.map(
|
|
605
|
+
const deserializeAws_json1_1Datapoints = (output, context) => {
|
|
606
|
+
const retVal = (output || [])
|
|
607
|
+
.filter((e) => e != null)
|
|
608
|
+
.map((entry) => {
|
|
664
609
|
if (entry === null) {
|
|
665
610
|
return null;
|
|
666
611
|
}
|
|
@@ -668,10 +613,10 @@ var deserializeAws_json1_1Datapoints = function (output, context) {
|
|
|
668
613
|
});
|
|
669
614
|
return retVal;
|
|
670
615
|
};
|
|
671
|
-
|
|
616
|
+
const deserializeAws_json1_1DeleteScalingPlanResponse = (output, context) => {
|
|
672
617
|
return {};
|
|
673
618
|
};
|
|
674
|
-
|
|
619
|
+
const deserializeAws_json1_1DescribeScalingPlanResourcesResponse = (output, context) => {
|
|
675
620
|
return {
|
|
676
621
|
NextToken: __expectString(output.NextToken),
|
|
677
622
|
ScalingPlanResources: output.ScalingPlanResources != null
|
|
@@ -679,42 +624,42 @@ var deserializeAws_json1_1DescribeScalingPlanResourcesResponse = function (outpu
|
|
|
679
624
|
: undefined,
|
|
680
625
|
};
|
|
681
626
|
};
|
|
682
|
-
|
|
627
|
+
const deserializeAws_json1_1DescribeScalingPlansResponse = (output, context) => {
|
|
683
628
|
return {
|
|
684
629
|
NextToken: __expectString(output.NextToken),
|
|
685
630
|
ScalingPlans: output.ScalingPlans != null ? deserializeAws_json1_1ScalingPlans(output.ScalingPlans, context) : undefined,
|
|
686
631
|
};
|
|
687
632
|
};
|
|
688
|
-
|
|
633
|
+
const deserializeAws_json1_1GetScalingPlanResourceForecastDataResponse = (output, context) => {
|
|
689
634
|
return {
|
|
690
635
|
Datapoints: output.Datapoints != null ? deserializeAws_json1_1Datapoints(output.Datapoints, context) : undefined,
|
|
691
636
|
};
|
|
692
637
|
};
|
|
693
|
-
|
|
638
|
+
const deserializeAws_json1_1InternalServiceException = (output, context) => {
|
|
694
639
|
return {
|
|
695
640
|
Message: __expectString(output.Message),
|
|
696
641
|
};
|
|
697
642
|
};
|
|
698
|
-
|
|
643
|
+
const deserializeAws_json1_1InvalidNextTokenException = (output, context) => {
|
|
699
644
|
return {
|
|
700
645
|
Message: __expectString(output.Message),
|
|
701
646
|
};
|
|
702
647
|
};
|
|
703
|
-
|
|
648
|
+
const deserializeAws_json1_1LimitExceededException = (output, context) => {
|
|
704
649
|
return {
|
|
705
650
|
Message: __expectString(output.Message),
|
|
706
651
|
};
|
|
707
652
|
};
|
|
708
|
-
|
|
653
|
+
const deserializeAws_json1_1MetricDimension = (output, context) => {
|
|
709
654
|
return {
|
|
710
655
|
Name: __expectString(output.Name),
|
|
711
656
|
Value: __expectString(output.Value),
|
|
712
657
|
};
|
|
713
658
|
};
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
.filter(
|
|
717
|
-
.map(
|
|
659
|
+
const deserializeAws_json1_1MetricDimensions = (output, context) => {
|
|
660
|
+
const retVal = (output || [])
|
|
661
|
+
.filter((e) => e != null)
|
|
662
|
+
.map((entry) => {
|
|
718
663
|
if (entry === null) {
|
|
719
664
|
return null;
|
|
720
665
|
}
|
|
@@ -722,24 +667,24 @@ var deserializeAws_json1_1MetricDimensions = function (output, context) {
|
|
|
722
667
|
});
|
|
723
668
|
return retVal;
|
|
724
669
|
};
|
|
725
|
-
|
|
670
|
+
const deserializeAws_json1_1ObjectNotFoundException = (output, context) => {
|
|
726
671
|
return {
|
|
727
672
|
Message: __expectString(output.Message),
|
|
728
673
|
};
|
|
729
674
|
};
|
|
730
|
-
|
|
675
|
+
const deserializeAws_json1_1PredefinedLoadMetricSpecification = (output, context) => {
|
|
731
676
|
return {
|
|
732
677
|
PredefinedLoadMetricType: __expectString(output.PredefinedLoadMetricType),
|
|
733
678
|
ResourceLabel: __expectString(output.ResourceLabel),
|
|
734
679
|
};
|
|
735
680
|
};
|
|
736
|
-
|
|
681
|
+
const deserializeAws_json1_1PredefinedScalingMetricSpecification = (output, context) => {
|
|
737
682
|
return {
|
|
738
683
|
PredefinedScalingMetricType: __expectString(output.PredefinedScalingMetricType),
|
|
739
684
|
ResourceLabel: __expectString(output.ResourceLabel),
|
|
740
685
|
};
|
|
741
686
|
};
|
|
742
|
-
|
|
687
|
+
const deserializeAws_json1_1ScalingInstruction = (output, context) => {
|
|
743
688
|
return {
|
|
744
689
|
CustomizedLoadMetricSpecification: output.CustomizedLoadMetricSpecification != null
|
|
745
690
|
? deserializeAws_json1_1CustomizedLoadMetricSpecification(output.CustomizedLoadMetricSpecification, context)
|
|
@@ -763,10 +708,10 @@ var deserializeAws_json1_1ScalingInstruction = function (output, context) {
|
|
|
763
708
|
: undefined,
|
|
764
709
|
};
|
|
765
710
|
};
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
.filter(
|
|
769
|
-
.map(
|
|
711
|
+
const deserializeAws_json1_1ScalingInstructions = (output, context) => {
|
|
712
|
+
const retVal = (output || [])
|
|
713
|
+
.filter((e) => e != null)
|
|
714
|
+
.map((entry) => {
|
|
770
715
|
if (entry === null) {
|
|
771
716
|
return null;
|
|
772
717
|
}
|
|
@@ -774,7 +719,7 @@ var deserializeAws_json1_1ScalingInstructions = function (output, context) {
|
|
|
774
719
|
});
|
|
775
720
|
return retVal;
|
|
776
721
|
};
|
|
777
|
-
|
|
722
|
+
const deserializeAws_json1_1ScalingPlan = (output, context) => {
|
|
778
723
|
return {
|
|
779
724
|
ApplicationSource: output.ApplicationSource != null
|
|
780
725
|
? deserializeAws_json1_1ApplicationSource(output.ApplicationSource, context)
|
|
@@ -794,7 +739,7 @@ var deserializeAws_json1_1ScalingPlan = function (output, context) {
|
|
|
794
739
|
: undefined,
|
|
795
740
|
};
|
|
796
741
|
};
|
|
797
|
-
|
|
742
|
+
const deserializeAws_json1_1ScalingPlanResource = (output, context) => {
|
|
798
743
|
return {
|
|
799
744
|
ResourceId: __expectString(output.ResourceId),
|
|
800
745
|
ScalableDimension: __expectString(output.ScalableDimension),
|
|
@@ -808,10 +753,10 @@ var deserializeAws_json1_1ScalingPlanResource = function (output, context) {
|
|
|
808
753
|
ServiceNamespace: __expectString(output.ServiceNamespace),
|
|
809
754
|
};
|
|
810
755
|
};
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
.filter(
|
|
814
|
-
.map(
|
|
756
|
+
const deserializeAws_json1_1ScalingPlanResources = (output, context) => {
|
|
757
|
+
const retVal = (output || [])
|
|
758
|
+
.filter((e) => e != null)
|
|
759
|
+
.map((entry) => {
|
|
815
760
|
if (entry === null) {
|
|
816
761
|
return null;
|
|
817
762
|
}
|
|
@@ -819,10 +764,10 @@ var deserializeAws_json1_1ScalingPlanResources = function (output, context) {
|
|
|
819
764
|
});
|
|
820
765
|
return retVal;
|
|
821
766
|
};
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
.filter(
|
|
825
|
-
.map(
|
|
767
|
+
const deserializeAws_json1_1ScalingPlans = (output, context) => {
|
|
768
|
+
const retVal = (output || [])
|
|
769
|
+
.filter((e) => e != null)
|
|
770
|
+
.map((entry) => {
|
|
826
771
|
if (entry === null) {
|
|
827
772
|
return null;
|
|
828
773
|
}
|
|
@@ -830,10 +775,10 @@ var deserializeAws_json1_1ScalingPlans = function (output, context) {
|
|
|
830
775
|
});
|
|
831
776
|
return retVal;
|
|
832
777
|
};
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
.filter(
|
|
836
|
-
.map(
|
|
778
|
+
const deserializeAws_json1_1ScalingPolicies = (output, context) => {
|
|
779
|
+
const retVal = (output || [])
|
|
780
|
+
.filter((e) => e != null)
|
|
781
|
+
.map((entry) => {
|
|
837
782
|
if (entry === null) {
|
|
838
783
|
return null;
|
|
839
784
|
}
|
|
@@ -841,7 +786,7 @@ var deserializeAws_json1_1ScalingPolicies = function (output, context) {
|
|
|
841
786
|
});
|
|
842
787
|
return retVal;
|
|
843
788
|
};
|
|
844
|
-
|
|
789
|
+
const deserializeAws_json1_1ScalingPolicy = (output, context) => {
|
|
845
790
|
return {
|
|
846
791
|
PolicyName: __expectString(output.PolicyName),
|
|
847
792
|
PolicyType: __expectString(output.PolicyType),
|
|
@@ -850,16 +795,16 @@ var deserializeAws_json1_1ScalingPolicy = function (output, context) {
|
|
|
850
795
|
: undefined,
|
|
851
796
|
};
|
|
852
797
|
};
|
|
853
|
-
|
|
798
|
+
const deserializeAws_json1_1TagFilter = (output, context) => {
|
|
854
799
|
return {
|
|
855
800
|
Key: __expectString(output.Key),
|
|
856
801
|
Values: output.Values != null ? deserializeAws_json1_1TagValues(output.Values, context) : undefined,
|
|
857
802
|
};
|
|
858
803
|
};
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
.filter(
|
|
862
|
-
.map(
|
|
804
|
+
const deserializeAws_json1_1TagFilters = (output, context) => {
|
|
805
|
+
const retVal = (output || [])
|
|
806
|
+
.filter((e) => e != null)
|
|
807
|
+
.map((entry) => {
|
|
863
808
|
if (entry === null) {
|
|
864
809
|
return null;
|
|
865
810
|
}
|
|
@@ -867,10 +812,10 @@ var deserializeAws_json1_1TagFilters = function (output, context) {
|
|
|
867
812
|
});
|
|
868
813
|
return retVal;
|
|
869
814
|
};
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
.filter(
|
|
873
|
-
.map(
|
|
815
|
+
const deserializeAws_json1_1TagValues = (output, context) => {
|
|
816
|
+
const retVal = (output || [])
|
|
817
|
+
.filter((e) => e != null)
|
|
818
|
+
.map((entry) => {
|
|
874
819
|
if (entry === null) {
|
|
875
820
|
return null;
|
|
876
821
|
}
|
|
@@ -878,7 +823,7 @@ var deserializeAws_json1_1TagValues = function (output, context) {
|
|
|
878
823
|
});
|
|
879
824
|
return retVal;
|
|
880
825
|
};
|
|
881
|
-
|
|
826
|
+
const deserializeAws_json1_1TargetTrackingConfiguration = (output, context) => {
|
|
882
827
|
return {
|
|
883
828
|
CustomizedScalingMetricSpecification: output.CustomizedScalingMetricSpecification != null
|
|
884
829
|
? deserializeAws_json1_1CustomizedScalingMetricSpecification(output.CustomizedScalingMetricSpecification, context)
|
|
@@ -893,10 +838,10 @@ var deserializeAws_json1_1TargetTrackingConfiguration = function (output, contex
|
|
|
893
838
|
TargetValue: __limitedParseDouble(output.TargetValue),
|
|
894
839
|
};
|
|
895
840
|
};
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
.filter(
|
|
899
|
-
.map(
|
|
841
|
+
const deserializeAws_json1_1TargetTrackingConfigurations = (output, context) => {
|
|
842
|
+
const retVal = (output || [])
|
|
843
|
+
.filter((e) => e != null)
|
|
844
|
+
.map((entry) => {
|
|
900
845
|
if (entry === null) {
|
|
901
846
|
return null;
|
|
902
847
|
}
|
|
@@ -904,83 +849,60 @@ var deserializeAws_json1_1TargetTrackingConfigurations = function (output, conte
|
|
|
904
849
|
});
|
|
905
850
|
return retVal;
|
|
906
851
|
};
|
|
907
|
-
|
|
852
|
+
const deserializeAws_json1_1UpdateScalingPlanResponse = (output, context) => {
|
|
908
853
|
return {};
|
|
909
854
|
};
|
|
910
|
-
|
|
855
|
+
const deserializeAws_json1_1ValidationException = (output, context) => {
|
|
911
856
|
return {
|
|
912
857
|
Message: __expectString(output.Message),
|
|
913
858
|
};
|
|
914
859
|
};
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
});
|
|
923
|
-
};
|
|
924
|
-
var collectBody = function (streamBody, context) {
|
|
925
|
-
if (streamBody === void 0) { streamBody = new Uint8Array(); }
|
|
860
|
+
const deserializeMetadata = (output) => ({
|
|
861
|
+
httpStatusCode: output.statusCode,
|
|
862
|
+
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
|
|
863
|
+
extendedRequestId: output.headers["x-amz-id-2"],
|
|
864
|
+
cfId: output.headers["x-amz-cf-id"],
|
|
865
|
+
});
|
|
866
|
+
const collectBody = (streamBody = new Uint8Array(), context) => {
|
|
926
867
|
if (streamBody instanceof Uint8Array) {
|
|
927
868
|
return Promise.resolve(streamBody);
|
|
928
869
|
}
|
|
929
870
|
return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());
|
|
930
871
|
};
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
};
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
if (resolvedHostname !== undefined) {
|
|
950
|
-
contents.hostname = resolvedHostname;
|
|
951
|
-
}
|
|
952
|
-
if (body !== undefined) {
|
|
953
|
-
contents.body = body;
|
|
954
|
-
}
|
|
955
|
-
return [2, new __HttpRequest(contents)];
|
|
956
|
-
}
|
|
957
|
-
});
|
|
958
|
-
}); };
|
|
959
|
-
var parseBody = function (streamBody, context) {
|
|
960
|
-
return collectBodyString(streamBody, context).then(function (encoded) {
|
|
961
|
-
if (encoded.length) {
|
|
962
|
-
return JSON.parse(encoded);
|
|
963
|
-
}
|
|
964
|
-
return {};
|
|
965
|
-
});
|
|
872
|
+
const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
|
|
873
|
+
const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, body) => {
|
|
874
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
875
|
+
const contents = {
|
|
876
|
+
protocol,
|
|
877
|
+
hostname,
|
|
878
|
+
port,
|
|
879
|
+
method: "POST",
|
|
880
|
+
path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path,
|
|
881
|
+
headers,
|
|
882
|
+
};
|
|
883
|
+
if (resolvedHostname !== undefined) {
|
|
884
|
+
contents.hostname = resolvedHostname;
|
|
885
|
+
}
|
|
886
|
+
if (body !== undefined) {
|
|
887
|
+
contents.body = body;
|
|
888
|
+
}
|
|
889
|
+
return new __HttpRequest(contents);
|
|
966
890
|
};
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
var sanitizeErrorCode = function (rawValue) {
|
|
983
|
-
var cleanValue = rawValue;
|
|
891
|
+
const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
|
|
892
|
+
if (encoded.length) {
|
|
893
|
+
return JSON.parse(encoded);
|
|
894
|
+
}
|
|
895
|
+
return {};
|
|
896
|
+
});
|
|
897
|
+
const parseErrorBody = async (errorBody, context) => {
|
|
898
|
+
const value = await parseBody(errorBody, context);
|
|
899
|
+
value.message = value.message ?? value.Message;
|
|
900
|
+
return value;
|
|
901
|
+
};
|
|
902
|
+
const loadRestJsonErrorCode = (output, data) => {
|
|
903
|
+
const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
|
|
904
|
+
const sanitizeErrorCode = (rawValue) => {
|
|
905
|
+
let cleanValue = rawValue;
|
|
984
906
|
if (typeof cleanValue === "number") {
|
|
985
907
|
cleanValue = cleanValue.toString();
|
|
986
908
|
}
|
|
@@ -995,7 +917,7 @@ var loadRestJsonErrorCode = function (output, data) {
|
|
|
995
917
|
}
|
|
996
918
|
return cleanValue;
|
|
997
919
|
};
|
|
998
|
-
|
|
920
|
+
const headerKey = findKey(output.headers, "x-amzn-errortype");
|
|
999
921
|
if (headerKey !== undefined) {
|
|
1000
922
|
return sanitizeErrorCode(output.headers[headerKey]);
|
|
1001
923
|
}
|