/
api.go
10431 lines (9050 loc) · 362 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 s3control
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/internal/s3shared/arn"
"github.com/aws/aws-sdk-go/private/checksum"
"github.com/aws/aws-sdk-go/private/protocol"
"github.com/aws/aws-sdk-go/private/protocol/restxml"
)
const opCreateAccessPoint = "CreateAccessPoint"
// CreateAccessPointRequest generates a "aws/request.Request" representing the
// client's request for the CreateAccessPoint 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 CreateAccessPoint for more information on using the CreateAccessPoint
// 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 CreateAccessPointRequest method.
// req, resp := client.CreateAccessPointRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/s3control-2018-08-20/CreateAccessPoint
func (c *S3Control) CreateAccessPointRequest(input *CreateAccessPointInput) (req *request.Request, output *CreateAccessPointOutput) {
op := &request.Operation{
Name: opCreateAccessPoint,
HTTPMethod: "PUT",
HTTPPath: "/v20180820/accesspoint/{name}",
}
if input == nil {
input = &CreateAccessPointInput{}
}
output = &CreateAccessPointOutput{}
req = c.newRequest(op, input, output)
// update account id or check if provided input for account id member matches
// the account id present in ARN
req.Handlers.Validate.PushFrontNamed(updateAccountIDWithARNHandler)
req.Handlers.Build.PushBackNamed(protocol.NewHostPrefixHandler("{AccountId}.", input.hostLabels))
req.Handlers.Build.PushBackNamed(protocol.ValidateEndpointHostHandler)
return
}
// CreateAccessPoint API operation for AWS S3 Control.
//
// Creates an access point and associates it with the specified bucket. For
// more information, see Managing Data Access with Amazon S3 Access Points (https://docs.aws.amazon.com/AmazonS3/latest/dev/access-points.html)
// in the Amazon Simple Storage Service Developer Guide.
//
// Using this action with Amazon S3 on Outposts
//
// This action:
//
// * Requires a virtual private cloud (VPC) configuration as S3 on Outposts
// only supports VPC style access points.
//
// * Does not support ACL on S3 on Outposts buckets.
//
// * Does not support Public Access on S3 on Outposts buckets.
//
// * Does not support object lock for S3 on Outposts buckets.
//
// For more information, see Using Amazon S3 on Outposts (AmazonS3/latest/dev/S3onOutposts.html)
// in the Amazon Simple Storage Service Developer Guide .
//
// All Amazon S3 on Outposts REST API requests for this action require an additional
// parameter of outpost-id to be passed with the request and an S3 on Outposts
// endpoint hostname prefix instead of s3-control. For an example of the request
// syntax for Amazon S3 on Outposts that uses the S3 on Outposts endpoint hostname
// prefix and the outpost-id derived using the access point ARN, see the Example
// (https://docs.aws.amazon.com/AmazonS3/latest/API/API__control_CreateAccessPoint.html#API_control_CreateAccessPoint_Examples)
// section below.
//
// The following actions are related to CreateAccessPoint:
//
// * GetAccessPoint (https://docs.aws.amazon.com/AmazonS3/latest/API/API_control_GetAccessPoint.html)
//
// * DeleteAccessPoint (https://docs.aws.amazon.com/AmazonS3/latest/API/API__control_DeleteAccessPoint.html)
//
// * ListAccessPoints (https://docs.aws.amazon.com/AmazonS3/latest/API/API__control_ListAccessPoints.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 AWS S3 Control's
// API operation CreateAccessPoint for usage and error information.
// See also, https://docs.aws.amazon.com/goto/WebAPI/s3control-2018-08-20/CreateAccessPoint
func (c *S3Control) CreateAccessPoint(input *CreateAccessPointInput) (*CreateAccessPointOutput, error) {
req, out := c.CreateAccessPointRequest(input)
return out, req.Send()
}
// CreateAccessPointWithContext is the same as CreateAccessPoint with the addition of
// the ability to pass a context and additional request options.
//
// See CreateAccessPoint 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 *S3Control) CreateAccessPointWithContext(ctx aws.Context, input *CreateAccessPointInput, opts ...request.Option) (*CreateAccessPointOutput, error) {
req, out := c.CreateAccessPointRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opCreateBucket = "CreateBucket"
// CreateBucketRequest generates a "aws/request.Request" representing the
// client's request for the CreateBucket 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 CreateBucket for more information on using the CreateBucket
// 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 CreateBucketRequest method.
// req, resp := client.CreateBucketRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/s3control-2018-08-20/CreateBucket
func (c *S3Control) CreateBucketRequest(input *CreateBucketInput) (req *request.Request, output *CreateBucketOutput) {
op := &request.Operation{
Name: opCreateBucket,
HTTPMethod: "PUT",
HTTPPath: "/v20180820/bucket/{name}",
}
if input == nil {
input = &CreateBucketInput{}
}
output = &CreateBucketOutput{}
req = c.newRequest(op, input, output)
req.Handlers.Build.PushBackNamed(request.NamedHandler{
Name: "contentMd5Handler",
Fn: checksum.AddBodyContentMD5Handler,
})
return
}
// CreateBucket API operation for AWS S3 Control.
//
//
// This API operation creates an Amazon S3 on Outposts bucket. To create an
// S3 bucket, see Create Bucket (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateBucket.html)
// in the Amazon Simple Storage Service API.
//
// Creates a new Outposts bucket. By creating the bucket, you become the bucket
// owner. To create an Outposts bucket, you must have S3 on Outposts. For more
// information, see Using Amazon S3 on Outposts (https://docs.aws.amazon.com/AmazonS3/latest/dev/S3onOutposts.html)
// in Amazon Simple Storage Service Developer Guide.
//
// Not every string is an acceptable bucket name. For information on bucket
// naming restrictions, see Working with Amazon S3 Buckets (https://docs.aws.amazon.com/AmazonS3/latest/dev/BucketRestrictions.html#bucketnamingrules).
//
// S3 on Outposts buckets do not support
//
// * ACLs. Instead, configure access point policies to manage access to buckets.
//
// * Public access.
//
// * Object Lock
//
// * Bucket Location constraint
//
// For an example of the request syntax for Amazon S3 on Outposts that uses
// the S3 on Outposts endpoint hostname prefix and outpost-id in your API request,
// see the Example (https://docs.aws.amazon.com/AmazonS3/latest/API/API__control_CreateBucket.html#API_control_CreateBucket_Examples)
// section below.
//
// The following actions are related to CreateBucket for Amazon S3 on Outposts:
//
// * PutObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObject.html)
//
// * GetBucket (https://docs.aws.amazon.com/AmazonS3/latest/API/API__control_GetBucket.html)
//
// * DeleteBucket (https://docs.aws.amazon.com/AmazonS3/latest/API/API__control_DeleteBucket.html)
//
// * CreateAccessPoint (https://docs.aws.amazon.com/AmazonS3/latest/API/API__control_CreateAccessPoint.html)
//
// * PutAccessPointPolicy (https://docs.aws.amazon.com/AmazonS3/latest/API/API__control_PutAccessPointPolicy.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 AWS S3 Control's
// API operation CreateBucket for usage and error information.
//
// Returned Error Codes:
// * ErrCodeBucketAlreadyExists "BucketAlreadyExists"
// The requested Outposts bucket name is not available. The bucket namespace
// is shared by all users of the AWS Outposts in this Region. Select a different
// name and try again.
//
// * ErrCodeBucketAlreadyOwnedByYou "BucketAlreadyOwnedByYou"
// The Outposts bucket you tried to create already exists, and you own it.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/s3control-2018-08-20/CreateBucket
func (c *S3Control) CreateBucket(input *CreateBucketInput) (*CreateBucketOutput, error) {
req, out := c.CreateBucketRequest(input)
return out, req.Send()
}
// CreateBucketWithContext is the same as CreateBucket with the addition of
// the ability to pass a context and additional request options.
//
// See CreateBucket 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 *S3Control) CreateBucketWithContext(ctx aws.Context, input *CreateBucketInput, opts ...request.Option) (*CreateBucketOutput, error) {
req, out := c.CreateBucketRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opCreateJob = "CreateJob"
// CreateJobRequest generates a "aws/request.Request" representing the
// client's request for the CreateJob 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 CreateJob for more information on using the CreateJob
// 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 CreateJobRequest method.
// req, resp := client.CreateJobRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/s3control-2018-08-20/CreateJob
func (c *S3Control) CreateJobRequest(input *CreateJobInput) (req *request.Request, output *CreateJobOutput) {
op := &request.Operation{
Name: opCreateJob,
HTTPMethod: "POST",
HTTPPath: "/v20180820/jobs",
}
if input == nil {
input = &CreateJobInput{}
}
output = &CreateJobOutput{}
req = c.newRequest(op, input, output)
req.Handlers.Build.PushBackNamed(protocol.NewHostPrefixHandler("{AccountId}.", input.hostLabels))
req.Handlers.Build.PushBackNamed(protocol.ValidateEndpointHostHandler)
return
}
// CreateJob API operation for AWS S3 Control.
//
// S3 Batch Operations performs large-scale Batch Operations on Amazon S3 objects.
// Batch Operations can run a single operation or action on lists of Amazon
// S3 objects that you specify. For more information, see S3 Batch Operations
// (https://docs.aws.amazon.com/AmazonS3/latest/dev/batch-ops-basics.html) in
// the Amazon Simple Storage Service Developer Guide.
//
// This operation creates a S3 Batch Operations job.
//
// Related actions include:
//
// * DescribeJob (https://docs.aws.amazon.com/AmazonS3/latest/API/API_control_DescribeJob.html)
//
// * ListJobs (https://docs.aws.amazon.com/AmazonS3/latest/API/API_control_ListJobs.html)
//
// * UpdateJobPriority (https://docs.aws.amazon.com/AmazonS3/latest/API/API_control_UpdateJobPriority.html)
//
// * UpdateJobStatus (https://docs.aws.amazon.com/AmazonS3/latest/API/API_control_UpdateJobStatus.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 AWS S3 Control's
// API operation CreateJob for usage and error information.
//
// Returned Error Codes:
// * ErrCodeTooManyRequestsException "TooManyRequestsException"
//
// * ErrCodeBadRequestException "BadRequestException"
//
// * ErrCodeIdempotencyException "IdempotencyException"
//
// * ErrCodeInternalServiceException "InternalServiceException"
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/s3control-2018-08-20/CreateJob
func (c *S3Control) CreateJob(input *CreateJobInput) (*CreateJobOutput, error) {
req, out := c.CreateJobRequest(input)
return out, req.Send()
}
// CreateJobWithContext is the same as CreateJob with the addition of
// the ability to pass a context and additional request options.
//
// See CreateJob 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 *S3Control) CreateJobWithContext(ctx aws.Context, input *CreateJobInput, opts ...request.Option) (*CreateJobOutput, error) {
req, out := c.CreateJobRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opDeleteAccessPoint = "DeleteAccessPoint"
// DeleteAccessPointRequest generates a "aws/request.Request" representing the
// client's request for the DeleteAccessPoint 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 DeleteAccessPoint for more information on using the DeleteAccessPoint
// 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 DeleteAccessPointRequest method.
// req, resp := client.DeleteAccessPointRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/s3control-2018-08-20/DeleteAccessPoint
func (c *S3Control) DeleteAccessPointRequest(input *DeleteAccessPointInput) (req *request.Request, output *DeleteAccessPointOutput) {
op := &request.Operation{
Name: opDeleteAccessPoint,
HTTPMethod: "DELETE",
HTTPPath: "/v20180820/accesspoint/{name}",
}
if input == nil {
input = &DeleteAccessPointInput{}
}
output = &DeleteAccessPointOutput{}
req = c.newRequest(op, input, output)
// update account id or check if provided input for account id member matches
// the account id present in ARN
req.Handlers.Validate.PushFrontNamed(updateAccountIDWithARNHandler)
req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
req.Handlers.Build.PushBackNamed(protocol.NewHostPrefixHandler("{AccountId}.", input.hostLabels))
req.Handlers.Build.PushBackNamed(protocol.ValidateEndpointHostHandler)
return
}
// DeleteAccessPoint API operation for AWS S3 Control.
//
// Deletes the specified access point.
//
// All Amazon S3 on Outposts REST API requests for this action require an additional
// parameter of outpost-id to be passed with the request and an S3 on Outposts
// endpoint hostname prefix instead of s3-control. For an example of the request
// syntax for Amazon S3 on Outposts that uses the S3 on Outposts endpoint hostname
// prefix and the outpost-id derived using the access point ARN, see the ARN,
// see the Example (https://docs.aws.amazon.com/AmazonS3/latest/API/API__control_DeleteAccessPoint.html#API_control_DeleteAccessPoint_Examples)
// section below.
//
// The following actions are related to DeleteAccessPoint:
//
// * CreateAccessPoint (https://docs.aws.amazon.com/AmazonS3/latest/API/API_control_CreateAccessPoint.html)
//
// * GetAccessPoint (https://docs.aws.amazon.com/AmazonS3/latest/API/API_control_GetAccessPoint.html)
//
// * ListAccessPoints (https://docs.aws.amazon.com/AmazonS3/latest/API/API_control_ListAccessPoints.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 AWS S3 Control's
// API operation DeleteAccessPoint for usage and error information.
// See also, https://docs.aws.amazon.com/goto/WebAPI/s3control-2018-08-20/DeleteAccessPoint
func (c *S3Control) DeleteAccessPoint(input *DeleteAccessPointInput) (*DeleteAccessPointOutput, error) {
req, out := c.DeleteAccessPointRequest(input)
return out, req.Send()
}
// DeleteAccessPointWithContext is the same as DeleteAccessPoint with the addition of
// the ability to pass a context and additional request options.
//
// See DeleteAccessPoint 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 *S3Control) DeleteAccessPointWithContext(ctx aws.Context, input *DeleteAccessPointInput, opts ...request.Option) (*DeleteAccessPointOutput, error) {
req, out := c.DeleteAccessPointRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opDeleteAccessPointPolicy = "DeleteAccessPointPolicy"
// DeleteAccessPointPolicyRequest generates a "aws/request.Request" representing the
// client's request for the DeleteAccessPointPolicy 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 DeleteAccessPointPolicy for more information on using the DeleteAccessPointPolicy
// 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 DeleteAccessPointPolicyRequest method.
// req, resp := client.DeleteAccessPointPolicyRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/s3control-2018-08-20/DeleteAccessPointPolicy
func (c *S3Control) DeleteAccessPointPolicyRequest(input *DeleteAccessPointPolicyInput) (req *request.Request, output *DeleteAccessPointPolicyOutput) {
op := &request.Operation{
Name: opDeleteAccessPointPolicy,
HTTPMethod: "DELETE",
HTTPPath: "/v20180820/accesspoint/{name}/policy",
}
if input == nil {
input = &DeleteAccessPointPolicyInput{}
}
output = &DeleteAccessPointPolicyOutput{}
req = c.newRequest(op, input, output)
req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
req.Handlers.Build.PushBackNamed(protocol.NewHostPrefixHandler("{AccountId}.", input.hostLabels))
req.Handlers.Build.PushBackNamed(protocol.ValidateEndpointHostHandler)
return
}
// DeleteAccessPointPolicy API operation for AWS S3 Control.
//
// Deletes the access point policy for the specified access point.
//
// All Amazon S3 on Outposts REST API requests for this action require an additional
// parameter of outpost-id to be passed with the request and an S3 on Outposts
// endpoint hostname prefix instead of s3-control. For an example of the request
// syntax for Amazon S3 on Outposts that uses the S3 on Outposts endpoint hostname
// prefix and the outpost-id derived using the access point ARN, see the Example
// (https://docs.aws.amazon.com/AmazonS3/latest/API/API__control_DeleteAccessPointPolicy.html#API_control_DeleteAccessPointPolicy_Examples)
// section below.
//
// The following actions are related to DeleteAccessPointPolicy:
//
// * PutAccessPointPolicy (https://docs.aws.amazon.com/AmazonS3/latest/API/API_control_PutAccessPointPolicy.html)
//
// * GetAccessPointPolicy (https://docs.aws.amazon.com/AmazonS3/latest/API/API_control_GetAccessPointPolicy.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 AWS S3 Control's
// API operation DeleteAccessPointPolicy for usage and error information.
// See also, https://docs.aws.amazon.com/goto/WebAPI/s3control-2018-08-20/DeleteAccessPointPolicy
func (c *S3Control) DeleteAccessPointPolicy(input *DeleteAccessPointPolicyInput) (*DeleteAccessPointPolicyOutput, error) {
req, out := c.DeleteAccessPointPolicyRequest(input)
return out, req.Send()
}
// DeleteAccessPointPolicyWithContext is the same as DeleteAccessPointPolicy with the addition of
// the ability to pass a context and additional request options.
//
// See DeleteAccessPointPolicy 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 *S3Control) DeleteAccessPointPolicyWithContext(ctx aws.Context, input *DeleteAccessPointPolicyInput, opts ...request.Option) (*DeleteAccessPointPolicyOutput, error) {
req, out := c.DeleteAccessPointPolicyRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opDeleteBucket = "DeleteBucket"
// DeleteBucketRequest generates a "aws/request.Request" representing the
// client's request for the DeleteBucket 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 DeleteBucket for more information on using the DeleteBucket
// 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 DeleteBucketRequest method.
// req, resp := client.DeleteBucketRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/s3control-2018-08-20/DeleteBucket
func (c *S3Control) DeleteBucketRequest(input *DeleteBucketInput) (req *request.Request, output *DeleteBucketOutput) {
op := &request.Operation{
Name: opDeleteBucket,
HTTPMethod: "DELETE",
HTTPPath: "/v20180820/bucket/{name}",
}
if input == nil {
input = &DeleteBucketInput{}
}
output = &DeleteBucketOutput{}
req = c.newRequest(op, input, output)
// update account id or check if provided input for account id member matches
// the account id present in ARN
req.Handlers.Validate.PushFrontNamed(updateAccountIDWithARNHandler)
req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
req.Handlers.Build.PushBackNamed(protocol.NewHostPrefixHandler("{AccountId}.", input.hostLabels))
req.Handlers.Build.PushBackNamed(protocol.ValidateEndpointHostHandler)
return
}
// DeleteBucket API operation for AWS S3 Control.
//
//
// This API operation deletes an Amazon S3 on Outposts bucket. To delete an
// S3 bucket, see DeleteBucket (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucket.html)
// in the Amazon Simple Storage Service API.
//
// Deletes the Amazon S3 on Outposts bucket. All objects (including all object
// versions and delete markers) in the bucket must be deleted before the bucket
// itself can be deleted. For more information, see Using Amazon S3 on Outposts
// (https://docs.aws.amazon.com/AmazonS3/latest/dev/S3onOutposts.html) in Amazon
// Simple Storage Service Developer Guide.
//
// All Amazon S3 on Outposts REST API requests for this action require an additional
// parameter of outpost-id to be passed with the request and an S3 on Outposts
// endpoint hostname prefix instead of s3-control. For an example of the request
// syntax for Amazon S3 on Outposts that uses the S3 on Outposts endpoint hostname
// prefix and the outpost-id derived using the access point ARN, see the Example
// (https://docs.aws.amazon.com/AmazonS3/latest/API/API__control_DeleteBucket.html#API_control_DeleteBucket_Examples)
// section below.
//
// Related Resources
//
// * CreateBucket (https://docs.aws.amazon.com/AmazonS3/latest/API/API_control_CreateBucket.html)
//
// * GetBucket (https://docs.aws.amazon.com/AmazonS3/latest/API/API__control_GetBucket.html)
//
// * DeleteObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteObject.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 AWS S3 Control's
// API operation DeleteBucket for usage and error information.
// See also, https://docs.aws.amazon.com/goto/WebAPI/s3control-2018-08-20/DeleteBucket
func (c *S3Control) DeleteBucket(input *DeleteBucketInput) (*DeleteBucketOutput, error) {
req, out := c.DeleteBucketRequest(input)
return out, req.Send()
}
// DeleteBucketWithContext is the same as DeleteBucket with the addition of
// the ability to pass a context and additional request options.
//
// See DeleteBucket 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 *S3Control) DeleteBucketWithContext(ctx aws.Context, input *DeleteBucketInput, opts ...request.Option) (*DeleteBucketOutput, error) {
req, out := c.DeleteBucketRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opDeleteBucketLifecycleConfiguration = "DeleteBucketLifecycleConfiguration"
// DeleteBucketLifecycleConfigurationRequest generates a "aws/request.Request" representing the
// client's request for the DeleteBucketLifecycleConfiguration 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 DeleteBucketLifecycleConfiguration for more information on using the DeleteBucketLifecycleConfiguration
// 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 DeleteBucketLifecycleConfigurationRequest method.
// req, resp := client.DeleteBucketLifecycleConfigurationRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/s3control-2018-08-20/DeleteBucketLifecycleConfiguration
func (c *S3Control) DeleteBucketLifecycleConfigurationRequest(input *DeleteBucketLifecycleConfigurationInput) (req *request.Request, output *DeleteBucketLifecycleConfigurationOutput) {
op := &request.Operation{
Name: opDeleteBucketLifecycleConfiguration,
HTTPMethod: "DELETE",
HTTPPath: "/v20180820/bucket/{name}/lifecycleconfiguration",
}
if input == nil {
input = &DeleteBucketLifecycleConfigurationInput{}
}
output = &DeleteBucketLifecycleConfigurationOutput{}
req = c.newRequest(op, input, output)
// update account id or check if provided input for account id member matches
// the account id present in ARN
req.Handlers.Validate.PushFrontNamed(updateAccountIDWithARNHandler)
req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
req.Handlers.Build.PushBackNamed(protocol.NewHostPrefixHandler("{AccountId}.", input.hostLabels))
req.Handlers.Build.PushBackNamed(protocol.ValidateEndpointHostHandler)
return
}
// DeleteBucketLifecycleConfiguration API operation for AWS S3 Control.
//
//
// This API action deletes an Amazon S3 on Outposts bucket's lifecycle configuration.
// To delete an S3 bucket's lifecycle configuration, see DeleteBucketLifecycle
// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketLifecycle.html)
// in the Amazon Simple Storage Service API.
//
// Deletes the lifecycle configuration from the specified Outposts bucket. Amazon
// S3 on Outposts removes all the lifecycle configuration rules in the lifecycle
// subresource associated with the bucket. Your objects never expire, and Amazon
// S3 on Outposts no longer automatically deletes any objects on the basis of
// rules contained in the deleted lifecycle configuration. For more information,
// see Using Amazon S3 on Outposts (https://docs.aws.amazon.com/AmazonS3/latest/dev/S3onOutposts.html)
// in Amazon Simple Storage Service Developer Guide.
//
// To use this operation, you must have permission to perform the s3outposts:DeleteLifecycleConfiguration
// action. By default, the bucket owner has this permission and the Outposts
// bucket owner can grant this permission to others.
//
// All Amazon S3 on Outposts REST API requests for this action require an additional
// parameter of outpost-id to be passed with the request and an S3 on Outposts
// endpoint hostname prefix instead of s3-control. For an example of the request
// syntax for Amazon S3 on Outposts that uses the S3 on Outposts endpoint hostname
// prefix and the outpost-id derived using the access point ARN, see the Example
// (https://docs.aws.amazon.com/AmazonS3/latest/API/API__control_DeleteBucketLifecycleConfiguration.html#API_control_DeleteBucketLifecycleConfiguration_Examples)
// section below.
//
// For more information about object expiration, see Elements to Describe Lifecycle
// Actions (https://docs.aws.amazon.com/AmazonS3/latest/dev/intro-lifecycle-rules.html#intro-lifecycle-rules-actions).
//
// Related actions include:
//
// * PutBucketLifecycleConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_control_PutBucketLifecycleConfiguration.html)
//
// * GetBucketLifecycleConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_control_GetBucketLifecycleConfiguration.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 AWS S3 Control's
// API operation DeleteBucketLifecycleConfiguration for usage and error information.
// See also, https://docs.aws.amazon.com/goto/WebAPI/s3control-2018-08-20/DeleteBucketLifecycleConfiguration
func (c *S3Control) DeleteBucketLifecycleConfiguration(input *DeleteBucketLifecycleConfigurationInput) (*DeleteBucketLifecycleConfigurationOutput, error) {
req, out := c.DeleteBucketLifecycleConfigurationRequest(input)
return out, req.Send()
}
// DeleteBucketLifecycleConfigurationWithContext is the same as DeleteBucketLifecycleConfiguration with the addition of
// the ability to pass a context and additional request options.
//
// See DeleteBucketLifecycleConfiguration 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 *S3Control) DeleteBucketLifecycleConfigurationWithContext(ctx aws.Context, input *DeleteBucketLifecycleConfigurationInput, opts ...request.Option) (*DeleteBucketLifecycleConfigurationOutput, error) {
req, out := c.DeleteBucketLifecycleConfigurationRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opDeleteBucketPolicy = "DeleteBucketPolicy"
// DeleteBucketPolicyRequest generates a "aws/request.Request" representing the
// client's request for the DeleteBucketPolicy 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 DeleteBucketPolicy for more information on using the DeleteBucketPolicy
// 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 DeleteBucketPolicyRequest method.
// req, resp := client.DeleteBucketPolicyRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/s3control-2018-08-20/DeleteBucketPolicy
func (c *S3Control) DeleteBucketPolicyRequest(input *DeleteBucketPolicyInput) (req *request.Request, output *DeleteBucketPolicyOutput) {
op := &request.Operation{
Name: opDeleteBucketPolicy,
HTTPMethod: "DELETE",
HTTPPath: "/v20180820/bucket/{name}/policy",
}
if input == nil {
input = &DeleteBucketPolicyInput{}
}
output = &DeleteBucketPolicyOutput{}
req = c.newRequest(op, input, output)
// update account id or check if provided input for account id member matches
// the account id present in ARN
req.Handlers.Validate.PushFrontNamed(updateAccountIDWithARNHandler)
req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
req.Handlers.Build.PushBackNamed(protocol.NewHostPrefixHandler("{AccountId}.", input.hostLabels))
req.Handlers.Build.PushBackNamed(protocol.ValidateEndpointHostHandler)
return
}
// DeleteBucketPolicy API operation for AWS S3 Control.
//
//
// This API operation deletes an Amazon S3 on Outposts bucket policy. To delete
// an S3 bucket policy, see DeleteBucketPolicy (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketPolicy.html)
// in the Amazon Simple Storage Service API.
//
// This implementation of the DELETE operation uses the policy subresource to
// delete the policy of a specified Amazon S3 on Outposts bucket. If you are
// using an identity other than the root user of the AWS account that owns the
// bucket, the calling identity must have the s3outposts:DeleteBucketPolicy
// permissions on the specified Outposts bucket and belong to the bucket owner's
// account to use this operation. For more information, see Using Amazon S3
// on Outposts (https://docs.aws.amazon.com/AmazonS3/latest/dev/S3onOutposts.html)
// in Amazon Simple Storage Service Developer Guide.
//
// If you don't have DeleteBucketPolicy permissions, Amazon S3 returns a 403
// Access Denied error. If you have the correct permissions, but you're not
// using an identity that belongs to the bucket owner's account, Amazon S3 returns
// a 405 Method Not Allowed error.
//
// As a security precaution, the root user of the AWS account that owns a bucket
// can always use this operation, even if the policy explicitly denies the root
// user the ability to perform this action.
//
// For more information about bucket policies, see Using Bucket Policies and
// User Policies (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-iam-policies.html).
//
// All Amazon S3 on Outposts REST API requests for this action require an additional
// parameter of outpost-id to be passed with the request and an S3 on Outposts
// endpoint hostname prefix instead of s3-control. For an example of the request
// syntax for Amazon S3 on Outposts that uses the S3 on Outposts endpoint hostname
// prefix and the outpost-id derived using the access point ARN, see the Example
// (https://docs.aws.amazon.com/AmazonS3/latest/API/API__control_DeleteBucketPolicy.html#API_control_DeleteBucketPolicy_Examples)
// section below.
//
// The following actions are related to DeleteBucketPolicy:
//
// * GetBucketPolicy (https://docs.aws.amazon.com/AmazonS3/latest/API/API_control_GetBucketPolicy.html)
//
// * PutBucketPolicy (https://docs.aws.amazon.com/AmazonS3/latest/API/API__control_PutBucketPolicy.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 AWS S3 Control's
// API operation DeleteBucketPolicy for usage and error information.
// See also, https://docs.aws.amazon.com/goto/WebAPI/s3control-2018-08-20/DeleteBucketPolicy
func (c *S3Control) DeleteBucketPolicy(input *DeleteBucketPolicyInput) (*DeleteBucketPolicyOutput, error) {
req, out := c.DeleteBucketPolicyRequest(input)
return out, req.Send()
}
// DeleteBucketPolicyWithContext is the same as DeleteBucketPolicy with the addition of
// the ability to pass a context and additional request options.
//
// See DeleteBucketPolicy 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 *S3Control) DeleteBucketPolicyWithContext(ctx aws.Context, input *DeleteBucketPolicyInput, opts ...request.Option) (*DeleteBucketPolicyOutput, error) {
req, out := c.DeleteBucketPolicyRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opDeleteBucketTagging = "DeleteBucketTagging"
// DeleteBucketTaggingRequest generates a "aws/request.Request" representing the
// client's request for the DeleteBucketTagging 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 DeleteBucketTagging for more information on using the DeleteBucketTagging
// 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 DeleteBucketTaggingRequest method.
// req, resp := client.DeleteBucketTaggingRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/s3control-2018-08-20/DeleteBucketTagging
func (c *S3Control) DeleteBucketTaggingRequest(input *DeleteBucketTaggingInput) (req *request.Request, output *DeleteBucketTaggingOutput) {
op := &request.Operation{
Name: opDeleteBucketTagging,
HTTPMethod: "DELETE",
HTTPPath: "/v20180820/bucket/{name}/tagging",
}
if input == nil {
input = &DeleteBucketTaggingInput{}
}
output = &DeleteBucketTaggingOutput{}
req = c.newRequest(op, input, output)
// update account id or check if provided input for account id member matches
// the account id present in ARN
req.Handlers.Validate.PushFrontNamed(updateAccountIDWithARNHandler)
req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
req.Handlers.Build.PushBackNamed(protocol.NewHostPrefixHandler("{AccountId}.", input.hostLabels))
req.Handlers.Build.PushBackNamed(protocol.ValidateEndpointHostHandler)
return
}
// DeleteBucketTagging API operation for AWS S3 Control.
//
//
// This API operation deletes an Amazon S3 on Outposts bucket's tags. To delete
// an S3 bucket tags, see DeleteBucketTagging (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketTagging.html)
// in the Amazon Simple Storage Service API.
//
// Deletes the tags from the Outposts bucket. For more information, see Using
// Amazon S3 on Outposts (https://docs.aws.amazon.com/AmazonS3/latest/dev/S3onOutposts.html)
// in Amazon Simple Storage Service Developer Guide.
//
// To use this operation, you must have permission to perform the PutBucketTagging
// action. By default, the bucket owner has this permission and can grant this
// permission to others.
//
// All Amazon S3 on Outposts REST API requests for this action require an additional
// parameter of outpost-id to be passed with the request and an S3 on Outposts
// endpoint hostname prefix instead of s3-control. For an example of the request
// syntax for Amazon S3 on Outposts that uses the S3 on Outposts endpoint hostname
// prefix and the outpost-id derived using the access point ARN, see the Example
// (https://docs.aws.amazon.com/AmazonS3/latest/API/API__control_DeleteBucketTagging.html#API_control_DeleteBucketTagging_Examples)
// section below.
//
// The following actions are related to DeleteBucketTagging:
//
// * GetBucketTagging (https://docs.aws.amazon.com/AmazonS3/latest/API/API_control_GetBucketTagging.html)
//
// * PutBucketTagging (https://docs.aws.amazon.com/AmazonS3/latest/API/API_control_PutBucketTagging.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 AWS S3 Control's
// API operation DeleteBucketTagging for usage and error information.
// See also, https://docs.aws.amazon.com/goto/WebAPI/s3control-2018-08-20/DeleteBucketTagging
func (c *S3Control) DeleteBucketTagging(input *DeleteBucketTaggingInput) (*DeleteBucketTaggingOutput, error) {
req, out := c.DeleteBucketTaggingRequest(input)
return out, req.Send()
}
// DeleteBucketTaggingWithContext is the same as DeleteBucketTagging with the addition of
// the ability to pass a context and additional request options.
//
// See DeleteBucketTagging 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 *S3Control) DeleteBucketTaggingWithContext(ctx aws.Context, input *DeleteBucketTaggingInput, opts ...request.Option) (*DeleteBucketTaggingOutput, error) {
req, out := c.DeleteBucketTaggingRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opDeleteJobTagging = "DeleteJobTagging"
// DeleteJobTaggingRequest generates a "aws/request.Request" representing the
// client's request for the DeleteJobTagging 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 DeleteJobTagging for more information on using the DeleteJobTagging
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration