@aws-sdk/client-applicationcostprofiler 3.186.0 → 3.188.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 +8 -0
- package/dist-es/ApplicationCostProfiler.js +26 -33
- package/dist-es/ApplicationCostProfilerClient.js +22 -28
- package/dist-es/commands/DeleteReportDefinitionCommand.js +21 -28
- package/dist-es/commands/GetReportDefinitionCommand.js +21 -28
- package/dist-es/commands/ImportApplicationUsageCommand.js +21 -28
- package/dist-es/commands/ListReportDefinitionsCommand.js +21 -28
- package/dist-es/commands/PutReportDefinitionCommand.js +21 -28
- package/dist-es/commands/UpdateReportDefinitionCommand.js +21 -28
- package/dist-es/endpoints.js +8 -8
- package/dist-es/models/ApplicationCostProfilerServiceException.js +5 -10
- package/dist-es/models/models_0.js +100 -71
- package/dist-es/pagination/ListReportDefinitionsPaginator.js +25 -68
- package/dist-es/protocols/Aws_restJson1.js +487 -679
- package/dist-es/runtimeConfig.browser.js +26 -12
- package/dist-es/runtimeConfig.js +30 -12
- package/dist-es/runtimeConfig.native.js +8 -5
- package/dist-es/runtimeConfig.shared.js +8 -11
- package/package.json +33 -33
|
@@ -1,658 +1,484 @@
|
|
|
1
|
-
import { __assign, __awaiter, __generator } from "tslib";
|
|
2
1
|
import { HttpRequest as __HttpRequest } from "@aws-sdk/protocol-http";
|
|
3
2
|
import { decorateServiceException as __decorateServiceException, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectObject as __expectObject, expectString as __expectString, map as __map, parseEpochTimestamp as __parseEpochTimestamp, resolvedPath as __resolvedPath, throwDefaultError, } from "@aws-sdk/smithy-client";
|
|
4
3
|
import { ApplicationCostProfilerServiceException as __BaseException } from "../models/ApplicationCostProfilerServiceException";
|
|
5
4
|
import { AccessDeniedException, InternalServerException, ServiceQuotaExceededException, ThrottlingException, ValidationException, } from "../models/models_0";
|
|
6
|
-
export
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
method: "DELETE",
|
|
21
|
-
headers: headers,
|
|
22
|
-
path: resolvedPath,
|
|
23
|
-
body: body,
|
|
24
|
-
})];
|
|
25
|
-
}
|
|
26
|
-
});
|
|
27
|
-
}); };
|
|
28
|
-
export var serializeAws_restJson1GetReportDefinitionCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
29
|
-
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
|
|
30
|
-
return __generator(this, function (_c) {
|
|
31
|
-
switch (_c.label) {
|
|
32
|
-
case 0: return [4, context.endpoint()];
|
|
33
|
-
case 1:
|
|
34
|
-
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
35
|
-
headers = {};
|
|
36
|
-
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/reportDefinition/{reportId}";
|
|
37
|
-
resolvedPath = __resolvedPath(resolvedPath, input, "reportId", function () { return input.reportId; }, "{reportId}", false);
|
|
38
|
-
return [2, new __HttpRequest({
|
|
39
|
-
protocol: protocol,
|
|
40
|
-
hostname: hostname,
|
|
41
|
-
port: port,
|
|
42
|
-
method: "GET",
|
|
43
|
-
headers: headers,
|
|
44
|
-
path: resolvedPath,
|
|
45
|
-
body: body,
|
|
46
|
-
})];
|
|
47
|
-
}
|
|
5
|
+
export const serializeAws_restJson1DeleteReportDefinitionCommand = async (input, context) => {
|
|
6
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
7
|
+
const headers = {};
|
|
8
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/reportDefinition/{reportId}";
|
|
9
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "reportId", () => input.reportId, "{reportId}", false);
|
|
10
|
+
let body;
|
|
11
|
+
return new __HttpRequest({
|
|
12
|
+
protocol,
|
|
13
|
+
hostname,
|
|
14
|
+
port,
|
|
15
|
+
method: "DELETE",
|
|
16
|
+
headers,
|
|
17
|
+
path: resolvedPath,
|
|
18
|
+
body,
|
|
48
19
|
});
|
|
49
|
-
}
|
|
50
|
-
export
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
return [2, new __HttpRequest({
|
|
65
|
-
protocol: protocol,
|
|
66
|
-
hostname: hostname,
|
|
67
|
-
port: port,
|
|
68
|
-
method: "POST",
|
|
69
|
-
headers: headers,
|
|
70
|
-
path: resolvedPath,
|
|
71
|
-
body: body,
|
|
72
|
-
})];
|
|
73
|
-
}
|
|
20
|
+
};
|
|
21
|
+
export const serializeAws_restJson1GetReportDefinitionCommand = async (input, context) => {
|
|
22
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
23
|
+
const headers = {};
|
|
24
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/reportDefinition/{reportId}";
|
|
25
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "reportId", () => input.reportId, "{reportId}", false);
|
|
26
|
+
let body;
|
|
27
|
+
return new __HttpRequest({
|
|
28
|
+
protocol,
|
|
29
|
+
hostname,
|
|
30
|
+
port,
|
|
31
|
+
method: "GET",
|
|
32
|
+
headers,
|
|
33
|
+
path: resolvedPath,
|
|
34
|
+
body,
|
|
74
35
|
});
|
|
75
|
-
}
|
|
76
|
-
export
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
maxResults: [function () { return input.maxResults !== void 0; }, function () { return input.maxResults.toString(); }],
|
|
88
|
-
});
|
|
89
|
-
return [2, new __HttpRequest({
|
|
90
|
-
protocol: protocol,
|
|
91
|
-
hostname: hostname,
|
|
92
|
-
port: port,
|
|
93
|
-
method: "GET",
|
|
94
|
-
headers: headers,
|
|
95
|
-
path: resolvedPath,
|
|
96
|
-
query: query,
|
|
97
|
-
body: body,
|
|
98
|
-
})];
|
|
99
|
-
}
|
|
36
|
+
};
|
|
37
|
+
export const serializeAws_restJson1ImportApplicationUsageCommand = async (input, context) => {
|
|
38
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
39
|
+
const headers = {
|
|
40
|
+
"content-type": "application/json",
|
|
41
|
+
};
|
|
42
|
+
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/importApplicationUsage";
|
|
43
|
+
let body;
|
|
44
|
+
body = JSON.stringify({
|
|
45
|
+
...(input.sourceS3Location != null && {
|
|
46
|
+
sourceS3Location: serializeAws_restJson1SourceS3Location(input.sourceS3Location, context),
|
|
47
|
+
}),
|
|
100
48
|
});
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
headers = {
|
|
110
|
-
"content-type": "application/json",
|
|
111
|
-
};
|
|
112
|
-
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/reportDefinition";
|
|
113
|
-
body = JSON.stringify(__assign(__assign(__assign(__assign(__assign({}, (input.destinationS3Location != null && {
|
|
114
|
-
destinationS3Location: serializeAws_restJson1S3Location(input.destinationS3Location, context),
|
|
115
|
-
})), (input.format != null && { format: input.format })), (input.reportDescription != null && { reportDescription: input.reportDescription })), (input.reportFrequency != null && { reportFrequency: input.reportFrequency })), (input.reportId != null && { reportId: input.reportId })));
|
|
116
|
-
return [2, new __HttpRequest({
|
|
117
|
-
protocol: protocol,
|
|
118
|
-
hostname: hostname,
|
|
119
|
-
port: port,
|
|
120
|
-
method: "POST",
|
|
121
|
-
headers: headers,
|
|
122
|
-
path: resolvedPath,
|
|
123
|
-
body: body,
|
|
124
|
-
})];
|
|
125
|
-
}
|
|
49
|
+
return new __HttpRequest({
|
|
50
|
+
protocol,
|
|
51
|
+
hostname,
|
|
52
|
+
port,
|
|
53
|
+
method: "POST",
|
|
54
|
+
headers,
|
|
55
|
+
path: resolvedPath,
|
|
56
|
+
body,
|
|
126
57
|
});
|
|
127
|
-
}
|
|
128
|
-
export
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
headers = {
|
|
136
|
-
"content-type": "application/json",
|
|
137
|
-
};
|
|
138
|
-
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/reportDefinition/{reportId}";
|
|
139
|
-
resolvedPath = __resolvedPath(resolvedPath, input, "reportId", function () { return input.reportId; }, "{reportId}", false);
|
|
140
|
-
body = JSON.stringify(__assign(__assign(__assign(__assign({}, (input.destinationS3Location != null && {
|
|
141
|
-
destinationS3Location: serializeAws_restJson1S3Location(input.destinationS3Location, context),
|
|
142
|
-
})), (input.format != null && { format: input.format })), (input.reportDescription != null && { reportDescription: input.reportDescription })), (input.reportFrequency != null && { reportFrequency: input.reportFrequency })));
|
|
143
|
-
return [2, new __HttpRequest({
|
|
144
|
-
protocol: protocol,
|
|
145
|
-
hostname: hostname,
|
|
146
|
-
port: port,
|
|
147
|
-
method: "PUT",
|
|
148
|
-
headers: headers,
|
|
149
|
-
path: resolvedPath,
|
|
150
|
-
body: body,
|
|
151
|
-
})];
|
|
152
|
-
}
|
|
58
|
+
};
|
|
59
|
+
export const serializeAws_restJson1ListReportDefinitionsCommand = async (input, context) => {
|
|
60
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
61
|
+
const headers = {};
|
|
62
|
+
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/reportDefinition";
|
|
63
|
+
const query = map({
|
|
64
|
+
nextToken: [, input.nextToken],
|
|
65
|
+
maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
|
|
153
66
|
});
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
$metadata: deserializeMetadata(output),
|
|
165
|
-
});
|
|
166
|
-
_a = __expectNonNull;
|
|
167
|
-
_b = __expectObject;
|
|
168
|
-
return [4, parseBody(output.body, context)];
|
|
169
|
-
case 1:
|
|
170
|
-
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
171
|
-
if (data.reportId != null) {
|
|
172
|
-
contents.reportId = __expectString(data.reportId);
|
|
173
|
-
}
|
|
174
|
-
return [2, contents];
|
|
175
|
-
}
|
|
67
|
+
let body;
|
|
68
|
+
return new __HttpRequest({
|
|
69
|
+
protocol,
|
|
70
|
+
hostname,
|
|
71
|
+
port,
|
|
72
|
+
method: "GET",
|
|
73
|
+
headers,
|
|
74
|
+
path: resolvedPath,
|
|
75
|
+
query,
|
|
76
|
+
body,
|
|
176
77
|
});
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
case "com.amazonaws.applicationcostprofiler#AccessDeniedException": return [3, 2];
|
|
194
|
-
case "InternalServerException": return [3, 4];
|
|
195
|
-
case "com.amazonaws.applicationcostprofiler#InternalServerException": return [3, 4];
|
|
196
|
-
case "ThrottlingException": return [3, 6];
|
|
197
|
-
case "com.amazonaws.applicationcostprofiler#ThrottlingException": return [3, 6];
|
|
198
|
-
case "ValidationException": return [3, 8];
|
|
199
|
-
case "com.amazonaws.applicationcostprofiler#ValidationException": return [3, 8];
|
|
200
|
-
}
|
|
201
|
-
return [3, 10];
|
|
202
|
-
case 2: return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
203
|
-
case 3: throw _d.sent();
|
|
204
|
-
case 4: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
205
|
-
case 5: throw _d.sent();
|
|
206
|
-
case 6: return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
207
|
-
case 7: throw _d.sent();
|
|
208
|
-
case 8: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
209
|
-
case 9: throw _d.sent();
|
|
210
|
-
case 10:
|
|
211
|
-
parsedBody = parsedOutput.body;
|
|
212
|
-
throwDefaultError({
|
|
213
|
-
output: output,
|
|
214
|
-
parsedBody: parsedBody,
|
|
215
|
-
exceptionCtor: __BaseException,
|
|
216
|
-
errorCode: errorCode,
|
|
217
|
-
});
|
|
218
|
-
_d.label = 11;
|
|
219
|
-
case 11: return [2];
|
|
220
|
-
}
|
|
221
|
-
});
|
|
222
|
-
}); };
|
|
223
|
-
export var deserializeAws_restJson1GetReportDefinitionCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
224
|
-
var contents, data, _a, _b;
|
|
225
|
-
return __generator(this, function (_c) {
|
|
226
|
-
switch (_c.label) {
|
|
227
|
-
case 0:
|
|
228
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
229
|
-
return [2, deserializeAws_restJson1GetReportDefinitionCommandError(output, context)];
|
|
230
|
-
}
|
|
231
|
-
contents = map({
|
|
232
|
-
$metadata: deserializeMetadata(output),
|
|
233
|
-
});
|
|
234
|
-
_a = __expectNonNull;
|
|
235
|
-
_b = __expectObject;
|
|
236
|
-
return [4, parseBody(output.body, context)];
|
|
237
|
-
case 1:
|
|
238
|
-
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
239
|
-
if (data.createdAt != null) {
|
|
240
|
-
contents.createdAt = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.createdAt)));
|
|
241
|
-
}
|
|
242
|
-
if (data.destinationS3Location != null) {
|
|
243
|
-
contents.destinationS3Location = deserializeAws_restJson1S3Location(data.destinationS3Location, context);
|
|
244
|
-
}
|
|
245
|
-
if (data.format != null) {
|
|
246
|
-
contents.format = __expectString(data.format);
|
|
247
|
-
}
|
|
248
|
-
if (data.lastUpdated != null) {
|
|
249
|
-
contents.lastUpdated = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.lastUpdated)));
|
|
250
|
-
}
|
|
251
|
-
if (data.reportDescription != null) {
|
|
252
|
-
contents.reportDescription = __expectString(data.reportDescription);
|
|
253
|
-
}
|
|
254
|
-
if (data.reportFrequency != null) {
|
|
255
|
-
contents.reportFrequency = __expectString(data.reportFrequency);
|
|
256
|
-
}
|
|
257
|
-
if (data.reportId != null) {
|
|
258
|
-
contents.reportId = __expectString(data.reportId);
|
|
259
|
-
}
|
|
260
|
-
return [2, contents];
|
|
261
|
-
}
|
|
78
|
+
};
|
|
79
|
+
export const serializeAws_restJson1PutReportDefinitionCommand = async (input, context) => {
|
|
80
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
81
|
+
const headers = {
|
|
82
|
+
"content-type": "application/json",
|
|
83
|
+
};
|
|
84
|
+
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/reportDefinition";
|
|
85
|
+
let body;
|
|
86
|
+
body = JSON.stringify({
|
|
87
|
+
...(input.destinationS3Location != null && {
|
|
88
|
+
destinationS3Location: serializeAws_restJson1S3Location(input.destinationS3Location, context),
|
|
89
|
+
}),
|
|
90
|
+
...(input.format != null && { format: input.format }),
|
|
91
|
+
...(input.reportDescription != null && { reportDescription: input.reportDescription }),
|
|
92
|
+
...(input.reportFrequency != null && { reportFrequency: input.reportFrequency }),
|
|
93
|
+
...(input.reportId != null && { reportId: input.reportId }),
|
|
262
94
|
});
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
_c = {};
|
|
272
|
-
return [4, parseErrorBody(output.body, context)];
|
|
273
|
-
case 1:
|
|
274
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
275
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
276
|
-
_b = errorCode;
|
|
277
|
-
switch (_b) {
|
|
278
|
-
case "AccessDeniedException": return [3, 2];
|
|
279
|
-
case "com.amazonaws.applicationcostprofiler#AccessDeniedException": return [3, 2];
|
|
280
|
-
case "InternalServerException": return [3, 4];
|
|
281
|
-
case "com.amazonaws.applicationcostprofiler#InternalServerException": return [3, 4];
|
|
282
|
-
case "ThrottlingException": return [3, 6];
|
|
283
|
-
case "com.amazonaws.applicationcostprofiler#ThrottlingException": return [3, 6];
|
|
284
|
-
case "ValidationException": return [3, 8];
|
|
285
|
-
case "com.amazonaws.applicationcostprofiler#ValidationException": return [3, 8];
|
|
286
|
-
}
|
|
287
|
-
return [3, 10];
|
|
288
|
-
case 2: return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
289
|
-
case 3: throw _d.sent();
|
|
290
|
-
case 4: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
291
|
-
case 5: throw _d.sent();
|
|
292
|
-
case 6: return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
293
|
-
case 7: throw _d.sent();
|
|
294
|
-
case 8: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
295
|
-
case 9: throw _d.sent();
|
|
296
|
-
case 10:
|
|
297
|
-
parsedBody = parsedOutput.body;
|
|
298
|
-
throwDefaultError({
|
|
299
|
-
output: output,
|
|
300
|
-
parsedBody: parsedBody,
|
|
301
|
-
exceptionCtor: __BaseException,
|
|
302
|
-
errorCode: errorCode,
|
|
303
|
-
});
|
|
304
|
-
_d.label = 11;
|
|
305
|
-
case 11: return [2];
|
|
306
|
-
}
|
|
95
|
+
return new __HttpRequest({
|
|
96
|
+
protocol,
|
|
97
|
+
hostname,
|
|
98
|
+
port,
|
|
99
|
+
method: "POST",
|
|
100
|
+
headers,
|
|
101
|
+
path: resolvedPath,
|
|
102
|
+
body,
|
|
307
103
|
});
|
|
308
|
-
}
|
|
309
|
-
export
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
325
|
-
if (data.importId != null) {
|
|
326
|
-
contents.importId = __expectString(data.importId);
|
|
327
|
-
}
|
|
328
|
-
return [2, contents];
|
|
329
|
-
}
|
|
104
|
+
};
|
|
105
|
+
export const serializeAws_restJson1UpdateReportDefinitionCommand = async (input, context) => {
|
|
106
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
107
|
+
const headers = {
|
|
108
|
+
"content-type": "application/json",
|
|
109
|
+
};
|
|
110
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/reportDefinition/{reportId}";
|
|
111
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "reportId", () => input.reportId, "{reportId}", false);
|
|
112
|
+
let body;
|
|
113
|
+
body = JSON.stringify({
|
|
114
|
+
...(input.destinationS3Location != null && {
|
|
115
|
+
destinationS3Location: serializeAws_restJson1S3Location(input.destinationS3Location, context),
|
|
116
|
+
}),
|
|
117
|
+
...(input.format != null && { format: input.format }),
|
|
118
|
+
...(input.reportDescription != null && { reportDescription: input.reportDescription }),
|
|
119
|
+
...(input.reportFrequency != null && { reportFrequency: input.reportFrequency }),
|
|
330
120
|
});
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
_c = {};
|
|
340
|
-
return [4, parseErrorBody(output.body, context)];
|
|
341
|
-
case 1:
|
|
342
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
343
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
344
|
-
_b = errorCode;
|
|
345
|
-
switch (_b) {
|
|
346
|
-
case "AccessDeniedException": return [3, 2];
|
|
347
|
-
case "com.amazonaws.applicationcostprofiler#AccessDeniedException": return [3, 2];
|
|
348
|
-
case "InternalServerException": return [3, 4];
|
|
349
|
-
case "com.amazonaws.applicationcostprofiler#InternalServerException": return [3, 4];
|
|
350
|
-
case "ThrottlingException": return [3, 6];
|
|
351
|
-
case "com.amazonaws.applicationcostprofiler#ThrottlingException": return [3, 6];
|
|
352
|
-
case "ValidationException": return [3, 8];
|
|
353
|
-
case "com.amazonaws.applicationcostprofiler#ValidationException": return [3, 8];
|
|
354
|
-
}
|
|
355
|
-
return [3, 10];
|
|
356
|
-
case 2: return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
357
|
-
case 3: throw _d.sent();
|
|
358
|
-
case 4: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
359
|
-
case 5: throw _d.sent();
|
|
360
|
-
case 6: return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
361
|
-
case 7: throw _d.sent();
|
|
362
|
-
case 8: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
363
|
-
case 9: throw _d.sent();
|
|
364
|
-
case 10:
|
|
365
|
-
parsedBody = parsedOutput.body;
|
|
366
|
-
throwDefaultError({
|
|
367
|
-
output: output,
|
|
368
|
-
parsedBody: parsedBody,
|
|
369
|
-
exceptionCtor: __BaseException,
|
|
370
|
-
errorCode: errorCode,
|
|
371
|
-
});
|
|
372
|
-
_d.label = 11;
|
|
373
|
-
case 11: return [2];
|
|
374
|
-
}
|
|
121
|
+
return new __HttpRequest({
|
|
122
|
+
protocol,
|
|
123
|
+
hostname,
|
|
124
|
+
port,
|
|
125
|
+
method: "PUT",
|
|
126
|
+
headers,
|
|
127
|
+
path: resolvedPath,
|
|
128
|
+
body,
|
|
375
129
|
});
|
|
376
|
-
}
|
|
377
|
-
export
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
return [2, deserializeAws_restJson1ListReportDefinitionsCommandError(output, context)];
|
|
384
|
-
}
|
|
385
|
-
contents = map({
|
|
386
|
-
$metadata: deserializeMetadata(output),
|
|
387
|
-
});
|
|
388
|
-
_a = __expectNonNull;
|
|
389
|
-
_b = __expectObject;
|
|
390
|
-
return [4, parseBody(output.body, context)];
|
|
391
|
-
case 1:
|
|
392
|
-
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
393
|
-
if (data.nextToken != null) {
|
|
394
|
-
contents.nextToken = __expectString(data.nextToken);
|
|
395
|
-
}
|
|
396
|
-
if (data.reportDefinitions != null) {
|
|
397
|
-
contents.reportDefinitions = deserializeAws_restJson1ReportDefinitionList(data.reportDefinitions, context);
|
|
398
|
-
}
|
|
399
|
-
return [2, contents];
|
|
400
|
-
}
|
|
130
|
+
};
|
|
131
|
+
export const deserializeAws_restJson1DeleteReportDefinitionCommand = async (output, context) => {
|
|
132
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
133
|
+
return deserializeAws_restJson1DeleteReportDefinitionCommandError(output, context);
|
|
134
|
+
}
|
|
135
|
+
const contents = map({
|
|
136
|
+
$metadata: deserializeMetadata(output),
|
|
401
137
|
});
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
return
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
_d.label = 11;
|
|
444
|
-
case 11: return [2];
|
|
445
|
-
}
|
|
138
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
139
|
+
if (data.reportId != null) {
|
|
140
|
+
contents.reportId = __expectString(data.reportId);
|
|
141
|
+
}
|
|
142
|
+
return contents;
|
|
143
|
+
};
|
|
144
|
+
const deserializeAws_restJson1DeleteReportDefinitionCommandError = async (output, context) => {
|
|
145
|
+
const parsedOutput = {
|
|
146
|
+
...output,
|
|
147
|
+
body: await parseErrorBody(output.body, context),
|
|
148
|
+
};
|
|
149
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
150
|
+
switch (errorCode) {
|
|
151
|
+
case "AccessDeniedException":
|
|
152
|
+
case "com.amazonaws.applicationcostprofiler#AccessDeniedException":
|
|
153
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
154
|
+
case "InternalServerException":
|
|
155
|
+
case "com.amazonaws.applicationcostprofiler#InternalServerException":
|
|
156
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
157
|
+
case "ThrottlingException":
|
|
158
|
+
case "com.amazonaws.applicationcostprofiler#ThrottlingException":
|
|
159
|
+
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
160
|
+
case "ValidationException":
|
|
161
|
+
case "com.amazonaws.applicationcostprofiler#ValidationException":
|
|
162
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
163
|
+
default:
|
|
164
|
+
const parsedBody = parsedOutput.body;
|
|
165
|
+
throwDefaultError({
|
|
166
|
+
output,
|
|
167
|
+
parsedBody,
|
|
168
|
+
exceptionCtor: __BaseException,
|
|
169
|
+
errorCode,
|
|
170
|
+
});
|
|
171
|
+
}
|
|
172
|
+
};
|
|
173
|
+
export const deserializeAws_restJson1GetReportDefinitionCommand = async (output, context) => {
|
|
174
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
175
|
+
return deserializeAws_restJson1GetReportDefinitionCommandError(output, context);
|
|
176
|
+
}
|
|
177
|
+
const contents = map({
|
|
178
|
+
$metadata: deserializeMetadata(output),
|
|
446
179
|
});
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
180
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
181
|
+
if (data.createdAt != null) {
|
|
182
|
+
contents.createdAt = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.createdAt)));
|
|
183
|
+
}
|
|
184
|
+
if (data.destinationS3Location != null) {
|
|
185
|
+
contents.destinationS3Location = deserializeAws_restJson1S3Location(data.destinationS3Location, context);
|
|
186
|
+
}
|
|
187
|
+
if (data.format != null) {
|
|
188
|
+
contents.format = __expectString(data.format);
|
|
189
|
+
}
|
|
190
|
+
if (data.lastUpdated != null) {
|
|
191
|
+
contents.lastUpdated = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.lastUpdated)));
|
|
192
|
+
}
|
|
193
|
+
if (data.reportDescription != null) {
|
|
194
|
+
contents.reportDescription = __expectString(data.reportDescription);
|
|
195
|
+
}
|
|
196
|
+
if (data.reportFrequency != null) {
|
|
197
|
+
contents.reportFrequency = __expectString(data.reportFrequency);
|
|
198
|
+
}
|
|
199
|
+
if (data.reportId != null) {
|
|
200
|
+
contents.reportId = __expectString(data.reportId);
|
|
201
|
+
}
|
|
202
|
+
return contents;
|
|
203
|
+
};
|
|
204
|
+
const deserializeAws_restJson1GetReportDefinitionCommandError = async (output, context) => {
|
|
205
|
+
const parsedOutput = {
|
|
206
|
+
...output,
|
|
207
|
+
body: await parseErrorBody(output.body, context),
|
|
208
|
+
};
|
|
209
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
210
|
+
switch (errorCode) {
|
|
211
|
+
case "AccessDeniedException":
|
|
212
|
+
case "com.amazonaws.applicationcostprofiler#AccessDeniedException":
|
|
213
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
214
|
+
case "InternalServerException":
|
|
215
|
+
case "com.amazonaws.applicationcostprofiler#InternalServerException":
|
|
216
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
217
|
+
case "ThrottlingException":
|
|
218
|
+
case "com.amazonaws.applicationcostprofiler#ThrottlingException":
|
|
219
|
+
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
220
|
+
case "ValidationException":
|
|
221
|
+
case "com.amazonaws.applicationcostprofiler#ValidationException":
|
|
222
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
223
|
+
default:
|
|
224
|
+
const parsedBody = parsedOutput.body;
|
|
225
|
+
throwDefaultError({
|
|
226
|
+
output,
|
|
227
|
+
parsedBody,
|
|
228
|
+
exceptionCtor: __BaseException,
|
|
229
|
+
errorCode,
|
|
230
|
+
});
|
|
231
|
+
}
|
|
232
|
+
};
|
|
233
|
+
export const deserializeAws_restJson1ImportApplicationUsageCommand = async (output, context) => {
|
|
234
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
235
|
+
return deserializeAws_restJson1ImportApplicationUsageCommandError(output, context);
|
|
236
|
+
}
|
|
237
|
+
const contents = map({
|
|
238
|
+
$metadata: deserializeMetadata(output),
|
|
469
239
|
});
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
return
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
parsedBody: parsedBody,
|
|
512
|
-
exceptionCtor: __BaseException,
|
|
513
|
-
errorCode: errorCode,
|
|
514
|
-
});
|
|
515
|
-
_d.label = 13;
|
|
516
|
-
case 13: return [2];
|
|
517
|
-
}
|
|
240
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
241
|
+
if (data.importId != null) {
|
|
242
|
+
contents.importId = __expectString(data.importId);
|
|
243
|
+
}
|
|
244
|
+
return contents;
|
|
245
|
+
};
|
|
246
|
+
const deserializeAws_restJson1ImportApplicationUsageCommandError = async (output, context) => {
|
|
247
|
+
const parsedOutput = {
|
|
248
|
+
...output,
|
|
249
|
+
body: await parseErrorBody(output.body, context),
|
|
250
|
+
};
|
|
251
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
252
|
+
switch (errorCode) {
|
|
253
|
+
case "AccessDeniedException":
|
|
254
|
+
case "com.amazonaws.applicationcostprofiler#AccessDeniedException":
|
|
255
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
256
|
+
case "InternalServerException":
|
|
257
|
+
case "com.amazonaws.applicationcostprofiler#InternalServerException":
|
|
258
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
259
|
+
case "ThrottlingException":
|
|
260
|
+
case "com.amazonaws.applicationcostprofiler#ThrottlingException":
|
|
261
|
+
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
262
|
+
case "ValidationException":
|
|
263
|
+
case "com.amazonaws.applicationcostprofiler#ValidationException":
|
|
264
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
265
|
+
default:
|
|
266
|
+
const parsedBody = parsedOutput.body;
|
|
267
|
+
throwDefaultError({
|
|
268
|
+
output,
|
|
269
|
+
parsedBody,
|
|
270
|
+
exceptionCtor: __BaseException,
|
|
271
|
+
errorCode,
|
|
272
|
+
});
|
|
273
|
+
}
|
|
274
|
+
};
|
|
275
|
+
export const deserializeAws_restJson1ListReportDefinitionsCommand = async (output, context) => {
|
|
276
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
277
|
+
return deserializeAws_restJson1ListReportDefinitionsCommandError(output, context);
|
|
278
|
+
}
|
|
279
|
+
const contents = map({
|
|
280
|
+
$metadata: deserializeMetadata(output),
|
|
518
281
|
});
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
282
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
283
|
+
if (data.nextToken != null) {
|
|
284
|
+
contents.nextToken = __expectString(data.nextToken);
|
|
285
|
+
}
|
|
286
|
+
if (data.reportDefinitions != null) {
|
|
287
|
+
contents.reportDefinitions = deserializeAws_restJson1ReportDefinitionList(data.reportDefinitions, context);
|
|
288
|
+
}
|
|
289
|
+
return contents;
|
|
290
|
+
};
|
|
291
|
+
const deserializeAws_restJson1ListReportDefinitionsCommandError = async (output, context) => {
|
|
292
|
+
const parsedOutput = {
|
|
293
|
+
...output,
|
|
294
|
+
body: await parseErrorBody(output.body, context),
|
|
295
|
+
};
|
|
296
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
297
|
+
switch (errorCode) {
|
|
298
|
+
case "AccessDeniedException":
|
|
299
|
+
case "com.amazonaws.applicationcostprofiler#AccessDeniedException":
|
|
300
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
301
|
+
case "InternalServerException":
|
|
302
|
+
case "com.amazonaws.applicationcostprofiler#InternalServerException":
|
|
303
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
304
|
+
case "ThrottlingException":
|
|
305
|
+
case "com.amazonaws.applicationcostprofiler#ThrottlingException":
|
|
306
|
+
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
307
|
+
case "ValidationException":
|
|
308
|
+
case "com.amazonaws.applicationcostprofiler#ValidationException":
|
|
309
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
310
|
+
default:
|
|
311
|
+
const parsedBody = parsedOutput.body;
|
|
312
|
+
throwDefaultError({
|
|
313
|
+
output,
|
|
314
|
+
parsedBody,
|
|
315
|
+
exceptionCtor: __BaseException,
|
|
316
|
+
errorCode,
|
|
317
|
+
});
|
|
318
|
+
}
|
|
319
|
+
};
|
|
320
|
+
export const deserializeAws_restJson1PutReportDefinitionCommand = async (output, context) => {
|
|
321
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
322
|
+
return deserializeAws_restJson1PutReportDefinitionCommandError(output, context);
|
|
323
|
+
}
|
|
324
|
+
const contents = map({
|
|
325
|
+
$metadata: deserializeMetadata(output),
|
|
541
326
|
});
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
return
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
327
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
328
|
+
if (data.reportId != null) {
|
|
329
|
+
contents.reportId = __expectString(data.reportId);
|
|
330
|
+
}
|
|
331
|
+
return contents;
|
|
332
|
+
};
|
|
333
|
+
const deserializeAws_restJson1PutReportDefinitionCommandError = async (output, context) => {
|
|
334
|
+
const parsedOutput = {
|
|
335
|
+
...output,
|
|
336
|
+
body: await parseErrorBody(output.body, context),
|
|
337
|
+
};
|
|
338
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
339
|
+
switch (errorCode) {
|
|
340
|
+
case "AccessDeniedException":
|
|
341
|
+
case "com.amazonaws.applicationcostprofiler#AccessDeniedException":
|
|
342
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
343
|
+
case "InternalServerException":
|
|
344
|
+
case "com.amazonaws.applicationcostprofiler#InternalServerException":
|
|
345
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
346
|
+
case "ServiceQuotaExceededException":
|
|
347
|
+
case "com.amazonaws.applicationcostprofiler#ServiceQuotaExceededException":
|
|
348
|
+
throw await deserializeAws_restJson1ServiceQuotaExceededExceptionResponse(parsedOutput, context);
|
|
349
|
+
case "ThrottlingException":
|
|
350
|
+
case "com.amazonaws.applicationcostprofiler#ThrottlingException":
|
|
351
|
+
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
352
|
+
case "ValidationException":
|
|
353
|
+
case "com.amazonaws.applicationcostprofiler#ValidationException":
|
|
354
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
355
|
+
default:
|
|
356
|
+
const parsedBody = parsedOutput.body;
|
|
357
|
+
throwDefaultError({
|
|
358
|
+
output,
|
|
359
|
+
parsedBody,
|
|
360
|
+
exceptionCtor: __BaseException,
|
|
361
|
+
errorCode,
|
|
362
|
+
});
|
|
363
|
+
}
|
|
364
|
+
};
|
|
365
|
+
export const deserializeAws_restJson1UpdateReportDefinitionCommand = async (output, context) => {
|
|
366
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
367
|
+
return deserializeAws_restJson1UpdateReportDefinitionCommandError(output, context);
|
|
368
|
+
}
|
|
369
|
+
const contents = map({
|
|
370
|
+
$metadata: deserializeMetadata(output),
|
|
586
371
|
});
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
return
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
372
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
373
|
+
if (data.reportId != null) {
|
|
374
|
+
contents.reportId = __expectString(data.reportId);
|
|
375
|
+
}
|
|
376
|
+
return contents;
|
|
377
|
+
};
|
|
378
|
+
const deserializeAws_restJson1UpdateReportDefinitionCommandError = async (output, context) => {
|
|
379
|
+
const parsedOutput = {
|
|
380
|
+
...output,
|
|
381
|
+
body: await parseErrorBody(output.body, context),
|
|
382
|
+
};
|
|
383
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
384
|
+
switch (errorCode) {
|
|
385
|
+
case "AccessDeniedException":
|
|
386
|
+
case "com.amazonaws.applicationcostprofiler#AccessDeniedException":
|
|
387
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
388
|
+
case "InternalServerException":
|
|
389
|
+
case "com.amazonaws.applicationcostprofiler#InternalServerException":
|
|
390
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
391
|
+
case "ThrottlingException":
|
|
392
|
+
case "com.amazonaws.applicationcostprofiler#ThrottlingException":
|
|
393
|
+
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
394
|
+
case "ValidationException":
|
|
395
|
+
case "com.amazonaws.applicationcostprofiler#ValidationException":
|
|
396
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
397
|
+
default:
|
|
398
|
+
const parsedBody = parsedOutput.body;
|
|
399
|
+
throwDefaultError({
|
|
400
|
+
output,
|
|
401
|
+
parsedBody,
|
|
402
|
+
exceptionCtor: __BaseException,
|
|
403
|
+
errorCode,
|
|
404
|
+
});
|
|
405
|
+
}
|
|
406
|
+
};
|
|
407
|
+
const map = __map;
|
|
408
|
+
const deserializeAws_restJson1AccessDeniedExceptionResponse = async (parsedOutput, context) => {
|
|
409
|
+
const contents = map({});
|
|
410
|
+
const data = parsedOutput.body;
|
|
411
|
+
if (data.message != null) {
|
|
412
|
+
contents.message = __expectString(data.message);
|
|
413
|
+
}
|
|
414
|
+
const exception = new AccessDeniedException({
|
|
415
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
416
|
+
...contents,
|
|
599
417
|
});
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
418
|
+
return __decorateServiceException(exception, parsedOutput.body);
|
|
419
|
+
};
|
|
420
|
+
const deserializeAws_restJson1InternalServerExceptionResponse = async (parsedOutput, context) => {
|
|
421
|
+
const contents = map({});
|
|
422
|
+
const data = parsedOutput.body;
|
|
423
|
+
if (data.message != null) {
|
|
424
|
+
contents.message = __expectString(data.message);
|
|
425
|
+
}
|
|
426
|
+
const exception = new InternalServerException({
|
|
427
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
428
|
+
...contents,
|
|
611
429
|
});
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
430
|
+
return __decorateServiceException(exception, parsedOutput.body);
|
|
431
|
+
};
|
|
432
|
+
const deserializeAws_restJson1ServiceQuotaExceededExceptionResponse = async (parsedOutput, context) => {
|
|
433
|
+
const contents = map({});
|
|
434
|
+
const data = parsedOutput.body;
|
|
435
|
+
if (data.message != null) {
|
|
436
|
+
contents.message = __expectString(data.message);
|
|
437
|
+
}
|
|
438
|
+
const exception = new ServiceQuotaExceededException({
|
|
439
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
440
|
+
...contents,
|
|
623
441
|
});
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
442
|
+
return __decorateServiceException(exception, parsedOutput.body);
|
|
443
|
+
};
|
|
444
|
+
const deserializeAws_restJson1ThrottlingExceptionResponse = async (parsedOutput, context) => {
|
|
445
|
+
const contents = map({});
|
|
446
|
+
const data = parsedOutput.body;
|
|
447
|
+
if (data.message != null) {
|
|
448
|
+
contents.message = __expectString(data.message);
|
|
449
|
+
}
|
|
450
|
+
const exception = new ThrottlingException({
|
|
451
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
452
|
+
...contents,
|
|
635
453
|
});
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
454
|
+
return __decorateServiceException(exception, parsedOutput.body);
|
|
455
|
+
};
|
|
456
|
+
const deserializeAws_restJson1ValidationExceptionResponse = async (parsedOutput, context) => {
|
|
457
|
+
const contents = map({});
|
|
458
|
+
const data = parsedOutput.body;
|
|
459
|
+
if (data.message != null) {
|
|
460
|
+
contents.message = __expectString(data.message);
|
|
461
|
+
}
|
|
462
|
+
const exception = new ValidationException({
|
|
463
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
464
|
+
...contents,
|
|
647
465
|
});
|
|
648
|
-
|
|
649
|
-
var serializeAws_restJson1S3Location = function (input, context) {
|
|
650
|
-
return __assign(__assign({}, (input.bucket != null && { bucket: input.bucket })), (input.prefix != null && { prefix: input.prefix }));
|
|
466
|
+
return __decorateServiceException(exception, parsedOutput.body);
|
|
651
467
|
};
|
|
652
|
-
|
|
653
|
-
return
|
|
468
|
+
const serializeAws_restJson1S3Location = (input, context) => {
|
|
469
|
+
return {
|
|
470
|
+
...(input.bucket != null && { bucket: input.bucket }),
|
|
471
|
+
...(input.prefix != null && { prefix: input.prefix }),
|
|
472
|
+
};
|
|
654
473
|
};
|
|
655
|
-
|
|
474
|
+
const serializeAws_restJson1SourceS3Location = (input, context) => {
|
|
475
|
+
return {
|
|
476
|
+
...(input.bucket != null && { bucket: input.bucket }),
|
|
477
|
+
...(input.key != null && { key: input.key }),
|
|
478
|
+
...(input.region != null && { region: input.region }),
|
|
479
|
+
};
|
|
480
|
+
};
|
|
481
|
+
const deserializeAws_restJson1ReportDefinition = (output, context) => {
|
|
656
482
|
return {
|
|
657
483
|
createdAt: output.createdAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createdAt))) : undefined,
|
|
658
484
|
destinationS3Location: output.destinationS3Location != null
|
|
@@ -667,10 +493,10 @@ var deserializeAws_restJson1ReportDefinition = function (output, context) {
|
|
|
667
493
|
reportId: __expectString(output.reportId),
|
|
668
494
|
};
|
|
669
495
|
};
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
.filter(
|
|
673
|
-
.map(
|
|
496
|
+
const deserializeAws_restJson1ReportDefinitionList = (output, context) => {
|
|
497
|
+
const retVal = (output || [])
|
|
498
|
+
.filter((e) => e != null)
|
|
499
|
+
.map((entry) => {
|
|
674
500
|
if (entry === null) {
|
|
675
501
|
return null;
|
|
676
502
|
}
|
|
@@ -678,63 +504,45 @@ var deserializeAws_restJson1ReportDefinitionList = function (output, context) {
|
|
|
678
504
|
});
|
|
679
505
|
return retVal;
|
|
680
506
|
};
|
|
681
|
-
|
|
507
|
+
const deserializeAws_restJson1S3Location = (output, context) => {
|
|
682
508
|
return {
|
|
683
509
|
bucket: __expectString(output.bucket),
|
|
684
510
|
prefix: __expectString(output.prefix),
|
|
685
511
|
};
|
|
686
512
|
};
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
});
|
|
695
|
-
};
|
|
696
|
-
var collectBody = function (streamBody, context) {
|
|
697
|
-
if (streamBody === void 0) { streamBody = new Uint8Array(); }
|
|
513
|
+
const deserializeMetadata = (output) => ({
|
|
514
|
+
httpStatusCode: output.statusCode,
|
|
515
|
+
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
|
|
516
|
+
extendedRequestId: output.headers["x-amz-id-2"],
|
|
517
|
+
cfId: output.headers["x-amz-cf-id"],
|
|
518
|
+
});
|
|
519
|
+
const collectBody = (streamBody = new Uint8Array(), context) => {
|
|
698
520
|
if (streamBody instanceof Uint8Array) {
|
|
699
521
|
return Promise.resolve(streamBody);
|
|
700
522
|
}
|
|
701
523
|
return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());
|
|
702
524
|
};
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
}
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
});
|
|
525
|
+
const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
|
|
526
|
+
const isSerializableHeaderValue = (value) => value !== undefined &&
|
|
527
|
+
value !== null &&
|
|
528
|
+
value !== "" &&
|
|
529
|
+
(!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
|
|
530
|
+
(!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
|
|
531
|
+
const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
|
|
532
|
+
if (encoded.length) {
|
|
533
|
+
return JSON.parse(encoded);
|
|
534
|
+
}
|
|
535
|
+
return {};
|
|
536
|
+
});
|
|
537
|
+
const parseErrorBody = async (errorBody, context) => {
|
|
538
|
+
const value = await parseBody(errorBody, context);
|
|
539
|
+
value.message = value.message ?? value.Message;
|
|
540
|
+
return value;
|
|
720
541
|
};
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
switch (_b.label) {
|
|
726
|
-
case 0: return [4, parseBody(errorBody, context)];
|
|
727
|
-
case 1:
|
|
728
|
-
value = _b.sent();
|
|
729
|
-
value.message = (_a = value.message) !== null && _a !== void 0 ? _a : value.Message;
|
|
730
|
-
return [2, value];
|
|
731
|
-
}
|
|
732
|
-
});
|
|
733
|
-
}); };
|
|
734
|
-
var loadRestJsonErrorCode = function (output, data) {
|
|
735
|
-
var findKey = function (object, key) { return Object.keys(object).find(function (k) { return k.toLowerCase() === key.toLowerCase(); }); };
|
|
736
|
-
var sanitizeErrorCode = function (rawValue) {
|
|
737
|
-
var cleanValue = rawValue;
|
|
542
|
+
const loadRestJsonErrorCode = (output, data) => {
|
|
543
|
+
const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
|
|
544
|
+
const sanitizeErrorCode = (rawValue) => {
|
|
545
|
+
let cleanValue = rawValue;
|
|
738
546
|
if (typeof cleanValue === "number") {
|
|
739
547
|
cleanValue = cleanValue.toString();
|
|
740
548
|
}
|
|
@@ -749,7 +557,7 @@ var loadRestJsonErrorCode = function (output, data) {
|
|
|
749
557
|
}
|
|
750
558
|
return cleanValue;
|
|
751
559
|
};
|
|
752
|
-
|
|
560
|
+
const headerKey = findKey(output.headers, "x-amzn-errortype");
|
|
753
561
|
if (headerKey !== undefined) {
|
|
754
562
|
return sanitizeErrorCode(output.headers[headerKey]);
|
|
755
563
|
}
|