@aws-sdk/client-applicationcostprofiler 3.51.0 → 3.54.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 +27 -0
- package/dist-cjs/index.js +3 -0
- package/dist-cjs/models/ApplicationCostProfilerServiceException.js +11 -0
- package/dist-cjs/models/models_0.js +67 -1
- package/dist-cjs/protocols/Aws_restJson1.js +83 -246
- package/dist-es/index.js +1 -0
- package/dist-es/models/ApplicationCostProfilerServiceException.js +12 -0
- package/dist-es/models/models_0.js +62 -1
- package/dist-es/protocols/Aws_restJson1.js +147 -276
- package/dist-types/ApplicationCostProfilerClient.d.ts +2 -2
- package/dist-types/index.d.ts +1 -0
- package/dist-types/models/ApplicationCostProfilerServiceException.d.ts +10 -0
- package/dist-types/models/models_0.d.ts +37 -21
- package/dist-types/runtimeConfig.browser.d.ts +1 -1
- package/dist-types/runtimeConfig.d.ts +1 -1
- package/dist-types/runtimeConfig.native.d.ts +1 -1
- package/dist-types/ts3.4/ApplicationCostProfilerClient.d.ts +2 -2
- package/dist-types/ts3.4/index.d.ts +1 -0
- package/dist-types/ts3.4/models/ApplicationCostProfilerServiceException.d.ts +6 -0
- package/dist-types/ts3.4/models/models_0.d.ts +27 -21
- package/dist-types/ts3.4/runtimeConfig.browser.d.ts +1 -1
- package/dist-types/ts3.4/runtimeConfig.d.ts +1 -1
- package/dist-types/ts3.4/runtimeConfig.native.d.ts +1 -1
- package/package.json +33 -33
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.54.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.53.1...v3.54.0) (2022-03-11)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @aws-sdk/client-applicationcostprofiler
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
# [3.53.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.52.0...v3.53.0) (2022-02-24)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### Features
|
|
18
|
+
|
|
19
|
+
* **clients:** generate service exceptions as classes ([#3267](https://github.com/aws/aws-sdk-js-v3/issues/3267)) ([ca64fee](https://github.com/aws/aws-sdk-js-v3/commit/ca64feed3351c394c07dc26b782a5760a396a074))
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
# [3.52.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.51.0...v3.52.0) (2022-02-18)
|
|
26
|
+
|
|
27
|
+
**Note:** Version bump only for package @aws-sdk/client-applicationcostprofiler
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
|
|
6
33
|
# [3.51.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.50.0...v3.51.0) (2022-02-12)
|
|
7
34
|
|
|
8
35
|
**Note:** Version bump only for package @aws-sdk/client-applicationcostprofiler
|
package/dist-cjs/index.js
CHANGED
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ApplicationCostProfilerServiceException = void 0;
|
|
3
4
|
const tslib_1 = require("tslib");
|
|
4
5
|
tslib_1.__exportStar(require("./ApplicationCostProfiler"), exports);
|
|
5
6
|
tslib_1.__exportStar(require("./ApplicationCostProfilerClient"), exports);
|
|
6
7
|
tslib_1.__exportStar(require("./commands"), exports);
|
|
7
8
|
tslib_1.__exportStar(require("./models"), exports);
|
|
8
9
|
tslib_1.__exportStar(require("./pagination"), exports);
|
|
10
|
+
var ApplicationCostProfilerServiceException_1 = require("./models/ApplicationCostProfilerServiceException");
|
|
11
|
+
Object.defineProperty(exports, "ApplicationCostProfilerServiceException", { enumerable: true, get: function () { return ApplicationCostProfilerServiceException_1.ApplicationCostProfilerServiceException; } });
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ApplicationCostProfilerServiceException = void 0;
|
|
4
|
+
const smithy_client_1 = require("@aws-sdk/smithy-client");
|
|
5
|
+
class ApplicationCostProfilerServiceException extends smithy_client_1.ServiceException {
|
|
6
|
+
constructor(options) {
|
|
7
|
+
super(options);
|
|
8
|
+
Object.setPrototypeOf(this, ApplicationCostProfilerServiceException.prototype);
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
exports.ApplicationCostProfilerServiceException = ApplicationCostProfilerServiceException;
|
|
@@ -1,6 +1,20 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.UpdateReportDefinitionResult = exports.UpdateReportDefinitionRequest = exports.PutReportDefinitionResult = exports.PutReportDefinitionRequest = exports.ListReportDefinitionsResult = exports.ReportDefinition = exports.ListReportDefinitionsRequest = exports.ImportApplicationUsageResult = exports.ImportApplicationUsageRequest = exports.SourceS3Location = exports.S3BucketRegion = exports.GetReportDefinitionResult = exports.ReportFrequency = exports.Format = exports.S3Location = exports.GetReportDefinitionRequest = exports.DeleteReportDefinitionResult = exports.DeleteReportDefinitionRequest = void 0;
|
|
3
|
+
exports.UpdateReportDefinitionResult = exports.UpdateReportDefinitionRequest = exports.ServiceQuotaExceededException = exports.PutReportDefinitionResult = exports.PutReportDefinitionRequest = exports.ListReportDefinitionsResult = exports.ReportDefinition = exports.ListReportDefinitionsRequest = exports.ImportApplicationUsageResult = exports.ImportApplicationUsageRequest = exports.SourceS3Location = exports.S3BucketRegion = exports.GetReportDefinitionResult = exports.ReportFrequency = exports.Format = exports.S3Location = exports.GetReportDefinitionRequest = exports.ValidationException = exports.ThrottlingException = exports.InternalServerException = exports.DeleteReportDefinitionResult = exports.DeleteReportDefinitionRequest = exports.AccessDeniedException = void 0;
|
|
4
|
+
const ApplicationCostProfilerServiceException_1 = require("./ApplicationCostProfilerServiceException");
|
|
5
|
+
class AccessDeniedException extends ApplicationCostProfilerServiceException_1.ApplicationCostProfilerServiceException {
|
|
6
|
+
constructor(opts) {
|
|
7
|
+
super({
|
|
8
|
+
name: "AccessDeniedException",
|
|
9
|
+
$fault: "client",
|
|
10
|
+
...opts,
|
|
11
|
+
});
|
|
12
|
+
this.name = "AccessDeniedException";
|
|
13
|
+
this.$fault = "client";
|
|
14
|
+
Object.setPrototypeOf(this, AccessDeniedException.prototype);
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
exports.AccessDeniedException = AccessDeniedException;
|
|
4
18
|
var DeleteReportDefinitionRequest;
|
|
5
19
|
(function (DeleteReportDefinitionRequest) {
|
|
6
20
|
DeleteReportDefinitionRequest.filterSensitiveLog = (obj) => ({
|
|
@@ -13,6 +27,45 @@ var DeleteReportDefinitionResult;
|
|
|
13
27
|
...obj,
|
|
14
28
|
});
|
|
15
29
|
})(DeleteReportDefinitionResult = exports.DeleteReportDefinitionResult || (exports.DeleteReportDefinitionResult = {}));
|
|
30
|
+
class InternalServerException extends ApplicationCostProfilerServiceException_1.ApplicationCostProfilerServiceException {
|
|
31
|
+
constructor(opts) {
|
|
32
|
+
super({
|
|
33
|
+
name: "InternalServerException",
|
|
34
|
+
$fault: "server",
|
|
35
|
+
...opts,
|
|
36
|
+
});
|
|
37
|
+
this.name = "InternalServerException";
|
|
38
|
+
this.$fault = "server";
|
|
39
|
+
Object.setPrototypeOf(this, InternalServerException.prototype);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
exports.InternalServerException = InternalServerException;
|
|
43
|
+
class ThrottlingException extends ApplicationCostProfilerServiceException_1.ApplicationCostProfilerServiceException {
|
|
44
|
+
constructor(opts) {
|
|
45
|
+
super({
|
|
46
|
+
name: "ThrottlingException",
|
|
47
|
+
$fault: "client",
|
|
48
|
+
...opts,
|
|
49
|
+
});
|
|
50
|
+
this.name = "ThrottlingException";
|
|
51
|
+
this.$fault = "client";
|
|
52
|
+
Object.setPrototypeOf(this, ThrottlingException.prototype);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
exports.ThrottlingException = ThrottlingException;
|
|
56
|
+
class ValidationException extends ApplicationCostProfilerServiceException_1.ApplicationCostProfilerServiceException {
|
|
57
|
+
constructor(opts) {
|
|
58
|
+
super({
|
|
59
|
+
name: "ValidationException",
|
|
60
|
+
$fault: "client",
|
|
61
|
+
...opts,
|
|
62
|
+
});
|
|
63
|
+
this.name = "ValidationException";
|
|
64
|
+
this.$fault = "client";
|
|
65
|
+
Object.setPrototypeOf(this, ValidationException.prototype);
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
exports.ValidationException = ValidationException;
|
|
16
69
|
var GetReportDefinitionRequest;
|
|
17
70
|
(function (GetReportDefinitionRequest) {
|
|
18
71
|
GetReportDefinitionRequest.filterSensitiveLog = (obj) => ({
|
|
@@ -97,6 +150,19 @@ var PutReportDefinitionResult;
|
|
|
97
150
|
...obj,
|
|
98
151
|
});
|
|
99
152
|
})(PutReportDefinitionResult = exports.PutReportDefinitionResult || (exports.PutReportDefinitionResult = {}));
|
|
153
|
+
class ServiceQuotaExceededException extends ApplicationCostProfilerServiceException_1.ApplicationCostProfilerServiceException {
|
|
154
|
+
constructor(opts) {
|
|
155
|
+
super({
|
|
156
|
+
name: "ServiceQuotaExceededException",
|
|
157
|
+
$fault: "client",
|
|
158
|
+
...opts,
|
|
159
|
+
});
|
|
160
|
+
this.name = "ServiceQuotaExceededException";
|
|
161
|
+
this.$fault = "client";
|
|
162
|
+
Object.setPrototypeOf(this, ServiceQuotaExceededException.prototype);
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
exports.ServiceQuotaExceededException = ServiceQuotaExceededException;
|
|
100
166
|
var UpdateReportDefinitionRequest;
|
|
101
167
|
(function (UpdateReportDefinitionRequest) {
|
|
102
168
|
UpdateReportDefinitionRequest.filterSensitiveLog = (obj) => ({
|
|
@@ -3,6 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.deserializeAws_restJson1UpdateReportDefinitionCommand = exports.deserializeAws_restJson1PutReportDefinitionCommand = exports.deserializeAws_restJson1ListReportDefinitionsCommand = exports.deserializeAws_restJson1ImportApplicationUsageCommand = exports.deserializeAws_restJson1GetReportDefinitionCommand = exports.deserializeAws_restJson1DeleteReportDefinitionCommand = exports.serializeAws_restJson1UpdateReportDefinitionCommand = exports.serializeAws_restJson1PutReportDefinitionCommand = exports.serializeAws_restJson1ListReportDefinitionsCommand = exports.serializeAws_restJson1ImportApplicationUsageCommand = exports.serializeAws_restJson1GetReportDefinitionCommand = exports.serializeAws_restJson1DeleteReportDefinitionCommand = void 0;
|
|
4
4
|
const protocol_http_1 = require("@aws-sdk/protocol-http");
|
|
5
5
|
const smithy_client_1 = require("@aws-sdk/smithy-client");
|
|
6
|
+
const ApplicationCostProfilerServiceException_1 = require("../models/ApplicationCostProfilerServiceException");
|
|
7
|
+
const models_0_1 = require("../models/models_0");
|
|
6
8
|
const serializeAws_restJson1DeleteReportDefinitionCommand = async (input, context) => {
|
|
7
9
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
8
10
|
const headers = {};
|
|
@@ -195,51 +197,25 @@ const deserializeAws_restJson1DeleteReportDefinitionCommandError = async (output
|
|
|
195
197
|
switch (errorCode) {
|
|
196
198
|
case "AccessDeniedException":
|
|
197
199
|
case "com.amazonaws.applicationcostprofiler#AccessDeniedException":
|
|
198
|
-
|
|
199
|
-
...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
200
|
-
name: errorCode,
|
|
201
|
-
$metadata: deserializeMetadata(output),
|
|
202
|
-
};
|
|
203
|
-
break;
|
|
200
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
204
201
|
case "InternalServerException":
|
|
205
202
|
case "com.amazonaws.applicationcostprofiler#InternalServerException":
|
|
206
|
-
|
|
207
|
-
...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
|
|
208
|
-
name: errorCode,
|
|
209
|
-
$metadata: deserializeMetadata(output),
|
|
210
|
-
};
|
|
211
|
-
break;
|
|
203
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
212
204
|
case "ThrottlingException":
|
|
213
205
|
case "com.amazonaws.applicationcostprofiler#ThrottlingException":
|
|
214
|
-
|
|
215
|
-
...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
|
|
216
|
-
name: errorCode,
|
|
217
|
-
$metadata: deserializeMetadata(output),
|
|
218
|
-
};
|
|
219
|
-
break;
|
|
206
|
+
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
220
207
|
case "ValidationException":
|
|
221
208
|
case "com.amazonaws.applicationcostprofiler#ValidationException":
|
|
222
|
-
|
|
223
|
-
...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
|
|
224
|
-
name: errorCode,
|
|
225
|
-
$metadata: deserializeMetadata(output),
|
|
226
|
-
};
|
|
227
|
-
break;
|
|
209
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
228
210
|
default:
|
|
229
211
|
const parsedBody = parsedOutput.body;
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
...parsedBody,
|
|
233
|
-
name: `${errorCode}`,
|
|
234
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
212
|
+
response = new ApplicationCostProfilerServiceException_1.ApplicationCostProfilerServiceException({
|
|
213
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
235
214
|
$fault: "client",
|
|
236
215
|
$metadata: deserializeMetadata(output),
|
|
237
|
-
};
|
|
216
|
+
});
|
|
217
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
238
218
|
}
|
|
239
|
-
const message = response.message || response.Message || errorCode;
|
|
240
|
-
response.message = message;
|
|
241
|
-
delete response.Message;
|
|
242
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
243
219
|
};
|
|
244
220
|
const deserializeAws_restJson1GetReportDefinitionCommand = async (output, context) => {
|
|
245
221
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
@@ -291,51 +267,25 @@ const deserializeAws_restJson1GetReportDefinitionCommandError = async (output, c
|
|
|
291
267
|
switch (errorCode) {
|
|
292
268
|
case "AccessDeniedException":
|
|
293
269
|
case "com.amazonaws.applicationcostprofiler#AccessDeniedException":
|
|
294
|
-
|
|
295
|
-
...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
296
|
-
name: errorCode,
|
|
297
|
-
$metadata: deserializeMetadata(output),
|
|
298
|
-
};
|
|
299
|
-
break;
|
|
270
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
300
271
|
case "InternalServerException":
|
|
301
272
|
case "com.amazonaws.applicationcostprofiler#InternalServerException":
|
|
302
|
-
|
|
303
|
-
...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
|
|
304
|
-
name: errorCode,
|
|
305
|
-
$metadata: deserializeMetadata(output),
|
|
306
|
-
};
|
|
307
|
-
break;
|
|
273
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
308
274
|
case "ThrottlingException":
|
|
309
275
|
case "com.amazonaws.applicationcostprofiler#ThrottlingException":
|
|
310
|
-
|
|
311
|
-
...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
|
|
312
|
-
name: errorCode,
|
|
313
|
-
$metadata: deserializeMetadata(output),
|
|
314
|
-
};
|
|
315
|
-
break;
|
|
276
|
+
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
316
277
|
case "ValidationException":
|
|
317
278
|
case "com.amazonaws.applicationcostprofiler#ValidationException":
|
|
318
|
-
|
|
319
|
-
...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
|
|
320
|
-
name: errorCode,
|
|
321
|
-
$metadata: deserializeMetadata(output),
|
|
322
|
-
};
|
|
323
|
-
break;
|
|
279
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
324
280
|
default:
|
|
325
281
|
const parsedBody = parsedOutput.body;
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
...parsedBody,
|
|
329
|
-
name: `${errorCode}`,
|
|
330
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
282
|
+
response = new ApplicationCostProfilerServiceException_1.ApplicationCostProfilerServiceException({
|
|
283
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
331
284
|
$fault: "client",
|
|
332
285
|
$metadata: deserializeMetadata(output),
|
|
333
|
-
};
|
|
286
|
+
});
|
|
287
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
334
288
|
}
|
|
335
|
-
const message = response.message || response.Message || errorCode;
|
|
336
|
-
response.message = message;
|
|
337
|
-
delete response.Message;
|
|
338
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
339
289
|
};
|
|
340
290
|
const deserializeAws_restJson1ImportApplicationUsageCommand = async (output, context) => {
|
|
341
291
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
@@ -363,51 +313,25 @@ const deserializeAws_restJson1ImportApplicationUsageCommandError = async (output
|
|
|
363
313
|
switch (errorCode) {
|
|
364
314
|
case "AccessDeniedException":
|
|
365
315
|
case "com.amazonaws.applicationcostprofiler#AccessDeniedException":
|
|
366
|
-
|
|
367
|
-
...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
368
|
-
name: errorCode,
|
|
369
|
-
$metadata: deserializeMetadata(output),
|
|
370
|
-
};
|
|
371
|
-
break;
|
|
316
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
372
317
|
case "InternalServerException":
|
|
373
318
|
case "com.amazonaws.applicationcostprofiler#InternalServerException":
|
|
374
|
-
|
|
375
|
-
...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
|
|
376
|
-
name: errorCode,
|
|
377
|
-
$metadata: deserializeMetadata(output),
|
|
378
|
-
};
|
|
379
|
-
break;
|
|
319
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
380
320
|
case "ThrottlingException":
|
|
381
321
|
case "com.amazonaws.applicationcostprofiler#ThrottlingException":
|
|
382
|
-
|
|
383
|
-
...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
|
|
384
|
-
name: errorCode,
|
|
385
|
-
$metadata: deserializeMetadata(output),
|
|
386
|
-
};
|
|
387
|
-
break;
|
|
322
|
+
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
388
323
|
case "ValidationException":
|
|
389
324
|
case "com.amazonaws.applicationcostprofiler#ValidationException":
|
|
390
|
-
|
|
391
|
-
...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
|
|
392
|
-
name: errorCode,
|
|
393
|
-
$metadata: deserializeMetadata(output),
|
|
394
|
-
};
|
|
395
|
-
break;
|
|
325
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
396
326
|
default:
|
|
397
327
|
const parsedBody = parsedOutput.body;
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
...parsedBody,
|
|
401
|
-
name: `${errorCode}`,
|
|
402
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
328
|
+
response = new ApplicationCostProfilerServiceException_1.ApplicationCostProfilerServiceException({
|
|
329
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
403
330
|
$fault: "client",
|
|
404
331
|
$metadata: deserializeMetadata(output),
|
|
405
|
-
};
|
|
332
|
+
});
|
|
333
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
406
334
|
}
|
|
407
|
-
const message = response.message || response.Message || errorCode;
|
|
408
|
-
response.message = message;
|
|
409
|
-
delete response.Message;
|
|
410
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
411
335
|
};
|
|
412
336
|
const deserializeAws_restJson1ListReportDefinitionsCommand = async (output, context) => {
|
|
413
337
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
@@ -439,51 +363,25 @@ const deserializeAws_restJson1ListReportDefinitionsCommandError = async (output,
|
|
|
439
363
|
switch (errorCode) {
|
|
440
364
|
case "AccessDeniedException":
|
|
441
365
|
case "com.amazonaws.applicationcostprofiler#AccessDeniedException":
|
|
442
|
-
|
|
443
|
-
...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
444
|
-
name: errorCode,
|
|
445
|
-
$metadata: deserializeMetadata(output),
|
|
446
|
-
};
|
|
447
|
-
break;
|
|
366
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
448
367
|
case "InternalServerException":
|
|
449
368
|
case "com.amazonaws.applicationcostprofiler#InternalServerException":
|
|
450
|
-
|
|
451
|
-
...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
|
|
452
|
-
name: errorCode,
|
|
453
|
-
$metadata: deserializeMetadata(output),
|
|
454
|
-
};
|
|
455
|
-
break;
|
|
369
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
456
370
|
case "ThrottlingException":
|
|
457
371
|
case "com.amazonaws.applicationcostprofiler#ThrottlingException":
|
|
458
|
-
|
|
459
|
-
...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
|
|
460
|
-
name: errorCode,
|
|
461
|
-
$metadata: deserializeMetadata(output),
|
|
462
|
-
};
|
|
463
|
-
break;
|
|
372
|
+
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
464
373
|
case "ValidationException":
|
|
465
374
|
case "com.amazonaws.applicationcostprofiler#ValidationException":
|
|
466
|
-
|
|
467
|
-
...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
|
|
468
|
-
name: errorCode,
|
|
469
|
-
$metadata: deserializeMetadata(output),
|
|
470
|
-
};
|
|
471
|
-
break;
|
|
375
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
472
376
|
default:
|
|
473
377
|
const parsedBody = parsedOutput.body;
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
...parsedBody,
|
|
477
|
-
name: `${errorCode}`,
|
|
478
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
378
|
+
response = new ApplicationCostProfilerServiceException_1.ApplicationCostProfilerServiceException({
|
|
379
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
479
380
|
$fault: "client",
|
|
480
381
|
$metadata: deserializeMetadata(output),
|
|
481
|
-
};
|
|
382
|
+
});
|
|
383
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
482
384
|
}
|
|
483
|
-
const message = response.message || response.Message || errorCode;
|
|
484
|
-
response.message = message;
|
|
485
|
-
delete response.Message;
|
|
486
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
487
385
|
};
|
|
488
386
|
const deserializeAws_restJson1PutReportDefinitionCommand = async (output, context) => {
|
|
489
387
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
@@ -511,59 +409,28 @@ const deserializeAws_restJson1PutReportDefinitionCommandError = async (output, c
|
|
|
511
409
|
switch (errorCode) {
|
|
512
410
|
case "AccessDeniedException":
|
|
513
411
|
case "com.amazonaws.applicationcostprofiler#AccessDeniedException":
|
|
514
|
-
|
|
515
|
-
...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
516
|
-
name: errorCode,
|
|
517
|
-
$metadata: deserializeMetadata(output),
|
|
518
|
-
};
|
|
519
|
-
break;
|
|
412
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
520
413
|
case "InternalServerException":
|
|
521
414
|
case "com.amazonaws.applicationcostprofiler#InternalServerException":
|
|
522
|
-
|
|
523
|
-
...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
|
|
524
|
-
name: errorCode,
|
|
525
|
-
$metadata: deserializeMetadata(output),
|
|
526
|
-
};
|
|
527
|
-
break;
|
|
415
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
528
416
|
case "ServiceQuotaExceededException":
|
|
529
417
|
case "com.amazonaws.applicationcostprofiler#ServiceQuotaExceededException":
|
|
530
|
-
|
|
531
|
-
...(await deserializeAws_restJson1ServiceQuotaExceededExceptionResponse(parsedOutput, context)),
|
|
532
|
-
name: errorCode,
|
|
533
|
-
$metadata: deserializeMetadata(output),
|
|
534
|
-
};
|
|
535
|
-
break;
|
|
418
|
+
throw await deserializeAws_restJson1ServiceQuotaExceededExceptionResponse(parsedOutput, context);
|
|
536
419
|
case "ThrottlingException":
|
|
537
420
|
case "com.amazonaws.applicationcostprofiler#ThrottlingException":
|
|
538
|
-
|
|
539
|
-
...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
|
|
540
|
-
name: errorCode,
|
|
541
|
-
$metadata: deserializeMetadata(output),
|
|
542
|
-
};
|
|
543
|
-
break;
|
|
421
|
+
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
544
422
|
case "ValidationException":
|
|
545
423
|
case "com.amazonaws.applicationcostprofiler#ValidationException":
|
|
546
|
-
|
|
547
|
-
...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
|
|
548
|
-
name: errorCode,
|
|
549
|
-
$metadata: deserializeMetadata(output),
|
|
550
|
-
};
|
|
551
|
-
break;
|
|
424
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
552
425
|
default:
|
|
553
426
|
const parsedBody = parsedOutput.body;
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
...parsedBody,
|
|
557
|
-
name: `${errorCode}`,
|
|
558
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
427
|
+
response = new ApplicationCostProfilerServiceException_1.ApplicationCostProfilerServiceException({
|
|
428
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
559
429
|
$fault: "client",
|
|
560
430
|
$metadata: deserializeMetadata(output),
|
|
561
|
-
};
|
|
431
|
+
});
|
|
432
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
562
433
|
}
|
|
563
|
-
const message = response.message || response.Message || errorCode;
|
|
564
|
-
response.message = message;
|
|
565
|
-
delete response.Message;
|
|
566
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
567
434
|
};
|
|
568
435
|
const deserializeAws_restJson1UpdateReportDefinitionCommand = async (output, context) => {
|
|
569
436
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
@@ -591,116 +458,85 @@ const deserializeAws_restJson1UpdateReportDefinitionCommandError = async (output
|
|
|
591
458
|
switch (errorCode) {
|
|
592
459
|
case "AccessDeniedException":
|
|
593
460
|
case "com.amazonaws.applicationcostprofiler#AccessDeniedException":
|
|
594
|
-
|
|
595
|
-
...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
596
|
-
name: errorCode,
|
|
597
|
-
$metadata: deserializeMetadata(output),
|
|
598
|
-
};
|
|
599
|
-
break;
|
|
461
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
600
462
|
case "InternalServerException":
|
|
601
463
|
case "com.amazonaws.applicationcostprofiler#InternalServerException":
|
|
602
|
-
|
|
603
|
-
...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
|
|
604
|
-
name: errorCode,
|
|
605
|
-
$metadata: deserializeMetadata(output),
|
|
606
|
-
};
|
|
607
|
-
break;
|
|
464
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
608
465
|
case "ThrottlingException":
|
|
609
466
|
case "com.amazonaws.applicationcostprofiler#ThrottlingException":
|
|
610
|
-
|
|
611
|
-
...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
|
|
612
|
-
name: errorCode,
|
|
613
|
-
$metadata: deserializeMetadata(output),
|
|
614
|
-
};
|
|
615
|
-
break;
|
|
467
|
+
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
616
468
|
case "ValidationException":
|
|
617
469
|
case "com.amazonaws.applicationcostprofiler#ValidationException":
|
|
618
|
-
|
|
619
|
-
...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
|
|
620
|
-
name: errorCode,
|
|
621
|
-
$metadata: deserializeMetadata(output),
|
|
622
|
-
};
|
|
623
|
-
break;
|
|
470
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
624
471
|
default:
|
|
625
472
|
const parsedBody = parsedOutput.body;
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
...parsedBody,
|
|
629
|
-
name: `${errorCode}`,
|
|
630
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
473
|
+
response = new ApplicationCostProfilerServiceException_1.ApplicationCostProfilerServiceException({
|
|
474
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
631
475
|
$fault: "client",
|
|
632
476
|
$metadata: deserializeMetadata(output),
|
|
633
|
-
};
|
|
477
|
+
});
|
|
478
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
634
479
|
}
|
|
635
|
-
const message = response.message || response.Message || errorCode;
|
|
636
|
-
response.message = message;
|
|
637
|
-
delete response.Message;
|
|
638
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
639
480
|
};
|
|
640
481
|
const deserializeAws_restJson1AccessDeniedExceptionResponse = async (parsedOutput, context) => {
|
|
641
|
-
const contents = {
|
|
642
|
-
name: "AccessDeniedException",
|
|
643
|
-
$fault: "client",
|
|
644
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
645
|
-
message: undefined,
|
|
646
|
-
};
|
|
482
|
+
const contents = {};
|
|
647
483
|
const data = parsedOutput.body;
|
|
648
484
|
if (data.message !== undefined && data.message !== null) {
|
|
649
485
|
contents.message = smithy_client_1.expectString(data.message);
|
|
650
486
|
}
|
|
651
|
-
|
|
487
|
+
const exception = new models_0_1.AccessDeniedException({
|
|
488
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
489
|
+
...contents,
|
|
490
|
+
});
|
|
491
|
+
return smithy_client_1.decorateServiceException(exception, parsedOutput.body);
|
|
652
492
|
};
|
|
653
493
|
const deserializeAws_restJson1InternalServerExceptionResponse = async (parsedOutput, context) => {
|
|
654
|
-
const contents = {
|
|
655
|
-
name: "InternalServerException",
|
|
656
|
-
$fault: "server",
|
|
657
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
658
|
-
message: undefined,
|
|
659
|
-
};
|
|
494
|
+
const contents = {};
|
|
660
495
|
const data = parsedOutput.body;
|
|
661
496
|
if (data.message !== undefined && data.message !== null) {
|
|
662
497
|
contents.message = smithy_client_1.expectString(data.message);
|
|
663
498
|
}
|
|
664
|
-
|
|
499
|
+
const exception = new models_0_1.InternalServerException({
|
|
500
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
501
|
+
...contents,
|
|
502
|
+
});
|
|
503
|
+
return smithy_client_1.decorateServiceException(exception, parsedOutput.body);
|
|
665
504
|
};
|
|
666
505
|
const deserializeAws_restJson1ServiceQuotaExceededExceptionResponse = async (parsedOutput, context) => {
|
|
667
|
-
const contents = {
|
|
668
|
-
name: "ServiceQuotaExceededException",
|
|
669
|
-
$fault: "client",
|
|
670
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
671
|
-
message: undefined,
|
|
672
|
-
};
|
|
506
|
+
const contents = {};
|
|
673
507
|
const data = parsedOutput.body;
|
|
674
508
|
if (data.message !== undefined && data.message !== null) {
|
|
675
509
|
contents.message = smithy_client_1.expectString(data.message);
|
|
676
510
|
}
|
|
677
|
-
|
|
511
|
+
const exception = new models_0_1.ServiceQuotaExceededException({
|
|
512
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
513
|
+
...contents,
|
|
514
|
+
});
|
|
515
|
+
return smithy_client_1.decorateServiceException(exception, parsedOutput.body);
|
|
678
516
|
};
|
|
679
517
|
const deserializeAws_restJson1ThrottlingExceptionResponse = async (parsedOutput, context) => {
|
|
680
|
-
const contents = {
|
|
681
|
-
name: "ThrottlingException",
|
|
682
|
-
$fault: "client",
|
|
683
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
684
|
-
message: undefined,
|
|
685
|
-
};
|
|
518
|
+
const contents = {};
|
|
686
519
|
const data = parsedOutput.body;
|
|
687
520
|
if (data.message !== undefined && data.message !== null) {
|
|
688
521
|
contents.message = smithy_client_1.expectString(data.message);
|
|
689
522
|
}
|
|
690
|
-
|
|
523
|
+
const exception = new models_0_1.ThrottlingException({
|
|
524
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
525
|
+
...contents,
|
|
526
|
+
});
|
|
527
|
+
return smithy_client_1.decorateServiceException(exception, parsedOutput.body);
|
|
691
528
|
};
|
|
692
529
|
const deserializeAws_restJson1ValidationExceptionResponse = async (parsedOutput, context) => {
|
|
693
|
-
const contents = {
|
|
694
|
-
name: "ValidationException",
|
|
695
|
-
$fault: "client",
|
|
696
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
697
|
-
message: undefined,
|
|
698
|
-
};
|
|
530
|
+
const contents = {};
|
|
699
531
|
const data = parsedOutput.body;
|
|
700
532
|
if (data.message !== undefined && data.message !== null) {
|
|
701
533
|
contents.message = smithy_client_1.expectString(data.message);
|
|
702
534
|
}
|
|
703
|
-
|
|
535
|
+
const exception = new models_0_1.ValidationException({
|
|
536
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
537
|
+
...contents,
|
|
538
|
+
});
|
|
539
|
+
return smithy_client_1.decorateServiceException(exception, parsedOutput.body);
|
|
704
540
|
};
|
|
705
541
|
const serializeAws_restJson1S3Location = (input, context) => {
|
|
706
542
|
return {
|
|
@@ -733,7 +569,7 @@ const deserializeAws_restJson1ReportDefinition = (output, context) => {
|
|
|
733
569
|
};
|
|
734
570
|
};
|
|
735
571
|
const deserializeAws_restJson1ReportDefinitionList = (output, context) => {
|
|
736
|
-
|
|
572
|
+
const retVal = (output || [])
|
|
737
573
|
.filter((e) => e != null)
|
|
738
574
|
.map((entry) => {
|
|
739
575
|
if (entry === null) {
|
|
@@ -741,6 +577,7 @@ const deserializeAws_restJson1ReportDefinitionList = (output, context) => {
|
|
|
741
577
|
}
|
|
742
578
|
return deserializeAws_restJson1ReportDefinition(entry, context);
|
|
743
579
|
});
|
|
580
|
+
return retVal;
|
|
744
581
|
};
|
|
745
582
|
const deserializeAws_restJson1S3Location = (output, context) => {
|
|
746
583
|
return {
|
package/dist-es/index.js
CHANGED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { __extends } from "tslib";
|
|
2
|
+
import { ServiceException as __ServiceException, } from "@aws-sdk/smithy-client";
|
|
3
|
+
var ApplicationCostProfilerServiceException = (function (_super) {
|
|
4
|
+
__extends(ApplicationCostProfilerServiceException, _super);
|
|
5
|
+
function ApplicationCostProfilerServiceException(options) {
|
|
6
|
+
var _this = _super.call(this, options) || this;
|
|
7
|
+
Object.setPrototypeOf(_this, ApplicationCostProfilerServiceException.prototype);
|
|
8
|
+
return _this;
|
|
9
|
+
}
|
|
10
|
+
return ApplicationCostProfilerServiceException;
|
|
11
|
+
}(__ServiceException));
|
|
12
|
+
export { ApplicationCostProfilerServiceException };
|