forked from aws/aws-sdk-go-v2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
api.go
1796 lines (1467 loc) · 56.7 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 fms
import (
"fmt"
"time"
"github.com/aws/aws-sdk-go-v2/aws"
"github.com/aws/aws-sdk-go-v2/internal/awsutil"
"github.com/aws/aws-sdk-go-v2/private/protocol"
"github.com/aws/aws-sdk-go-v2/private/protocol/jsonrpc"
)
const opAssociateAdminAccount = "AssociateAdminAccount"
// AssociateAdminAccountRequest is a API request type for the AssociateAdminAccount API operation.
type AssociateAdminAccountRequest struct {
*aws.Request
Input *AssociateAdminAccountInput
Copy func(*AssociateAdminAccountInput) AssociateAdminAccountRequest
}
// Send marshals and sends the AssociateAdminAccount API request.
func (r AssociateAdminAccountRequest) Send() (*AssociateAdminAccountOutput, error) {
err := r.Request.Send()
if err != nil {
return nil, err
}
return r.Request.Data.(*AssociateAdminAccountOutput), nil
}
// AssociateAdminAccountRequest returns a request value for making API operation for
// Firewall Management Service.
//
// Sets the AWS Firewall Manager administrator account. AWS Firewall Manager
// must be associated with a master account in AWS Organizations or associated
// with a member account that has the appropriate permissions. If the account
// ID that you submit is not an AWS Organizations master account, AWS Firewall
// Manager will set the appropriate permissions for the given member account.
//
// The account that you associate with AWS Firewall Manager is called the AWS
// Firewall manager administrator account.
//
// // Example sending a request using the AssociateAdminAccountRequest method.
// req := client.AssociateAdminAccountRequest(params)
// resp, err := req.Send()
// if err == nil {
// fmt.Println(resp)
// }
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/fms-2018-01-01/AssociateAdminAccount
func (c *FMS) AssociateAdminAccountRequest(input *AssociateAdminAccountInput) AssociateAdminAccountRequest {
op := &aws.Operation{
Name: opAssociateAdminAccount,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &AssociateAdminAccountInput{}
}
output := &AssociateAdminAccountOutput{}
req := c.newRequest(op, input, output)
req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler)
req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
output.responseMetadata = aws.Response{Request: req}
return AssociateAdminAccountRequest{Request: req, Input: input, Copy: c.AssociateAdminAccountRequest}
}
const opDeleteNotificationChannel = "DeleteNotificationChannel"
// DeleteNotificationChannelRequest is a API request type for the DeleteNotificationChannel API operation.
type DeleteNotificationChannelRequest struct {
*aws.Request
Input *DeleteNotificationChannelInput
Copy func(*DeleteNotificationChannelInput) DeleteNotificationChannelRequest
}
// Send marshals and sends the DeleteNotificationChannel API request.
func (r DeleteNotificationChannelRequest) Send() (*DeleteNotificationChannelOutput, error) {
err := r.Request.Send()
if err != nil {
return nil, err
}
return r.Request.Data.(*DeleteNotificationChannelOutput), nil
}
// DeleteNotificationChannelRequest returns a request value for making API operation for
// Firewall Management Service.
//
// Deletes an AWS Firewall Manager association with the IAM role and the Amazon
// Simple Notification Service (SNS) topic that is used to record AWS Firewall
// Manager SNS logs.
//
// // Example sending a request using the DeleteNotificationChannelRequest method.
// req := client.DeleteNotificationChannelRequest(params)
// resp, err := req.Send()
// if err == nil {
// fmt.Println(resp)
// }
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/fms-2018-01-01/DeleteNotificationChannel
func (c *FMS) DeleteNotificationChannelRequest(input *DeleteNotificationChannelInput) DeleteNotificationChannelRequest {
op := &aws.Operation{
Name: opDeleteNotificationChannel,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &DeleteNotificationChannelInput{}
}
output := &DeleteNotificationChannelOutput{}
req := c.newRequest(op, input, output)
req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler)
req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
output.responseMetadata = aws.Response{Request: req}
return DeleteNotificationChannelRequest{Request: req, Input: input, Copy: c.DeleteNotificationChannelRequest}
}
const opDeletePolicy = "DeletePolicy"
// DeletePolicyRequest is a API request type for the DeletePolicy API operation.
type DeletePolicyRequest struct {
*aws.Request
Input *DeletePolicyInput
Copy func(*DeletePolicyInput) DeletePolicyRequest
}
// Send marshals and sends the DeletePolicy API request.
func (r DeletePolicyRequest) Send() (*DeletePolicyOutput, error) {
err := r.Request.Send()
if err != nil {
return nil, err
}
return r.Request.Data.(*DeletePolicyOutput), nil
}
// DeletePolicyRequest returns a request value for making API operation for
// Firewall Management Service.
//
// Permanently deletes an AWS Firewall Manager policy.
//
// // Example sending a request using the DeletePolicyRequest method.
// req := client.DeletePolicyRequest(params)
// resp, err := req.Send()
// if err == nil {
// fmt.Println(resp)
// }
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/fms-2018-01-01/DeletePolicy
func (c *FMS) DeletePolicyRequest(input *DeletePolicyInput) DeletePolicyRequest {
op := &aws.Operation{
Name: opDeletePolicy,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &DeletePolicyInput{}
}
output := &DeletePolicyOutput{}
req := c.newRequest(op, input, output)
req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler)
req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
output.responseMetadata = aws.Response{Request: req}
return DeletePolicyRequest{Request: req, Input: input, Copy: c.DeletePolicyRequest}
}
const opDisassociateAdminAccount = "DisassociateAdminAccount"
// DisassociateAdminAccountRequest is a API request type for the DisassociateAdminAccount API operation.
type DisassociateAdminAccountRequest struct {
*aws.Request
Input *DisassociateAdminAccountInput
Copy func(*DisassociateAdminAccountInput) DisassociateAdminAccountRequest
}
// Send marshals and sends the DisassociateAdminAccount API request.
func (r DisassociateAdminAccountRequest) Send() (*DisassociateAdminAccountOutput, error) {
err := r.Request.Send()
if err != nil {
return nil, err
}
return r.Request.Data.(*DisassociateAdminAccountOutput), nil
}
// DisassociateAdminAccountRequest returns a request value for making API operation for
// Firewall Management Service.
//
// Disassociates the account that has been set as the AWS Firewall Manager administrator
// account. You will need to submit an AssociateAdminAccount request to set
// a new account as the AWS Firewall administrator.
//
// // Example sending a request using the DisassociateAdminAccountRequest method.
// req := client.DisassociateAdminAccountRequest(params)
// resp, err := req.Send()
// if err == nil {
// fmt.Println(resp)
// }
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/fms-2018-01-01/DisassociateAdminAccount
func (c *FMS) DisassociateAdminAccountRequest(input *DisassociateAdminAccountInput) DisassociateAdminAccountRequest {
op := &aws.Operation{
Name: opDisassociateAdminAccount,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &DisassociateAdminAccountInput{}
}
output := &DisassociateAdminAccountOutput{}
req := c.newRequest(op, input, output)
req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler)
req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
output.responseMetadata = aws.Response{Request: req}
return DisassociateAdminAccountRequest{Request: req, Input: input, Copy: c.DisassociateAdminAccountRequest}
}
const opGetAdminAccount = "GetAdminAccount"
// GetAdminAccountRequest is a API request type for the GetAdminAccount API operation.
type GetAdminAccountRequest struct {
*aws.Request
Input *GetAdminAccountInput
Copy func(*GetAdminAccountInput) GetAdminAccountRequest
}
// Send marshals and sends the GetAdminAccount API request.
func (r GetAdminAccountRequest) Send() (*GetAdminAccountOutput, error) {
err := r.Request.Send()
if err != nil {
return nil, err
}
return r.Request.Data.(*GetAdminAccountOutput), nil
}
// GetAdminAccountRequest returns a request value for making API operation for
// Firewall Management Service.
//
// Returns the AWS Organizations master account that is associated with AWS
// Firewall Manager as the AWS Firewall Manager administrator.
//
// // Example sending a request using the GetAdminAccountRequest method.
// req := client.GetAdminAccountRequest(params)
// resp, err := req.Send()
// if err == nil {
// fmt.Println(resp)
// }
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/fms-2018-01-01/GetAdminAccount
func (c *FMS) GetAdminAccountRequest(input *GetAdminAccountInput) GetAdminAccountRequest {
op := &aws.Operation{
Name: opGetAdminAccount,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &GetAdminAccountInput{}
}
output := &GetAdminAccountOutput{}
req := c.newRequest(op, input, output)
output.responseMetadata = aws.Response{Request: req}
return GetAdminAccountRequest{Request: req, Input: input, Copy: c.GetAdminAccountRequest}
}
const opGetComplianceDetail = "GetComplianceDetail"
// GetComplianceDetailRequest is a API request type for the GetComplianceDetail API operation.
type GetComplianceDetailRequest struct {
*aws.Request
Input *GetComplianceDetailInput
Copy func(*GetComplianceDetailInput) GetComplianceDetailRequest
}
// Send marshals and sends the GetComplianceDetail API request.
func (r GetComplianceDetailRequest) Send() (*GetComplianceDetailOutput, error) {
err := r.Request.Send()
if err != nil {
return nil, err
}
return r.Request.Data.(*GetComplianceDetailOutput), nil
}
// GetComplianceDetailRequest returns a request value for making API operation for
// Firewall Management Service.
//
// Returns detailed compliance information about the specified member account.
// Details include resources that are in and out of compliance with the specified
// policy. Resources are considered non-compliant if the specified policy has
// not been applied to them.
//
// // Example sending a request using the GetComplianceDetailRequest method.
// req := client.GetComplianceDetailRequest(params)
// resp, err := req.Send()
// if err == nil {
// fmt.Println(resp)
// }
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/fms-2018-01-01/GetComplianceDetail
func (c *FMS) GetComplianceDetailRequest(input *GetComplianceDetailInput) GetComplianceDetailRequest {
op := &aws.Operation{
Name: opGetComplianceDetail,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &GetComplianceDetailInput{}
}
output := &GetComplianceDetailOutput{}
req := c.newRequest(op, input, output)
output.responseMetadata = aws.Response{Request: req}
return GetComplianceDetailRequest{Request: req, Input: input, Copy: c.GetComplianceDetailRequest}
}
const opGetNotificationChannel = "GetNotificationChannel"
// GetNotificationChannelRequest is a API request type for the GetNotificationChannel API operation.
type GetNotificationChannelRequest struct {
*aws.Request
Input *GetNotificationChannelInput
Copy func(*GetNotificationChannelInput) GetNotificationChannelRequest
}
// Send marshals and sends the GetNotificationChannel API request.
func (r GetNotificationChannelRequest) Send() (*GetNotificationChannelOutput, error) {
err := r.Request.Send()
if err != nil {
return nil, err
}
return r.Request.Data.(*GetNotificationChannelOutput), nil
}
// GetNotificationChannelRequest returns a request value for making API operation for
// Firewall Management Service.
//
// Returns information about the Amazon Simple Notification Service (SNS) topic
// that is used to record AWS Firewall Manager SNS logs.
//
// // Example sending a request using the GetNotificationChannelRequest method.
// req := client.GetNotificationChannelRequest(params)
// resp, err := req.Send()
// if err == nil {
// fmt.Println(resp)
// }
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/fms-2018-01-01/GetNotificationChannel
func (c *FMS) GetNotificationChannelRequest(input *GetNotificationChannelInput) GetNotificationChannelRequest {
op := &aws.Operation{
Name: opGetNotificationChannel,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &GetNotificationChannelInput{}
}
output := &GetNotificationChannelOutput{}
req := c.newRequest(op, input, output)
output.responseMetadata = aws.Response{Request: req}
return GetNotificationChannelRequest{Request: req, Input: input, Copy: c.GetNotificationChannelRequest}
}
const opGetPolicy = "GetPolicy"
// GetPolicyRequest is a API request type for the GetPolicy API operation.
type GetPolicyRequest struct {
*aws.Request
Input *GetPolicyInput
Copy func(*GetPolicyInput) GetPolicyRequest
}
// Send marshals and sends the GetPolicy API request.
func (r GetPolicyRequest) Send() (*GetPolicyOutput, error) {
err := r.Request.Send()
if err != nil {
return nil, err
}
return r.Request.Data.(*GetPolicyOutput), nil
}
// GetPolicyRequest returns a request value for making API operation for
// Firewall Management Service.
//
// Returns information about the specified AWS Firewall Manager policy.
//
// // Example sending a request using the GetPolicyRequest method.
// req := client.GetPolicyRequest(params)
// resp, err := req.Send()
// if err == nil {
// fmt.Println(resp)
// }
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/fms-2018-01-01/GetPolicy
func (c *FMS) GetPolicyRequest(input *GetPolicyInput) GetPolicyRequest {
op := &aws.Operation{
Name: opGetPolicy,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &GetPolicyInput{}
}
output := &GetPolicyOutput{}
req := c.newRequest(op, input, output)
output.responseMetadata = aws.Response{Request: req}
return GetPolicyRequest{Request: req, Input: input, Copy: c.GetPolicyRequest}
}
const opListComplianceStatus = "ListComplianceStatus"
// ListComplianceStatusRequest is a API request type for the ListComplianceStatus API operation.
type ListComplianceStatusRequest struct {
*aws.Request
Input *ListComplianceStatusInput
Copy func(*ListComplianceStatusInput) ListComplianceStatusRequest
}
// Send marshals and sends the ListComplianceStatus API request.
func (r ListComplianceStatusRequest) Send() (*ListComplianceStatusOutput, error) {
err := r.Request.Send()
if err != nil {
return nil, err
}
return r.Request.Data.(*ListComplianceStatusOutput), nil
}
// ListComplianceStatusRequest returns a request value for making API operation for
// Firewall Management Service.
//
// Returns an array of PolicyComplianceStatus objects in the response. Use PolicyComplianceStatus
// to get a summary of which member accounts are protected by the specified
// policy.
//
// // Example sending a request using the ListComplianceStatusRequest method.
// req := client.ListComplianceStatusRequest(params)
// resp, err := req.Send()
// if err == nil {
// fmt.Println(resp)
// }
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/fms-2018-01-01/ListComplianceStatus
func (c *FMS) ListComplianceStatusRequest(input *ListComplianceStatusInput) ListComplianceStatusRequest {
op := &aws.Operation{
Name: opListComplianceStatus,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &ListComplianceStatusInput{}
}
output := &ListComplianceStatusOutput{}
req := c.newRequest(op, input, output)
output.responseMetadata = aws.Response{Request: req}
return ListComplianceStatusRequest{Request: req, Input: input, Copy: c.ListComplianceStatusRequest}
}
const opListPolicies = "ListPolicies"
// ListPoliciesRequest is a API request type for the ListPolicies API operation.
type ListPoliciesRequest struct {
*aws.Request
Input *ListPoliciesInput
Copy func(*ListPoliciesInput) ListPoliciesRequest
}
// Send marshals and sends the ListPolicies API request.
func (r ListPoliciesRequest) Send() (*ListPoliciesOutput, error) {
err := r.Request.Send()
if err != nil {
return nil, err
}
return r.Request.Data.(*ListPoliciesOutput), nil
}
// ListPoliciesRequest returns a request value for making API operation for
// Firewall Management Service.
//
// Returns an array of PolicySummary objects in the response.
//
// // Example sending a request using the ListPoliciesRequest method.
// req := client.ListPoliciesRequest(params)
// resp, err := req.Send()
// if err == nil {
// fmt.Println(resp)
// }
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/fms-2018-01-01/ListPolicies
func (c *FMS) ListPoliciesRequest(input *ListPoliciesInput) ListPoliciesRequest {
op := &aws.Operation{
Name: opListPolicies,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &ListPoliciesInput{}
}
output := &ListPoliciesOutput{}
req := c.newRequest(op, input, output)
output.responseMetadata = aws.Response{Request: req}
return ListPoliciesRequest{Request: req, Input: input, Copy: c.ListPoliciesRequest}
}
const opPutNotificationChannel = "PutNotificationChannel"
// PutNotificationChannelRequest is a API request type for the PutNotificationChannel API operation.
type PutNotificationChannelRequest struct {
*aws.Request
Input *PutNotificationChannelInput
Copy func(*PutNotificationChannelInput) PutNotificationChannelRequest
}
// Send marshals and sends the PutNotificationChannel API request.
func (r PutNotificationChannelRequest) Send() (*PutNotificationChannelOutput, error) {
err := r.Request.Send()
if err != nil {
return nil, err
}
return r.Request.Data.(*PutNotificationChannelOutput), nil
}
// PutNotificationChannelRequest returns a request value for making API operation for
// Firewall Management Service.
//
// Designates the IAM role and Amazon Simple Notification Service (SNS) topic
// that AWS Firewall Manager uses to record SNS logs.
//
// // Example sending a request using the PutNotificationChannelRequest method.
// req := client.PutNotificationChannelRequest(params)
// resp, err := req.Send()
// if err == nil {
// fmt.Println(resp)
// }
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/fms-2018-01-01/PutNotificationChannel
func (c *FMS) PutNotificationChannelRequest(input *PutNotificationChannelInput) PutNotificationChannelRequest {
op := &aws.Operation{
Name: opPutNotificationChannel,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &PutNotificationChannelInput{}
}
output := &PutNotificationChannelOutput{}
req := c.newRequest(op, input, output)
req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler)
req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
output.responseMetadata = aws.Response{Request: req}
return PutNotificationChannelRequest{Request: req, Input: input, Copy: c.PutNotificationChannelRequest}
}
const opPutPolicy = "PutPolicy"
// PutPolicyRequest is a API request type for the PutPolicy API operation.
type PutPolicyRequest struct {
*aws.Request
Input *PutPolicyInput
Copy func(*PutPolicyInput) PutPolicyRequest
}
// Send marshals and sends the PutPolicy API request.
func (r PutPolicyRequest) Send() (*PutPolicyOutput, error) {
err := r.Request.Send()
if err != nil {
return nil, err
}
return r.Request.Data.(*PutPolicyOutput), nil
}
// PutPolicyRequest returns a request value for making API operation for
// Firewall Management Service.
//
// Creates an AWS Firewall Manager policy.
//
// // Example sending a request using the PutPolicyRequest method.
// req := client.PutPolicyRequest(params)
// resp, err := req.Send()
// if err == nil {
// fmt.Println(resp)
// }
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/fms-2018-01-01/PutPolicy
func (c *FMS) PutPolicyRequest(input *PutPolicyInput) PutPolicyRequest {
op := &aws.Operation{
Name: opPutPolicy,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &PutPolicyInput{}
}
output := &PutPolicyOutput{}
req := c.newRequest(op, input, output)
output.responseMetadata = aws.Response{Request: req}
return PutPolicyRequest{Request: req, Input: input, Copy: c.PutPolicyRequest}
}
// Please also see https://docs.aws.amazon.com/goto/WebAPI/fms-2018-01-01/AssociateAdminAccountRequest
type AssociateAdminAccountInput struct {
_ struct{} `type:"structure"`
// The AWS account ID to associate with AWS Firewall Manager as the AWS Firewall
// Manager administrator account. This can be an AWS Organizations master account
// or a member account. For more information about AWS Organizations and master
// accounts, see Managing the AWS Accounts in Your Organization (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts.html).
//
// AdminAccount is a required field
AdminAccount *string `min:"1" type:"string" required:"true"`
}
// String returns the string representation
func (s AssociateAdminAccountInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s AssociateAdminAccountInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *AssociateAdminAccountInput) Validate() error {
invalidParams := aws.ErrInvalidParams{Context: "AssociateAdminAccountInput"}
if s.AdminAccount == nil {
invalidParams.Add(aws.NewErrParamRequired("AdminAccount"))
}
if s.AdminAccount != nil && len(*s.AdminAccount) < 1 {
invalidParams.Add(aws.NewErrParamMinLen("AdminAccount", 1))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// Please also see https://docs.aws.amazon.com/goto/WebAPI/fms-2018-01-01/AssociateAdminAccountOutput
type AssociateAdminAccountOutput struct {
_ struct{} `type:"structure"`
responseMetadata aws.Response
}
// String returns the string representation
func (s AssociateAdminAccountOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s AssociateAdminAccountOutput) GoString() string {
return s.String()
}
// SDKResponseMetdata return sthe response metadata for the API.
func (s AssociateAdminAccountOutput) SDKResponseMetadata() aws.Response {
return s.responseMetadata
}
// Details of the resource that is not protected by the policy.
// Please also see https://docs.aws.amazon.com/goto/WebAPI/fms-2018-01-01/ComplianceViolator
type ComplianceViolator struct {
_ struct{} `type:"structure"`
// The resource ID.
ResourceId *string `min:"1" type:"string"`
// The resource type. This is in the format shown in AWS Resource Types Reference
// (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-template-resource-type-ref.html).
// Valid values are AWS::ElasticLoadBalancingV2::LoadBalancer or AWS::CloudFront::Distribution.
ResourceType *string `min:"1" type:"string"`
// The reason that the resource is not protected by the policy.
ViolationReason ViolationReason `type:"string" enum:"true"`
}
// String returns the string representation
func (s ComplianceViolator) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s ComplianceViolator) GoString() string {
return s.String()
}
// Please also see https://docs.aws.amazon.com/goto/WebAPI/fms-2018-01-01/DeleteNotificationChannelRequest
type DeleteNotificationChannelInput struct {
_ struct{} `type:"structure"`
}
// String returns the string representation
func (s DeleteNotificationChannelInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s DeleteNotificationChannelInput) GoString() string {
return s.String()
}
// Please also see https://docs.aws.amazon.com/goto/WebAPI/fms-2018-01-01/DeleteNotificationChannelOutput
type DeleteNotificationChannelOutput struct {
_ struct{} `type:"structure"`
responseMetadata aws.Response
}
// String returns the string representation
func (s DeleteNotificationChannelOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s DeleteNotificationChannelOutput) GoString() string {
return s.String()
}
// SDKResponseMetdata return sthe response metadata for the API.
func (s DeleteNotificationChannelOutput) SDKResponseMetadata() aws.Response {
return s.responseMetadata
}
// Please also see https://docs.aws.amazon.com/goto/WebAPI/fms-2018-01-01/DeletePolicyRequest
type DeletePolicyInput struct {
_ struct{} `type:"structure"`
// The ID of the policy that you want to delete. PolicyId is returned by PutPolicy
// and by ListPolicies.
//
// PolicyId is a required field
PolicyId *string `min:"36" type:"string" required:"true"`
}
// String returns the string representation
func (s DeletePolicyInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s DeletePolicyInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *DeletePolicyInput) Validate() error {
invalidParams := aws.ErrInvalidParams{Context: "DeletePolicyInput"}
if s.PolicyId == nil {
invalidParams.Add(aws.NewErrParamRequired("PolicyId"))
}
if s.PolicyId != nil && len(*s.PolicyId) < 36 {
invalidParams.Add(aws.NewErrParamMinLen("PolicyId", 36))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// Please also see https://docs.aws.amazon.com/goto/WebAPI/fms-2018-01-01/DeletePolicyOutput
type DeletePolicyOutput struct {
_ struct{} `type:"structure"`
responseMetadata aws.Response
}
// String returns the string representation
func (s DeletePolicyOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s DeletePolicyOutput) GoString() string {
return s.String()
}
// SDKResponseMetdata return sthe response metadata for the API.
func (s DeletePolicyOutput) SDKResponseMetadata() aws.Response {
return s.responseMetadata
}
// Please also see https://docs.aws.amazon.com/goto/WebAPI/fms-2018-01-01/DisassociateAdminAccountRequest
type DisassociateAdminAccountInput struct {
_ struct{} `type:"structure"`
}
// String returns the string representation
func (s DisassociateAdminAccountInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s DisassociateAdminAccountInput) GoString() string {
return s.String()
}
// Please also see https://docs.aws.amazon.com/goto/WebAPI/fms-2018-01-01/DisassociateAdminAccountOutput
type DisassociateAdminAccountOutput struct {
_ struct{} `type:"structure"`
responseMetadata aws.Response
}
// String returns the string representation
func (s DisassociateAdminAccountOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s DisassociateAdminAccountOutput) GoString() string {
return s.String()
}
// SDKResponseMetdata return sthe response metadata for the API.
func (s DisassociateAdminAccountOutput) SDKResponseMetadata() aws.Response {
return s.responseMetadata
}
// Describes the compliance status for the account. An account is considered
// non-compliant if it includes resources that are not protected by the specified
// policy.
// Please also see https://docs.aws.amazon.com/goto/WebAPI/fms-2018-01-01/EvaluationResult
type EvaluationResult struct {
_ struct{} `type:"structure"`
// Describes an AWS account's compliance with the AWS Firewall Manager policy.
ComplianceStatus PolicyComplianceStatusType `type:"string" enum:"true"`
// Indicates that over 100 resources are non-compliant with the AWS Firewall
// Manager policy.
EvaluationLimitExceeded *bool `type:"boolean"`
// Number of resources that are non-compliant with the specified policy. A resource
// is considered non-compliant if it is not associated with the specified policy.
ViolatorCount *int64 `type:"long"`
}
// String returns the string representation
func (s EvaluationResult) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s EvaluationResult) GoString() string {
return s.String()
}
// Please also see https://docs.aws.amazon.com/goto/WebAPI/fms-2018-01-01/GetAdminAccountRequest
type GetAdminAccountInput struct {
_ struct{} `type:"structure"`
}
// String returns the string representation
func (s GetAdminAccountInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s GetAdminAccountInput) GoString() string {
return s.String()
}
// Please also see https://docs.aws.amazon.com/goto/WebAPI/fms-2018-01-01/GetAdminAccountResponse
type GetAdminAccountOutput struct {
_ struct{} `type:"structure"`
responseMetadata aws.Response
// The AWS account that is set as the AWS Firewall Manager administrator.
AdminAccount *string `min:"1" type:"string"`
}
// String returns the string representation
func (s GetAdminAccountOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s GetAdminAccountOutput) GoString() string {
return s.String()
}
// SDKResponseMetdata return sthe response metadata for the API.
func (s GetAdminAccountOutput) SDKResponseMetadata() aws.Response {
return s.responseMetadata
}
// Please also see https://docs.aws.amazon.com/goto/WebAPI/fms-2018-01-01/GetComplianceDetailRequest
type GetComplianceDetailInput struct {
_ struct{} `type:"structure"`
// The AWS account that owns the resources that you want to get the details
// for.
//
// MemberAccount is a required field
MemberAccount *string `min:"1" type:"string" required:"true"`
// The ID of the policy that you want to get the details for. PolicyId is returned
// by PutPolicy and by ListPolicies.
//
// PolicyId is a required field
PolicyId *string `min:"36" type:"string" required:"true"`
}
// String returns the string representation
func (s GetComplianceDetailInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s GetComplianceDetailInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *GetComplianceDetailInput) Validate() error {
invalidParams := aws.ErrInvalidParams{Context: "GetComplianceDetailInput"}
if s.MemberAccount == nil {
invalidParams.Add(aws.NewErrParamRequired("MemberAccount"))
}
if s.MemberAccount != nil && len(*s.MemberAccount) < 1 {
invalidParams.Add(aws.NewErrParamMinLen("MemberAccount", 1))
}
if s.PolicyId == nil {
invalidParams.Add(aws.NewErrParamRequired("PolicyId"))
}
if s.PolicyId != nil && len(*s.PolicyId) < 36 {
invalidParams.Add(aws.NewErrParamMinLen("PolicyId", 36))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// Please also see https://docs.aws.amazon.com/goto/WebAPI/fms-2018-01-01/GetComplianceDetailResponse
type GetComplianceDetailOutput struct {
_ struct{} `type:"structure"`
responseMetadata aws.Response
// Information about the resources and the policy that you specified in the
// GetComplianceDetail request.
PolicyComplianceDetail *PolicyComplianceDetail `type:"structure"`
}
// String returns the string representation
func (s GetComplianceDetailOutput) String() string {
return awsutil.Prettify(s)