@aws-sdk/client-budgets 3.312.0 → 3.316.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.
@@ -1,3 +1,4 @@
1
+ import { createAggregatedClient } from "@aws-sdk/smithy-client";
1
2
  import { BudgetsClient } from "./BudgetsClient";
2
3
  import { CreateBudgetActionCommand, } from "./commands/CreateBudgetActionCommand";
3
4
  import { CreateBudgetCommand, } from "./commands/CreateBudgetCommand";
@@ -22,327 +23,31 @@ import { UpdateBudgetActionCommand, } from "./commands/UpdateBudgetActionCommand
22
23
  import { UpdateBudgetCommand, } from "./commands/UpdateBudgetCommand";
23
24
  import { UpdateNotificationCommand, } from "./commands/UpdateNotificationCommand";
24
25
  import { UpdateSubscriberCommand, } from "./commands/UpdateSubscriberCommand";
26
+ const commands = {
27
+ CreateBudgetCommand,
28
+ CreateBudgetActionCommand,
29
+ CreateNotificationCommand,
30
+ CreateSubscriberCommand,
31
+ DeleteBudgetCommand,
32
+ DeleteBudgetActionCommand,
33
+ DeleteNotificationCommand,
34
+ DeleteSubscriberCommand,
35
+ DescribeBudgetCommand,
36
+ DescribeBudgetActionCommand,
37
+ DescribeBudgetActionHistoriesCommand,
38
+ DescribeBudgetActionsForAccountCommand,
39
+ DescribeBudgetActionsForBudgetCommand,
40
+ DescribeBudgetNotificationsForAccountCommand,
41
+ DescribeBudgetPerformanceHistoryCommand,
42
+ DescribeBudgetsCommand,
43
+ DescribeNotificationsForBudgetCommand,
44
+ DescribeSubscribersForNotificationCommand,
45
+ ExecuteBudgetActionCommand,
46
+ UpdateBudgetCommand,
47
+ UpdateBudgetActionCommand,
48
+ UpdateNotificationCommand,
49
+ UpdateSubscriberCommand,
50
+ };
25
51
  export class Budgets extends BudgetsClient {
26
- createBudget(args, optionsOrCb, cb) {
27
- const command = new CreateBudgetCommand(args);
28
- if (typeof optionsOrCb === "function") {
29
- this.send(command, optionsOrCb);
30
- }
31
- else if (typeof cb === "function") {
32
- if (typeof optionsOrCb !== "object")
33
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
34
- this.send(command, optionsOrCb || {}, cb);
35
- }
36
- else {
37
- return this.send(command, optionsOrCb);
38
- }
39
- }
40
- createBudgetAction(args, optionsOrCb, cb) {
41
- const command = new CreateBudgetActionCommand(args);
42
- if (typeof optionsOrCb === "function") {
43
- this.send(command, optionsOrCb);
44
- }
45
- else if (typeof cb === "function") {
46
- if (typeof optionsOrCb !== "object")
47
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
48
- this.send(command, optionsOrCb || {}, cb);
49
- }
50
- else {
51
- return this.send(command, optionsOrCb);
52
- }
53
- }
54
- createNotification(args, optionsOrCb, cb) {
55
- const command = new CreateNotificationCommand(args);
56
- if (typeof optionsOrCb === "function") {
57
- this.send(command, optionsOrCb);
58
- }
59
- else if (typeof cb === "function") {
60
- if (typeof optionsOrCb !== "object")
61
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
62
- this.send(command, optionsOrCb || {}, cb);
63
- }
64
- else {
65
- return this.send(command, optionsOrCb);
66
- }
67
- }
68
- createSubscriber(args, optionsOrCb, cb) {
69
- const command = new CreateSubscriberCommand(args);
70
- if (typeof optionsOrCb === "function") {
71
- this.send(command, optionsOrCb);
72
- }
73
- else if (typeof cb === "function") {
74
- if (typeof optionsOrCb !== "object")
75
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
76
- this.send(command, optionsOrCb || {}, cb);
77
- }
78
- else {
79
- return this.send(command, optionsOrCb);
80
- }
81
- }
82
- deleteBudget(args, optionsOrCb, cb) {
83
- const command = new DeleteBudgetCommand(args);
84
- if (typeof optionsOrCb === "function") {
85
- this.send(command, optionsOrCb);
86
- }
87
- else if (typeof cb === "function") {
88
- if (typeof optionsOrCb !== "object")
89
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
90
- this.send(command, optionsOrCb || {}, cb);
91
- }
92
- else {
93
- return this.send(command, optionsOrCb);
94
- }
95
- }
96
- deleteBudgetAction(args, optionsOrCb, cb) {
97
- const command = new DeleteBudgetActionCommand(args);
98
- if (typeof optionsOrCb === "function") {
99
- this.send(command, optionsOrCb);
100
- }
101
- else if (typeof cb === "function") {
102
- if (typeof optionsOrCb !== "object")
103
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
104
- this.send(command, optionsOrCb || {}, cb);
105
- }
106
- else {
107
- return this.send(command, optionsOrCb);
108
- }
109
- }
110
- deleteNotification(args, optionsOrCb, cb) {
111
- const command = new DeleteNotificationCommand(args);
112
- if (typeof optionsOrCb === "function") {
113
- this.send(command, optionsOrCb);
114
- }
115
- else if (typeof cb === "function") {
116
- if (typeof optionsOrCb !== "object")
117
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
118
- this.send(command, optionsOrCb || {}, cb);
119
- }
120
- else {
121
- return this.send(command, optionsOrCb);
122
- }
123
- }
124
- deleteSubscriber(args, optionsOrCb, cb) {
125
- const command = new DeleteSubscriberCommand(args);
126
- if (typeof optionsOrCb === "function") {
127
- this.send(command, optionsOrCb);
128
- }
129
- else if (typeof cb === "function") {
130
- if (typeof optionsOrCb !== "object")
131
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
132
- this.send(command, optionsOrCb || {}, cb);
133
- }
134
- else {
135
- return this.send(command, optionsOrCb);
136
- }
137
- }
138
- describeBudget(args, optionsOrCb, cb) {
139
- const command = new DescribeBudgetCommand(args);
140
- if (typeof optionsOrCb === "function") {
141
- this.send(command, optionsOrCb);
142
- }
143
- else if (typeof cb === "function") {
144
- if (typeof optionsOrCb !== "object")
145
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
146
- this.send(command, optionsOrCb || {}, cb);
147
- }
148
- else {
149
- return this.send(command, optionsOrCb);
150
- }
151
- }
152
- describeBudgetAction(args, optionsOrCb, cb) {
153
- const command = new DescribeBudgetActionCommand(args);
154
- if (typeof optionsOrCb === "function") {
155
- this.send(command, optionsOrCb);
156
- }
157
- else if (typeof cb === "function") {
158
- if (typeof optionsOrCb !== "object")
159
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
160
- this.send(command, optionsOrCb || {}, cb);
161
- }
162
- else {
163
- return this.send(command, optionsOrCb);
164
- }
165
- }
166
- describeBudgetActionHistories(args, optionsOrCb, cb) {
167
- const command = new DescribeBudgetActionHistoriesCommand(args);
168
- if (typeof optionsOrCb === "function") {
169
- this.send(command, optionsOrCb);
170
- }
171
- else if (typeof cb === "function") {
172
- if (typeof optionsOrCb !== "object")
173
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
174
- this.send(command, optionsOrCb || {}, cb);
175
- }
176
- else {
177
- return this.send(command, optionsOrCb);
178
- }
179
- }
180
- describeBudgetActionsForAccount(args, optionsOrCb, cb) {
181
- const command = new DescribeBudgetActionsForAccountCommand(args);
182
- if (typeof optionsOrCb === "function") {
183
- this.send(command, optionsOrCb);
184
- }
185
- else if (typeof cb === "function") {
186
- if (typeof optionsOrCb !== "object")
187
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
188
- this.send(command, optionsOrCb || {}, cb);
189
- }
190
- else {
191
- return this.send(command, optionsOrCb);
192
- }
193
- }
194
- describeBudgetActionsForBudget(args, optionsOrCb, cb) {
195
- const command = new DescribeBudgetActionsForBudgetCommand(args);
196
- if (typeof optionsOrCb === "function") {
197
- this.send(command, optionsOrCb);
198
- }
199
- else if (typeof cb === "function") {
200
- if (typeof optionsOrCb !== "object")
201
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
202
- this.send(command, optionsOrCb || {}, cb);
203
- }
204
- else {
205
- return this.send(command, optionsOrCb);
206
- }
207
- }
208
- describeBudgetNotificationsForAccount(args, optionsOrCb, cb) {
209
- const command = new DescribeBudgetNotificationsForAccountCommand(args);
210
- if (typeof optionsOrCb === "function") {
211
- this.send(command, optionsOrCb);
212
- }
213
- else if (typeof cb === "function") {
214
- if (typeof optionsOrCb !== "object")
215
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
216
- this.send(command, optionsOrCb || {}, cb);
217
- }
218
- else {
219
- return this.send(command, optionsOrCb);
220
- }
221
- }
222
- describeBudgetPerformanceHistory(args, optionsOrCb, cb) {
223
- const command = new DescribeBudgetPerformanceHistoryCommand(args);
224
- if (typeof optionsOrCb === "function") {
225
- this.send(command, optionsOrCb);
226
- }
227
- else if (typeof cb === "function") {
228
- if (typeof optionsOrCb !== "object")
229
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
230
- this.send(command, optionsOrCb || {}, cb);
231
- }
232
- else {
233
- return this.send(command, optionsOrCb);
234
- }
235
- }
236
- describeBudgets(args, optionsOrCb, cb) {
237
- const command = new DescribeBudgetsCommand(args);
238
- if (typeof optionsOrCb === "function") {
239
- this.send(command, optionsOrCb);
240
- }
241
- else if (typeof cb === "function") {
242
- if (typeof optionsOrCb !== "object")
243
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
244
- this.send(command, optionsOrCb || {}, cb);
245
- }
246
- else {
247
- return this.send(command, optionsOrCb);
248
- }
249
- }
250
- describeNotificationsForBudget(args, optionsOrCb, cb) {
251
- const command = new DescribeNotificationsForBudgetCommand(args);
252
- if (typeof optionsOrCb === "function") {
253
- this.send(command, optionsOrCb);
254
- }
255
- else if (typeof cb === "function") {
256
- if (typeof optionsOrCb !== "object")
257
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
258
- this.send(command, optionsOrCb || {}, cb);
259
- }
260
- else {
261
- return this.send(command, optionsOrCb);
262
- }
263
- }
264
- describeSubscribersForNotification(args, optionsOrCb, cb) {
265
- const command = new DescribeSubscribersForNotificationCommand(args);
266
- if (typeof optionsOrCb === "function") {
267
- this.send(command, optionsOrCb);
268
- }
269
- else if (typeof cb === "function") {
270
- if (typeof optionsOrCb !== "object")
271
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
272
- this.send(command, optionsOrCb || {}, cb);
273
- }
274
- else {
275
- return this.send(command, optionsOrCb);
276
- }
277
- }
278
- executeBudgetAction(args, optionsOrCb, cb) {
279
- const command = new ExecuteBudgetActionCommand(args);
280
- if (typeof optionsOrCb === "function") {
281
- this.send(command, optionsOrCb);
282
- }
283
- else if (typeof cb === "function") {
284
- if (typeof optionsOrCb !== "object")
285
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
286
- this.send(command, optionsOrCb || {}, cb);
287
- }
288
- else {
289
- return this.send(command, optionsOrCb);
290
- }
291
- }
292
- updateBudget(args, optionsOrCb, cb) {
293
- const command = new UpdateBudgetCommand(args);
294
- if (typeof optionsOrCb === "function") {
295
- this.send(command, optionsOrCb);
296
- }
297
- else if (typeof cb === "function") {
298
- if (typeof optionsOrCb !== "object")
299
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
300
- this.send(command, optionsOrCb || {}, cb);
301
- }
302
- else {
303
- return this.send(command, optionsOrCb);
304
- }
305
- }
306
- updateBudgetAction(args, optionsOrCb, cb) {
307
- const command = new UpdateBudgetActionCommand(args);
308
- if (typeof optionsOrCb === "function") {
309
- this.send(command, optionsOrCb);
310
- }
311
- else if (typeof cb === "function") {
312
- if (typeof optionsOrCb !== "object")
313
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
314
- this.send(command, optionsOrCb || {}, cb);
315
- }
316
- else {
317
- return this.send(command, optionsOrCb);
318
- }
319
- }
320
- updateNotification(args, optionsOrCb, cb) {
321
- const command = new UpdateNotificationCommand(args);
322
- if (typeof optionsOrCb === "function") {
323
- this.send(command, optionsOrCb);
324
- }
325
- else if (typeof cb === "function") {
326
- if (typeof optionsOrCb !== "object")
327
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
328
- this.send(command, optionsOrCb || {}, cb);
329
- }
330
- else {
331
- return this.send(command, optionsOrCb);
332
- }
333
- }
334
- updateSubscriber(args, optionsOrCb, cb) {
335
- const command = new UpdateSubscriberCommand(args);
336
- if (typeof optionsOrCb === "function") {
337
- this.send(command, optionsOrCb);
338
- }
339
- else if (typeof cb === "function") {
340
- if (typeof optionsOrCb !== "object")
341
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
342
- this.send(command, optionsOrCb || {}, cb);
343
- }
344
- else {
345
- return this.send(command, optionsOrCb);
346
- }
347
- }
348
52
  }
53
+ createAggregatedClient(commands, Budgets);