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