@aws-sdk/client-savingsplans 3.312.0 → 3.315.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist-cjs/protocols/Aws_restJson1.js +131 -530
- package/dist-es/protocols/Aws_restJson1.js +119 -518
- package/package.json +6 -6
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { HttpRequest as __HttpRequest } from "@aws-sdk/protocol-http";
|
|
2
|
-
import { decorateServiceException as __decorateServiceException,
|
|
2
|
+
import { _json, decorateServiceException as __decorateServiceException, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, map, take, withBaseException, } from "@aws-sdk/smithy-client";
|
|
3
3
|
import { v4 as generateIdempotencyToken } from "uuid";
|
|
4
4
|
import { InternalServerException, ResourceNotFoundException, ServiceQuotaExceededException, ValidationException, } from "../models/models_0";
|
|
5
5
|
import { SavingsplansServiceException as __BaseException } from "../models/SavingsplansServiceException";
|
|
@@ -10,14 +10,14 @@ export const se_CreateSavingsPlanCommand = async (input, context) => {
|
|
|
10
10
|
};
|
|
11
11
|
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/CreateSavingsPlan";
|
|
12
12
|
let body;
|
|
13
|
-
body = JSON.stringify({
|
|
14
|
-
clientToken:
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
});
|
|
13
|
+
body = JSON.stringify(take(input, {
|
|
14
|
+
clientToken: (_) => _ ?? generateIdempotencyToken(),
|
|
15
|
+
commitment: [],
|
|
16
|
+
purchaseTime: (_) => Math.round(_.getTime() / 1000),
|
|
17
|
+
savingsPlanOfferingId: [],
|
|
18
|
+
tags: (_) => _json(_),
|
|
19
|
+
upfrontPaymentAmount: [],
|
|
20
|
+
}));
|
|
21
21
|
return new __HttpRequest({
|
|
22
22
|
protocol,
|
|
23
23
|
hostname,
|
|
@@ -35,9 +35,9 @@ export const se_DeleteQueuedSavingsPlanCommand = async (input, context) => {
|
|
|
35
35
|
};
|
|
36
36
|
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/DeleteQueuedSavingsPlan";
|
|
37
37
|
let body;
|
|
38
|
-
body = JSON.stringify({
|
|
39
|
-
|
|
40
|
-
});
|
|
38
|
+
body = JSON.stringify(take(input, {
|
|
39
|
+
savingsPlanId: [],
|
|
40
|
+
}));
|
|
41
41
|
return new __HttpRequest({
|
|
42
42
|
protocol,
|
|
43
43
|
hostname,
|
|
@@ -55,12 +55,12 @@ export const se_DescribeSavingsPlanRatesCommand = async (input, context) => {
|
|
|
55
55
|
};
|
|
56
56
|
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/DescribeSavingsPlanRates";
|
|
57
57
|
let body;
|
|
58
|
-
body = JSON.stringify({
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
});
|
|
58
|
+
body = JSON.stringify(take(input, {
|
|
59
|
+
filters: (_) => _json(_),
|
|
60
|
+
maxResults: [],
|
|
61
|
+
nextToken: [],
|
|
62
|
+
savingsPlanId: [],
|
|
63
|
+
}));
|
|
64
64
|
return new __HttpRequest({
|
|
65
65
|
protocol,
|
|
66
66
|
hostname,
|
|
@@ -78,14 +78,14 @@ export const se_DescribeSavingsPlansCommand = async (input, context) => {
|
|
|
78
78
|
};
|
|
79
79
|
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/DescribeSavingsPlans";
|
|
80
80
|
let body;
|
|
81
|
-
body = JSON.stringify({
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
});
|
|
81
|
+
body = JSON.stringify(take(input, {
|
|
82
|
+
filters: (_) => _json(_),
|
|
83
|
+
maxResults: [],
|
|
84
|
+
nextToken: [],
|
|
85
|
+
savingsPlanArns: (_) => _json(_),
|
|
86
|
+
savingsPlanIds: (_) => _json(_),
|
|
87
|
+
states: (_) => _json(_),
|
|
88
|
+
}));
|
|
89
89
|
return new __HttpRequest({
|
|
90
90
|
protocol,
|
|
91
91
|
hostname,
|
|
@@ -103,24 +103,18 @@ export const se_DescribeSavingsPlansOfferingRatesCommand = async (input, context
|
|
|
103
103
|
};
|
|
104
104
|
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/DescribeSavingsPlansOfferingRates";
|
|
105
105
|
let body;
|
|
106
|
-
body = JSON.stringify({
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
...(input.savingsPlanTypes != null && {
|
|
119
|
-
savingsPlanTypes: se_SavingsPlanTypeList(input.savingsPlanTypes, context),
|
|
120
|
-
}),
|
|
121
|
-
...(input.serviceCodes != null && { serviceCodes: se_SavingsPlanRateServiceCodeList(input.serviceCodes, context) }),
|
|
122
|
-
...(input.usageTypes != null && { usageTypes: se_SavingsPlanRateUsageTypeList(input.usageTypes, context) }),
|
|
123
|
-
});
|
|
106
|
+
body = JSON.stringify(take(input, {
|
|
107
|
+
filters: (_) => _json(_),
|
|
108
|
+
maxResults: [],
|
|
109
|
+
nextToken: [],
|
|
110
|
+
operations: (_) => _json(_),
|
|
111
|
+
products: (_) => _json(_),
|
|
112
|
+
savingsPlanOfferingIds: (_) => _json(_),
|
|
113
|
+
savingsPlanPaymentOptions: (_) => _json(_),
|
|
114
|
+
savingsPlanTypes: (_) => _json(_),
|
|
115
|
+
serviceCodes: (_) => _json(_),
|
|
116
|
+
usageTypes: (_) => _json(_),
|
|
117
|
+
}));
|
|
124
118
|
return new __HttpRequest({
|
|
125
119
|
protocol,
|
|
126
120
|
hostname,
|
|
@@ -138,23 +132,21 @@ export const se_DescribeSavingsPlansOfferingsCommand = async (input, context) =>
|
|
|
138
132
|
};
|
|
139
133
|
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/DescribeSavingsPlansOfferings";
|
|
140
134
|
let body;
|
|
141
|
-
body = JSON.stringify({
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
...(input.usageTypes != null && { usageTypes: se_SavingsPlanUsageTypeList(input.usageTypes, context) }),
|
|
157
|
-
});
|
|
135
|
+
body = JSON.stringify(take(input, {
|
|
136
|
+
currencies: (_) => _json(_),
|
|
137
|
+
descriptions: (_) => _json(_),
|
|
138
|
+
durations: (_) => _json(_),
|
|
139
|
+
filters: (_) => _json(_),
|
|
140
|
+
maxResults: [],
|
|
141
|
+
nextToken: [],
|
|
142
|
+
offeringIds: (_) => _json(_),
|
|
143
|
+
operations: (_) => _json(_),
|
|
144
|
+
paymentOptions: (_) => _json(_),
|
|
145
|
+
planTypes: (_) => _json(_),
|
|
146
|
+
productType: [],
|
|
147
|
+
serviceCodes: (_) => _json(_),
|
|
148
|
+
usageTypes: (_) => _json(_),
|
|
149
|
+
}));
|
|
158
150
|
return new __HttpRequest({
|
|
159
151
|
protocol,
|
|
160
152
|
hostname,
|
|
@@ -172,9 +164,9 @@ export const se_ListTagsForResourceCommand = async (input, context) => {
|
|
|
172
164
|
};
|
|
173
165
|
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/ListTagsForResource";
|
|
174
166
|
let body;
|
|
175
|
-
body = JSON.stringify({
|
|
176
|
-
|
|
177
|
-
});
|
|
167
|
+
body = JSON.stringify(take(input, {
|
|
168
|
+
resourceArn: [],
|
|
169
|
+
}));
|
|
178
170
|
return new __HttpRequest({
|
|
179
171
|
protocol,
|
|
180
172
|
hostname,
|
|
@@ -192,10 +184,10 @@ export const se_TagResourceCommand = async (input, context) => {
|
|
|
192
184
|
};
|
|
193
185
|
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/TagResource";
|
|
194
186
|
let body;
|
|
195
|
-
body = JSON.stringify({
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
});
|
|
187
|
+
body = JSON.stringify(take(input, {
|
|
188
|
+
resourceArn: [],
|
|
189
|
+
tags: (_) => _json(_),
|
|
190
|
+
}));
|
|
199
191
|
return new __HttpRequest({
|
|
200
192
|
protocol,
|
|
201
193
|
hostname,
|
|
@@ -213,10 +205,10 @@ export const se_UntagResourceCommand = async (input, context) => {
|
|
|
213
205
|
};
|
|
214
206
|
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/UntagResource";
|
|
215
207
|
let body;
|
|
216
|
-
body = JSON.stringify({
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
});
|
|
208
|
+
body = JSON.stringify(take(input, {
|
|
209
|
+
resourceArn: [],
|
|
210
|
+
tagKeys: (_) => _json(_),
|
|
211
|
+
}));
|
|
220
212
|
return new __HttpRequest({
|
|
221
213
|
protocol,
|
|
222
214
|
hostname,
|
|
@@ -235,9 +227,10 @@ export const de_CreateSavingsPlanCommand = async (output, context) => {
|
|
|
235
227
|
$metadata: deserializeMetadata(output),
|
|
236
228
|
});
|
|
237
229
|
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
}
|
|
230
|
+
const doc = take(data, {
|
|
231
|
+
savingsPlanId: __expectString,
|
|
232
|
+
});
|
|
233
|
+
Object.assign(contents, doc);
|
|
241
234
|
return contents;
|
|
242
235
|
};
|
|
243
236
|
const de_CreateSavingsPlanCommandError = async (output, context) => {
|
|
@@ -261,10 +254,9 @@ const de_CreateSavingsPlanCommandError = async (output, context) => {
|
|
|
261
254
|
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
262
255
|
default:
|
|
263
256
|
const parsedBody = parsedOutput.body;
|
|
264
|
-
throwDefaultError({
|
|
257
|
+
return throwDefaultError({
|
|
265
258
|
output,
|
|
266
259
|
parsedBody,
|
|
267
|
-
exceptionCtor: __BaseException,
|
|
268
260
|
errorCode,
|
|
269
261
|
});
|
|
270
262
|
}
|
|
@@ -300,10 +292,9 @@ const de_DeleteQueuedSavingsPlanCommandError = async (output, context) => {
|
|
|
300
292
|
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
301
293
|
default:
|
|
302
294
|
const parsedBody = parsedOutput.body;
|
|
303
|
-
throwDefaultError({
|
|
295
|
+
return throwDefaultError({
|
|
304
296
|
output,
|
|
305
297
|
parsedBody,
|
|
306
|
-
exceptionCtor: __BaseException,
|
|
307
298
|
errorCode,
|
|
308
299
|
});
|
|
309
300
|
}
|
|
@@ -316,15 +307,12 @@ export const de_DescribeSavingsPlanRatesCommand = async (output, context) => {
|
|
|
316
307
|
$metadata: deserializeMetadata(output),
|
|
317
308
|
});
|
|
318
309
|
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
if (data.searchResults != null) {
|
|
326
|
-
contents.searchResults = de_SavingsPlanRateList(data.searchResults, context);
|
|
327
|
-
}
|
|
310
|
+
const doc = take(data, {
|
|
311
|
+
nextToken: __expectString,
|
|
312
|
+
savingsPlanId: __expectString,
|
|
313
|
+
searchResults: _json,
|
|
314
|
+
});
|
|
315
|
+
Object.assign(contents, doc);
|
|
328
316
|
return contents;
|
|
329
317
|
};
|
|
330
318
|
const de_DescribeSavingsPlanRatesCommandError = async (output, context) => {
|
|
@@ -342,10 +330,9 @@ const de_DescribeSavingsPlanRatesCommandError = async (output, context) => {
|
|
|
342
330
|
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
343
331
|
default:
|
|
344
332
|
const parsedBody = parsedOutput.body;
|
|
345
|
-
throwDefaultError({
|
|
333
|
+
return throwDefaultError({
|
|
346
334
|
output,
|
|
347
335
|
parsedBody,
|
|
348
|
-
exceptionCtor: __BaseException,
|
|
349
336
|
errorCode,
|
|
350
337
|
});
|
|
351
338
|
}
|
|
@@ -358,12 +345,11 @@ export const de_DescribeSavingsPlansCommand = async (output, context) => {
|
|
|
358
345
|
$metadata: deserializeMetadata(output),
|
|
359
346
|
});
|
|
360
347
|
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
}
|
|
348
|
+
const doc = take(data, {
|
|
349
|
+
nextToken: __expectString,
|
|
350
|
+
savingsPlans: _json,
|
|
351
|
+
});
|
|
352
|
+
Object.assign(contents, doc);
|
|
367
353
|
return contents;
|
|
368
354
|
};
|
|
369
355
|
const de_DescribeSavingsPlansCommandError = async (output, context) => {
|
|
@@ -381,10 +367,9 @@ const de_DescribeSavingsPlansCommandError = async (output, context) => {
|
|
|
381
367
|
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
382
368
|
default:
|
|
383
369
|
const parsedBody = parsedOutput.body;
|
|
384
|
-
throwDefaultError({
|
|
370
|
+
return throwDefaultError({
|
|
385
371
|
output,
|
|
386
372
|
parsedBody,
|
|
387
|
-
exceptionCtor: __BaseException,
|
|
388
373
|
errorCode,
|
|
389
374
|
});
|
|
390
375
|
}
|
|
@@ -397,12 +382,11 @@ export const de_DescribeSavingsPlansOfferingRatesCommand = async (output, contex
|
|
|
397
382
|
$metadata: deserializeMetadata(output),
|
|
398
383
|
});
|
|
399
384
|
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
}
|
|
385
|
+
const doc = take(data, {
|
|
386
|
+
nextToken: __expectString,
|
|
387
|
+
searchResults: _json,
|
|
388
|
+
});
|
|
389
|
+
Object.assign(contents, doc);
|
|
406
390
|
return contents;
|
|
407
391
|
};
|
|
408
392
|
const de_DescribeSavingsPlansOfferingRatesCommandError = async (output, context) => {
|
|
@@ -420,10 +404,9 @@ const de_DescribeSavingsPlansOfferingRatesCommandError = async (output, context)
|
|
|
420
404
|
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
421
405
|
default:
|
|
422
406
|
const parsedBody = parsedOutput.body;
|
|
423
|
-
throwDefaultError({
|
|
407
|
+
return throwDefaultError({
|
|
424
408
|
output,
|
|
425
409
|
parsedBody,
|
|
426
|
-
exceptionCtor: __BaseException,
|
|
427
410
|
errorCode,
|
|
428
411
|
});
|
|
429
412
|
}
|
|
@@ -436,12 +419,11 @@ export const de_DescribeSavingsPlansOfferingsCommand = async (output, context) =
|
|
|
436
419
|
$metadata: deserializeMetadata(output),
|
|
437
420
|
});
|
|
438
421
|
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
}
|
|
422
|
+
const doc = take(data, {
|
|
423
|
+
nextToken: __expectString,
|
|
424
|
+
searchResults: _json,
|
|
425
|
+
});
|
|
426
|
+
Object.assign(contents, doc);
|
|
445
427
|
return contents;
|
|
446
428
|
};
|
|
447
429
|
const de_DescribeSavingsPlansOfferingsCommandError = async (output, context) => {
|
|
@@ -459,10 +441,9 @@ const de_DescribeSavingsPlansOfferingsCommandError = async (output, context) =>
|
|
|
459
441
|
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
460
442
|
default:
|
|
461
443
|
const parsedBody = parsedOutput.body;
|
|
462
|
-
throwDefaultError({
|
|
444
|
+
return throwDefaultError({
|
|
463
445
|
output,
|
|
464
446
|
parsedBody,
|
|
465
|
-
exceptionCtor: __BaseException,
|
|
466
447
|
errorCode,
|
|
467
448
|
});
|
|
468
449
|
}
|
|
@@ -475,9 +456,10 @@ export const de_ListTagsForResourceCommand = async (output, context) => {
|
|
|
475
456
|
$metadata: deserializeMetadata(output),
|
|
476
457
|
});
|
|
477
458
|
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
}
|
|
459
|
+
const doc = take(data, {
|
|
460
|
+
tags: _json,
|
|
461
|
+
});
|
|
462
|
+
Object.assign(contents, doc);
|
|
481
463
|
return contents;
|
|
482
464
|
};
|
|
483
465
|
const de_ListTagsForResourceCommandError = async (output, context) => {
|
|
@@ -498,10 +480,9 @@ const de_ListTagsForResourceCommandError = async (output, context) => {
|
|
|
498
480
|
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
499
481
|
default:
|
|
500
482
|
const parsedBody = parsedOutput.body;
|
|
501
|
-
throwDefaultError({
|
|
483
|
+
return throwDefaultError({
|
|
502
484
|
output,
|
|
503
485
|
parsedBody,
|
|
504
|
-
exceptionCtor: __BaseException,
|
|
505
486
|
errorCode,
|
|
506
487
|
});
|
|
507
488
|
}
|
|
@@ -537,10 +518,9 @@ const de_TagResourceCommandError = async (output, context) => {
|
|
|
537
518
|
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
538
519
|
default:
|
|
539
520
|
const parsedBody = parsedOutput.body;
|
|
540
|
-
throwDefaultError({
|
|
521
|
+
return throwDefaultError({
|
|
541
522
|
output,
|
|
542
523
|
parsedBody,
|
|
543
|
-
exceptionCtor: __BaseException,
|
|
544
524
|
errorCode,
|
|
545
525
|
});
|
|
546
526
|
}
|
|
@@ -573,21 +553,21 @@ const de_UntagResourceCommandError = async (output, context) => {
|
|
|
573
553
|
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
574
554
|
default:
|
|
575
555
|
const parsedBody = parsedOutput.body;
|
|
576
|
-
throwDefaultError({
|
|
556
|
+
return throwDefaultError({
|
|
577
557
|
output,
|
|
578
558
|
parsedBody,
|
|
579
|
-
exceptionCtor: __BaseException,
|
|
580
559
|
errorCode,
|
|
581
560
|
});
|
|
582
561
|
}
|
|
583
562
|
};
|
|
584
|
-
const
|
|
563
|
+
const throwDefaultError = withBaseException(__BaseException);
|
|
585
564
|
const de_InternalServerExceptionRes = async (parsedOutput, context) => {
|
|
586
565
|
const contents = map({});
|
|
587
566
|
const data = parsedOutput.body;
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
}
|
|
567
|
+
const doc = take(data, {
|
|
568
|
+
message: __expectString,
|
|
569
|
+
});
|
|
570
|
+
Object.assign(contents, doc);
|
|
591
571
|
const exception = new InternalServerException({
|
|
592
572
|
$metadata: deserializeMetadata(parsedOutput),
|
|
593
573
|
...contents,
|
|
@@ -597,9 +577,10 @@ const de_InternalServerExceptionRes = async (parsedOutput, context) => {
|
|
|
597
577
|
const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
|
|
598
578
|
const contents = map({});
|
|
599
579
|
const data = parsedOutput.body;
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
}
|
|
580
|
+
const doc = take(data, {
|
|
581
|
+
message: __expectString,
|
|
582
|
+
});
|
|
583
|
+
Object.assign(contents, doc);
|
|
603
584
|
const exception = new ResourceNotFoundException({
|
|
604
585
|
$metadata: deserializeMetadata(parsedOutput),
|
|
605
586
|
...contents,
|
|
@@ -609,9 +590,10 @@ const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
|
|
|
609
590
|
const de_ServiceQuotaExceededExceptionRes = async (parsedOutput, context) => {
|
|
610
591
|
const contents = map({});
|
|
611
592
|
const data = parsedOutput.body;
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
}
|
|
593
|
+
const doc = take(data, {
|
|
594
|
+
message: __expectString,
|
|
595
|
+
});
|
|
596
|
+
Object.assign(contents, doc);
|
|
615
597
|
const exception = new ServiceQuotaExceededException({
|
|
616
598
|
$metadata: deserializeMetadata(parsedOutput),
|
|
617
599
|
...contents,
|
|
@@ -621,397 +603,16 @@ const de_ServiceQuotaExceededExceptionRes = async (parsedOutput, context) => {
|
|
|
621
603
|
const de_ValidationExceptionRes = async (parsedOutput, context) => {
|
|
622
604
|
const contents = map({});
|
|
623
605
|
const data = parsedOutput.body;
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
}
|
|
606
|
+
const doc = take(data, {
|
|
607
|
+
message: __expectString,
|
|
608
|
+
});
|
|
609
|
+
Object.assign(contents, doc);
|
|
627
610
|
const exception = new ValidationException({
|
|
628
611
|
$metadata: deserializeMetadata(parsedOutput),
|
|
629
612
|
...contents,
|
|
630
613
|
});
|
|
631
614
|
return __decorateServiceException(exception, parsedOutput.body);
|
|
632
615
|
};
|
|
633
|
-
const se_CurrencyList = (input, context) => {
|
|
634
|
-
return input
|
|
635
|
-
.filter((e) => e != null)
|
|
636
|
-
.map((entry) => {
|
|
637
|
-
return entry;
|
|
638
|
-
});
|
|
639
|
-
};
|
|
640
|
-
const se_DurationsList = (input, context) => {
|
|
641
|
-
return input
|
|
642
|
-
.filter((e) => e != null)
|
|
643
|
-
.map((entry) => {
|
|
644
|
-
return entry;
|
|
645
|
-
});
|
|
646
|
-
};
|
|
647
|
-
const se_FilterValuesList = (input, context) => {
|
|
648
|
-
return input
|
|
649
|
-
.filter((e) => e != null)
|
|
650
|
-
.map((entry) => {
|
|
651
|
-
return entry;
|
|
652
|
-
});
|
|
653
|
-
};
|
|
654
|
-
const se_ListOfStrings = (input, context) => {
|
|
655
|
-
return input
|
|
656
|
-
.filter((e) => e != null)
|
|
657
|
-
.map((entry) => {
|
|
658
|
-
return entry;
|
|
659
|
-
});
|
|
660
|
-
};
|
|
661
|
-
const se_SavingsPlanArnList = (input, context) => {
|
|
662
|
-
return input
|
|
663
|
-
.filter((e) => e != null)
|
|
664
|
-
.map((entry) => {
|
|
665
|
-
return entry;
|
|
666
|
-
});
|
|
667
|
-
};
|
|
668
|
-
const se_SavingsPlanDescriptionsList = (input, context) => {
|
|
669
|
-
return input
|
|
670
|
-
.filter((e) => e != null)
|
|
671
|
-
.map((entry) => {
|
|
672
|
-
return entry;
|
|
673
|
-
});
|
|
674
|
-
};
|
|
675
|
-
const se_SavingsPlanFilter = (input, context) => {
|
|
676
|
-
return {
|
|
677
|
-
...(input.name != null && { name: input.name }),
|
|
678
|
-
...(input.values != null && { values: se_ListOfStrings(input.values, context) }),
|
|
679
|
-
};
|
|
680
|
-
};
|
|
681
|
-
const se_SavingsPlanFilterList = (input, context) => {
|
|
682
|
-
return input
|
|
683
|
-
.filter((e) => e != null)
|
|
684
|
-
.map((entry) => {
|
|
685
|
-
return se_SavingsPlanFilter(entry, context);
|
|
686
|
-
});
|
|
687
|
-
};
|
|
688
|
-
const se_SavingsPlanIdList = (input, context) => {
|
|
689
|
-
return input
|
|
690
|
-
.filter((e) => e != null)
|
|
691
|
-
.map((entry) => {
|
|
692
|
-
return entry;
|
|
693
|
-
});
|
|
694
|
-
};
|
|
695
|
-
const se_SavingsPlanOfferingFilterElement = (input, context) => {
|
|
696
|
-
return {
|
|
697
|
-
...(input.name != null && { name: input.name }),
|
|
698
|
-
...(input.values != null && { values: se_FilterValuesList(input.values, context) }),
|
|
699
|
-
};
|
|
700
|
-
};
|
|
701
|
-
const se_SavingsPlanOfferingFiltersList = (input, context) => {
|
|
702
|
-
return input
|
|
703
|
-
.filter((e) => e != null)
|
|
704
|
-
.map((entry) => {
|
|
705
|
-
return se_SavingsPlanOfferingFilterElement(entry, context);
|
|
706
|
-
});
|
|
707
|
-
};
|
|
708
|
-
const se_SavingsPlanOfferingRateFilterElement = (input, context) => {
|
|
709
|
-
return {
|
|
710
|
-
...(input.name != null && { name: input.name }),
|
|
711
|
-
...(input.values != null && { values: se_FilterValuesList(input.values, context) }),
|
|
712
|
-
};
|
|
713
|
-
};
|
|
714
|
-
const se_SavingsPlanOfferingRateFiltersList = (input, context) => {
|
|
715
|
-
return input
|
|
716
|
-
.filter((e) => e != null)
|
|
717
|
-
.map((entry) => {
|
|
718
|
-
return se_SavingsPlanOfferingRateFilterElement(entry, context);
|
|
719
|
-
});
|
|
720
|
-
};
|
|
721
|
-
const se_SavingsPlanOperationList = (input, context) => {
|
|
722
|
-
return input
|
|
723
|
-
.filter((e) => e != null)
|
|
724
|
-
.map((entry) => {
|
|
725
|
-
return entry;
|
|
726
|
-
});
|
|
727
|
-
};
|
|
728
|
-
const se_SavingsPlanPaymentOptionList = (input, context) => {
|
|
729
|
-
return input
|
|
730
|
-
.filter((e) => e != null)
|
|
731
|
-
.map((entry) => {
|
|
732
|
-
return entry;
|
|
733
|
-
});
|
|
734
|
-
};
|
|
735
|
-
const se_SavingsPlanProductTypeList = (input, context) => {
|
|
736
|
-
return input
|
|
737
|
-
.filter((e) => e != null)
|
|
738
|
-
.map((entry) => {
|
|
739
|
-
return entry;
|
|
740
|
-
});
|
|
741
|
-
};
|
|
742
|
-
const se_SavingsPlanRateFilter = (input, context) => {
|
|
743
|
-
return {
|
|
744
|
-
...(input.name != null && { name: input.name }),
|
|
745
|
-
...(input.values != null && { values: se_ListOfStrings(input.values, context) }),
|
|
746
|
-
};
|
|
747
|
-
};
|
|
748
|
-
const se_SavingsPlanRateFilterList = (input, context) => {
|
|
749
|
-
return input
|
|
750
|
-
.filter((e) => e != null)
|
|
751
|
-
.map((entry) => {
|
|
752
|
-
return se_SavingsPlanRateFilter(entry, context);
|
|
753
|
-
});
|
|
754
|
-
};
|
|
755
|
-
const se_SavingsPlanRateOperationList = (input, context) => {
|
|
756
|
-
return input
|
|
757
|
-
.filter((e) => e != null)
|
|
758
|
-
.map((entry) => {
|
|
759
|
-
return entry;
|
|
760
|
-
});
|
|
761
|
-
};
|
|
762
|
-
const se_SavingsPlanRateServiceCodeList = (input, context) => {
|
|
763
|
-
return input
|
|
764
|
-
.filter((e) => e != null)
|
|
765
|
-
.map((entry) => {
|
|
766
|
-
return entry;
|
|
767
|
-
});
|
|
768
|
-
};
|
|
769
|
-
const se_SavingsPlanRateUsageTypeList = (input, context) => {
|
|
770
|
-
return input
|
|
771
|
-
.filter((e) => e != null)
|
|
772
|
-
.map((entry) => {
|
|
773
|
-
return entry;
|
|
774
|
-
});
|
|
775
|
-
};
|
|
776
|
-
const se_SavingsPlanServiceCodeList = (input, context) => {
|
|
777
|
-
return input
|
|
778
|
-
.filter((e) => e != null)
|
|
779
|
-
.map((entry) => {
|
|
780
|
-
return entry;
|
|
781
|
-
});
|
|
782
|
-
};
|
|
783
|
-
const se_SavingsPlanStateList = (input, context) => {
|
|
784
|
-
return input
|
|
785
|
-
.filter((e) => e != null)
|
|
786
|
-
.map((entry) => {
|
|
787
|
-
return entry;
|
|
788
|
-
});
|
|
789
|
-
};
|
|
790
|
-
const se_SavingsPlanTypeList = (input, context) => {
|
|
791
|
-
return input
|
|
792
|
-
.filter((e) => e != null)
|
|
793
|
-
.map((entry) => {
|
|
794
|
-
return entry;
|
|
795
|
-
});
|
|
796
|
-
};
|
|
797
|
-
const se_SavingsPlanUsageTypeList = (input, context) => {
|
|
798
|
-
return input
|
|
799
|
-
.filter((e) => e != null)
|
|
800
|
-
.map((entry) => {
|
|
801
|
-
return entry;
|
|
802
|
-
});
|
|
803
|
-
};
|
|
804
|
-
const se_TagKeyList = (input, context) => {
|
|
805
|
-
return input
|
|
806
|
-
.filter((e) => e != null)
|
|
807
|
-
.map((entry) => {
|
|
808
|
-
return entry;
|
|
809
|
-
});
|
|
810
|
-
};
|
|
811
|
-
const se_TagMap = (input, context) => {
|
|
812
|
-
return Object.entries(input).reduce((acc, [key, value]) => {
|
|
813
|
-
if (value === null) {
|
|
814
|
-
return acc;
|
|
815
|
-
}
|
|
816
|
-
acc[key] = value;
|
|
817
|
-
return acc;
|
|
818
|
-
}, {});
|
|
819
|
-
};
|
|
820
|
-
const se_UUIDs = (input, context) => {
|
|
821
|
-
return input
|
|
822
|
-
.filter((e) => e != null)
|
|
823
|
-
.map((entry) => {
|
|
824
|
-
return entry;
|
|
825
|
-
});
|
|
826
|
-
};
|
|
827
|
-
const de_ParentSavingsPlanOffering = (output, context) => {
|
|
828
|
-
return {
|
|
829
|
-
currency: __expectString(output.currency),
|
|
830
|
-
durationSeconds: __expectLong(output.durationSeconds),
|
|
831
|
-
offeringId: __expectString(output.offeringId),
|
|
832
|
-
paymentOption: __expectString(output.paymentOption),
|
|
833
|
-
planDescription: __expectString(output.planDescription),
|
|
834
|
-
planType: __expectString(output.planType),
|
|
835
|
-
};
|
|
836
|
-
};
|
|
837
|
-
const de_SavingsPlan = (output, context) => {
|
|
838
|
-
return {
|
|
839
|
-
commitment: __expectString(output.commitment),
|
|
840
|
-
currency: __expectString(output.currency),
|
|
841
|
-
description: __expectString(output.description),
|
|
842
|
-
ec2InstanceFamily: __expectString(output.ec2InstanceFamily),
|
|
843
|
-
end: __expectString(output.end),
|
|
844
|
-
offeringId: __expectString(output.offeringId),
|
|
845
|
-
paymentOption: __expectString(output.paymentOption),
|
|
846
|
-
productTypes: output.productTypes != null ? de_SavingsPlanProductTypeList(output.productTypes, context) : undefined,
|
|
847
|
-
recurringPaymentAmount: __expectString(output.recurringPaymentAmount),
|
|
848
|
-
region: __expectString(output.region),
|
|
849
|
-
savingsPlanArn: __expectString(output.savingsPlanArn),
|
|
850
|
-
savingsPlanId: __expectString(output.savingsPlanId),
|
|
851
|
-
savingsPlanType: __expectString(output.savingsPlanType),
|
|
852
|
-
start: __expectString(output.start),
|
|
853
|
-
state: __expectString(output.state),
|
|
854
|
-
tags: output.tags != null ? de_TagMap(output.tags, context) : undefined,
|
|
855
|
-
termDurationInSeconds: __expectLong(output.termDurationInSeconds),
|
|
856
|
-
upfrontPaymentAmount: __expectString(output.upfrontPaymentAmount),
|
|
857
|
-
};
|
|
858
|
-
};
|
|
859
|
-
const de_SavingsPlanList = (output, context) => {
|
|
860
|
-
const retVal = (output || [])
|
|
861
|
-
.filter((e) => e != null)
|
|
862
|
-
.map((entry) => {
|
|
863
|
-
if (entry === null) {
|
|
864
|
-
return null;
|
|
865
|
-
}
|
|
866
|
-
return de_SavingsPlan(entry, context);
|
|
867
|
-
});
|
|
868
|
-
return retVal;
|
|
869
|
-
};
|
|
870
|
-
const de_SavingsPlanOffering = (output, context) => {
|
|
871
|
-
return {
|
|
872
|
-
currency: __expectString(output.currency),
|
|
873
|
-
description: __expectString(output.description),
|
|
874
|
-
durationSeconds: __expectLong(output.durationSeconds),
|
|
875
|
-
offeringId: __expectString(output.offeringId),
|
|
876
|
-
operation: __expectString(output.operation),
|
|
877
|
-
paymentOption: __expectString(output.paymentOption),
|
|
878
|
-
planType: __expectString(output.planType),
|
|
879
|
-
productTypes: output.productTypes != null ? de_SavingsPlanProductTypeList(output.productTypes, context) : undefined,
|
|
880
|
-
properties: output.properties != null ? de_SavingsPlanOfferingPropertyList(output.properties, context) : undefined,
|
|
881
|
-
serviceCode: __expectString(output.serviceCode),
|
|
882
|
-
usageType: __expectString(output.usageType),
|
|
883
|
-
};
|
|
884
|
-
};
|
|
885
|
-
const de_SavingsPlanOfferingProperty = (output, context) => {
|
|
886
|
-
return {
|
|
887
|
-
name: __expectString(output.name),
|
|
888
|
-
value: __expectString(output.value),
|
|
889
|
-
};
|
|
890
|
-
};
|
|
891
|
-
const de_SavingsPlanOfferingPropertyList = (output, context) => {
|
|
892
|
-
const retVal = (output || [])
|
|
893
|
-
.filter((e) => e != null)
|
|
894
|
-
.map((entry) => {
|
|
895
|
-
if (entry === null) {
|
|
896
|
-
return null;
|
|
897
|
-
}
|
|
898
|
-
return de_SavingsPlanOfferingProperty(entry, context);
|
|
899
|
-
});
|
|
900
|
-
return retVal;
|
|
901
|
-
};
|
|
902
|
-
const de_SavingsPlanOfferingRate = (output, context) => {
|
|
903
|
-
return {
|
|
904
|
-
operation: __expectString(output.operation),
|
|
905
|
-
productType: __expectString(output.productType),
|
|
906
|
-
properties: output.properties != null ? de_SavingsPlanOfferingRatePropertyList(output.properties, context) : undefined,
|
|
907
|
-
rate: __expectString(output.rate),
|
|
908
|
-
savingsPlanOffering: output.savingsPlanOffering != null
|
|
909
|
-
? de_ParentSavingsPlanOffering(output.savingsPlanOffering, context)
|
|
910
|
-
: undefined,
|
|
911
|
-
serviceCode: __expectString(output.serviceCode),
|
|
912
|
-
unit: __expectString(output.unit),
|
|
913
|
-
usageType: __expectString(output.usageType),
|
|
914
|
-
};
|
|
915
|
-
};
|
|
916
|
-
const de_SavingsPlanOfferingRateProperty = (output, context) => {
|
|
917
|
-
return {
|
|
918
|
-
name: __expectString(output.name),
|
|
919
|
-
value: __expectString(output.value),
|
|
920
|
-
};
|
|
921
|
-
};
|
|
922
|
-
const de_SavingsPlanOfferingRatePropertyList = (output, context) => {
|
|
923
|
-
const retVal = (output || [])
|
|
924
|
-
.filter((e) => e != null)
|
|
925
|
-
.map((entry) => {
|
|
926
|
-
if (entry === null) {
|
|
927
|
-
return null;
|
|
928
|
-
}
|
|
929
|
-
return de_SavingsPlanOfferingRateProperty(entry, context);
|
|
930
|
-
});
|
|
931
|
-
return retVal;
|
|
932
|
-
};
|
|
933
|
-
const de_SavingsPlanOfferingRatesList = (output, context) => {
|
|
934
|
-
const retVal = (output || [])
|
|
935
|
-
.filter((e) => e != null)
|
|
936
|
-
.map((entry) => {
|
|
937
|
-
if (entry === null) {
|
|
938
|
-
return null;
|
|
939
|
-
}
|
|
940
|
-
return de_SavingsPlanOfferingRate(entry, context);
|
|
941
|
-
});
|
|
942
|
-
return retVal;
|
|
943
|
-
};
|
|
944
|
-
const de_SavingsPlanOfferingsList = (output, context) => {
|
|
945
|
-
const retVal = (output || [])
|
|
946
|
-
.filter((e) => e != null)
|
|
947
|
-
.map((entry) => {
|
|
948
|
-
if (entry === null) {
|
|
949
|
-
return null;
|
|
950
|
-
}
|
|
951
|
-
return de_SavingsPlanOffering(entry, context);
|
|
952
|
-
});
|
|
953
|
-
return retVal;
|
|
954
|
-
};
|
|
955
|
-
const de_SavingsPlanProductTypeList = (output, context) => {
|
|
956
|
-
const retVal = (output || [])
|
|
957
|
-
.filter((e) => e != null)
|
|
958
|
-
.map((entry) => {
|
|
959
|
-
if (entry === null) {
|
|
960
|
-
return null;
|
|
961
|
-
}
|
|
962
|
-
return __expectString(entry);
|
|
963
|
-
});
|
|
964
|
-
return retVal;
|
|
965
|
-
};
|
|
966
|
-
const de_SavingsPlanRate = (output, context) => {
|
|
967
|
-
return {
|
|
968
|
-
currency: __expectString(output.currency),
|
|
969
|
-
operation: __expectString(output.operation),
|
|
970
|
-
productType: __expectString(output.productType),
|
|
971
|
-
properties: output.properties != null ? de_SavingsPlanRatePropertyList(output.properties, context) : undefined,
|
|
972
|
-
rate: __expectString(output.rate),
|
|
973
|
-
serviceCode: __expectString(output.serviceCode),
|
|
974
|
-
unit: __expectString(output.unit),
|
|
975
|
-
usageType: __expectString(output.usageType),
|
|
976
|
-
};
|
|
977
|
-
};
|
|
978
|
-
const de_SavingsPlanRateList = (output, context) => {
|
|
979
|
-
const retVal = (output || [])
|
|
980
|
-
.filter((e) => e != null)
|
|
981
|
-
.map((entry) => {
|
|
982
|
-
if (entry === null) {
|
|
983
|
-
return null;
|
|
984
|
-
}
|
|
985
|
-
return de_SavingsPlanRate(entry, context);
|
|
986
|
-
});
|
|
987
|
-
return retVal;
|
|
988
|
-
};
|
|
989
|
-
const de_SavingsPlanRateProperty = (output, context) => {
|
|
990
|
-
return {
|
|
991
|
-
name: __expectString(output.name),
|
|
992
|
-
value: __expectString(output.value),
|
|
993
|
-
};
|
|
994
|
-
};
|
|
995
|
-
const de_SavingsPlanRatePropertyList = (output, context) => {
|
|
996
|
-
const retVal = (output || [])
|
|
997
|
-
.filter((e) => e != null)
|
|
998
|
-
.map((entry) => {
|
|
999
|
-
if (entry === null) {
|
|
1000
|
-
return null;
|
|
1001
|
-
}
|
|
1002
|
-
return de_SavingsPlanRateProperty(entry, context);
|
|
1003
|
-
});
|
|
1004
|
-
return retVal;
|
|
1005
|
-
};
|
|
1006
|
-
const de_TagMap = (output, context) => {
|
|
1007
|
-
return Object.entries(output).reduce((acc, [key, value]) => {
|
|
1008
|
-
if (value === null) {
|
|
1009
|
-
return acc;
|
|
1010
|
-
}
|
|
1011
|
-
acc[key] = __expectString(value);
|
|
1012
|
-
return acc;
|
|
1013
|
-
}, {});
|
|
1014
|
-
};
|
|
1015
616
|
const deserializeMetadata = (output) => ({
|
|
1016
617
|
httpStatusCode: output.statusCode,
|
|
1017
618
|
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
|