@aws-sdk/client-auto-scaling-plans 3.927.0 → 3.928.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.
@@ -0,0 +1,51 @@
1
+ import { StaticErrorSchema, StaticListSchema, StaticOperationSchema, StaticStructureSchema } from "@smithy/types";
2
+ export declare var ApplicationSource: StaticStructureSchema;
3
+ export declare var ConcurrentUpdateException: StaticErrorSchema;
4
+ export declare var CreateScalingPlanRequest: StaticStructureSchema;
5
+ export declare var CreateScalingPlanResponse: StaticStructureSchema;
6
+ export declare var CustomizedLoadMetricSpecification: StaticStructureSchema;
7
+ export declare var CustomizedScalingMetricSpecification: StaticStructureSchema;
8
+ export declare var Datapoint: StaticStructureSchema;
9
+ export declare var DeleteScalingPlanRequest: StaticStructureSchema;
10
+ export declare var DeleteScalingPlanResponse: StaticStructureSchema;
11
+ export declare var DescribeScalingPlanResourcesRequest: StaticStructureSchema;
12
+ export declare var DescribeScalingPlanResourcesResponse: StaticStructureSchema;
13
+ export declare var DescribeScalingPlansRequest: StaticStructureSchema;
14
+ export declare var DescribeScalingPlansResponse: StaticStructureSchema;
15
+ export declare var GetScalingPlanResourceForecastDataRequest: StaticStructureSchema;
16
+ export declare var GetScalingPlanResourceForecastDataResponse: StaticStructureSchema;
17
+ export declare var InternalServiceException: StaticErrorSchema;
18
+ export declare var InvalidNextTokenException: StaticErrorSchema;
19
+ export declare var LimitExceededException: StaticErrorSchema;
20
+ export declare var MetricDimension: StaticStructureSchema;
21
+ export declare var ObjectNotFoundException: StaticErrorSchema;
22
+ export declare var PredefinedLoadMetricSpecification: StaticStructureSchema;
23
+ export declare var PredefinedScalingMetricSpecification: StaticStructureSchema;
24
+ export declare var ScalingInstruction: StaticStructureSchema;
25
+ export declare var ScalingPlan: StaticStructureSchema;
26
+ export declare var ScalingPlanResource: StaticStructureSchema;
27
+ export declare var ScalingPolicy: StaticStructureSchema;
28
+ export declare var TagFilter: StaticStructureSchema;
29
+ export declare var TargetTrackingConfiguration: StaticStructureSchema;
30
+ export declare var UpdateScalingPlanRequest: StaticStructureSchema;
31
+ export declare var UpdateScalingPlanResponse: StaticStructureSchema;
32
+ export declare var ValidationException: StaticErrorSchema;
33
+ export declare var __Unit: "unit";
34
+ export declare var AutoScalingPlansServiceException: StaticErrorSchema;
35
+ export declare var ApplicationSources: StaticListSchema;
36
+ export declare var Datapoints: StaticListSchema;
37
+ export declare var MetricDimensions: StaticListSchema;
38
+ export declare var ScalingInstructions: StaticListSchema;
39
+ export declare var ScalingPlanNames: number;
40
+ export declare var ScalingPlanResources: StaticListSchema;
41
+ export declare var ScalingPlans: StaticListSchema;
42
+ export declare var ScalingPolicies: StaticListSchema;
43
+ export declare var TagFilters: StaticListSchema;
44
+ export declare var TagValues: number;
45
+ export declare var TargetTrackingConfigurations: StaticListSchema;
46
+ export declare var CreateScalingPlan: StaticOperationSchema;
47
+ export declare var DeleteScalingPlan: StaticOperationSchema;
48
+ export declare var DescribeScalingPlanResources: StaticOperationSchema;
49
+ export declare var DescribeScalingPlans: StaticOperationSchema;
50
+ export declare var GetScalingPlanResourceForecastData: StaticOperationSchema;
51
+ export declare var UpdateScalingPlan: StaticOperationSchema;
@@ -30,10 +30,13 @@ import {
30
30
  BodyLengthCalculator as __BodyLengthCalculator,
31
31
  CheckOptionalClientConfig as __CheckOptionalClientConfig,
32
32
  ChecksumConstructor as __ChecksumConstructor,
33
+ ClientProtocol,
33
34
  Decoder as __Decoder,
34
35
  Encoder as __Encoder,
35
36
  HashConstructor as __HashConstructor,
36
37
  HttpHandlerOptions as __HttpHandlerOptions,
38
+ HttpRequest,
39
+ HttpResponse,
37
40
  Logger as __Logger,
38
41
  Provider as __Provider,
39
42
  Provider,
@@ -114,6 +117,7 @@ export interface ClientDefaults
114
117
  retryMode?: string | __Provider<string>;
115
118
  logger?: __Logger;
116
119
  extensions?: RuntimeExtension[];
120
+ protocol?: ClientProtocol<HttpRequest, HttpResponse>;
117
121
  defaultsMode?: __DefaultsMode | __Provider<__DefaultsMode>;
118
122
  }
