@aws-sdk/client-applicationcostprofiler 3.35.0 → 3.38.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.
Files changed (125) hide show
  1. package/CHANGELOG.md +47 -0
  2. package/dist-cjs/ApplicationCostProfiler.js +0 -9
  3. package/dist-cjs/ApplicationCostProfilerClient.js +0 -14
  4. package/dist-cjs/commands/DeleteReportDefinitionCommand.js +0 -26
  5. package/dist-cjs/commands/GetReportDefinitionCommand.js +0 -25
  6. package/dist-cjs/commands/ImportApplicationUsageCommand.js +0 -28
  7. package/dist-cjs/commands/ListReportDefinitionsCommand.js +0 -26
  8. package/dist-cjs/commands/PutReportDefinitionCommand.js +0 -25
  9. package/dist-cjs/commands/UpdateReportDefinitionCommand.js +0 -25
  10. package/dist-cjs/commands/index.js +9 -0
  11. package/dist-cjs/endpoints.js +1 -2
  12. package/dist-cjs/index.js +4 -11
  13. package/dist-cjs/models/index.js +0 -1
  14. package/dist-cjs/models/models_0.js +0 -61
  15. package/dist-cjs/pagination/Interfaces.js +0 -1
  16. package/dist-cjs/pagination/ListReportDefinitionsPaginator.js +0 -11
  17. package/dist-cjs/pagination/index.js +5 -0
  18. package/dist-cjs/protocols/Aws_restJson1.js +0 -6
  19. package/dist-cjs/runtimeConfig.browser.js +1 -6
  20. package/dist-cjs/runtimeConfig.js +2 -7
  21. package/dist-cjs/runtimeConfig.native.js +0 -4
  22. package/dist-cjs/runtimeConfig.shared.js +0 -4
  23. package/dist-es/ApplicationCostProfiler.js +0 -1
  24. package/dist-es/ApplicationCostProfilerClient.js +0 -1
  25. package/dist-es/commands/DeleteReportDefinitionCommand.js +0 -1
  26. package/dist-es/commands/GetReportDefinitionCommand.js +0 -1
  27. package/dist-es/commands/ImportApplicationUsageCommand.js +0 -1
  28. package/dist-es/commands/ListReportDefinitionsCommand.js +0 -1
  29. package/dist-es/commands/PutReportDefinitionCommand.js +0 -1
  30. package/dist-es/commands/UpdateReportDefinitionCommand.js +0 -1
  31. package/dist-es/commands/index.js +6 -0
  32. package/dist-es/endpoints.js +1 -2
  33. package/dist-es/index.js +4 -11
  34. package/dist-es/models/index.js +0 -1
  35. package/dist-es/models/models_0.js +0 -1
  36. package/dist-es/pagination/Interfaces.js +0 -1
  37. package/dist-es/pagination/ListReportDefinitionsPaginator.js +0 -1
  38. package/dist-es/pagination/index.js +2 -0
  39. package/dist-es/protocols/Aws_restJson1.js +0 -1
  40. package/dist-es/runtimeConfig.browser.js +1 -2
  41. package/dist-es/runtimeConfig.js +2 -3
  42. package/dist-es/runtimeConfig.native.js +0 -1
  43. package/dist-es/runtimeConfig.shared.js +0 -1
  44. package/dist-types/commands/index.d.ts +6 -0
  45. package/dist-types/index.d.ts +4 -10
  46. package/dist-types/pagination/index.d.ts +2 -0
  47. package/dist-types/runtimeConfig.browser.d.ts +3 -0
  48. package/dist-types/ts3.4/ApplicationCostProfiler.d.ts +7 -31
  49. package/dist-types/ts3.4/ApplicationCostProfilerClient.d.ts +24 -94
  50. package/dist-types/ts3.4/commands/DeleteReportDefinitionCommand.d.ts +2 -21
  51. package/dist-types/ts3.4/commands/GetReportDefinitionCommand.d.ts +2 -20
  52. package/dist-types/ts3.4/commands/ImportApplicationUsageCommand.d.ts +2 -23
  53. package/dist-types/ts3.4/commands/ListReportDefinitionsCommand.d.ts +2 -21
  54. package/dist-types/ts3.4/commands/PutReportDefinitionCommand.d.ts +2 -20
  55. package/dist-types/ts3.4/commands/UpdateReportDefinitionCommand.d.ts +2 -20
  56. package/dist-types/ts3.4/commands/index.d.ts +6 -0
  57. package/dist-types/ts3.4/index.d.ts +4 -10
  58. package/dist-types/ts3.4/models/models_0.d.ts +68 -211
  59. package/dist-types/ts3.4/pagination/index.d.ts +2 -0
  60. package/dist-types/ts3.4/runtimeConfig.browser.d.ts +2 -3
  61. package/dist-types/ts3.4/runtimeConfig.d.ts +1 -3
  62. package/dist-types/ts3.4/runtimeConfig.native.d.ts +1 -3
  63. package/dist-types/ts3.4/runtimeConfig.shared.d.ts +1 -3
  64. package/package.json +33 -30
  65. package/dist-cjs/ApplicationCostProfiler.js.map +0 -1
  66. package/dist-cjs/ApplicationCostProfilerClient.js.map +0 -1
  67. package/dist-cjs/commands/DeleteReportDefinitionCommand.js.map +0 -1
  68. package/dist-cjs/commands/GetReportDefinitionCommand.js.map +0 -1
  69. package/dist-cjs/commands/ImportApplicationUsageCommand.js.map +0 -1
  70. package/dist-cjs/commands/ListReportDefinitionsCommand.js.map +0 -1
  71. package/dist-cjs/commands/PutReportDefinitionCommand.js.map +0 -1
  72. package/dist-cjs/commands/UpdateReportDefinitionCommand.js.map +0 -1
  73. package/dist-cjs/endpoints.js.map +0 -1
  74. package/dist-cjs/index.js.map +0 -1
  75. package/dist-cjs/models/index.js.map +0 -1
  76. package/dist-cjs/models/models_0.js.map +0 -1
  77. package/dist-cjs/pagination/Interfaces.js.map +0 -1
  78. package/dist-cjs/pagination/ListReportDefinitionsPaginator.js.map +0 -1
  79. package/dist-cjs/protocols/Aws_restJson1.js.map +0 -1
  80. package/dist-cjs/runtimeConfig.browser.js.map +0 -1
  81. package/dist-cjs/runtimeConfig.js.map +0 -1
  82. package/dist-cjs/runtimeConfig.native.js.map +0 -1
  83. package/dist-cjs/runtimeConfig.shared.js.map +0 -1
  84. package/dist-es/ApplicationCostProfiler.js.map +0 -1
  85. package/dist-es/ApplicationCostProfilerClient.js.map +0 -1
  86. package/dist-es/commands/DeleteReportDefinitionCommand.js.map +0 -1
  87. package/dist-es/commands/GetReportDefinitionCommand.js.map +0 -1
  88. package/dist-es/commands/ImportApplicationUsageCommand.js.map +0 -1
  89. package/dist-es/commands/ListReportDefinitionsCommand.js.map +0 -1
  90. package/dist-es/commands/PutReportDefinitionCommand.js.map +0 -1
  91. package/dist-es/commands/UpdateReportDefinitionCommand.js.map +0 -1
  92. package/dist-es/endpoints.js.map +0 -1
  93. package/dist-es/index.js.map +0 -1
  94. package/dist-es/models/index.js.map +0 -1
  95. package/dist-es/models/models_0.js.map +0 -1
  96. package/dist-es/pagination/Interfaces.js.map +0 -1
  97. package/dist-es/pagination/ListReportDefinitionsPaginator.js.map +0 -1
  98. package/dist-es/protocols/Aws_restJson1.js.map +0 -1
  99. package/dist-es/runtimeConfig.browser.js.map +0 -1
  100. package/dist-es/runtimeConfig.js.map +0 -1
  101. package/dist-es/runtimeConfig.native.js.map +0 -1
  102. package/dist-es/runtimeConfig.shared.js.map +0 -1
  103. package/jest.config.js +0 -4
  104. package/src/ApplicationCostProfiler.ts +0 -240
  105. package/src/ApplicationCostProfilerClient.ts +0 -277
  106. package/src/commands/DeleteReportDefinitionCommand.ts +0 -100
  107. package/src/commands/GetReportDefinitionCommand.ts +0 -99
  108. package/src/commands/ImportApplicationUsageCommand.ts +0 -102
  109. package/src/commands/ListReportDefinitionsCommand.ts +0 -100
  110. package/src/commands/PutReportDefinitionCommand.ts +0 -99
  111. package/src/commands/UpdateReportDefinitionCommand.ts +0 -99
  112. package/src/endpoints.ts +0 -57
  113. package/src/index.ts +0 -11
  114. package/src/models/index.ts +0 -1
  115. package/src/models/models_0.ts +0 -490
  116. package/src/pagination/Interfaces.ts +0 -8
  117. package/src/pagination/ListReportDefinitionsPaginator.ts +0 -59
  118. package/src/protocols/Aws_restJson1.ts +0 -952
  119. package/src/runtimeConfig.browser.ts +0 -41
  120. package/src/runtimeConfig.native.ts +0 -17
  121. package/src/runtimeConfig.shared.ts +0 -17
  122. package/src/runtimeConfig.ts +0 -46
  123. package/tsconfig.es.json +0 -10
  124. package/tsconfig.json +0 -33
  125. package/tsconfig.types.json +0 -9
