/
common.go
4181 lines (4085 loc) · 213 KB
/
common.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
package s3
import (
"context"
"github.com/aws/aws-sdk-go-v2/service/s3"
)
// S3API describes all the functionality implemented by the AWS Go SDK v2 S3 client
type S3API interface {
// This action aborts a multipart upload. After a multipart upload is aborted, no
// additional parts can be uploaded using that upload ID. The storage consumed by
// any previously uploaded parts will be freed. However, if any part uploads are
// currently in progress, those part uploads might or might not succeed. As a
// result, it might be necessary to abort a given multipart upload multiple times
// in order to completely free all storage consumed by all parts. To verify that
// all parts have been removed, so you don't get charged for the part storage, you
// should call the ListParts
// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListParts.html) action and
// ensure that the parts list is empty. For information about permissions required
// to use the multipart upload, see Multipart Upload and Permissions
// (https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuAndPermissions.html). The
// following operations are related to AbortMultipartUpload:
//
// *
// CreateMultipartUpload
// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateMultipartUpload.html)
//
// *
// UploadPart
// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPart.html)
//
// *
// CompleteMultipartUpload
// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CompleteMultipartUpload.html)
//
// *
// ListParts
// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListParts.html)
//
// *
// ListMultipartUploads
// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListMultipartUploads.html)
AbortMultipartUpload(ctx context.Context, params *s3.AbortMultipartUploadInput,
optFns ...func(*s3.Options)) (*s3.AbortMultipartUploadOutput, error)
// Completes a multipart upload by assembling previously uploaded parts. You first
// initiate the multipart upload and then upload all parts using the UploadPart
// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPart.html) operation.
// After successfully uploading all relevant parts of an upload, you call this
// action to complete the upload. Upon receiving this request, Amazon S3
// concatenates all the parts in ascending order by part number to create a new
// object. In the Complete Multipart Upload request, you must provide the parts
// list. You must ensure that the parts list is complete. This action concatenates
// the parts that you provide in the list. For each part in the list, you must
// provide the part number and the ETag value, returned after that part was
// uploaded. Processing of a Complete Multipart Upload request could take several
// minutes to complete. After Amazon S3 begins processing the request, it sends an
// HTTP response header that specifies a 200 OK response. While processing is in
// progress, Amazon S3 periodically sends white space characters to keep the
// connection from timing out. Because a request could fail after the initial 200
// OK response has been sent, it is important that you check the response body to
// determine whether the request succeeded. Note that if CompleteMultipartUpload
// fails, applications should be prepared to retry the failed requests. For more
// information, see Amazon S3 Error Best Practices
// (https://docs.aws.amazon.com/AmazonS3/latest/dev/ErrorBestPractices.html). You
// cannot use Content-Type: application/x-www-form-urlencoded with Complete
// Multipart Upload requests. Also, if you do not provide a Content-Type header,
// CompleteMultipartUpload returns a 200 OK response. For more information about
// multipart uploads, see Uploading Objects Using Multipart Upload
// (https://docs.aws.amazon.com/AmazonS3/latest/dev/uploadobjusingmpu.html). For
// information about permissions required to use the multipart upload API, see
// Multipart Upload and Permissions
// (https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuAndPermissions.html).
// CompleteMultipartUpload has the following special errors:
//
// * Error code:
// EntityTooSmall
//
// * Description: Your proposed upload is smaller than the minimum
// allowed object size. Each part must be at least 5 MB in size, except the last
// part.
//
// * 400 Bad Request
//
// * Error code: InvalidPart
//
// * Description: One or more
// of the specified parts could not be found. The part might not have been
// uploaded, or the specified entity tag might not have matched the part's entity
// tag.
//
// * 400 Bad Request
//
// * Error code: InvalidPartOrder
//
// * Description: The list
// of parts was not in ascending order. The parts list must be specified in order
// by part number.
//
// * 400 Bad Request
//
// * Error code: NoSuchUpload
//
// * Description:
// The specified multipart upload does not exist. The upload ID might be invalid,
// or the multipart upload might have been aborted or completed.
//
// * 404 Not
// Found
//
// The following operations are related to CompleteMultipartUpload:
//
// *
// CreateMultipartUpload
// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateMultipartUpload.html)
//
// *
// UploadPart
// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPart.html)
//
// *
// AbortMultipartUpload
// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_AbortMultipartUpload.html)
//
// *
// ListParts
// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListParts.html)
//
// *
// ListMultipartUploads
// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListMultipartUploads.html)
CompleteMultipartUpload(ctx context.Context, params *s3.CompleteMultipartUploadInput,
optFns ...func(*s3.Options)) (*s3.CompleteMultipartUploadOutput, error)
// Creates a copy of an object that is already stored in Amazon S3. You can store
// individual objects of up to 5 TB in Amazon S3. You create a copy of your object
// up to 5 GB in size in a single atomic action using this API. However, to copy an
// object greater than 5 GB, you must use the multipart upload Upload Part - Copy
// (UploadPartCopy) API. For more information, see Copy Object Using the REST
// Multipart Upload API
// (https://docs.aws.amazon.com/AmazonS3/latest/dev/CopyingObjctsUsingRESTMPUapi.html).
// All copy requests must be authenticated. Additionally, you must have read access
// to the source object and write access to the destination bucket. For more
// information, see REST Authentication
// (https://docs.aws.amazon.com/AmazonS3/latest/dev/RESTAuthentication.html). Both
// the Region that you want to copy the object from and the Region that you want to
// copy the object to must be enabled for your account. A copy request might return
// an error when Amazon S3 receives the copy request or while Amazon S3 is copying
// the files. If the error occurs before the copy action starts, you receive a
// standard Amazon S3 error. If the error occurs during the copy operation, the
// error response is embedded in the 200 OK response. This means that a 200 OK
// response can contain either a success or an error. Design your application to
// parse the contents of the response and handle it appropriately. If the copy is
// successful, you receive a response with information about the copied object. If
// the request is an HTTP 1.1 request, the response is chunk encoded. If it were
// not, it would not contain the content-length, and you would need to read the
// entire body. The copy request charge is based on the storage class and Region
// that you specify for the destination object. For pricing information, see Amazon
// S3 pricing (http://aws.amazon.com/s3/pricing/). Amazon S3 transfer acceleration
// does not support cross-Region copies. If you request a cross-Region copy using a
// transfer acceleration endpoint, you get a 400 Bad Request error. For more
// information, see Transfer Acceleration
// (https://docs.aws.amazon.com/AmazonS3/latest/dev/transfer-acceleration.html).
// Metadata When copying an object, you can preserve all metadata (default) or
// specify new metadata. However, the ACL is not preserved and is set to private
// for the user making the request. To override the default ACL setting, specify a
// new ACL when generating a copy request. For more information, see Using ACLs
// (https://docs.aws.amazon.com/AmazonS3/latest/dev/S3_ACLs_UsingACLs.html). To
// specify whether you want the object metadata copied from the source object or
// replaced with metadata provided in the request, you can optionally add the
// x-amz-metadata-directive header. When you grant permissions, you can use the
// s3:x-amz-metadata-directive condition key to enforce certain metadata behavior
// when objects are uploaded. For more information, see Specifying Conditions in a
// Policy
// (https://docs.aws.amazon.com/AmazonS3/latest/dev/amazon-s3-policy-keys.html) in
// the Amazon S3 User Guide. For a complete list of Amazon S3-specific condition
// keys, see Actions, Resources, and Condition Keys for Amazon S3
// (https://docs.aws.amazon.com/AmazonS3/latest/dev/list_amazons3.html).
// x-amz-copy-source-if Headers To only copy an object under certain conditions,
// such as whether the Etag matches or whether the object was modified before or
// after a specified date, use the following request parameters:
//
// *
// x-amz-copy-source-if-match
//
// * x-amz-copy-source-if-none-match
//
// *
// x-amz-copy-source-if-unmodified-since
//
// * x-amz-copy-source-if-modified-since
//
// If
// both the x-amz-copy-source-if-match and x-amz-copy-source-if-unmodified-since
// headers are present in the request and evaluate as follows, Amazon S3 returns
// 200 OK and copies the data:
//
// * x-amz-copy-source-if-match condition evaluates to
// true
//
// * x-amz-copy-source-if-unmodified-since condition evaluates to false
//
// If
// both the x-amz-copy-source-if-none-match and x-amz-copy-source-if-modified-since
// headers are present in the request and evaluate as follows, Amazon S3 returns
// the 412 Precondition Failed response code:
//
// * x-amz-copy-source-if-none-match
// condition evaluates to false
//
// * x-amz-copy-source-if-modified-since condition
// evaluates to true
//
// All headers with the x-amz- prefix, including
// x-amz-copy-source, must be signed. Server-side encryption When you perform a
// CopyObject operation, you can optionally use the appropriate encryption-related
// headers to encrypt the object using server-side encryption with Amazon Web
// Services managed encryption keys (SSE-S3 or SSE-KMS) or a customer-provided
// encryption key. With server-side encryption, Amazon S3 encrypts your data as it
// writes it to disks in its data centers and decrypts the data when you access it.
// For more information about server-side encryption, see Using Server-Side
// Encryption
// (https://docs.aws.amazon.com/AmazonS3/latest/dev/serv-side-encryption.html). If
// a target object uses SSE-KMS, you can enable an S3 Bucket Key for the object.
// For more information, see Amazon S3 Bucket Keys
// (https://docs.aws.amazon.com/AmazonS3/latest/dev/bucket-key.html) in the Amazon
// S3 User Guide. Access Control List (ACL)-Specific Request Headers When copying
// an object, you can optionally use headers to grant ACL-based permissions. By
// default, all objects are private. Only the owner has full access control. When
// adding a new object, you can grant permissions to individual Amazon Web Services
// accounts or to predefined groups defined by Amazon S3. These permissions are
// then added to the ACL on the object. For more information, see Access Control
// List (ACL) Overview
// (https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html) and Managing
// ACLs Using the REST API
// (https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-using-rest-api.html). If
// the bucket that you're copying objects to uses the bucket owner enforced setting
// for S3 Object Ownership, ACLs are disabled and no longer affect permissions.
// Buckets that use this setting only accept PUT requests that don't specify an ACL
// or PUT requests that specify bucket owner full control ACLs, such as the
// bucket-owner-full-control canned ACL or an equivalent form of this ACL expressed
// in the XML format. For more information, see Controlling ownership of objects
// and disabling ACLs
// (https://docs.aws.amazon.com/AmazonS3/latest/userguide/about-object-ownership.html)
// in the Amazon S3 User Guide. If your bucket uses the bucket owner enforced
// setting for Object Ownership, all objects written to the bucket by any account
// will be owned by the bucket owner. Checksums When copying an object, if it has a
// checksum, that checksum will be copied to the new object by default. When you
// copy the object over, you may optionally specify a different checksum algorithm
// to use with the x-amz-checksum-algorithm header. Storage Class Options You can
// use the CopyObject action to change the storage class of an object that is
// already stored in Amazon S3 using the StorageClass parameter. For more
// information, see Storage Classes
// (https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html) in
// the Amazon S3 User Guide. Versioning By default, x-amz-copy-source identifies
// the current version of an object to copy. If the current version is a delete
// marker, Amazon S3 behaves as if the object was deleted. To copy a different
// version, use the versionId subresource. If you enable versioning on the target
// bucket, Amazon S3 generates a unique version ID for the object being copied.
// This version ID is different from the version ID of the source object. Amazon S3
// returns the version ID of the copied object in the x-amz-version-id response
// header in the response. If you do not enable versioning or suspend it on the
// target bucket, the version ID that Amazon S3 generates is always null. If the
// source object's storage class is GLACIER, you must restore a copy of this object
// before you can use it as a source object for the copy operation. For more
// information, see RestoreObject
// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_RestoreObject.html). The
// following operations are related to CopyObject:
//
// * PutObject
// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObject.html)
//
// *
// GetObject
// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html)
//
// For more
// information, see Copying Objects
// (https://docs.aws.amazon.com/AmazonS3/latest/dev/CopyingObjectsExamples.html).
CopyObject(ctx context.Context, params *s3.CopyObjectInput,
optFns ...func(*s3.Options)) (*s3.CopyObjectOutput, error)
// Creates a new S3 bucket. To create a bucket, you must register with Amazon S3
// and have a valid Amazon Web Services Access Key ID to authenticate requests.
// Anonymous requests are never allowed to create buckets. By creating the bucket,
// you become the bucket owner. Not every string is an acceptable bucket name. For
// information about bucket naming restrictions, see Bucket naming rules
// (https://docs.aws.amazon.com/AmazonS3/latest/userguide/bucketnamingrules.html).
// If you want to create an Amazon S3 on Outposts bucket, see Create Bucket
// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_control_CreateBucket.html).
// By default, the bucket is created in the US East (N. Virginia) Region. You can
// optionally specify a Region in the request body. You might choose a Region to
// optimize latency, minimize costs, or address regulatory requirements. For
// example, if you reside in Europe, you will probably find it advantageous to
// create buckets in the Europe (Ireland) Region. For more information, see
// Accessing a bucket
// (https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingBucket.html#access-bucket-intro).
// If you send your create bucket request to the s3.amazonaws.com endpoint, the
// request goes to the us-east-1 Region. Accordingly, the signature calculations in
// Signature Version 4 must use us-east-1 as the Region, even if the location
// constraint in the request specifies another Region where the bucket is to be
// created. If you create a bucket in a Region other than US East (N. Virginia),
// your application must be able to handle 307 redirect. For more information, see
// Virtual hosting of buckets
// (https://docs.aws.amazon.com/AmazonS3/latest/dev/VirtualHosting.html). Access
// control lists (ACLs) When creating a bucket using this operation, you can
// optionally configure the bucket ACL to specify the accounts or groups that
// should be granted specific permissions on the bucket. If your CreateBucket
// request sets bucket owner enforced for S3 Object Ownership and specifies a
// bucket ACL that provides access to an external Amazon Web Services account, your
// request fails with a 400 error and returns the
// InvalidBucketAclWithObjectOwnership error code. For more information, see
// Controlling object ownership
// (https://docs.aws.amazon.com/AmazonS3/latest/userguide/about-object-ownership.html)
// in the Amazon S3 User Guide. There are two ways to grant the appropriate
// permissions using the request headers.
//
// * Specify a canned ACL using the
// x-amz-acl request header. Amazon S3 supports a set of predefined ACLs, known as
// canned ACLs. Each canned ACL has a predefined set of grantees and permissions.
// For more information, see Canned ACL
// (https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#CannedACL).
//
// *
// Specify access permissions explicitly using the x-amz-grant-read,
// x-amz-grant-write, x-amz-grant-read-acp, x-amz-grant-write-acp, and
// x-amz-grant-full-control headers. These headers map to the set of permissions
// Amazon S3 supports in an ACL. For more information, see Access control list
// (ACL) overview
// (https://docs.aws.amazon.com/AmazonS3/latest/userguide/acl-overview.html). You
// specify each grantee as a type=value pair, where the type is one of the
// following:
//
// * id – if the value specified is the canonical user ID of an Amazon
// Web Services account
//
// * uri – if you are granting permissions to a predefined
// group
//
// * emailAddress – if the value specified is the email address of an Amazon
// Web Services account Using email addresses to specify a grantee is only
// supported in the following Amazon Web Services Regions:
//
// * US East (N.
// Virginia)
//
// * US West (N. California)
//
// * US West (Oregon)
//
// * Asia Pacific
// (Singapore)
//
// * Asia Pacific (Sydney)
//
// * Asia Pacific (Tokyo)
//
// * Europe
// (Ireland)
//
// * South America (São Paulo)
//
// For a list of all the Amazon S3
// supported Regions and endpoints, see Regions and Endpoints
// (https://docs.aws.amazon.com/general/latest/gr/rande.html#s3_region) in the
// Amazon Web Services General Reference.
//
// For example, the following
// x-amz-grant-read header grants the Amazon Web Services accounts identified by
// account IDs permissions to read object data and its metadata: x-amz-grant-read:
// id="11112222333", id="444455556666"
//
// You can use either a canned ACL or specify
// access permissions explicitly. You cannot do both. Permissions In addition to
// s3:CreateBucket, the following permissions are required when your CreateBucket
// includes specific headers:
//
// * ACLs - If your CreateBucket request specifies ACL
// permissions and the ACL is public-read, public-read-write, authenticated-read,
// or if you specify access permissions explicitly through any other ACL, both
// s3:CreateBucket and s3:PutBucketAcl permissions are needed. If the ACL the
// CreateBucket request is private or doesn't specify any ACLs, only
// s3:CreateBucket permission is needed.
//
// * Object Lock - If
// ObjectLockEnabledForBucket is set to true in your CreateBucket request,
// s3:PutBucketObjectLockConfiguration and s3:PutBucketVersioning permissions are
// required.
//
// * S3 Object Ownership - If your CreateBucket request includes the the
// x-amz-object-ownership header, s3:PutBucketOwnershipControls permission is
// required.
//
// The following operations are related to CreateBucket:
//
// * PutObject
// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObject.html)
//
// *
// DeleteBucket
// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucket.html)
CreateBucket(ctx context.Context, params *s3.CreateBucketInput,
optFns ...func(*s3.Options)) (*s3.CreateBucketOutput, error)
// This action initiates a multipart upload and returns an upload ID. This upload
// ID is used to associate all of the parts in the specific multipart upload. You
// specify this upload ID in each of your subsequent upload part requests (see
// UploadPart
// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPart.html)). You also
// include this upload ID in the final request to either complete or abort the
// multipart upload request. For more information about multipart uploads, see
// Multipart Upload Overview
// (https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuoverview.html). If you have
// configured a lifecycle rule to abort incomplete multipart uploads, the upload
// must complete within the number of days specified in the bucket lifecycle
// configuration. Otherwise, the incomplete multipart upload becomes eligible for
// an abort action and Amazon S3 aborts the multipart upload. For more information,
// see Aborting Incomplete Multipart Uploads Using a Bucket Lifecycle Policy
// (https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuoverview.html#mpu-abort-incomplete-mpu-lifecycle-config).
// For information about the permissions required to use the multipart upload API,
// see Multipart Upload and Permissions
// (https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuAndPermissions.html). For
// request signing, multipart upload is just a series of regular requests. You
// initiate a multipart upload, send one or more requests to upload parts, and then
// complete the multipart upload process. You sign each request individually. There
// is nothing special about signing multipart upload requests. For more information
// about signing, see Authenticating Requests (Amazon Web Services Signature
// Version 4)
// (https://docs.aws.amazon.com/AmazonS3/latest/API/sig-v4-authenticating-requests.html).
// After you initiate a multipart upload and upload one or more parts, to stop
// being charged for storing the uploaded parts, you must either complete or abort
// the multipart upload. Amazon S3 frees up the space used to store the parts and
// stop charging you for storing them only after you either complete or abort a
// multipart upload. You can optionally request server-side encryption. For
// server-side encryption, Amazon S3 encrypts your data as it writes it to disks in
// its data centers and decrypts it when you access it. You can provide your own
// encryption key, or use Amazon Web Services KMS keys or Amazon S3-managed
// encryption keys. If you choose to provide your own encryption key, the request
// headers you provide in UploadPart
// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPart.html) and
// UploadPartCopy
// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPartCopy.html)
// requests must match the headers you used in the request to initiate the upload
// by using CreateMultipartUpload. To perform a multipart upload with encryption
// using an Amazon Web Services KMS key, the requester must have permission to the
// kms:Decrypt and kms:GenerateDataKey* actions on the key. These permissions are
// required because Amazon S3 must decrypt and read data from the encrypted file
// parts before it completes the multipart upload. For more information, see
// Multipart upload API and permissions
// (https://docs.aws.amazon.com/AmazonS3/latest/userguide/mpuoverview.html#mpuAndPermissions)
// in the Amazon S3 User Guide. If your Identity and Access Management (IAM) user
// or role is in the same Amazon Web Services account as the KMS key, then you must
// have these permissions on the key policy. If your IAM user or role belongs to a
// different account than the key, then you must have the permissions on both the
// key policy and your IAM user or role. For more information, see Protecting Data
// Using Server-Side Encryption
// (https://docs.aws.amazon.com/AmazonS3/latest/dev/serv-side-encryption.html).
// Access Permissions When copying an object, you can optionally specify the
// accounts or groups that should be granted specific permissions on the new
// object. There are two ways to grant the permissions using the request
// headers:
//
// * Specify a canned ACL with the x-amz-acl request header. For more
// information, see Canned ACL
// (https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#CannedACL).
//
// *
// Specify access permissions explicitly with the x-amz-grant-read,
// x-amz-grant-read-acp, x-amz-grant-write-acp, and x-amz-grant-full-control
// headers. These parameters map to the set of permissions that Amazon S3 supports
// in an ACL. For more information, see Access Control List (ACL) Overview
// (https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html).
//
// You can
// use either a canned ACL or specify access permissions explicitly. You cannot do
// both. Server-Side- Encryption-Specific Request Headers You can optionally tell
// Amazon S3 to encrypt data at rest using server-side encryption. Server-side
// encryption is for data encryption at rest. Amazon S3 encrypts your data as it
// writes it to disks in its data centers and decrypts it when you access it. The
// option you use depends on whether you want to use Amazon Web Services managed
// encryption keys or provide your own encryption key.
//
// * Use encryption keys
// managed by Amazon S3 or customer managed key stored in Amazon Web Services Key
// Management Service (Amazon Web Services KMS) – If you want Amazon Web Services
// to manage the keys used to encrypt data, specify the following headers in the
// request.
//
// * x-amz-server-side-encryption
//
// *
// x-amz-server-side-encryption-aws-kms-key-id
//
// *
// x-amz-server-side-encryption-context
//
// If you specify
// x-amz-server-side-encryption:aws:kms, but don't provide
// x-amz-server-side-encryption-aws-kms-key-id, Amazon S3 uses the Amazon Web
// Services managed key in Amazon Web Services KMS to protect the data. All GET and
// PUT requests for an object protected by Amazon Web Services KMS fail if you
// don't make them with SSL or by using SigV4. For more information about
// server-side encryption with KMS key (SSE-KMS), see Protecting Data Using
// Server-Side Encryption with KMS keys
// (https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingKMSEncryption.html).
//
// *
// Use customer-provided encryption keys – If you want to manage your own
// encryption keys, provide all the following headers in the request.
//
// *
// x-amz-server-side-encryption-customer-algorithm
//
// *
// x-amz-server-side-encryption-customer-key
//
// *
// x-amz-server-side-encryption-customer-key-MD5
//
// For more information about
// server-side encryption with KMS keys (SSE-KMS), see Protecting Data Using
// Server-Side Encryption with KMS keys
// (https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingKMSEncryption.html).
//
// Access-Control-List
// (ACL)-Specific Request Headers You also can use the following access
// control–related headers with this operation. By default, all objects are
// private. Only the owner has full access control. When adding a new object, you
// can grant permissions to individual Amazon Web Services accounts or to
// predefined groups defined by Amazon S3. These permissions are then added to the
// access control list (ACL) on the object. For more information, see Using ACLs
// (https://docs.aws.amazon.com/AmazonS3/latest/dev/S3_ACLs_UsingACLs.html). With
// this operation, you can grant access permissions using one of the following two
// methods:
//
// * Specify a canned ACL (x-amz-acl) — Amazon S3 supports a set of
// predefined ACLs, known as canned ACLs. Each canned ACL has a predefined set of
// grantees and permissions. For more information, see Canned ACL
// (https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#CannedACL).
//
// *
// Specify access permissions explicitly — To explicitly grant access permissions
// to specific Amazon Web Services accounts or groups, use the following headers.
// Each header maps to specific permissions that Amazon S3 supports in an ACL. For
// more information, see Access Control List (ACL) Overview
// (https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html). In the
// header, you specify a list of grantees who get the specific permission. To grant
// permissions explicitly, use:
//
// * x-amz-grant-read
//
// * x-amz-grant-write
//
// *
// x-amz-grant-read-acp
//
// * x-amz-grant-write-acp
//
// * x-amz-grant-full-control
//
// You
// specify each grantee as a type=value pair, where the type is one of the
// following:
//
// * id – if the value specified is the canonical user ID of an Amazon
// Web Services account
//
// * uri – if you are granting permissions to a predefined
// group
//
// * emailAddress – if the value specified is the email address of an Amazon
// Web Services account Using email addresses to specify a grantee is only
// supported in the following Amazon Web Services Regions:
//
// * US East (N.
// Virginia)
//
// * US West (N. California)
//
// * US West (Oregon)
//
// * Asia Pacific
// (Singapore)
//
// * Asia Pacific (Sydney)
//
// * Asia Pacific (Tokyo)
//
// * Europe
// (Ireland)
//
// * South America (São Paulo)
//
// For a list of all the Amazon S3
// supported Regions and endpoints, see Regions and Endpoints
// (https://docs.aws.amazon.com/general/latest/gr/rande.html#s3_region) in the
// Amazon Web Services General Reference.
//
// For example, the following
// x-amz-grant-read header grants the Amazon Web Services accounts identified by
// account IDs permissions to read object data and its metadata: x-amz-grant-read:
// id="11112222333", id="444455556666"
//
// The following operations are related to
// CreateMultipartUpload:
//
// * UploadPart
// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPart.html)
//
// *
// CompleteMultipartUpload
// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CompleteMultipartUpload.html)
//
// *
// AbortMultipartUpload
// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_AbortMultipartUpload.html)
//
// *
// ListParts
// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListParts.html)
//
// *
// ListMultipartUploads
// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListMultipartUploads.html)
CreateMultipartUpload(ctx context.Context, params *s3.CreateMultipartUploadInput,
optFns ...func(*s3.Options)) (*s3.CreateMultipartUploadOutput, error)
// Deletes the S3 bucket. All objects (including all object versions and delete
// markers) in the bucket must be deleted before the bucket itself can be deleted.
// Related Resources
//
// * CreateBucket
// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateBucket.html)
//
// *
// DeleteObject
// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteObject.html)
DeleteBucket(ctx context.Context, params *s3.DeleteBucketInput,
optFns ...func(*s3.Options)) (*s3.DeleteBucketOutput, error)
// Deletes an analytics configuration for the bucket (specified by the analytics
// configuration ID). To use this operation, you must have permissions to perform
// the s3:PutAnalyticsConfiguration action. The bucket owner has this permission by
// default. The bucket owner can grant this permission to others. For more
// information about permissions, see Permissions Related to Bucket Subresource
// Operations
// (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources)
// and Managing Access Permissions to Your Amazon S3 Resources
// (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html).
// For information about the Amazon S3 analytics feature, see Amazon S3 Analytics –
// Storage Class Analysis
// (https://docs.aws.amazon.com/AmazonS3/latest/dev/analytics-storage-class.html).
// The following operations are related to DeleteBucketAnalyticsConfiguration:
//
// *
// GetBucketAnalyticsConfiguration
// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketAnalyticsConfiguration.html)
//
// *
// ListBucketAnalyticsConfigurations
// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListBucketAnalyticsConfigurations.html)
//
// *
// PutBucketAnalyticsConfiguration
// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketAnalyticsConfiguration.html)
DeleteBucketAnalyticsConfiguration(ctx context.Context, params *s3.DeleteBucketAnalyticsConfigurationInput,
optFns ...func(*s3.Options)) (*s3.DeleteBucketAnalyticsConfigurationOutput, error)
// Deletes the cors configuration information set for the bucket. To use this
// operation, you must have permission to perform the s3:PutBucketCORS action. The
// bucket owner has this permission by default and can grant this permission to
// others. For information about cors, see Enabling Cross-Origin Resource Sharing
// (https://docs.aws.amazon.com/AmazonS3/latest/dev/cors.html) in the Amazon S3
// User Guide. Related Resources:
//
// * PutBucketCors
// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketCors.html)
//
// *
// RESTOPTIONSobject
// (https://docs.aws.amazon.com/AmazonS3/latest/API/RESTOPTIONSobject.html)
DeleteBucketCors(ctx context.Context, params *s3.DeleteBucketCorsInput,
optFns ...func(*s3.Options)) (*s3.DeleteBucketCorsOutput, error)
// This implementation of the DELETE action removes default encryption from the
// bucket. For information about the Amazon S3 default encryption feature, see
// Amazon S3 Default Bucket Encryption
// (https://docs.aws.amazon.com/AmazonS3/latest/dev/bucket-encryption.html) in the
// Amazon S3 User Guide. To use this operation, you must have permissions to
// perform the s3:PutEncryptionConfiguration action. The bucket owner has this
// permission by default. The bucket owner can grant this permission to others. For
// more information about permissions, see Permissions Related to Bucket
// Subresource Operations
// (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources)
// and Managing Access Permissions to your Amazon S3 Resources
// (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html)
// in the Amazon S3 User Guide. Related Resources
//
// * PutBucketEncryption
// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketEncryption.html)
//
// *
// GetBucketEncryption
// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketEncryption.html)
DeleteBucketEncryption(ctx context.Context, params *s3.DeleteBucketEncryptionInput,
optFns ...func(*s3.Options)) (*s3.DeleteBucketEncryptionOutput, error)
// Deletes the S3 Intelligent-Tiering configuration from the specified bucket. The
// S3 Intelligent-Tiering storage class is designed to optimize storage costs by
// automatically moving data to the most cost-effective storage access tier,
// without performance impact or operational overhead. S3 Intelligent-Tiering
// delivers automatic cost savings in three low latency and high throughput access
// tiers. To get the lowest storage cost on data that can be accessed in minutes to
// hours, you can choose to activate additional archiving capabilities. The S3
// Intelligent-Tiering storage class is the ideal storage class for data with
// unknown, changing, or unpredictable access patterns, independent of object size
// or retention period. If the size of an object is less than 128 KB, it is not
// monitored and not eligible for auto-tiering. Smaller objects can be stored, but
// they are always charged at the Frequent Access tier rates in the S3
// Intelligent-Tiering storage class. For more information, see Storage class for
// automatically optimizing frequently and infrequently accessed objects
// (https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html#sc-dynamic-data-access).
// Operations related to DeleteBucketIntelligentTieringConfiguration include:
//
// *
// GetBucketIntelligentTieringConfiguration
// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketIntelligentTieringConfiguration.html)
//
// *
// PutBucketIntelligentTieringConfiguration
// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketIntelligentTieringConfiguration.html)
//
// *
// ListBucketIntelligentTieringConfigurations
// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListBucketIntelligentTieringConfigurations.html)
DeleteBucketIntelligentTieringConfiguration(ctx context.Context, params *s3.DeleteBucketIntelligentTieringConfigurationInput,
optFns ...func(*s3.Options)) (*s3.DeleteBucketIntelligentTieringConfigurationOutput, error)
// Deletes an inventory configuration (identified by the inventory ID) from the
// bucket. To use this operation, you must have permissions to perform the
// s3:PutInventoryConfiguration action. The bucket owner has this permission by
// default. The bucket owner can grant this permission to others. For more
// information about permissions, see Permissions Related to Bucket Subresource
// Operations
// (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources)
// and Managing Access Permissions to Your Amazon S3 Resources
// (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html).
// For information about the Amazon S3 inventory feature, see Amazon S3 Inventory
// (https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-inventory.html).
// Operations related to DeleteBucketInventoryConfiguration include:
//
// *
// GetBucketInventoryConfiguration
// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketInventoryConfiguration.html)
//
// *
// PutBucketInventoryConfiguration
// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketInventoryConfiguration.html)
//
// *
// ListBucketInventoryConfigurations
// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListBucketInventoryConfigurations.html)
DeleteBucketInventoryConfiguration(ctx context.Context, params *s3.DeleteBucketInventoryConfigurationInput,
optFns ...func(*s3.Options)) (*s3.DeleteBucketInventoryConfigurationOutput, error)
// Deletes the lifecycle configuration from the specified bucket. Amazon S3 removes
// all the lifecycle configuration rules in the lifecycle subresource associated
// with the bucket. Your objects never expire, and Amazon S3 no longer
// automatically deletes any objects on the basis of rules contained in the deleted
// lifecycle configuration. To use this operation, you must have permission to
// perform the s3:PutLifecycleConfiguration action. By default, the bucket owner
// has this permission and the bucket owner can grant this permission to others.
// There is usually some time lag before lifecycle configuration deletion is fully
// propagated to all the Amazon S3 systems. For more information about the 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_PutBucketLifecycleConfiguration.html)
//
// *
// GetBucketLifecycleConfiguration
// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketLifecycleConfiguration.html)
DeleteBucketLifecycle(ctx context.Context, params *s3.DeleteBucketLifecycleInput,
optFns ...func(*s3.Options)) (*s3.DeleteBucketLifecycleOutput, error)
// Deletes a metrics configuration for the Amazon CloudWatch request metrics
// (specified by the metrics configuration ID) from the bucket. Note that this
// doesn't include the daily storage metrics. To use this operation, you must have
// permissions to perform the s3:PutMetricsConfiguration action. The bucket owner
// has this permission by default. The bucket owner can grant this permission to
// others. For more information about permissions, see Permissions Related to
// Bucket Subresource Operations
// (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources)
// and Managing Access Permissions to Your Amazon S3 Resources
// (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html).
// For information about CloudWatch request metrics for Amazon S3, see Monitoring
// Metrics with Amazon CloudWatch
// (https://docs.aws.amazon.com/AmazonS3/latest/dev/cloudwatch-monitoring.html).
// The following operations are related to DeleteBucketMetricsConfiguration:
//
// *
// GetBucketMetricsConfiguration
// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketMetricsConfiguration.html)
//
// *
// PutBucketMetricsConfiguration
// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketMetricsConfiguration.html)
//
// *
// ListBucketMetricsConfigurations
// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListBucketMetricsConfigurations.html)
//
// *
// Monitoring Metrics with Amazon CloudWatch
// (https://docs.aws.amazon.com/AmazonS3/latest/dev/cloudwatch-monitoring.html)
DeleteBucketMetricsConfiguration(ctx context.Context, params *s3.DeleteBucketMetricsConfigurationInput,
optFns ...func(*s3.Options)) (*s3.DeleteBucketMetricsConfigurationOutput, error)
// Removes OwnershipControls for an Amazon S3 bucket. To use this operation, you
// must have the s3:PutBucketOwnershipControls permission. For more information
// about Amazon S3 permissions, see Specifying Permissions in a Policy
// (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-with-s3-actions.html).
// For information about Amazon S3 Object Ownership, see Using Object Ownership
// (https://docs.aws.amazon.com/AmazonS3/latest/dev/about-object-ownership.html).
// The following operations are related to DeleteBucketOwnershipControls:
//
// *
// GetBucketOwnershipControls
//
// * PutBucketOwnershipControls
DeleteBucketOwnershipControls(ctx context.Context, params *s3.DeleteBucketOwnershipControlsInput,
optFns ...func(*s3.Options)) (*s3.DeleteBucketOwnershipControlsOutput, error)
// This implementation of the DELETE action uses the policy subresource to delete
// the policy of a specified bucket. If you are using an identity other than the
// root user of the Amazon Web Services account that owns the bucket, the calling
// identity must have the DeleteBucketPolicy permissions on the specified bucket
// and belong to the bucket owner's account to use this operation. 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 Amazon Web
// Services 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
// UserPolicies
// (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-iam-policies.html). The
// following operations are related to DeleteBucketPolicy
//
// * CreateBucket
// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateBucket.html)
//
// *
// DeleteObject
// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteObject.html)
DeleteBucketPolicy(ctx context.Context, params *s3.DeleteBucketPolicyInput,
optFns ...func(*s3.Options)) (*s3.DeleteBucketPolicyOutput, error)
// Deletes the replication configuration from the bucket. To use this operation,
// you must have permissions to perform the s3:PutReplicationConfiguration action.
// The bucket owner has these permissions by default and can grant it to others.
// For more information about permissions, see Permissions Related to Bucket
// Subresource Operations
// (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources)
// and Managing Access Permissions to Your Amazon S3 Resources
// (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html).
// It can take a while for the deletion of a replication configuration to fully
// propagate. For information about replication configuration, see Replication
// (https://docs.aws.amazon.com/AmazonS3/latest/dev/replication.html) in the Amazon
// S3 User Guide. The following operations are related to
// DeleteBucketReplication:
//
// * PutBucketReplication
// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketReplication.html)
//
// *
// GetBucketReplication
// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketReplication.html)
DeleteBucketReplication(ctx context.Context, params *s3.DeleteBucketReplicationInput,
optFns ...func(*s3.Options)) (*s3.DeleteBucketReplicationOutput, error)
// Deletes the tags from the bucket. To use this operation, you must have
// permission to perform the s3:PutBucketTagging action. By default, the bucket
// owner has this permission and can grant this permission to others. The following
// operations are related to DeleteBucketTagging:
//
// * GetBucketTagging
// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketTagging.html)
//
// *
// PutBucketTagging
// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketTagging.html)
DeleteBucketTagging(ctx context.Context, params *s3.DeleteBucketTaggingInput,
optFns ...func(*s3.Options)) (*s3.DeleteBucketTaggingOutput, error)
// This action removes the website configuration for a bucket. Amazon S3 returns a
// 200 OK response upon successfully deleting a website configuration on the
// specified bucket. You will get a 200 OK response if the website configuration
// you are trying to delete does not exist on the bucket. Amazon S3 returns a 404
// response if the bucket specified in the request does not exist. This DELETE
// action requires the S3:DeleteBucketWebsite permission. By default, only the
// bucket owner can delete the website configuration attached to a bucket. However,
// bucket owners can grant other users permission to delete the website
// configuration by writing a bucket policy granting them the
// S3:DeleteBucketWebsite permission. For more information about hosting websites,
// see Hosting Websites on Amazon S3
// (https://docs.aws.amazon.com/AmazonS3/latest/dev/WebsiteHosting.html). The
// following operations are related to DeleteBucketWebsite:
//
// * GetBucketWebsite
// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketWebsite.html)
//
// *
// PutBucketWebsite
// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketWebsite.html)
DeleteBucketWebsite(ctx context.Context, params *s3.DeleteBucketWebsiteInput,
optFns ...func(*s3.Options)) (*s3.DeleteBucketWebsiteOutput, error)
// Removes the null version (if there is one) of an object and inserts a delete
// marker, which becomes the latest version of the object. If there isn't a null
// version, Amazon S3 does not remove any objects but will still respond that the
// command was successful. To remove a specific version, you must be the bucket
// owner and you must use the version Id subresource. Using this subresource
// permanently deletes the version. If the object deleted is a delete marker,
// Amazon S3 sets the response header, x-amz-delete-marker, to true. If the object
// you want to delete is in a bucket where the bucket versioning configuration is
// MFA Delete enabled, you must include the x-amz-mfa request header in the DELETE
// versionId request. Requests that include x-amz-mfa must use HTTPS. For more
// information about MFA Delete, see Using MFA Delete
// (https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingMFADelete.html). To see
// sample requests that use versioning, see Sample Request
// (https://docs.aws.amazon.com/AmazonS3/latest/API/RESTObjectDELETE.html#ExampleVersionObjectDelete).
// You can delete objects by explicitly calling DELETE Object or configure its
// lifecycle (PutBucketLifecycle
// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketLifecycle.html))
// to enable Amazon S3 to remove them for you. If you want to block users or
// accounts from removing or deleting objects from your bucket, you must deny them
// the s3:DeleteObject, s3:DeleteObjectVersion, and s3:PutLifeCycleConfiguration
// actions. The following action is related to DeleteObject:
//
// * PutObject
// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObject.html)
DeleteObject(ctx context.Context, params *s3.DeleteObjectInput,
optFns ...func(*s3.Options)) (*s3.DeleteObjectOutput, error)
// This action enables you to delete multiple objects from a bucket using a single
// HTTP request. If you know the object keys that you want to delete, then this
// action provides a suitable alternative to sending individual delete requests,
// reducing per-request overhead. The request contains a list of up to 1000 keys
// that you want to delete. In the XML, you provide the object key names, and
// optionally, version IDs if you want to delete a specific version of the object
// from a versioning-enabled bucket. For each key, Amazon S3 performs a delete
// action and returns the result of that delete, success, or failure, in the
// response. Note that if the object specified in the request is not found, Amazon
// S3 returns the result as deleted. The action supports two modes for the
// response: verbose and quiet. By default, the action uses verbose mode in which
// the response includes the result of deletion of each key in your request. In
// quiet mode the response includes only keys where the delete action encountered
// an error. For a successful deletion, the action does not return any information
// about the delete in the response body. When performing this action on an MFA
// Delete enabled bucket, that attempts to delete any versioned objects, you must
// include an MFA token. If you do not provide one, the entire request will fail,
// even if there are non-versioned objects you are trying to delete. If you provide
// an invalid token, whether there are versioned keys in the request or not, the
// entire Multi-Object Delete request will fail. For information about MFA Delete,
// see MFA Delete
// (https://docs.aws.amazon.com/AmazonS3/latest/dev/Versioning.html#MultiFactorAuthenticationDelete).
// Finally, the Content-MD5 header is required for all Multi-Object Delete
// requests. Amazon S3 uses the header value to ensure that your request body has
// not been altered in transit. The following operations are related to
// DeleteObjects:
//
// * CreateMultipartUpload
// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateMultipartUpload.html)
//
// *
// UploadPart
// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPart.html)
//
// *
// CompleteMultipartUpload
// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CompleteMultipartUpload.html)
//
// *
// ListParts
// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListParts.html)
//
// *
// AbortMultipartUpload
// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_AbortMultipartUpload.html)
DeleteObjects(ctx context.Context, params *s3.DeleteObjectsInput,
optFns ...func(*s3.Options)) (*s3.DeleteObjectsOutput, error)
// Removes the entire tag set from the specified object. For more information about
// managing object tags, see Object Tagging
// (https://docs.aws.amazon.com/AmazonS3/latest/dev/object-tagging.html). To use