@aws-sdk/client-savingsplans 3.927.0 → 3.929.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.
Files changed (31) hide show
  1. package/dist-cjs/index.js +489 -475
  2. package/dist-cjs/runtimeConfig.shared.js +2 -0
  3. package/dist-es/SavingsplansClient.js +2 -0
  4. package/dist-es/commands/CreateSavingsPlanCommand.js +3 -9
  5. package/dist-es/commands/DeleteQueuedSavingsPlanCommand.js +3 -9
  6. package/dist-es/commands/DescribeSavingsPlanRatesCommand.js +3 -9
  7. package/dist-es/commands/DescribeSavingsPlansCommand.js +3 -9
  8. package/dist-es/commands/DescribeSavingsPlansOfferingRatesCommand.js +3 -9
  9. package/dist-es/commands/DescribeSavingsPlansOfferingsCommand.js +3 -9
  10. package/dist-es/commands/ListTagsForResourceCommand.js +3 -9
  11. package/dist-es/commands/ReturnSavingsPlanCommand.js +3 -9
  12. package/dist-es/commands/TagResourceCommand.js +3 -9
  13. package/dist-es/commands/UntagResourceCommand.js +3 -9
  14. package/dist-es/runtimeConfig.shared.js +2 -0
  15. package/dist-es/schemas/schemas_0.js +476 -0
  16. package/dist-types/SavingsplansClient.d.ts +10 -1
  17. package/dist-types/runtimeConfig.browser.d.ts +1 -0
  18. package/dist-types/runtimeConfig.d.ts +1 -0
  19. package/dist-types/runtimeConfig.native.d.ts +1 -0
  20. package/dist-types/runtimeConfig.shared.d.ts +1 -0
  21. package/dist-types/schemas/schemas_0.d.ts +80 -0
  22. package/dist-types/ts3.4/SavingsplansClient.d.ts +4 -0
  23. package/dist-types/ts3.4/runtimeConfig.browser.d.ts +4 -0
  24. package/dist-types/ts3.4/runtimeConfig.d.ts +4 -0
  25. package/dist-types/ts3.4/runtimeConfig.native.d.ts +4 -0
  26. package/dist-types/ts3.4/runtimeConfig.shared.d.ts +4 -0
  27. package/dist-types/ts3.4/schemas/schemas_0.d.ts +85 -0
  28. package/package.json +5 -6
  29. package/dist-es/protocols/Aws_restJson1.js +0 -394
  30. package/dist-types/protocols/Aws_restJson1.d.ts +0 -92
  31. package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +0 -125