@@ -1,490 +0,0 @@
1
- import { MetadataBearer as $MetadataBearer, SmithyException as __SmithyException } from "@aws-sdk/types";
2
-
3
- /**
4
- * <p>You do not have permission to perform this action.</p>
5
- */
6
- export interface AccessDeniedException extends __SmithyException, $MetadataBearer {
7
- name: "AccessDeniedException";
8
- $fault: "client";
9
- message?: string;
10
- }
11
-
12
- export namespace AccessDeniedException {
13
- /**
14
- * @internal
15
- */
16
- export const filterSensitiveLog = (obj: AccessDeniedException): any => ({
17
- ...obj,
18
- });
19
- }
20
-
21
- export interface DeleteReportDefinitionRequest {
22
- /**
23
- * <p>Required. ID of the report to delete.</p>
24
- */
25
- reportId: string | undefined;
26
- }
27
-
28
- export namespace DeleteReportDefinitionRequest {
29
- /**
30
- * @internal
31
- */
32
- export const filterSensitiveLog = (obj: DeleteReportDefinitionRequest): any => ({
33
- ...obj,
34
- });
35
- }
36
-
37
- export interface DeleteReportDefinitionResult {
38
- /**
39
- * <p>ID of the report that was deleted.</p>
40
- */
41
- reportId?: string;
42
- }
43
-
44
- export namespace DeleteReportDefinitionResult {
45
- /**
46
- * @internal
47
- */
48
- export const filterSensitiveLog = (obj: DeleteReportDefinitionResult): any => ({
49
- ...obj,
50
- });
51
- }
52
-
53
- /**
54
- * <p>An internal server error occurred. Retry your request.</p>
55
- */
56
- export interface InternalServerException extends __SmithyException, $MetadataBearer {
57
- name: "InternalServerException";
58
- $fault: "server";
59
- message?: string;
60
- }
61
-
62
- export namespace InternalServerException {
63
- /**
64
- * @internal
65
- */
66
- export const filterSensitiveLog = (obj: InternalServerException): any => ({
67
- ...obj,
68
- });
69
- }
70
-
71
- /**
72
- * <p>The calls to AWS Application Cost Profiler API are throttled. The request was denied.</p>
73
- */
74
- export interface ThrottlingException extends __SmithyException, $MetadataBearer {
75
- name: "ThrottlingException";
76
- $fault: "client";
77
- message?: string;
78
- }
79
-
80
- export namespace ThrottlingException {
81
- /**
82
- * @internal
83
- */
84
- export const filterSensitiveLog = (obj: ThrottlingException): any => ({
85
- ...obj,
86
- });
87
- }
88
-
89
- /**
90
- * <p>The input fails to satisfy the constraints for the API.</p>
91
- */
92
- export interface ValidationException extends __SmithyException, $MetadataBearer {
93
- name: "ValidationException";
94
- $fault: "client";
95
- message?: string;
96
- }
97
-
98
- export namespace ValidationException {
99
- /**
100
- * @internal
101
- */
102
- export const filterSensitiveLog = (obj: ValidationException): any => ({
103
- ...obj,
104
- });
105
- }
106
-
107
- export interface GetReportDefinitionRequest {
108
- /**
109
- * <p>ID of the report to retrieve.</p>
110
- */
111
- reportId: string | undefined;
112
- }
113
-
114
- export namespace GetReportDefinitionRequest {
115
- /**
116
- * @internal
117
- */
118
- export const filterSensitiveLog = (obj: GetReportDefinitionRequest): any => ({
119
- ...obj,
120
- });
121
- }
122
-
123
- /**
124
- * <p>Represents the Amazon Simple Storage Service (Amazon S3) location where AWS Application Cost Profiler
125
- * reports are generated and then written to.</p>
126
- */
127
- export interface S3Location {
128
- /**
129
- * <p>Name of the S3 bucket.</p>
130
- */
131
- bucket: string | undefined;
132
-
133
- /**
134
- * <p>Prefix for the location to write to.</p>
135
- */
136
- prefix: string | undefined;
137
- }
138
-
139
- export namespace S3Location {
140
- /**
141
- * @internal
142
- */
143
- export const filterSensitiveLog = (obj: S3Location): any => ({
144
- ...obj,
145
- });
146
- }
147
-
148
- export enum Format {
149
- CSV = "CSV",
150
- PARQUET = "PARQUET",
151
- }
152
-
153
- export enum ReportFrequency {
154
- ALL = "ALL",
155
- DAILY = "DAILY",
156
- MONTHLY = "MONTHLY",
157
- }
158
-
159
- export interface GetReportDefinitionResult {
160
- /**
161
- * <p>ID of the report retrieved.</p>
162
- */
163
- reportId: string | undefined;
164
-
165
- /**
166
- * <p>Description of the report.</p>
167
- */
168
- reportDescription: string | undefined;
169
-
170
- /**
171
- * <p>Cadence used to generate the report.</p>
172
- */
173
- reportFrequency: ReportFrequency | string | undefined;
174
-
175
- /**
176
- * <p>Format of the generated report.</p>
177
- */
178
- format: Format | string | undefined;
179
-
180
- /**
181
- * <p>Amazon Simple Storage Service (Amazon S3) location where the report is uploaded.</p>
182
- */
183
- destinationS3Location: S3Location | undefined;
184
-
185
- /**
186
- * <p>Timestamp (milliseconds) when this report definition was created.</p>
187
- */
188
- createdAt: Date | undefined;
189
-
190
- /**
191
- * <p>Timestamp (milliseconds) when this report definition was last updated.</p>
192
- */
193
- lastUpdated: Date | undefined;
194
- }
195
-
196
- export namespace GetReportDefinitionResult {
197
- /**
198
- * @internal
199
- */
200
- export const filterSensitiveLog = (obj: GetReportDefinitionResult): any => ({
201
- ...obj,
202
- });
203
- }
204
-
205
- export enum S3BucketRegion {
206
- AF_SOUTH_1 = "af-south-1",
207
- AP_EAST_1 = "ap-east-1",
208
- EU_SOUTH_1 = "eu-south-1",
209
- ME_SOUTH_1 = "me-south-1",
210
- }
211
-
212
- /**
213
- * <p>Represents the Amazon Simple Storage Service (Amazon S3) location where usage data is read
214
- * from.</p>
215
- */
216
- export interface SourceS3Location {
217
- /**
218
- * <p>Name of the bucket.</p>
219
- */
220
- bucket: string | undefined;
221
-
222
- /**
223
- * <p>Key of the object.</p>
224
- */
225
- key: string | undefined;
226
-
227
- /**
228
- * <p>Region of the bucket. Only required for Regions that are disabled by default.
229
- * For more infomration about Regions that are disabled by default, see <a href="https://docs.aws.amazon.com/general/latest/gr/rande-manage.html#rande-manage-enable">
230
- * Enabling a Region</a> in the <i>AWS General Reference guide</i>.</p>
231
- */
232
- region?: S3BucketRegion | string;
233
- }
234
-
235
- export namespace SourceS3Location {
236
- /**
237
- * @internal
238
- */
239
- export const filterSensitiveLog = (obj: SourceS3Location): any => ({
240
- ...obj,
241
- });
242
- }
243
-
244
- export interface ImportApplicationUsageRequest {
245
- /**
246
- * <p>Amazon S3 location to import application usage data from.</p>
247
- */
248
- sourceS3Location: SourceS3Location | undefined;
249
- }
250
-
251
- export namespace ImportApplicationUsageRequest {
252
- /**
253
- * @internal
254
- */
255
- export const filterSensitiveLog = (obj: ImportApplicationUsageRequest): any => ({
256
- ...obj,
257
- });
258
- }
259
-
260
- export interface ImportApplicationUsageResult {
261
- /**
262
- * <p>ID of the import request.</p>
263
- */
264
- importId: string | undefined;
265
- }
266
-
267
- export namespace ImportApplicationUsageResult {
268
- /**
269
- * @internal
270
- */
271
- export const filterSensitiveLog = (obj: ImportApplicationUsageResult): any => ({
272
- ...obj,
273
- });
274
- }
275
-
276
- export interface ListReportDefinitionsRequest {
277
- /**
278
- * <p>The token value from a previous call to access the next page of results.</p>
279
- */
280
- nextToken?: string;
281
-
282
- /**
283
- * <p>The maximum number of results to return.</p>
284
- */
285
- maxResults?: number;
286
- }
287
-
288
- export namespace ListReportDefinitionsRequest {
289
- /**
290
- * @internal
291
- */
292
- export const filterSensitiveLog = (obj: ListReportDefinitionsRequest): any => ({
293
- ...obj,
294
- });
295
- }
296
-
297
- /**
298
- * <p>The configuration of a report in AWS Application Cost Profiler.</p>
299
- */
300
- export interface ReportDefinition {
301
- /**
302
- * <p>The ID of the report.</p>
303
- */
304
- reportId?: string;
305
-
306
- /**
307
- * <p>Description of the report</p>
308
- */
309
- reportDescription?: string;
310
-
311
- /**
312
- * <p>The cadence at which the report is generated.</p>
313
- */
314
- reportFrequency?: ReportFrequency | string;
315
-
316
- /**
317
- * <p>The format used for the generated reports.</p>
318
- */
319
- format?: Format | string;
320
-
321
- /**
322
- * <p>The location in Amazon Simple Storage Service (Amazon S3) the reports should be saved to.</p>
323
- */
324
- destinationS3Location?: S3Location;
325
-
326
- /**
327
- * <p>Timestamp (milliseconds) when this report definition was created.</p>
328
- */
329
- createdAt?: Date;
330
-
331
- /**
332
- * <p>Timestamp (milliseconds) when this report definition was last updated.</p>
333
- */
334
- lastUpdatedAt?: Date;
335
- }
336
-
337
- export namespace ReportDefinition {
338
- /**
339
- * @internal
340
- */
341
- export const filterSensitiveLog = (obj: ReportDefinition): any => ({
342
- ...obj,
343
- });
344
- }
345
-
346
- export interface ListReportDefinitionsResult {
347
- /**
348
- * <p>The retrieved reports.</p>
349
- */
350
- reportDefinitions?: ReportDefinition[];
351
-
352
- /**
353
- * <p>The value of the next token, if it exists. Null if there are no more results.</p>
354
- */
355
- nextToken?: string;
356
- }
357
-
358
- export namespace ListReportDefinitionsResult {
359
- /**
360
- * @internal
361
- */
362
- export const filterSensitiveLog = (obj: ListReportDefinitionsResult): any => ({
363
- ...obj,
364
- });
365
- }
366
-
367
- export interface PutReportDefinitionRequest {
368
- /**
369
- * <p>Required. ID of the report. You can choose any valid string matching the pattern for the
370
- * ID.</p>
371
- */
372
- reportId: string | undefined;
373
-
374
- /**
375
- * <p>Required. Description of the report.</p>
376
- */
377
- reportDescription: string | undefined;
378
-
379
- /**
380
- * <p>Required. The cadence to generate the report.</p>
381
- */
382
- reportFrequency: ReportFrequency | string | undefined;
383
-
384
- /**
385
- * <p>Required. The format to use for the generated report.</p>
386
- */
387
- format: Format | string | undefined;
388
-
389
- /**
390
- * <p>Required. Amazon Simple Storage Service (Amazon S3) location where Application Cost Profiler uploads the
391
- * report.</p>
392
- */
393
- destinationS3Location: S3Location | undefined;
394
- }
395
-
396
- export namespace PutReportDefinitionRequest {
397
- /**
398
- * @internal
399
- */
400
- export const filterSensitiveLog = (obj: PutReportDefinitionRequest): any => ({
401
- ...obj,
402
- });
403
- }
404
-
405
- export interface PutReportDefinitionResult {
406
- /**
407
- * <p>ID of the report.</p>
408
- */
409
- reportId?: string;
410
- }
411
-
412
- export namespace PutReportDefinitionResult {
413
- /**
414
- * @internal
415
- */
416
- export const filterSensitiveLog = (obj: PutReportDefinitionResult): any => ({
417
- ...obj,
418
- });
419
- }
420
-
421
- /**
422
- * <p>Your request exceeds one or more of the service quotas.</p>
423
- */
424
- export interface ServiceQuotaExceededException extends __SmithyException, $MetadataBearer {
425
- name: "ServiceQuotaExceededException";
426
- $fault: "client";
427
- message?: string;
428
- }
429
-
430
- export namespace ServiceQuotaExceededException {
431
- /**
432
- * @internal
433
- */
434
- export const filterSensitiveLog = (obj: ServiceQuotaExceededException): any => ({
435
- ...obj,
436
- });
437
- }
438
-
439
- export interface UpdateReportDefinitionRequest {
440
- /**
441
- * <p>Required. ID of the report to update.</p>
442
- */
443
- reportId: string | undefined;
444
-
445
- /**
446
- * <p>Required. Description of the report.</p>
447
- */
448
- reportDescription: string | undefined;
449
-
450
- /**
451
- * <p>Required. The cadence to generate the report.</p>
452
- */
453
- reportFrequency: ReportFrequency | string | undefined;
454
-
455
- /**
456
- * <p>Required. The format to use for the generated report.</p>
457
- */
458
- format: Format | string | undefined;
459
-
460
- /**
461
- * <p>Required. Amazon Simple Storage Service (Amazon S3) location where Application Cost Profiler uploads the
462
- * report.</p>
463
- */
464
- destinationS3Location: S3Location | undefined;
465
- }
466
-
467
- export namespace UpdateReportDefinitionRequest {
468
- /**
469
- * @internal
470
- */
471
- export const filterSensitiveLog = (obj: UpdateReportDefinitionRequest): any => ({
472
- ...obj,
473
- });
474
- }
475
-
476
- export interface UpdateReportDefinitionResult {
477
- /**
478
- * <p>ID of the report.</p>
479
- */
480
- reportId?: string;
481
- }
482
-
483
- export namespace UpdateReportDefinitionResult {
484
- /**
485
- * @internal
486
- */
487
- export const filterSensitiveLog = (obj: UpdateReportDefinitionResult): any => ({
488
- ...obj,
489
- });
490
- }
@@ -1,8 +0,0 @@
1
- import { PaginationConfiguration } from "@aws-sdk/types";
2
-
3
- import { ApplicationCostProfiler } from "../ApplicationCostProfiler";
4
- import { ApplicationCostProfilerClient } from "../ApplicationCostProfilerClient";
5
-
6
- export interface ApplicationCostProfilerPaginationConfiguration extends PaginationConfiguration {
7
- client: ApplicationCostProfiler | ApplicationCostProfilerClient;
8
- }
@@ -1,59 +0,0 @@
1
- import { Paginator } from "@aws-sdk/types";
2
-
3
- import { ApplicationCostProfiler } from "../ApplicationCostProfiler";
4
- import { ApplicationCostProfilerClient } from "../ApplicationCostProfilerClient";
5
- import {
6
- ListReportDefinitionsCommand,
7
- ListReportDefinitionsCommandInput,
8
- ListReportDefinitionsCommandOutput,
9
- } from "../commands/ListReportDefinitionsCommand";
10
- import { ApplicationCostProfilerPaginationConfiguration } from "./Interfaces";
11
-
12
- /**
13
- * @private
14
- */
15
- const makePagedClientRequest = async (
16
- client: ApplicationCostProfilerClient,
17
- input: ListReportDefinitionsCommandInput,
18
- ...args: any
19
- ): Promise<ListReportDefinitionsCommandOutput> => {
20
- // @ts-ignore
21
- return await client.send(new ListReportDefinitionsCommand(input), ...args);
22
- };
23
- /**
24
- * @private
25
- */
26
- const makePagedRequest = async (
27
- client: ApplicationCostProfiler,
28
- input: ListReportDefinitionsCommandInput,
29
- ...args: any
30
- ): Promise<ListReportDefinitionsCommandOutput> => {
31
- // @ts-ignore
32
- return await client.listReportDefinitions(input, ...args);
33
- };
34
- export async function* paginateListReportDefinitions(
35
- config: ApplicationCostProfilerPaginationConfiguration,
36
- input: ListReportDefinitionsCommandInput,
37
- ...additionalArguments: any
38
- ): Paginator<ListReportDefinitionsCommandOutput> {
39
- // ToDo: replace with actual type instead of typeof input.nextToken
40
- let token: typeof input.nextToken | undefined = config.startingToken || undefined;
41
- let hasNext = true;
42
- let page: ListReportDefinitionsCommandOutput;
43
- while (hasNext) {
44
- input.nextToken = token;
45
- input["maxResults"] = config.pageSize;
46
- if (config.client instanceof ApplicationCostProfiler) {
47
- page = await makePagedRequest(config.client, input, ...additionalArguments);
48
- } else if (config.client instanceof ApplicationCostProfilerClient) {
49
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
50
- } else {
51
- throw new Error("Invalid client, expected ApplicationCostProfiler | ApplicationCostProfilerClient");
52
- }
53
- yield page;
54
- token = page.nextToken;
55
- hasNext = !!token;
56
- }
57
- // @ts-ignore
58
- return undefined;
59
- }