@aws-sdk/client-cost-explorer 3.926.0 → 3.928.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (67) hide show
  1. package/dist-cjs/index.js +2554 -2100
  2. package/dist-cjs/runtimeConfig.shared.js +7 -0
  3. package/dist-es/CostExplorerClient.js +2 -0
  4. package/dist-es/commands/CreateAnomalyMonitorCommand.js +3 -9
  5. package/dist-es/commands/CreateAnomalySubscriptionCommand.js +3 -9
  6. package/dist-es/commands/CreateCostCategoryDefinitionCommand.js +3 -9
  7. package/dist-es/commands/DeleteAnomalyMonitorCommand.js +3 -9
  8. package/dist-es/commands/DeleteAnomalySubscriptionCommand.js +3 -9
  9. package/dist-es/commands/DeleteCostCategoryDefinitionCommand.js +3 -9
  10. package/dist-es/commands/DescribeCostCategoryDefinitionCommand.js +3 -9
  11. package/dist-es/commands/GetAnomaliesCommand.js +3 -9
  12. package/dist-es/commands/GetAnomalyMonitorsCommand.js +3 -9
  13. package/dist-es/commands/GetAnomalySubscriptionsCommand.js +3 -9
  14. package/dist-es/commands/GetApproximateUsageRecordsCommand.js +3 -9
  15. package/dist-es/commands/GetCommitmentPurchaseAnalysisCommand.js +3 -9
  16. package/dist-es/commands/GetCostAndUsageCommand.js +3 -9
  17. package/dist-es/commands/GetCostAndUsageComparisonsCommand.js +3 -9
  18. package/dist-es/commands/GetCostAndUsageWithResourcesCommand.js +3 -9
  19. package/dist-es/commands/GetCostCategoriesCommand.js +3 -9
  20. package/dist-es/commands/GetCostComparisonDriversCommand.js +3 -9
  21. package/dist-es/commands/GetCostForecastCommand.js +3 -9
  22. package/dist-es/commands/GetDimensionValuesCommand.js +3 -9
  23. package/dist-es/commands/GetReservationCoverageCommand.js +3 -9
  24. package/dist-es/commands/GetReservationPurchaseRecommendationCommand.js +3 -9
  25. package/dist-es/commands/GetReservationUtilizationCommand.js +3 -9
  26. package/dist-es/commands/GetRightsizingRecommendationCommand.js +3 -9
  27. package/dist-es/commands/GetSavingsPlanPurchaseRecommendationDetailsCommand.js +3 -9
  28. package/dist-es/commands/GetSavingsPlansCoverageCommand.js +3 -9
  29. package/dist-es/commands/GetSavingsPlansPurchaseRecommendationCommand.js +3 -9
  30. package/dist-es/commands/GetSavingsPlansUtilizationCommand.js +3 -9
  31. package/dist-es/commands/GetSavingsPlansUtilizationDetailsCommand.js +3 -9
  32. package/dist-es/commands/GetTagsCommand.js +3 -9
  33. package/dist-es/commands/GetUsageForecastCommand.js +3 -9
  34. package/dist-es/commands/ListCommitmentPurchaseAnalysesCommand.js +3 -9
  35. package/dist-es/commands/ListCostAllocationTagBackfillHistoryCommand.js +3 -9
  36. package/dist-es/commands/ListCostAllocationTagsCommand.js +3 -9
  37. package/dist-es/commands/ListCostCategoryDefinitionsCommand.js +3 -9
  38. package/dist-es/commands/ListSavingsPlansPurchaseRecommendationGenerationCommand.js +3 -9
  39. package/dist-es/commands/ListTagsForResourceCommand.js +3 -9
  40. package/dist-es/commands/ProvideAnomalyFeedbackCommand.js +3 -9
  41. package/dist-es/commands/StartCommitmentPurchaseAnalysisCommand.js +3 -9
  42. package/dist-es/commands/StartCostAllocationTagBackfillCommand.js +3 -9
  43. package/dist-es/commands/StartSavingsPlansPurchaseRecommendationGenerationCommand.js +3 -9
  44. package/dist-es/commands/TagResourceCommand.js +3 -9
  45. package/dist-es/commands/UntagResourceCommand.js +3 -9
  46. package/dist-es/commands/UpdateAnomalyMonitorCommand.js +3 -9
  47. package/dist-es/commands/UpdateAnomalySubscriptionCommand.js +3 -9
  48. package/dist-es/commands/UpdateCostAllocationTagsStatusCommand.js +3 -9
  49. package/dist-es/commands/UpdateCostCategoryDefinitionCommand.js +3 -9
  50. package/dist-es/runtimeConfig.shared.js +7 -0
  51. package/dist-es/schemas/schemas_0.js +2437 -0
  52. package/dist-types/CostExplorerClient.d.ts +10 -1
  53. package/dist-types/runtimeConfig.browser.d.ts +1 -0
  54. package/dist-types/runtimeConfig.d.ts +1 -0
  55. package/dist-types/runtimeConfig.native.d.ts +1 -0
  56. package/dist-types/runtimeConfig.shared.d.ts +1 -0
  57. package/dist-types/schemas/schemas_0.d.ts +320 -0
  58. package/dist-types/ts3.4/CostExplorerClient.d.ts +4 -0
  59. package/dist-types/ts3.4/runtimeConfig.browser.d.ts +4 -0
  60. package/dist-types/ts3.4/runtimeConfig.d.ts +4 -0
  61. package/dist-types/ts3.4/runtimeConfig.native.d.ts +4 -0
  62. package/dist-types/ts3.4/runtimeConfig.shared.d.ts +4 -0
  63. package/dist-types/ts3.4/schemas/schemas_0.d.ts +326 -0
  64. package/package.json +5 -5
  65. package/dist-es/protocols/Aws_json1_1.js +0 -1737
  66. package/dist-types/protocols/Aws_json1_1.d.ts +0 -416
  67. package/dist-types/ts3.4/protocols/Aws_json1_1.d.ts +0 -557
