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