@aws-sdk/client-applicationcostprofiler 3.310.0 → 3.315.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.
|
@@ -46,9 +46,9 @@ const se_ImportApplicationUsageCommand = async (input, context) => {
|
|
|
46
46
|
};
|
|
47
47
|
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/importApplicationUsage";
|
|
48
48
|
let body;
|
|
49
|
-
body = JSON.stringify({
|
|
50
|
-
|
|
51
|
-
});
|
|
49
|
+
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
50
|
+
sourceS3Location: (_) => (0, smithy_client_1._json)(_),
|
|
51
|
+
}));
|
|
52
52
|
return new protocol_http_1.HttpRequest({
|
|
53
53
|
protocol,
|
|
54
54
|
hostname,
|
|
@@ -64,7 +64,7 @@ const se_ListReportDefinitionsCommand = async (input, context) => {
|
|
|
64
64
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
65
65
|
const headers = {};
|
|
66
66
|
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/reportDefinition";
|
|
67
|
-
const query = map({
|
|
67
|
+
const query = (0, smithy_client_1.map)({
|
|
68
68
|
nextToken: [, input.nextToken],
|
|
69
69
|
maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
|
|
70
70
|
});
|
|
@@ -88,15 +88,13 @@ const se_PutReportDefinitionCommand = async (input, context) => {
|
|
|
88
88
|
};
|
|
89
89
|
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/reportDefinition";
|
|
90
90
|
let body;
|
|
91
|
-
body = JSON.stringify({
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
...(input.reportId != null && { reportId: input.reportId }),
|
|
99
|
-
});
|
|
91
|
+
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
92
|
+
destinationS3Location: (_) => (0, smithy_client_1._json)(_),
|
|
93
|
+
format: [],
|
|
94
|
+
reportDescription: [],
|
|
95
|
+
reportFrequency: [],
|
|
96
|
+
reportId: [],
|
|
97
|
+
}));
|
|
100
98
|
return new protocol_http_1.HttpRequest({
|
|
101
99
|
protocol,
|
|
102
100
|
hostname,
|
|
@@ -116,14 +114,12 @@ const se_UpdateReportDefinitionCommand = async (input, context) => {
|
|
|
116
114
|
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/reportDefinition/{reportId}";
|
|
117
115
|
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "reportId", () => input.reportId, "{reportId}", false);
|
|
118
116
|
let body;
|
|
119
|
-
body = JSON.stringify({
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
...(input.reportFrequency != null && { reportFrequency: input.reportFrequency }),
|
|
126
|
-
});
|
|
117
|
+
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
118
|
+
destinationS3Location: (_) => (0, smithy_client_1._json)(_),
|
|
119
|
+
format: [],
|
|
120
|
+
reportDescription: [],
|
|
121
|
+
reportFrequency: [],
|
|
122
|
+
}));
|
|
127
123
|
return new protocol_http_1.HttpRequest({
|
|
128
124
|
protocol,
|
|
129
125
|
hostname,
|
|
@@ -139,13 +135,14 @@ const de_DeleteReportDefinitionCommand = async (output, context) => {
|
|
|
139
135
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
140
136
|
return de_DeleteReportDefinitionCommandError(output, context);
|
|
141
137
|
}
|
|
142
|
-
const contents = map({
|
|
138
|
+
const contents = (0, smithy_client_1.map)({
|
|
143
139
|
$metadata: deserializeMetadata(output),
|
|
144
140
|
});
|
|
145
141
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
}
|
|
142
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
143
|
+
reportId: smithy_client_1.expectString,
|
|
144
|
+
});
|
|
145
|
+
Object.assign(contents, doc);
|
|
149
146
|
return contents;
|
|
150
147
|
};
|
|
151
148
|
exports.de_DeleteReportDefinitionCommand = de_DeleteReportDefinitionCommand;
|
|
@@ -170,10 +167,9 @@ const de_DeleteReportDefinitionCommandError = async (output, context) => {
|
|
|
170
167
|
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
171
168
|
default:
|
|
172
169
|
const parsedBody = parsedOutput.body;
|
|
173
|
-
|
|
170
|
+
return throwDefaultError({
|
|
174
171
|
output,
|
|
175
172
|
parsedBody,
|
|
176
|
-
exceptionCtor: ApplicationCostProfilerServiceException_1.ApplicationCostProfilerServiceException,
|
|
177
173
|
errorCode,
|
|
178
174
|
});
|
|
179
175
|
}
|
|
@@ -182,31 +178,20 @@ const de_GetReportDefinitionCommand = async (output, context) => {
|
|
|
182
178
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
183
179
|
return de_GetReportDefinitionCommandError(output, context);
|
|
184
180
|
}
|
|
185
|
-
const contents = map({
|
|
181
|
+
const contents = (0, smithy_client_1.map)({
|
|
186
182
|
$metadata: deserializeMetadata(output),
|
|
187
183
|
});
|
|
188
184
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
}
|
|
198
|
-
|
|
199
|
-
contents.lastUpdated = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(data.lastUpdated)));
|
|
200
|
-
}
|
|
201
|
-
if (data.reportDescription != null) {
|
|
202
|
-
contents.reportDescription = (0, smithy_client_1.expectString)(data.reportDescription);
|
|
203
|
-
}
|
|
204
|
-
if (data.reportFrequency != null) {
|
|
205
|
-
contents.reportFrequency = (0, smithy_client_1.expectString)(data.reportFrequency);
|
|
206
|
-
}
|
|
207
|
-
if (data.reportId != null) {
|
|
208
|
-
contents.reportId = (0, smithy_client_1.expectString)(data.reportId);
|
|
209
|
-
}
|
|
185
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
186
|
+
createdAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
187
|
+
destinationS3Location: smithy_client_1._json,
|
|
188
|
+
format: smithy_client_1.expectString,
|
|
189
|
+
lastUpdated: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
190
|
+
reportDescription: smithy_client_1.expectString,
|
|
191
|
+
reportFrequency: smithy_client_1.expectString,
|
|
192
|
+
reportId: smithy_client_1.expectString,
|
|
193
|
+
});
|
|
194
|
+
Object.assign(contents, doc);
|
|
210
195
|
return contents;
|
|
211
196
|
};
|
|
212
197
|
exports.de_GetReportDefinitionCommand = de_GetReportDefinitionCommand;
|
|
@@ -231,10 +216,9 @@ const de_GetReportDefinitionCommandError = async (output, context) => {
|
|
|
231
216
|
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
232
217
|
default:
|
|
233
218
|
const parsedBody = parsedOutput.body;
|
|
234
|
-
|
|
219
|
+
return throwDefaultError({
|
|
235
220
|
output,
|
|
236
221
|
parsedBody,
|
|
237
|
-
exceptionCtor: ApplicationCostProfilerServiceException_1.ApplicationCostProfilerServiceException,
|
|
238
222
|
errorCode,
|
|
239
223
|
});
|
|
240
224
|
}
|
|
@@ -243,13 +227,14 @@ const de_ImportApplicationUsageCommand = async (output, context) => {
|
|
|
243
227
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
244
228
|
return de_ImportApplicationUsageCommandError(output, context);
|
|
245
229
|
}
|
|
246
|
-
const contents = map({
|
|
230
|
+
const contents = (0, smithy_client_1.map)({
|
|
247
231
|
$metadata: deserializeMetadata(output),
|
|
248
232
|
});
|
|
249
233
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
}
|
|
234
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
235
|
+
importId: smithy_client_1.expectString,
|
|
236
|
+
});
|
|
237
|
+
Object.assign(contents, doc);
|
|
253
238
|
return contents;
|
|
254
239
|
};
|
|
255
240
|
exports.de_ImportApplicationUsageCommand = de_ImportApplicationUsageCommand;
|
|
@@ -274,10 +259,9 @@ const de_ImportApplicationUsageCommandError = async (output, context) => {
|
|
|
274
259
|
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
275
260
|
default:
|
|
276
261
|
const parsedBody = parsedOutput.body;
|
|
277
|
-
|
|
262
|
+
return throwDefaultError({
|
|
278
263
|
output,
|
|
279
264
|
parsedBody,
|
|
280
|
-
exceptionCtor: ApplicationCostProfilerServiceException_1.ApplicationCostProfilerServiceException,
|
|
281
265
|
errorCode,
|
|
282
266
|
});
|
|
283
267
|
}
|
|
@@ -286,16 +270,15 @@ const de_ListReportDefinitionsCommand = async (output, context) => {
|
|
|
286
270
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
287
271
|
return de_ListReportDefinitionsCommandError(output, context);
|
|
288
272
|
}
|
|
289
|
-
const contents = map({
|
|
273
|
+
const contents = (0, smithy_client_1.map)({
|
|
290
274
|
$metadata: deserializeMetadata(output),
|
|
291
275
|
});
|
|
292
276
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
}
|
|
277
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
278
|
+
nextToken: smithy_client_1.expectString,
|
|
279
|
+
reportDefinitions: (_) => de_ReportDefinitionList(_, context),
|
|
280
|
+
});
|
|
281
|
+
Object.assign(contents, doc);
|
|
299
282
|
return contents;
|
|
300
283
|
};
|
|
301
284
|
exports.de_ListReportDefinitionsCommand = de_ListReportDefinitionsCommand;
|
|
@@ -320,10 +303,9 @@ const de_ListReportDefinitionsCommandError = async (output, context) => {
|
|
|
320
303
|
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
321
304
|
default:
|
|
322
305
|
const parsedBody = parsedOutput.body;
|
|
323
|
-
|
|
306
|
+
return throwDefaultError({
|
|
324
307
|
output,
|
|
325
308
|
parsedBody,
|
|
326
|
-
exceptionCtor: ApplicationCostProfilerServiceException_1.ApplicationCostProfilerServiceException,
|
|
327
309
|
errorCode,
|
|
328
310
|
});
|
|
329
311
|
}
|
|
@@ -332,13 +314,14 @@ const de_PutReportDefinitionCommand = async (output, context) => {
|
|
|
332
314
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
333
315
|
return de_PutReportDefinitionCommandError(output, context);
|
|
334
316
|
}
|
|
335
|
-
const contents = map({
|
|
317
|
+
const contents = (0, smithy_client_1.map)({
|
|
336
318
|
$metadata: deserializeMetadata(output),
|
|
337
319
|
});
|
|
338
320
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
}
|
|
321
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
322
|
+
reportId: smithy_client_1.expectString,
|
|
323
|
+
});
|
|
324
|
+
Object.assign(contents, doc);
|
|
342
325
|
return contents;
|
|
343
326
|
};
|
|
344
327
|
exports.de_PutReportDefinitionCommand = de_PutReportDefinitionCommand;
|
|
@@ -366,10 +349,9 @@ const de_PutReportDefinitionCommandError = async (output, context) => {
|
|
|
366
349
|
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
367
350
|
default:
|
|
368
351
|
const parsedBody = parsedOutput.body;
|
|
369
|
-
|
|
352
|
+
return throwDefaultError({
|
|
370
353
|
output,
|
|
371
354
|
parsedBody,
|
|
372
|
-
exceptionCtor: ApplicationCostProfilerServiceException_1.ApplicationCostProfilerServiceException,
|
|
373
355
|
errorCode,
|
|
374
356
|
});
|
|
375
357
|
}
|
|
@@ -378,13 +360,14 @@ const de_UpdateReportDefinitionCommand = async (output, context) => {
|
|
|
378
360
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
379
361
|
return de_UpdateReportDefinitionCommandError(output, context);
|
|
380
362
|
}
|
|
381
|
-
const contents = map({
|
|
363
|
+
const contents = (0, smithy_client_1.map)({
|
|
382
364
|
$metadata: deserializeMetadata(output),
|
|
383
365
|
});
|
|
384
366
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
}
|
|
367
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
368
|
+
reportId: smithy_client_1.expectString,
|
|
369
|
+
});
|
|
370
|
+
Object.assign(contents, doc);
|
|
388
371
|
return contents;
|
|
389
372
|
};
|
|
390
373
|
exports.de_UpdateReportDefinitionCommand = de_UpdateReportDefinitionCommand;
|
|
@@ -409,21 +392,21 @@ const de_UpdateReportDefinitionCommandError = async (output, context) => {
|
|
|
409
392
|
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
410
393
|
default:
|
|
411
394
|
const parsedBody = parsedOutput.body;
|
|
412
|
-
|
|
395
|
+
return throwDefaultError({
|
|
413
396
|
output,
|
|
414
397
|
parsedBody,
|
|
415
|
-
exceptionCtor: ApplicationCostProfilerServiceException_1.ApplicationCostProfilerServiceException,
|
|
416
398
|
errorCode,
|
|
417
399
|
});
|
|
418
400
|
}
|
|
419
401
|
};
|
|
420
|
-
const
|
|
402
|
+
const throwDefaultError = (0, smithy_client_1.withBaseException)(ApplicationCostProfilerServiceException_1.ApplicationCostProfilerServiceException);
|
|
421
403
|
const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
|
|
422
|
-
const contents = map({});
|
|
404
|
+
const contents = (0, smithy_client_1.map)({});
|
|
423
405
|
const data = parsedOutput.body;
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
}
|
|
406
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
407
|
+
message: smithy_client_1.expectString,
|
|
408
|
+
});
|
|
409
|
+
Object.assign(contents, doc);
|
|
427
410
|
const exception = new models_0_1.AccessDeniedException({
|
|
428
411
|
$metadata: deserializeMetadata(parsedOutput),
|
|
429
412
|
...contents,
|
|
@@ -431,11 +414,12 @@ const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
|
|
|
431
414
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
432
415
|
};
|
|
433
416
|
const de_InternalServerExceptionRes = async (parsedOutput, context) => {
|
|
434
|
-
const contents = map({});
|
|
417
|
+
const contents = (0, smithy_client_1.map)({});
|
|
435
418
|
const data = parsedOutput.body;
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
}
|
|
419
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
420
|
+
message: smithy_client_1.expectString,
|
|
421
|
+
});
|
|
422
|
+
Object.assign(contents, doc);
|
|
439
423
|
const exception = new models_0_1.InternalServerException({
|
|
440
424
|
$metadata: deserializeMetadata(parsedOutput),
|
|
441
425
|
...contents,
|
|
@@ -443,11 +427,12 @@ const de_InternalServerExceptionRes = async (parsedOutput, context) => {
|
|
|
443
427
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
444
428
|
};
|
|
445
429
|
const de_ServiceQuotaExceededExceptionRes = async (parsedOutput, context) => {
|
|
446
|
-
const contents = map({});
|
|
430
|
+
const contents = (0, smithy_client_1.map)({});
|
|
447
431
|
const data = parsedOutput.body;
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
}
|
|
432
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
433
|
+
message: smithy_client_1.expectString,
|
|
434
|
+
});
|
|
435
|
+
Object.assign(contents, doc);
|
|
451
436
|
const exception = new models_0_1.ServiceQuotaExceededException({
|
|
452
437
|
$metadata: deserializeMetadata(parsedOutput),
|
|
453
438
|
...contents,
|
|
@@ -455,11 +440,12 @@ const de_ServiceQuotaExceededExceptionRes = async (parsedOutput, context) => {
|
|
|
455
440
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
456
441
|
};
|
|
457
442
|
const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
|
|
458
|
-
const contents = map({});
|
|
443
|
+
const contents = (0, smithy_client_1.map)({});
|
|
459
444
|
const data = parsedOutput.body;
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
}
|
|
445
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
446
|
+
message: smithy_client_1.expectString,
|
|
447
|
+
});
|
|
448
|
+
Object.assign(contents, doc);
|
|
463
449
|
const exception = new models_0_1.ThrottlingException({
|
|
464
450
|
$metadata: deserializeMetadata(parsedOutput),
|
|
465
451
|
...contents,
|
|
@@ -467,60 +453,37 @@ const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
|
|
|
467
453
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
468
454
|
};
|
|
469
455
|
const de_ValidationExceptionRes = async (parsedOutput, context) => {
|
|
470
|
-
const contents = map({});
|
|
456
|
+
const contents = (0, smithy_client_1.map)({});
|
|
471
457
|
const data = parsedOutput.body;
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
}
|
|
458
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
459
|
+
message: smithy_client_1.expectString,
|
|
460
|
+
});
|
|
461
|
+
Object.assign(contents, doc);
|
|
475
462
|
const exception = new models_0_1.ValidationException({
|
|
476
463
|
$metadata: deserializeMetadata(parsedOutput),
|
|
477
464
|
...contents,
|
|
478
465
|
});
|
|
479
466
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
480
467
|
};
|
|
481
|
-
const se_S3Location = (input, context) => {
|
|
482
|
-
return {
|
|
483
|
-
...(input.bucket != null && { bucket: input.bucket }),
|
|
484
|
-
...(input.prefix != null && { prefix: input.prefix }),
|
|
485
|
-
};
|
|
486
|
-
};
|
|
487
|
-
const se_SourceS3Location = (input, context) => {
|
|
488
|
-
return {
|
|
489
|
-
...(input.bucket != null && { bucket: input.bucket }),
|
|
490
|
-
...(input.key != null && { key: input.key }),
|
|
491
|
-
...(input.region != null && { region: input.region }),
|
|
492
|
-
};
|
|
493
|
-
};
|
|
494
468
|
const de_ReportDefinition = (output, context) => {
|
|
495
|
-
return {
|
|
496
|
-
createdAt:
|
|
497
|
-
destinationS3Location:
|
|
498
|
-
format:
|
|
499
|
-
lastUpdatedAt:
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
reportId: (0, smithy_client_1.expectString)(output.reportId),
|
|
505
|
-
};
|
|
469
|
+
return (0, smithy_client_1.take)(output, {
|
|
470
|
+
createdAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
471
|
+
destinationS3Location: smithy_client_1._json,
|
|
472
|
+
format: smithy_client_1.expectString,
|
|
473
|
+
lastUpdatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
474
|
+
reportDescription: smithy_client_1.expectString,
|
|
475
|
+
reportFrequency: smithy_client_1.expectString,
|
|
476
|
+
reportId: smithy_client_1.expectString,
|
|
477
|
+
});
|
|
506
478
|
};
|
|
507
479
|
const de_ReportDefinitionList = (output, context) => {
|
|
508
480
|
const retVal = (output || [])
|
|
509
481
|
.filter((e) => e != null)
|
|
510
482
|
.map((entry) => {
|
|
511
|
-
if (entry === null) {
|
|
512
|
-
return null;
|
|
513
|
-
}
|
|
514
483
|
return de_ReportDefinition(entry, context);
|
|
515
484
|
});
|
|
516
485
|
return retVal;
|
|
517
486
|
};
|
|
518
|
-
const de_S3Location = (output, context) => {
|
|
519
|
-
return {
|
|
520
|
-
bucket: (0, smithy_client_1.expectString)(output.bucket),
|
|
521
|
-
prefix: (0, smithy_client_1.expectString)(output.prefix),
|
|
522
|
-
};
|
|
523
|
-
};
|
|
524
487
|
const deserializeMetadata = (output) => ({
|
|
525
488
|
httpStatusCode: output.statusCode,
|
|
526
489
|
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { HttpRequest as __HttpRequest } from "@aws-sdk/protocol-http";
|
|
2
|
-
import { decorateServiceException as __decorateServiceException, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectObject as __expectObject, expectString as __expectString, map
|
|
2
|
+
import { _json, decorateServiceException as __decorateServiceException, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectObject as __expectObject, expectString as __expectString, map, parseEpochTimestamp as __parseEpochTimestamp, resolvedPath as __resolvedPath, take, withBaseException, } from "@aws-sdk/smithy-client";
|
|
3
3
|
import { ApplicationCostProfilerServiceException as __BaseException } from "../models/ApplicationCostProfilerServiceException";
|
|
4
4
|
import { AccessDeniedException, InternalServerException, ServiceQuotaExceededException, ThrottlingException, ValidationException, } from "../models/models_0";
|
|
5
5
|
export const se_DeleteReportDefinitionCommand = async (input, context) => {
|
|
@@ -41,9 +41,9 @@ export const se_ImportApplicationUsageCommand = async (input, context) => {
|
|
|
41
41
|
};
|
|
42
42
|
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/importApplicationUsage";
|
|
43
43
|
let body;
|
|
44
|
-
body = JSON.stringify({
|
|
45
|
-
|
|
46
|
-
});
|
|
44
|
+
body = JSON.stringify(take(input, {
|
|
45
|
+
sourceS3Location: (_) => _json(_),
|
|
46
|
+
}));
|
|
47
47
|
return new __HttpRequest({
|
|
48
48
|
protocol,
|
|
49
49
|
hostname,
|
|
@@ -81,15 +81,13 @@ export const se_PutReportDefinitionCommand = async (input, context) => {
|
|
|
81
81
|
};
|
|
82
82
|
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/reportDefinition";
|
|
83
83
|
let body;
|
|
84
|
-
body = JSON.stringify({
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
...(input.reportId != null && { reportId: input.reportId }),
|
|
92
|
-
});
|
|
84
|
+
body = JSON.stringify(take(input, {
|
|
85
|
+
destinationS3Location: (_) => _json(_),
|
|
86
|
+
format: [],
|
|
87
|
+
reportDescription: [],
|
|
88
|
+
reportFrequency: [],
|
|
89
|
+
reportId: [],
|
|
90
|
+
}));
|
|
93
91
|
return new __HttpRequest({
|
|
94
92
|
protocol,
|
|
95
93
|
hostname,
|
|
@@ -108,14 +106,12 @@ export const se_UpdateReportDefinitionCommand = async (input, context) => {
|
|
|
108
106
|
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/reportDefinition/{reportId}";
|
|
109
107
|
resolvedPath = __resolvedPath(resolvedPath, input, "reportId", () => input.reportId, "{reportId}", false);
|
|
110
108
|
let body;
|
|
111
|
-
body = JSON.stringify({
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
...(input.reportFrequency != null && { reportFrequency: input.reportFrequency }),
|
|
118
|
-
});
|
|
109
|
+
body = JSON.stringify(take(input, {
|
|
110
|
+
destinationS3Location: (_) => _json(_),
|
|
111
|
+
format: [],
|
|
112
|
+
reportDescription: [],
|
|
113
|
+
reportFrequency: [],
|
|
114
|
+
}));
|
|
119
115
|
return new __HttpRequest({
|
|
120
116
|
protocol,
|
|
121
117
|
hostname,
|
|
@@ -134,9 +130,10 @@ export const de_DeleteReportDefinitionCommand = async (output, context) => {
|
|
|
134
130
|
$metadata: deserializeMetadata(output),
|
|
135
131
|
});
|
|
136
132
|
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
}
|
|
133
|
+
const doc = take(data, {
|
|
134
|
+
reportId: __expectString,
|
|
135
|
+
});
|
|
136
|
+
Object.assign(contents, doc);
|
|
140
137
|
return contents;
|
|
141
138
|
};
|
|
142
139
|
const de_DeleteReportDefinitionCommandError = async (output, context) => {
|
|
@@ -160,10 +157,9 @@ const de_DeleteReportDefinitionCommandError = async (output, context) => {
|
|
|
160
157
|
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
161
158
|
default:
|
|
162
159
|
const parsedBody = parsedOutput.body;
|
|
163
|
-
throwDefaultError({
|
|
160
|
+
return throwDefaultError({
|
|
164
161
|
output,
|
|
165
162
|
parsedBody,
|
|
166
|
-
exceptionCtor: __BaseException,
|
|
167
163
|
errorCode,
|
|
168
164
|
});
|
|
169
165
|
}
|
|
@@ -176,27 +172,16 @@ export const de_GetReportDefinitionCommand = async (output, context) => {
|
|
|
176
172
|
$metadata: deserializeMetadata(output),
|
|
177
173
|
});
|
|
178
174
|
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
}
|
|
188
|
-
|
|
189
|
-
contents.lastUpdated = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.lastUpdated)));
|
|
190
|
-
}
|
|
191
|
-
if (data.reportDescription != null) {
|
|
192
|
-
contents.reportDescription = __expectString(data.reportDescription);
|
|
193
|
-
}
|
|
194
|
-
if (data.reportFrequency != null) {
|
|
195
|
-
contents.reportFrequency = __expectString(data.reportFrequency);
|
|
196
|
-
}
|
|
197
|
-
if (data.reportId != null) {
|
|
198
|
-
contents.reportId = __expectString(data.reportId);
|
|
199
|
-
}
|
|
175
|
+
const doc = take(data, {
|
|
176
|
+
createdAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
|
|
177
|
+
destinationS3Location: _json,
|
|
178
|
+
format: __expectString,
|
|
179
|
+
lastUpdated: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
|
|
180
|
+
reportDescription: __expectString,
|
|
181
|
+
reportFrequency: __expectString,
|
|
182
|
+
reportId: __expectString,
|
|
183
|
+
});
|
|
184
|
+
Object.assign(contents, doc);
|
|
200
185
|
return contents;
|
|
201
186
|
};
|
|
202
187
|
const de_GetReportDefinitionCommandError = async (output, context) => {
|
|
@@ -220,10 +205,9 @@ const de_GetReportDefinitionCommandError = async (output, context) => {
|
|
|
220
205
|
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
221
206
|
default:
|
|
222
207
|
const parsedBody = parsedOutput.body;
|
|
223
|
-
throwDefaultError({
|
|
208
|
+
return throwDefaultError({
|
|
224
209
|
output,
|
|
225
210
|
parsedBody,
|
|
226
|
-
exceptionCtor: __BaseException,
|
|
227
211
|
errorCode,
|
|
228
212
|
});
|
|
229
213
|
}
|
|
@@ -236,9 +220,10 @@ export const de_ImportApplicationUsageCommand = async (output, context) => {
|
|
|
236
220
|
$metadata: deserializeMetadata(output),
|
|
237
221
|
});
|
|
238
222
|
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
}
|
|
223
|
+
const doc = take(data, {
|
|
224
|
+
importId: __expectString,
|
|
225
|
+
});
|
|
226
|
+
Object.assign(contents, doc);
|
|
242
227
|
return contents;
|
|
243
228
|
};
|
|
244
229
|
const de_ImportApplicationUsageCommandError = async (output, context) => {
|
|
@@ -262,10 +247,9 @@ const de_ImportApplicationUsageCommandError = async (output, context) => {
|
|
|
262
247
|
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
263
248
|
default:
|
|
264
249
|
const parsedBody = parsedOutput.body;
|
|
265
|
-
throwDefaultError({
|
|
250
|
+
return throwDefaultError({
|
|
266
251
|
output,
|
|
267
252
|
parsedBody,
|
|
268
|
-
exceptionCtor: __BaseException,
|
|
269
253
|
errorCode,
|
|
270
254
|
});
|
|
271
255
|
}
|
|
@@ -278,12 +262,11 @@ export const de_ListReportDefinitionsCommand = async (output, context) => {
|
|
|
278
262
|
$metadata: deserializeMetadata(output),
|
|
279
263
|
});
|
|
280
264
|
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
}
|
|
265
|
+
const doc = take(data, {
|
|
266
|
+
nextToken: __expectString,
|
|
267
|
+
reportDefinitions: (_) => de_ReportDefinitionList(_, context),
|
|
268
|
+
});
|
|
269
|
+
Object.assign(contents, doc);
|
|
287
270
|
return contents;
|
|
288
271
|
};
|
|
289
272
|
const de_ListReportDefinitionsCommandError = async (output, context) => {
|
|
@@ -307,10 +290,9 @@ const de_ListReportDefinitionsCommandError = async (output, context) => {
|
|
|
307
290
|
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
308
291
|
default:
|
|
309
292
|
const parsedBody = parsedOutput.body;
|
|
310
|
-
throwDefaultError({
|
|
293
|
+
return throwDefaultError({
|
|
311
294
|
output,
|
|
312
295
|
parsedBody,
|
|
313
|
-
exceptionCtor: __BaseException,
|
|
314
296
|
errorCode,
|
|
315
297
|
});
|
|
316
298
|
}
|
|
@@ -323,9 +305,10 @@ export const de_PutReportDefinitionCommand = async (output, context) => {
|
|
|
323
305
|
$metadata: deserializeMetadata(output),
|
|
324
306
|
});
|
|
325
307
|
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
}
|
|
308
|
+
const doc = take(data, {
|
|
309
|
+
reportId: __expectString,
|
|
310
|
+
});
|
|
311
|
+
Object.assign(contents, doc);
|
|
329
312
|
return contents;
|
|
330
313
|
};
|
|
331
314
|
const de_PutReportDefinitionCommandError = async (output, context) => {
|
|
@@ -352,10 +335,9 @@ const de_PutReportDefinitionCommandError = async (output, context) => {
|
|
|
352
335
|
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
353
336
|
default:
|
|
354
337
|
const parsedBody = parsedOutput.body;
|
|
355
|
-
throwDefaultError({
|
|
338
|
+
return throwDefaultError({
|
|
356
339
|
output,
|
|
357
340
|
parsedBody,
|
|
358
|
-
exceptionCtor: __BaseException,
|
|
359
341
|
errorCode,
|
|
360
342
|
});
|
|
361
343
|
}
|
|
@@ -368,9 +350,10 @@ export const de_UpdateReportDefinitionCommand = async (output, context) => {
|
|
|
368
350
|
$metadata: deserializeMetadata(output),
|
|
369
351
|
});
|
|
370
352
|
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
}
|
|
353
|
+
const doc = take(data, {
|
|
354
|
+
reportId: __expectString,
|
|
355
|
+
});
|
|
356
|
+
Object.assign(contents, doc);
|
|
374
357
|
return contents;
|
|
375
358
|
};
|
|
376
359
|
const de_UpdateReportDefinitionCommandError = async (output, context) => {
|
|
@@ -394,21 +377,21 @@ const de_UpdateReportDefinitionCommandError = async (output, context) => {
|
|
|
394
377
|
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
395
378
|
default:
|
|
396
379
|
const parsedBody = parsedOutput.body;
|
|
397
|
-
throwDefaultError({
|
|
380
|
+
return throwDefaultError({
|
|
398
381
|
output,
|
|
399
382
|
parsedBody,
|
|
400
|
-
exceptionCtor: __BaseException,
|
|
401
383
|
errorCode,
|
|
402
384
|
});
|
|
403
385
|
}
|
|
404
386
|
};
|
|
405
|
-
const
|
|
387
|
+
const throwDefaultError = withBaseException(__BaseException);
|
|
406
388
|
const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
|
|
407
389
|
const contents = map({});
|
|
408
390
|
const data = parsedOutput.body;
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
}
|
|
391
|
+
const doc = take(data, {
|
|
392
|
+
message: __expectString,
|
|
393
|
+
});
|
|
394
|
+
Object.assign(contents, doc);
|
|
412
395
|
const exception = new AccessDeniedException({
|
|
413
396
|
$metadata: deserializeMetadata(parsedOutput),
|
|
414
397
|
...contents,
|
|
@@ -418,9 +401,10 @@ const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
|
|
|
418
401
|
const de_InternalServerExceptionRes = async (parsedOutput, context) => {
|
|
419
402
|
const contents = map({});
|
|
420
403
|
const data = parsedOutput.body;
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
}
|
|
404
|
+
const doc = take(data, {
|
|
405
|
+
message: __expectString,
|
|
406
|
+
});
|
|
407
|
+
Object.assign(contents, doc);
|
|
424
408
|
const exception = new InternalServerException({
|
|
425
409
|
$metadata: deserializeMetadata(parsedOutput),
|
|
426
410
|
...contents,
|
|
@@ -430,9 +414,10 @@ const de_InternalServerExceptionRes = async (parsedOutput, context) => {
|
|
|
430
414
|
const de_ServiceQuotaExceededExceptionRes = async (parsedOutput, context) => {
|
|
431
415
|
const contents = map({});
|
|
432
416
|
const data = parsedOutput.body;
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
}
|
|
417
|
+
const doc = take(data, {
|
|
418
|
+
message: __expectString,
|
|
419
|
+
});
|
|
420
|
+
Object.assign(contents, doc);
|
|
436
421
|
const exception = new ServiceQuotaExceededException({
|
|
437
422
|
$metadata: deserializeMetadata(parsedOutput),
|
|
438
423
|
...contents,
|
|
@@ -442,9 +427,10 @@ const de_ServiceQuotaExceededExceptionRes = async (parsedOutput, context) => {
|
|
|
442
427
|
const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
|
|
443
428
|
const contents = map({});
|
|
444
429
|
const data = parsedOutput.body;
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
}
|
|
430
|
+
const doc = take(data, {
|
|
431
|
+
message: __expectString,
|
|
432
|
+
});
|
|
433
|
+
Object.assign(contents, doc);
|
|
448
434
|
const exception = new ThrottlingException({
|
|
449
435
|
$metadata: deserializeMetadata(parsedOutput),
|
|
450
436
|
...contents,
|
|
@@ -454,58 +440,35 @@ const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
|
|
|
454
440
|
const de_ValidationExceptionRes = async (parsedOutput, context) => {
|
|
455
441
|
const contents = map({});
|
|
456
442
|
const data = parsedOutput.body;
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
}
|
|
443
|
+
const doc = take(data, {
|
|
444
|
+
message: __expectString,
|
|
445
|
+
});
|
|
446
|
+
Object.assign(contents, doc);
|
|
460
447
|
const exception = new ValidationException({
|
|
461
448
|
$metadata: deserializeMetadata(parsedOutput),
|
|
462
449
|
...contents,
|
|
463
450
|
});
|
|
464
451
|
return __decorateServiceException(exception, parsedOutput.body);
|
|
465
452
|
};
|
|
466
|
-
const se_S3Location = (input, context) => {
|
|
467
|
-
return {
|
|
468
|
-
...(input.bucket != null && { bucket: input.bucket }),
|
|
469
|
-
...(input.prefix != null && { prefix: input.prefix }),
|
|
470
|
-
};
|
|
471
|
-
};
|
|
472
|
-
const se_SourceS3Location = (input, context) => {
|
|
473
|
-
return {
|
|
474
|
-
...(input.bucket != null && { bucket: input.bucket }),
|
|
475
|
-
...(input.key != null && { key: input.key }),
|
|
476
|
-
...(input.region != null && { region: input.region }),
|
|
477
|
-
};
|
|
478
|
-
};
|
|
479
453
|
const de_ReportDefinition = (output, context) => {
|
|
480
|
-
return {
|
|
481
|
-
createdAt:
|
|
482
|
-
destinationS3Location:
|
|
483
|
-
format: __expectString
|
|
484
|
-
lastUpdatedAt:
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
reportId: __expectString(output.reportId),
|
|
490
|
-
};
|
|
454
|
+
return take(output, {
|
|
455
|
+
createdAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
|
|
456
|
+
destinationS3Location: _json,
|
|
457
|
+
format: __expectString,
|
|
458
|
+
lastUpdatedAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
|
|
459
|
+
reportDescription: __expectString,
|
|
460
|
+
reportFrequency: __expectString,
|
|
461
|
+
reportId: __expectString,
|
|
462
|
+
});
|
|
491
463
|
};
|
|
492
464
|
const de_ReportDefinitionList = (output, context) => {
|
|
493
465
|
const retVal = (output || [])
|
|
494
466
|
.filter((e) => e != null)
|
|
495
467
|
.map((entry) => {
|
|
496
|
-
if (entry === null) {
|
|
497
|
-
return null;
|
|
498
|
-
}
|
|
499
468
|
return de_ReportDefinition(entry, context);
|
|
500
469
|
});
|
|
501
470
|
return retVal;
|
|
502
471
|
};
|
|
503
|
-
const de_S3Location = (output, context) => {
|
|
504
|
-
return {
|
|
505
|
-
bucket: __expectString(output.bucket),
|
|
506
|
-
prefix: __expectString(output.prefix),
|
|
507
|
-
};
|
|
508
|
-
};
|
|
509
472
|
const deserializeMetadata = (output) => ({
|
|
510
473
|
httpStatusCode: output.statusCode,
|
|
511
474
|
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/client-applicationcostprofiler",
|
|
3
3
|
"description": "AWS SDK for JavaScript Applicationcostprofiler Client for Node.js, Browser and React Native",
|
|
4
|
-
"version": "3.
|
|
4
|
+
"version": "3.315.0",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
|
|
7
7
|
"build:cjs": "tsc -p tsconfig.cjs.json",
|
|
@@ -21,9 +21,9 @@
|
|
|
21
21
|
"dependencies": {
|
|
22
22
|
"@aws-crypto/sha256-browser": "3.0.0",
|
|
23
23
|
"@aws-crypto/sha256-js": "3.0.0",
|
|
24
|
-
"@aws-sdk/client-sts": "3.
|
|
24
|
+
"@aws-sdk/client-sts": "3.315.0",
|
|
25
25
|
"@aws-sdk/config-resolver": "3.310.0",
|
|
26
|
-
"@aws-sdk/credential-provider-node": "3.
|
|
26
|
+
"@aws-sdk/credential-provider-node": "3.315.0",
|
|
27
27
|
"@aws-sdk/fetch-http-handler": "3.310.0",
|
|
28
28
|
"@aws-sdk/hash-node": "3.310.0",
|
|
29
29
|
"@aws-sdk/invalid-dependency": "3.310.0",
|
|
@@ -40,14 +40,14 @@
|
|
|
40
40
|
"@aws-sdk/node-config-provider": "3.310.0",
|
|
41
41
|
"@aws-sdk/node-http-handler": "3.310.0",
|
|
42
42
|
"@aws-sdk/protocol-http": "3.310.0",
|
|
43
|
-
"@aws-sdk/smithy-client": "3.
|
|
43
|
+
"@aws-sdk/smithy-client": "3.315.0",
|
|
44
44
|
"@aws-sdk/types": "3.310.0",
|
|
45
45
|
"@aws-sdk/url-parser": "3.310.0",
|
|
46
46
|
"@aws-sdk/util-base64": "3.310.0",
|
|
47
47
|
"@aws-sdk/util-body-length-browser": "3.310.0",
|
|
48
48
|
"@aws-sdk/util-body-length-node": "3.310.0",
|
|
49
|
-
"@aws-sdk/util-defaults-mode-browser": "3.
|
|
50
|
-
"@aws-sdk/util-defaults-mode-node": "3.
|
|
49
|
+
"@aws-sdk/util-defaults-mode-browser": "3.315.0",
|
|
50
|
+
"@aws-sdk/util-defaults-mode-node": "3.315.0",
|
|
51
51
|
"@aws-sdk/util-endpoints": "3.310.0",
|
|
52
52
|
"@aws-sdk/util-retry": "3.310.0",
|
|
53
53
|
"@aws-sdk/util-user-agent-browser": "3.310.0",
|