@aws-sdk/client-auto-scaling-plans 3.312.0 → 3.315.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_json1_1.js +133 -428
- package/dist-es/protocols/Aws_json1_1.js +134 -429
- package/package.json +6 -6
|
@@ -15,21 +15,21 @@ exports.se_CreateScalingPlanCommand = se_CreateScalingPlanCommand;
|
|
|
15
15
|
const se_DeleteScalingPlanCommand = async (input, context) => {
|
|
16
16
|
const headers = sharedHeaders("DeleteScalingPlan");
|
|
17
17
|
let body;
|
|
18
|
-
body = JSON.stringify(
|
|
18
|
+
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
19
19
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
20
20
|
};
|
|
21
21
|
exports.se_DeleteScalingPlanCommand = se_DeleteScalingPlanCommand;
|
|
22
22
|
const se_DescribeScalingPlanResourcesCommand = async (input, context) => {
|
|
23
23
|
const headers = sharedHeaders("DescribeScalingPlanResources");
|
|
24
24
|
let body;
|
|
25
|
-
body = JSON.stringify(
|
|
25
|
+
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
26
26
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
27
27
|
};
|
|
28
28
|
exports.se_DescribeScalingPlanResourcesCommand = se_DescribeScalingPlanResourcesCommand;
|
|
29
29
|
const se_DescribeScalingPlansCommand = async (input, context) => {
|
|
30
30
|
const headers = sharedHeaders("DescribeScalingPlans");
|
|
31
31
|
let body;
|
|
32
|
-
body = JSON.stringify(
|
|
32
|
+
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
33
33
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
34
34
|
};
|
|
35
35
|
exports.se_DescribeScalingPlansCommand = se_DescribeScalingPlansCommand;
|
|
@@ -53,12 +53,12 @@ const de_CreateScalingPlanCommand = async (output, context) => {
|
|
|
53
53
|
}
|
|
54
54
|
const data = await parseBody(output.body, context);
|
|
55
55
|
let contents = {};
|
|
56
|
-
contents =
|
|
56
|
+
contents = (0, smithy_client_1._json)(data);
|
|
57
57
|
const response = {
|
|
58
58
|
$metadata: deserializeMetadata(output),
|
|
59
59
|
...contents,
|
|
60
60
|
};
|
|
61
|
-
return
|
|
61
|
+
return response;
|
|
62
62
|
};
|
|
63
63
|
exports.de_CreateScalingPlanCommand = de_CreateScalingPlanCommand;
|
|
64
64
|
const de_CreateScalingPlanCommandError = async (output, context) => {
|
|
@@ -82,10 +82,9 @@ const de_CreateScalingPlanCommandError = async (output, context) => {
|
|
|
82
82
|
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
83
83
|
default:
|
|
84
84
|
const parsedBody = parsedOutput.body;
|
|
85
|
-
|
|
85
|
+
return throwDefaultError({
|
|
86
86
|
output,
|
|
87
87
|
parsedBody,
|
|
88
|
-
exceptionCtor: AutoScalingPlansServiceException_1.AutoScalingPlansServiceException,
|
|
89
88
|
errorCode,
|
|
90
89
|
});
|
|
91
90
|
}
|
|
@@ -96,12 +95,12 @@ const de_DeleteScalingPlanCommand = async (output, context) => {
|
|
|
96
95
|
}
|
|
97
96
|
const data = await parseBody(output.body, context);
|
|
98
97
|
let contents = {};
|
|
99
|
-
contents =
|
|
98
|
+
contents = (0, smithy_client_1._json)(data);
|
|
100
99
|
const response = {
|
|
101
100
|
$metadata: deserializeMetadata(output),
|
|
102
101
|
...contents,
|
|
103
102
|
};
|
|
104
|
-
return
|
|
103
|
+
return response;
|
|
105
104
|
};
|
|
106
105
|
exports.de_DeleteScalingPlanCommand = de_DeleteScalingPlanCommand;
|
|
107
106
|
const de_DeleteScalingPlanCommandError = async (output, context) => {
|
|
@@ -125,10 +124,9 @@ const de_DeleteScalingPlanCommandError = async (output, context) => {
|
|
|
125
124
|
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
126
125
|
default:
|
|
127
126
|
const parsedBody = parsedOutput.body;
|
|
128
|
-
|
|
127
|
+
return throwDefaultError({
|
|
129
128
|
output,
|
|
130
129
|
parsedBody,
|
|
131
|
-
exceptionCtor: AutoScalingPlansServiceException_1.AutoScalingPlansServiceException,
|
|
132
130
|
errorCode,
|
|
133
131
|
});
|
|
134
132
|
}
|
|
@@ -144,7 +142,7 @@ const de_DescribeScalingPlanResourcesCommand = async (output, context) => {
|
|
|
144
142
|
$metadata: deserializeMetadata(output),
|
|
145
143
|
...contents,
|
|
146
144
|
};
|
|
147
|
-
return
|
|
145
|
+
return response;
|
|
148
146
|
};
|
|
149
147
|
exports.de_DescribeScalingPlanResourcesCommand = de_DescribeScalingPlanResourcesCommand;
|
|
150
148
|
const de_DescribeScalingPlanResourcesCommandError = async (output, context) => {
|
|
@@ -168,10 +166,9 @@ const de_DescribeScalingPlanResourcesCommandError = async (output, context) => {
|
|
|
168
166
|
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
169
167
|
default:
|
|
170
168
|
const parsedBody = parsedOutput.body;
|
|
171
|
-
|
|
169
|
+
return throwDefaultError({
|
|
172
170
|
output,
|
|
173
171
|
parsedBody,
|
|
174
|
-
exceptionCtor: AutoScalingPlansServiceException_1.AutoScalingPlansServiceException,
|
|
175
172
|
errorCode,
|
|
176
173
|
});
|
|
177
174
|
}
|
|
@@ -187,7 +184,7 @@ const de_DescribeScalingPlansCommand = async (output, context) => {
|
|
|
187
184
|
$metadata: deserializeMetadata(output),
|
|
188
185
|
...contents,
|
|
189
186
|
};
|
|
190
|
-
return
|
|
187
|
+
return response;
|
|
191
188
|
};
|
|
192
189
|
exports.de_DescribeScalingPlansCommand = de_DescribeScalingPlansCommand;
|
|
193
190
|
const de_DescribeScalingPlansCommandError = async (output, context) => {
|
|
@@ -211,10 +208,9 @@ const de_DescribeScalingPlansCommandError = async (output, context) => {
|
|
|
211
208
|
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
212
209
|
default:
|
|
213
210
|
const parsedBody = parsedOutput.body;
|
|
214
|
-
|
|
211
|
+
return throwDefaultError({
|
|
215
212
|
output,
|
|
216
213
|
parsedBody,
|
|
217
|
-
exceptionCtor: AutoScalingPlansServiceException_1.AutoScalingPlansServiceException,
|
|
218
214
|
errorCode,
|
|
219
215
|
});
|
|
220
216
|
}
|
|
@@ -230,7 +226,7 @@ const de_GetScalingPlanResourceForecastDataCommand = async (output, context) =>
|
|
|
230
226
|
$metadata: deserializeMetadata(output),
|
|
231
227
|
...contents,
|
|
232
228
|
};
|
|
233
|
-
return
|
|
229
|
+
return response;
|
|
234
230
|
};
|
|
235
231
|
exports.de_GetScalingPlanResourceForecastDataCommand = de_GetScalingPlanResourceForecastDataCommand;
|
|
236
232
|
const de_GetScalingPlanResourceForecastDataCommandError = async (output, context) => {
|
|
@@ -248,10 +244,9 @@ const de_GetScalingPlanResourceForecastDataCommandError = async (output, context
|
|
|
248
244
|
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
249
245
|
default:
|
|
250
246
|
const parsedBody = parsedOutput.body;
|
|
251
|
-
|
|
247
|
+
return throwDefaultError({
|
|
252
248
|
output,
|
|
253
249
|
parsedBody,
|
|
254
|
-
exceptionCtor: AutoScalingPlansServiceException_1.AutoScalingPlansServiceException,
|
|
255
250
|
errorCode,
|
|
256
251
|
});
|
|
257
252
|
}
|
|
@@ -262,12 +257,12 @@ const de_UpdateScalingPlanCommand = async (output, context) => {
|
|
|
262
257
|
}
|
|
263
258
|
const data = await parseBody(output.body, context);
|
|
264
259
|
let contents = {};
|
|
265
|
-
contents =
|
|
260
|
+
contents = (0, smithy_client_1._json)(data);
|
|
266
261
|
const response = {
|
|
267
262
|
$metadata: deserializeMetadata(output),
|
|
268
263
|
...contents,
|
|
269
264
|
};
|
|
270
|
-
return
|
|
265
|
+
return response;
|
|
271
266
|
};
|
|
272
267
|
exports.de_UpdateScalingPlanCommand = de_UpdateScalingPlanCommand;
|
|
273
268
|
const de_UpdateScalingPlanCommandError = async (output, context) => {
|
|
@@ -291,17 +286,16 @@ const de_UpdateScalingPlanCommandError = async (output, context) => {
|
|
|
291
286
|
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
292
287
|
default:
|
|
293
288
|
const parsedBody = parsedOutput.body;
|
|
294
|
-
|
|
289
|
+
return throwDefaultError({
|
|
295
290
|
output,
|
|
296
291
|
parsedBody,
|
|
297
|
-
exceptionCtor: AutoScalingPlansServiceException_1.AutoScalingPlansServiceException,
|
|
298
292
|
errorCode,
|
|
299
293
|
});
|
|
300
294
|
}
|
|
301
295
|
};
|
|
302
296
|
const de_ConcurrentUpdateExceptionRes = async (parsedOutput, context) => {
|
|
303
297
|
const body = parsedOutput.body;
|
|
304
|
-
const deserialized =
|
|
298
|
+
const deserialized = (0, smithy_client_1._json)(body);
|
|
305
299
|
const exception = new models_0_1.ConcurrentUpdateException({
|
|
306
300
|
$metadata: deserializeMetadata(parsedOutput),
|
|
307
301
|
...deserialized,
|
|
@@ -310,7 +304,7 @@ const de_ConcurrentUpdateExceptionRes = async (parsedOutput, context) => {
|
|
|
310
304
|
};
|
|
311
305
|
const de_InternalServiceExceptionRes = async (parsedOutput, context) => {
|
|
312
306
|
const body = parsedOutput.body;
|
|
313
|
-
const deserialized =
|
|
307
|
+
const deserialized = (0, smithy_client_1._json)(body);
|
|
314
308
|
const exception = new models_0_1.InternalServiceException({
|
|
315
309
|
$metadata: deserializeMetadata(parsedOutput),
|
|
316
310
|
...deserialized,
|
|
@@ -319,7 +313,7 @@ const de_InternalServiceExceptionRes = async (parsedOutput, context) => {
|
|
|
319
313
|
};
|
|
320
314
|
const de_InvalidNextTokenExceptionRes = async (parsedOutput, context) => {
|
|
321
315
|
const body = parsedOutput.body;
|
|
322
|
-
const deserialized =
|
|
316
|
+
const deserialized = (0, smithy_client_1._json)(body);
|
|
323
317
|
const exception = new models_0_1.InvalidNextTokenException({
|
|
324
318
|
$metadata: deserializeMetadata(parsedOutput),
|
|
325
319
|
...deserialized,
|
|
@@ -328,7 +322,7 @@ const de_InvalidNextTokenExceptionRes = async (parsedOutput, context) => {
|
|
|
328
322
|
};
|
|
329
323
|
const de_LimitExceededExceptionRes = async (parsedOutput, context) => {
|
|
330
324
|
const body = parsedOutput.body;
|
|
331
|
-
const deserialized =
|
|
325
|
+
const deserialized = (0, smithy_client_1._json)(body);
|
|
332
326
|
const exception = new models_0_1.LimitExceededException({
|
|
333
327
|
$metadata: deserializeMetadata(parsedOutput),
|
|
334
328
|
...deserialized,
|
|
@@ -337,7 +331,7 @@ const de_LimitExceededExceptionRes = async (parsedOutput, context) => {
|
|
|
337
331
|
};
|
|
338
332
|
const de_ObjectNotFoundExceptionRes = async (parsedOutput, context) => {
|
|
339
333
|
const body = parsedOutput.body;
|
|
340
|
-
const deserialized =
|
|
334
|
+
const deserialized = (0, smithy_client_1._json)(body);
|
|
341
335
|
const exception = new models_0_1.ObjectNotFoundException({
|
|
342
336
|
$metadata: deserializeMetadata(parsedOutput),
|
|
343
337
|
...deserialized,
|
|
@@ -346,148 +340,49 @@ const de_ObjectNotFoundExceptionRes = async (parsedOutput, context) => {
|
|
|
346
340
|
};
|
|
347
341
|
const de_ValidationExceptionRes = async (parsedOutput, context) => {
|
|
348
342
|
const body = parsedOutput.body;
|
|
349
|
-
const deserialized =
|
|
343
|
+
const deserialized = (0, smithy_client_1._json)(body);
|
|
350
344
|
const exception = new models_0_1.ValidationException({
|
|
351
345
|
$metadata: deserializeMetadata(parsedOutput),
|
|
352
346
|
...deserialized,
|
|
353
347
|
});
|
|
354
348
|
return (0, smithy_client_1.decorateServiceException)(exception, body);
|
|
355
349
|
};
|
|
356
|
-
const se_ApplicationSource = (input, context) => {
|
|
357
|
-
return {
|
|
358
|
-
...(input.CloudFormationStackARN != null && { CloudFormationStackARN: input.CloudFormationStackARN }),
|
|
359
|
-
...(input.TagFilters != null && { TagFilters: se_TagFilters(input.TagFilters, context) }),
|
|
360
|
-
};
|
|
361
|
-
};
|
|
362
|
-
const se_ApplicationSources = (input, context) => {
|
|
363
|
-
return input
|
|
364
|
-
.filter((e) => e != null)
|
|
365
|
-
.map((entry) => {
|
|
366
|
-
return se_ApplicationSource(entry, context);
|
|
367
|
-
});
|
|
368
|
-
};
|
|
369
350
|
const se_CreateScalingPlanRequest = (input, context) => {
|
|
370
|
-
return {
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
ScalingInstructions: se_ScalingInstructions(input.ScalingInstructions, context),
|
|
376
|
-
}),
|
|
377
|
-
...(input.ScalingPlanName != null && { ScalingPlanName: input.ScalingPlanName }),
|
|
378
|
-
};
|
|
379
|
-
};
|
|
380
|
-
const se_CustomizedLoadMetricSpecification = (input, context) => {
|
|
381
|
-
return {
|
|
382
|
-
...(input.Dimensions != null && { Dimensions: se_MetricDimensions(input.Dimensions, context) }),
|
|
383
|
-
...(input.MetricName != null && { MetricName: input.MetricName }),
|
|
384
|
-
...(input.Namespace != null && { Namespace: input.Namespace }),
|
|
385
|
-
...(input.Statistic != null && { Statistic: input.Statistic }),
|
|
386
|
-
...(input.Unit != null && { Unit: input.Unit }),
|
|
387
|
-
};
|
|
388
|
-
};
|
|
389
|
-
const se_CustomizedScalingMetricSpecification = (input, context) => {
|
|
390
|
-
return {
|
|
391
|
-
...(input.Dimensions != null && { Dimensions: se_MetricDimensions(input.Dimensions, context) }),
|
|
392
|
-
...(input.MetricName != null && { MetricName: input.MetricName }),
|
|
393
|
-
...(input.Namespace != null && { Namespace: input.Namespace }),
|
|
394
|
-
...(input.Statistic != null && { Statistic: input.Statistic }),
|
|
395
|
-
...(input.Unit != null && { Unit: input.Unit }),
|
|
396
|
-
};
|
|
397
|
-
};
|
|
398
|
-
const se_DeleteScalingPlanRequest = (input, context) => {
|
|
399
|
-
return {
|
|
400
|
-
...(input.ScalingPlanName != null && { ScalingPlanName: input.ScalingPlanName }),
|
|
401
|
-
...(input.ScalingPlanVersion != null && { ScalingPlanVersion: input.ScalingPlanVersion }),
|
|
402
|
-
};
|
|
403
|
-
};
|
|
404
|
-
const se_DescribeScalingPlanResourcesRequest = (input, context) => {
|
|
405
|
-
return {
|
|
406
|
-
...(input.MaxResults != null && { MaxResults: input.MaxResults }),
|
|
407
|
-
...(input.NextToken != null && { NextToken: input.NextToken }),
|
|
408
|
-
...(input.ScalingPlanName != null && { ScalingPlanName: input.ScalingPlanName }),
|
|
409
|
-
...(input.ScalingPlanVersion != null && { ScalingPlanVersion: input.ScalingPlanVersion }),
|
|
410
|
-
};
|
|
411
|
-
};
|
|
412
|
-
const se_DescribeScalingPlansRequest = (input, context) => {
|
|
413
|
-
return {
|
|
414
|
-
...(input.ApplicationSources != null && {
|
|
415
|
-
ApplicationSources: se_ApplicationSources(input.ApplicationSources, context),
|
|
416
|
-
}),
|
|
417
|
-
...(input.MaxResults != null && { MaxResults: input.MaxResults }),
|
|
418
|
-
...(input.NextToken != null && { NextToken: input.NextToken }),
|
|
419
|
-
...(input.ScalingPlanNames != null && { ScalingPlanNames: se_ScalingPlanNames(input.ScalingPlanNames, context) }),
|
|
420
|
-
...(input.ScalingPlanVersion != null && { ScalingPlanVersion: input.ScalingPlanVersion }),
|
|
421
|
-
};
|
|
351
|
+
return (0, smithy_client_1.take)(input, {
|
|
352
|
+
ApplicationSource: smithy_client_1._json,
|
|
353
|
+
ScalingInstructions: (_) => se_ScalingInstructions(_, context),
|
|
354
|
+
ScalingPlanName: [],
|
|
355
|
+
});
|
|
422
356
|
};
|
|
423
357
|
const se_GetScalingPlanResourceForecastDataRequest = (input, context) => {
|
|
424
|
-
return {
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
};
|
|
434
|
-
};
|
|
435
|
-
const se_MetricDimension = (input, context) => {
|
|
436
|
-
return {
|
|
437
|
-
...(input.Name != null && { Name: input.Name }),
|
|
438
|
-
...(input.Value != null && { Value: input.Value }),
|
|
439
|
-
};
|
|
440
|
-
};
|
|
441
|
-
const se_MetricDimensions = (input, context) => {
|
|
442
|
-
return input
|
|
443
|
-
.filter((e) => e != null)
|
|
444
|
-
.map((entry) => {
|
|
445
|
-
return se_MetricDimension(entry, context);
|
|
358
|
+
return (0, smithy_client_1.take)(input, {
|
|
359
|
+
EndTime: (_) => Math.round(_.getTime() / 1000),
|
|
360
|
+
ForecastDataType: [],
|
|
361
|
+
ResourceId: [],
|
|
362
|
+
ScalableDimension: [],
|
|
363
|
+
ScalingPlanName: [],
|
|
364
|
+
ScalingPlanVersion: [],
|
|
365
|
+
ServiceNamespace: [],
|
|
366
|
+
StartTime: (_) => Math.round(_.getTime() / 1000),
|
|
446
367
|
});
|
|
447
368
|
};
|
|
448
|
-
const se_PredefinedLoadMetricSpecification = (input, context) => {
|
|
449
|
-
return {
|
|
450
|
-
...(input.PredefinedLoadMetricType != null && { PredefinedLoadMetricType: input.PredefinedLoadMetricType }),
|
|
451
|
-
...(input.ResourceLabel != null && { ResourceLabel: input.ResourceLabel }),
|
|
452
|
-
};
|
|
453
|
-
};
|
|
454
|
-
const se_PredefinedScalingMetricSpecification = (input, context) => {
|
|
455
|
-
return {
|
|
456
|
-
...(input.PredefinedScalingMetricType != null && {
|
|
457
|
-
PredefinedScalingMetricType: input.PredefinedScalingMetricType,
|
|
458
|
-
}),
|
|
459
|
-
...(input.ResourceLabel != null && { ResourceLabel: input.ResourceLabel }),
|
|
460
|
-
};
|
|
461
|
-
};
|
|
462
369
|
const se_ScalingInstruction = (input, context) => {
|
|
463
|
-
return {
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
...(input.PredictiveScalingMode != null && { PredictiveScalingMode: input.PredictiveScalingMode }),
|
|
480
|
-
...(input.ResourceId != null && { ResourceId: input.ResourceId }),
|
|
481
|
-
...(input.ScalableDimension != null && { ScalableDimension: input.ScalableDimension }),
|
|
482
|
-
...(input.ScalingPolicyUpdateBehavior != null && {
|
|
483
|
-
ScalingPolicyUpdateBehavior: input.ScalingPolicyUpdateBehavior,
|
|
484
|
-
}),
|
|
485
|
-
...(input.ScheduledActionBufferTime != null && { ScheduledActionBufferTime: input.ScheduledActionBufferTime }),
|
|
486
|
-
...(input.ServiceNamespace != null && { ServiceNamespace: input.ServiceNamespace }),
|
|
487
|
-
...(input.TargetTrackingConfigurations != null && {
|
|
488
|
-
TargetTrackingConfigurations: se_TargetTrackingConfigurations(input.TargetTrackingConfigurations, context),
|
|
489
|
-
}),
|
|
490
|
-
};
|
|
370
|
+
return (0, smithy_client_1.take)(input, {
|
|
371
|
+
CustomizedLoadMetricSpecification: smithy_client_1._json,
|
|
372
|
+
DisableDynamicScaling: [],
|
|
373
|
+
MaxCapacity: [],
|
|
374
|
+
MinCapacity: [],
|
|
375
|
+
PredefinedLoadMetricSpecification: smithy_client_1._json,
|
|
376
|
+
PredictiveScalingMaxCapacityBehavior: [],
|
|
377
|
+
PredictiveScalingMaxCapacityBuffer: [],
|
|
378
|
+
PredictiveScalingMode: [],
|
|
379
|
+
ResourceId: [],
|
|
380
|
+
ScalableDimension: [],
|
|
381
|
+
ScalingPolicyUpdateBehavior: [],
|
|
382
|
+
ScheduledActionBufferTime: [],
|
|
383
|
+
ServiceNamespace: [],
|
|
384
|
+
TargetTrackingConfigurations: (_) => se_TargetTrackingConfigurations(_, context),
|
|
385
|
+
});
|
|
491
386
|
};
|
|
492
387
|
const se_ScalingInstructions = (input, context) => {
|
|
493
388
|
return input
|
|
@@ -496,47 +391,16 @@ const se_ScalingInstructions = (input, context) => {
|
|
|
496
391
|
return se_ScalingInstruction(entry, context);
|
|
497
392
|
});
|
|
498
393
|
};
|
|
499
|
-
const se_ScalingPlanNames = (input, context) => {
|
|
500
|
-
return input
|
|
501
|
-
.filter((e) => e != null)
|
|
502
|
-
.map((entry) => {
|
|
503
|
-
return entry;
|
|
504
|
-
});
|
|
505
|
-
};
|
|
506
|
-
const se_TagFilter = (input, context) => {
|
|
507
|
-
return {
|
|
508
|
-
...(input.Key != null && { Key: input.Key }),
|
|
509
|
-
...(input.Values != null && { Values: se_TagValues(input.Values, context) }),
|
|
510
|
-
};
|
|
511
|
-
};
|
|
512
|
-
const se_TagFilters = (input, context) => {
|
|
513
|
-
return input
|
|
514
|
-
.filter((e) => e != null)
|
|
515
|
-
.map((entry) => {
|
|
516
|
-
return se_TagFilter(entry, context);
|
|
517
|
-
});
|
|
518
|
-
};
|
|
519
|
-
const se_TagValues = (input, context) => {
|
|
520
|
-
return input
|
|
521
|
-
.filter((e) => e != null)
|
|
522
|
-
.map((entry) => {
|
|
523
|
-
return entry;
|
|
524
|
-
});
|
|
525
|
-
};
|
|
526
394
|
const se_TargetTrackingConfiguration = (input, context) => {
|
|
527
|
-
return {
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
...(input.ScaleInCooldown != null && { ScaleInCooldown: input.ScaleInCooldown }),
|
|
537
|
-
...(input.ScaleOutCooldown != null && { ScaleOutCooldown: input.ScaleOutCooldown }),
|
|
538
|
-
...(input.TargetValue != null && { TargetValue: (0, smithy_client_1.serializeFloat)(input.TargetValue) }),
|
|
539
|
-
};
|
|
395
|
+
return (0, smithy_client_1.take)(input, {
|
|
396
|
+
CustomizedScalingMetricSpecification: smithy_client_1._json,
|
|
397
|
+
DisableScaleIn: [],
|
|
398
|
+
EstimatedInstanceWarmup: [],
|
|
399
|
+
PredefinedScalingMetricSpecification: smithy_client_1._json,
|
|
400
|
+
ScaleInCooldown: [],
|
|
401
|
+
ScaleOutCooldown: [],
|
|
402
|
+
TargetValue: smithy_client_1.serializeFloat,
|
|
403
|
+
});
|
|
540
404
|
};
|
|
541
405
|
const se_TargetTrackingConfigurations = (input, context) => {
|
|
542
406
|
return input
|
|
@@ -546,207 +410,98 @@ const se_TargetTrackingConfigurations = (input, context) => {
|
|
|
546
410
|
});
|
|
547
411
|
};
|
|
548
412
|
const se_UpdateScalingPlanRequest = (input, context) => {
|
|
549
|
-
return {
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
}),
|
|
556
|
-
...(input.ScalingPlanName != null && { ScalingPlanName: input.ScalingPlanName }),
|
|
557
|
-
...(input.ScalingPlanVersion != null && { ScalingPlanVersion: input.ScalingPlanVersion }),
|
|
558
|
-
};
|
|
559
|
-
};
|
|
560
|
-
const de_ApplicationSource = (output, context) => {
|
|
561
|
-
return {
|
|
562
|
-
CloudFormationStackARN: (0, smithy_client_1.expectString)(output.CloudFormationStackARN),
|
|
563
|
-
TagFilters: output.TagFilters != null ? de_TagFilters(output.TagFilters, context) : undefined,
|
|
564
|
-
};
|
|
565
|
-
};
|
|
566
|
-
const de_ConcurrentUpdateException = (output, context) => {
|
|
567
|
-
return {
|
|
568
|
-
Message: (0, smithy_client_1.expectString)(output.Message),
|
|
569
|
-
};
|
|
570
|
-
};
|
|
571
|
-
const de_CreateScalingPlanResponse = (output, context) => {
|
|
572
|
-
return {
|
|
573
|
-
ScalingPlanVersion: (0, smithy_client_1.expectLong)(output.ScalingPlanVersion),
|
|
574
|
-
};
|
|
575
|
-
};
|
|
576
|
-
const de_CustomizedLoadMetricSpecification = (output, context) => {
|
|
577
|
-
return {
|
|
578
|
-
Dimensions: output.Dimensions != null ? de_MetricDimensions(output.Dimensions, context) : undefined,
|
|
579
|
-
MetricName: (0, smithy_client_1.expectString)(output.MetricName),
|
|
580
|
-
Namespace: (0, smithy_client_1.expectString)(output.Namespace),
|
|
581
|
-
Statistic: (0, smithy_client_1.expectString)(output.Statistic),
|
|
582
|
-
Unit: (0, smithy_client_1.expectString)(output.Unit),
|
|
583
|
-
};
|
|
584
|
-
};
|
|
585
|
-
const de_CustomizedScalingMetricSpecification = (output, context) => {
|
|
586
|
-
return {
|
|
587
|
-
Dimensions: output.Dimensions != null ? de_MetricDimensions(output.Dimensions, context) : undefined,
|
|
588
|
-
MetricName: (0, smithy_client_1.expectString)(output.MetricName),
|
|
589
|
-
Namespace: (0, smithy_client_1.expectString)(output.Namespace),
|
|
590
|
-
Statistic: (0, smithy_client_1.expectString)(output.Statistic),
|
|
591
|
-
Unit: (0, smithy_client_1.expectString)(output.Unit),
|
|
592
|
-
};
|
|
413
|
+
return (0, smithy_client_1.take)(input, {
|
|
414
|
+
ApplicationSource: smithy_client_1._json,
|
|
415
|
+
ScalingInstructions: (_) => se_ScalingInstructions(_, context),
|
|
416
|
+
ScalingPlanName: [],
|
|
417
|
+
ScalingPlanVersion: [],
|
|
418
|
+
});
|
|
593
419
|
};
|
|
594
420
|
const de_Datapoint = (output, context) => {
|
|
595
|
-
return {
|
|
596
|
-
Timestamp:
|
|
597
|
-
Value:
|
|
598
|
-
};
|
|
421
|
+
return (0, smithy_client_1.take)(output, {
|
|
422
|
+
Timestamp: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
423
|
+
Value: smithy_client_1.limitedParseDouble,
|
|
424
|
+
});
|
|
599
425
|
};
|
|
600
426
|
const de_Datapoints = (output, context) => {
|
|
601
427
|
const retVal = (output || [])
|
|
602
428
|
.filter((e) => e != null)
|
|
603
429
|
.map((entry) => {
|
|
604
|
-
if (entry === null) {
|
|
605
|
-
return null;
|
|
606
|
-
}
|
|
607
430
|
return de_Datapoint(entry, context);
|
|
608
431
|
});
|
|
609
432
|
return retVal;
|
|
610
433
|
};
|
|
611
|
-
const de_DeleteScalingPlanResponse = (output, context) => {
|
|
612
|
-
return {};
|
|
613
|
-
};
|
|
614
434
|
const de_DescribeScalingPlanResourcesResponse = (output, context) => {
|
|
615
|
-
return {
|
|
616
|
-
NextToken:
|
|
617
|
-
ScalingPlanResources:
|
|
618
|
-
};
|
|
435
|
+
return (0, smithy_client_1.take)(output, {
|
|
436
|
+
NextToken: smithy_client_1.expectString,
|
|
437
|
+
ScalingPlanResources: (_) => de_ScalingPlanResources(_, context),
|
|
438
|
+
});
|
|
619
439
|
};
|
|
620
440
|
const de_DescribeScalingPlansResponse = (output, context) => {
|
|
621
|
-
return {
|
|
622
|
-
NextToken:
|
|
623
|
-
ScalingPlans:
|
|
624
|
-
};
|
|
441
|
+
return (0, smithy_client_1.take)(output, {
|
|
442
|
+
NextToken: smithy_client_1.expectString,
|
|
443
|
+
ScalingPlans: (_) => de_ScalingPlans(_, context),
|
|
444
|
+
});
|
|
625
445
|
};
|
|
626
446
|
const de_GetScalingPlanResourceForecastDataResponse = (output, context) => {
|
|
627
|
-
return {
|
|
628
|
-
Datapoints:
|
|
629
|
-
};
|
|
630
|
-
};
|
|
631
|
-
const de_InternalServiceException = (output, context) => {
|
|
632
|
-
return {
|
|
633
|
-
Message: (0, smithy_client_1.expectString)(output.Message),
|
|
634
|
-
};
|
|
635
|
-
};
|
|
636
|
-
const de_InvalidNextTokenException = (output, context) => {
|
|
637
|
-
return {
|
|
638
|
-
Message: (0, smithy_client_1.expectString)(output.Message),
|
|
639
|
-
};
|
|
640
|
-
};
|
|
641
|
-
const de_LimitExceededException = (output, context) => {
|
|
642
|
-
return {
|
|
643
|
-
Message: (0, smithy_client_1.expectString)(output.Message),
|
|
644
|
-
};
|
|
645
|
-
};
|
|
646
|
-
const de_MetricDimension = (output, context) => {
|
|
647
|
-
return {
|
|
648
|
-
Name: (0, smithy_client_1.expectString)(output.Name),
|
|
649
|
-
Value: (0, smithy_client_1.expectString)(output.Value),
|
|
650
|
-
};
|
|
651
|
-
};
|
|
652
|
-
const de_MetricDimensions = (output, context) => {
|
|
653
|
-
const retVal = (output || [])
|
|
654
|
-
.filter((e) => e != null)
|
|
655
|
-
.map((entry) => {
|
|
656
|
-
if (entry === null) {
|
|
657
|
-
return null;
|
|
658
|
-
}
|
|
659
|
-
return de_MetricDimension(entry, context);
|
|
447
|
+
return (0, smithy_client_1.take)(output, {
|
|
448
|
+
Datapoints: (_) => de_Datapoints(_, context),
|
|
660
449
|
});
|
|
661
|
-
return retVal;
|
|
662
|
-
};
|
|
663
|
-
const de_ObjectNotFoundException = (output, context) => {
|
|
664
|
-
return {
|
|
665
|
-
Message: (0, smithy_client_1.expectString)(output.Message),
|
|
666
|
-
};
|
|
667
|
-
};
|
|
668
|
-
const de_PredefinedLoadMetricSpecification = (output, context) => {
|
|
669
|
-
return {
|
|
670
|
-
PredefinedLoadMetricType: (0, smithy_client_1.expectString)(output.PredefinedLoadMetricType),
|
|
671
|
-
ResourceLabel: (0, smithy_client_1.expectString)(output.ResourceLabel),
|
|
672
|
-
};
|
|
673
|
-
};
|
|
674
|
-
const de_PredefinedScalingMetricSpecification = (output, context) => {
|
|
675
|
-
return {
|
|
676
|
-
PredefinedScalingMetricType: (0, smithy_client_1.expectString)(output.PredefinedScalingMetricType),
|
|
677
|
-
ResourceLabel: (0, smithy_client_1.expectString)(output.ResourceLabel),
|
|
678
|
-
};
|
|
679
450
|
};
|
|
680
451
|
const de_ScalingInstruction = (output, context) => {
|
|
681
|
-
return {
|
|
682
|
-
CustomizedLoadMetricSpecification:
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
ScheduledActionBufferTime: (0, smithy_client_1.expectInt32)(output.ScheduledActionBufferTime),
|
|
698
|
-
ServiceNamespace: (0, smithy_client_1.expectString)(output.ServiceNamespace),
|
|
699
|
-
TargetTrackingConfigurations: output.TargetTrackingConfigurations != null
|
|
700
|
-
? de_TargetTrackingConfigurations(output.TargetTrackingConfigurations, context)
|
|
701
|
-
: undefined,
|
|
702
|
-
};
|
|
452
|
+
return (0, smithy_client_1.take)(output, {
|
|
453
|
+
CustomizedLoadMetricSpecification: smithy_client_1._json,
|
|
454
|
+
DisableDynamicScaling: smithy_client_1.expectBoolean,
|
|
455
|
+
MaxCapacity: smithy_client_1.expectInt32,
|
|
456
|
+
MinCapacity: smithy_client_1.expectInt32,
|
|
457
|
+
PredefinedLoadMetricSpecification: smithy_client_1._json,
|
|
458
|
+
PredictiveScalingMaxCapacityBehavior: smithy_client_1.expectString,
|
|
459
|
+
PredictiveScalingMaxCapacityBuffer: smithy_client_1.expectInt32,
|
|
460
|
+
PredictiveScalingMode: smithy_client_1.expectString,
|
|
461
|
+
ResourceId: smithy_client_1.expectString,
|
|
462
|
+
ScalableDimension: smithy_client_1.expectString,
|
|
463
|
+
ScalingPolicyUpdateBehavior: smithy_client_1.expectString,
|
|
464
|
+
ScheduledActionBufferTime: smithy_client_1.expectInt32,
|
|
465
|
+
ServiceNamespace: smithy_client_1.expectString,
|
|
466
|
+
TargetTrackingConfigurations: (_) => de_TargetTrackingConfigurations(_, context),
|
|
467
|
+
});
|
|
703
468
|
};
|
|
704
469
|
const de_ScalingInstructions = (output, context) => {
|
|
705
470
|
const retVal = (output || [])
|
|
706
471
|
.filter((e) => e != null)
|
|
707
472
|
.map((entry) => {
|
|
708
|
-
if (entry === null) {
|
|
709
|
-
return null;
|
|
710
|
-
}
|
|
711
473
|
return de_ScalingInstruction(entry, context);
|
|
712
474
|
});
|
|
713
475
|
return retVal;
|
|
714
476
|
};
|
|
715
477
|
const de_ScalingPlan = (output, context) => {
|
|
716
|
-
return {
|
|
717
|
-
ApplicationSource:
|
|
718
|
-
CreationTime:
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
StatusStartTime: output.StatusStartTime != null
|
|
727
|
-
? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.StatusStartTime)))
|
|
728
|
-
: undefined,
|
|
729
|
-
};
|
|
478
|
+
return (0, smithy_client_1.take)(output, {
|
|
479
|
+
ApplicationSource: smithy_client_1._json,
|
|
480
|
+
CreationTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
481
|
+
ScalingInstructions: (_) => de_ScalingInstructions(_, context),
|
|
482
|
+
ScalingPlanName: smithy_client_1.expectString,
|
|
483
|
+
ScalingPlanVersion: smithy_client_1.expectLong,
|
|
484
|
+
StatusCode: smithy_client_1.expectString,
|
|
485
|
+
StatusMessage: smithy_client_1.expectString,
|
|
486
|
+
StatusStartTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
487
|
+
});
|
|
730
488
|
};
|
|
731
489
|
const de_ScalingPlanResource = (output, context) => {
|
|
732
|
-
return {
|
|
733
|
-
ResourceId:
|
|
734
|
-
ScalableDimension:
|
|
735
|
-
ScalingPlanName:
|
|
736
|
-
ScalingPlanVersion:
|
|
737
|
-
ScalingPolicies:
|
|
738
|
-
ScalingStatusCode:
|
|
739
|
-
ScalingStatusMessage:
|
|
740
|
-
ServiceNamespace:
|
|
741
|
-
};
|
|
490
|
+
return (0, smithy_client_1.take)(output, {
|
|
491
|
+
ResourceId: smithy_client_1.expectString,
|
|
492
|
+
ScalableDimension: smithy_client_1.expectString,
|
|
493
|
+
ScalingPlanName: smithy_client_1.expectString,
|
|
494
|
+
ScalingPlanVersion: smithy_client_1.expectLong,
|
|
495
|
+
ScalingPolicies: (_) => de_ScalingPolicies(_, context),
|
|
496
|
+
ScalingStatusCode: smithy_client_1.expectString,
|
|
497
|
+
ScalingStatusMessage: smithy_client_1.expectString,
|
|
498
|
+
ServiceNamespace: smithy_client_1.expectString,
|
|
499
|
+
});
|
|
742
500
|
};
|
|
743
501
|
const de_ScalingPlanResources = (output, context) => {
|
|
744
502
|
const retVal = (output || [])
|
|
745
503
|
.filter((e) => e != null)
|
|
746
504
|
.map((entry) => {
|
|
747
|
-
if (entry === null) {
|
|
748
|
-
return null;
|
|
749
|
-
}
|
|
750
505
|
return de_ScalingPlanResource(entry, context);
|
|
751
506
|
});
|
|
752
507
|
return retVal;
|
|
@@ -755,9 +510,6 @@ const de_ScalingPlans = (output, context) => {
|
|
|
755
510
|
const retVal = (output || [])
|
|
756
511
|
.filter((e) => e != null)
|
|
757
512
|
.map((entry) => {
|
|
758
|
-
if (entry === null) {
|
|
759
|
-
return null;
|
|
760
|
-
}
|
|
761
513
|
return de_ScalingPlan(entry, context);
|
|
762
514
|
});
|
|
763
515
|
return retVal;
|
|
@@ -766,84 +518,36 @@ const de_ScalingPolicies = (output, context) => {
|
|
|
766
518
|
const retVal = (output || [])
|
|
767
519
|
.filter((e) => e != null)
|
|
768
520
|
.map((entry) => {
|
|
769
|
-
if (entry === null) {
|
|
770
|
-
return null;
|
|
771
|
-
}
|
|
772
521
|
return de_ScalingPolicy(entry, context);
|
|
773
522
|
});
|
|
774
523
|
return retVal;
|
|
775
524
|
};
|
|
776
525
|
const de_ScalingPolicy = (output, context) => {
|
|
777
|
-
return {
|
|
778
|
-
PolicyName:
|
|
779
|
-
PolicyType:
|
|
780
|
-
TargetTrackingConfiguration:
|
|
781
|
-
? de_TargetTrackingConfiguration(output.TargetTrackingConfiguration, context)
|
|
782
|
-
: undefined,
|
|
783
|
-
};
|
|
784
|
-
};
|
|
785
|
-
const de_TagFilter = (output, context) => {
|
|
786
|
-
return {
|
|
787
|
-
Key: (0, smithy_client_1.expectString)(output.Key),
|
|
788
|
-
Values: output.Values != null ? de_TagValues(output.Values, context) : undefined,
|
|
789
|
-
};
|
|
790
|
-
};
|
|
791
|
-
const de_TagFilters = (output, context) => {
|
|
792
|
-
const retVal = (output || [])
|
|
793
|
-
.filter((e) => e != null)
|
|
794
|
-
.map((entry) => {
|
|
795
|
-
if (entry === null) {
|
|
796
|
-
return null;
|
|
797
|
-
}
|
|
798
|
-
return de_TagFilter(entry, context);
|
|
799
|
-
});
|
|
800
|
-
return retVal;
|
|
801
|
-
};
|
|
802
|
-
const de_TagValues = (output, context) => {
|
|
803
|
-
const retVal = (output || [])
|
|
804
|
-
.filter((e) => e != null)
|
|
805
|
-
.map((entry) => {
|
|
806
|
-
if (entry === null) {
|
|
807
|
-
return null;
|
|
808
|
-
}
|
|
809
|
-
return (0, smithy_client_1.expectString)(entry);
|
|
526
|
+
return (0, smithy_client_1.take)(output, {
|
|
527
|
+
PolicyName: smithy_client_1.expectString,
|
|
528
|
+
PolicyType: smithy_client_1.expectString,
|
|
529
|
+
TargetTrackingConfiguration: (_) => de_TargetTrackingConfiguration(_, context),
|
|
810
530
|
});
|
|
811
|
-
return retVal;
|
|
812
531
|
};
|
|
813
532
|
const de_TargetTrackingConfiguration = (output, context) => {
|
|
814
|
-
return {
|
|
815
|
-
CustomizedScalingMetricSpecification:
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
ScaleInCooldown: (0, smithy_client_1.expectInt32)(output.ScaleInCooldown),
|
|
824
|
-
ScaleOutCooldown: (0, smithy_client_1.expectInt32)(output.ScaleOutCooldown),
|
|
825
|
-
TargetValue: (0, smithy_client_1.limitedParseDouble)(output.TargetValue),
|
|
826
|
-
};
|
|
533
|
+
return (0, smithy_client_1.take)(output, {
|
|
534
|
+
CustomizedScalingMetricSpecification: smithy_client_1._json,
|
|
535
|
+
DisableScaleIn: smithy_client_1.expectBoolean,
|
|
536
|
+
EstimatedInstanceWarmup: smithy_client_1.expectInt32,
|
|
537
|
+
PredefinedScalingMetricSpecification: smithy_client_1._json,
|
|
538
|
+
ScaleInCooldown: smithy_client_1.expectInt32,
|
|
539
|
+
ScaleOutCooldown: smithy_client_1.expectInt32,
|
|
540
|
+
TargetValue: smithy_client_1.limitedParseDouble,
|
|
541
|
+
});
|
|
827
542
|
};
|
|
828
543
|
const de_TargetTrackingConfigurations = (output, context) => {
|
|
829
544
|
const retVal = (output || [])
|
|
830
545
|
.filter((e) => e != null)
|
|
831
546
|
.map((entry) => {
|
|
832
|
-
if (entry === null) {
|
|
833
|
-
return null;
|
|
834
|
-
}
|
|
835
547
|
return de_TargetTrackingConfiguration(entry, context);
|
|
836
548
|
});
|
|
837
549
|
return retVal;
|
|
838
550
|
};
|
|
839
|
-
const de_UpdateScalingPlanResponse = (output, context) => {
|
|
840
|
-
return {};
|
|
841
|
-
};
|
|
842
|
-
const de_ValidationException = (output, context) => {
|
|
843
|
-
return {
|
|
844
|
-
Message: (0, smithy_client_1.expectString)(output.Message),
|
|
845
|
-
};
|
|
846
|
-
};
|
|
847
551
|
const deserializeMetadata = (output) => ({
|
|
848
552
|
httpStatusCode: output.statusCode,
|
|
849
553
|
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
|
|
@@ -857,6 +561,7 @@ const collectBody = (streamBody = new Uint8Array(), context) => {
|
|
|
857
561
|
return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());
|
|
858
562
|
};
|
|
859
563
|
const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
|
|
564
|
+
const throwDefaultError = (0, smithy_client_1.withBaseException)(AutoScalingPlansServiceException_1.AutoScalingPlansServiceException);
|
|
860
565
|
const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, body) => {
|
|
861
566
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
862
567
|
const contents = {
|