@aws-sdk/client-auto-scaling-plans 3.489.0 → 3.495.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist-cjs/index.js CHANGED
@@ -1,11 +1,1094 @@
1
1
  "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.AutoScalingPlansServiceException = void 0;
4
- const tslib_1 = require("tslib");
5
- tslib_1.__exportStar(require("./AutoScalingPlansClient"), exports);
6
- tslib_1.__exportStar(require("./AutoScalingPlans"), exports);
7
- tslib_1.__exportStar(require("./commands"), exports);
8
- tslib_1.__exportStar(require("./models"), exports);
9
- require("@aws-sdk/util-endpoints");
10
- var AutoScalingPlansServiceException_1 = require("./models/AutoScalingPlansServiceException");
11
- Object.defineProperty(exports, "AutoScalingPlansServiceException", { enumerable: true, get: function () { return AutoScalingPlansServiceException_1.AutoScalingPlansServiceException; } });
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
7
+ var __export = (target, all) => {
8
+ for (var name in all)
9
+ __defProp(target, name, { get: all[name], enumerable: true });
10
+ };
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from))
14
+ if (!__hasOwnProp.call(to, key) && key !== except)
15
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
+ }
17
+ return to;
18
+ };
19
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
20
+
21
+ // src/index.ts
22
+ var src_exports = {};
23
+ __export(src_exports, {
24
+ AutoScalingPlans: () => AutoScalingPlans,
25
+ AutoScalingPlansClient: () => AutoScalingPlansClient,
26
+ AutoScalingPlansServiceException: () => AutoScalingPlansServiceException,
27
+ ConcurrentUpdateException: () => ConcurrentUpdateException,
28
+ CreateScalingPlanCommand: () => CreateScalingPlanCommand,
29
+ DeleteScalingPlanCommand: () => DeleteScalingPlanCommand,
30
+ DescribeScalingPlanResourcesCommand: () => DescribeScalingPlanResourcesCommand,
31
+ DescribeScalingPlansCommand: () => DescribeScalingPlansCommand,
32
+ ForecastDataType: () => ForecastDataType,
33
+ GetScalingPlanResourceForecastDataCommand: () => GetScalingPlanResourceForecastDataCommand,
34
+ InternalServiceException: () => InternalServiceException,
35
+ InvalidNextTokenException: () => InvalidNextTokenException,
36
+ LimitExceededException: () => LimitExceededException,
37
+ LoadMetricType: () => LoadMetricType,
38
+ MetricStatistic: () => MetricStatistic,
39
+ ObjectNotFoundException: () => ObjectNotFoundException,
40
+ PolicyType: () => PolicyType,
41
+ PredictiveScalingMaxCapacityBehavior: () => PredictiveScalingMaxCapacityBehavior,
42
+ PredictiveScalingMode: () => PredictiveScalingMode,
43
+ ScalableDimension: () => ScalableDimension,
44
+ ScalingMetricType: () => ScalingMetricType,
45
+ ScalingPlanStatusCode: () => ScalingPlanStatusCode,
46
+ ScalingPolicyUpdateBehavior: () => ScalingPolicyUpdateBehavior,
47
+ ScalingStatusCode: () => ScalingStatusCode,
48
+ ServiceNamespace: () => ServiceNamespace,
49
+ UpdateScalingPlanCommand: () => UpdateScalingPlanCommand,
50
+ ValidationException: () => ValidationException,
51
+ __Client: () => import_smithy_client.Client
52
+ });
53
+ module.exports = __toCommonJS(src_exports);
54
+
55
+ // src/AutoScalingPlansClient.ts
56
+ var import_middleware_host_header = require("@aws-sdk/middleware-host-header");
57
+ var import_middleware_logger = require("@aws-sdk/middleware-logger");
58
+ var import_middleware_recursion_detection = require("@aws-sdk/middleware-recursion-detection");
59
+ var import_middleware_signing = require("@aws-sdk/middleware-signing");
60
+ var import_middleware_user_agent = require("@aws-sdk/middleware-user-agent");
61
+ var import_config_resolver = require("@smithy/config-resolver");
62
+ var import_middleware_content_length = require("@smithy/middleware-content-length");
63
+ var import_middleware_endpoint = require("@smithy/middleware-endpoint");
64
+ var import_middleware_retry = require("@smithy/middleware-retry");
65
+
66
+
67
+ // src/endpoint/EndpointParameters.ts
68
+ var resolveClientEndpointParameters = /* @__PURE__ */ __name((options) => {
69
+ return {
70
+ ...options,
71
+ useDualstackEndpoint: options.useDualstackEndpoint ?? false,
72
+ useFipsEndpoint: options.useFipsEndpoint ?? false,
73
+ defaultSigningName: "autoscaling-plans"
74
+ };
75
+ }, "resolveClientEndpointParameters");
76
+ var commonParams = {
77
+ UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
78
+ Endpoint: { type: "builtInParams", name: "endpoint" },
79
+ Region: { type: "builtInParams", name: "region" },
80
+ UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }
81
+ };
82
+
83
+ // src/AutoScalingPlansClient.ts
84
+ var import_runtimeConfig = require("././runtimeConfig");
85
+
86
+ // src/runtimeExtensions.ts
87
+ var import_region_config_resolver = require("@aws-sdk/region-config-resolver");
88
+ var import_protocol_http = require("@smithy/protocol-http");
89
+ var import_smithy_client = require("@smithy/smithy-client");
90
+ var asPartial = /* @__PURE__ */ __name((t) => t, "asPartial");
91
+ var resolveRuntimeExtensions = /* @__PURE__ */ __name((runtimeConfig, extensions) => {
92
+ const extensionConfiguration = {
93
+ ...asPartial((0, import_region_config_resolver.getAwsRegionExtensionConfiguration)(runtimeConfig)),
94
+ ...asPartial((0, import_smithy_client.getDefaultExtensionConfiguration)(runtimeConfig)),
95
+ ...asPartial((0, import_protocol_http.getHttpHandlerExtensionConfiguration)(runtimeConfig))
96
+ };
97
+ extensions.forEach((extension) => extension.configure(extensionConfiguration));
98
+ return {
99
+ ...runtimeConfig,
100
+ ...(0, import_region_config_resolver.resolveAwsRegionExtensionConfiguration)(extensionConfiguration),
101
+ ...(0, import_smithy_client.resolveDefaultRuntimeConfig)(extensionConfiguration),
102
+ ...(0, import_protocol_http.resolveHttpHandlerRuntimeConfig)(extensionConfiguration)
103
+ };
104
+ }, "resolveRuntimeExtensions");
105
+
106
+ // src/AutoScalingPlansClient.ts
107
+ var _AutoScalingPlansClient = class _AutoScalingPlansClient extends import_smithy_client.Client {
108
+ constructor(...[configuration]) {
109
+ const _config_0 = (0, import_runtimeConfig.getRuntimeConfig)(configuration || {});
110
+ const _config_1 = resolveClientEndpointParameters(_config_0);
111
+ const _config_2 = (0, import_config_resolver.resolveRegionConfig)(_config_1);
112
+ const _config_3 = (0, import_middleware_endpoint.resolveEndpointConfig)(_config_2);
113
+ const _config_4 = (0, import_middleware_retry.resolveRetryConfig)(_config_3);
114
+ const _config_5 = (0, import_middleware_host_header.resolveHostHeaderConfig)(_config_4);
115
+ const _config_6 = (0, import_middleware_signing.resolveAwsAuthConfig)(_config_5);
116
+ const _config_7 = (0, import_middleware_user_agent.resolveUserAgentConfig)(_config_6);
117
+ const _config_8 = resolveRuntimeExtensions(_config_7, (configuration == null ? void 0 : configuration.extensions) || []);
118
+ super(_config_8);
119
+ this.config = _config_8;
120
+ this.middlewareStack.use((0, import_middleware_retry.getRetryPlugin)(this.config));
121
+ this.middlewareStack.use((0, import_middleware_content_length.getContentLengthPlugin)(this.config));
122
+ this.middlewareStack.use((0, import_middleware_host_header.getHostHeaderPlugin)(this.config));
123
+ this.middlewareStack.use((0, import_middleware_logger.getLoggerPlugin)(this.config));
124
+ this.middlewareStack.use((0, import_middleware_recursion_detection.getRecursionDetectionPlugin)(this.config));
125
+ this.middlewareStack.use((0, import_middleware_signing.getAwsAuthPlugin)(this.config));
126
+ this.middlewareStack.use((0, import_middleware_user_agent.getUserAgentPlugin)(this.config));
127
+ }
128
+ /**
129
+ * Destroy underlying resources, like sockets. It's usually not necessary to do this.
130
+ * However in Node.js, it's best to explicitly shut down the client's agent when it is no longer needed.
131
+ * Otherwise, sockets might stay open for quite a long time before the server terminates them.
132
+ */
133
+ destroy() {
134
+ super.destroy();
135
+ }
136
+ };
137
+ __name(_AutoScalingPlansClient, "AutoScalingPlansClient");
138
+ var AutoScalingPlansClient = _AutoScalingPlansClient;
139
+
140
+ // src/AutoScalingPlans.ts
141
+
142
+
143
+ // src/commands/CreateScalingPlanCommand.ts
144
+
145
+ var import_middleware_serde = require("@smithy/middleware-serde");
146
+
147
+ var import_types = require("@smithy/types");
148
+
149
+ // src/protocols/Aws_json1_1.ts
150
+
151
+
152
+
153
+ // src/models/AutoScalingPlansServiceException.ts
154
+
155
+ var _AutoScalingPlansServiceException = class _AutoScalingPlansServiceException extends import_smithy_client.ServiceException {
156
+ /**
157
+ * @internal
158
+ */
159
+ constructor(options) {
160
+ super(options);
161
+ Object.setPrototypeOf(this, _AutoScalingPlansServiceException.prototype);
162
+ }
163
+ };
164
+ __name(_AutoScalingPlansServiceException, "AutoScalingPlansServiceException");
165
+ var AutoScalingPlansServiceException = _AutoScalingPlansServiceException;
166
+
167
+ // src/models/models_0.ts
168
+ var _ConcurrentUpdateException = class _ConcurrentUpdateException extends AutoScalingPlansServiceException {
169
+ /**
170
+ * @internal
171
+ */
172
+ constructor(opts) {
173
+ super({
174
+ name: "ConcurrentUpdateException",
175
+ $fault: "server",
176
+ ...opts
177
+ });
178
+ this.name = "ConcurrentUpdateException";
179
+ this.$fault = "server";
180
+ Object.setPrototypeOf(this, _ConcurrentUpdateException.prototype);
181
+ this.Message = opts.Message;
182
+ }
183
+ };
184
+ __name(_ConcurrentUpdateException, "ConcurrentUpdateException");
185
+ var ConcurrentUpdateException = _ConcurrentUpdateException;
186
+ var MetricStatistic = {
187
+ Average: "Average",
188
+ Maximum: "Maximum",
189
+ Minimum: "Minimum",
190
+ SampleCount: "SampleCount",
191
+ Sum: "Sum"
192
+ };
193
+ var LoadMetricType = {
194
+ ALBTargetGroupRequestCount: "ALBTargetGroupRequestCount",
195
+ ASGTotalCPUUtilization: "ASGTotalCPUUtilization",
196
+ ASGTotalNetworkIn: "ASGTotalNetworkIn",
197
+ ASGTotalNetworkOut: "ASGTotalNetworkOut"
198
+ };
199
+ var PredictiveScalingMaxCapacityBehavior = {
200
+ SetForecastCapacityToMaxCapacity: "SetForecastCapacityToMaxCapacity",
201
+ SetMaxCapacityAboveForecastCapacity: "SetMaxCapacityAboveForecastCapacity",
202
+ SetMaxCapacityToForecastCapacity: "SetMaxCapacityToForecastCapacity"
203
+ };
204
+ var PredictiveScalingMode = {
205
+ ForecastAndScale: "ForecastAndScale",
206
+ ForecastOnly: "ForecastOnly"
207
+ };
208
+ var ScalableDimension = {
209
+ AutoScalingGroupDesiredCapacity: "autoscaling:autoScalingGroup:DesiredCapacity",
210
+ DynamoDBIndexReadCapacityUnits: "dynamodb:index:ReadCapacityUnits",
211
+ DynamoDBIndexWriteCapacityUnits: "dynamodb:index:WriteCapacityUnits",
212
+ DynamoDBTableReadCapacityUnits: "dynamodb:table:ReadCapacityUnits",
213
+ DynamoDBTableWriteCapacityUnits: "dynamodb:table:WriteCapacityUnits",
214
+ EC2SpotFleetRequestTargetCapacity: "ec2:spot-fleet-request:TargetCapacity",
215
+ ECSServiceDesiredCount: "ecs:service:DesiredCount",
216
+ RDSClusterReadReplicaCount: "rds:cluster:ReadReplicaCount"
217
+ };
218
+ var ScalingPolicyUpdateBehavior = {
219
+ KeepExternalPolicies: "KeepExternalPolicies",
220
+ ReplaceExternalPolicies: "ReplaceExternalPolicies"
221
+ };
222
+ var ServiceNamespace = {
223
+ AUTOSCALING: "autoscaling",
224
+ DYNAMODB: "dynamodb",
225
+ EC2: "ec2",
226
+ ECS: "ecs",
227
+ RDS: "rds"
228
+ };
229
+ var ScalingMetricType = {
230
+ ALBRequestCountPerTarget: "ALBRequestCountPerTarget",
231
+ ASGAverageCPUUtilization: "ASGAverageCPUUtilization",
232
+ ASGAverageNetworkIn: "ASGAverageNetworkIn",
233
+ ASGAverageNetworkOut: "ASGAverageNetworkOut",
234
+ DynamoDBReadCapacityUtilization: "DynamoDBReadCapacityUtilization",
235
+ DynamoDBWriteCapacityUtilization: "DynamoDBWriteCapacityUtilization",
236
+ EC2SpotFleetRequestAverageCPUUtilization: "EC2SpotFleetRequestAverageCPUUtilization",
237
+ EC2SpotFleetRequestAverageNetworkIn: "EC2SpotFleetRequestAverageNetworkIn",
238
+ EC2SpotFleetRequestAverageNetworkOut: "EC2SpotFleetRequestAverageNetworkOut",
239
+ ECSServiceAverageCPUUtilization: "ECSServiceAverageCPUUtilization",
240
+ ECSServiceAverageMemoryUtilization: "ECSServiceAverageMemoryUtilization",
241
+ RDSReaderAverageCPUUtilization: "RDSReaderAverageCPUUtilization",
242
+ RDSReaderAverageDatabaseConnections: "RDSReaderAverageDatabaseConnections"
243
+ };
244
+ var _InternalServiceException = class _InternalServiceException extends AutoScalingPlansServiceException {
245
+ /**
246
+ * @internal
247
+ */
248
+ constructor(opts) {
249
+ super({
250
+ name: "InternalServiceException",
251
+ $fault: "server",
252
+ ...opts
253
+ });
254
+ this.name = "InternalServiceException";
255
+ this.$fault = "server";
256
+ Object.setPrototypeOf(this, _InternalServiceException.prototype);
257
+ this.Message = opts.Message;
258
+ }
259
+ };
260
+ __name(_InternalServiceException, "InternalServiceException");
261
+ var InternalServiceException = _InternalServiceException;
262
+ var _LimitExceededException = class _LimitExceededException extends AutoScalingPlansServiceException {
263
+ /**
264
+ * @internal
265
+ */
266
+ constructor(opts) {
267
+ super({
268
+ name: "LimitExceededException",
269
+ $fault: "client",
270
+ ...opts
271
+ });
272
+ this.name = "LimitExceededException";
273
+ this.$fault = "client";
274
+ Object.setPrototypeOf(this, _LimitExceededException.prototype);
275
+ this.Message = opts.Message;
276
+ }
277
+ };
278
+ __name(_LimitExceededException, "LimitExceededException");
279
+ var LimitExceededException = _LimitExceededException;
280
+ var _ValidationException = class _ValidationException extends AutoScalingPlansServiceException {
281
+ /**
282
+ * @internal
283
+ */
284
+ constructor(opts) {
285
+ super({
286
+ name: "ValidationException",
287
+ $fault: "client",
288
+ ...opts
289
+ });
290
+ this.name = "ValidationException";
291
+ this.$fault = "client";
292
+ Object.setPrototypeOf(this, _ValidationException.prototype);
293
+ this.Message = opts.Message;
294
+ }
295
+ };
296
+ __name(_ValidationException, "ValidationException");
297
+ var ValidationException = _ValidationException;
298
+ var _ObjectNotFoundException = class _ObjectNotFoundException extends AutoScalingPlansServiceException {
299
+ /**
300
+ * @internal
301
+ */
302
+ constructor(opts) {
303
+ super({
304
+ name: "ObjectNotFoundException",
305
+ $fault: "client",
306
+ ...opts
307
+ });
308
+ this.name = "ObjectNotFoundException";
309
+ this.$fault = "client";
310
+ Object.setPrototypeOf(this, _ObjectNotFoundException.prototype);
311
+ this.Message = opts.Message;
312
+ }
313
+ };
314
+ __name(_ObjectNotFoundException, "ObjectNotFoundException");
315
+ var ObjectNotFoundException = _ObjectNotFoundException;
316
+ var PolicyType = {
317
+ TargetTrackingScaling: "TargetTrackingScaling"
318
+ };
319
+ var ScalingStatusCode = {
320
+ Active: "Active",
321
+ Inactive: "Inactive",
322
+ PartiallyActive: "PartiallyActive"
323
+ };
324
+ var _InvalidNextTokenException = class _InvalidNextTokenException extends AutoScalingPlansServiceException {
325
+ /**
326
+ * @internal
327
+ */
328
+ constructor(opts) {
329
+ super({
330
+ name: "InvalidNextTokenException",
331
+ $fault: "client",
332
+ ...opts
333
+ });
334
+ this.name = "InvalidNextTokenException";
335
+ this.$fault = "client";
336
+ Object.setPrototypeOf(this, _InvalidNextTokenException.prototype);
337
+ this.Message = opts.Message;
338
+ }
339
+ };
340
+ __name(_InvalidNextTokenException, "InvalidNextTokenException");
341
+ var InvalidNextTokenException = _InvalidNextTokenException;
342
+ var ScalingPlanStatusCode = {
343
+ Active: "Active",
344
+ ActiveWithProblems: "ActiveWithProblems",
345
+ CreationFailed: "CreationFailed",
346
+ CreationInProgress: "CreationInProgress",
347
+ DeletionFailed: "DeletionFailed",
348
+ DeletionInProgress: "DeletionInProgress",
349
+ UpdateFailed: "UpdateFailed",
350
+ UpdateInProgress: "UpdateInProgress"
351
+ };
352
+ var ForecastDataType = {
353
+ CapacityForecast: "CapacityForecast",
354
+ LoadForecast: "LoadForecast",
355
+ ScheduledActionMaxCapacity: "ScheduledActionMaxCapacity",
356
+ ScheduledActionMinCapacity: "ScheduledActionMinCapacity"
357
+ };
358
+
359
+ // src/protocols/Aws_json1_1.ts
360
+ var se_CreateScalingPlanCommand = /* @__PURE__ */ __name(async (input, context) => {
361
+ const headers = sharedHeaders("CreateScalingPlan");
362
+ let body;
363
+ body = JSON.stringify(se_CreateScalingPlanRequest(input, context));
364
+ return buildHttpRpcRequest(context, headers, "/", void 0, body);
365
+ }, "se_CreateScalingPlanCommand");
366
+ var se_DeleteScalingPlanCommand = /* @__PURE__ */ __name(async (input, context) => {
367
+ const headers = sharedHeaders("DeleteScalingPlan");
368
+ let body;
369
+ body = JSON.stringify((0, import_smithy_client._json)(input));
370
+ return buildHttpRpcRequest(context, headers, "/", void 0, body);
371
+ }, "se_DeleteScalingPlanCommand");
372
+ var se_DescribeScalingPlanResourcesCommand = /* @__PURE__ */ __name(async (input, context) => {
373
+ const headers = sharedHeaders("DescribeScalingPlanResources");
374
+ let body;
375
+ body = JSON.stringify((0, import_smithy_client._json)(input));
376
+ return buildHttpRpcRequest(context, headers, "/", void 0, body);
377
+ }, "se_DescribeScalingPlanResourcesCommand");
378
+ var se_DescribeScalingPlansCommand = /* @__PURE__ */ __name(async (input, context) => {
379
+ const headers = sharedHeaders("DescribeScalingPlans");
380
+ let body;
381
+ body = JSON.stringify((0, import_smithy_client._json)(input));
382
+ return buildHttpRpcRequest(context, headers, "/", void 0, body);
383
+ }, "se_DescribeScalingPlansCommand");
384
+ var se_GetScalingPlanResourceForecastDataCommand = /* @__PURE__ */ __name(async (input, context) => {
385
+ const headers = sharedHeaders("GetScalingPlanResourceForecastData");
386
+ let body;
387
+ body = JSON.stringify(se_GetScalingPlanResourceForecastDataRequest(input, context));
388
+ return buildHttpRpcRequest(context, headers, "/", void 0, body);
389
+ }, "se_GetScalingPlanResourceForecastDataCommand");
390
+ var se_UpdateScalingPlanCommand = /* @__PURE__ */ __name(async (input, context) => {
391
+ const headers = sharedHeaders("UpdateScalingPlan");
392
+ let body;
393
+ body = JSON.stringify(se_UpdateScalingPlanRequest(input, context));
394
+ return buildHttpRpcRequest(context, headers, "/", void 0, body);
395
+ }, "se_UpdateScalingPlanCommand");
396
+ var de_CreateScalingPlanCommand = /* @__PURE__ */ __name(async (output, context) => {
397
+ if (output.statusCode >= 300) {
398
+ return de_CreateScalingPlanCommandError(output, context);
399
+ }
400
+ const data = await parseBody(output.body, context);
401
+ let contents = {};
402
+ contents = (0, import_smithy_client._json)(data);
403
+ const response = {
404
+ $metadata: deserializeMetadata(output),
405
+ ...contents
406
+ };
407
+ return response;
408
+ }, "de_CreateScalingPlanCommand");
409
+ var de_CreateScalingPlanCommandError = /* @__PURE__ */ __name(async (output, context) => {
410
+ const parsedOutput = {
411
+ ...output,
412
+ body: await parseErrorBody(output.body, context)
413
+ };
414
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
415
+ switch (errorCode) {
416
+ case "ConcurrentUpdateException":
417
+ case "com.amazonaws.autoscalingplans#ConcurrentUpdateException":
418
+ throw await de_ConcurrentUpdateExceptionRes(parsedOutput, context);
419
+ case "InternalServiceException":
420
+ case "com.amazonaws.autoscalingplans#InternalServiceException":
421
+ throw await de_InternalServiceExceptionRes(parsedOutput, context);
422
+ case "LimitExceededException":
423
+ case "com.amazonaws.autoscalingplans#LimitExceededException":
424
+ throw await de_LimitExceededExceptionRes(parsedOutput, context);
425
+ case "ValidationException":
426
+ case "com.amazonaws.autoscalingplans#ValidationException":
427
+ throw await de_ValidationExceptionRes(parsedOutput, context);
428
+ default:
429
+ const parsedBody = parsedOutput.body;
430
+ return throwDefaultError({
431
+ output,
432
+ parsedBody,
433
+ errorCode
434
+ });
435
+ }
436
+ }, "de_CreateScalingPlanCommandError");
437
+ var de_DeleteScalingPlanCommand = /* @__PURE__ */ __name(async (output, context) => {
438
+ if (output.statusCode >= 300) {
439
+ return de_DeleteScalingPlanCommandError(output, context);
440
+ }
441
+ const data = await parseBody(output.body, context);
442
+ let contents = {};
443
+ contents = (0, import_smithy_client._json)(data);
444
+ const response = {
445
+ $metadata: deserializeMetadata(output),
446
+ ...contents
447
+ };
448
+ return response;
449
+ }, "de_DeleteScalingPlanCommand");
450
+ var de_DeleteScalingPlanCommandError = /* @__PURE__ */ __name(async (output, context) => {
451
+ const parsedOutput = {
452
+ ...output,
453
+ body: await parseErrorBody(output.body, context)
454
+ };
455
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
456
+ switch (errorCode) {
457
+ case "ConcurrentUpdateException":
458
+ case "com.amazonaws.autoscalingplans#ConcurrentUpdateException":
459
+ throw await de_ConcurrentUpdateExceptionRes(parsedOutput, context);
460
+ case "InternalServiceException":
461
+ case "com.amazonaws.autoscalingplans#InternalServiceException":
462
+ throw await de_InternalServiceExceptionRes(parsedOutput, context);
463
+ case "ObjectNotFoundException":
464
+ case "com.amazonaws.autoscalingplans#ObjectNotFoundException":
465
+ throw await de_ObjectNotFoundExceptionRes(parsedOutput, context);
466
+ case "ValidationException":
467
+ case "com.amazonaws.autoscalingplans#ValidationException":
468
+ throw await de_ValidationExceptionRes(parsedOutput, context);
469
+ default:
470
+ const parsedBody = parsedOutput.body;
471
+ return throwDefaultError({
472
+ output,
473
+ parsedBody,
474
+ errorCode
475
+ });
476
+ }
477
+ }, "de_DeleteScalingPlanCommandError");
478
+ var de_DescribeScalingPlanResourcesCommand = /* @__PURE__ */ __name(async (output, context) => {
479
+ if (output.statusCode >= 300) {
480
+ return de_DescribeScalingPlanResourcesCommandError(output, context);
481
+ }
482
+ const data = await parseBody(output.body, context);
483
+ let contents = {};
484
+ contents = de_DescribeScalingPlanResourcesResponse(data, context);
485
+ const response = {
486
+ $metadata: deserializeMetadata(output),
487
+ ...contents
488
+ };
489
+ return response;
490
+ }, "de_DescribeScalingPlanResourcesCommand");
491
+ var de_DescribeScalingPlanResourcesCommandError = /* @__PURE__ */ __name(async (output, context) => {
492
+ const parsedOutput = {
493
+ ...output,
494
+ body: await parseErrorBody(output.body, context)
495
+ };
496
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
497
+ switch (errorCode) {
498
+ case "ConcurrentUpdateException":
499
+ case "com.amazonaws.autoscalingplans#ConcurrentUpdateException":
500
+ throw await de_ConcurrentUpdateExceptionRes(parsedOutput, context);
501
+ case "InternalServiceException":
502
+ case "com.amazonaws.autoscalingplans#InternalServiceException":
503
+ throw await de_InternalServiceExceptionRes(parsedOutput, context);
504
+ case "InvalidNextTokenException":
505
+ case "com.amazonaws.autoscalingplans#InvalidNextTokenException":
506
+ throw await de_InvalidNextTokenExceptionRes(parsedOutput, context);
507
+ case "ValidationException":
508
+ case "com.amazonaws.autoscalingplans#ValidationException":
509
+ throw await de_ValidationExceptionRes(parsedOutput, context);
510
+ default:
511
+ const parsedBody = parsedOutput.body;
512
+ return throwDefaultError({
513
+ output,
514
+ parsedBody,
515
+ errorCode
516
+ });
517
+ }
518
+ }, "de_DescribeScalingPlanResourcesCommandError");
519
+ var de_DescribeScalingPlansCommand = /* @__PURE__ */ __name(async (output, context) => {
520
+ if (output.statusCode >= 300) {
521
+ return de_DescribeScalingPlansCommandError(output, context);
522
+ }
523
+ const data = await parseBody(output.body, context);
524
+ let contents = {};
525
+ contents = de_DescribeScalingPlansResponse(data, context);
526
+ const response = {
527
+ $metadata: deserializeMetadata(output),
528
+ ...contents
529
+ };
530
+ return response;
531
+ }, "de_DescribeScalingPlansCommand");
532
+ var de_DescribeScalingPlansCommandError = /* @__PURE__ */ __name(async (output, context) => {
533
+ const parsedOutput = {
534
+ ...output,
535
+ body: await parseErrorBody(output.body, context)
536
+ };
537
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
538
+ switch (errorCode) {
539
+ case "ConcurrentUpdateException":
540
+ case "com.amazonaws.autoscalingplans#ConcurrentUpdateException":
541
+ throw await de_ConcurrentUpdateExceptionRes(parsedOutput, context);
542
+ case "InternalServiceException":
543
+ case "com.amazonaws.autoscalingplans#InternalServiceException":
544
+ throw await de_InternalServiceExceptionRes(parsedOutput, context);
545
+ case "InvalidNextTokenException":
546
+ case "com.amazonaws.autoscalingplans#InvalidNextTokenException":
547
+ throw await de_InvalidNextTokenExceptionRes(parsedOutput, context);
548
+ case "ValidationException":
549
+ case "com.amazonaws.autoscalingplans#ValidationException":
550
+ throw await de_ValidationExceptionRes(parsedOutput, context);
551
+ default:
552
+ const parsedBody = parsedOutput.body;
553
+ return throwDefaultError({
554
+ output,
555
+ parsedBody,
556
+ errorCode
557
+ });
558
+ }
559
+ }, "de_DescribeScalingPlansCommandError");
560
+ var de_GetScalingPlanResourceForecastDataCommand = /* @__PURE__ */ __name(async (output, context) => {
561
+ if (output.statusCode >= 300) {
562
+ return de_GetScalingPlanResourceForecastDataCommandError(output, context);
563
+ }
564
+ const data = await parseBody(output.body, context);
565
+ let contents = {};
566
+ contents = de_GetScalingPlanResourceForecastDataResponse(data, context);
567
+ const response = {
568
+ $metadata: deserializeMetadata(output),
569
+ ...contents
570
+ };
571
+ return response;
572
+ }, "de_GetScalingPlanResourceForecastDataCommand");
573
+ var de_GetScalingPlanResourceForecastDataCommandError = /* @__PURE__ */ __name(async (output, context) => {
574
+ const parsedOutput = {
575
+ ...output,
576
+ body: await parseErrorBody(output.body, context)
577
+ };
578
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
579
+ switch (errorCode) {
580
+ case "InternalServiceException":
581
+ case "com.amazonaws.autoscalingplans#InternalServiceException":
582
+ throw await de_InternalServiceExceptionRes(parsedOutput, context);
583
+ case "ValidationException":
584
+ case "com.amazonaws.autoscalingplans#ValidationException":
585
+ throw await de_ValidationExceptionRes(parsedOutput, context);
586
+ default:
587
+ const parsedBody = parsedOutput.body;
588
+ return throwDefaultError({
589
+ output,
590
+ parsedBody,
591
+ errorCode
592
+ });
593
+ }
594
+ }, "de_GetScalingPlanResourceForecastDataCommandError");
595
+ var de_UpdateScalingPlanCommand = /* @__PURE__ */ __name(async (output, context) => {
596
+ if (output.statusCode >= 300) {
597
+ return de_UpdateScalingPlanCommandError(output, context);
598
+ }
599
+ const data = await parseBody(output.body, context);
600
+ let contents = {};
601
+ contents = (0, import_smithy_client._json)(data);
602
+ const response = {
603
+ $metadata: deserializeMetadata(output),
604
+ ...contents
605
+ };
606
+ return response;
607
+ }, "de_UpdateScalingPlanCommand");
608
+ var de_UpdateScalingPlanCommandError = /* @__PURE__ */ __name(async (output, context) => {
609
+ const parsedOutput = {
610
+ ...output,
611
+ body: await parseErrorBody(output.body, context)
612
+ };
613
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
614
+ switch (errorCode) {
615
+ case "ConcurrentUpdateException":
616
+ case "com.amazonaws.autoscalingplans#ConcurrentUpdateException":
617
+ throw await de_ConcurrentUpdateExceptionRes(parsedOutput, context);
618
+ case "InternalServiceException":
619
+ case "com.amazonaws.autoscalingplans#InternalServiceException":
620
+ throw await de_InternalServiceExceptionRes(parsedOutput, context);
621
+ case "ObjectNotFoundException":
622
+ case "com.amazonaws.autoscalingplans#ObjectNotFoundException":
623
+ throw await de_ObjectNotFoundExceptionRes(parsedOutput, context);
624
+ case "ValidationException":
625
+ case "com.amazonaws.autoscalingplans#ValidationException":
626
+ throw await de_ValidationExceptionRes(parsedOutput, context);
627
+ default:
628
+ const parsedBody = parsedOutput.body;
629
+ return throwDefaultError({
630
+ output,
631
+ parsedBody,
632
+ errorCode
633
+ });
634
+ }
635
+ }, "de_UpdateScalingPlanCommandError");
636
+ var de_ConcurrentUpdateExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
637
+ const body = parsedOutput.body;
638
+ const deserialized = (0, import_smithy_client._json)(body);
639
+ const exception = new ConcurrentUpdateException({
640
+ $metadata: deserializeMetadata(parsedOutput),
641
+ ...deserialized
642
+ });
643
+ return (0, import_smithy_client.decorateServiceException)(exception, body);
644
+ }, "de_ConcurrentUpdateExceptionRes");
645
+ var de_InternalServiceExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
646
+ const body = parsedOutput.body;
647
+ const deserialized = (0, import_smithy_client._json)(body);
648
+ const exception = new InternalServiceException({
649
+ $metadata: deserializeMetadata(parsedOutput),
650
+ ...deserialized
651
+ });
652
+ return (0, import_smithy_client.decorateServiceException)(exception, body);
653
+ }, "de_InternalServiceExceptionRes");
654
+ var de_InvalidNextTokenExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
655
+ const body = parsedOutput.body;
656
+ const deserialized = (0, import_smithy_client._json)(body);
657
+ const exception = new InvalidNextTokenException({
658
+ $metadata: deserializeMetadata(parsedOutput),
659
+ ...deserialized
660
+ });
661
+ return (0, import_smithy_client.decorateServiceException)(exception, body);
662
+ }, "de_InvalidNextTokenExceptionRes");
663
+ var de_LimitExceededExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
664
+ const body = parsedOutput.body;
665
+ const deserialized = (0, import_smithy_client._json)(body);
666
+ const exception = new LimitExceededException({
667
+ $metadata: deserializeMetadata(parsedOutput),
668
+ ...deserialized
669
+ });
670
+ return (0, import_smithy_client.decorateServiceException)(exception, body);
671
+ }, "de_LimitExceededExceptionRes");
672
+ var de_ObjectNotFoundExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
673
+ const body = parsedOutput.body;
674
+ const deserialized = (0, import_smithy_client._json)(body);
675
+ const exception = new ObjectNotFoundException({
676
+ $metadata: deserializeMetadata(parsedOutput),
677
+ ...deserialized
678
+ });
679
+ return (0, import_smithy_client.decorateServiceException)(exception, body);
680
+ }, "de_ObjectNotFoundExceptionRes");
681
+ var de_ValidationExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
682
+ const body = parsedOutput.body;
683
+ const deserialized = (0, import_smithy_client._json)(body);
684
+ const exception = new ValidationException({
685
+ $metadata: deserializeMetadata(parsedOutput),
686
+ ...deserialized
687
+ });
688
+ return (0, import_smithy_client.decorateServiceException)(exception, body);
689
+ }, "de_ValidationExceptionRes");
690
+ var se_CreateScalingPlanRequest = /* @__PURE__ */ __name((input, context) => {
691
+ return (0, import_smithy_client.take)(input, {
692
+ ApplicationSource: import_smithy_client._json,
693
+ ScalingInstructions: (_) => se_ScalingInstructions(_, context),
694
+ ScalingPlanName: []
695
+ });
696
+ }, "se_CreateScalingPlanRequest");
697
+ var se_GetScalingPlanResourceForecastDataRequest = /* @__PURE__ */ __name((input, context) => {
698
+ return (0, import_smithy_client.take)(input, {
699
+ EndTime: (_) => Math.round(_.getTime() / 1e3),
700
+ ForecastDataType: [],
701
+ ResourceId: [],
702
+ ScalableDimension: [],
703
+ ScalingPlanName: [],
704
+ ScalingPlanVersion: [],
705
+ ServiceNamespace: [],
706
+ StartTime: (_) => Math.round(_.getTime() / 1e3)
707
+ });
708
+ }, "se_GetScalingPlanResourceForecastDataRequest");
709
+ var se_ScalingInstruction = /* @__PURE__ */ __name((input, context) => {
710
+ return (0, import_smithy_client.take)(input, {
711
+ CustomizedLoadMetricSpecification: import_smithy_client._json,
712
+ DisableDynamicScaling: [],
713
+ MaxCapacity: [],
714
+ MinCapacity: [],
715
+ PredefinedLoadMetricSpecification: import_smithy_client._json,
716
+ PredictiveScalingMaxCapacityBehavior: [],
717
+ PredictiveScalingMaxCapacityBuffer: [],
718
+ PredictiveScalingMode: [],
719
+ ResourceId: [],
720
+ ScalableDimension: [],
721
+ ScalingPolicyUpdateBehavior: [],
722
+ ScheduledActionBufferTime: [],
723
+ ServiceNamespace: [],
724
+ TargetTrackingConfigurations: (_) => se_TargetTrackingConfigurations(_, context)
725
+ });
726
+ }, "se_ScalingInstruction");
727
+ var se_ScalingInstructions = /* @__PURE__ */ __name((input, context) => {
728
+ return input.filter((e) => e != null).map((entry) => {
729
+ return se_ScalingInstruction(entry, context);
730
+ });
731
+ }, "se_ScalingInstructions");
732
+ var se_TargetTrackingConfiguration = /* @__PURE__ */ __name((input, context) => {
733
+ return (0, import_smithy_client.take)(input, {
734
+ CustomizedScalingMetricSpecification: import_smithy_client._json,
735
+ DisableScaleIn: [],
736
+ EstimatedInstanceWarmup: [],
737
+ PredefinedScalingMetricSpecification: import_smithy_client._json,
738
+ ScaleInCooldown: [],
739
+ ScaleOutCooldown: [],
740
+ TargetValue: import_smithy_client.serializeFloat
741
+ });
742
+ }, "se_TargetTrackingConfiguration");
743
+ var se_TargetTrackingConfigurations = /* @__PURE__ */ __name((input, context) => {
744
+ return input.filter((e) => e != null).map((entry) => {
745
+ return se_TargetTrackingConfiguration(entry, context);
746
+ });
747
+ }, "se_TargetTrackingConfigurations");
748
+ var se_UpdateScalingPlanRequest = /* @__PURE__ */ __name((input, context) => {
749
+ return (0, import_smithy_client.take)(input, {
750
+ ApplicationSource: import_smithy_client._json,
751
+ ScalingInstructions: (_) => se_ScalingInstructions(_, context),
752
+ ScalingPlanName: [],
753
+ ScalingPlanVersion: []
754
+ });
755
+ }, "se_UpdateScalingPlanRequest");
756
+ var de_Datapoint = /* @__PURE__ */ __name((output, context) => {
757
+ return (0, import_smithy_client.take)(output, {
758
+ Timestamp: (_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))),
759
+ Value: import_smithy_client.limitedParseDouble
760
+ });
761
+ }, "de_Datapoint");
762
+ var de_Datapoints = /* @__PURE__ */ __name((output, context) => {
763
+ const retVal = (output || []).filter((e) => e != null).map((entry) => {
764
+ return de_Datapoint(entry, context);
765
+ });
766
+ return retVal;
767
+ }, "de_Datapoints");
768
+ var de_DescribeScalingPlanResourcesResponse = /* @__PURE__ */ __name((output, context) => {
769
+ return (0, import_smithy_client.take)(output, {
770
+ NextToken: import_smithy_client.expectString,
771
+ ScalingPlanResources: (_) => de_ScalingPlanResources(_, context)
772
+ });
773
+ }, "de_DescribeScalingPlanResourcesResponse");
774
+ var de_DescribeScalingPlansResponse = /* @__PURE__ */ __name((output, context) => {
775
+ return (0, import_smithy_client.take)(output, {
776
+ NextToken: import_smithy_client.expectString,
777
+ ScalingPlans: (_) => de_ScalingPlans(_, context)
778
+ });
779
+ }, "de_DescribeScalingPlansResponse");
780
+ var de_GetScalingPlanResourceForecastDataResponse = /* @__PURE__ */ __name((output, context) => {
781
+ return (0, import_smithy_client.take)(output, {
782
+ Datapoints: (_) => de_Datapoints(_, context)
783
+ });
784
+ }, "de_GetScalingPlanResourceForecastDataResponse");
785
+ var de_ScalingInstruction = /* @__PURE__ */ __name((output, context) => {
786
+ return (0, import_smithy_client.take)(output, {
787
+ CustomizedLoadMetricSpecification: import_smithy_client._json,
788
+ DisableDynamicScaling: import_smithy_client.expectBoolean,
789
+ MaxCapacity: import_smithy_client.expectInt32,
790
+ MinCapacity: import_smithy_client.expectInt32,
791
+ PredefinedLoadMetricSpecification: import_smithy_client._json,
792
+ PredictiveScalingMaxCapacityBehavior: import_smithy_client.expectString,
793
+ PredictiveScalingMaxCapacityBuffer: import_smithy_client.expectInt32,
794
+ PredictiveScalingMode: import_smithy_client.expectString,
795
+ ResourceId: import_smithy_client.expectString,
796
+ ScalableDimension: import_smithy_client.expectString,
797
+ ScalingPolicyUpdateBehavior: import_smithy_client.expectString,
798
+ ScheduledActionBufferTime: import_smithy_client.expectInt32,
799
+ ServiceNamespace: import_smithy_client.expectString,
800
+ TargetTrackingConfigurations: (_) => de_TargetTrackingConfigurations(_, context)
801
+ });
802
+ }, "de_ScalingInstruction");
803
+ var de_ScalingInstructions = /* @__PURE__ */ __name((output, context) => {
804
+ const retVal = (output || []).filter((e) => e != null).map((entry) => {
805
+ return de_ScalingInstruction(entry, context);
806
+ });
807
+ return retVal;
808
+ }, "de_ScalingInstructions");
809
+ var de_ScalingPlan = /* @__PURE__ */ __name((output, context) => {
810
+ return (0, import_smithy_client.take)(output, {
811
+ ApplicationSource: import_smithy_client._json,
812
+ CreationTime: (_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))),
813
+ ScalingInstructions: (_) => de_ScalingInstructions(_, context),
814
+ ScalingPlanName: import_smithy_client.expectString,
815
+ ScalingPlanVersion: import_smithy_client.expectLong,
816
+ StatusCode: import_smithy_client.expectString,
817
+ StatusMessage: import_smithy_client.expectString,
818
+ StatusStartTime: (_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_)))
819
+ });
820
+ }, "de_ScalingPlan");
821
+ var de_ScalingPlanResource = /* @__PURE__ */ __name((output, context) => {
822
+ return (0, import_smithy_client.take)(output, {
823
+ ResourceId: import_smithy_client.expectString,
824
+ ScalableDimension: import_smithy_client.expectString,
825
+ ScalingPlanName: import_smithy_client.expectString,
826
+ ScalingPlanVersion: import_smithy_client.expectLong,
827
+ ScalingPolicies: (_) => de_ScalingPolicies(_, context),
828
+ ScalingStatusCode: import_smithy_client.expectString,
829
+ ScalingStatusMessage: import_smithy_client.expectString,
830
+ ServiceNamespace: import_smithy_client.expectString
831
+ });
832
+ }, "de_ScalingPlanResource");
833
+ var de_ScalingPlanResources = /* @__PURE__ */ __name((output, context) => {
834
+ const retVal = (output || []).filter((e) => e != null).map((entry) => {
835
+ return de_ScalingPlanResource(entry, context);
836
+ });
837
+ return retVal;
838
+ }, "de_ScalingPlanResources");
839
+ var de_ScalingPlans = /* @__PURE__ */ __name((output, context) => {
840
+ const retVal = (output || []).filter((e) => e != null).map((entry) => {
841
+ return de_ScalingPlan(entry, context);
842
+ });
843
+ return retVal;
844
+ }, "de_ScalingPlans");
845
+ var de_ScalingPolicies = /* @__PURE__ */ __name((output, context) => {
846
+ const retVal = (output || []).filter((e) => e != null).map((entry) => {
847
+ return de_ScalingPolicy(entry, context);
848
+ });
849
+ return retVal;
850
+ }, "de_ScalingPolicies");
851
+ var de_ScalingPolicy = /* @__PURE__ */ __name((output, context) => {
852
+ return (0, import_smithy_client.take)(output, {
853
+ PolicyName: import_smithy_client.expectString,
854
+ PolicyType: import_smithy_client.expectString,
855
+ TargetTrackingConfiguration: (_) => de_TargetTrackingConfiguration(_, context)
856
+ });
857
+ }, "de_ScalingPolicy");
858
+ var de_TargetTrackingConfiguration = /* @__PURE__ */ __name((output, context) => {
859
+ return (0, import_smithy_client.take)(output, {
860
+ CustomizedScalingMetricSpecification: import_smithy_client._json,
861
+ DisableScaleIn: import_smithy_client.expectBoolean,
862
+ EstimatedInstanceWarmup: import_smithy_client.expectInt32,
863
+ PredefinedScalingMetricSpecification: import_smithy_client._json,
864
+ ScaleInCooldown: import_smithy_client.expectInt32,
865
+ ScaleOutCooldown: import_smithy_client.expectInt32,
866
+ TargetValue: import_smithy_client.limitedParseDouble
867
+ });
868
+ }, "de_TargetTrackingConfiguration");
869
+ var de_TargetTrackingConfigurations = /* @__PURE__ */ __name((output, context) => {
870
+ const retVal = (output || []).filter((e) => e != null).map((entry) => {
871
+ return de_TargetTrackingConfiguration(entry, context);
872
+ });
873
+ return retVal;
874
+ }, "de_TargetTrackingConfigurations");
875
+ var deserializeMetadata = /* @__PURE__ */ __name((output) => ({
876
+ httpStatusCode: output.statusCode,
877
+ requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
878
+ extendedRequestId: output.headers["x-amz-id-2"],
879
+ cfId: output.headers["x-amz-cf-id"]
880
+ }), "deserializeMetadata");
881
+ var collectBodyString = /* @__PURE__ */ __name((streamBody, context) => (0, import_smithy_client.collectBody)(streamBody, context).then((body) => context.utf8Encoder(body)), "collectBodyString");
882
+ var throwDefaultError = (0, import_smithy_client.withBaseException)(AutoScalingPlansServiceException);
883
+ var buildHttpRpcRequest = /* @__PURE__ */ __name(async (context, headers, path, resolvedHostname, body) => {
884
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
885
+ const contents = {
886
+ protocol,
887
+ hostname,
888
+ port,
889
+ method: "POST",
890
+ path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path,
891
+ headers
892
+ };
893
+ if (resolvedHostname !== void 0) {
894
+ contents.hostname = resolvedHostname;
895
+ }
896
+ if (body !== void 0) {
897
+ contents.body = body;
898
+ }
899
+ return new import_protocol_http.HttpRequest(contents);
900
+ }, "buildHttpRpcRequest");
901
+ function sharedHeaders(operation) {
902
+ return {
903
+ "content-type": "application/x-amz-json-1.1",
904
+ "x-amz-target": `AnyScaleScalingPlannerFrontendService.${operation}`
905
+ };
906
+ }
907
+ __name(sharedHeaders, "sharedHeaders");
908
+ var parseBody = /* @__PURE__ */ __name((streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
909
+ if (encoded.length) {
910
+ return JSON.parse(encoded);
911
+ }
912
+ return {};
913
+ }), "parseBody");
914
+ var parseErrorBody = /* @__PURE__ */ __name(async (errorBody, context) => {
915
+ const value = await parseBody(errorBody, context);
916
+ value.message = value.message ?? value.Message;
917
+ return value;
918
+ }, "parseErrorBody");
919
+ var loadRestJsonErrorCode = /* @__PURE__ */ __name((output, data) => {
920
+ const findKey = /* @__PURE__ */ __name((object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase()), "findKey");
921
+ const sanitizeErrorCode = /* @__PURE__ */ __name((rawValue) => {
922
+ let cleanValue = rawValue;
923
+ if (typeof cleanValue === "number") {
924
+ cleanValue = cleanValue.toString();
925
+ }
926
+ if (cleanValue.indexOf(",") >= 0) {
927
+ cleanValue = cleanValue.split(",")[0];
928
+ }
929
+ if (cleanValue.indexOf(":") >= 0) {
930
+ cleanValue = cleanValue.split(":")[0];
931
+ }
932
+ if (cleanValue.indexOf("#") >= 0) {
933
+ cleanValue = cleanValue.split("#")[1];
934
+ }
935
+ return cleanValue;
936
+ }, "sanitizeErrorCode");
937
+ const headerKey = findKey(output.headers, "x-amzn-errortype");
938
+ if (headerKey !== void 0) {
939
+ return sanitizeErrorCode(output.headers[headerKey]);
940
+ }
941
+ if (data.code !== void 0) {
942
+ return sanitizeErrorCode(data.code);
943
+ }
944
+ if (data["__type"] !== void 0) {
945
+ return sanitizeErrorCode(data["__type"]);
946
+ }
947
+ }, "loadRestJsonErrorCode");
948
+
949
+ // src/commands/CreateScalingPlanCommand.ts
950
+ var _CreateScalingPlanCommand = class _CreateScalingPlanCommand extends import_smithy_client.Command.classBuilder().ep({
951
+ ...commonParams
952
+ }).m(function(Command, cs, config, o) {
953
+ return [
954
+ (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
955
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
956
+ ];
957
+ }).s("AnyScaleScalingPlannerFrontendService", "CreateScalingPlan", {}).n("AutoScalingPlansClient", "CreateScalingPlanCommand").f(void 0, void 0).ser(se_CreateScalingPlanCommand).de(de_CreateScalingPlanCommand).build() {
958
+ };
959
+ __name(_CreateScalingPlanCommand, "CreateScalingPlanCommand");
960
+ var CreateScalingPlanCommand = _CreateScalingPlanCommand;
961
+
962
+ // src/commands/DeleteScalingPlanCommand.ts
963
+
964
+
965
+
966
+
967
+ var _DeleteScalingPlanCommand = class _DeleteScalingPlanCommand extends import_smithy_client.Command.classBuilder().ep({
968
+ ...commonParams
969
+ }).m(function(Command, cs, config, o) {
970
+ return [
971
+ (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
972
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
973
+ ];
974
+ }).s("AnyScaleScalingPlannerFrontendService", "DeleteScalingPlan", {}).n("AutoScalingPlansClient", "DeleteScalingPlanCommand").f(void 0, void 0).ser(se_DeleteScalingPlanCommand).de(de_DeleteScalingPlanCommand).build() {
975
+ };
976
+ __name(_DeleteScalingPlanCommand, "DeleteScalingPlanCommand");
977
+ var DeleteScalingPlanCommand = _DeleteScalingPlanCommand;
978
+
979
+ // src/commands/DescribeScalingPlanResourcesCommand.ts
980
+
981
+
982
+
983
+
984
+ var _DescribeScalingPlanResourcesCommand = class _DescribeScalingPlanResourcesCommand extends import_smithy_client.Command.classBuilder().ep({
985
+ ...commonParams
986
+ }).m(function(Command, cs, config, o) {
987
+ return [
988
+ (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
989
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
990
+ ];
991
+ }).s("AnyScaleScalingPlannerFrontendService", "DescribeScalingPlanResources", {}).n("AutoScalingPlansClient", "DescribeScalingPlanResourcesCommand").f(void 0, void 0).ser(se_DescribeScalingPlanResourcesCommand).de(de_DescribeScalingPlanResourcesCommand).build() {
992
+ };
993
+ __name(_DescribeScalingPlanResourcesCommand, "DescribeScalingPlanResourcesCommand");
994
+ var DescribeScalingPlanResourcesCommand = _DescribeScalingPlanResourcesCommand;
995
+
996
+ // src/commands/DescribeScalingPlansCommand.ts
997
+
998
+
999
+
1000
+
1001
+ var _DescribeScalingPlansCommand = class _DescribeScalingPlansCommand extends import_smithy_client.Command.classBuilder().ep({
1002
+ ...commonParams
1003
+ }).m(function(Command, cs, config, o) {
1004
+ return [
1005
+ (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
1006
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
1007
+ ];
1008
+ }).s("AnyScaleScalingPlannerFrontendService", "DescribeScalingPlans", {}).n("AutoScalingPlansClient", "DescribeScalingPlansCommand").f(void 0, void 0).ser(se_DescribeScalingPlansCommand).de(de_DescribeScalingPlansCommand).build() {
1009
+ };
1010
+ __name(_DescribeScalingPlansCommand, "DescribeScalingPlansCommand");
1011
+ var DescribeScalingPlansCommand = _DescribeScalingPlansCommand;
1012
+
1013
+ // src/commands/GetScalingPlanResourceForecastDataCommand.ts
1014
+
1015
+
1016
+
1017
+
1018
+ var _GetScalingPlanResourceForecastDataCommand = class _GetScalingPlanResourceForecastDataCommand extends import_smithy_client.Command.classBuilder().ep({
1019
+ ...commonParams
1020
+ }).m(function(Command, cs, config, o) {
1021
+ return [
1022
+ (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
1023
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
1024
+ ];
1025
+ }).s("AnyScaleScalingPlannerFrontendService", "GetScalingPlanResourceForecastData", {}).n("AutoScalingPlansClient", "GetScalingPlanResourceForecastDataCommand").f(void 0, void 0).ser(se_GetScalingPlanResourceForecastDataCommand).de(de_GetScalingPlanResourceForecastDataCommand).build() {
1026
+ };
1027
+ __name(_GetScalingPlanResourceForecastDataCommand, "GetScalingPlanResourceForecastDataCommand");
1028
+ var GetScalingPlanResourceForecastDataCommand = _GetScalingPlanResourceForecastDataCommand;
1029
+
1030
+ // src/commands/UpdateScalingPlanCommand.ts
1031
+
1032
+
1033
+
1034
+
1035
+ var _UpdateScalingPlanCommand = class _UpdateScalingPlanCommand extends import_smithy_client.Command.classBuilder().ep({
1036
+ ...commonParams
1037
+ }).m(function(Command, cs, config, o) {
1038
+ return [
1039
+ (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
1040
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
1041
+ ];
1042
+ }).s("AnyScaleScalingPlannerFrontendService", "UpdateScalingPlan", {}).n("AutoScalingPlansClient", "UpdateScalingPlanCommand").f(void 0, void 0).ser(se_UpdateScalingPlanCommand).de(de_UpdateScalingPlanCommand).build() {
1043
+ };
1044
+ __name(_UpdateScalingPlanCommand, "UpdateScalingPlanCommand");
1045
+ var UpdateScalingPlanCommand = _UpdateScalingPlanCommand;
1046
+
1047
+ // src/AutoScalingPlans.ts
1048
+ var commands = {
1049
+ CreateScalingPlanCommand,
1050
+ DeleteScalingPlanCommand,
1051
+ DescribeScalingPlanResourcesCommand,
1052
+ DescribeScalingPlansCommand,
1053
+ GetScalingPlanResourceForecastDataCommand,
1054
+ UpdateScalingPlanCommand
1055
+ };
1056
+ var _AutoScalingPlans = class _AutoScalingPlans extends AutoScalingPlansClient {
1057
+ };
1058
+ __name(_AutoScalingPlans, "AutoScalingPlans");
1059
+ var AutoScalingPlans = _AutoScalingPlans;
1060
+ (0, import_smithy_client.createAggregatedClient)(commands, AutoScalingPlans);
1061
+
1062
+ // src/index.ts
1063
+ var import_util_endpoints = require("@aws-sdk/util-endpoints");
1064
+ // Annotate the CommonJS export names for ESM import in node:
1065
+ 0 && (module.exports = {
1066
+ AutoScalingPlans,
1067
+ AutoScalingPlansClient,
1068
+ AutoScalingPlansServiceException,
1069
+ ConcurrentUpdateException,
1070
+ CreateScalingPlanCommand,
1071
+ DeleteScalingPlanCommand,
1072
+ DescribeScalingPlanResourcesCommand,
1073
+ DescribeScalingPlansCommand,
1074
+ ForecastDataType,
1075
+ GetScalingPlanResourceForecastDataCommand,
1076
+ InternalServiceException,
1077
+ InvalidNextTokenException,
1078
+ LimitExceededException,
1079
+ LoadMetricType,
1080
+ MetricStatistic,
1081
+ ObjectNotFoundException,
1082
+ PolicyType,
1083
+ PredictiveScalingMaxCapacityBehavior,
1084
+ PredictiveScalingMode,
1085
+ ScalableDimension,
1086
+ ScalingMetricType,
1087
+ ScalingPlanStatusCode,
1088
+ ScalingPolicyUpdateBehavior,
1089
+ ScalingStatusCode,
1090
+ ServiceNamespace,
1091
+ UpdateScalingPlanCommand,
1092
+ ValidationException,
1093
+ __Client
1094
+ });