@@ -14,6 +14,10 @@ export declare const getRuntimeConfig: (config: SavingsplansClientConfig) => {
14
14
  httpAuthSchemeProvider: import("./auth/httpAuthSchemeProvider").SavingsplansHttpAuthSchemeProvider;
15
15
  httpAuthSchemes: import("@smithy/types").HttpAuthScheme[];
16
16
  logger: import("@smithy/types").Logger;
17
+ protocol: import("@smithy/types").ClientProtocol<
18
+ import("@smithy/types").HttpRequest,
19
+ import("@smithy/types").HttpResponse
20
+ >;
17
21
  serviceId: string;
18
22
  urlParser: import("@smithy/types").UrlParser;
19
23
  utf8Decoder: import("@smithy/types").Decoder;
@@ -0,0 +1,85 @@
1
+ import {
2
+ StaticErrorSchema,
3
+ StaticListSchema,
4
+ StaticOperationSchema,
5
+ StaticStructureSchema,
6
+ } from "@smithy/types";
7
+ export declare var CreateSavingsPlanRequest: StaticStructureSchema;
8
+ export declare var CreateSavingsPlanResponse: StaticStructureSchema;
9
+ export declare var DeleteQueuedSavingsPlanRequest: StaticStructureSchema;
10
+ export declare var DeleteQueuedSavingsPlanResponse: StaticStructureSchema;
11
+ export declare var DescribeSavingsPlanRatesRequest: StaticStructureSchema;
12
+ export declare var DescribeSavingsPlanRatesResponse: StaticStructureSchema;
13
+ export declare var DescribeSavingsPlansOfferingRatesRequest: StaticStructureSchema;
14
+ export declare var DescribeSavingsPlansOfferingRatesResponse: StaticStructureSchema;
15
+ export declare var DescribeSavingsPlansOfferingsRequest: StaticStructureSchema;
16
+ export declare var DescribeSavingsPlansOfferingsResponse: StaticStructureSchema;
17
+ export declare var DescribeSavingsPlansRequest: StaticStructureSchema;
18
+ export declare var DescribeSavingsPlansResponse: StaticStructureSchema;
19
+ export declare var InternalServerException: StaticErrorSchema;
20
+ export declare var ListTagsForResourceRequest: StaticStructureSchema;
21
+ export declare var ListTagsForResourceResponse: StaticStructureSchema;
22
+ export declare var ParentSavingsPlanOffering: StaticStructureSchema;
23
+ export declare var ResourceNotFoundException: StaticErrorSchema;
24
+ export declare var ReturnSavingsPlanRequest: StaticStructureSchema;
25
+ export declare var ReturnSavingsPlanResponse: StaticStructureSchema;
26
+ export declare var SavingsPlan: StaticStructureSchema;
27
+ export declare var SavingsPlanFilter: StaticStructureSchema;
28
+ export declare var SavingsPlanOffering: StaticStructureSchema;
29
+ export declare var SavingsPlanOfferingFilterElement: StaticStructureSchema;
30
+ export declare var SavingsPlanOfferingProperty: StaticStructureSchema;
31
+ export declare var SavingsPlanOfferingRate: StaticStructureSchema;
32
+ export declare var SavingsPlanOfferingRateFilterElement: StaticStructureSchema;
33
+ export declare var SavingsPlanOfferingRateProperty: StaticStructureSchema;
34
+ export declare var SavingsPlanRate: StaticStructureSchema;
35
+ export declare var SavingsPlanRateFilter: StaticStructureSchema;
36
+ export declare var SavingsPlanRateProperty: StaticStructureSchema;
37
+ export declare var ServiceQuotaExceededException: StaticErrorSchema;
38
+ export declare var TagResourceRequest: StaticStructureSchema;
39
+ export declare var TagResourceResponse: StaticStructureSchema;
40
+ export declare var UntagResourceRequest: StaticStructureSchema;
41
+ export declare var UntagResourceResponse: StaticStructureSchema;
42
+ export declare var ValidationException: StaticErrorSchema;
43
+ export declare var __Unit: "unit";
44
+ export declare var SavingsplansServiceException: StaticErrorSchema;
45
+ export declare var CurrencyList: number;
46
+ export declare var DurationsList: number;
47
+ export declare var FilterValuesList: number;
48
+ export declare var ListOfStrings: number;
49
+ export declare var SavingsPlanArnList: number;
50
+ export declare var SavingsPlanDescriptionsList: number;
51
+ export declare var SavingsPlanFilterList: StaticListSchema;
52
+ export declare var SavingsPlanIdList: number;
53
+ export declare var SavingsPlanList: StaticListSchema;
54
+ export declare var SavingsPlanOfferingFiltersList: StaticListSchema;
55
+ export declare var SavingsPlanOfferingPropertyList: StaticListSchema;
56
+ export declare var SavingsPlanOfferingRateFiltersList: StaticListSchema;
57
+ export declare var SavingsPlanOfferingRatePropertyList: StaticListSchema;
58
+ export declare var SavingsPlanOfferingRatesList: StaticListSchema;
59
+ export declare var SavingsPlanOfferingsList: StaticListSchema;
60
+ export declare var SavingsPlanOperationList: number;
61
+ export declare var SavingsPlanPaymentOptionList: number;
62
+ export declare var SavingsPlanProductTypeList: number;
63
+ export declare var SavingsPlanRateFilterList: StaticListSchema;
64
+ export declare var SavingsPlanRateList: StaticListSchema;
65
+ export declare var SavingsPlanRateOperationList: number;
66
+ export declare var SavingsPlanRatePropertyList: StaticListSchema;
67
+ export declare var SavingsPlanRateServiceCodeList: number;
68
+ export declare var SavingsPlanRateUsageTypeList: number;
69
+ export declare var SavingsPlanServiceCodeList: number;
70
+ export declare var SavingsPlanStateList: number;
71
+ export declare var SavingsPlanTypeList: number;
72
+ export declare var SavingsPlanUsageTypeList: number;
73
+ export declare var TagKeyList: number;
74
+ export declare var UUIDs: number;
75
+ export declare var TagMap: number;
76
+ export declare var CreateSavingsPlan: StaticOperationSchema;
77
+ export declare var DeleteQueuedSavingsPlan: StaticOperationSchema;
78
+ export declare var DescribeSavingsPlanRates: StaticOperationSchema;
79
+ export declare var DescribeSavingsPlans: StaticOperationSchema;
80
+ export declare var DescribeSavingsPlansOfferingRates: StaticOperationSchema;
81
+ export declare var DescribeSavingsPlansOfferings: StaticOperationSchema;
82
+ export declare var ListTagsForResource: StaticOperationSchema;
83
+ export declare var ReturnSavingsPlan: StaticOperationSchema;
84
+ export declare var TagResource: StaticOperationSchema;
85
+ export declare var UntagResource: StaticOperationSchema;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@aws-sdk/client-savingsplans",
3
3
  "description": "AWS SDK for JavaScript Savingsplans Client for Node.js, Browser and React Native",
4
- "version": "3.927.0",
4
+ "version": "3.929.0",
5
5
  "scripts": {
6
6
  "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
7
7
  "build:cjs": "node ../../scripts/compilation/inline client-savingsplans",
@@ -20,17 +20,17 @@
20
20
  "dependencies": {
21
21
  "@aws-crypto/sha256-browser": "5.2.0",
22
22
  "@aws-crypto/sha256-js": "5.2.0",
23
- "@aws-sdk/core": "3.927.0",
24
- "@aws-sdk/credential-provider-node": "3.927.0",
23
+ "@aws-sdk/core": "3.928.0",
24
+ "@aws-sdk/credential-provider-node": "3.929.0",
25
25
  "@aws-sdk/middleware-host-header": "3.922.0",
26
26
  "@aws-sdk/middleware-logger": "3.922.0",
27
27
  "@aws-sdk/middleware-recursion-detection": "3.922.0",
28
- "@aws-sdk/middleware-user-agent": "3.927.0",
28
+ "@aws-sdk/middleware-user-agent": "3.928.0",
29
29
  "@aws-sdk/region-config-resolver": "3.925.0",
30
30
  "@aws-sdk/types": "3.922.0",
31
31
  "@aws-sdk/util-endpoints": "3.922.0",
32
32
  "@aws-sdk/util-user-agent-browser": "3.922.0",
33
- "@aws-sdk/util-user-agent-node": "3.927.0",
33
+ "@aws-sdk/util-user-agent-node": "3.928.0",
34
34
  "@smithy/config-resolver": "^4.4.2",
35
35
  "@smithy/core": "^3.17.2",
36
36
  "@smithy/fetch-http-handler": "^5.3.5",
@@ -56,7 +56,6 @@
56
56
  "@smithy/util-middleware": "^4.2.4",
57
57
  "@smithy/util-retry": "^4.2.4",
58
58
  "@smithy/util-utf8": "^4.2.0",
59
- "@smithy/uuid": "^1.1.0",
60
59
  "tslib": "^2.6.2"
61
60
  },
62
61
  "devDependencies": {
@@ -1,394 +0,0 @@
1
- import { loadRestJsonErrorCode, parseJsonBody as parseBody, parseJsonErrorBody as parseErrorBody } from "@aws-sdk/core";
2
- import { requestBuilder as rb } from "@smithy/core";
3
- import { _json, collectBody, decorateServiceException as __decorateServiceException, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, map, take, withBaseException, } from "@smithy/smithy-client";
4
- import { v4 as generateIdempotencyToken } from "@smithy/uuid";
5
- import { InternalServerException, ResourceNotFoundException, ServiceQuotaExceededException, ValidationException, } from "../models/models_0";
6
- import { SavingsplansServiceException as __BaseException } from "../models/SavingsplansServiceException";
7
- export const se_CreateSavingsPlanCommand = async (input, context) => {
8
- const b = rb(input, context);
9
- const headers = {
10
- "content-type": "application/json",
11
- };
12
- b.bp("/CreateSavingsPlan");
13
- let body;
14
- body = JSON.stringify(take(input, {
15
- clientToken: [true, (_) => _ ?? generateIdempotencyToken()],
16
- commitment: [],
17
- purchaseTime: (_) => _.getTime() / 1_000,
18
- savingsPlanOfferingId: [],
19
- tags: (_) => _json(_),
20
- upfrontPaymentAmount: [],
21
- }));
22
- b.m("POST").h(headers).b(body);
23
- return b.build();
24
- };
25
- export const se_DeleteQueuedSavingsPlanCommand = async (input, context) => {
26
- const b = rb(input, context);
27
- const headers = {
28
- "content-type": "application/json",
29
- };
30
- b.bp("/DeleteQueuedSavingsPlan");
31
- let body;
32
- body = JSON.stringify(take(input, {
33
- savingsPlanId: [],
34
- }));
35
- b.m("POST").h(headers).b(body);
36
- return b.build();
37
- };
38
- export const se_DescribeSavingsPlanRatesCommand = async (input, context) => {
39
- const b = rb(input, context);
40
- const headers = {
41
- "content-type": "application/json",
42
- };
43
- b.bp("/DescribeSavingsPlanRates");
44
- let body;
45
- body = JSON.stringify(take(input, {
46
- filters: (_) => _json(_),
47
- maxResults: [],
48
- nextToken: [],
49
- savingsPlanId: [],
50
- }));
51
- b.m("POST").h(headers).b(body);
52
- return b.build();
53
- };
54
- export const se_DescribeSavingsPlansCommand = async (input, context) => {
55
- const b = rb(input, context);
56
- const headers = {
57
- "content-type": "application/json",
58
- };
59
- b.bp("/DescribeSavingsPlans");
60
- let body;
61
- body = JSON.stringify(take(input, {
62
- filters: (_) => _json(_),
63
- maxResults: [],
64
- nextToken: [],
65
- savingsPlanArns: (_) => _json(_),
66
- savingsPlanIds: (_) => _json(_),
67
- states: (_) => _json(_),
68
- }));
69
- b.m("POST").h(headers).b(body);
70
- return b.build();
71
- };
72
- export const se_DescribeSavingsPlansOfferingRatesCommand = async (input, context) => {
73
- const b = rb(input, context);
74
- const headers = {
75
- "content-type": "application/json",
76
- };
77
- b.bp("/DescribeSavingsPlansOfferingRates");
78
- let body;
79
- body = JSON.stringify(take(input, {
80
- filters: (_) => _json(_),
81
- maxResults: [],
82
- nextToken: [],
83
- operations: (_) => _json(_),
84
- products: (_) => _json(_),
85
- savingsPlanOfferingIds: (_) => _json(_),
86
- savingsPlanPaymentOptions: (_) => _json(_),
87
- savingsPlanTypes: (_) => _json(_),
88
- serviceCodes: (_) => _json(_),
89
- usageTypes: (_) => _json(_),
90
- }));
91
- b.m("POST").h(headers).b(body);
92
- return b.build();
93
- };
94
- export const se_DescribeSavingsPlansOfferingsCommand = async (input, context) => {
95
- const b = rb(input, context);
96
- const headers = {
97
- "content-type": "application/json",
98
- };
99
- b.bp("/DescribeSavingsPlansOfferings");
100
- let body;
101
- body = JSON.stringify(take(input, {
102
- currencies: (_) => _json(_),
103
- descriptions: (_) => _json(_),
104
- durations: (_) => _json(_),
105
- filters: (_) => _json(_),
106
- maxResults: [],
107
- nextToken: [],
108
- offeringIds: (_) => _json(_),
109
- operations: (_) => _json(_),
110
- paymentOptions: (_) => _json(_),
111
- planTypes: (_) => _json(_),
112
- productType: [],
113
- serviceCodes: (_) => _json(_),
114
- usageTypes: (_) => _json(_),
115
- }));
116
- b.m("POST").h(headers).b(body);
117
- return b.build();
118
- };
119
- export const se_ListTagsForResourceCommand = async (input, context) => {
120
- const b = rb(input, context);
121
- const headers = {
122
- "content-type": "application/json",
123
- };
124
- b.bp("/ListTagsForResource");
125
- let body;
126
- body = JSON.stringify(take(input, {
127
- resourceArn: [],
128
- }));
129
- b.m("POST").h(headers).b(body);
130
- return b.build();
131
- };
132
- export const se_ReturnSavingsPlanCommand = async (input, context) => {
133
- const b = rb(input, context);
134
- const headers = {
135
- "content-type": "application/json",
136
- };
137
- b.bp("/ReturnSavingsPlan");
138
- let body;
139
- body = JSON.stringify(take(input, {
140
- clientToken: [true, (_) => _ ?? generateIdempotencyToken()],
141
- savingsPlanId: [],
142
- }));
143
- b.m("POST").h(headers).b(body);
144
- return b.build();
145
- };
146
- export const se_TagResourceCommand = async (input, context) => {
147
- const b = rb(input, context);
148
- const headers = {
149
- "content-type": "application/json",
150
- };
151
- b.bp("/TagResource");
152
- let body;
153
- body = JSON.stringify(take(input, {
154
- resourceArn: [],
155
- tags: (_) => _json(_),
156
- }));
157
- b.m("POST").h(headers).b(body);
158
- return b.build();
159
- };
160
- export const se_UntagResourceCommand = async (input, context) => {
161
- const b = rb(input, context);
162
- const headers = {
163
- "content-type": "application/json",
164
- };
165
- b.bp("/UntagResource");
166
- let body;
167
- body = JSON.stringify(take(input, {
168
- resourceArn: [],
169
- tagKeys: (_) => _json(_),
170
- }));
171
- b.m("POST").h(headers).b(body);
172
- return b.build();
173
- };
174
- export const de_CreateSavingsPlanCommand = async (output, context) => {
175
- if (output.statusCode !== 200 && output.statusCode >= 300) {
176
- return de_CommandError(output, context);
177
- }
178
- const contents = map({
179
- $metadata: deserializeMetadata(output),
180
- });
181
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
182
- const doc = take(data, {
183
- savingsPlanId: __expectString,
184
- });
185
- Object.assign(contents, doc);
186
- return contents;
187
- };
188
- export const de_DeleteQueuedSavingsPlanCommand = async (output, context) => {
189
- if (output.statusCode !== 200 && output.statusCode >= 300) {
190
- return de_CommandError(output, context);
191
- }
192
- const contents = map({
193
- $metadata: deserializeMetadata(output),
194
- });
195
- await collectBody(output.body, context);
196
- return contents;
197
- };
198
- export const de_DescribeSavingsPlanRatesCommand = async (output, context) => {
199
- if (output.statusCode !== 200 && output.statusCode >= 300) {
200
- return de_CommandError(output, context);
201
- }
202
- const contents = map({
203
- $metadata: deserializeMetadata(output),
204
- });
205
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
206
- const doc = take(data, {
207
- nextToken: __expectString,
208
- savingsPlanId: __expectString,
209
- searchResults: _json,
210
- });
211
- Object.assign(contents, doc);
212
- return contents;
213
- };
214
- export const de_DescribeSavingsPlansCommand = async (output, context) => {
215
- if (output.statusCode !== 200 && output.statusCode >= 300) {
216
- return de_CommandError(output, context);
217
- }
218
- const contents = map({
219
- $metadata: deserializeMetadata(output),
220
- });
221
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
222
- const doc = take(data, {
223
- nextToken: __expectString,
224
- savingsPlans: _json,
225
- });
226
- Object.assign(contents, doc);
227
- return contents;
228
- };
229
- export const de_DescribeSavingsPlansOfferingRatesCommand = async (output, context) => {
230
- if (output.statusCode !== 200 && output.statusCode >= 300) {
231
- return de_CommandError(output, context);
232
- }
233
- const contents = map({
234
- $metadata: deserializeMetadata(output),
235
- });
236
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
237
- const doc = take(data, {
238
- nextToken: __expectString,
239
- searchResults: _json,
240
- });
241
- Object.assign(contents, doc);
242
- return contents;
243
- };
244
- export const de_DescribeSavingsPlansOfferingsCommand = async (output, context) => {
245
- if (output.statusCode !== 200 && output.statusCode >= 300) {
246
- return de_CommandError(output, context);
247
- }
248
- const contents = map({
249
- $metadata: deserializeMetadata(output),
250
- });
251
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
252
- const doc = take(data, {
253
- nextToken: __expectString,
254
- searchResults: _json,
255
- });
256
- Object.assign(contents, doc);
257
- return contents;
258
- };
259
- export const de_ListTagsForResourceCommand = async (output, context) => {
260
- if (output.statusCode !== 200 && output.statusCode >= 300) {
261
- return de_CommandError(output, context);
262
- }
263
- const contents = map({
264
- $metadata: deserializeMetadata(output),
265
- });
266
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
267
- const doc = take(data, {
268
- tags: _json,
269
- });
270
- Object.assign(contents, doc);
271
- return contents;
272
- };
273
- export const de_ReturnSavingsPlanCommand = async (output, context) => {
274
- if (output.statusCode !== 200 && output.statusCode >= 300) {
275
- return de_CommandError(output, context);
276
- }
277
- const contents = map({
278
- $metadata: deserializeMetadata(output),
279
- });
280
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
281
- const doc = take(data, {
282
- savingsPlanId: __expectString,
283
- });
284
- Object.assign(contents, doc);
285
- return contents;
286
- };
287
- export const de_TagResourceCommand = async (output, context) => {
288
- if (output.statusCode !== 200 && output.statusCode >= 300) {
289
- return de_CommandError(output, context);
290
- }
291
- const contents = map({
292
- $metadata: deserializeMetadata(output),
293
- });
294
- await collectBody(output.body, context);
295
- return contents;
296
- };
297
- export const de_UntagResourceCommand = async (output, context) => {
298
- if (output.statusCode !== 200 && output.statusCode >= 300) {
299
- return de_CommandError(output, context);
300
- }
301
- const contents = map({
302
- $metadata: deserializeMetadata(output),
303
- });
304
- await collectBody(output.body, context);
305
- return contents;
306
- };
307
- const de_CommandError = async (output, context) => {
308
- const parsedOutput = {
309
- ...output,
310
- body: await parseErrorBody(output.body, context),
311
- };
312
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
313
- switch (errorCode) {
314
- case "InternalServerException":
315
- case "com.amazonaws.savingsplans#InternalServerException":
316
- throw await de_InternalServerExceptionRes(parsedOutput, context);
317
- case "ResourceNotFoundException":
318
- case "com.amazonaws.savingsplans#ResourceNotFoundException":
319
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
320
- case "ServiceQuotaExceededException":
321
- case "com.amazonaws.savingsplans#ServiceQuotaExceededException":
322
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
323
- case "ValidationException":
324
- case "com.amazonaws.savingsplans#ValidationException":
325
- throw await de_ValidationExceptionRes(parsedOutput, context);
326
- default:
327
- const parsedBody = parsedOutput.body;
328
- return throwDefaultError({
329
- output,
330
- parsedBody,
331
- errorCode,
332
- });
333
- }
334
- };
335
- const throwDefaultError = withBaseException(__BaseException);
336
- const de_InternalServerExceptionRes = async (parsedOutput, context) => {
337
- const contents = map({});
338
- const data = parsedOutput.body;
339
- const doc = take(data, {
340
- message: __expectString,
341
- });
342
- Object.assign(contents, doc);
343
- const exception = new InternalServerException({
344
- $metadata: deserializeMetadata(parsedOutput),
345
- ...contents,
346
- });
347
- return __decorateServiceException(exception, parsedOutput.body);
348
- };
349
- const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
350
- const contents = map({});
351
- const data = parsedOutput.body;
352
- const doc = take(data, {
353
- message: __expectString,
354
- });
355
- Object.assign(contents, doc);
356
- const exception = new ResourceNotFoundException({
357
- $metadata: deserializeMetadata(parsedOutput),
358
- ...contents,
359
- });
360
- return __decorateServiceException(exception, parsedOutput.body);
361
- };
362
- const de_ServiceQuotaExceededExceptionRes = async (parsedOutput, context) => {
363
- const contents = map({});
364
- const data = parsedOutput.body;
365
- const doc = take(data, {
366
- message: __expectString,
367
- });
368
- Object.assign(contents, doc);
369
- const exception = new ServiceQuotaExceededException({
370
- $metadata: deserializeMetadata(parsedOutput),
371
- ...contents,
372
- });
373
- return __decorateServiceException(exception, parsedOutput.body);
374
- };
375
- const de_ValidationExceptionRes = async (parsedOutput, context) => {
376
- const contents = map({});
377
- const data = parsedOutput.body;
378
- const doc = take(data, {
379
- message: __expectString,
380
- });
381
- Object.assign(contents, doc);
382
- const exception = new ValidationException({
383
- $metadata: deserializeMetadata(parsedOutput),
384
- ...contents,
385
- });
386
- return __decorateServiceException(exception, parsedOutput.body);
387
- };
388
- const deserializeMetadata = (output) => ({
389
- httpStatusCode: output.statusCode,
390
- requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
391
- extendedRequestId: output.headers["x-amz-id-2"],
392
- cfId: output.headers["x-amz-cf-id"],
393
- });
394
- const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
@@ -1,92 +0,0 @@
1
- import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http";
2
- import { SerdeContext as __SerdeContext } from "@smithy/types";
3
- import { CreateSavingsPlanCommandInput, CreateSavingsPlanCommandOutput } from "../commands/CreateSavingsPlanCommand";
4
- import { DeleteQueuedSavingsPlanCommandInput, DeleteQueuedSavingsPlanCommandOutput } from "../commands/DeleteQueuedSavingsPlanCommand";
5
- import { DescribeSavingsPlanRatesCommandInput, DescribeSavingsPlanRatesCommandOutput } from "../commands/DescribeSavingsPlanRatesCommand";
6
- import { DescribeSavingsPlansCommandInput, DescribeSavingsPlansCommandOutput } from "../commands/DescribeSavingsPlansCommand";
7
- import { DescribeSavingsPlansOfferingRatesCommandInput, DescribeSavingsPlansOfferingRatesCommandOutput } from "../commands/DescribeSavingsPlansOfferingRatesCommand";
8
- import { DescribeSavingsPlansOfferingsCommandInput, DescribeSavingsPlansOfferingsCommandOutput } from "../commands/DescribeSavingsPlansOfferingsCommand";
9
- import { ListTagsForResourceCommandInput, ListTagsForResourceCommandOutput } from "../commands/ListTagsForResourceCommand";
10
- import { ReturnSavingsPlanCommandInput, ReturnSavingsPlanCommandOutput } from "../commands/ReturnSavingsPlanCommand";
11
- import { TagResourceCommandInput, TagResourceCommandOutput } from "../commands/TagResourceCommand";
12
- import { UntagResourceCommandInput, UntagResourceCommandOutput } from "../commands/UntagResourceCommand";
13
- /**
14
- * serializeAws_restJson1CreateSavingsPlanCommand
15
- */
16
- export declare const se_CreateSavingsPlanCommand: (input: CreateSavingsPlanCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
17
- /**
18
- * serializeAws_restJson1DeleteQueuedSavingsPlanCommand
19
- */
20
- export declare const se_DeleteQueuedSavingsPlanCommand: (input: DeleteQueuedSavingsPlanCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
21
- /**
22
- * serializeAws_restJson1DescribeSavingsPlanRatesCommand
23
- */
24
- export declare const se_DescribeSavingsPlanRatesCommand: (input: DescribeSavingsPlanRatesCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
25
- /**
26
- * serializeAws_restJson1DescribeSavingsPlansCommand
27
- */
28
- export declare const se_DescribeSavingsPlansCommand: (input: DescribeSavingsPlansCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
29
- /**
30
- * serializeAws_restJson1DescribeSavingsPlansOfferingRatesCommand
31
- */
32
- export declare const se_DescribeSavingsPlansOfferingRatesCommand: (input: DescribeSavingsPlansOfferingRatesCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
33
- /**
34
- * serializeAws_restJson1DescribeSavingsPlansOfferingsCommand
35
- */
36
- export declare const se_DescribeSavingsPlansOfferingsCommand: (input: DescribeSavingsPlansOfferingsCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
37
- /**
38
- * serializeAws_restJson1ListTagsForResourceCommand
39
- */
40
- export declare const se_ListTagsForResourceCommand: (input: ListTagsForResourceCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
41
- /**
42
- * serializeAws_restJson1ReturnSavingsPlanCommand
43
- */
44
- export declare const se_ReturnSavingsPlanCommand: (input: ReturnSavingsPlanCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
45
- /**
46
- * serializeAws_restJson1TagResourceCommand
47
- */
48
- export declare const se_TagResourceCommand: (input: TagResourceCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
49
- /**
50
- * serializeAws_restJson1UntagResourceCommand
51
- */
52
- export declare const se_UntagResourceCommand: (input: UntagResourceCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
53
- /**
54
- * deserializeAws_restJson1CreateSavingsPlanCommand
55
- */
56
- export declare const de_CreateSavingsPlanCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<CreateSavingsPlanCommandOutput>;
57
- /**
58
- * deserializeAws_restJson1DeleteQueuedSavingsPlanCommand
59
- */
60
- export declare const de_DeleteQueuedSavingsPlanCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<DeleteQueuedSavingsPlanCommandOutput>;
61
- /**
62
- * deserializeAws_restJson1DescribeSavingsPlanRatesCommand
63
- */
64
- export declare const de_DescribeSavingsPlanRatesCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<DescribeSavingsPlanRatesCommandOutput>;
65
- /**
66
- * deserializeAws_restJson1DescribeSavingsPlansCommand
67
- */
68
- export declare const de_DescribeSavingsPlansCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<DescribeSavingsPlansCommandOutput>;
69
- /**
70
- * deserializeAws_restJson1DescribeSavingsPlansOfferingRatesCommand
71
- */
72
- export declare const de_DescribeSavingsPlansOfferingRatesCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<DescribeSavingsPlansOfferingRatesCommandOutput>;
73
- /**
74
- * deserializeAws_restJson1DescribeSavingsPlansOfferingsCommand
75
- */
76
- export declare const de_DescribeSavingsPlansOfferingsCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<DescribeSavingsPlansOfferingsCommandOutput>;
77
- /**
78
- * deserializeAws_restJson1ListTagsForResourceCommand
79
- */
80
- export declare const de_ListTagsForResourceCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<ListTagsForResourceCommandOutput>;
81
- /**
82
- * deserializeAws_restJson1ReturnSavingsPlanCommand
83
- */
84
- export declare const de_ReturnSavingsPlanCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<ReturnSavingsPlanCommandOutput>;
85
- /**
86
- * deserializeAws_restJson1TagResourceCommand
87
- */
88
- export declare const de_TagResourceCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<TagResourceCommandOutput>;
89
- /**
90
- * deserializeAws_restJson1UntagResourceCommand
91
- */
92
- export declare const de_UntagResourceCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<UntagResourceCommandOutput>;