@aws-sdk/client-applicationcostprofiler 3.118.1 → 3.128.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,33 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # [3.128.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.127.0...v3.128.0) (2022-07-12)
7
+
8
+ **Note:** Version bump only for package @aws-sdk/client-applicationcostprofiler
9
+
10
+
11
+
12
+
13
+
14
+ # [3.127.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.126.0...v3.127.0) (2022-07-11)
15
+
16
+ **Note:** Version bump only for package @aws-sdk/client-applicationcostprofiler
17
+
18
+
19
+
20
+
21
+
22
+ # [3.121.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.120.0...v3.121.0) (2022-06-30)
23
+
24
+
25
+ ### Features
26
+
27
+ * **clients:** fallback to status code for unmodeled errors ([#3752](https://github.com/aws/aws-sdk-js-v3/issues/3752)) ([49bcc4f](https://github.com/aws/aws-sdk-js-v3/commit/49bcc4f153e890e798a8e82fd5fc397b2dcc449f))
28
+
29
+
30
+
31
+
32
+
6
33
  ## [3.118.1](https://github.com/aws/aws-sdk-js-v3/compare/v3.118.0...v3.118.1) (2022-06-27)
7
34
 
8
35
  **Note:** Version bump only for package @aws-sdk/client-applicationcostprofiler
@@ -65,8 +65,7 @@ const serializeAws_restJson1ImportApplicationUsageCommand = async (input, contex
65
65
  const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/importApplicationUsage";
66
66
  let body;
67
67
  body = JSON.stringify({
68
- ...(input.sourceS3Location !== undefined &&
69
- input.sourceS3Location !== null && {
68
+ ...(input.sourceS3Location != null && {
70
69
  sourceS3Location: serializeAws_restJson1SourceS3Location(input.sourceS3Location, context),
71
70
  }),
72
71
  });
@@ -110,16 +109,13 @@ const serializeAws_restJson1PutReportDefinitionCommand = async (input, context)
110
109
  const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/reportDefinition";
111
110
  let body;
112
111
  body = JSON.stringify({
113
- ...(input.destinationS3Location !== undefined &&
114
- input.destinationS3Location !== null && {
112
+ ...(input.destinationS3Location != null && {
115
113
  destinationS3Location: serializeAws_restJson1S3Location(input.destinationS3Location, context),
116
114
  }),
117
- ...(input.format !== undefined && input.format !== null && { format: input.format }),
118
- ...(input.reportDescription !== undefined &&
119
- input.reportDescription !== null && { reportDescription: input.reportDescription }),
120
- ...(input.reportFrequency !== undefined &&
121
- input.reportFrequency !== null && { reportFrequency: input.reportFrequency }),
122
- ...(input.reportId !== undefined && input.reportId !== null && { reportId: input.reportId }),
115
+ ...(input.format != null && { format: input.format }),
116
+ ...(input.reportDescription != null && { reportDescription: input.reportDescription }),
117
+ ...(input.reportFrequency != null && { reportFrequency: input.reportFrequency }),
118
+ ...(input.reportId != null && { reportId: input.reportId }),
123
119
  });
124
120
  return new protocol_http_1.HttpRequest({
125
121
  protocol,
@@ -150,15 +146,12 @@ const serializeAws_restJson1UpdateReportDefinitionCommand = async (input, contex
150
146
  }
151
147
  let body;
152
148
  body = JSON.stringify({
153
- ...(input.destinationS3Location !== undefined &&
154
- input.destinationS3Location !== null && {
149
+ ...(input.destinationS3Location != null && {
155
150
  destinationS3Location: serializeAws_restJson1S3Location(input.destinationS3Location, context),
156
151
  }),
157
- ...(input.format !== undefined && input.format !== null && { format: input.format }),
158
- ...(input.reportDescription !== undefined &&
159
- input.reportDescription !== null && { reportDescription: input.reportDescription }),
160
- ...(input.reportFrequency !== undefined &&
161
- input.reportFrequency !== null && { reportFrequency: input.reportFrequency }),
152
+ ...(input.format != null && { format: input.format }),
153
+ ...(input.reportDescription != null && { reportDescription: input.reportDescription }),
154
+ ...(input.reportFrequency != null && { reportFrequency: input.reportFrequency }),
162
155
  });
163
156
  return new protocol_http_1.HttpRequest({
164
157
  protocol,
@@ -192,8 +185,7 @@ const deserializeAws_restJson1DeleteReportDefinitionCommandError = async (output
192
185
  body: await parseBody(output.body, context),
193
186
  };
194
187
  let response;
195
- let errorCode = "UnknownError";
196
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
188
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
197
189
  switch (errorCode) {
198
190
  case "AccessDeniedException":
199
191
  case "com.amazonaws.applicationcostprofiler#AccessDeniedException":
@@ -209,10 +201,12 @@ const deserializeAws_restJson1DeleteReportDefinitionCommandError = async (output
209
201
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
210
202
  default:
211
203
  const parsedBody = parsedOutput.body;
204
+ const $metadata = deserializeMetadata(output);
205
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
212
206
  response = new ApplicationCostProfilerServiceException_1.ApplicationCostProfilerServiceException({
213
- name: parsedBody.code || parsedBody.Code || errorCode,
207
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
214
208
  $fault: "client",
215
- $metadata: deserializeMetadata(output),
209
+ $metadata,
216
210
  });
217
211
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
218
212
  }
@@ -262,8 +256,7 @@ const deserializeAws_restJson1GetReportDefinitionCommandError = async (output, c
262
256
  body: await parseBody(output.body, context),
263
257
  };
264
258
  let response;
265
- let errorCode = "UnknownError";
266
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
259
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
267
260
  switch (errorCode) {
268
261
  case "AccessDeniedException":
269
262
  case "com.amazonaws.applicationcostprofiler#AccessDeniedException":
@@ -279,10 +272,12 @@ const deserializeAws_restJson1GetReportDefinitionCommandError = async (output, c
279
272
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
280
273
  default:
281
274
  const parsedBody = parsedOutput.body;
275
+ const $metadata = deserializeMetadata(output);
276
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
282
277
  response = new ApplicationCostProfilerServiceException_1.ApplicationCostProfilerServiceException({
283
- name: parsedBody.code || parsedBody.Code || errorCode,
278
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
284
279
  $fault: "client",
285
- $metadata: deserializeMetadata(output),
280
+ $metadata,
286
281
  });
287
282
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
288
283
  }
@@ -308,8 +303,7 @@ const deserializeAws_restJson1ImportApplicationUsageCommandError = async (output
308
303
  body: await parseBody(output.body, context),
309
304
  };
310
305
  let response;
311
- let errorCode = "UnknownError";
312
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
306
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
313
307
  switch (errorCode) {
314
308
  case "AccessDeniedException":
315
309
  case "com.amazonaws.applicationcostprofiler#AccessDeniedException":
@@ -325,10 +319,12 @@ const deserializeAws_restJson1ImportApplicationUsageCommandError = async (output
325
319
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
326
320
  default:
327
321
  const parsedBody = parsedOutput.body;
322
+ const $metadata = deserializeMetadata(output);
323
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
328
324
  response = new ApplicationCostProfilerServiceException_1.ApplicationCostProfilerServiceException({
329
- name: parsedBody.code || parsedBody.Code || errorCode,
325
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
330
326
  $fault: "client",
331
- $metadata: deserializeMetadata(output),
327
+ $metadata,
332
328
  });
333
329
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
334
330
  }
@@ -358,8 +354,7 @@ const deserializeAws_restJson1ListReportDefinitionsCommandError = async (output,
358
354
  body: await parseBody(output.body, context),
359
355
  };
360
356
  let response;
361
- let errorCode = "UnknownError";
362
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
357
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
363
358
  switch (errorCode) {
364
359
  case "AccessDeniedException":
365
360
  case "com.amazonaws.applicationcostprofiler#AccessDeniedException":
@@ -375,10 +370,12 @@ const deserializeAws_restJson1ListReportDefinitionsCommandError = async (output,
375
370
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
376
371
  default:
377
372
  const parsedBody = parsedOutput.body;
373
+ const $metadata = deserializeMetadata(output);
374
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
378
375
  response = new ApplicationCostProfilerServiceException_1.ApplicationCostProfilerServiceException({
379
- name: parsedBody.code || parsedBody.Code || errorCode,
376
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
380
377
  $fault: "client",
381
- $metadata: deserializeMetadata(output),
378
+ $metadata,
382
379
  });
383
380
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
384
381
  }
@@ -404,8 +401,7 @@ const deserializeAws_restJson1PutReportDefinitionCommandError = async (output, c
404
401
  body: await parseBody(output.body, context),
405
402
  };
406
403
  let response;
407
- let errorCode = "UnknownError";
408
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
404
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
409
405
  switch (errorCode) {
410
406
  case "AccessDeniedException":
411
407
  case "com.amazonaws.applicationcostprofiler#AccessDeniedException":
@@ -424,10 +420,12 @@ const deserializeAws_restJson1PutReportDefinitionCommandError = async (output, c
424
420
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
425
421
  default:
426
422
  const parsedBody = parsedOutput.body;
423
+ const $metadata = deserializeMetadata(output);
424
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
427
425
  response = new ApplicationCostProfilerServiceException_1.ApplicationCostProfilerServiceException({
428
- name: parsedBody.code || parsedBody.Code || errorCode,
426
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
429
427
  $fault: "client",
430
- $metadata: deserializeMetadata(output),
428
+ $metadata,
431
429
  });
432
430
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
433
431
  }
@@ -453,8 +451,7 @@ const deserializeAws_restJson1UpdateReportDefinitionCommandError = async (output
453
451
  body: await parseBody(output.body, context),
454
452
  };
455
453
  let response;
456
- let errorCode = "UnknownError";
457
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
454
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
458
455
  switch (errorCode) {
459
456
  case "AccessDeniedException":
460
457
  case "com.amazonaws.applicationcostprofiler#AccessDeniedException":
@@ -470,10 +467,12 @@ const deserializeAws_restJson1UpdateReportDefinitionCommandError = async (output
470
467
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
471
468
  default:
472
469
  const parsedBody = parsedOutput.body;
470
+ const $metadata = deserializeMetadata(output);
471
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
473
472
  response = new ApplicationCostProfilerServiceException_1.ApplicationCostProfilerServiceException({
474
- name: parsedBody.code || parsedBody.Code || errorCode,
473
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
475
474
  $fault: "client",
476
- $metadata: deserializeMetadata(output),
475
+ $metadata,
477
476
  });
478
477
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
479
478
  }
@@ -540,27 +539,25 @@ const deserializeAws_restJson1ValidationExceptionResponse = async (parsedOutput,
540
539
  };
541
540
  const serializeAws_restJson1S3Location = (input, context) => {
542
541
  return {
543
- ...(input.bucket !== undefined && input.bucket !== null && { bucket: input.bucket }),
544
- ...(input.prefix !== undefined && input.prefix !== null && { prefix: input.prefix }),
542
+ ...(input.bucket != null && { bucket: input.bucket }),
543
+ ...(input.prefix != null && { prefix: input.prefix }),
545
544
  };
546
545
  };
547
546
  const serializeAws_restJson1SourceS3Location = (input, context) => {
548
547
  return {
549
- ...(input.bucket !== undefined && input.bucket !== null && { bucket: input.bucket }),
550
- ...(input.key !== undefined && input.key !== null && { key: input.key }),
551
- ...(input.region !== undefined && input.region !== null && { region: input.region }),
548
+ ...(input.bucket != null && { bucket: input.bucket }),
549
+ ...(input.key != null && { key: input.key }),
550
+ ...(input.region != null && { region: input.region }),
552
551
  };
553
552
  };
554
553
  const deserializeAws_restJson1ReportDefinition = (output, context) => {
555
554
  return {
556
- createdAt: output.createdAt !== undefined && output.createdAt !== null
557
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.createdAt)))
558
- : undefined,
559
- destinationS3Location: output.destinationS3Location !== undefined && output.destinationS3Location !== null
555
+ createdAt: output.createdAt != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.createdAt))) : undefined,
556
+ destinationS3Location: output.destinationS3Location != null
560
557
  ? deserializeAws_restJson1S3Location(output.destinationS3Location, context)
561
558
  : undefined,
562
559
  format: (0, smithy_client_1.expectString)(output.format),
563
- lastUpdatedAt: output.lastUpdatedAt !== undefined && output.lastUpdatedAt !== null
560
+ lastUpdatedAt: output.lastUpdatedAt != null
564
561
  ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.lastUpdatedAt)))
565
562
  : undefined,
566
563
  reportDescription: (0, smithy_client_1.expectString)(output.reportDescription),
@@ -634,5 +631,4 @@ const loadRestJsonErrorCode = (output, data) => {
634
631
  if (data["__type"] !== undefined) {
635
632
  return sanitizeErrorCode(data["__type"]);
636
633
  }
637
- return "";
638
634
  };
@@ -76,8 +76,7 @@ export var serializeAws_restJson1ImportApplicationUsageCommand = function (input
76
76
  "content-type": "application/json",
77
77
  };
78
78
  resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/importApplicationUsage";
79
- body = JSON.stringify(__assign({}, (input.sourceS3Location !== undefined &&
80
- input.sourceS3Location !== null && {
79
+ body = JSON.stringify(__assign({}, (input.sourceS3Location != null && {
81
80
  sourceS3Location: serializeAws_restJson1SourceS3Location(input.sourceS3Location, context),
82
81
  })));
83
82
  return [2, new __HttpRequest({
@@ -126,12 +125,9 @@ export var serializeAws_restJson1PutReportDefinitionCommand = function (input, c
126
125
  "content-type": "application/json",
127
126
  };
128
127
  resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/reportDefinition";
129
- body = JSON.stringify(__assign(__assign(__assign(__assign(__assign({}, (input.destinationS3Location !== undefined &&
130
- input.destinationS3Location !== null && {
128
+ body = JSON.stringify(__assign(__assign(__assign(__assign(__assign({}, (input.destinationS3Location != null && {
131
129
  destinationS3Location: serializeAws_restJson1S3Location(input.destinationS3Location, context),
132
- })), (input.format !== undefined && input.format !== null && { format: input.format })), (input.reportDescription !== undefined &&
133
- input.reportDescription !== null && { reportDescription: input.reportDescription })), (input.reportFrequency !== undefined &&
134
- input.reportFrequency !== null && { reportFrequency: input.reportFrequency })), (input.reportId !== undefined && input.reportId !== null && { reportId: input.reportId })));
130
+ })), (input.format != null && { format: input.format })), (input.reportDescription != null && { reportDescription: input.reportDescription })), (input.reportFrequency != null && { reportFrequency: input.reportFrequency })), (input.reportId != null && { reportId: input.reportId })));
135
131
  return [2, new __HttpRequest({
136
132
  protocol: protocol,
137
133
  hostname: hostname,
@@ -165,12 +161,9 @@ export var serializeAws_restJson1UpdateReportDefinitionCommand = function (input
165
161
  else {
166
162
  throw new Error("No value provided for input HTTP label: reportId.");
167
163
  }
168
- body = JSON.stringify(__assign(__assign(__assign(__assign({}, (input.destinationS3Location !== undefined &&
169
- input.destinationS3Location !== null && {
164
+ body = JSON.stringify(__assign(__assign(__assign(__assign({}, (input.destinationS3Location != null && {
170
165
  destinationS3Location: serializeAws_restJson1S3Location(input.destinationS3Location, context),
171
- })), (input.format !== undefined && input.format !== null && { format: input.format })), (input.reportDescription !== undefined &&
172
- input.reportDescription !== null && { reportDescription: input.reportDescription })), (input.reportFrequency !== undefined &&
173
- input.reportFrequency !== null && { reportFrequency: input.reportFrequency })));
166
+ })), (input.format != null && { format: input.format })), (input.reportDescription != null && { reportDescription: input.reportDescription })), (input.reportFrequency != null && { reportFrequency: input.reportFrequency })));
174
167
  return [2, new __HttpRequest({
175
168
  protocol: protocol,
176
169
  hostname: hostname,
@@ -208,7 +201,7 @@ export var deserializeAws_restJson1DeleteReportDefinitionCommand = function (out
208
201
  });
209
202
  }); };
210
203
  var deserializeAws_restJson1DeleteReportDefinitionCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
211
- var parsedOutput, _a, response, errorCode, _b, parsedBody;
204
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
212
205
  var _c;
213
206
  return __generator(this, function (_d) {
214
207
  switch (_d.label) {
@@ -218,7 +211,6 @@ var deserializeAws_restJson1DeleteReportDefinitionCommandError = function (outpu
218
211
  return [4, parseBody(output.body, context)];
219
212
  case 1:
220
213
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
221
- errorCode = "UnknownError";
222
214
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
223
215
  _b = errorCode;
224
216
  switch (_b) {
@@ -242,10 +234,12 @@ var deserializeAws_restJson1DeleteReportDefinitionCommandError = function (outpu
242
234
  case 9: throw _d.sent();
243
235
  case 10:
244
236
  parsedBody = parsedOutput.body;
237
+ $metadata = deserializeMetadata(output);
238
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
245
239
  response = new __BaseException({
246
- name: parsedBody.code || parsedBody.Code || errorCode,
240
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
247
241
  $fault: "client",
248
- $metadata: deserializeMetadata(output),
242
+ $metadata: $metadata,
249
243
  });
250
244
  throw __decorateServiceException(response, parsedBody);
251
245
  }
@@ -300,7 +294,7 @@ export var deserializeAws_restJson1GetReportDefinitionCommand = function (output
300
294
  });
301
295
  }); };
302
296
  var deserializeAws_restJson1GetReportDefinitionCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
303
- var parsedOutput, _a, response, errorCode, _b, parsedBody;
297
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
304
298
  var _c;
305
299
  return __generator(this, function (_d) {
306
300
  switch (_d.label) {
@@ -310,7 +304,6 @@ var deserializeAws_restJson1GetReportDefinitionCommandError = function (output,
310
304
  return [4, parseBody(output.body, context)];
311
305
  case 1:
312
306
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
313
- errorCode = "UnknownError";
314
307
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
315
308
  _b = errorCode;
316
309
  switch (_b) {
@@ -334,10 +327,12 @@ var deserializeAws_restJson1GetReportDefinitionCommandError = function (output,
334
327
  case 9: throw _d.sent();
335
328
  case 10:
336
329
  parsedBody = parsedOutput.body;
330
+ $metadata = deserializeMetadata(output);
331
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
337
332
  response = new __BaseException({
338
- name: parsedBody.code || parsedBody.Code || errorCode,
333
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
339
334
  $fault: "client",
340
- $metadata: deserializeMetadata(output),
335
+ $metadata: $metadata,
341
336
  });
342
337
  throw __decorateServiceException(response, parsedBody);
343
338
  }
@@ -368,7 +363,7 @@ export var deserializeAws_restJson1ImportApplicationUsageCommand = function (out
368
363
  });
369
364
  }); };
370
365
  var deserializeAws_restJson1ImportApplicationUsageCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
371
- var parsedOutput, _a, response, errorCode, _b, parsedBody;
366
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
372
367
  var _c;
373
368
  return __generator(this, function (_d) {
374
369
  switch (_d.label) {
@@ -378,7 +373,6 @@ var deserializeAws_restJson1ImportApplicationUsageCommandError = function (outpu
378
373
  return [4, parseBody(output.body, context)];
379
374
  case 1:
380
375
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
381
- errorCode = "UnknownError";
382
376
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
383
377
  _b = errorCode;
384
378
  switch (_b) {
@@ -402,10 +396,12 @@ var deserializeAws_restJson1ImportApplicationUsageCommandError = function (outpu
402
396
  case 9: throw _d.sent();
403
397
  case 10:
404
398
  parsedBody = parsedOutput.body;
399
+ $metadata = deserializeMetadata(output);
400
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
405
401
  response = new __BaseException({
406
- name: parsedBody.code || parsedBody.Code || errorCode,
402
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
407
403
  $fault: "client",
408
- $metadata: deserializeMetadata(output),
404
+ $metadata: $metadata,
409
405
  });
410
406
  throw __decorateServiceException(response, parsedBody);
411
407
  }
@@ -440,7 +436,7 @@ export var deserializeAws_restJson1ListReportDefinitionsCommand = function (outp
440
436
  });
441
437
  }); };
442
438
  var deserializeAws_restJson1ListReportDefinitionsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
443
- var parsedOutput, _a, response, errorCode, _b, parsedBody;
439
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
444
440
  var _c;
445
441
  return __generator(this, function (_d) {
446
442
  switch (_d.label) {
@@ -450,7 +446,6 @@ var deserializeAws_restJson1ListReportDefinitionsCommandError = function (output
450
446
  return [4, parseBody(output.body, context)];
451
447
  case 1:
452
448
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
453
- errorCode = "UnknownError";
454
449
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
455
450
  _b = errorCode;
456
451
  switch (_b) {
@@ -474,10 +469,12 @@ var deserializeAws_restJson1ListReportDefinitionsCommandError = function (output
474
469
  case 9: throw _d.sent();
475
470
  case 10:
476
471
  parsedBody = parsedOutput.body;
472
+ $metadata = deserializeMetadata(output);
473
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
477
474
  response = new __BaseException({
478
- name: parsedBody.code || parsedBody.Code || errorCode,
475
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
479
476
  $fault: "client",
480
- $metadata: deserializeMetadata(output),
477
+ $metadata: $metadata,
481
478
  });
482
479
  throw __decorateServiceException(response, parsedBody);
483
480
  }
@@ -508,7 +505,7 @@ export var deserializeAws_restJson1PutReportDefinitionCommand = function (output
508
505
  });
509
506
  }); };
510
507
  var deserializeAws_restJson1PutReportDefinitionCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
511
- var parsedOutput, _a, response, errorCode, _b, parsedBody;
508
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
512
509
  var _c;
513
510
  return __generator(this, function (_d) {
514
511
  switch (_d.label) {
@@ -518,7 +515,6 @@ var deserializeAws_restJson1PutReportDefinitionCommandError = function (output,
518
515
  return [4, parseBody(output.body, context)];
519
516
  case 1:
520
517
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
521
- errorCode = "UnknownError";
522
518
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
523
519
  _b = errorCode;
524
520
  switch (_b) {
@@ -546,10 +542,12 @@ var deserializeAws_restJson1PutReportDefinitionCommandError = function (output,
546
542
  case 11: throw _d.sent();
547
543
  case 12:
548
544
  parsedBody = parsedOutput.body;
545
+ $metadata = deserializeMetadata(output);
546
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
549
547
  response = new __BaseException({
550
- name: parsedBody.code || parsedBody.Code || errorCode,
548
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
551
549
  $fault: "client",
552
- $metadata: deserializeMetadata(output),
550
+ $metadata: $metadata,
553
551
  });
554
552
  throw __decorateServiceException(response, parsedBody);
555
553
  }
@@ -580,7 +578,7 @@ export var deserializeAws_restJson1UpdateReportDefinitionCommand = function (out
580
578
  });
581
579
  }); };
582
580
  var deserializeAws_restJson1UpdateReportDefinitionCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
583
- var parsedOutput, _a, response, errorCode, _b, parsedBody;
581
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
584
582
  var _c;
585
583
  return __generator(this, function (_d) {
586
584
  switch (_d.label) {
@@ -590,7 +588,6 @@ var deserializeAws_restJson1UpdateReportDefinitionCommandError = function (outpu
590
588
  return [4, parseBody(output.body, context)];
591
589
  case 1:
592
590
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
593
- errorCode = "UnknownError";
594
591
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
595
592
  _b = errorCode;
596
593
  switch (_b) {
@@ -614,10 +611,12 @@ var deserializeAws_restJson1UpdateReportDefinitionCommandError = function (outpu
614
611
  case 9: throw _d.sent();
615
612
  case 10:
616
613
  parsedBody = parsedOutput.body;
614
+ $metadata = deserializeMetadata(output);
615
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
617
616
  response = new __BaseException({
618
- name: parsedBody.code || parsedBody.Code || errorCode,
617
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
619
618
  $fault: "client",
620
- $metadata: deserializeMetadata(output),
619
+ $metadata: $metadata,
621
620
  });
622
621
  throw __decorateServiceException(response, parsedBody);
623
622
  }
@@ -684,21 +683,19 @@ var deserializeAws_restJson1ValidationExceptionResponse = function (parsedOutput
684
683
  });
685
684
  }); };
686
685
  var serializeAws_restJson1S3Location = function (input, context) {
687
- return __assign(__assign({}, (input.bucket !== undefined && input.bucket !== null && { bucket: input.bucket })), (input.prefix !== undefined && input.prefix !== null && { prefix: input.prefix }));
686
+ return __assign(__assign({}, (input.bucket != null && { bucket: input.bucket })), (input.prefix != null && { prefix: input.prefix }));
688
687
  };
689
688
  var serializeAws_restJson1SourceS3Location = function (input, context) {
690
- return __assign(__assign(__assign({}, (input.bucket !== undefined && input.bucket !== null && { bucket: input.bucket })), (input.key !== undefined && input.key !== null && { key: input.key })), (input.region !== undefined && input.region !== null && { region: input.region }));
689
+ return __assign(__assign(__assign({}, (input.bucket != null && { bucket: input.bucket })), (input.key != null && { key: input.key })), (input.region != null && { region: input.region }));
691
690
  };
692
691
  var deserializeAws_restJson1ReportDefinition = function (output, context) {
693
692
  return {
694
- createdAt: output.createdAt !== undefined && output.createdAt !== null
695
- ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createdAt)))
696
- : undefined,
697
- destinationS3Location: output.destinationS3Location !== undefined && output.destinationS3Location !== null
693
+ createdAt: output.createdAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createdAt))) : undefined,
694
+ destinationS3Location: output.destinationS3Location != null
698
695
  ? deserializeAws_restJson1S3Location(output.destinationS3Location, context)
699
696
  : undefined,
700
697
  format: __expectString(output.format),
701
- lastUpdatedAt: output.lastUpdatedAt !== undefined && output.lastUpdatedAt !== null
698
+ lastUpdatedAt: output.lastUpdatedAt != null
702
699
  ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastUpdatedAt)))
703
700
  : undefined,
704
701
  reportDescription: __expectString(output.reportDescription),
@@ -779,5 +776,4 @@ var loadRestJsonErrorCode = function (output, data) {
779
776
  if (data["__type"] !== undefined) {
780
777
  return sanitizeErrorCode(data["__type"]);
781
778
  }
782
- return "";
783
779
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@aws-sdk/client-applicationcostprofiler",
3
3
  "description": "AWS SDK for JavaScript Applicationcostprofiler Client for Node.js, Browser and React Native",
4
- "version": "3.118.1",
4
+ "version": "3.128.0",
5
5
  "scripts": {
6
6
  "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
7
7
  "build:cjs": "tsc -p tsconfig.cjs.json",
@@ -18,35 +18,35 @@
18
18
  "dependencies": {
19
19
  "@aws-crypto/sha256-browser": "2.0.0",
20
20
  "@aws-crypto/sha256-js": "2.0.0",
21
- "@aws-sdk/client-sts": "3.118.1",
22
- "@aws-sdk/config-resolver": "3.110.0",
23
- "@aws-sdk/credential-provider-node": "3.118.1",
24
- "@aws-sdk/fetch-http-handler": "3.110.0",
25
- "@aws-sdk/hash-node": "3.110.0",
26
- "@aws-sdk/invalid-dependency": "3.110.0",
27
- "@aws-sdk/middleware-content-length": "3.110.0",
28
- "@aws-sdk/middleware-host-header": "3.110.0",
29
- "@aws-sdk/middleware-logger": "3.110.0",
30
- "@aws-sdk/middleware-recursion-detection": "3.110.0",
31
- "@aws-sdk/middleware-retry": "3.118.1",
32
- "@aws-sdk/middleware-serde": "3.110.0",
33
- "@aws-sdk/middleware-signing": "3.110.0",
34
- "@aws-sdk/middleware-stack": "3.110.0",
35
- "@aws-sdk/middleware-user-agent": "3.110.0",
36
- "@aws-sdk/node-config-provider": "3.110.0",
37
- "@aws-sdk/node-http-handler": "3.118.1",
38
- "@aws-sdk/protocol-http": "3.110.0",
39
- "@aws-sdk/smithy-client": "3.110.0",
40
- "@aws-sdk/types": "3.110.0",
41
- "@aws-sdk/url-parser": "3.110.0",
21
+ "@aws-sdk/client-sts": "3.128.0",
22
+ "@aws-sdk/config-resolver": "3.128.0",
23
+ "@aws-sdk/credential-provider-node": "3.128.0",
24
+ "@aws-sdk/fetch-http-handler": "3.127.0",
25
+ "@aws-sdk/hash-node": "3.127.0",
26
+ "@aws-sdk/invalid-dependency": "3.127.0",
27
+ "@aws-sdk/middleware-content-length": "3.127.0",
28
+ "@aws-sdk/middleware-host-header": "3.127.0",
29
+ "@aws-sdk/middleware-logger": "3.127.0",
30
+ "@aws-sdk/middleware-recursion-detection": "3.127.0",
31
+ "@aws-sdk/middleware-retry": "3.127.0",
32
+ "@aws-sdk/middleware-serde": "3.127.0",
33
+ "@aws-sdk/middleware-signing": "3.128.0",
34
+ "@aws-sdk/middleware-stack": "3.127.0",
35
+ "@aws-sdk/middleware-user-agent": "3.127.0",
36
+ "@aws-sdk/node-config-provider": "3.127.0",
37
+ "@aws-sdk/node-http-handler": "3.127.0",
38
+ "@aws-sdk/protocol-http": "3.127.0",
39
+ "@aws-sdk/smithy-client": "3.127.0",
40
+ "@aws-sdk/types": "3.127.0",
41
+ "@aws-sdk/url-parser": "3.127.0",
42
42
  "@aws-sdk/util-base64-browser": "3.109.0",
43
43
  "@aws-sdk/util-base64-node": "3.55.0",
44
44
  "@aws-sdk/util-body-length-browser": "3.55.0",
45
45
  "@aws-sdk/util-body-length-node": "3.55.0",
46
- "@aws-sdk/util-defaults-mode-browser": "3.110.0",
47
- "@aws-sdk/util-defaults-mode-node": "3.110.0",
48
- "@aws-sdk/util-user-agent-browser": "3.110.0",
49
- "@aws-sdk/util-user-agent-node": "3.118.0",
46
+ "@aws-sdk/util-defaults-mode-browser": "3.127.0",
47
+ "@aws-sdk/util-defaults-mode-node": "3.128.0",
48
+ "@aws-sdk/util-user-agent-browser": "3.127.0",
49
+ "@aws-sdk/util-user-agent-node": "3.127.0",
50
50
  "@aws-sdk/util-utf8-browser": "3.109.0",
51
51
  "@aws-sdk/util-utf8-node": "3.109.0",
52
52
  "tslib": "^2.3.1"