119
123
  export type AutoScalingPlansClientConfigType = Partial<
@@ -40,6 +40,10 @@ export declare const getRuntimeConfig: (
40
40
  profile?: string;
41
41
  logger: import("@smithy/types").Logger;
42
42
  extensions: import("./runtimeExtensions").RuntimeExtension[];
43
+ protocol: import("@smithy/types").ClientProtocol<
44
+ import("@smithy/types").HttpRequest,
45
+ import("@smithy/types").HttpResponse
46
+ >;
43
47
  customUserAgent?: string | import("@smithy/types").UserAgent;
44
48
  userAgentAppId?:
45
49
  | string
@@ -40,6 +40,10 @@ export declare const getRuntimeConfig: (
40
40
  profile?: string;
41
41
  logger: import("@smithy/types").Logger;
42
42
  extensions: import("./runtimeExtensions").RuntimeExtension[];
43
+ protocol: import("@smithy/types").ClientProtocol<
44
+ import("@smithy/types").HttpRequest,
45
+ import("@smithy/types").HttpResponse
46
+ >;
43
47
  customUserAgent?: string | import("@smithy/types").UserAgent;
44
48
  retryStrategy?:
45
49
  | import("@smithy/types").RetryStrategy
@@ -39,6 +39,10 @@ export declare const getRuntimeConfig: (
39
39
  retryMode: string | import("@smithy/types").Provider<string>;
40
40
  logger: import("@smithy/types").Logger;
41
41
  extensions: import("./runtimeExtensions").RuntimeExtension[];
42
+ protocol: import("@smithy/types").ClientProtocol<
43
+ import("@smithy/types").HttpRequest,
44
+ import("@smithy/types").HttpResponse
45
+ >;
42
46
  defaultsMode:
43
47
  | import("@smithy/smithy-client").DefaultsMode
44
48
  | import("@smithy/types").Provider<
@@ -16,6 +16,10 @@ export declare const getRuntimeConfig: (
16
16
  httpAuthSchemeProvider: import("./auth/httpAuthSchemeProvider").AutoScalingPlansHttpAuthSchemeProvider;
17
17
  httpAuthSchemes: import("@smithy/types").HttpAuthScheme[];
18
18
  logger: import("@smithy/types").Logger;
19
+ protocol: import("@smithy/types").ClientProtocol<
20
+ import("@smithy/types").HttpRequest,
21
+ import("@smithy/types").HttpResponse
22
+ >;
19
23
  serviceId: string;
20
24
  urlParser: import("@smithy/types").UrlParser;
21
25
  utf8Decoder: import("@smithy/types").Decoder;
@@ -0,0 +1,56 @@
1
+ import {
2
+ StaticErrorSchema,
3
+ StaticListSchema,
4
+ StaticOperationSchema,
5
+ StaticStructureSchema,
6
+ } from "@smithy/types";
7
+ export declare var ApplicationSource: StaticStructureSchema;
8
+ export declare var ConcurrentUpdateException: StaticErrorSchema;
9
+ export declare var CreateScalingPlanRequest: StaticStructureSchema;
10
+ export declare var CreateScalingPlanResponse: StaticStructureSchema;
11
+ export declare var CustomizedLoadMetricSpecification: StaticStructureSchema;
12
+ export declare var CustomizedScalingMetricSpecification: StaticStructureSchema;
13
+ export declare var Datapoint: StaticStructureSchema;
14
+ export declare var DeleteScalingPlanRequest: StaticStructureSchema;
15
+ export declare var DeleteScalingPlanResponse: StaticStructureSchema;
16
+ export declare var DescribeScalingPlanResourcesRequest: StaticStructureSchema;
17
+ export declare var DescribeScalingPlanResourcesResponse: StaticStructureSchema;
18
+ export declare var DescribeScalingPlansRequest: StaticStructureSchema;
19
+ export declare var DescribeScalingPlansResponse: StaticStructureSchema;
20
+ export declare var GetScalingPlanResourceForecastDataRequest: StaticStructureSchema;
21
+ export declare var GetScalingPlanResourceForecastDataResponse: StaticStructureSchema;
22
+ export declare var InternalServiceException: StaticErrorSchema;
23
+ export declare var InvalidNextTokenException: StaticErrorSchema;
24
+ export declare var LimitExceededException: StaticErrorSchema;
25
+ export declare var MetricDimension: StaticStructureSchema;
26
+ export declare var ObjectNotFoundException: StaticErrorSchema;
27
+ export declare var PredefinedLoadMetricSpecification: StaticStructureSchema;
28
+ export declare var PredefinedScalingMetricSpecification: StaticStructureSchema;
29
+ export declare var ScalingInstruction: StaticStructureSchema;
30
+ export declare var ScalingPlan: StaticStructureSchema;
31
+ export declare var ScalingPlanResource: StaticStructureSchema;
32
+ export declare var ScalingPolicy: StaticStructureSchema;
33
+ export declare var TagFilter: StaticStructureSchema;
34
+ export declare var TargetTrackingConfiguration: StaticStructureSchema;
35
+ export declare var UpdateScalingPlanRequest: StaticStructureSchema;
36
+ export declare var UpdateScalingPlanResponse: StaticStructureSchema;
37
+ export declare var ValidationException: StaticErrorSchema;
38
+ export declare var __Unit: "unit";
39
+ export declare var AutoScalingPlansServiceException: StaticErrorSchema;
40
+ export declare var ApplicationSources: StaticListSchema;
41
+ export declare var Datapoints: StaticListSchema;
42
+ export declare var MetricDimensions: StaticListSchema;
43
+ export declare var ScalingInstructions: StaticListSchema;
44
+ export declare var ScalingPlanNames: number;
45
+ export declare var ScalingPlanResources: StaticListSchema;
46
+ export declare var ScalingPlans: StaticListSchema;
47
+ export declare var ScalingPolicies: StaticListSchema;
48
+ export declare var TagFilters: StaticListSchema;
49
+ export declare var TagValues: number;
50
+ export declare var TargetTrackingConfigurations: StaticListSchema;
51
+ export declare var CreateScalingPlan: StaticOperationSchema;
52
+ export declare var DeleteScalingPlan: StaticOperationSchema;
53
+ export declare var DescribeScalingPlanResources: StaticOperationSchema;
54
+ export declare var DescribeScalingPlans: StaticOperationSchema;
55
+ export declare var GetScalingPlanResourceForecastData: StaticOperationSchema;
56
+ export declare var UpdateScalingPlan: StaticOperationSchema;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@aws-sdk/client-auto-scaling-plans",
3
3
  "description": "AWS SDK for JavaScript Auto Scaling Plans Client for Node.js, Browser and React Native",
4
- "version": "3.927.0",
4
+ "version": "3.928.0",
5
5
  "scripts": {
6
6
  "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
7
7
  "build:cjs": "node ../../scripts/compilation/inline client-auto-scaling-plans",
@@ -20,17 +20,17 @@
20
20
  "dependencies": {
21
21
  "@aws-crypto/sha256-browser": "5.2.0",
22
22
  "@aws-crypto/sha256-js": "5.2.0",
23
- "@aws-sdk/core": "3.927.0",
24
- "@aws-sdk/credential-provider-node": "3.927.0",
23
+ "@aws-sdk/core": "3.928.0",
24
+ "@aws-sdk/credential-provider-node": "3.928.0",
25
25
  "@aws-sdk/middleware-host-header": "3.922.0",
26
26
  "@aws-sdk/middleware-logger": "3.922.0",
27
27
  "@aws-sdk/middleware-recursion-detection": "3.922.0",
28
- "@aws-sdk/middleware-user-agent": "3.927.0",
28
+ "@aws-sdk/middleware-user-agent": "3.928.0",
29
29
  "@aws-sdk/region-config-resolver": "3.925.0",
30
30
  "@aws-sdk/types": "3.922.0",
31
31
  "@aws-sdk/util-endpoints": "3.922.0",
32
32
  "@aws-sdk/util-user-agent-browser": "3.922.0",
33
- "@aws-sdk/util-user-agent-node": "3.927.0",
33
+ "@aws-sdk/util-user-agent-node": "3.928.0",
34
34
  "@smithy/config-resolver": "^4.4.2",
35
35
  "@smithy/core": "^3.17.2",
36
36
  "@smithy/fetch-http-handler": "^5.3.5",
@@ -1,440 +0,0 @@
1
- import { loadRestJsonErrorCode, parseJsonBody as parseBody, parseJsonErrorBody as parseErrorBody } from "@aws-sdk/core";
2
- import { HttpRequest as __HttpRequest } from "@smithy/protocol-http";
3
- import { _json, collectBody, 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, take, withBaseException, } from "@smithy/smithy-client";
4
- import { AutoScalingPlansServiceException as __BaseException } from "../models/AutoScalingPlansServiceException";
5
- import { ConcurrentUpdateException, InternalServiceException, InvalidNextTokenException, LimitExceededException, ObjectNotFoundException, ValidationException, } from "../models/models_0";
6
- export const se_CreateScalingPlanCommand = async (input, context) => {
7
- const headers = sharedHeaders("CreateScalingPlan");
8
- let body;
9
- body = JSON.stringify(se_CreateScalingPlanRequest(input, context));
10
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
11
- };
12
- export const se_DeleteScalingPlanCommand = async (input, context) => {
13
- const headers = sharedHeaders("DeleteScalingPlan");
14
- let body;
15
- body = JSON.stringify(_json(input));
16
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
17
- };
18
- export const se_DescribeScalingPlanResourcesCommand = async (input, context) => {
19
- const headers = sharedHeaders("DescribeScalingPlanResources");
20
- let body;
21
- body = JSON.stringify(_json(input));
22
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
23
- };
24
- export const se_DescribeScalingPlansCommand = async (input, context) => {
25
- const headers = sharedHeaders("DescribeScalingPlans");
26
- let body;
27
- body = JSON.stringify(_json(input));
28
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
29
- };
30
- export const se_GetScalingPlanResourceForecastDataCommand = async (input, context) => {
31
- const headers = sharedHeaders("GetScalingPlanResourceForecastData");
32
- let body;
33
- body = JSON.stringify(se_GetScalingPlanResourceForecastDataRequest(input, context));
34
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
35
- };
36
- export const se_UpdateScalingPlanCommand = async (input, context) => {
37
- const headers = sharedHeaders("UpdateScalingPlan");
38
- let body;
39
- body = JSON.stringify(se_UpdateScalingPlanRequest(input, context));
40
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
41
- };
42
- export const de_CreateScalingPlanCommand = async (output, context) => {
43
- if (output.statusCode >= 300) {
44
- return de_CommandError(output, context);
45
- }
46
- const data = await parseBody(output.body, context);
47
- let contents = {};
48
- contents = _json(data);
49
- const response = {
50
- $metadata: deserializeMetadata(output),
51
- ...contents,
52
- };
53
- return response;
54
- };
55
- export const de_DeleteScalingPlanCommand = async (output, context) => {
56
- if (output.statusCode >= 300) {
57
- return de_CommandError(output, context);
58
- }
59
- const data = await parseBody(output.body, context);
60
- let contents = {};
61
- contents = _json(data);
62
- const response = {
63
- $metadata: deserializeMetadata(output),
64
- ...contents,
65
- };
66
- return response;
67
- };
68
- export const de_DescribeScalingPlanResourcesCommand = async (output, context) => {
69
- if (output.statusCode >= 300) {
70
- return de_CommandError(output, context);
71
- }
72
- const data = await parseBody(output.body, context);
73
- let contents = {};
74
- contents = de_DescribeScalingPlanResourcesResponse(data, context);
75
- const response = {
76
- $metadata: deserializeMetadata(output),
77
- ...contents,
78
- };
79
- return response;
80
- };
81
- export const de_DescribeScalingPlansCommand = async (output, context) => {
82
- if (output.statusCode >= 300) {
83
- return de_CommandError(output, context);
84
- }
85
- const data = await parseBody(output.body, context);
86
- let contents = {};
87
- contents = de_DescribeScalingPlansResponse(data, context);
88
- const response = {
89
- $metadata: deserializeMetadata(output),
90
- ...contents,
91
- };
92
- return response;
93
- };
94
- export const de_GetScalingPlanResourceForecastDataCommand = async (output, context) => {
95
- if (output.statusCode >= 300) {
96
- return de_CommandError(output, context);
97
- }
98
- const data = await parseBody(output.body, context);
99
- let contents = {};
100
- contents = de_GetScalingPlanResourceForecastDataResponse(data, context);
101
- const response = {
102
- $metadata: deserializeMetadata(output),
103
- ...contents,
104
- };
105
- return response;
106
- };
107
- export const de_UpdateScalingPlanCommand = async (output, context) => {
108
- if (output.statusCode >= 300) {
109
- return de_CommandError(output, context);
110
- }
111
- const data = await parseBody(output.body, context);
112
- let contents = {};
113
- contents = _json(data);
114
- const response = {
115
- $metadata: deserializeMetadata(output),
116
- ...contents,
117
- };
118
- return response;
119
- };
120
- const de_CommandError = async (output, context) => {
121
- const parsedOutput = {
122
- ...output,
123
- body: await parseErrorBody(output.body, context),
124
- };
125
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
126
- switch (errorCode) {
127
- case "ConcurrentUpdateException":
128
- case "com.amazonaws.autoscalingplans#ConcurrentUpdateException":
129
- throw await de_ConcurrentUpdateExceptionRes(parsedOutput, context);
130
- case "InternalServiceException":
131
- case "com.amazonaws.autoscalingplans#InternalServiceException":
132
- throw await de_InternalServiceExceptionRes(parsedOutput, context);
133
- case "LimitExceededException":
134
- case "com.amazonaws.autoscalingplans#LimitExceededException":
135
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
136
- case "ValidationException":
137
- case "com.amazonaws.autoscalingplans#ValidationException":
138
- throw await de_ValidationExceptionRes(parsedOutput, context);
139
- case "ObjectNotFoundException":
140
- case "com.amazonaws.autoscalingplans#ObjectNotFoundException":
141
- throw await de_ObjectNotFoundExceptionRes(parsedOutput, context);
142
- case "InvalidNextTokenException":
143
- case "com.amazonaws.autoscalingplans#InvalidNextTokenException":
144
- throw await de_InvalidNextTokenExceptionRes(parsedOutput, context);
145
- default:
146
- const parsedBody = parsedOutput.body;
147
- return throwDefaultError({
148
- output,
149
- parsedBody,
150
- errorCode,
151
- });
152
- }
153
- };
154
- const de_ConcurrentUpdateExceptionRes = async (parsedOutput, context) => {
155
- const body = parsedOutput.body;
156
- const deserialized = _json(body);
157
- const exception = new ConcurrentUpdateException({
158
- $metadata: deserializeMetadata(parsedOutput),
159
- ...deserialized,
160
- });
161
- return __decorateServiceException(exception, body);
162
- };
163
- const de_InternalServiceExceptionRes = async (parsedOutput, context) => {
164
- const body = parsedOutput.body;
165
- const deserialized = _json(body);
166
- const exception = new InternalServiceException({
167
- $metadata: deserializeMetadata(parsedOutput),
168
- ...deserialized,
169
- });
170
- return __decorateServiceException(exception, body);
171
- };
172
- const de_InvalidNextTokenExceptionRes = async (parsedOutput, context) => {
173
- const body = parsedOutput.body;
174
- const deserialized = _json(body);
175
- const exception = new InvalidNextTokenException({
176
- $metadata: deserializeMetadata(parsedOutput),
177
- ...deserialized,
178
- });
179
- return __decorateServiceException(exception, body);
180
- };
181
- const de_LimitExceededExceptionRes = async (parsedOutput, context) => {
182
- const body = parsedOutput.body;
183
- const deserialized = _json(body);
184
- const exception = new LimitExceededException({
185
- $metadata: deserializeMetadata(parsedOutput),
186
- ...deserialized,
187
- });
188
- return __decorateServiceException(exception, body);
189
- };
190
- const de_ObjectNotFoundExceptionRes = async (parsedOutput, context) => {
191
- const body = parsedOutput.body;
192
- const deserialized = _json(body);
193
- const exception = new ObjectNotFoundException({
194
- $metadata: deserializeMetadata(parsedOutput),
195
- ...deserialized,
196
- });
197
- return __decorateServiceException(exception, body);
198
- };
199
- const de_ValidationExceptionRes = async (parsedOutput, context) => {
200
- const body = parsedOutput.body;
201
- const deserialized = _json(body);
202
- const exception = new ValidationException({
203
- $metadata: deserializeMetadata(parsedOutput),
204
- ...deserialized,
205
- });
206
- return __decorateServiceException(exception, body);
207
- };
208
- const se_CreateScalingPlanRequest = (input, context) => {
209
- return take(input, {
210
- ApplicationSource: _json,
211
- ScalingInstructions: (_) => se_ScalingInstructions(_, context),
212
- ScalingPlanName: [],
213
- });
214
- };
215
- const se_GetScalingPlanResourceForecastDataRequest = (input, context) => {
216
- return take(input, {
217
- EndTime: (_) => _.getTime() / 1_000,
218
- ForecastDataType: [],
219
- ResourceId: [],
220
- ScalableDimension: [],
221
- ScalingPlanName: [],
222
- ScalingPlanVersion: [],
223
- ServiceNamespace: [],
224
- StartTime: (_) => _.getTime() / 1_000,
225
- });
226
- };
227
- const se_ScalingInstruction = (input, context) => {
228
- return take(input, {
229
- CustomizedLoadMetricSpecification: _json,
230
- DisableDynamicScaling: [],
231
- MaxCapacity: [],
232
- MinCapacity: [],
233
- PredefinedLoadMetricSpecification: _json,
234
- PredictiveScalingMaxCapacityBehavior: [],
235
- PredictiveScalingMaxCapacityBuffer: [],
236
- PredictiveScalingMode: [],
237
- ResourceId: [],
238
- ScalableDimension: [],
239
- ScalingPolicyUpdateBehavior: [],
240
- ScheduledActionBufferTime: [],
241
- ServiceNamespace: [],
242
- TargetTrackingConfigurations: (_) => se_TargetTrackingConfigurations(_, context),
243
- });
244
- };
245
- const se_ScalingInstructions = (input, context) => {
246
- return input
247
- .filter((e) => e != null)
248
- .map((entry) => {
249
- return se_ScalingInstruction(entry, context);
250
- });
251
- };
252
- const se_TargetTrackingConfiguration = (input, context) => {
253
- return take(input, {
254
- CustomizedScalingMetricSpecification: _json,
255
- DisableScaleIn: [],
256
- EstimatedInstanceWarmup: [],
257
- PredefinedScalingMetricSpecification: _json,
258
- ScaleInCooldown: [],
259
- ScaleOutCooldown: [],
260
- TargetValue: __serializeFloat,
261
- });
262
- };
263
- const se_TargetTrackingConfigurations = (input, context) => {
264
- return input
265
- .filter((e) => e != null)
266
- .map((entry) => {
267
- return se_TargetTrackingConfiguration(entry, context);
268
- });
269
- };
270
- const se_UpdateScalingPlanRequest = (input, context) => {
271
- return take(input, {
272
- ApplicationSource: _json,
273
- ScalingInstructions: (_) => se_ScalingInstructions(_, context),
274
- ScalingPlanName: [],
275
- ScalingPlanVersion: [],
276
- });
277
- };
278
- const de_Datapoint = (output, context) => {
279
- return take(output, {
280
- Timestamp: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
281
- Value: __limitedParseDouble,
282
- });
283
- };
284
- const de_Datapoints = (output, context) => {
285
- const retVal = (output || [])
286
- .filter((e) => e != null)
287
- .map((entry) => {
288
- return de_Datapoint(entry, context);
289
- });
290
- return retVal;
291
- };
292
- const de_DescribeScalingPlanResourcesResponse = (output, context) => {
293
- return take(output, {
294
- NextToken: __expectString,
295
- ScalingPlanResources: (_) => de_ScalingPlanResources(_, context),
296
- });
297
- };
298
- const de_DescribeScalingPlansResponse = (output, context) => {
299
- return take(output, {
300
- NextToken: __expectString,
301
- ScalingPlans: (_) => de_ScalingPlans(_, context),
302
- });
303
- };
304
- const de_GetScalingPlanResourceForecastDataResponse = (output, context) => {
305
- return take(output, {
306
- Datapoints: (_) => de_Datapoints(_, context),
307
- });
308
- };
309
- const de_ScalingInstruction = (output, context) => {
310
- return take(output, {
311
- CustomizedLoadMetricSpecification: _json,
312
- DisableDynamicScaling: __expectBoolean,
313
- MaxCapacity: __expectInt32,
314
- MinCapacity: __expectInt32,
315
- PredefinedLoadMetricSpecification: _json,
316
- PredictiveScalingMaxCapacityBehavior: __expectString,
317
- PredictiveScalingMaxCapacityBuffer: __expectInt32,
318
- PredictiveScalingMode: __expectString,
319
- ResourceId: __expectString,
320
- ScalableDimension: __expectString,
321
- ScalingPolicyUpdateBehavior: __expectString,
322
- ScheduledActionBufferTime: __expectInt32,
323
- ServiceNamespace: __expectString,
324
- TargetTrackingConfigurations: (_) => de_TargetTrackingConfigurations(_, context),
325
- });
326
- };
327
- const de_ScalingInstructions = (output, context) => {
328
- const retVal = (output || [])
329
- .filter((e) => e != null)
330
- .map((entry) => {
331
- return de_ScalingInstruction(entry, context);
332
- });
333
- return retVal;
334
- };
335
- const de_ScalingPlan = (output, context) => {
336
- return take(output, {
337
- ApplicationSource: _json,
338
- CreationTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
339
- ScalingInstructions: (_) => de_ScalingInstructions(_, context),
340
- ScalingPlanName: __expectString,
341
- ScalingPlanVersion: __expectLong,
342
- StatusCode: __expectString,
343
- StatusMessage: __expectString,
344
- StatusStartTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
345
- });
346
- };
347
- const de_ScalingPlanResource = (output, context) => {
348
- return take(output, {
349
- ResourceId: __expectString,
350
- ScalableDimension: __expectString,
351
- ScalingPlanName: __expectString,
352
- ScalingPlanVersion: __expectLong,
353
- ScalingPolicies: (_) => de_ScalingPolicies(_, context),
354
- ScalingStatusCode: __expectString,
355
- ScalingStatusMessage: __expectString,
356
- ServiceNamespace: __expectString,
357
- });
358
- };
359
- const de_ScalingPlanResources = (output, context) => {
360
- const retVal = (output || [])
361
- .filter((e) => e != null)
362
- .map((entry) => {
363
- return de_ScalingPlanResource(entry, context);
364
- });
365
- return retVal;
366
- };
367
- const de_ScalingPlans = (output, context) => {
368
- const retVal = (output || [])
369
- .filter((e) => e != null)
370
- .map((entry) => {
371
- return de_ScalingPlan(entry, context);
372
- });
373
- return retVal;
374
- };
375
- const de_ScalingPolicies = (output, context) => {
376
- const retVal = (output || [])
377
- .filter((e) => e != null)
378
- .map((entry) => {
379
- return de_ScalingPolicy(entry, context);
380
- });
381
- return retVal;
382
- };
383
- const de_ScalingPolicy = (output, context) => {
384
- return take(output, {
385
- PolicyName: __expectString,
386
- PolicyType: __expectString,
387
- TargetTrackingConfiguration: (_) => de_TargetTrackingConfiguration(_, context),
388
- });
389
- };
390
- const de_TargetTrackingConfiguration = (output, context) => {
391
- return take(output, {
392
- CustomizedScalingMetricSpecification: _json,
393
- DisableScaleIn: __expectBoolean,
394
- EstimatedInstanceWarmup: __expectInt32,
395
- PredefinedScalingMetricSpecification: _json,
396
- ScaleInCooldown: __expectInt32,
397
- ScaleOutCooldown: __expectInt32,
398
- TargetValue: __limitedParseDouble,
399
- });
400
- };
401
- const de_TargetTrackingConfigurations = (output, context) => {
402
- const retVal = (output || [])
403
- .filter((e) => e != null)
404
- .map((entry) => {
405
- return de_TargetTrackingConfiguration(entry, context);
406
- });
407
- return retVal;
408
- };
409
- const deserializeMetadata = (output) => ({
410
- httpStatusCode: output.statusCode,
411
- requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
412
- extendedRequestId: output.headers["x-amz-id-2"],
413
- cfId: output.headers["x-amz-cf-id"],
414
- });
415
- const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
416
- const throwDefaultError = withBaseException(__BaseException);
417
- const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, body) => {
418
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
419
- const contents = {
420
- protocol,
421
- hostname,
422
- port,
423
- method: "POST",
424
- path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path,
425
- headers,
426
- };
427
- if (resolvedHostname !== undefined) {
428
- contents.hostname = resolvedHostname;
429
- }
430
- if (body !== undefined) {
431
- contents.body = body;
432
- }
433
- return new __HttpRequest(contents);
434
- };
435
- function sharedHeaders(operation) {
436
- return {
437
- "content-type": "application/x-amz-json-1.1",
438
- "x-amz-target": `AnyScaleScalingPlannerFrontendService.${operation}`,
439
- };
440
- }