@@ -1,1737 +0,0 @@
1
- import { loadRestJsonErrorCode, parseJsonBody as parseBody, parseJsonErrorBody as parseErrorBody } from "@aws-sdk/core";
2
- import { HttpRequest as __HttpRequest } from "@smithy/protocol-http";
3
- import { _json, collectBody, decorateServiceException as __decorateServiceException, expectInt32 as __expectInt32, expectString as __expectString, limitedParseDouble as __limitedParseDouble, serializeFloat as __serializeFloat, take, withBaseException, } from "@smithy/smithy-client";
4
- import { CostExplorerServiceException as __BaseException } from "../models/CostExplorerServiceException";
5
- import { AnalysisNotFoundException, BackfillLimitExceededException, BillExpirationException, BillingViewHealthStatusException, DataUnavailableException, GenerationExistsException, InvalidNextTokenException, LimitExceededException, RequestChangedException, ResourceNotFoundException, ServiceQuotaExceededException, TooManyTagsException, UnknownMonitorException, UnknownSubscriptionException, UnresolvableUsageUnitException, } from "../models/models_0";
6
- export const se_CreateAnomalyMonitorCommand = async (input, context) => {
7
- const headers = sharedHeaders("CreateAnomalyMonitor");
8
- let body;
9
- body = JSON.stringify(se_CreateAnomalyMonitorRequest(input, context));
10
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
11
- };
12
- export const se_CreateAnomalySubscriptionCommand = async (input, context) => {
13
- const headers = sharedHeaders("CreateAnomalySubscription");
14
- let body;
15
- body = JSON.stringify(se_CreateAnomalySubscriptionRequest(input, context));
16
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
17
- };
18
- export const se_CreateCostCategoryDefinitionCommand = async (input, context) => {
19
- const headers = sharedHeaders("CreateCostCategoryDefinition");
20
- let body;
21
- body = JSON.stringify(se_CreateCostCategoryDefinitionRequest(input, context));
22
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
23
- };
24
- export const se_DeleteAnomalyMonitorCommand = async (input, context) => {
25
- const headers = sharedHeaders("DeleteAnomalyMonitor");
26
- let body;
27
- body = JSON.stringify(_json(input));
28
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
29
- };
30
- export const se_DeleteAnomalySubscriptionCommand = async (input, context) => {
31
- const headers = sharedHeaders("DeleteAnomalySubscription");
32
- let body;
33
- body = JSON.stringify(_json(input));
34
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
35
- };
36
- export const se_DeleteCostCategoryDefinitionCommand = async (input, context) => {
37
- const headers = sharedHeaders("DeleteCostCategoryDefinition");
38
- let body;
39
- body = JSON.stringify(_json(input));
40
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
41
- };
42
- export const se_DescribeCostCategoryDefinitionCommand = async (input, context) => {
43
- const headers = sharedHeaders("DescribeCostCategoryDefinition");
44
- let body;
45
- body = JSON.stringify(_json(input));
46
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
47
- };
48
- export const se_GetAnomaliesCommand = async (input, context) => {
49
- const headers = sharedHeaders("GetAnomalies");
50
- let body;
51
- body = JSON.stringify(se_GetAnomaliesRequest(input, context));
52
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
53
- };
54
- export const se_GetAnomalyMonitorsCommand = async (input, context) => {
55
- const headers = sharedHeaders("GetAnomalyMonitors");
56
- let body;
57
- body = JSON.stringify(_json(input));
58
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
59
- };
60
- export const se_GetAnomalySubscriptionsCommand = async (input, context) => {
61
- const headers = sharedHeaders("GetAnomalySubscriptions");
62
- let body;
63
- body = JSON.stringify(_json(input));
64
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
65
- };
66
- export const se_GetApproximateUsageRecordsCommand = async (input, context) => {
67
- const headers = sharedHeaders("GetApproximateUsageRecords");
68
- let body;
69
- body = JSON.stringify(_json(input));
70
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
71
- };
72
- export const se_GetCommitmentPurchaseAnalysisCommand = async (input, context) => {
73
- const headers = sharedHeaders("GetCommitmentPurchaseAnalysis");
74
- let body;
75
- body = JSON.stringify(_json(input));
76
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
77
- };
78
- export const se_GetCostAndUsageCommand = async (input, context) => {
79
- const headers = sharedHeaders("GetCostAndUsage");
80
- let body;
81
- body = JSON.stringify(se_GetCostAndUsageRequest(input, context));
82
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
83
- };
84
- export const se_GetCostAndUsageComparisonsCommand = async (input, context) => {
85
- const headers = sharedHeaders("GetCostAndUsageComparisons");
86
- let body;
87
- body = JSON.stringify(se_GetCostAndUsageComparisonsRequest(input, context));
88
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
89
- };
90
- export const se_GetCostAndUsageWithResourcesCommand = async (input, context) => {
91
- const headers = sharedHeaders("GetCostAndUsageWithResources");
92
- let body;
93
- body = JSON.stringify(se_GetCostAndUsageWithResourcesRequest(input, context));
94
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
95
- };
96
- export const se_GetCostCategoriesCommand = async (input, context) => {
97
- const headers = sharedHeaders("GetCostCategories");
98
- let body;
99
- body = JSON.stringify(se_GetCostCategoriesRequest(input, context));
100
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
101
- };
102
- export const se_GetCostComparisonDriversCommand = async (input, context) => {
103
- const headers = sharedHeaders("GetCostComparisonDrivers");
104
- let body;
105
- body = JSON.stringify(se_GetCostComparisonDriversRequest(input, context));
106
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
107
- };
108
- export const se_GetCostForecastCommand = async (input, context) => {
109
- const headers = sharedHeaders("GetCostForecast");
110
- let body;
111
- body = JSON.stringify(se_GetCostForecastRequest(input, context));
112
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
113
- };
114
- export const se_GetDimensionValuesCommand = async (input, context) => {
115
- const headers = sharedHeaders("GetDimensionValues");
116
- let body;
117
- body = JSON.stringify(se_GetDimensionValuesRequest(input, context));
118
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
119
- };
120
- export const se_GetReservationCoverageCommand = async (input, context) => {
121
- const headers = sharedHeaders("GetReservationCoverage");
122
- let body;
123
- body = JSON.stringify(se_GetReservationCoverageRequest(input, context));
124
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
125
- };
126
- export const se_GetReservationPurchaseRecommendationCommand = async (input, context) => {
127
- const headers = sharedHeaders("GetReservationPurchaseRecommendation");
128
- let body;
129
- body = JSON.stringify(se_GetReservationPurchaseRecommendationRequest(input, context));
130
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
131
- };
132
- export const se_GetReservationUtilizationCommand = async (input, context) => {
133
- const headers = sharedHeaders("GetReservationUtilization");
134
- let body;
135
- body = JSON.stringify(se_GetReservationUtilizationRequest(input, context));
136
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
137
- };
138
- export const se_GetRightsizingRecommendationCommand = async (input, context) => {
139
- const headers = sharedHeaders("GetRightsizingRecommendation");
140
- let body;
141
- body = JSON.stringify(se_GetRightsizingRecommendationRequest(input, context));
142
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
143
- };
144
- export const se_GetSavingsPlanPurchaseRecommendationDetailsCommand = async (input, context) => {
145
- const headers = sharedHeaders("GetSavingsPlanPurchaseRecommendationDetails");
146
- let body;
147
- body = JSON.stringify(_json(input));
148
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
149
- };
150
- export const se_GetSavingsPlansCoverageCommand = async (input, context) => {
151
- const headers = sharedHeaders("GetSavingsPlansCoverage");
152
- let body;
153
- body = JSON.stringify(se_GetSavingsPlansCoverageRequest(input, context));
154
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
155
- };
156
- export const se_GetSavingsPlansPurchaseRecommendationCommand = async (input, context) => {
157
- const headers = sharedHeaders("GetSavingsPlansPurchaseRecommendation");
158
- let body;
159
- body = JSON.stringify(se_GetSavingsPlansPurchaseRecommendationRequest(input, context));
160
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
161
- };
162
- export const se_GetSavingsPlansUtilizationCommand = async (input, context) => {
163
- const headers = sharedHeaders("GetSavingsPlansUtilization");
164
- let body;
165
- body = JSON.stringify(se_GetSavingsPlansUtilizationRequest(input, context));
166
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
167
- };
168
- export const se_GetSavingsPlansUtilizationDetailsCommand = async (input, context) => {
169
- const headers = sharedHeaders("GetSavingsPlansUtilizationDetails");
170
- let body;
171
- body = JSON.stringify(se_GetSavingsPlansUtilizationDetailsRequest(input, context));
172
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
173
- };
174
- export const se_GetTagsCommand = async (input, context) => {
175
- const headers = sharedHeaders("GetTags");
176
- let body;
177
- body = JSON.stringify(se_GetTagsRequest(input, context));
178
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
179
- };
180
- export const se_GetUsageForecastCommand = async (input, context) => {
181
- const headers = sharedHeaders("GetUsageForecast");
182
- let body;
183
- body = JSON.stringify(se_GetUsageForecastRequest(input, context));
184
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
185
- };
186
- export const se_ListCommitmentPurchaseAnalysesCommand = async (input, context) => {
187
- const headers = sharedHeaders("ListCommitmentPurchaseAnalyses");
188
- let body;
189
- body = JSON.stringify(_json(input));
190
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
191
- };
192
- export const se_ListCostAllocationTagBackfillHistoryCommand = async (input, context) => {
193
- const headers = sharedHeaders("ListCostAllocationTagBackfillHistory");
194
- let body;
195
- body = JSON.stringify(_json(input));
196
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
197
- };
198
- export const se_ListCostAllocationTagsCommand = async (input, context) => {
199
- const headers = sharedHeaders("ListCostAllocationTags");
200
- let body;
201
- body = JSON.stringify(_json(input));
202
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
203
- };
204
- export const se_ListCostCategoryDefinitionsCommand = async (input, context) => {
205
- const headers = sharedHeaders("ListCostCategoryDefinitions");
206
- let body;
207
- body = JSON.stringify(_json(input));
208
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
209
- };
210
- export const se_ListSavingsPlansPurchaseRecommendationGenerationCommand = async (input, context) => {
211
- const headers = sharedHeaders("ListSavingsPlansPurchaseRecommendationGeneration");
212
- let body;
213
- body = JSON.stringify(_json(input));
214
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
215
- };
216
- export const se_ListTagsForResourceCommand = async (input, context) => {
217
- const headers = sharedHeaders("ListTagsForResource");
218
- let body;
219
- body = JSON.stringify(_json(input));
220
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
221
- };
222
- export const se_ProvideAnomalyFeedbackCommand = async (input, context) => {
223
- const headers = sharedHeaders("ProvideAnomalyFeedback");
224
- let body;
225
- body = JSON.stringify(_json(input));
226
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
227
- };
228
- export const se_StartCommitmentPurchaseAnalysisCommand = async (input, context) => {
229
- const headers = sharedHeaders("StartCommitmentPurchaseAnalysis");
230
- let body;
231
- body = JSON.stringify(se_StartCommitmentPurchaseAnalysisRequest(input, context));
232
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
233
- };
234
- export const se_StartCostAllocationTagBackfillCommand = async (input, context) => {
235
- const headers = sharedHeaders("StartCostAllocationTagBackfill");
236
- let body;
237
- body = JSON.stringify(_json(input));
238
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
239
- };
240
- export const se_StartSavingsPlansPurchaseRecommendationGenerationCommand = async (input, context) => {
241
- const headers = sharedHeaders("StartSavingsPlansPurchaseRecommendationGeneration");
242
- let body;
243
- body = JSON.stringify(_json(input));
244
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
245
- };
246
- export const se_TagResourceCommand = async (input, context) => {
247
- const headers = sharedHeaders("TagResource");
248
- let body;
249
- body = JSON.stringify(_json(input));
250
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
251
- };
252
- export const se_UntagResourceCommand = async (input, context) => {
253
- const headers = sharedHeaders("UntagResource");
254
- let body;
255
- body = JSON.stringify(_json(input));
256
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
257
- };
258
- export const se_UpdateAnomalyMonitorCommand = async (input, context) => {
259
- const headers = sharedHeaders("UpdateAnomalyMonitor");
260
- let body;
261
- body = JSON.stringify(_json(input));
262
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
263
- };
264
- export const se_UpdateAnomalySubscriptionCommand = async (input, context) => {
265
- const headers = sharedHeaders("UpdateAnomalySubscription");
266
- let body;
267
- body = JSON.stringify(se_UpdateAnomalySubscriptionRequest(input, context));
268
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
269
- };
270
- export const se_UpdateCostAllocationTagsStatusCommand = async (input, context) => {
271
- const headers = sharedHeaders("UpdateCostAllocationTagsStatus");
272
- let body;
273
- body = JSON.stringify(_json(input));
274
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
275
- };
276
- export const se_UpdateCostCategoryDefinitionCommand = async (input, context) => {
277
- const headers = sharedHeaders("UpdateCostCategoryDefinition");
278
- let body;
279
- body = JSON.stringify(se_UpdateCostCategoryDefinitionRequest(input, context));
280
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
281
- };
282
- export const de_CreateAnomalyMonitorCommand = async (output, context) => {
283
- if (output.statusCode >= 300) {
284
- return de_CommandError(output, context);
285
- }
286
- const data = await parseBody(output.body, context);
287
- let contents = {};
288
- contents = _json(data);
289
- const response = {
290
- $metadata: deserializeMetadata(output),
291
- ...contents,
292
- };
293
- return response;
294
- };
295
- export const de_CreateAnomalySubscriptionCommand = async (output, context) => {
296
- if (output.statusCode >= 300) {
297
- return de_CommandError(output, context);
298
- }
299
- const data = await parseBody(output.body, context);
300
- let contents = {};
301
- contents = _json(data);
302
- const response = {
303
- $metadata: deserializeMetadata(output),
304
- ...contents,
305
- };
306
- return response;
307
- };
308
- export const de_CreateCostCategoryDefinitionCommand = async (output, context) => {
309
- if (output.statusCode >= 300) {
310
- return de_CommandError(output, context);
311
- }
312
- const data = await parseBody(output.body, context);
313
- let contents = {};
314
- contents = _json(data);
315
- const response = {
316
- $metadata: deserializeMetadata(output),
317
- ...contents,
318
- };
319
- return response;
320
- };
321
- export const de_DeleteAnomalyMonitorCommand = async (output, context) => {
322
- if (output.statusCode >= 300) {
323
- return de_CommandError(output, context);
324
- }
325
- const data = await parseBody(output.body, context);
326
- let contents = {};
327
- contents = _json(data);
328
- const response = {
329
- $metadata: deserializeMetadata(output),
330
- ...contents,
331
- };
332
- return response;
333
- };
334
- export const de_DeleteAnomalySubscriptionCommand = async (output, context) => {
335
- if (output.statusCode >= 300) {
336
- return de_CommandError(output, context);
337
- }
338
- const data = await parseBody(output.body, context);
339
- let contents = {};
340
- contents = _json(data);
341
- const response = {
342
- $metadata: deserializeMetadata(output),
343
- ...contents,
344
- };
345
- return response;
346
- };
347
- export const de_DeleteCostCategoryDefinitionCommand = async (output, context) => {
348
- if (output.statusCode >= 300) {
349
- return de_CommandError(output, context);
350
- }
351
- const data = await parseBody(output.body, context);
352
- let contents = {};
353
- contents = _json(data);
354
- const response = {
355
- $metadata: deserializeMetadata(output),
356
- ...contents,
357
- };
358
- return response;
359
- };
360
- export const de_DescribeCostCategoryDefinitionCommand = async (output, context) => {
361
- if (output.statusCode >= 300) {
362
- return de_CommandError(output, context);
363
- }
364
- const data = await parseBody(output.body, context);
365
- let contents = {};
366
- contents = de_DescribeCostCategoryDefinitionResponse(data, context);
367
- const response = {
368
- $metadata: deserializeMetadata(output),
369
- ...contents,
370
- };
371
- return response;
372
- };
373
- export const de_GetAnomaliesCommand = async (output, context) => {
374
- if (output.statusCode >= 300) {
375
- return de_CommandError(output, context);
376
- }
377
- const data = await parseBody(output.body, context);
378
- let contents = {};
379
- contents = de_GetAnomaliesResponse(data, context);
380
- const response = {
381
- $metadata: deserializeMetadata(output),
382
- ...contents,
383
- };
384
- return response;
385
- };
386
- export const de_GetAnomalyMonitorsCommand = async (output, context) => {
387
- if (output.statusCode >= 300) {
388
- return de_CommandError(output, context);
389
- }
390
- const data = await parseBody(output.body, context);
391
- let contents = {};
392
- contents = de_GetAnomalyMonitorsResponse(data, context);
393
- const response = {
394
- $metadata: deserializeMetadata(output),
395
- ...contents,
396
- };
397
- return response;
398
- };
399
- export const de_GetAnomalySubscriptionsCommand = async (output, context) => {
400
- if (output.statusCode >= 300) {
401
- return de_CommandError(output, context);
402
- }
403
- const data = await parseBody(output.body, context);
404
- let contents = {};
405
- contents = de_GetAnomalySubscriptionsResponse(data, context);
406
- const response = {
407
- $metadata: deserializeMetadata(output),
408
- ...contents,
409
- };
410
- return response;
411
- };
412
- export const de_GetApproximateUsageRecordsCommand = async (output, context) => {
413
- if (output.statusCode >= 300) {
414
- return de_CommandError(output, context);
415
- }
416
- const data = await parseBody(output.body, context);
417
- let contents = {};
418
- contents = _json(data);
419
- const response = {
420
- $metadata: deserializeMetadata(output),
421
- ...contents,
422
- };
423
- return response;
424
- };
425
- export const de_GetCommitmentPurchaseAnalysisCommand = async (output, context) => {
426
- if (output.statusCode >= 300) {
427
- return de_CommandError(output, context);
428
- }
429
- const data = await parseBody(output.body, context);
430
- let contents = {};
431
- contents = de_GetCommitmentPurchaseAnalysisResponse(data, context);
432
- const response = {
433
- $metadata: deserializeMetadata(output),
434
- ...contents,
435
- };
436
- return response;
437
- };
438
- export const de_GetCostAndUsageCommand = async (output, context) => {
439
- if (output.statusCode >= 300) {
440
- return de_CommandError(output, context);
441
- }
442
- const data = await parseBody(output.body, context);
443
- let contents = {};
444
- contents = _json(data);
445
- const response = {
446
- $metadata: deserializeMetadata(output),
447
- ...contents,
448
- };
449
- return response;
450
- };
451
- export const de_GetCostAndUsageComparisonsCommand = async (output, context) => {
452
- if (output.statusCode >= 300) {
453
- return de_CommandError(output, context);
454
- }
455
- const data = await parseBody(output.body, context);
456
- let contents = {};
457
- contents = de_GetCostAndUsageComparisonsResponse(data, context);
458
- const response = {
459
- $metadata: deserializeMetadata(output),
460
- ...contents,
461
- };
462
- return response;
463
- };
464
- export const de_GetCostAndUsageWithResourcesCommand = async (output, context) => {
465
- if (output.statusCode >= 300) {
466
- return de_CommandError(output, context);
467
- }
468
- const data = await parseBody(output.body, context);
469
- let contents = {};
470
- contents = _json(data);
471
- const response = {
472
- $metadata: deserializeMetadata(output),
473
- ...contents,
474
- };
475
- return response;
476
- };
477
- export const de_GetCostCategoriesCommand = async (output, context) => {
478
- if (output.statusCode >= 300) {
479
- return de_CommandError(output, context);
480
- }
481
- const data = await parseBody(output.body, context);
482
- let contents = {};
483
- contents = _json(data);
484
- const response = {
485
- $metadata: deserializeMetadata(output),
486
- ...contents,
487
- };
488
- return response;
489
- };
490
- export const de_GetCostComparisonDriversCommand = async (output, context) => {
491
- if (output.statusCode >= 300) {
492
- return de_CommandError(output, context);
493
- }
494
- const data = await parseBody(output.body, context);
495
- let contents = {};
496
- contents = de_GetCostComparisonDriversResponse(data, context);
497
- const response = {
498
- $metadata: deserializeMetadata(output),
499
- ...contents,
500
- };
501
- return response;
502
- };
503
- export const de_GetCostForecastCommand = async (output, context) => {
504
- if (output.statusCode >= 300) {
505
- return de_CommandError(output, context);
506
- }
507
- const data = await parseBody(output.body, context);
508
- let contents = {};
509
- contents = _json(data);
510
- const response = {
511
- $metadata: deserializeMetadata(output),
512
- ...contents,
513
- };
514
- return response;
515
- };
516
- export const de_GetDimensionValuesCommand = async (output, context) => {
517
- if (output.statusCode >= 300) {
518
- return de_CommandError(output, context);
519
- }
520
- const data = await parseBody(output.body, context);
521
- let contents = {};
522
- contents = _json(data);
523
- const response = {
524
- $metadata: deserializeMetadata(output),
525
- ...contents,
526
- };
527
- return response;
528
- };
529
- export const de_GetReservationCoverageCommand = async (output, context) => {
530
- if (output.statusCode >= 300) {
531
- return de_CommandError(output, context);
532
- }
533
- const data = await parseBody(output.body, context);
534
- let contents = {};
535
- contents = _json(data);
536
- const response = {
537
- $metadata: deserializeMetadata(output),
538
- ...contents,
539
- };
540
- return response;
541
- };
542
- export const de_GetReservationPurchaseRecommendationCommand = async (output, context) => {
543
- if (output.statusCode >= 300) {
544
- return de_CommandError(output, context);
545
- }
546
- const data = await parseBody(output.body, context);
547
- let contents = {};
548
- contents = _json(data);
549
- const response = {
550
- $metadata: deserializeMetadata(output),
551
- ...contents,
552
- };
553
- return response;
554
- };
555
- export const de_GetReservationUtilizationCommand = async (output, context) => {
556
- if (output.statusCode >= 300) {
557
- return de_CommandError(output, context);
558
- }
559
- const data = await parseBody(output.body, context);
560
- let contents = {};
561
- contents = _json(data);
562
- const response = {
563
- $metadata: deserializeMetadata(output),
564
- ...contents,
565
- };
566
- return response;
567
- };
568
- export const de_GetRightsizingRecommendationCommand = async (output, context) => {
569
- if (output.statusCode >= 300) {
570
- return de_CommandError(output, context);
571
- }
572
- const data = await parseBody(output.body, context);
573
- let contents = {};
574
- contents = _json(data);
575
- const response = {
576
- $metadata: deserializeMetadata(output),
577
- ...contents,
578
- };
579
- return response;
580
- };
581
- export const de_GetSavingsPlanPurchaseRecommendationDetailsCommand = async (output, context) => {
582
- if (output.statusCode >= 300) {
583
- return de_CommandError(output, context);
584
- }
585
- const data = await parseBody(output.body, context);
586
- let contents = {};
587
- contents = _json(data);
588
- const response = {
589
- $metadata: deserializeMetadata(output),
590
- ...contents,
591
- };
592
- return response;
593
- };
594
- export const de_GetSavingsPlansCoverageCommand = async (output, context) => {
595
- if (output.statusCode >= 300) {
596
- return de_CommandError(output, context);
597
- }
598
- const data = await parseBody(output.body, context);
599
- let contents = {};
600
- contents = _json(data);
601
- const response = {
602
- $metadata: deserializeMetadata(output),
603
- ...contents,
604
- };
605
- return response;
606
- };
607
- export const de_GetSavingsPlansPurchaseRecommendationCommand = async (output, context) => {
608
- if (output.statusCode >= 300) {
609
- return de_CommandError(output, context);
610
- }
611
- const data = await parseBody(output.body, context);
612
- let contents = {};
613
- contents = _json(data);
614
- const response = {
615
- $metadata: deserializeMetadata(output),
616
- ...contents,
617
- };
618
- return response;
619
- };
620
- export const de_GetSavingsPlansUtilizationCommand = async (output, context) => {
621
- if (output.statusCode >= 300) {
622
- return de_CommandError(output, context);
623
- }
624
- const data = await parseBody(output.body, context);
625
- let contents = {};
626
- contents = _json(data);
627
- const response = {
628
- $metadata: deserializeMetadata(output),
629
- ...contents,
630
- };
631
- return response;
632
- };
633
- export const de_GetSavingsPlansUtilizationDetailsCommand = async (output, context) => {
634
- if (output.statusCode >= 300) {
635
- return de_CommandError(output, context);
636
- }
637
- const data = await parseBody(output.body, context);
638
- let contents = {};
639
- contents = _json(data);
640
- const response = {
641
- $metadata: deserializeMetadata(output),
642
- ...contents,
643
- };
644
- return response;
645
- };
646
- export const de_GetTagsCommand = async (output, context) => {
647
- if (output.statusCode >= 300) {
648
- return de_CommandError(output, context);
649
- }
650
- const data = await parseBody(output.body, context);
651
- let contents = {};
652
- contents = _json(data);
653
- const response = {
654
- $metadata: deserializeMetadata(output),
655
- ...contents,
656
- };
657
- return response;
658
- };
659
- export const de_GetUsageForecastCommand = async (output, context) => {
660
- if (output.statusCode >= 300) {
661
- return de_CommandError(output, context);
662
- }
663
- const data = await parseBody(output.body, context);
664
- let contents = {};
665
- contents = _json(data);
666
- const response = {
667
- $metadata: deserializeMetadata(output),
668
- ...contents,
669
- };
670
- return response;
671
- };
672
- export const de_ListCommitmentPurchaseAnalysesCommand = async (output, context) => {
673
- if (output.statusCode >= 300) {
674
- return de_CommandError(output, context);
675
- }
676
- const data = await parseBody(output.body, context);
677
- let contents = {};
678
- contents = de_ListCommitmentPurchaseAnalysesResponse(data, context);
679
- const response = {
680
- $metadata: deserializeMetadata(output),
681
- ...contents,
682
- };
683
- return response;
684
- };
685
- export const de_ListCostAllocationTagBackfillHistoryCommand = async (output, context) => {
686
- if (output.statusCode >= 300) {
687
- return de_CommandError(output, context);
688
- }
689
- const data = await parseBody(output.body, context);
690
- let contents = {};
691
- contents = _json(data);
692
- const response = {
693
- $metadata: deserializeMetadata(output),
694
- ...contents,
695
- };
696
- return response;
697
- };
698
- export const de_ListCostAllocationTagsCommand = async (output, context) => {
699
- if (output.statusCode >= 300) {
700
- return de_CommandError(output, context);
701
- }
702
- const data = await parseBody(output.body, context);
703
- let contents = {};
704
- contents = _json(data);
705
- const response = {
706
- $metadata: deserializeMetadata(output),
707
- ...contents,
708
- };
709
- return response;
710
- };
711
- export const de_ListCostCategoryDefinitionsCommand = async (output, context) => {
712
- if (output.statusCode >= 300) {
713
- return de_CommandError(output, context);
714
- }
715
- const data = await parseBody(output.body, context);
716
- let contents = {};
717
- contents = _json(data);
718
- const response = {
719
- $metadata: deserializeMetadata(output),
720
- ...contents,
721
- };
722
- return response;
723
- };
724
- export const de_ListSavingsPlansPurchaseRecommendationGenerationCommand = async (output, context) => {
725
- if (output.statusCode >= 300) {
726
- return de_CommandError(output, context);
727
- }
728
- const data = await parseBody(output.body, context);
729
- let contents = {};
730
- contents = _json(data);
731
- const response = {
732
- $metadata: deserializeMetadata(output),
733
- ...contents,
734
- };
735
- return response;
736
- };
737
- export const de_ListTagsForResourceCommand = async (output, context) => {
738
- if (output.statusCode >= 300) {
739
- return de_CommandError(output, context);
740
- }
741
- const data = await parseBody(output.body, context);
742
- let contents = {};
743
- contents = _json(data);
744
- const response = {
745
- $metadata: deserializeMetadata(output),
746
- ...contents,
747
- };
748
- return response;
749
- };
750
- export const de_ProvideAnomalyFeedbackCommand = async (output, context) => {
751
- if (output.statusCode >= 300) {
752
- return de_CommandError(output, context);
753
- }
754
- const data = await parseBody(output.body, context);
755
- let contents = {};
756
- contents = _json(data);
757
- const response = {
758
- $metadata: deserializeMetadata(output),
759
- ...contents,
760
- };
761
- return response;
762
- };
763
- export const de_StartCommitmentPurchaseAnalysisCommand = async (output, context) => {
764
- if (output.statusCode >= 300) {
765
- return de_CommandError(output, context);
766
- }
767
- const data = await parseBody(output.body, context);
768
- let contents = {};
769
- contents = _json(data);
770
- const response = {
771
- $metadata: deserializeMetadata(output),
772
- ...contents,
773
- };
774
- return response;
775
- };
776
- export const de_StartCostAllocationTagBackfillCommand = async (output, context) => {
777
- if (output.statusCode >= 300) {
778
- return de_CommandError(output, context);
779
- }
780
- const data = await parseBody(output.body, context);
781
- let contents = {};
782
- contents = _json(data);
783
- const response = {
784
- $metadata: deserializeMetadata(output),
785
- ...contents,
786
- };
787
- return response;
788
- };
789
- export const de_StartSavingsPlansPurchaseRecommendationGenerationCommand = async (output, context) => {
790
- if (output.statusCode >= 300) {
791
- return de_CommandError(output, context);
792
- }
793
- const data = await parseBody(output.body, context);
794
- let contents = {};
795
- contents = _json(data);
796
- const response = {
797
- $metadata: deserializeMetadata(output),
798
- ...contents,
799
- };
800
- return response;
801
- };
802
- export const de_TagResourceCommand = async (output, context) => {
803
- if (output.statusCode >= 300) {
804
- return de_CommandError(output, context);
805
- }
806
- const data = await parseBody(output.body, context);
807
- let contents = {};
808
- contents = _json(data);
809
- const response = {
810
- $metadata: deserializeMetadata(output),
811
- ...contents,
812
- };
813
- return response;
814
- };
815
- export const de_UntagResourceCommand = async (output, context) => {
816
- if (output.statusCode >= 300) {
817
- return de_CommandError(output, context);
818
- }
819
- const data = await parseBody(output.body, context);
820
- let contents = {};
821
- contents = _json(data);
822
- const response = {
823
- $metadata: deserializeMetadata(output),
824
- ...contents,
825
- };
826
- return response;
827
- };
828
- export const de_UpdateAnomalyMonitorCommand = async (output, context) => {
829
- if (output.statusCode >= 300) {
830
- return de_CommandError(output, context);
831
- }
832
- const data = await parseBody(output.body, context);
833
- let contents = {};
834
- contents = _json(data);
835
- const response = {
836
- $metadata: deserializeMetadata(output),
837
- ...contents,
838
- };
839
- return response;
840
- };
841
- export const de_UpdateAnomalySubscriptionCommand = async (output, context) => {
842
- if (output.statusCode >= 300) {
843
- return de_CommandError(output, context);
844
- }
845
- const data = await parseBody(output.body, context);
846
- let contents = {};
847
- contents = _json(data);
848
- const response = {
849
- $metadata: deserializeMetadata(output),
850
- ...contents,
851
- };
852
- return response;
853
- };
854
- export const de_UpdateCostAllocationTagsStatusCommand = async (output, context) => {
855
- if (output.statusCode >= 300) {
856
- return de_CommandError(output, context);
857
- }
858
- const data = await parseBody(output.body, context);
859
- let contents = {};
860
- contents = _json(data);
861
- const response = {
862
- $metadata: deserializeMetadata(output),
863
- ...contents,
864
- };
865
- return response;
866
- };
867
- export const de_UpdateCostCategoryDefinitionCommand = async (output, context) => {
868
- if (output.statusCode >= 300) {
869
- return de_CommandError(output, context);
870
- }
871
- const data = await parseBody(output.body, context);
872
- let contents = {};
873
- contents = _json(data);
874
- const response = {
875
- $metadata: deserializeMetadata(output),
876
- ...contents,
877
- };
878
- return response;
879
- };
880
- const de_CommandError = async (output, context) => {
881
- const parsedOutput = {
882
- ...output,
883
- body: await parseErrorBody(output.body, context),
884
- };
885
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
886
- switch (errorCode) {
887
- case "LimitExceededException":
888
- case "com.amazonaws.costexplorer#LimitExceededException":
889
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
890
- case "UnknownMonitorException":
891
- case "com.amazonaws.costexplorer#UnknownMonitorException":
892
- throw await de_UnknownMonitorExceptionRes(parsedOutput, context);
893
- case "ServiceQuotaExceededException":
894
- case "com.amazonaws.costexplorer#ServiceQuotaExceededException":
895
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
896
- case "UnknownSubscriptionException":
897
- case "com.amazonaws.costexplorer#UnknownSubscriptionException":
898
- throw await de_UnknownSubscriptionExceptionRes(parsedOutput, context);
899
- case "ResourceNotFoundException":
900
- case "com.amazonaws.costexplorer#ResourceNotFoundException":
901
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
902
- case "InvalidNextTokenException":
903
- case "com.amazonaws.costexplorer#InvalidNextTokenException":
904
- throw await de_InvalidNextTokenExceptionRes(parsedOutput, context);
905
- case "DataUnavailableException":
906
- case "com.amazonaws.costexplorer#DataUnavailableException":
907
- throw await de_DataUnavailableExceptionRes(parsedOutput, context);
908
- case "AnalysisNotFoundException":
909
- case "com.amazonaws.costexplorer#AnalysisNotFoundException":
910
- throw await de_AnalysisNotFoundExceptionRes(parsedOutput, context);
911
- case "BillExpirationException":
912
- case "com.amazonaws.costexplorer#BillExpirationException":
913
- throw await de_BillExpirationExceptionRes(parsedOutput, context);
914
- case "BillingViewHealthStatusException":
915
- case "com.amazonaws.costexplorer#BillingViewHealthStatusException":
916
- throw await de_BillingViewHealthStatusExceptionRes(parsedOutput, context);
917
- case "RequestChangedException":
918
- case "com.amazonaws.costexplorer#RequestChangedException":
919
- throw await de_RequestChangedExceptionRes(parsedOutput, context);
920
- case "UnresolvableUsageUnitException":
921
- case "com.amazonaws.costexplorer#UnresolvableUsageUnitException":
922
- throw await de_UnresolvableUsageUnitExceptionRes(parsedOutput, context);
923
- case "GenerationExistsException":
924
- case "com.amazonaws.costexplorer#GenerationExistsException":
925
- throw await de_GenerationExistsExceptionRes(parsedOutput, context);
926
- case "BackfillLimitExceededException":
927
- case "com.amazonaws.costexplorer#BackfillLimitExceededException":
928
- throw await de_BackfillLimitExceededExceptionRes(parsedOutput, context);
929
- case "TooManyTagsException":
930
- case "com.amazonaws.costexplorer#TooManyTagsException":
931
- throw await de_TooManyTagsExceptionRes(parsedOutput, context);
932
- default:
933
- const parsedBody = parsedOutput.body;
934
- return throwDefaultError({
935
- output,
936
- parsedBody,
937
- errorCode,
938
- });
939
- }
940
- };
941
- const de_AnalysisNotFoundExceptionRes = async (parsedOutput, context) => {
942
- const body = parsedOutput.body;
943
- const deserialized = _json(body);
944
- const exception = new AnalysisNotFoundException({
945
- $metadata: deserializeMetadata(parsedOutput),
946
- ...deserialized,
947
- });
948
- return __decorateServiceException(exception, body);
949
- };
950
- const de_BackfillLimitExceededExceptionRes = async (parsedOutput, context) => {
951
- const body = parsedOutput.body;
952
- const deserialized = _json(body);
953
- const exception = new BackfillLimitExceededException({
954
- $metadata: deserializeMetadata(parsedOutput),
955
- ...deserialized,
956
- });
957
- return __decorateServiceException(exception, body);
958
- };
959
- const de_BillExpirationExceptionRes = async (parsedOutput, context) => {
960
- const body = parsedOutput.body;
961
- const deserialized = _json(body);
962
- const exception = new BillExpirationException({
963
- $metadata: deserializeMetadata(parsedOutput),
964
- ...deserialized,
965
- });
966
- return __decorateServiceException(exception, body);
967
- };
968
- const de_BillingViewHealthStatusExceptionRes = async (parsedOutput, context) => {
969
- const body = parsedOutput.body;
970
- const deserialized = _json(body);
971
- const exception = new BillingViewHealthStatusException({
972
- $metadata: deserializeMetadata(parsedOutput),
973
- ...deserialized,
974
- });
975
- return __decorateServiceException(exception, body);
976
- };
977
- const de_DataUnavailableExceptionRes = async (parsedOutput, context) => {
978
- const body = parsedOutput.body;
979
- const deserialized = _json(body);
980
- const exception = new DataUnavailableException({
981
- $metadata: deserializeMetadata(parsedOutput),
982
- ...deserialized,
983
- });
984
- return __decorateServiceException(exception, body);
985
- };
986
- const de_GenerationExistsExceptionRes = async (parsedOutput, context) => {
987
- const body = parsedOutput.body;
988
- const deserialized = _json(body);
989
- const exception = new GenerationExistsException({
990
- $metadata: deserializeMetadata(parsedOutput),
991
- ...deserialized,
992
- });
993
- return __decorateServiceException(exception, body);
994
- };
995
- const de_InvalidNextTokenExceptionRes = async (parsedOutput, context) => {
996
- const body = parsedOutput.body;
997
- const deserialized = _json(body);
998
- const exception = new InvalidNextTokenException({
999
- $metadata: deserializeMetadata(parsedOutput),
1000
- ...deserialized,
1001
- });
1002
- return __decorateServiceException(exception, body);
1003
- };
1004
- const de_LimitExceededExceptionRes = async (parsedOutput, context) => {
1005
- const body = parsedOutput.body;
1006
- const deserialized = _json(body);
1007
- const exception = new LimitExceededException({
1008
- $metadata: deserializeMetadata(parsedOutput),
1009
- ...deserialized,
1010
- });
1011
- return __decorateServiceException(exception, body);
1012
- };
1013
- const de_RequestChangedExceptionRes = async (parsedOutput, context) => {
1014
- const body = parsedOutput.body;
1015
- const deserialized = _json(body);
1016
- const exception = new RequestChangedException({
1017
- $metadata: deserializeMetadata(parsedOutput),
1018
- ...deserialized,
1019
- });
1020
- return __decorateServiceException(exception, body);
1021
- };
1022
- const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
1023
- const body = parsedOutput.body;
1024
- const deserialized = _json(body);
1025
- const exception = new ResourceNotFoundException({
1026
- $metadata: deserializeMetadata(parsedOutput),
1027
- ...deserialized,
1028
- });
1029
- return __decorateServiceException(exception, body);
1030
- };
1031
- const de_ServiceQuotaExceededExceptionRes = async (parsedOutput, context) => {
1032
- const body = parsedOutput.body;
1033
- const deserialized = _json(body);
1034
- const exception = new ServiceQuotaExceededException({
1035
- $metadata: deserializeMetadata(parsedOutput),
1036
- ...deserialized,
1037
- });
1038
- return __decorateServiceException(exception, body);
1039
- };
1040
- const de_TooManyTagsExceptionRes = async (parsedOutput, context) => {
1041
- const body = parsedOutput.body;
1042
- const deserialized = _json(body);
1043
- const exception = new TooManyTagsException({
1044
- $metadata: deserializeMetadata(parsedOutput),
1045
- ...deserialized,
1046
- });
1047
- return __decorateServiceException(exception, body);
1048
- };
1049
- const de_UnknownMonitorExceptionRes = async (parsedOutput, context) => {
1050
- const body = parsedOutput.body;
1051
- const deserialized = _json(body);
1052
- const exception = new UnknownMonitorException({
1053
- $metadata: deserializeMetadata(parsedOutput),
1054
- ...deserialized,
1055
- });
1056
- return __decorateServiceException(exception, body);
1057
- };
1058
- const de_UnknownSubscriptionExceptionRes = async (parsedOutput, context) => {
1059
- const body = parsedOutput.body;
1060
- const deserialized = _json(body);
1061
- const exception = new UnknownSubscriptionException({
1062
- $metadata: deserializeMetadata(parsedOutput),
1063
- ...deserialized,
1064
- });
1065
- return __decorateServiceException(exception, body);
1066
- };
1067
- const de_UnresolvableUsageUnitExceptionRes = async (parsedOutput, context) => {
1068
- const body = parsedOutput.body;
1069
- const deserialized = _json(body);
1070
- const exception = new UnresolvableUsageUnitException({
1071
- $metadata: deserializeMetadata(parsedOutput),
1072
- ...deserialized,
1073
- });
1074
- return __decorateServiceException(exception, body);
1075
- };
1076
- const se_AnomalyMonitor = (input, context) => {
1077
- return take(input, {
1078
- CreationDate: [],
1079
- DimensionalValueCount: [],
1080
- LastEvaluatedDate: [],
1081
- LastUpdatedDate: [],
1082
- MonitorArn: [],
1083
- MonitorDimension: [],
1084
- MonitorName: [],
1085
- MonitorSpecification: (_) => se_Expression(_, context),
1086
- MonitorType: [],
1087
- });
1088
- };
1089
- const se_AnomalySubscription = (input, context) => {
1090
- return take(input, {
1091
- AccountId: [],
1092
- Frequency: [],
1093
- MonitorArnList: _json,
1094
- Subscribers: _json,
1095
- SubscriptionArn: [],
1096
- SubscriptionName: [],
1097
- Threshold: __serializeFloat,
1098
- ThresholdExpression: (_) => se_Expression(_, context),
1099
- });
1100
- };
1101
- const se_CommitmentPurchaseAnalysisConfiguration = (input, context) => {
1102
- return take(input, {
1103
- SavingsPlansPurchaseAnalysisConfiguration: (_) => se_SavingsPlansPurchaseAnalysisConfiguration(_, context),
1104
- });
1105
- };
1106
- const se_CostCategoryRule = (input, context) => {
1107
- return take(input, {
1108
- InheritedValue: _json,
1109
- Rule: (_) => se_Expression(_, context),
1110
- Type: [],
1111
- Value: [],
1112
- });
1113
- };
1114
- const se_CostCategoryRulesList = (input, context) => {
1115
- return input
1116
- .filter((e) => e != null)
1117
- .map((entry) => {
1118
- return se_CostCategoryRule(entry, context);
1119
- });
1120
- };
1121
- const se_CreateAnomalyMonitorRequest = (input, context) => {
1122
- return take(input, {
1123
- AnomalyMonitor: (_) => se_AnomalyMonitor(_, context),
1124
- ResourceTags: _json,
1125
- });
1126
- };
1127
- const se_CreateAnomalySubscriptionRequest = (input, context) => {
1128
- return take(input, {
1129
- AnomalySubscription: (_) => se_AnomalySubscription(_, context),
1130
- ResourceTags: _json,
1131
- });
1132
- };
1133
- const se_CreateCostCategoryDefinitionRequest = (input, context) => {
1134
- return take(input, {
1135
- DefaultValue: [],
1136
- EffectiveStart: [],
1137
- Name: [],
1138
- ResourceTags: _json,
1139
- RuleVersion: [],
1140
- Rules: (_) => se_CostCategoryRulesList(_, context),
1141
- SplitChargeRules: _json,
1142
- });
1143
- };
1144
- const se_Expression = (input, context) => {
1145
- return take(input, {
1146
- And: (_) => se_Expressions(_, context),
1147
- CostCategories: _json,
1148
- Dimensions: _json,
1149
- Not: (_) => se_Expression(_, context),
1150
- Or: (_) => se_Expressions(_, context),
1151
- Tags: _json,
1152
- });
1153
- };
1154
- const se_Expressions = (input, context) => {
1155
- return input
1156
- .filter((e) => e != null)
1157
- .map((entry) => {
1158
- return se_Expression(entry, context);
1159
- });
1160
- };
1161
- const se_GetAnomaliesRequest = (input, context) => {
1162
- return take(input, {
1163
- DateInterval: _json,
1164
- Feedback: [],
1165
- MaxResults: [],
1166
- MonitorArn: [],
1167
- NextPageToken: [],
1168
- TotalImpact: (_) => se_TotalImpactFilter(_, context),
1169
- });
1170
- };
1171
- const se_GetCostAndUsageComparisonsRequest = (input, context) => {
1172
- return take(input, {
1173
- BaselineTimePeriod: _json,
1174
- BillingViewArn: [],
1175
- ComparisonTimePeriod: _json,
1176
- Filter: (_) => se_Expression(_, context),
1177
- GroupBy: _json,
1178
- MaxResults: [],
1179
- MetricForComparison: [],
1180
- NextPageToken: [],
1181
- });
1182
- };
1183
- const se_GetCostAndUsageRequest = (input, context) => {
1184
- return take(input, {
1185
- BillingViewArn: [],
1186
- Filter: (_) => se_Expression(_, context),
1187
- Granularity: [],
1188
- GroupBy: _json,
1189
- Metrics: _json,
1190
- NextPageToken: [],
1191
- TimePeriod: _json,
1192
- });
1193
- };
1194
- const se_GetCostAndUsageWithResourcesRequest = (input, context) => {
1195
- return take(input, {
1196
- BillingViewArn: [],
1197
- Filter: (_) => se_Expression(_, context),
1198
- Granularity: [],
1199
- GroupBy: _json,
1200
- Metrics: _json,
1201
- NextPageToken: [],
1202
- TimePeriod: _json,
1203
- });
1204
- };
1205
- const se_GetCostCategoriesRequest = (input, context) => {
1206
- return take(input, {
1207
- BillingViewArn: [],
1208
- CostCategoryName: [],
1209
- Filter: (_) => se_Expression(_, context),
1210
- MaxResults: [],
1211
- NextPageToken: [],
1212
- SearchString: [],
1213
- SortBy: _json,
1214
- TimePeriod: _json,
1215
- });
1216
- };
1217
- const se_GetCostComparisonDriversRequest = (input, context) => {
1218
- return take(input, {
1219
- BaselineTimePeriod: _json,
1220
- BillingViewArn: [],
1221
- ComparisonTimePeriod: _json,
1222
- Filter: (_) => se_Expression(_, context),
1223
- GroupBy: _json,
1224
- MaxResults: [],
1225
- MetricForComparison: [],
1226
- NextPageToken: [],
1227
- });
1228
- };
1229
- const se_GetCostForecastRequest = (input, context) => {
1230
- return take(input, {
1231
- BillingViewArn: [],
1232
- Filter: (_) => se_Expression(_, context),
1233
- Granularity: [],
1234
- Metric: [],
1235
- PredictionIntervalLevel: [],
1236
- TimePeriod: _json,
1237
- });
1238
- };
1239
- const se_GetDimensionValuesRequest = (input, context) => {
1240
- return take(input, {
1241
- BillingViewArn: [],
1242
- Context: [],
1243
- Dimension: [],
1244
- Filter: (_) => se_Expression(_, context),
1245
- MaxResults: [],
1246
- NextPageToken: [],
1247
- SearchString: [],
1248
- SortBy: _json,
1249
- TimePeriod: _json,
1250
- });
1251
- };
1252
- const se_GetReservationCoverageRequest = (input, context) => {
1253
- return take(input, {
1254
- Filter: (_) => se_Expression(_, context),
1255
- Granularity: [],
1256
- GroupBy: _json,
1257
- MaxResults: [],
1258
- Metrics: _json,
1259
- NextPageToken: [],
1260
- SortBy: _json,
1261
- TimePeriod: _json,
1262
- });
1263
- };
1264
- const se_GetReservationPurchaseRecommendationRequest = (input, context) => {
1265
- return take(input, {
1266
- AccountId: [],
1267
- AccountScope: [],
1268
- Filter: (_) => se_Expression(_, context),
1269
- LookbackPeriodInDays: [],
1270
- NextPageToken: [],
1271
- PageSize: [],
1272
- PaymentOption: [],
1273
- Service: [],
1274
- ServiceSpecification: _json,
1275
- TermInYears: [],
1276
- });
1277
- };
1278
- const se_GetReservationUtilizationRequest = (input, context) => {
1279
- return take(input, {
1280
- Filter: (_) => se_Expression(_, context),
1281
- Granularity: [],
1282
- GroupBy: _json,
1283
- MaxResults: [],
1284
- NextPageToken: [],
1285
- SortBy: _json,
1286
- TimePeriod: _json,
1287
- });
1288
- };
1289
- const se_GetRightsizingRecommendationRequest = (input, context) => {
1290
- return take(input, {
1291
- Configuration: _json,
1292
- Filter: (_) => se_Expression(_, context),
1293
- NextPageToken: [],
1294
- PageSize: [],
1295
- Service: [],
1296
- });
1297
- };
1298
- const se_GetSavingsPlansCoverageRequest = (input, context) => {
1299
- return take(input, {
1300
- Filter: (_) => se_Expression(_, context),
1301
- Granularity: [],
1302
- GroupBy: _json,
1303
- MaxResults: [],
1304
- Metrics: _json,
1305
- NextToken: [],
1306
- SortBy: _json,
1307
- TimePeriod: _json,
1308
- });
1309
- };
1310
- const se_GetSavingsPlansPurchaseRecommendationRequest = (input, context) => {
1311
- return take(input, {
1312
- AccountScope: [],
1313
- Filter: (_) => se_Expression(_, context),
1314
- LookbackPeriodInDays: [],
1315
- NextPageToken: [],
1316
- PageSize: [],
1317
- PaymentOption: [],
1318
- SavingsPlansType: [],
1319
- TermInYears: [],
1320
- });
1321
- };
1322
- const se_GetSavingsPlansUtilizationDetailsRequest = (input, context) => {
1323
- return take(input, {
1324
- DataType: _json,
1325
- Filter: (_) => se_Expression(_, context),
1326
- MaxResults: [],
1327
- NextToken: [],
1328
- SortBy: _json,
1329
- TimePeriod: _json,
1330
- });
1331
- };
1332
- const se_GetSavingsPlansUtilizationRequest = (input, context) => {
1333
- return take(input, {
1334
- Filter: (_) => se_Expression(_, context),
1335
- Granularity: [],
1336
- SortBy: _json,
1337
- TimePeriod: _json,
1338
- });
1339
- };
1340
- const se_GetTagsRequest = (input, context) => {
1341
- return take(input, {
1342
- BillingViewArn: [],
1343
- Filter: (_) => se_Expression(_, context),
1344
- MaxResults: [],
1345
- NextPageToken: [],
1346
- SearchString: [],
1347
- SortBy: _json,
1348
- TagKey: [],
1349
- TimePeriod: _json,
1350
- });
1351
- };
1352
- const se_GetUsageForecastRequest = (input, context) => {
1353
- return take(input, {
1354
- BillingViewArn: [],
1355
- Filter: (_) => se_Expression(_, context),
1356
- Granularity: [],
1357
- Metric: [],
1358
- PredictionIntervalLevel: [],
1359
- TimePeriod: _json,
1360
- });
1361
- };
1362
- const se_SavingsPlans = (input, context) => {
1363
- return take(input, {
1364
- InstanceFamily: [],
1365
- OfferingId: [],
1366
- PaymentOption: [],
1367
- Region: [],
1368
- SavingsPlansCommitment: __serializeFloat,
1369
- SavingsPlansType: [],
1370
- TermInYears: [],
1371
- });
1372
- };
1373
- const se_SavingsPlansPurchaseAnalysisConfiguration = (input, context) => {
1374
- return take(input, {
1375
- AccountId: [],
1376
- AccountScope: [],
1377
- AnalysisType: [],
1378
- LookBackTimePeriod: _json,
1379
- SavingsPlansToAdd: (_) => se_SavingsPlansToAdd(_, context),
1380
- SavingsPlansToExclude: _json,
1381
- });
1382
- };
1383
- const se_SavingsPlansToAdd = (input, context) => {
1384
- return input
1385
- .filter((e) => e != null)
1386
- .map((entry) => {
1387
- return se_SavingsPlans(entry, context);
1388
- });
1389
- };
1390
- const se_StartCommitmentPurchaseAnalysisRequest = (input, context) => {
1391
- return take(input, {
1392
- CommitmentPurchaseAnalysisConfiguration: (_) => se_CommitmentPurchaseAnalysisConfiguration(_, context),
1393
- });
1394
- };
1395
- const se_TotalImpactFilter = (input, context) => {
1396
- return take(input, {
1397
- EndValue: __serializeFloat,
1398
- NumericOperator: [],
1399
- StartValue: __serializeFloat,
1400
- });
1401
- };
1402
- const se_UpdateAnomalySubscriptionRequest = (input, context) => {
1403
- return take(input, {
1404
- Frequency: [],
1405
- MonitorArnList: _json,
1406
- Subscribers: _json,
1407
- SubscriptionArn: [],
1408
- SubscriptionName: [],
1409
- Threshold: __serializeFloat,
1410
- ThresholdExpression: (_) => se_Expression(_, context),
1411
- });
1412
- };
1413
- const se_UpdateCostCategoryDefinitionRequest = (input, context) => {
1414
- return take(input, {
1415
- CostCategoryArn: [],
1416
- DefaultValue: [],
1417
- EffectiveStart: [],
1418
- RuleVersion: [],
1419
- Rules: (_) => se_CostCategoryRulesList(_, context),
1420
- SplitChargeRules: _json,
1421
- });
1422
- };
1423
- const de_AnalysisSummary = (output, context) => {
1424
- return take(output, {
1425
- AnalysisCompletionTime: __expectString,
1426
- AnalysisId: __expectString,
1427
- AnalysisStartedTime: __expectString,
1428
- AnalysisStatus: __expectString,
1429
- CommitmentPurchaseAnalysisConfiguration: (_) => de_CommitmentPurchaseAnalysisConfiguration(_, context),
1430
- ErrorCode: __expectString,
1431
- EstimatedCompletionTime: __expectString,
1432
- });
1433
- };
1434
- const de_AnalysisSummaryList = (output, context) => {
1435
- const retVal = (output || [])
1436
- .filter((e) => e != null)
1437
- .map((entry) => {
1438
- return de_AnalysisSummary(entry, context);
1439
- });
1440
- return retVal;
1441
- };
1442
- const de_Anomalies = (output, context) => {
1443
- const retVal = (output || [])
1444
- .filter((e) => e != null)
1445
- .map((entry) => {
1446
- return de_Anomaly(entry, context);
1447
- });
1448
- return retVal;
1449
- };
1450
- const de_Anomaly = (output, context) => {
1451
- return take(output, {
1452
- AnomalyEndDate: __expectString,
1453
- AnomalyId: __expectString,
1454
- AnomalyScore: (_) => de_AnomalyScore(_, context),
1455
- AnomalyStartDate: __expectString,
1456
- DimensionValue: __expectString,
1457
- Feedback: __expectString,
1458
- Impact: (_) => de_Impact(_, context),
1459
- MonitorArn: __expectString,
1460
- RootCauses: (_) => de_RootCauses(_, context),
1461
- });
1462
- };
1463
- const de_AnomalyMonitor = (output, context) => {
1464
- return take(output, {
1465
- CreationDate: __expectString,
1466
- DimensionalValueCount: __expectInt32,
1467
- LastEvaluatedDate: __expectString,
1468
- LastUpdatedDate: __expectString,
1469
- MonitorArn: __expectString,
1470
- MonitorDimension: __expectString,
1471
- MonitorName: __expectString,
1472
- MonitorSpecification: (_) => de_Expression(_, context),
1473
- MonitorType: __expectString,
1474
- });
1475
- };
1476
- const de_AnomalyMonitors = (output, context) => {
1477
- const retVal = (output || [])
1478
- .filter((e) => e != null)
1479
- .map((entry) => {
1480
- return de_AnomalyMonitor(entry, context);
1481
- });
1482
- return retVal;
1483
- };
1484
- const de_AnomalyScore = (output, context) => {
1485
- return take(output, {
1486
- CurrentScore: __limitedParseDouble,
1487
- MaxScore: __limitedParseDouble,
1488
- });
1489
- };
1490
- const de_AnomalySubscription = (output, context) => {
1491
- return take(output, {
1492
- AccountId: __expectString,
1493
- Frequency: __expectString,
1494
- MonitorArnList: _json,
1495
- Subscribers: _json,
1496
- SubscriptionArn: __expectString,
1497
- SubscriptionName: __expectString,
1498
- Threshold: __limitedParseDouble,
1499
- ThresholdExpression: (_) => de_Expression(_, context),
1500
- });
1501
- };
1502
- const de_AnomalySubscriptions = (output, context) => {
1503
- const retVal = (output || [])
1504
- .filter((e) => e != null)
1505
- .map((entry) => {
1506
- return de_AnomalySubscription(entry, context);
1507
- });
1508
- return retVal;
1509
- };
1510
- const de_CommitmentPurchaseAnalysisConfiguration = (output, context) => {
1511
- return take(output, {
1512
- SavingsPlansPurchaseAnalysisConfiguration: (_) => de_SavingsPlansPurchaseAnalysisConfiguration(_, context),
1513
- });
1514
- };
1515
- const de_CostAndUsageComparison = (output, context) => {
1516
- return take(output, {
1517
- CostAndUsageSelector: (_) => de_Expression(_, context),
1518
- Metrics: _json,
1519
- });
1520
- };
1521
- const de_CostAndUsageComparisons = (output, context) => {
1522
- const retVal = (output || [])
1523
- .filter((e) => e != null)
1524
- .map((entry) => {
1525
- return de_CostAndUsageComparison(entry, context);
1526
- });
1527
- return retVal;
1528
- };
1529
- const de_CostCategory = (output, context) => {
1530
- return take(output, {
1531
- CostCategoryArn: __expectString,
1532
- DefaultValue: __expectString,
1533
- EffectiveEnd: __expectString,
1534
- EffectiveStart: __expectString,
1535
- Name: __expectString,
1536
- ProcessingStatus: _json,
1537
- RuleVersion: __expectString,
1538
- Rules: (_) => de_CostCategoryRulesList(_, context),
1539
- SplitChargeRules: _json,
1540
- });
1541
- };
1542
- const de_CostCategoryRule = (output, context) => {
1543
- return take(output, {
1544
- InheritedValue: _json,
1545
- Rule: (_) => de_Expression(_, context),
1546
- Type: __expectString,
1547
- Value: __expectString,
1548
- });
1549
- };
1550
- const de_CostCategoryRulesList = (output, context) => {
1551
- const retVal = (output || [])
1552
- .filter((e) => e != null)
1553
- .map((entry) => {
1554
- return de_CostCategoryRule(entry, context);
1555
- });
1556
- return retVal;
1557
- };
1558
- const de_CostComparisonDriver = (output, context) => {
1559
- return take(output, {
1560
- CostDrivers: _json,
1561
- CostSelector: (_) => de_Expression(_, context),
1562
- Metrics: _json,
1563
- });
1564
- };
1565
- const de_CostComparisonDrivers = (output, context) => {
1566
- const retVal = (output || [])
1567
- .filter((e) => e != null)
1568
- .map((entry) => {
1569
- return de_CostComparisonDriver(entry, context);
1570
- });
1571
- return retVal;
1572
- };
1573
- const de_DescribeCostCategoryDefinitionResponse = (output, context) => {
1574
- return take(output, {
1575
- CostCategory: (_) => de_CostCategory(_, context),
1576
- });
1577
- };
1578
- const de_Expression = (output, context) => {
1579
- return take(output, {
1580
- And: (_) => de_Expressions(_, context),
1581
- CostCategories: _json,
1582
- Dimensions: _json,
1583
- Not: (_) => de_Expression(_, context),
1584
- Or: (_) => de_Expressions(_, context),
1585
- Tags: _json,
1586
- });
1587
- };
1588
- const de_Expressions = (output, context) => {
1589
- const retVal = (output || [])
1590
- .filter((e) => e != null)
1591
- .map((entry) => {
1592
- return de_Expression(entry, context);
1593
- });
1594
- return retVal;
1595
- };
1596
- const de_GetAnomaliesResponse = (output, context) => {
1597
- return take(output, {
1598
- Anomalies: (_) => de_Anomalies(_, context),
1599
- NextPageToken: __expectString,
1600
- });
1601
- };
1602
- const de_GetAnomalyMonitorsResponse = (output, context) => {
1603
- return take(output, {
1604
- AnomalyMonitors: (_) => de_AnomalyMonitors(_, context),
1605
- NextPageToken: __expectString,
1606
- });
1607
- };
1608
- const de_GetAnomalySubscriptionsResponse = (output, context) => {
1609
- return take(output, {
1610
- AnomalySubscriptions: (_) => de_AnomalySubscriptions(_, context),
1611
- NextPageToken: __expectString,
1612
- });
1613
- };
1614
- const de_GetCommitmentPurchaseAnalysisResponse = (output, context) => {
1615
- return take(output, {
1616
- AnalysisCompletionTime: __expectString,
1617
- AnalysisDetails: _json,
1618
- AnalysisId: __expectString,
1619
- AnalysisStartedTime: __expectString,
1620
- AnalysisStatus: __expectString,
1621
- CommitmentPurchaseAnalysisConfiguration: (_) => de_CommitmentPurchaseAnalysisConfiguration(_, context),
1622
- ErrorCode: __expectString,
1623
- EstimatedCompletionTime: __expectString,
1624
- });
1625
- };
1626
- const de_GetCostAndUsageComparisonsResponse = (output, context) => {
1627
- return take(output, {
1628
- CostAndUsageComparisons: (_) => de_CostAndUsageComparisons(_, context),
1629
- NextPageToken: __expectString,
1630
- TotalCostAndUsage: _json,
1631
- });
1632
- };
1633
- const de_GetCostComparisonDriversResponse = (output, context) => {
1634
- return take(output, {
1635
- CostComparisonDrivers: (_) => de_CostComparisonDrivers(_, context),
1636
- NextPageToken: __expectString,
1637
- });
1638
- };
1639
- const de_Impact = (output, context) => {
1640
- return take(output, {
1641
- MaxImpact: __limitedParseDouble,
1642
- TotalActualSpend: __limitedParseDouble,
1643
- TotalExpectedSpend: __limitedParseDouble,
1644
- TotalImpact: __limitedParseDouble,
1645
- TotalImpactPercentage: __limitedParseDouble,
1646
- });
1647
- };
1648
- const de_ListCommitmentPurchaseAnalysesResponse = (output, context) => {
1649
- return take(output, {
1650
- AnalysisSummaryList: (_) => de_AnalysisSummaryList(_, context),
1651
- NextPageToken: __expectString,
1652
- });
1653
- };
1654
- const de_RootCause = (output, context) => {
1655
- return take(output, {
1656
- Impact: (_) => de_RootCauseImpact(_, context),
1657
- LinkedAccount: __expectString,
1658
- LinkedAccountName: __expectString,
1659
- Region: __expectString,
1660
- Service: __expectString,
1661
- UsageType: __expectString,
1662
- });
1663
- };
1664
- const de_RootCauseImpact = (output, context) => {
1665
- return take(output, {
1666
- Contribution: __limitedParseDouble,
1667
- });
1668
- };
1669
- const de_RootCauses = (output, context) => {
1670
- const retVal = (output || [])
1671
- .filter((e) => e != null)
1672
- .map((entry) => {
1673
- return de_RootCause(entry, context);
1674
- });
1675
- return retVal;
1676
- };
1677
- const de_SavingsPlans = (output, context) => {
1678
- return take(output, {
1679
- InstanceFamily: __expectString,
1680
- OfferingId: __expectString,
1681
- PaymentOption: __expectString,
1682
- Region: __expectString,
1683
- SavingsPlansCommitment: __limitedParseDouble,
1684
- SavingsPlansType: __expectString,
1685
- TermInYears: __expectString,
1686
- });
1687
- };
1688
- const de_SavingsPlansPurchaseAnalysisConfiguration = (output, context) => {
1689
- return take(output, {
1690
- AccountId: __expectString,
1691
- AccountScope: __expectString,
1692
- AnalysisType: __expectString,
1693
- LookBackTimePeriod: _json,
1694
- SavingsPlansToAdd: (_) => de_SavingsPlansToAdd(_, context),
1695
- SavingsPlansToExclude: _json,
1696
- });
1697
- };
1698
- const de_SavingsPlansToAdd = (output, context) => {
1699
- const retVal = (output || [])
1700
- .filter((e) => e != null)
1701
- .map((entry) => {
1702
- return de_SavingsPlans(entry, context);
1703
- });
1704
- return retVal;
1705
- };
1706
- const deserializeMetadata = (output) => ({
1707
- httpStatusCode: output.statusCode,
1708
- requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
1709
- extendedRequestId: output.headers["x-amz-id-2"],
1710
- cfId: output.headers["x-amz-cf-id"],
1711
- });
1712
- const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
1713
- const throwDefaultError = withBaseException(__BaseException);
1714
- const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, body) => {
1715
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1716
- const contents = {
1717
- protocol,
1718
- hostname,
1719
- port,
1720
- method: "POST",
1721
- path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path,
1722
- headers,
1723
- };
1724
- if (resolvedHostname !== undefined) {
1725
- contents.hostname = resolvedHostname;
1726
- }
1727
- if (body !== undefined) {
1728
- contents.body = body;
1729
- }
1730
- return new __HttpRequest(contents);
1731
- };
1732
- function sharedHeaders(operation) {
1733
- return {
1734
- "content-type": "application/x-amz-json-1.1",
1735
- "x-amz-target": `AWSInsightsIndexService.${operation}`,
1736
- };
1737
- }