@aws-sdk/client-applicationcostprofiler 3.490.0 → 3.496.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist-cjs/ApplicationCostProfiler.js +1 -23
- package/dist-cjs/ApplicationCostProfilerClient.js +1 -43
- package/dist-cjs/commands/DeleteReportDefinitionCommand.js +1 -28
- package/dist-cjs/commands/GetReportDefinitionCommand.js +1 -28
- package/dist-cjs/commands/ImportApplicationUsageCommand.js +1 -28
- package/dist-cjs/commands/ListReportDefinitionsCommand.js +1 -28
- package/dist-cjs/commands/PutReportDefinitionCommand.js +1 -28
- package/dist-cjs/commands/UpdateReportDefinitionCommand.js +1 -28
- package/dist-cjs/commands/index.js +1 -9
- package/dist-cjs/endpoint/EndpointParameters.js +1 -18
- package/dist-cjs/extensionConfiguration.js +1 -2
- package/dist-cjs/index.js +880 -11
- package/dist-cjs/models/ApplicationCostProfilerServiceException.js +1 -12
- package/dist-cjs/models/index.js +1 -4
- package/dist-cjs/models/models_0.js +1 -84
- package/dist-cjs/pagination/Interfaces.js +1 -2
- package/dist-cjs/pagination/ListReportDefinitionsPaginator.js +1 -7
- package/dist-cjs/pagination/index.js +1 -5
- package/dist-cjs/protocols/Aws_restJson1.js +1 -497
- package/dist-cjs/runtimeExtensions.js +1 -22
- package/package.json +40 -40
|
@@ -1,12 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ApplicationCostProfilerServiceException = exports.__ServiceException = void 0;
|
|
4
|
-
const smithy_client_1 = require("@smithy/smithy-client");
|
|
5
|
-
Object.defineProperty(exports, "__ServiceException", { enumerable: true, get: function () { return smithy_client_1.ServiceException; } });
|
|
6
|
-
class ApplicationCostProfilerServiceException extends smithy_client_1.ServiceException {
|
|
7
|
-
constructor(options) {
|
|
8
|
-
super(options);
|
|
9
|
-
Object.setPrototypeOf(this, ApplicationCostProfilerServiceException.prototype);
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
exports.ApplicationCostProfilerServiceException = ApplicationCostProfilerServiceException;
|
|
1
|
+
module.exports = require("../index.js");
|
package/dist-cjs/models/index.js
CHANGED
|
@@ -1,84 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ServiceQuotaExceededException = exports.S3BucketRegion = exports.ReportFrequency = exports.Format = exports.ValidationException = exports.ThrottlingException = exports.InternalServerException = 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;
|
|
18
|
-
class InternalServerException extends ApplicationCostProfilerServiceException_1.ApplicationCostProfilerServiceException {
|
|
19
|
-
constructor(opts) {
|
|
20
|
-
super({
|
|
21
|
-
name: "InternalServerException",
|
|
22
|
-
$fault: "server",
|
|
23
|
-
...opts,
|
|
24
|
-
});
|
|
25
|
-
this.name = "InternalServerException";
|
|
26
|
-
this.$fault = "server";
|
|
27
|
-
Object.setPrototypeOf(this, InternalServerException.prototype);
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
exports.InternalServerException = InternalServerException;
|
|
31
|
-
class ThrottlingException extends ApplicationCostProfilerServiceException_1.ApplicationCostProfilerServiceException {
|
|
32
|
-
constructor(opts) {
|
|
33
|
-
super({
|
|
34
|
-
name: "ThrottlingException",
|
|
35
|
-
$fault: "client",
|
|
36
|
-
...opts,
|
|
37
|
-
});
|
|
38
|
-
this.name = "ThrottlingException";
|
|
39
|
-
this.$fault = "client";
|
|
40
|
-
Object.setPrototypeOf(this, ThrottlingException.prototype);
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
exports.ThrottlingException = ThrottlingException;
|
|
44
|
-
class ValidationException extends ApplicationCostProfilerServiceException_1.ApplicationCostProfilerServiceException {
|
|
45
|
-
constructor(opts) {
|
|
46
|
-
super({
|
|
47
|
-
name: "ValidationException",
|
|
48
|
-
$fault: "client",
|
|
49
|
-
...opts,
|
|
50
|
-
});
|
|
51
|
-
this.name = "ValidationException";
|
|
52
|
-
this.$fault = "client";
|
|
53
|
-
Object.setPrototypeOf(this, ValidationException.prototype);
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
exports.ValidationException = ValidationException;
|
|
57
|
-
exports.Format = {
|
|
58
|
-
CSV: "CSV",
|
|
59
|
-
PARQUET: "PARQUET",
|
|
60
|
-
};
|
|
61
|
-
exports.ReportFrequency = {
|
|
62
|
-
ALL: "ALL",
|
|
63
|
-
DAILY: "DAILY",
|
|
64
|
-
MONTHLY: "MONTHLY",
|
|
65
|
-
};
|
|
66
|
-
exports.S3BucketRegion = {
|
|
67
|
-
AF_SOUTH_1: "af-south-1",
|
|
68
|
-
AP_EAST_1: "ap-east-1",
|
|
69
|
-
EU_SOUTH_1: "eu-south-1",
|
|
70
|
-
ME_SOUTH_1: "me-south-1",
|
|
71
|
-
};
|
|
72
|
-
class ServiceQuotaExceededException extends ApplicationCostProfilerServiceException_1.ApplicationCostProfilerServiceException {
|
|
73
|
-
constructor(opts) {
|
|
74
|
-
super({
|
|
75
|
-
name: "ServiceQuotaExceededException",
|
|
76
|
-
$fault: "client",
|
|
77
|
-
...opts,
|
|
78
|
-
});
|
|
79
|
-
this.name = "ServiceQuotaExceededException";
|
|
80
|
-
this.$fault = "client";
|
|
81
|
-
Object.setPrototypeOf(this, ServiceQuotaExceededException.prototype);
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
exports.ServiceQuotaExceededException = ServiceQuotaExceededException;
|
|
1
|
+
module.exports = require("../index.js");
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
module.exports = require("../index.js");
|
|
@@ -1,7 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.paginateListReportDefinitions = void 0;
|
|
4
|
-
const core_1 = require("@smithy/core");
|
|
5
|
-
const ApplicationCostProfilerClient_1 = require("../ApplicationCostProfilerClient");
|
|
6
|
-
const ListReportDefinitionsCommand_1 = require("../commands/ListReportDefinitionsCommand");
|
|
7
|
-
exports.paginateListReportDefinitions = (0, core_1.createPaginator)(ApplicationCostProfilerClient_1.ApplicationCostProfilerClient, ListReportDefinitionsCommand_1.ListReportDefinitionsCommand, "nextToken", "nextToken", "maxResults");
|
|
1
|
+
module.exports = require("../index.js");
|
|
@@ -1,5 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const tslib_1 = require("tslib");
|
|
4
|
-
tslib_1.__exportStar(require("./Interfaces"), exports);
|
|
5
|
-
tslib_1.__exportStar(require("./ListReportDefinitionsPaginator"), exports);
|
|
1
|
+
module.exports = require("../index.js");
|
|
@@ -1,497 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.de_UpdateReportDefinitionCommand = exports.de_PutReportDefinitionCommand = exports.de_ListReportDefinitionsCommand = exports.de_ImportApplicationUsageCommand = exports.de_GetReportDefinitionCommand = exports.de_DeleteReportDefinitionCommand = exports.se_UpdateReportDefinitionCommand = exports.se_PutReportDefinitionCommand = exports.se_ListReportDefinitionsCommand = exports.se_ImportApplicationUsageCommand = exports.se_GetReportDefinitionCommand = exports.se_DeleteReportDefinitionCommand = void 0;
|
|
4
|
-
const core_1 = require("@smithy/core");
|
|
5
|
-
const smithy_client_1 = require("@smithy/smithy-client");
|
|
6
|
-
const ApplicationCostProfilerServiceException_1 = require("../models/ApplicationCostProfilerServiceException");
|
|
7
|
-
const models_0_1 = require("../models/models_0");
|
|
8
|
-
const se_DeleteReportDefinitionCommand = async (input, context) => {
|
|
9
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
10
|
-
const headers = {};
|
|
11
|
-
b.bp("/reportDefinition/{reportId}");
|
|
12
|
-
b.p("reportId", () => input.reportId, "{reportId}", false);
|
|
13
|
-
let body;
|
|
14
|
-
b.m("DELETE").h(headers).b(body);
|
|
15
|
-
return b.build();
|
|
16
|
-
};
|
|
17
|
-
exports.se_DeleteReportDefinitionCommand = se_DeleteReportDefinitionCommand;
|
|
18
|
-
const se_GetReportDefinitionCommand = async (input, context) => {
|
|
19
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
20
|
-
const headers = {};
|
|
21
|
-
b.bp("/reportDefinition/{reportId}");
|
|
22
|
-
b.p("reportId", () => input.reportId, "{reportId}", false);
|
|
23
|
-
let body;
|
|
24
|
-
b.m("GET").h(headers).b(body);
|
|
25
|
-
return b.build();
|
|
26
|
-
};
|
|
27
|
-
exports.se_GetReportDefinitionCommand = se_GetReportDefinitionCommand;
|
|
28
|
-
const se_ImportApplicationUsageCommand = async (input, context) => {
|
|
29
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
30
|
-
const headers = {
|
|
31
|
-
"content-type": "application/json",
|
|
32
|
-
};
|
|
33
|
-
b.bp("/importApplicationUsage");
|
|
34
|
-
let body;
|
|
35
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
36
|
-
sourceS3Location: (_) => (0, smithy_client_1._json)(_),
|
|
37
|
-
}));
|
|
38
|
-
b.m("POST").h(headers).b(body);
|
|
39
|
-
return b.build();
|
|
40
|
-
};
|
|
41
|
-
exports.se_ImportApplicationUsageCommand = se_ImportApplicationUsageCommand;
|
|
42
|
-
const se_ListReportDefinitionsCommand = async (input, context) => {
|
|
43
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
44
|
-
const headers = {};
|
|
45
|
-
b.bp("/reportDefinition");
|
|
46
|
-
const query = (0, smithy_client_1.map)({
|
|
47
|
-
[_nT]: [, input[_nT]],
|
|
48
|
-
[_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
|
|
49
|
-
});
|
|
50
|
-
let body;
|
|
51
|
-
b.m("GET").h(headers).q(query).b(body);
|
|
52
|
-
return b.build();
|
|
53
|
-
};
|
|
54
|
-
exports.se_ListReportDefinitionsCommand = se_ListReportDefinitionsCommand;
|
|
55
|
-
const se_PutReportDefinitionCommand = async (input, context) => {
|
|
56
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
57
|
-
const headers = {
|
|
58
|
-
"content-type": "application/json",
|
|
59
|
-
};
|
|
60
|
-
b.bp("/reportDefinition");
|
|
61
|
-
let body;
|
|
62
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
63
|
-
destinationS3Location: (_) => (0, smithy_client_1._json)(_),
|
|
64
|
-
format: [],
|
|
65
|
-
reportDescription: [],
|
|
66
|
-
reportFrequency: [],
|
|
67
|
-
reportId: [],
|
|
68
|
-
}));
|
|
69
|
-
b.m("POST").h(headers).b(body);
|
|
70
|
-
return b.build();
|
|
71
|
-
};
|
|
72
|
-
exports.se_PutReportDefinitionCommand = se_PutReportDefinitionCommand;
|
|
73
|
-
const se_UpdateReportDefinitionCommand = async (input, context) => {
|
|
74
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
75
|
-
const headers = {
|
|
76
|
-
"content-type": "application/json",
|
|
77
|
-
};
|
|
78
|
-
b.bp("/reportDefinition/{reportId}");
|
|
79
|
-
b.p("reportId", () => input.reportId, "{reportId}", false);
|
|
80
|
-
let body;
|
|
81
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
82
|
-
destinationS3Location: (_) => (0, smithy_client_1._json)(_),
|
|
83
|
-
format: [],
|
|
84
|
-
reportDescription: [],
|
|
85
|
-
reportFrequency: [],
|
|
86
|
-
}));
|
|
87
|
-
b.m("PUT").h(headers).b(body);
|
|
88
|
-
return b.build();
|
|
89
|
-
};
|
|
90
|
-
exports.se_UpdateReportDefinitionCommand = se_UpdateReportDefinitionCommand;
|
|
91
|
-
const de_DeleteReportDefinitionCommand = async (output, context) => {
|
|
92
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
93
|
-
return de_DeleteReportDefinitionCommandError(output, context);
|
|
94
|
-
}
|
|
95
|
-
const contents = (0, smithy_client_1.map)({
|
|
96
|
-
$metadata: deserializeMetadata(output),
|
|
97
|
-
});
|
|
98
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
99
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
100
|
-
reportId: smithy_client_1.expectString,
|
|
101
|
-
});
|
|
102
|
-
Object.assign(contents, doc);
|
|
103
|
-
return contents;
|
|
104
|
-
};
|
|
105
|
-
exports.de_DeleteReportDefinitionCommand = de_DeleteReportDefinitionCommand;
|
|
106
|
-
const de_DeleteReportDefinitionCommandError = async (output, context) => {
|
|
107
|
-
const parsedOutput = {
|
|
108
|
-
...output,
|
|
109
|
-
body: await parseErrorBody(output.body, context),
|
|
110
|
-
};
|
|
111
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
112
|
-
switch (errorCode) {
|
|
113
|
-
case "AccessDeniedException":
|
|
114
|
-
case "com.amazonaws.applicationcostprofiler#AccessDeniedException":
|
|
115
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
116
|
-
case "InternalServerException":
|
|
117
|
-
case "com.amazonaws.applicationcostprofiler#InternalServerException":
|
|
118
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
119
|
-
case "ThrottlingException":
|
|
120
|
-
case "com.amazonaws.applicationcostprofiler#ThrottlingException":
|
|
121
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
122
|
-
case "ValidationException":
|
|
123
|
-
case "com.amazonaws.applicationcostprofiler#ValidationException":
|
|
124
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
125
|
-
default:
|
|
126
|
-
const parsedBody = parsedOutput.body;
|
|
127
|
-
return throwDefaultError({
|
|
128
|
-
output,
|
|
129
|
-
parsedBody,
|
|
130
|
-
errorCode,
|
|
131
|
-
});
|
|
132
|
-
}
|
|
133
|
-
};
|
|
134
|
-
const de_GetReportDefinitionCommand = async (output, context) => {
|
|
135
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
136
|
-
return de_GetReportDefinitionCommandError(output, context);
|
|
137
|
-
}
|
|
138
|
-
const contents = (0, smithy_client_1.map)({
|
|
139
|
-
$metadata: deserializeMetadata(output),
|
|
140
|
-
});
|
|
141
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
142
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
143
|
-
createdAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
144
|
-
destinationS3Location: smithy_client_1._json,
|
|
145
|
-
format: smithy_client_1.expectString,
|
|
146
|
-
lastUpdated: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
147
|
-
reportDescription: smithy_client_1.expectString,
|
|
148
|
-
reportFrequency: smithy_client_1.expectString,
|
|
149
|
-
reportId: smithy_client_1.expectString,
|
|
150
|
-
});
|
|
151
|
-
Object.assign(contents, doc);
|
|
152
|
-
return contents;
|
|
153
|
-
};
|
|
154
|
-
exports.de_GetReportDefinitionCommand = de_GetReportDefinitionCommand;
|
|
155
|
-
const de_GetReportDefinitionCommandError = async (output, context) => {
|
|
156
|
-
const parsedOutput = {
|
|
157
|
-
...output,
|
|
158
|
-
body: await parseErrorBody(output.body, context),
|
|
159
|
-
};
|
|
160
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
161
|
-
switch (errorCode) {
|
|
162
|
-
case "AccessDeniedException":
|
|
163
|
-
case "com.amazonaws.applicationcostprofiler#AccessDeniedException":
|
|
164
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
165
|
-
case "InternalServerException":
|
|
166
|
-
case "com.amazonaws.applicationcostprofiler#InternalServerException":
|
|
167
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
168
|
-
case "ThrottlingException":
|
|
169
|
-
case "com.amazonaws.applicationcostprofiler#ThrottlingException":
|
|
170
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
171
|
-
case "ValidationException":
|
|
172
|
-
case "com.amazonaws.applicationcostprofiler#ValidationException":
|
|
173
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
174
|
-
default:
|
|
175
|
-
const parsedBody = parsedOutput.body;
|
|
176
|
-
return throwDefaultError({
|
|
177
|
-
output,
|
|
178
|
-
parsedBody,
|
|
179
|
-
errorCode,
|
|
180
|
-
});
|
|
181
|
-
}
|
|
182
|
-
};
|
|
183
|
-
const de_ImportApplicationUsageCommand = async (output, context) => {
|
|
184
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
185
|
-
return de_ImportApplicationUsageCommandError(output, context);
|
|
186
|
-
}
|
|
187
|
-
const contents = (0, smithy_client_1.map)({
|
|
188
|
-
$metadata: deserializeMetadata(output),
|
|
189
|
-
});
|
|
190
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
191
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
192
|
-
importId: smithy_client_1.expectString,
|
|
193
|
-
});
|
|
194
|
-
Object.assign(contents, doc);
|
|
195
|
-
return contents;
|
|
196
|
-
};
|
|
197
|
-
exports.de_ImportApplicationUsageCommand = de_ImportApplicationUsageCommand;
|
|
198
|
-
const de_ImportApplicationUsageCommandError = async (output, context) => {
|
|
199
|
-
const parsedOutput = {
|
|
200
|
-
...output,
|
|
201
|
-
body: await parseErrorBody(output.body, context),
|
|
202
|
-
};
|
|
203
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
204
|
-
switch (errorCode) {
|
|
205
|
-
case "AccessDeniedException":
|
|
206
|
-
case "com.amazonaws.applicationcostprofiler#AccessDeniedException":
|
|
207
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
208
|
-
case "InternalServerException":
|
|
209
|
-
case "com.amazonaws.applicationcostprofiler#InternalServerException":
|
|
210
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
211
|
-
case "ThrottlingException":
|
|
212
|
-
case "com.amazonaws.applicationcostprofiler#ThrottlingException":
|
|
213
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
214
|
-
case "ValidationException":
|
|
215
|
-
case "com.amazonaws.applicationcostprofiler#ValidationException":
|
|
216
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
217
|
-
default:
|
|
218
|
-
const parsedBody = parsedOutput.body;
|
|
219
|
-
return throwDefaultError({
|
|
220
|
-
output,
|
|
221
|
-
parsedBody,
|
|
222
|
-
errorCode,
|
|
223
|
-
});
|
|
224
|
-
}
|
|
225
|
-
};
|
|
226
|
-
const de_ListReportDefinitionsCommand = async (output, context) => {
|
|
227
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
228
|
-
return de_ListReportDefinitionsCommandError(output, context);
|
|
229
|
-
}
|
|
230
|
-
const contents = (0, smithy_client_1.map)({
|
|
231
|
-
$metadata: deserializeMetadata(output),
|
|
232
|
-
});
|
|
233
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
234
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
235
|
-
nextToken: smithy_client_1.expectString,
|
|
236
|
-
reportDefinitions: (_) => de_ReportDefinitionList(_, context),
|
|
237
|
-
});
|
|
238
|
-
Object.assign(contents, doc);
|
|
239
|
-
return contents;
|
|
240
|
-
};
|
|
241
|
-
exports.de_ListReportDefinitionsCommand = de_ListReportDefinitionsCommand;
|
|
242
|
-
const de_ListReportDefinitionsCommandError = async (output, context) => {
|
|
243
|
-
const parsedOutput = {
|
|
244
|
-
...output,
|
|
245
|
-
body: await parseErrorBody(output.body, context),
|
|
246
|
-
};
|
|
247
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
248
|
-
switch (errorCode) {
|
|
249
|
-
case "AccessDeniedException":
|
|
250
|
-
case "com.amazonaws.applicationcostprofiler#AccessDeniedException":
|
|
251
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
252
|
-
case "InternalServerException":
|
|
253
|
-
case "com.amazonaws.applicationcostprofiler#InternalServerException":
|
|
254
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
255
|
-
case "ThrottlingException":
|
|
256
|
-
case "com.amazonaws.applicationcostprofiler#ThrottlingException":
|
|
257
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
258
|
-
case "ValidationException":
|
|
259
|
-
case "com.amazonaws.applicationcostprofiler#ValidationException":
|
|
260
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
261
|
-
default:
|
|
262
|
-
const parsedBody = parsedOutput.body;
|
|
263
|
-
return throwDefaultError({
|
|
264
|
-
output,
|
|
265
|
-
parsedBody,
|
|
266
|
-
errorCode,
|
|
267
|
-
});
|
|
268
|
-
}
|
|
269
|
-
};
|
|
270
|
-
const de_PutReportDefinitionCommand = async (output, context) => {
|
|
271
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
272
|
-
return de_PutReportDefinitionCommandError(output, context);
|
|
273
|
-
}
|
|
274
|
-
const contents = (0, smithy_client_1.map)({
|
|
275
|
-
$metadata: deserializeMetadata(output),
|
|
276
|
-
});
|
|
277
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
278
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
279
|
-
reportId: smithy_client_1.expectString,
|
|
280
|
-
});
|
|
281
|
-
Object.assign(contents, doc);
|
|
282
|
-
return contents;
|
|
283
|
-
};
|
|
284
|
-
exports.de_PutReportDefinitionCommand = de_PutReportDefinitionCommand;
|
|
285
|
-
const de_PutReportDefinitionCommandError = async (output, context) => {
|
|
286
|
-
const parsedOutput = {
|
|
287
|
-
...output,
|
|
288
|
-
body: await parseErrorBody(output.body, context),
|
|
289
|
-
};
|
|
290
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
291
|
-
switch (errorCode) {
|
|
292
|
-
case "AccessDeniedException":
|
|
293
|
-
case "com.amazonaws.applicationcostprofiler#AccessDeniedException":
|
|
294
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
295
|
-
case "InternalServerException":
|
|
296
|
-
case "com.amazonaws.applicationcostprofiler#InternalServerException":
|
|
297
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
298
|
-
case "ServiceQuotaExceededException":
|
|
299
|
-
case "com.amazonaws.applicationcostprofiler#ServiceQuotaExceededException":
|
|
300
|
-
throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
|
|
301
|
-
case "ThrottlingException":
|
|
302
|
-
case "com.amazonaws.applicationcostprofiler#ThrottlingException":
|
|
303
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
304
|
-
case "ValidationException":
|
|
305
|
-
case "com.amazonaws.applicationcostprofiler#ValidationException":
|
|
306
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
307
|
-
default:
|
|
308
|
-
const parsedBody = parsedOutput.body;
|
|
309
|
-
return throwDefaultError({
|
|
310
|
-
output,
|
|
311
|
-
parsedBody,
|
|
312
|
-
errorCode,
|
|
313
|
-
});
|
|
314
|
-
}
|
|
315
|
-
};
|
|
316
|
-
const de_UpdateReportDefinitionCommand = async (output, context) => {
|
|
317
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
318
|
-
return de_UpdateReportDefinitionCommandError(output, context);
|
|
319
|
-
}
|
|
320
|
-
const contents = (0, smithy_client_1.map)({
|
|
321
|
-
$metadata: deserializeMetadata(output),
|
|
322
|
-
});
|
|
323
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
324
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
325
|
-
reportId: smithy_client_1.expectString,
|
|
326
|
-
});
|
|
327
|
-
Object.assign(contents, doc);
|
|
328
|
-
return contents;
|
|
329
|
-
};
|
|
330
|
-
exports.de_UpdateReportDefinitionCommand = de_UpdateReportDefinitionCommand;
|
|
331
|
-
const de_UpdateReportDefinitionCommandError = async (output, context) => {
|
|
332
|
-
const parsedOutput = {
|
|
333
|
-
...output,
|
|
334
|
-
body: await parseErrorBody(output.body, context),
|
|
335
|
-
};
|
|
336
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
337
|
-
switch (errorCode) {
|
|
338
|
-
case "AccessDeniedException":
|
|
339
|
-
case "com.amazonaws.applicationcostprofiler#AccessDeniedException":
|
|
340
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
341
|
-
case "InternalServerException":
|
|
342
|
-
case "com.amazonaws.applicationcostprofiler#InternalServerException":
|
|
343
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
344
|
-
case "ThrottlingException":
|
|
345
|
-
case "com.amazonaws.applicationcostprofiler#ThrottlingException":
|
|
346
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
347
|
-
case "ValidationException":
|
|
348
|
-
case "com.amazonaws.applicationcostprofiler#ValidationException":
|
|
349
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
350
|
-
default:
|
|
351
|
-
const parsedBody = parsedOutput.body;
|
|
352
|
-
return throwDefaultError({
|
|
353
|
-
output,
|
|
354
|
-
parsedBody,
|
|
355
|
-
errorCode,
|
|
356
|
-
});
|
|
357
|
-
}
|
|
358
|
-
};
|
|
359
|
-
const throwDefaultError = (0, smithy_client_1.withBaseException)(ApplicationCostProfilerServiceException_1.ApplicationCostProfilerServiceException);
|
|
360
|
-
const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
|
|
361
|
-
const contents = (0, smithy_client_1.map)({});
|
|
362
|
-
const data = parsedOutput.body;
|
|
363
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
364
|
-
message: smithy_client_1.expectString,
|
|
365
|
-
});
|
|
366
|
-
Object.assign(contents, doc);
|
|
367
|
-
const exception = new models_0_1.AccessDeniedException({
|
|
368
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
369
|
-
...contents,
|
|
370
|
-
});
|
|
371
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
372
|
-
};
|
|
373
|
-
const de_InternalServerExceptionRes = async (parsedOutput, context) => {
|
|
374
|
-
const contents = (0, smithy_client_1.map)({});
|
|
375
|
-
const data = parsedOutput.body;
|
|
376
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
377
|
-
message: smithy_client_1.expectString,
|
|
378
|
-
});
|
|
379
|
-
Object.assign(contents, doc);
|
|
380
|
-
const exception = new models_0_1.InternalServerException({
|
|
381
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
382
|
-
...contents,
|
|
383
|
-
});
|
|
384
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
385
|
-
};
|
|
386
|
-
const de_ServiceQuotaExceededExceptionRes = async (parsedOutput, context) => {
|
|
387
|
-
const contents = (0, smithy_client_1.map)({});
|
|
388
|
-
const data = parsedOutput.body;
|
|
389
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
390
|
-
message: smithy_client_1.expectString,
|
|
391
|
-
});
|
|
392
|
-
Object.assign(contents, doc);
|
|
393
|
-
const exception = new models_0_1.ServiceQuotaExceededException({
|
|
394
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
395
|
-
...contents,
|
|
396
|
-
});
|
|
397
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
398
|
-
};
|
|
399
|
-
const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
|
|
400
|
-
const contents = (0, smithy_client_1.map)({});
|
|
401
|
-
const data = parsedOutput.body;
|
|
402
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
403
|
-
message: smithy_client_1.expectString,
|
|
404
|
-
});
|
|
405
|
-
Object.assign(contents, doc);
|
|
406
|
-
const exception = new models_0_1.ThrottlingException({
|
|
407
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
408
|
-
...contents,
|
|
409
|
-
});
|
|
410
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
411
|
-
};
|
|
412
|
-
const de_ValidationExceptionRes = async (parsedOutput, context) => {
|
|
413
|
-
const contents = (0, smithy_client_1.map)({});
|
|
414
|
-
const data = parsedOutput.body;
|
|
415
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
416
|
-
message: smithy_client_1.expectString,
|
|
417
|
-
});
|
|
418
|
-
Object.assign(contents, doc);
|
|
419
|
-
const exception = new models_0_1.ValidationException({
|
|
420
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
421
|
-
...contents,
|
|
422
|
-
});
|
|
423
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
424
|
-
};
|
|
425
|
-
const de_ReportDefinition = (output, context) => {
|
|
426
|
-
return (0, smithy_client_1.take)(output, {
|
|
427
|
-
createdAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
428
|
-
destinationS3Location: smithy_client_1._json,
|
|
429
|
-
format: smithy_client_1.expectString,
|
|
430
|
-
lastUpdatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
431
|
-
reportDescription: smithy_client_1.expectString,
|
|
432
|
-
reportFrequency: smithy_client_1.expectString,
|
|
433
|
-
reportId: smithy_client_1.expectString,
|
|
434
|
-
});
|
|
435
|
-
};
|
|
436
|
-
const de_ReportDefinitionList = (output, context) => {
|
|
437
|
-
const retVal = (output || [])
|
|
438
|
-
.filter((e) => e != null)
|
|
439
|
-
.map((entry) => {
|
|
440
|
-
return de_ReportDefinition(entry, context);
|
|
441
|
-
});
|
|
442
|
-
return retVal;
|
|
443
|
-
};
|
|
444
|
-
const deserializeMetadata = (output) => ({
|
|
445
|
-
httpStatusCode: output.statusCode,
|
|
446
|
-
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
|
|
447
|
-
extendedRequestId: output.headers["x-amz-id-2"],
|
|
448
|
-
cfId: output.headers["x-amz-cf-id"],
|
|
449
|
-
});
|
|
450
|
-
const collectBodyString = (streamBody, context) => (0, smithy_client_1.collectBody)(streamBody, context).then((body) => context.utf8Encoder(body));
|
|
451
|
-
const isSerializableHeaderValue = (value) => value !== undefined &&
|
|
452
|
-
value !== null &&
|
|
453
|
-
value !== "" &&
|
|
454
|
-
(!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
|
|
455
|
-
(!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
|
|
456
|
-
const _mR = "maxResults";
|
|
457
|
-
const _nT = "nextToken";
|
|
458
|
-
const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
|
|
459
|
-
if (encoded.length) {
|
|
460
|
-
return JSON.parse(encoded);
|
|
461
|
-
}
|
|
462
|
-
return {};
|
|
463
|
-
});
|
|
464
|
-
const parseErrorBody = async (errorBody, context) => {
|
|
465
|
-
const value = await parseBody(errorBody, context);
|
|
466
|
-
value.message = value.message ?? value.Message;
|
|
467
|
-
return value;
|
|
468
|
-
};
|
|
469
|
-
const loadRestJsonErrorCode = (output, data) => {
|
|
470
|
-
const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
|
|
471
|
-
const sanitizeErrorCode = (rawValue) => {
|
|
472
|
-
let cleanValue = rawValue;
|
|
473
|
-
if (typeof cleanValue === "number") {
|
|
474
|
-
cleanValue = cleanValue.toString();
|
|
475
|
-
}
|
|
476
|
-
if (cleanValue.indexOf(",") >= 0) {
|
|
477
|
-
cleanValue = cleanValue.split(",")[0];
|
|
478
|
-
}
|
|
479
|
-
if (cleanValue.indexOf(":") >= 0) {
|
|
480
|
-
cleanValue = cleanValue.split(":")[0];
|
|
481
|
-
}
|
|
482
|
-
if (cleanValue.indexOf("#") >= 0) {
|
|
483
|
-
cleanValue = cleanValue.split("#")[1];
|
|
484
|
-
}
|
|
485
|
-
return cleanValue;
|
|
486
|
-
};
|
|
487
|
-
const headerKey = findKey(output.headers, "x-amzn-errortype");
|
|
488
|
-
if (headerKey !== undefined) {
|
|
489
|
-
return sanitizeErrorCode(output.headers[headerKey]);
|
|
490
|
-
}
|
|
491
|
-
if (data.code !== undefined) {
|
|
492
|
-
return sanitizeErrorCode(data.code);
|
|
493
|
-
}
|
|
494
|
-
if (data["__type"] !== undefined) {
|
|
495
|
-
return sanitizeErrorCode(data["__type"]);
|
|
496
|
-
}
|
|
497
|
-
};
|
|
1
|
+
module.exports = require("../index.js");
|
|
@@ -1,22 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.resolveRuntimeExtensions = void 0;
|
|
4
|
-
const region_config_resolver_1 = require("@aws-sdk/region-config-resolver");
|
|
5
|
-
const protocol_http_1 = require("@smithy/protocol-http");
|
|
6
|
-
const smithy_client_1 = require("@smithy/smithy-client");
|
|
7
|
-
const asPartial = (t) => t;
|
|
8
|
-
const resolveRuntimeExtensions = (runtimeConfig, extensions) => {
|
|
9
|
-
const extensionConfiguration = {
|
|
10
|
-
...asPartial((0, region_config_resolver_1.getAwsRegionExtensionConfiguration)(runtimeConfig)),
|
|
11
|
-
...asPartial((0, smithy_client_1.getDefaultExtensionConfiguration)(runtimeConfig)),
|
|
12
|
-
...asPartial((0, protocol_http_1.getHttpHandlerExtensionConfiguration)(runtimeConfig)),
|
|
13
|
-
};
|
|
14
|
-
extensions.forEach((extension) => extension.configure(extensionConfiguration));
|
|
15
|
-
return {
|
|
16
|
-
...runtimeConfig,
|
|
17
|
-
...(0, region_config_resolver_1.resolveAwsRegionExtensionConfiguration)(extensionConfiguration),
|
|
18
|
-
...(0, smithy_client_1.resolveDefaultRuntimeConfig)(extensionConfiguration),
|
|
19
|
-
...(0, protocol_http_1.resolveHttpHandlerRuntimeConfig)(extensionConfiguration),
|
|
20
|
-
};
|
|
21
|
-
};
|
|
22
|
-
exports.resolveRuntimeExtensions = resolveRuntimeExtensions;
|
|
1
|
+
module.exports = require("./index.js");
|