forked from aws/aws-sdk-go-v2
/
api.go
2408 lines (1980 loc) · 68.1 KB
/
api.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
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
179
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
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
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
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
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
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
package budgets
import (
"fmt"
"time"
"github.com/aws/aws-sdk-go-v2/aws"
"github.com/aws/aws-sdk-go-v2/internal/awsutil"
)
const opCreateBudget = "CreateBudget"
// CreateBudgetRequest is a API request type for the CreateBudget API operation.
type CreateBudgetRequest struct {
*aws.Request
Input *CreateBudgetInput
Copy func(*CreateBudgetInput) CreateBudgetRequest
}
// Send marshals and sends the CreateBudget API request.
func (r CreateBudgetRequest) Send() (*CreateBudgetOutput, error) {
err := r.Request.Send()
if err != nil {
return nil, err
}
return r.Request.Data.(*CreateBudgetOutput), nil
}
// CreateBudgetRequest returns a request value for making API operation for
// AWS Budgets.
//
// Creates a budget and, if included, notifications and subscribers.
//
// // Example sending a request using the CreateBudgetRequest method.
// req := client.CreateBudgetRequest(params)
// resp, err := req.Send()
// if err == nil {
// fmt.Println(resp)
// }
func (c *Budgets) CreateBudgetRequest(input *CreateBudgetInput) CreateBudgetRequest {
op := &aws.Operation{
Name: opCreateBudget,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &CreateBudgetInput{}
}
output := &CreateBudgetOutput{}
req := c.newRequest(op, input, output)
output.responseMetadata = aws.Response{Request: req}
return CreateBudgetRequest{Request: req, Input: input, Copy: c.CreateBudgetRequest}
}
const opCreateNotification = "CreateNotification"
// CreateNotificationRequest is a API request type for the CreateNotification API operation.
type CreateNotificationRequest struct {
*aws.Request
Input *CreateNotificationInput
Copy func(*CreateNotificationInput) CreateNotificationRequest
}
// Send marshals and sends the CreateNotification API request.
func (r CreateNotificationRequest) Send() (*CreateNotificationOutput, error) {
err := r.Request.Send()
if err != nil {
return nil, err
}
return r.Request.Data.(*CreateNotificationOutput), nil
}
// CreateNotificationRequest returns a request value for making API operation for
// AWS Budgets.
//
// Creates a notification. You must create the budget before you create the
// associated notification.
//
// // Example sending a request using the CreateNotificationRequest method.
// req := client.CreateNotificationRequest(params)
// resp, err := req.Send()
// if err == nil {
// fmt.Println(resp)
// }
func (c *Budgets) CreateNotificationRequest(input *CreateNotificationInput) CreateNotificationRequest {
op := &aws.Operation{
Name: opCreateNotification,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &CreateNotificationInput{}
}
output := &CreateNotificationOutput{}
req := c.newRequest(op, input, output)
output.responseMetadata = aws.Response{Request: req}
return CreateNotificationRequest{Request: req, Input: input, Copy: c.CreateNotificationRequest}
}
const opCreateSubscriber = "CreateSubscriber"
// CreateSubscriberRequest is a API request type for the CreateSubscriber API operation.
type CreateSubscriberRequest struct {
*aws.Request
Input *CreateSubscriberInput
Copy func(*CreateSubscriberInput) CreateSubscriberRequest
}
// Send marshals and sends the CreateSubscriber API request.
func (r CreateSubscriberRequest) Send() (*CreateSubscriberOutput, error) {
err := r.Request.Send()
if err != nil {
return nil, err
}
return r.Request.Data.(*CreateSubscriberOutput), nil
}
// CreateSubscriberRequest returns a request value for making API operation for
// AWS Budgets.
//
// Creates a subscriber. You must create the associated budget and notification
// before you create the subscriber.
//
// // Example sending a request using the CreateSubscriberRequest method.
// req := client.CreateSubscriberRequest(params)
// resp, err := req.Send()
// if err == nil {
// fmt.Println(resp)
// }
func (c *Budgets) CreateSubscriberRequest(input *CreateSubscriberInput) CreateSubscriberRequest {
op := &aws.Operation{
Name: opCreateSubscriber,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &CreateSubscriberInput{}
}
output := &CreateSubscriberOutput{}
req := c.newRequest(op, input, output)
output.responseMetadata = aws.Response{Request: req}
return CreateSubscriberRequest{Request: req, Input: input, Copy: c.CreateSubscriberRequest}
}
const opDeleteBudget = "DeleteBudget"
// DeleteBudgetRequest is a API request type for the DeleteBudget API operation.
type DeleteBudgetRequest struct {
*aws.Request
Input *DeleteBudgetInput
Copy func(*DeleteBudgetInput) DeleteBudgetRequest
}
// Send marshals and sends the DeleteBudget API request.
func (r DeleteBudgetRequest) Send() (*DeleteBudgetOutput, error) {
err := r.Request.Send()
if err != nil {
return nil, err
}
return r.Request.Data.(*DeleteBudgetOutput), nil
}
// DeleteBudgetRequest returns a request value for making API operation for
// AWS Budgets.
//
// Deletes a budget. You can delete your budget at any time.
//
// Deleting a budget also deletes the notifications and subscribers associated
// with that budget.
//
// // Example sending a request using the DeleteBudgetRequest method.
// req := client.DeleteBudgetRequest(params)
// resp, err := req.Send()
// if err == nil {
// fmt.Println(resp)
// }
func (c *Budgets) DeleteBudgetRequest(input *DeleteBudgetInput) DeleteBudgetRequest {
op := &aws.Operation{
Name: opDeleteBudget,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &DeleteBudgetInput{}
}
output := &DeleteBudgetOutput{}
req := c.newRequest(op, input, output)
output.responseMetadata = aws.Response{Request: req}
return DeleteBudgetRequest{Request: req, Input: input, Copy: c.DeleteBudgetRequest}
}
const opDeleteNotification = "DeleteNotification"
// DeleteNotificationRequest is a API request type for the DeleteNotification API operation.
type DeleteNotificationRequest struct {
*aws.Request
Input *DeleteNotificationInput
Copy func(*DeleteNotificationInput) DeleteNotificationRequest
}
// Send marshals and sends the DeleteNotification API request.
func (r DeleteNotificationRequest) Send() (*DeleteNotificationOutput, error) {
err := r.Request.Send()
if err != nil {
return nil, err
}
return r.Request.Data.(*DeleteNotificationOutput), nil
}
// DeleteNotificationRequest returns a request value for making API operation for
// AWS Budgets.
//
// Deletes a notification.
//
// Deleting a notification also deletes the subscribers associated with the
// notification.
//
// // Example sending a request using the DeleteNotificationRequest method.
// req := client.DeleteNotificationRequest(params)
// resp, err := req.Send()
// if err == nil {
// fmt.Println(resp)
// }
func (c *Budgets) DeleteNotificationRequest(input *DeleteNotificationInput) DeleteNotificationRequest {
op := &aws.Operation{
Name: opDeleteNotification,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &DeleteNotificationInput{}
}
output := &DeleteNotificationOutput{}
req := c.newRequest(op, input, output)
output.responseMetadata = aws.Response{Request: req}
return DeleteNotificationRequest{Request: req, Input: input, Copy: c.DeleteNotificationRequest}
}
const opDeleteSubscriber = "DeleteSubscriber"
// DeleteSubscriberRequest is a API request type for the DeleteSubscriber API operation.
type DeleteSubscriberRequest struct {
*aws.Request
Input *DeleteSubscriberInput
Copy func(*DeleteSubscriberInput) DeleteSubscriberRequest
}
// Send marshals and sends the DeleteSubscriber API request.
func (r DeleteSubscriberRequest) Send() (*DeleteSubscriberOutput, error) {
err := r.Request.Send()
if err != nil {
return nil, err
}
return r.Request.Data.(*DeleteSubscriberOutput), nil
}
// DeleteSubscriberRequest returns a request value for making API operation for
// AWS Budgets.
//
// Deletes a subscriber.
//
// Deleting the last subscriber to a notification also deletes the notification.
//
// // Example sending a request using the DeleteSubscriberRequest method.
// req := client.DeleteSubscriberRequest(params)
// resp, err := req.Send()
// if err == nil {
// fmt.Println(resp)
// }
func (c *Budgets) DeleteSubscriberRequest(input *DeleteSubscriberInput) DeleteSubscriberRequest {
op := &aws.Operation{
Name: opDeleteSubscriber,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &DeleteSubscriberInput{}
}
output := &DeleteSubscriberOutput{}
req := c.newRequest(op, input, output)
output.responseMetadata = aws.Response{Request: req}
return DeleteSubscriberRequest{Request: req, Input: input, Copy: c.DeleteSubscriberRequest}
}
const opDescribeBudget = "DescribeBudget"
// DescribeBudgetRequest is a API request type for the DescribeBudget API operation.
type DescribeBudgetRequest struct {
*aws.Request
Input *DescribeBudgetInput
Copy func(*DescribeBudgetInput) DescribeBudgetRequest
}
// Send marshals and sends the DescribeBudget API request.
func (r DescribeBudgetRequest) Send() (*DescribeBudgetOutput, error) {
err := r.Request.Send()
if err != nil {
return nil, err
}
return r.Request.Data.(*DescribeBudgetOutput), nil
}
// DescribeBudgetRequest returns a request value for making API operation for
// AWS Budgets.
//
// Describes a budget.
//
// // Example sending a request using the DescribeBudgetRequest method.
// req := client.DescribeBudgetRequest(params)
// resp, err := req.Send()
// if err == nil {
// fmt.Println(resp)
// }
func (c *Budgets) DescribeBudgetRequest(input *DescribeBudgetInput) DescribeBudgetRequest {
op := &aws.Operation{
Name: opDescribeBudget,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &DescribeBudgetInput{}
}
output := &DescribeBudgetOutput{}
req := c.newRequest(op, input, output)
output.responseMetadata = aws.Response{Request: req}
return DescribeBudgetRequest{Request: req, Input: input, Copy: c.DescribeBudgetRequest}
}
const opDescribeBudgets = "DescribeBudgets"
// DescribeBudgetsRequest is a API request type for the DescribeBudgets API operation.
type DescribeBudgetsRequest struct {
*aws.Request
Input *DescribeBudgetsInput
Copy func(*DescribeBudgetsInput) DescribeBudgetsRequest
}
// Send marshals and sends the DescribeBudgets API request.
func (r DescribeBudgetsRequest) Send() (*DescribeBudgetsOutput, error) {
err := r.Request.Send()
if err != nil {
return nil, err
}
return r.Request.Data.(*DescribeBudgetsOutput), nil
}
// DescribeBudgetsRequest returns a request value for making API operation for
// AWS Budgets.
//
// Lists the budgets associated with an account.
//
// // Example sending a request using the DescribeBudgetsRequest method.
// req := client.DescribeBudgetsRequest(params)
// resp, err := req.Send()
// if err == nil {
// fmt.Println(resp)
// }
func (c *Budgets) DescribeBudgetsRequest(input *DescribeBudgetsInput) DescribeBudgetsRequest {
op := &aws.Operation{
Name: opDescribeBudgets,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &DescribeBudgetsInput{}
}
output := &DescribeBudgetsOutput{}
req := c.newRequest(op, input, output)
output.responseMetadata = aws.Response{Request: req}
return DescribeBudgetsRequest{Request: req, Input: input, Copy: c.DescribeBudgetsRequest}
}
const opDescribeNotificationsForBudget = "DescribeNotificationsForBudget"
// DescribeNotificationsForBudgetRequest is a API request type for the DescribeNotificationsForBudget API operation.
type DescribeNotificationsForBudgetRequest struct {
*aws.Request
Input *DescribeNotificationsForBudgetInput
Copy func(*DescribeNotificationsForBudgetInput) DescribeNotificationsForBudgetRequest
}
// Send marshals and sends the DescribeNotificationsForBudget API request.
func (r DescribeNotificationsForBudgetRequest) Send() (*DescribeNotificationsForBudgetOutput, error) {
err := r.Request.Send()
if err != nil {
return nil, err
}
return r.Request.Data.(*DescribeNotificationsForBudgetOutput), nil
}
// DescribeNotificationsForBudgetRequest returns a request value for making API operation for
// AWS Budgets.
//
// Lists the notifications associated with a budget.
//
// // Example sending a request using the DescribeNotificationsForBudgetRequest method.
// req := client.DescribeNotificationsForBudgetRequest(params)
// resp, err := req.Send()
// if err == nil {
// fmt.Println(resp)
// }
func (c *Budgets) DescribeNotificationsForBudgetRequest(input *DescribeNotificationsForBudgetInput) DescribeNotificationsForBudgetRequest {
op := &aws.Operation{
Name: opDescribeNotificationsForBudget,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &DescribeNotificationsForBudgetInput{}
}
output := &DescribeNotificationsForBudgetOutput{}
req := c.newRequest(op, input, output)
output.responseMetadata = aws.Response{Request: req}
return DescribeNotificationsForBudgetRequest{Request: req, Input: input, Copy: c.DescribeNotificationsForBudgetRequest}
}
const opDescribeSubscribersForNotification = "DescribeSubscribersForNotification"
// DescribeSubscribersForNotificationRequest is a API request type for the DescribeSubscribersForNotification API operation.
type DescribeSubscribersForNotificationRequest struct {
*aws.Request
Input *DescribeSubscribersForNotificationInput
Copy func(*DescribeSubscribersForNotificationInput) DescribeSubscribersForNotificationRequest
}
// Send marshals and sends the DescribeSubscribersForNotification API request.
func (r DescribeSubscribersForNotificationRequest) Send() (*DescribeSubscribersForNotificationOutput, error) {
err := r.Request.Send()
if err != nil {
return nil, err
}
return r.Request.Data.(*DescribeSubscribersForNotificationOutput), nil
}
// DescribeSubscribersForNotificationRequest returns a request value for making API operation for
// AWS Budgets.
//
// Lists the subscribers associated with a notification.
//
// // Example sending a request using the DescribeSubscribersForNotificationRequest method.
// req := client.DescribeSubscribersForNotificationRequest(params)
// resp, err := req.Send()
// if err == nil {
// fmt.Println(resp)
// }
func (c *Budgets) DescribeSubscribersForNotificationRequest(input *DescribeSubscribersForNotificationInput) DescribeSubscribersForNotificationRequest {
op := &aws.Operation{
Name: opDescribeSubscribersForNotification,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &DescribeSubscribersForNotificationInput{}
}
output := &DescribeSubscribersForNotificationOutput{}
req := c.newRequest(op, input, output)
output.responseMetadata = aws.Response{Request: req}
return DescribeSubscribersForNotificationRequest{Request: req, Input: input, Copy: c.DescribeSubscribersForNotificationRequest}
}
const opUpdateBudget = "UpdateBudget"
// UpdateBudgetRequest is a API request type for the UpdateBudget API operation.
type UpdateBudgetRequest struct {
*aws.Request
Input *UpdateBudgetInput
Copy func(*UpdateBudgetInput) UpdateBudgetRequest
}
// Send marshals and sends the UpdateBudget API request.
func (r UpdateBudgetRequest) Send() (*UpdateBudgetOutput, error) {
err := r.Request.Send()
if err != nil {
return nil, err
}
return r.Request.Data.(*UpdateBudgetOutput), nil
}
// UpdateBudgetRequest returns a request value for making API operation for
// AWS Budgets.
//
// Updates a budget. You can change every part of a budget except for the budgetName
// and the calculatedSpend. When a budget is modified, the calculatedSpend drops
// to zero until AWS has new usage data to use for forecasting.
//
// // Example sending a request using the UpdateBudgetRequest method.
// req := client.UpdateBudgetRequest(params)
// resp, err := req.Send()
// if err == nil {
// fmt.Println(resp)
// }
func (c *Budgets) UpdateBudgetRequest(input *UpdateBudgetInput) UpdateBudgetRequest {
op := &aws.Operation{
Name: opUpdateBudget,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &UpdateBudgetInput{}
}
output := &UpdateBudgetOutput{}
req := c.newRequest(op, input, output)
output.responseMetadata = aws.Response{Request: req}
return UpdateBudgetRequest{Request: req, Input: input, Copy: c.UpdateBudgetRequest}
}
const opUpdateNotification = "UpdateNotification"
// UpdateNotificationRequest is a API request type for the UpdateNotification API operation.
type UpdateNotificationRequest struct {
*aws.Request
Input *UpdateNotificationInput
Copy func(*UpdateNotificationInput) UpdateNotificationRequest
}
// Send marshals and sends the UpdateNotification API request.
func (r UpdateNotificationRequest) Send() (*UpdateNotificationOutput, error) {
err := r.Request.Send()
if err != nil {
return nil, err
}
return r.Request.Data.(*UpdateNotificationOutput), nil
}
// UpdateNotificationRequest returns a request value for making API operation for
// AWS Budgets.
//
// Updates a notification.
//
// // Example sending a request using the UpdateNotificationRequest method.
// req := client.UpdateNotificationRequest(params)
// resp, err := req.Send()
// if err == nil {
// fmt.Println(resp)
// }
func (c *Budgets) UpdateNotificationRequest(input *UpdateNotificationInput) UpdateNotificationRequest {
op := &aws.Operation{
Name: opUpdateNotification,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &UpdateNotificationInput{}
}
output := &UpdateNotificationOutput{}
req := c.newRequest(op, input, output)
output.responseMetadata = aws.Response{Request: req}
return UpdateNotificationRequest{Request: req, Input: input, Copy: c.UpdateNotificationRequest}
}
const opUpdateSubscriber = "UpdateSubscriber"
// UpdateSubscriberRequest is a API request type for the UpdateSubscriber API operation.
type UpdateSubscriberRequest struct {
*aws.Request
Input *UpdateSubscriberInput
Copy func(*UpdateSubscriberInput) UpdateSubscriberRequest
}
// Send marshals and sends the UpdateSubscriber API request.
func (r UpdateSubscriberRequest) Send() (*UpdateSubscriberOutput, error) {
err := r.Request.Send()
if err != nil {
return nil, err
}
return r.Request.Data.(*UpdateSubscriberOutput), nil
}
// UpdateSubscriberRequest returns a request value for making API operation for
// AWS Budgets.
//
// Updates a subscriber.
//
// // Example sending a request using the UpdateSubscriberRequest method.
// req := client.UpdateSubscriberRequest(params)
// resp, err := req.Send()
// if err == nil {
// fmt.Println(resp)
// }
func (c *Budgets) UpdateSubscriberRequest(input *UpdateSubscriberInput) UpdateSubscriberRequest {
op := &aws.Operation{
Name: opUpdateSubscriber,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &UpdateSubscriberInput{}
}
output := &UpdateSubscriberOutput{}
req := c.newRequest(op, input, output)
output.responseMetadata = aws.Response{Request: req}
return UpdateSubscriberRequest{Request: req, Input: input, Copy: c.UpdateSubscriberRequest}
}
// Represents the output of the CreateBudget operation. The content consists
// of the detailed metadata and data file information, and the current status
// of the budget.
//
// The ARN pattern for a budget is: arn:aws:budgetservice::AccountId:budget/budgetName
type Budget struct {
_ struct{} `type:"structure"`
// The total amount of cost, usage, or RI utilization that you want to track
// with your budget.
//
// BudgetLimit is required for cost or usage budgets, but optional for RI utilization
// budgets. RI utilization budgets default to the only valid value for RI utilization
// budgets, which is 100.
BudgetLimit *Spend `type:"structure"`
// The name of a budget. Unique within accounts. : and \ characters are not
// allowed in the BudgetName.
//
// BudgetName is a required field
BudgetName *string `type:"string" required:"true"`
// Whether this budget tracks monetary costs, usage, or RI utilization.
//
// BudgetType is a required field
BudgetType BudgetType `type:"string" required:"true" enum:"true"`
// The actual and forecasted cost or usage being tracked by a budget.
CalculatedSpend *CalculatedSpend `type:"structure"`
// The cost filters applied to a budget, such as service or region.
CostFilters map[string][]string `type:"map"`
// The types of costs included in this budget.
CostTypes *CostTypes `type:"structure"`
// The period of time covered by a budget. Has a start date and an end date.
// The start date must come before the end date. There are no restrictions on
// the end date.
//
// If you created your budget and didn't specify a start date, AWS defaults
// to the start of your chosen time period (i.e. DAILY, MONTHLY, QUARTERLY,
// ANNUALLY). For example, if you created your budget on January 24th 2018,
// chose DAILY, and didn't set a start date, AWS set your start date to 01/24/18
// 00:00 UTC. If you chose MONTHLY, AWS set your start date to 01/01/18 00:00
// UTC. If you didn't specify an end date, AWS set your end date to 06/15/87
// 00:00 UTC. The defaults are the same for the AWS Billing and Cost Management
// console and the API.
//
// You can change either date with the UpdateBudget operation.
//
// After the end date, AWS deletes the budget and all associated notifications
// and subscribers.
TimePeriod *TimePeriod `type:"structure"`
// The length of time until a budget resets the actual and forecasted spend.
//
// TimeUnit is a required field
TimeUnit TimeUnit `type:"string" required:"true" enum:"true"`
}
// String returns the string representation
func (s Budget) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s Budget) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *Budget) Validate() error {
invalidParams := aws.ErrInvalidParams{Context: "Budget"}
if s.BudgetName == nil {
invalidParams.Add(aws.NewErrParamRequired("BudgetName"))
}
if len(s.BudgetType) == 0 {
invalidParams.Add(aws.NewErrParamRequired("BudgetType"))
}
if len(s.TimeUnit) == 0 {
invalidParams.Add(aws.NewErrParamRequired("TimeUnit"))
}
if s.BudgetLimit != nil {
if err := s.BudgetLimit.Validate(); err != nil {
invalidParams.AddNested("BudgetLimit", err.(aws.ErrInvalidParams))
}
}
if s.CalculatedSpend != nil {
if err := s.CalculatedSpend.Validate(); err != nil {
invalidParams.AddNested("CalculatedSpend", err.(aws.ErrInvalidParams))
}
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// The spend objects associated with this budget. The actualSpend tracks how
// much you've used, cost, usage, or RI units, and the forecastedSpend tracks
// how much you are predicted to spend if your current usage remains steady.
//
// For example, if it is the 20th of the month and you have spent 50 dollars
// on Amazon EC2, your actualSpend is 50 USD, and your forecastedSpend is 75
// USD.
type CalculatedSpend struct {
_ struct{} `type:"structure"`
// The amount of cost, usage, or RI units that you have used.
//
// ActualSpend is a required field
ActualSpend *Spend `type:"structure" required:"true"`
// The amount of cost, usage, or RI units that you are forecasted to use.
ForecastedSpend *Spend `type:"structure"`
}
// String returns the string representation
func (s CalculatedSpend) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s CalculatedSpend) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *CalculatedSpend) Validate() error {
invalidParams := aws.ErrInvalidParams{Context: "CalculatedSpend"}
if s.ActualSpend == nil {
invalidParams.Add(aws.NewErrParamRequired("ActualSpend"))
}
if s.ActualSpend != nil {
if err := s.ActualSpend.Validate(); err != nil {
invalidParams.AddNested("ActualSpend", err.(aws.ErrInvalidParams))
}
}
if s.ForecastedSpend != nil {
if err := s.ForecastedSpend.Validate(); err != nil {
invalidParams.AddNested("ForecastedSpend", err.(aws.ErrInvalidParams))
}
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// The types of cost included in a budget, such as tax and subscriptions.
type CostTypes struct {
_ struct{} `type:"structure"`
// Specifies whether a budget includes credits.
//
// The default value is true.
IncludeCredit *bool `type:"boolean"`
// Specifies whether a budget includes discounts.
//
// The default value is true.
IncludeDiscount *bool `type:"boolean"`
// Specifies whether a budget includes non-RI subscription costs.
//
// The default value is true.
IncludeOtherSubscription *bool `type:"boolean"`
// Specifies whether a budget includes recurring fees such as monthly RI fees.
//
// The default value is true.
IncludeRecurring *bool `type:"boolean"`
// Specifies whether a budget includes refunds.
//
// The default value is true.
IncludeRefund *bool `type:"boolean"`
// Specifies whether a budget includes subscriptions.
//
// The default value is true.
IncludeSubscription *bool `type:"boolean"`
// Specifies whether a budget includes support subscription fees.
//
// The default value is true.
IncludeSupport *bool `type:"boolean"`
// Specifies whether a budget includes taxes.
//
// The default value is true.
IncludeTax *bool `type:"boolean"`
// Specifies whether a budget includes upfront RI costs.
//
// The default value is true.
IncludeUpfront *bool `type:"boolean"`
// Specifies whether a budget uses the amortized rate.
//
// The default value is false.
UseAmortized *bool `type:"boolean"`
// Specifies whether a budget uses blended rate.
//
// The default value is false.
UseBlended *bool `type:"boolean"`
}
// String returns the string representation
func (s CostTypes) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s CostTypes) GoString() string {
return s.String()
}
// Request of CreateBudget
type CreateBudgetInput struct {
_ struct{} `type:"structure"`
// The accountId that is associated with the budget.
//
// AccountId is a required field
AccountId *string `min:"12" type:"string" required:"true"`
// The budget object that you want to create.
//
// Budget is a required field
Budget *Budget `type:"structure" required:"true"`
// A notification that you want to associate with a budget. A budget can have
// up to five notifications, and each notification can have one SNS subscriber
// and up to ten email subscribers. If you include notifications and subscribers
// in your CreateBudget call, AWS creates the notifications and subscribers
// for you.
NotificationsWithSubscribers []NotificationWithSubscribers `type:"list"`
}
// String returns the string representation
func (s CreateBudgetInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s CreateBudgetInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *CreateBudgetInput) Validate() error {
invalidParams := aws.ErrInvalidParams{Context: "CreateBudgetInput"}
if s.AccountId == nil {
invalidParams.Add(aws.NewErrParamRequired("AccountId"))
}
if s.AccountId != nil && len(*s.AccountId) < 12 {
invalidParams.Add(aws.NewErrParamMinLen("AccountId", 12))
}
if s.Budget == nil {
invalidParams.Add(aws.NewErrParamRequired("Budget"))
}
if s.Budget != nil {
if err := s.Budget.Validate(); err != nil {
invalidParams.AddNested("Budget", err.(aws.ErrInvalidParams))
}
}
if s.NotificationsWithSubscribers != nil {
for i, v := range s.NotificationsWithSubscribers {
if err := v.Validate(); err != nil {
invalidParams.AddNested(fmt.Sprintf("%s[%v]", "NotificationsWithSubscribers", i), err.(aws.ErrInvalidParams))
}
}
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// Response of CreateBudget
type CreateBudgetOutput struct {
_ struct{} `type:"structure"`
responseMetadata aws.Response
}
// String returns the string representation
func (s CreateBudgetOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s CreateBudgetOutput) GoString() string {
return s.String()
}
// SDKResponseMetdata return sthe response metadata for the API.
func (s CreateBudgetOutput) SDKResponseMetadata() aws.Response {
return s.responseMetadata
}
// Request of CreateNotification
type CreateNotificationInput struct {
_ struct{} `type:"structure"`
// The accountId that is associated with the budget that you want to create
// a notification for.
//
// AccountId is a required field
AccountId *string `min:"12" type:"string" required:"true"`
// The name of the budget that you want AWS to notified you about. Budget names
// must be unique within an account.
//
// BudgetName is a required field
BudgetName *string `type:"string" required:"true"`
// The notification that you want to create.
//
// Notification is a required field
Notification *Notification `type:"structure" required:"true"`
// A list of subscribers that you want to associate with the notification. Each
// notification can have one SNS subscriber and up to ten email subscribers.
//
// Subscribers is a required field
Subscribers []Subscriber `min:"1" type:"list" required:"true"`
}
// String returns the string representation
func (s CreateNotificationInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s CreateNotificationInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *CreateNotificationInput) Validate() error {
invalidParams := aws.ErrInvalidParams{Context: "CreateNotificationInput"}