/
api.go
8123 lines (7192 loc) · 302 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 securitylake
import (
"fmt"
"time"
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/awsutil"
"github.com/aws/aws-sdk-go/aws/request"
"github.com/aws/aws-sdk-go/private/protocol"
"github.com/aws/aws-sdk-go/private/protocol/restjson"
)
const opCreateAwsLogSource = "CreateAwsLogSource"
// CreateAwsLogSourceRequest generates a "aws/request.Request" representing the
// client's request for the CreateAwsLogSource operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See CreateAwsLogSource for more information on using the CreateAwsLogSource
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
// // Example sending a request using the CreateAwsLogSourceRequest method.
// req, resp := client.CreateAwsLogSourceRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/securitylake-2018-05-10/CreateAwsLogSource
func (c *SecurityLake) CreateAwsLogSourceRequest(input *CreateAwsLogSourceInput) (req *request.Request, output *CreateAwsLogSourceOutput) {
op := &request.Operation{
Name: opCreateAwsLogSource,
HTTPMethod: "POST",
HTTPPath: "/v1/datalake/logsources/aws",
}
if input == nil {
input = &CreateAwsLogSourceInput{}
}
output = &CreateAwsLogSourceOutput{}
req = c.newRequest(op, input, output)
return
}
// CreateAwsLogSource API operation for Amazon Security Lake.
//
// Adds a natively supported Amazon Web Service as an Amazon Security Lake source.
// Enables source types for member accounts in required Amazon Web Services
// Regions, based on the parameters you specify. You can choose any source type
// in any Region for either accounts that are part of a trusted organization
// or standalone accounts. Once you add an Amazon Web Service as a source, Security
// Lake starts collecting logs and events from it,
//
// You can use this API only to enable natively supported Amazon Web Services
// as a source. Use CreateCustomLogSource to enable data collection from a custom
// source.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon Security Lake's
// API operation CreateAwsLogSource for usage and error information.
//
// Returned Error Types:
//
// - BadRequestException
// The request is malformed or contains an error such as an invalid parameter
// value or a missing required parameter.
//
// - ResourceNotFoundException
// The resource could not be found.
//
// - InternalServerException
// Internal service exceptions are sometimes caused by transient issues. Before
// you start troubleshooting, perform the operation again.
//
// - AccessDeniedException
// You do not have sufficient access to perform this action. Access denied errors
// appear when Amazon Security Lake explicitly or implicitly denies an authorization
// request. An explicit denial occurs when a policy contains a Deny statement
// for the specific Amazon Web Services action. An implicit denial occurs when
// there is no applicable Deny statement and also no applicable Allow statement.
//
// - ConflictException
// Occurs when a conflict with a previous successful write is detected. This
// generally occurs when the previous write did not have time to propagate to
// the host serving the current request. A retry (with appropriate backoff logic)
// is the recommended response to this exception.
//
// - ThrottlingException
// The limit on the number of requests per second was exceeded.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/securitylake-2018-05-10/CreateAwsLogSource
func (c *SecurityLake) CreateAwsLogSource(input *CreateAwsLogSourceInput) (*CreateAwsLogSourceOutput, error) {
req, out := c.CreateAwsLogSourceRequest(input)
return out, req.Send()
}
// CreateAwsLogSourceWithContext is the same as CreateAwsLogSource with the addition of
// the ability to pass a context and additional request options.
//
// See CreateAwsLogSource for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *SecurityLake) CreateAwsLogSourceWithContext(ctx aws.Context, input *CreateAwsLogSourceInput, opts ...request.Option) (*CreateAwsLogSourceOutput, error) {
req, out := c.CreateAwsLogSourceRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opCreateCustomLogSource = "CreateCustomLogSource"
// CreateCustomLogSourceRequest generates a "aws/request.Request" representing the
// client's request for the CreateCustomLogSource operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See CreateCustomLogSource for more information on using the CreateCustomLogSource
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
// // Example sending a request using the CreateCustomLogSourceRequest method.
// req, resp := client.CreateCustomLogSourceRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/securitylake-2018-05-10/CreateCustomLogSource
func (c *SecurityLake) CreateCustomLogSourceRequest(input *CreateCustomLogSourceInput) (req *request.Request, output *CreateCustomLogSourceOutput) {
op := &request.Operation{
Name: opCreateCustomLogSource,
HTTPMethod: "POST",
HTTPPath: "/v1/datalake/logsources/custom",
}
if input == nil {
input = &CreateCustomLogSourceInput{}
}
output = &CreateCustomLogSourceOutput{}
req = c.newRequest(op, input, output)
return
}
// CreateCustomLogSource API operation for Amazon Security Lake.
//
// Adds a third-party custom source in Amazon Security Lake, from the Amazon
// Web Services Region where you want to create a custom source. Security Lake
// can collect logs and events from third-party custom sources. After creating
// the appropriate IAM role to invoke Glue crawler, use this API to add a custom
// source name in Security Lake. This operation creates a partition in the Amazon
// S3 bucket for Security Lake as the target location for log files from the
// custom source. In addition, this operation also creates an associated Glue
// table and an Glue crawler.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon Security Lake's
// API operation CreateCustomLogSource for usage and error information.
//
// Returned Error Types:
//
// - BadRequestException
// The request is malformed or contains an error such as an invalid parameter
// value or a missing required parameter.
//
// - ResourceNotFoundException
// The resource could not be found.
//
// - InternalServerException
// Internal service exceptions are sometimes caused by transient issues. Before
// you start troubleshooting, perform the operation again.
//
// - AccessDeniedException
// You do not have sufficient access to perform this action. Access denied errors
// appear when Amazon Security Lake explicitly or implicitly denies an authorization
// request. An explicit denial occurs when a policy contains a Deny statement
// for the specific Amazon Web Services action. An implicit denial occurs when
// there is no applicable Deny statement and also no applicable Allow statement.
//
// - ConflictException
// Occurs when a conflict with a previous successful write is detected. This
// generally occurs when the previous write did not have time to propagate to
// the host serving the current request. A retry (with appropriate backoff logic)
// is the recommended response to this exception.
//
// - ThrottlingException
// The limit on the number of requests per second was exceeded.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/securitylake-2018-05-10/CreateCustomLogSource
func (c *SecurityLake) CreateCustomLogSource(input *CreateCustomLogSourceInput) (*CreateCustomLogSourceOutput, error) {
req, out := c.CreateCustomLogSourceRequest(input)
return out, req.Send()
}
// CreateCustomLogSourceWithContext is the same as CreateCustomLogSource with the addition of
// the ability to pass a context and additional request options.
//
// See CreateCustomLogSource for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *SecurityLake) CreateCustomLogSourceWithContext(ctx aws.Context, input *CreateCustomLogSourceInput, opts ...request.Option) (*CreateCustomLogSourceOutput, error) {
req, out := c.CreateCustomLogSourceRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opCreateDataLake = "CreateDataLake"
// CreateDataLakeRequest generates a "aws/request.Request" representing the
// client's request for the CreateDataLake operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See CreateDataLake for more information on using the CreateDataLake
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
// // Example sending a request using the CreateDataLakeRequest method.
// req, resp := client.CreateDataLakeRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/securitylake-2018-05-10/CreateDataLake
func (c *SecurityLake) CreateDataLakeRequest(input *CreateDataLakeInput) (req *request.Request, output *CreateDataLakeOutput) {
op := &request.Operation{
Name: opCreateDataLake,
HTTPMethod: "POST",
HTTPPath: "/v1/datalake",
}
if input == nil {
input = &CreateDataLakeInput{}
}
output = &CreateDataLakeOutput{}
req = c.newRequest(op, input, output)
return
}
// CreateDataLake API operation for Amazon Security Lake.
//
// Initializes an Amazon Security Lake instance with the provided (or default)
// configuration. You can enable Security Lake in Amazon Web Services Regions
// with customized settings before enabling log collection in Regions. By default,
// the CreateDataLake Security Lake in all Regions. To specify particular Regions,
// configure these Regions using the configurations parameter. If you have already
// enabled Security Lake in a Region when you call this command, the command
// will update the Region if you provide new configuration parameters. If you
// have not already enabled Security Lake in the Region when you call this API,
// it will set up the data lake in the Region with the specified configurations.
//
// When you enable Security Lake, it starts ingesting security data after the
// CreateAwsLogSource call. This includes ingesting security data from sources,
// storing data, and making data accessible to subscribers. Security Lake also
// enables all the existing settings and resources that it stores or maintains
// for your Amazon Web Services account in the current Region, including security
// log and event data. For more information, see the Amazon Security Lake User
// Guide (https://docs.aws.amazon.com/security-lake/latest/userguide/what-is-security-lake.html).
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon Security Lake's
// API operation CreateDataLake for usage and error information.
//
// Returned Error Types:
//
// - BadRequestException
// The request is malformed or contains an error such as an invalid parameter
// value or a missing required parameter.
//
// - ResourceNotFoundException
// The resource could not be found.
//
// - InternalServerException
// Internal service exceptions are sometimes caused by transient issues. Before
// you start troubleshooting, perform the operation again.
//
// - AccessDeniedException
// You do not have sufficient access to perform this action. Access denied errors
// appear when Amazon Security Lake explicitly or implicitly denies an authorization
// request. An explicit denial occurs when a policy contains a Deny statement
// for the specific Amazon Web Services action. An implicit denial occurs when
// there is no applicable Deny statement and also no applicable Allow statement.
//
// - ConflictException
// Occurs when a conflict with a previous successful write is detected. This
// generally occurs when the previous write did not have time to propagate to
// the host serving the current request. A retry (with appropriate backoff logic)
// is the recommended response to this exception.
//
// - ThrottlingException
// The limit on the number of requests per second was exceeded.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/securitylake-2018-05-10/CreateDataLake
func (c *SecurityLake) CreateDataLake(input *CreateDataLakeInput) (*CreateDataLakeOutput, error) {
req, out := c.CreateDataLakeRequest(input)
return out, req.Send()
}
// CreateDataLakeWithContext is the same as CreateDataLake with the addition of
// the ability to pass a context and additional request options.
//
// See CreateDataLake for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *SecurityLake) CreateDataLakeWithContext(ctx aws.Context, input *CreateDataLakeInput, opts ...request.Option) (*CreateDataLakeOutput, error) {
req, out := c.CreateDataLakeRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opCreateDataLakeExceptionSubscription = "CreateDataLakeExceptionSubscription"
// CreateDataLakeExceptionSubscriptionRequest generates a "aws/request.Request" representing the
// client's request for the CreateDataLakeExceptionSubscription operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See CreateDataLakeExceptionSubscription for more information on using the CreateDataLakeExceptionSubscription
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
// // Example sending a request using the CreateDataLakeExceptionSubscriptionRequest method.
// req, resp := client.CreateDataLakeExceptionSubscriptionRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/securitylake-2018-05-10/CreateDataLakeExceptionSubscription
func (c *SecurityLake) CreateDataLakeExceptionSubscriptionRequest(input *CreateDataLakeExceptionSubscriptionInput) (req *request.Request, output *CreateDataLakeExceptionSubscriptionOutput) {
op := &request.Operation{
Name: opCreateDataLakeExceptionSubscription,
HTTPMethod: "POST",
HTTPPath: "/v1/datalake/exceptions/subscription",
}
if input == nil {
input = &CreateDataLakeExceptionSubscriptionInput{}
}
output = &CreateDataLakeExceptionSubscriptionOutput{}
req = c.newRequest(op, input, output)
req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
return
}
// CreateDataLakeExceptionSubscription API operation for Amazon Security Lake.
//
// Creates the specified notification subscription in Amazon Security Lake for
// the organization you specify.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon Security Lake's
// API operation CreateDataLakeExceptionSubscription for usage and error information.
//
// Returned Error Types:
//
// - BadRequestException
// The request is malformed or contains an error such as an invalid parameter
// value or a missing required parameter.
//
// - ResourceNotFoundException
// The resource could not be found.
//
// - InternalServerException
// Internal service exceptions are sometimes caused by transient issues. Before
// you start troubleshooting, perform the operation again.
//
// - AccessDeniedException
// You do not have sufficient access to perform this action. Access denied errors
// appear when Amazon Security Lake explicitly or implicitly denies an authorization
// request. An explicit denial occurs when a policy contains a Deny statement
// for the specific Amazon Web Services action. An implicit denial occurs when
// there is no applicable Deny statement and also no applicable Allow statement.
//
// - ConflictException
// Occurs when a conflict with a previous successful write is detected. This
// generally occurs when the previous write did not have time to propagate to
// the host serving the current request. A retry (with appropriate backoff logic)
// is the recommended response to this exception.
//
// - ThrottlingException
// The limit on the number of requests per second was exceeded.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/securitylake-2018-05-10/CreateDataLakeExceptionSubscription
func (c *SecurityLake) CreateDataLakeExceptionSubscription(input *CreateDataLakeExceptionSubscriptionInput) (*CreateDataLakeExceptionSubscriptionOutput, error) {
req, out := c.CreateDataLakeExceptionSubscriptionRequest(input)
return out, req.Send()
}
// CreateDataLakeExceptionSubscriptionWithContext is the same as CreateDataLakeExceptionSubscription with the addition of
// the ability to pass a context and additional request options.
//
// See CreateDataLakeExceptionSubscription for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *SecurityLake) CreateDataLakeExceptionSubscriptionWithContext(ctx aws.Context, input *CreateDataLakeExceptionSubscriptionInput, opts ...request.Option) (*CreateDataLakeExceptionSubscriptionOutput, error) {
req, out := c.CreateDataLakeExceptionSubscriptionRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opCreateDataLakeOrganizationConfiguration = "CreateDataLakeOrganizationConfiguration"
// CreateDataLakeOrganizationConfigurationRequest generates a "aws/request.Request" representing the
// client's request for the CreateDataLakeOrganizationConfiguration operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See CreateDataLakeOrganizationConfiguration for more information on using the CreateDataLakeOrganizationConfiguration
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
// // Example sending a request using the CreateDataLakeOrganizationConfigurationRequest method.
// req, resp := client.CreateDataLakeOrganizationConfigurationRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/securitylake-2018-05-10/CreateDataLakeOrganizationConfiguration
func (c *SecurityLake) CreateDataLakeOrganizationConfigurationRequest(input *CreateDataLakeOrganizationConfigurationInput) (req *request.Request, output *CreateDataLakeOrganizationConfigurationOutput) {
op := &request.Operation{
Name: opCreateDataLakeOrganizationConfiguration,
HTTPMethod: "POST",
HTTPPath: "/v1/datalake/organization/configuration",
}
if input == nil {
input = &CreateDataLakeOrganizationConfigurationInput{}
}
output = &CreateDataLakeOrganizationConfigurationOutput{}
req = c.newRequest(op, input, output)
req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
return
}
// CreateDataLakeOrganizationConfiguration API operation for Amazon Security Lake.
//
// Automatically enables Amazon Security Lake for new member accounts in your
// organization. Security Lake is not automatically enabled for any existing
// member accounts in your organization.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon Security Lake's
// API operation CreateDataLakeOrganizationConfiguration for usage and error information.
//
// Returned Error Types:
//
// - BadRequestException
// The request is malformed or contains an error such as an invalid parameter
// value or a missing required parameter.
//
// - ResourceNotFoundException
// The resource could not be found.
//
// - InternalServerException
// Internal service exceptions are sometimes caused by transient issues. Before
// you start troubleshooting, perform the operation again.
//
// - AccessDeniedException
// You do not have sufficient access to perform this action. Access denied errors
// appear when Amazon Security Lake explicitly or implicitly denies an authorization
// request. An explicit denial occurs when a policy contains a Deny statement
// for the specific Amazon Web Services action. An implicit denial occurs when
// there is no applicable Deny statement and also no applicable Allow statement.
//
// - ConflictException
// Occurs when a conflict with a previous successful write is detected. This
// generally occurs when the previous write did not have time to propagate to
// the host serving the current request. A retry (with appropriate backoff logic)
// is the recommended response to this exception.
//
// - ThrottlingException
// The limit on the number of requests per second was exceeded.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/securitylake-2018-05-10/CreateDataLakeOrganizationConfiguration
func (c *SecurityLake) CreateDataLakeOrganizationConfiguration(input *CreateDataLakeOrganizationConfigurationInput) (*CreateDataLakeOrganizationConfigurationOutput, error) {
req, out := c.CreateDataLakeOrganizationConfigurationRequest(input)
return out, req.Send()
}
// CreateDataLakeOrganizationConfigurationWithContext is the same as CreateDataLakeOrganizationConfiguration with the addition of
// the ability to pass a context and additional request options.
//
// See CreateDataLakeOrganizationConfiguration for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *SecurityLake) CreateDataLakeOrganizationConfigurationWithContext(ctx aws.Context, input *CreateDataLakeOrganizationConfigurationInput, opts ...request.Option) (*CreateDataLakeOrganizationConfigurationOutput, error) {
req, out := c.CreateDataLakeOrganizationConfigurationRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opCreateSubscriber = "CreateSubscriber"
// CreateSubscriberRequest generates a "aws/request.Request" representing the
// client's request for the CreateSubscriber operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See CreateSubscriber for more information on using the CreateSubscriber
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
// // Example sending a request using the CreateSubscriberRequest method.
// req, resp := client.CreateSubscriberRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/securitylake-2018-05-10/CreateSubscriber
func (c *SecurityLake) CreateSubscriberRequest(input *CreateSubscriberInput) (req *request.Request, output *CreateSubscriberOutput) {
op := &request.Operation{
Name: opCreateSubscriber,
HTTPMethod: "POST",
HTTPPath: "/v1/subscribers",
}
if input == nil {
input = &CreateSubscriberInput{}
}
output = &CreateSubscriberOutput{}
req = c.newRequest(op, input, output)
return
}
// CreateSubscriber API operation for Amazon Security Lake.
//
// Creates a subscription permission for accounts that are already enabled in
// Amazon Security Lake. You can create a subscriber with access to data in
// the current Amazon Web Services Region.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon Security Lake's
// API operation CreateSubscriber for usage and error information.
//
// Returned Error Types:
//
// - BadRequestException
// The request is malformed or contains an error such as an invalid parameter
// value or a missing required parameter.
//
// - ResourceNotFoundException
// The resource could not be found.
//
// - InternalServerException
// Internal service exceptions are sometimes caused by transient issues. Before
// you start troubleshooting, perform the operation again.
//
// - AccessDeniedException
// You do not have sufficient access to perform this action. Access denied errors
// appear when Amazon Security Lake explicitly or implicitly denies an authorization
// request. An explicit denial occurs when a policy contains a Deny statement
// for the specific Amazon Web Services action. An implicit denial occurs when
// there is no applicable Deny statement and also no applicable Allow statement.
//
// - ConflictException
// Occurs when a conflict with a previous successful write is detected. This
// generally occurs when the previous write did not have time to propagate to
// the host serving the current request. A retry (with appropriate backoff logic)
// is the recommended response to this exception.
//
// - ThrottlingException
// The limit on the number of requests per second was exceeded.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/securitylake-2018-05-10/CreateSubscriber
func (c *SecurityLake) CreateSubscriber(input *CreateSubscriberInput) (*CreateSubscriberOutput, error) {
req, out := c.CreateSubscriberRequest(input)
return out, req.Send()
}
// CreateSubscriberWithContext is the same as CreateSubscriber with the addition of
// the ability to pass a context and additional request options.
//
// See CreateSubscriber for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *SecurityLake) CreateSubscriberWithContext(ctx aws.Context, input *CreateSubscriberInput, opts ...request.Option) (*CreateSubscriberOutput, error) {
req, out := c.CreateSubscriberRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opCreateSubscriberNotification = "CreateSubscriberNotification"
// CreateSubscriberNotificationRequest generates a "aws/request.Request" representing the
// client's request for the CreateSubscriberNotification operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See CreateSubscriberNotification for more information on using the CreateSubscriberNotification
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
// // Example sending a request using the CreateSubscriberNotificationRequest method.
// req, resp := client.CreateSubscriberNotificationRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/securitylake-2018-05-10/CreateSubscriberNotification
func (c *SecurityLake) CreateSubscriberNotificationRequest(input *CreateSubscriberNotificationInput) (req *request.Request, output *CreateSubscriberNotificationOutput) {
op := &request.Operation{
Name: opCreateSubscriberNotification,
HTTPMethod: "POST",
HTTPPath: "/v1/subscribers/{subscriberId}/notification",
}
if input == nil {
input = &CreateSubscriberNotificationInput{}
}
output = &CreateSubscriberNotificationOutput{}
req = c.newRequest(op, input, output)
return
}
// CreateSubscriberNotification API operation for Amazon Security Lake.
//
// Notifies the subscriber when new data is written to the data lake for the
// sources that the subscriber consumes in Security Lake. You can create only
// one subscriber notification per subscriber.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon Security Lake's
// API operation CreateSubscriberNotification for usage and error information.
//
// Returned Error Types:
//
// - BadRequestException
// The request is malformed or contains an error such as an invalid parameter
// value or a missing required parameter.
//
// - ResourceNotFoundException
// The resource could not be found.
//
// - InternalServerException
// Internal service exceptions are sometimes caused by transient issues. Before
// you start troubleshooting, perform the operation again.
//
// - AccessDeniedException
// You do not have sufficient access to perform this action. Access denied errors
// appear when Amazon Security Lake explicitly or implicitly denies an authorization
// request. An explicit denial occurs when a policy contains a Deny statement
// for the specific Amazon Web Services action. An implicit denial occurs when
// there is no applicable Deny statement and also no applicable Allow statement.
//
// - ConflictException
// Occurs when a conflict with a previous successful write is detected. This
// generally occurs when the previous write did not have time to propagate to
// the host serving the current request. A retry (with appropriate backoff logic)
// is the recommended response to this exception.
//
// - ThrottlingException
// The limit on the number of requests per second was exceeded.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/securitylake-2018-05-10/CreateSubscriberNotification
func (c *SecurityLake) CreateSubscriberNotification(input *CreateSubscriberNotificationInput) (*CreateSubscriberNotificationOutput, error) {
req, out := c.CreateSubscriberNotificationRequest(input)
return out, req.Send()
}
// CreateSubscriberNotificationWithContext is the same as CreateSubscriberNotification with the addition of
// the ability to pass a context and additional request options.
//
// See CreateSubscriberNotification for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *SecurityLake) CreateSubscriberNotificationWithContext(ctx aws.Context, input *CreateSubscriberNotificationInput, opts ...request.Option) (*CreateSubscriberNotificationOutput, error) {
req, out := c.CreateSubscriberNotificationRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opDeleteAwsLogSource = "DeleteAwsLogSource"
// DeleteAwsLogSourceRequest generates a "aws/request.Request" representing the
// client's request for the DeleteAwsLogSource operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See DeleteAwsLogSource for more information on using the DeleteAwsLogSource
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
// // Example sending a request using the DeleteAwsLogSourceRequest method.
// req, resp := client.DeleteAwsLogSourceRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/securitylake-2018-05-10/DeleteAwsLogSource
func (c *SecurityLake) DeleteAwsLogSourceRequest(input *DeleteAwsLogSourceInput) (req *request.Request, output *DeleteAwsLogSourceOutput) {
op := &request.Operation{
Name: opDeleteAwsLogSource,
HTTPMethod: "POST",
HTTPPath: "/v1/datalake/logsources/aws/delete",
}
if input == nil {
input = &DeleteAwsLogSourceInput{}
}
output = &DeleteAwsLogSourceOutput{}
req = c.newRequest(op, input, output)
return
}
// DeleteAwsLogSource API operation for Amazon Security Lake.
//
// Removes a natively supported Amazon Web Service as an Amazon Security Lake
// source. You can remove a source for one or more Regions. When you remove
// the source, Security Lake stops collecting data from that source in the specified
// Regions and accounts, and subscribers can no longer consume new data from
// the source. However, subscribers can still consume data that Security Lake
// collected from the source before removal.
//
// You can choose any source type in any Amazon Web Services Region for either
// accounts that are part of a trusted organization or standalone accounts.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon Security Lake's
// API operation DeleteAwsLogSource for usage and error information.
//
// Returned Error Types:
//
// - BadRequestException
// The request is malformed or contains an error such as an invalid parameter
// value or a missing required parameter.
//
// - ResourceNotFoundException
// The resource could not be found.
//
// - InternalServerException
// Internal service exceptions are sometimes caused by transient issues. Before
// you start troubleshooting, perform the operation again.
//
// - AccessDeniedException
// You do not have sufficient access to perform this action. Access denied errors
// appear when Amazon Security Lake explicitly or implicitly denies an authorization
// request. An explicit denial occurs when a policy contains a Deny statement
// for the specific Amazon Web Services action. An implicit denial occurs when
// there is no applicable Deny statement and also no applicable Allow statement.
//
// - ConflictException
// Occurs when a conflict with a previous successful write is detected. This
// generally occurs when the previous write did not have time to propagate to
// the host serving the current request. A retry (with appropriate backoff logic)
// is the recommended response to this exception.
//
// - ThrottlingException
// The limit on the number of requests per second was exceeded.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/securitylake-2018-05-10/DeleteAwsLogSource
func (c *SecurityLake) DeleteAwsLogSource(input *DeleteAwsLogSourceInput) (*DeleteAwsLogSourceOutput, error) {
req, out := c.DeleteAwsLogSourceRequest(input)
return out, req.Send()
}
// DeleteAwsLogSourceWithContext is the same as DeleteAwsLogSource with the addition of
// the ability to pass a context and additional request options.
//
// See DeleteAwsLogSource for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *SecurityLake) DeleteAwsLogSourceWithContext(ctx aws.Context, input *DeleteAwsLogSourceInput, opts ...request.Option) (*DeleteAwsLogSourceOutput, error) {
req, out := c.DeleteAwsLogSourceRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opDeleteCustomLogSource = "DeleteCustomLogSource"
// DeleteCustomLogSourceRequest generates a "aws/request.Request" representing the
// client's request for the DeleteCustomLogSource operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See DeleteCustomLogSource for more information on using the DeleteCustomLogSource
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
// // Example sending a request using the DeleteCustomLogSourceRequest method.
// req, resp := client.DeleteCustomLogSourceRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/securitylake-2018-05-10/DeleteCustomLogSource
func (c *SecurityLake) DeleteCustomLogSourceRequest(input *DeleteCustomLogSourceInput) (req *request.Request, output *DeleteCustomLogSourceOutput) {
op := &request.Operation{
Name: opDeleteCustomLogSource,
HTTPMethod: "DELETE",
HTTPPath: "/v1/datalake/logsources/custom/{sourceName}",
}
if input == nil {
input = &DeleteCustomLogSourceInput{}
}
output = &DeleteCustomLogSourceOutput{}
req = c.newRequest(op, input, output)
req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
return
}
// DeleteCustomLogSource API operation for Amazon Security Lake.
//
// Removes a custom log source from Amazon Security Lake, to stop sending data
// from the custom source to Security Lake.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon Security Lake's
// API operation DeleteCustomLogSource for usage and error information.
//
// Returned Error Types:
//
// - BadRequestException
// The request is malformed or contains an error such as an invalid parameter
// value or a missing required parameter.
//
// - ResourceNotFoundException
// The resource could not be found.
//
// - InternalServerException
// Internal service exceptions are sometimes caused by transient issues. Before
// you start troubleshooting, perform the operation again.
//
// - AccessDeniedException
// You do not have sufficient access to perform this action. Access denied errors
// appear when Amazon Security Lake explicitly or implicitly denies an authorization
// request. An explicit denial occurs when a policy contains a Deny statement
// for the specific Amazon Web Services action. An implicit denial occurs when
// there is no applicable Deny statement and also no applicable Allow statement.
//
// - ConflictException
// Occurs when a conflict with a previous successful write is detected. This
// generally occurs when the previous write did not have time to propagate to
// the host serving the current request. A retry (with appropriate backoff logic)
// is the recommended response to this exception.
//
// - ThrottlingException
// The limit on the number of requests per second was exceeded.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/securitylake-2018-05-10/DeleteCustomLogSource
func (c *SecurityLake) DeleteCustomLogSource(input *DeleteCustomLogSourceInput) (*DeleteCustomLogSourceOutput, error) {
req, out := c.DeleteCustomLogSourceRequest(input)
return out, req.Send()
}
// DeleteCustomLogSourceWithContext is the same as DeleteCustomLogSource with the addition of
// the ability to pass a context and additional request options.
//
// See DeleteCustomLogSource for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *SecurityLake) DeleteCustomLogSourceWithContext(ctx aws.Context, input *DeleteCustomLogSourceInput, opts ...request.Option) (*DeleteCustomLogSourceOutput, error) {
req, out := c.DeleteCustomLogSourceRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opDeleteDataLake = "DeleteDataLake"
// DeleteDataLakeRequest generates a "aws/request.Request" representing the
// client's request for the DeleteDataLake operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//