forked from aws/aws-sdk-go
-
Notifications
You must be signed in to change notification settings - Fork 0
/
api.go
6378 lines (4940 loc) · 213 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
// THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
// Package s3 provides a client for Amazon Simple Storage Service.
package s3
import (
"io"
"time"
"github.com/aws/aws-sdk-go/aws/awsutil"
"github.com/aws/aws-sdk-go/aws/request"
"github.com/aws/aws-sdk-go/private/protocol"
"github.com/aws/aws-sdk-go/private/protocol/restxml"
)
const opAbortMultipartUpload = "AbortMultipartUpload"
// AbortMultipartUploadRequest generates a request for the AbortMultipartUpload operation.
func (c *S3) AbortMultipartUploadRequest(input *AbortMultipartUploadInput) (req *request.Request, output *AbortMultipartUploadOutput) {
op := &request.Operation{
Name: opAbortMultipartUpload,
HTTPMethod: "DELETE",
HTTPPath: "/{Bucket}/{Key+}",
}
if input == nil {
input = &AbortMultipartUploadInput{}
}
req = c.newRequest(op, input, output)
output = &AbortMultipartUploadOutput{}
req.Data = output
return
}
// Aborts a multipart upload.
//
// To verify that all parts have been removed, so you don't get charged for
// the part storage, you should call the List Parts operation and ensure the
// parts list is empty.
func (c *S3) AbortMultipartUpload(input *AbortMultipartUploadInput) (*AbortMultipartUploadOutput, error) {
req, out := c.AbortMultipartUploadRequest(input)
err := req.Send()
return out, err
}
const opCompleteMultipartUpload = "CompleteMultipartUpload"
// CompleteMultipartUploadRequest generates a request for the CompleteMultipartUpload operation.
func (c *S3) CompleteMultipartUploadRequest(input *CompleteMultipartUploadInput) (req *request.Request, output *CompleteMultipartUploadOutput) {
op := &request.Operation{
Name: opCompleteMultipartUpload,
HTTPMethod: "POST",
HTTPPath: "/{Bucket}/{Key+}",
}
if input == nil {
input = &CompleteMultipartUploadInput{}
}
req = c.newRequest(op, input, output)
output = &CompleteMultipartUploadOutput{}
req.Data = output
return
}
// Completes a multipart upload by assembling previously uploaded parts.
func (c *S3) CompleteMultipartUpload(input *CompleteMultipartUploadInput) (*CompleteMultipartUploadOutput, error) {
req, out := c.CompleteMultipartUploadRequest(input)
err := req.Send()
return out, err
}
const opCopyObject = "CopyObject"
// CopyObjectRequest generates a request for the CopyObject operation.
func (c *S3) CopyObjectRequest(input *CopyObjectInput) (req *request.Request, output *CopyObjectOutput) {
op := &request.Operation{
Name: opCopyObject,
HTTPMethod: "PUT",
HTTPPath: "/{Bucket}/{Key+}",
}
if input == nil {
input = &CopyObjectInput{}
}
req = c.newRequest(op, input, output)
output = &CopyObjectOutput{}
req.Data = output
return
}
// Creates a copy of an object that is already stored in Amazon S3.
func (c *S3) CopyObject(input *CopyObjectInput) (*CopyObjectOutput, error) {
req, out := c.CopyObjectRequest(input)
err := req.Send()
return out, err
}
const opCreateBucket = "CreateBucket"
// CreateBucketRequest generates a request for the CreateBucket operation.
func (c *S3) CreateBucketRequest(input *CreateBucketInput) (req *request.Request, output *CreateBucketOutput) {
op := &request.Operation{
Name: opCreateBucket,
HTTPMethod: "PUT",
HTTPPath: "/{Bucket}",
}
if input == nil {
input = &CreateBucketInput{}
}
req = c.newRequest(op, input, output)
output = &CreateBucketOutput{}
req.Data = output
return
}
// Creates a new bucket.
func (c *S3) CreateBucket(input *CreateBucketInput) (*CreateBucketOutput, error) {
req, out := c.CreateBucketRequest(input)
err := req.Send()
return out, err
}
const opCreateMultipartUpload = "CreateMultipartUpload"
// CreateMultipartUploadRequest generates a request for the CreateMultipartUpload operation.
func (c *S3) CreateMultipartUploadRequest(input *CreateMultipartUploadInput) (req *request.Request, output *CreateMultipartUploadOutput) {
op := &request.Operation{
Name: opCreateMultipartUpload,
HTTPMethod: "POST",
HTTPPath: "/{Bucket}/{Key+}?uploads",
}
if input == nil {
input = &CreateMultipartUploadInput{}
}
req = c.newRequest(op, input, output)
output = &CreateMultipartUploadOutput{}
req.Data = output
return
}
// Initiates a multipart upload and returns an upload ID.
//
// Note: After you initiate multipart upload and upload one or more parts, you
// must either complete or abort multipart upload in order to stop getting charged
// for storage of the uploaded parts. Only after you either complete or abort
// multipart upload, Amazon S3 frees up the parts storage and stops charging
// you for the parts storage.
func (c *S3) CreateMultipartUpload(input *CreateMultipartUploadInput) (*CreateMultipartUploadOutput, error) {
req, out := c.CreateMultipartUploadRequest(input)
err := req.Send()
return out, err
}
const opDeleteBucket = "DeleteBucket"
// DeleteBucketRequest generates a request for the DeleteBucket operation.
func (c *S3) DeleteBucketRequest(input *DeleteBucketInput) (req *request.Request, output *DeleteBucketOutput) {
op := &request.Operation{
Name: opDeleteBucket,
HTTPMethod: "DELETE",
HTTPPath: "/{Bucket}",
}
if input == nil {
input = &DeleteBucketInput{}
}
req = c.newRequest(op, input, output)
req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
output = &DeleteBucketOutput{}
req.Data = output
return
}
// Deletes the bucket. All objects (including all object versions and Delete
// Markers) in the bucket must be deleted before the bucket itself can be deleted.
func (c *S3) DeleteBucket(input *DeleteBucketInput) (*DeleteBucketOutput, error) {
req, out := c.DeleteBucketRequest(input)
err := req.Send()
return out, err
}
const opDeleteBucketCors = "DeleteBucketCors"
// DeleteBucketCorsRequest generates a request for the DeleteBucketCors operation.
func (c *S3) DeleteBucketCorsRequest(input *DeleteBucketCorsInput) (req *request.Request, output *DeleteBucketCorsOutput) {
op := &request.Operation{
Name: opDeleteBucketCors,
HTTPMethod: "DELETE",
HTTPPath: "/{Bucket}?cors",
}
if input == nil {
input = &DeleteBucketCorsInput{}
}
req = c.newRequest(op, input, output)
req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
output = &DeleteBucketCorsOutput{}
req.Data = output
return
}
// Deletes the cors configuration information set for the bucket.
func (c *S3) DeleteBucketCors(input *DeleteBucketCorsInput) (*DeleteBucketCorsOutput, error) {
req, out := c.DeleteBucketCorsRequest(input)
err := req.Send()
return out, err
}
const opDeleteBucketLifecycle = "DeleteBucketLifecycle"
// DeleteBucketLifecycleRequest generates a request for the DeleteBucketLifecycle operation.
func (c *S3) DeleteBucketLifecycleRequest(input *DeleteBucketLifecycleInput) (req *request.Request, output *DeleteBucketLifecycleOutput) {
op := &request.Operation{
Name: opDeleteBucketLifecycle,
HTTPMethod: "DELETE",
HTTPPath: "/{Bucket}?lifecycle",
}
if input == nil {
input = &DeleteBucketLifecycleInput{}
}
req = c.newRequest(op, input, output)
req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
output = &DeleteBucketLifecycleOutput{}
req.Data = output
return
}
// Deletes the lifecycle configuration from the bucket.
func (c *S3) DeleteBucketLifecycle(input *DeleteBucketLifecycleInput) (*DeleteBucketLifecycleOutput, error) {
req, out := c.DeleteBucketLifecycleRequest(input)
err := req.Send()
return out, err
}
const opDeleteBucketPolicy = "DeleteBucketPolicy"
// DeleteBucketPolicyRequest generates a request for the DeleteBucketPolicy operation.
func (c *S3) DeleteBucketPolicyRequest(input *DeleteBucketPolicyInput) (req *request.Request, output *DeleteBucketPolicyOutput) {
op := &request.Operation{
Name: opDeleteBucketPolicy,
HTTPMethod: "DELETE",
HTTPPath: "/{Bucket}?policy",
}
if input == nil {
input = &DeleteBucketPolicyInput{}
}
req = c.newRequest(op, input, output)
req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
output = &DeleteBucketPolicyOutput{}
req.Data = output
return
}
// Deletes the policy from the bucket.
func (c *S3) DeleteBucketPolicy(input *DeleteBucketPolicyInput) (*DeleteBucketPolicyOutput, error) {
req, out := c.DeleteBucketPolicyRequest(input)
err := req.Send()
return out, err
}
const opDeleteBucketReplication = "DeleteBucketReplication"
// DeleteBucketReplicationRequest generates a request for the DeleteBucketReplication operation.
func (c *S3) DeleteBucketReplicationRequest(input *DeleteBucketReplicationInput) (req *request.Request, output *DeleteBucketReplicationOutput) {
op := &request.Operation{
Name: opDeleteBucketReplication,
HTTPMethod: "DELETE",
HTTPPath: "/{Bucket}?replication",
}
if input == nil {
input = &DeleteBucketReplicationInput{}
}
req = c.newRequest(op, input, output)
req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
output = &DeleteBucketReplicationOutput{}
req.Data = output
return
}
// Deletes the replication configuration from the bucket.
func (c *S3) DeleteBucketReplication(input *DeleteBucketReplicationInput) (*DeleteBucketReplicationOutput, error) {
req, out := c.DeleteBucketReplicationRequest(input)
err := req.Send()
return out, err
}
const opDeleteBucketTagging = "DeleteBucketTagging"
// DeleteBucketTaggingRequest generates a request for the DeleteBucketTagging operation.
func (c *S3) DeleteBucketTaggingRequest(input *DeleteBucketTaggingInput) (req *request.Request, output *DeleteBucketTaggingOutput) {
op := &request.Operation{
Name: opDeleteBucketTagging,
HTTPMethod: "DELETE",
HTTPPath: "/{Bucket}?tagging",
}
if input == nil {
input = &DeleteBucketTaggingInput{}
}
req = c.newRequest(op, input, output)
req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
output = &DeleteBucketTaggingOutput{}
req.Data = output
return
}
// Deletes the tags from the bucket.
func (c *S3) DeleteBucketTagging(input *DeleteBucketTaggingInput) (*DeleteBucketTaggingOutput, error) {
req, out := c.DeleteBucketTaggingRequest(input)
err := req.Send()
return out, err
}
const opDeleteBucketWebsite = "DeleteBucketWebsite"
// DeleteBucketWebsiteRequest generates a request for the DeleteBucketWebsite operation.
func (c *S3) DeleteBucketWebsiteRequest(input *DeleteBucketWebsiteInput) (req *request.Request, output *DeleteBucketWebsiteOutput) {
op := &request.Operation{
Name: opDeleteBucketWebsite,
HTTPMethod: "DELETE",
HTTPPath: "/{Bucket}?website",
}
if input == nil {
input = &DeleteBucketWebsiteInput{}
}
req = c.newRequest(op, input, output)
req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
output = &DeleteBucketWebsiteOutput{}
req.Data = output
return
}
// This operation removes the website configuration from the bucket.
func (c *S3) DeleteBucketWebsite(input *DeleteBucketWebsiteInput) (*DeleteBucketWebsiteOutput, error) {
req, out := c.DeleteBucketWebsiteRequest(input)
err := req.Send()
return out, err
}
const opDeleteObject = "DeleteObject"
// DeleteObjectRequest generates a request for the DeleteObject operation.
func (c *S3) DeleteObjectRequest(input *DeleteObjectInput) (req *request.Request, output *DeleteObjectOutput) {
op := &request.Operation{
Name: opDeleteObject,
HTTPMethod: "DELETE",
HTTPPath: "/{Bucket}/{Key+}",
}
if input == nil {
input = &DeleteObjectInput{}
}
req = c.newRequest(op, input, output)
output = &DeleteObjectOutput{}
req.Data = output
return
}
// 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.
func (c *S3) DeleteObject(input *DeleteObjectInput) (*DeleteObjectOutput, error) {
req, out := c.DeleteObjectRequest(input)
err := req.Send()
return out, err
}
const opDeleteObjects = "DeleteObjects"
// DeleteObjectsRequest generates a request for the DeleteObjects operation.
func (c *S3) DeleteObjectsRequest(input *DeleteObjectsInput) (req *request.Request, output *DeleteObjectsOutput) {
op := &request.Operation{
Name: opDeleteObjects,
HTTPMethod: "POST",
HTTPPath: "/{Bucket}?delete",
}
if input == nil {
input = &DeleteObjectsInput{}
}
req = c.newRequest(op, input, output)
output = &DeleteObjectsOutput{}
req.Data = output
return
}
// This operation enables you to delete multiple objects from a bucket using
// a single HTTP request. You may specify up to 1000 keys.
func (c *S3) DeleteObjects(input *DeleteObjectsInput) (*DeleteObjectsOutput, error) {
req, out := c.DeleteObjectsRequest(input)
err := req.Send()
return out, err
}
const opGetBucketAcl = "GetBucketAcl"
// GetBucketAclRequest generates a request for the GetBucketAcl operation.
func (c *S3) GetBucketAclRequest(input *GetBucketAclInput) (req *request.Request, output *GetBucketAclOutput) {
op := &request.Operation{
Name: opGetBucketAcl,
HTTPMethod: "GET",
HTTPPath: "/{Bucket}?acl",
}
if input == nil {
input = &GetBucketAclInput{}
}
req = c.newRequest(op, input, output)
output = &GetBucketAclOutput{}
req.Data = output
return
}
// Gets the access control policy for the bucket.
func (c *S3) GetBucketAcl(input *GetBucketAclInput) (*GetBucketAclOutput, error) {
req, out := c.GetBucketAclRequest(input)
err := req.Send()
return out, err
}
const opGetBucketCors = "GetBucketCors"
// GetBucketCorsRequest generates a request for the GetBucketCors operation.
func (c *S3) GetBucketCorsRequest(input *GetBucketCorsInput) (req *request.Request, output *GetBucketCorsOutput) {
op := &request.Operation{
Name: opGetBucketCors,
HTTPMethod: "GET",
HTTPPath: "/{Bucket}?cors",
}
if input == nil {
input = &GetBucketCorsInput{}
}
req = c.newRequest(op, input, output)
output = &GetBucketCorsOutput{}
req.Data = output
return
}
// Returns the cors configuration for the bucket.
func (c *S3) GetBucketCors(input *GetBucketCorsInput) (*GetBucketCorsOutput, error) {
req, out := c.GetBucketCorsRequest(input)
err := req.Send()
return out, err
}
const opGetBucketLifecycle = "GetBucketLifecycle"
// GetBucketLifecycleRequest generates a request for the GetBucketLifecycle operation.
func (c *S3) GetBucketLifecycleRequest(input *GetBucketLifecycleInput) (req *request.Request, output *GetBucketLifecycleOutput) {
if c.Client.Config.Logger != nil {
c.Client.Config.Logger.Log("This operation, GetBucketLifecycle, has been deprecated")
}
op := &request.Operation{
Name: opGetBucketLifecycle,
HTTPMethod: "GET",
HTTPPath: "/{Bucket}?lifecycle",
}
if input == nil {
input = &GetBucketLifecycleInput{}
}
req = c.newRequest(op, input, output)
output = &GetBucketLifecycleOutput{}
req.Data = output
return
}
// Deprecated, see the GetBucketLifecycleConfiguration operation.
func (c *S3) GetBucketLifecycle(input *GetBucketLifecycleInput) (*GetBucketLifecycleOutput, error) {
req, out := c.GetBucketLifecycleRequest(input)
err := req.Send()
return out, err
}
const opGetBucketLifecycleConfiguration = "GetBucketLifecycleConfiguration"
// GetBucketLifecycleConfigurationRequest generates a request for the GetBucketLifecycleConfiguration operation.
func (c *S3) GetBucketLifecycleConfigurationRequest(input *GetBucketLifecycleConfigurationInput) (req *request.Request, output *GetBucketLifecycleConfigurationOutput) {
op := &request.Operation{
Name: opGetBucketLifecycleConfiguration,
HTTPMethod: "GET",
HTTPPath: "/{Bucket}?lifecycle",
}
if input == nil {
input = &GetBucketLifecycleConfigurationInput{}
}
req = c.newRequest(op, input, output)
output = &GetBucketLifecycleConfigurationOutput{}
req.Data = output
return
}
// Returns the lifecycle configuration information set on the bucket.
func (c *S3) GetBucketLifecycleConfiguration(input *GetBucketLifecycleConfigurationInput) (*GetBucketLifecycleConfigurationOutput, error) {
req, out := c.GetBucketLifecycleConfigurationRequest(input)
err := req.Send()
return out, err
}
const opGetBucketLocation = "GetBucketLocation"
// GetBucketLocationRequest generates a request for the GetBucketLocation operation.
func (c *S3) GetBucketLocationRequest(input *GetBucketLocationInput) (req *request.Request, output *GetBucketLocationOutput) {
op := &request.Operation{
Name: opGetBucketLocation,
HTTPMethod: "GET",
HTTPPath: "/{Bucket}?location",
}
if input == nil {
input = &GetBucketLocationInput{}
}
req = c.newRequest(op, input, output)
output = &GetBucketLocationOutput{}
req.Data = output
return
}
// Returns the region the bucket resides in.
func (c *S3) GetBucketLocation(input *GetBucketLocationInput) (*GetBucketLocationOutput, error) {
req, out := c.GetBucketLocationRequest(input)
err := req.Send()
return out, err
}
const opGetBucketLogging = "GetBucketLogging"
// GetBucketLoggingRequest generates a request for the GetBucketLogging operation.
func (c *S3) GetBucketLoggingRequest(input *GetBucketLoggingInput) (req *request.Request, output *GetBucketLoggingOutput) {
op := &request.Operation{
Name: opGetBucketLogging,
HTTPMethod: "GET",
HTTPPath: "/{Bucket}?logging",
}
if input == nil {
input = &GetBucketLoggingInput{}
}
req = c.newRequest(op, input, output)
output = &GetBucketLoggingOutput{}
req.Data = output
return
}
// Returns the logging status of a bucket and the permissions users have to
// view and modify that status. To use GET, you must be the bucket owner.
func (c *S3) GetBucketLogging(input *GetBucketLoggingInput) (*GetBucketLoggingOutput, error) {
req, out := c.GetBucketLoggingRequest(input)
err := req.Send()
return out, err
}
const opGetBucketNotification = "GetBucketNotification"
// GetBucketNotificationRequest generates a request for the GetBucketNotification operation.
func (c *S3) GetBucketNotificationRequest(input *GetBucketNotificationConfigurationRequest) (req *request.Request, output *NotificationConfigurationDeprecated) {
if c.Client.Config.Logger != nil {
c.Client.Config.Logger.Log("This operation, GetBucketNotification, has been deprecated")
}
op := &request.Operation{
Name: opGetBucketNotification,
HTTPMethod: "GET",
HTTPPath: "/{Bucket}?notification",
}
if input == nil {
input = &GetBucketNotificationConfigurationRequest{}
}
req = c.newRequest(op, input, output)
output = &NotificationConfigurationDeprecated{}
req.Data = output
return
}
// Deprecated, see the GetBucketNotificationConfiguration operation.
func (c *S3) GetBucketNotification(input *GetBucketNotificationConfigurationRequest) (*NotificationConfigurationDeprecated, error) {
req, out := c.GetBucketNotificationRequest(input)
err := req.Send()
return out, err
}
const opGetBucketNotificationConfiguration = "GetBucketNotificationConfiguration"
// GetBucketNotificationConfigurationRequest generates a request for the GetBucketNotificationConfiguration operation.
func (c *S3) GetBucketNotificationConfigurationRequest(input *GetBucketNotificationConfigurationRequest) (req *request.Request, output *NotificationConfiguration) {
op := &request.Operation{
Name: opGetBucketNotificationConfiguration,
HTTPMethod: "GET",
HTTPPath: "/{Bucket}?notification",
}
if input == nil {
input = &GetBucketNotificationConfigurationRequest{}
}
req = c.newRequest(op, input, output)
output = &NotificationConfiguration{}
req.Data = output
return
}
// Returns the notification configuration of a bucket.
func (c *S3) GetBucketNotificationConfiguration(input *GetBucketNotificationConfigurationRequest) (*NotificationConfiguration, error) {
req, out := c.GetBucketNotificationConfigurationRequest(input)
err := req.Send()
return out, err
}
const opGetBucketPolicy = "GetBucketPolicy"
// GetBucketPolicyRequest generates a request for the GetBucketPolicy operation.
func (c *S3) GetBucketPolicyRequest(input *GetBucketPolicyInput) (req *request.Request, output *GetBucketPolicyOutput) {
op := &request.Operation{
Name: opGetBucketPolicy,
HTTPMethod: "GET",
HTTPPath: "/{Bucket}?policy",
}
if input == nil {
input = &GetBucketPolicyInput{}
}
req = c.newRequest(op, input, output)
output = &GetBucketPolicyOutput{}
req.Data = output
return
}
// Returns the policy of a specified bucket.
func (c *S3) GetBucketPolicy(input *GetBucketPolicyInput) (*GetBucketPolicyOutput, error) {
req, out := c.GetBucketPolicyRequest(input)
err := req.Send()
return out, err
}
const opGetBucketReplication = "GetBucketReplication"
// GetBucketReplicationRequest generates a request for the GetBucketReplication operation.
func (c *S3) GetBucketReplicationRequest(input *GetBucketReplicationInput) (req *request.Request, output *GetBucketReplicationOutput) {
op := &request.Operation{
Name: opGetBucketReplication,
HTTPMethod: "GET",
HTTPPath: "/{Bucket}?replication",
}
if input == nil {
input = &GetBucketReplicationInput{}
}
req = c.newRequest(op, input, output)
output = &GetBucketReplicationOutput{}
req.Data = output
return
}
// Deprecated, see the GetBucketReplicationConfiguration operation.
func (c *S3) GetBucketReplication(input *GetBucketReplicationInput) (*GetBucketReplicationOutput, error) {
req, out := c.GetBucketReplicationRequest(input)
err := req.Send()
return out, err
}
const opGetBucketRequestPayment = "GetBucketRequestPayment"
// GetBucketRequestPaymentRequest generates a request for the GetBucketRequestPayment operation.
func (c *S3) GetBucketRequestPaymentRequest(input *GetBucketRequestPaymentInput) (req *request.Request, output *GetBucketRequestPaymentOutput) {
op := &request.Operation{
Name: opGetBucketRequestPayment,
HTTPMethod: "GET",
HTTPPath: "/{Bucket}?requestPayment",
}
if input == nil {
input = &GetBucketRequestPaymentInput{}
}
req = c.newRequest(op, input, output)
output = &GetBucketRequestPaymentOutput{}
req.Data = output
return
}
// Returns the request payment configuration of a bucket.
func (c *S3) GetBucketRequestPayment(input *GetBucketRequestPaymentInput) (*GetBucketRequestPaymentOutput, error) {
req, out := c.GetBucketRequestPaymentRequest(input)
err := req.Send()
return out, err
}
const opGetBucketTagging = "GetBucketTagging"
// GetBucketTaggingRequest generates a request for the GetBucketTagging operation.
func (c *S3) GetBucketTaggingRequest(input *GetBucketTaggingInput) (req *request.Request, output *GetBucketTaggingOutput) {
op := &request.Operation{
Name: opGetBucketTagging,
HTTPMethod: "GET",
HTTPPath: "/{Bucket}?tagging",
}
if input == nil {
input = &GetBucketTaggingInput{}
}
req = c.newRequest(op, input, output)
output = &GetBucketTaggingOutput{}
req.Data = output
return
}
// Returns the tag set associated with the bucket.
func (c *S3) GetBucketTagging(input *GetBucketTaggingInput) (*GetBucketTaggingOutput, error) {
req, out := c.GetBucketTaggingRequest(input)
err := req.Send()
return out, err
}
const opGetBucketVersioning = "GetBucketVersioning"
// GetBucketVersioningRequest generates a request for the GetBucketVersioning operation.
func (c *S3) GetBucketVersioningRequest(input *GetBucketVersioningInput) (req *request.Request, output *GetBucketVersioningOutput) {
op := &request.Operation{
Name: opGetBucketVersioning,
HTTPMethod: "GET",
HTTPPath: "/{Bucket}?versioning",
}
if input == nil {
input = &GetBucketVersioningInput{}
}
req = c.newRequest(op, input, output)
output = &GetBucketVersioningOutput{}
req.Data = output
return
}
// Returns the versioning state of a bucket.
func (c *S3) GetBucketVersioning(input *GetBucketVersioningInput) (*GetBucketVersioningOutput, error) {
req, out := c.GetBucketVersioningRequest(input)
err := req.Send()
return out, err
}
const opGetBucketWebsite = "GetBucketWebsite"
// GetBucketWebsiteRequest generates a request for the GetBucketWebsite operation.
func (c *S3) GetBucketWebsiteRequest(input *GetBucketWebsiteInput) (req *request.Request, output *GetBucketWebsiteOutput) {
op := &request.Operation{
Name: opGetBucketWebsite,
HTTPMethod: "GET",
HTTPPath: "/{Bucket}?website",
}
if input == nil {
input = &GetBucketWebsiteInput{}
}
req = c.newRequest(op, input, output)
output = &GetBucketWebsiteOutput{}
req.Data = output
return
}
// Returns the website configuration for a bucket.
func (c *S3) GetBucketWebsite(input *GetBucketWebsiteInput) (*GetBucketWebsiteOutput, error) {
req, out := c.GetBucketWebsiteRequest(input)
err := req.Send()
return out, err
}
const opGetObject = "GetObject"
// GetObjectRequest generates a request for the GetObject operation.
func (c *S3) GetObjectRequest(input *GetObjectInput) (req *request.Request, output *GetObjectOutput) {
op := &request.Operation{
Name: opGetObject,
HTTPMethod: "GET",
HTTPPath: "/{Bucket}/{Key+}",
}
if input == nil {
input = &GetObjectInput{}
}
req = c.newRequest(op, input, output)
output = &GetObjectOutput{}
req.Data = output
return
}
// Retrieves objects from Amazon S3.
func (c *S3) GetObject(input *GetObjectInput) (*GetObjectOutput, error) {
req, out := c.GetObjectRequest(input)
err := req.Send()
return out, err
}
const opGetObjectAcl = "GetObjectAcl"
// GetObjectAclRequest generates a request for the GetObjectAcl operation.
func (c *S3) GetObjectAclRequest(input *GetObjectAclInput) (req *request.Request, output *GetObjectAclOutput) {
op := &request.Operation{
Name: opGetObjectAcl,
HTTPMethod: "GET",
HTTPPath: "/{Bucket}/{Key+}?acl",
}
if input == nil {
input = &GetObjectAclInput{}
}
req = c.newRequest(op, input, output)
output = &GetObjectAclOutput{}
req.Data = output
return
}
// Returns the access control list (ACL) of an object.
func (c *S3) GetObjectAcl(input *GetObjectAclInput) (*GetObjectAclOutput, error) {
req, out := c.GetObjectAclRequest(input)
err := req.Send()
return out, err
}
const opGetObjectTorrent = "GetObjectTorrent"
// GetObjectTorrentRequest generates a request for the GetObjectTorrent operation.
func (c *S3) GetObjectTorrentRequest(input *GetObjectTorrentInput) (req *request.Request, output *GetObjectTorrentOutput) {
op := &request.Operation{
Name: opGetObjectTorrent,
HTTPMethod: "GET",
HTTPPath: "/{Bucket}/{Key+}?torrent",
}
if input == nil {
input = &GetObjectTorrentInput{}
}
req = c.newRequest(op, input, output)
output = &GetObjectTorrentOutput{}
req.Data = output
return
}
// Return torrent files from a bucket.
func (c *S3) GetObjectTorrent(input *GetObjectTorrentInput) (*GetObjectTorrentOutput, error) {
req, out := c.GetObjectTorrentRequest(input)
err := req.Send()
return out, err
}
const opHeadBucket = "HeadBucket"
// HeadBucketRequest generates a request for the HeadBucket operation.
func (c *S3) HeadBucketRequest(input *HeadBucketInput) (req *request.Request, output *HeadBucketOutput) {
op := &request.Operation{
Name: opHeadBucket,
HTTPMethod: "HEAD",
HTTPPath: "/{Bucket}",
}
if input == nil {
input = &HeadBucketInput{}
}
req = c.newRequest(op, input, output)
req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
output = &HeadBucketOutput{}
req.Data = output
return
}
// This operation is useful to determine if a bucket exists and you have permission
// to access it.
func (c *S3) HeadBucket(input *HeadBucketInput) (*HeadBucketOutput, error) {
req, out := c.HeadBucketRequest(input)
err := req.Send()
return out, err
}
const opHeadObject = "HeadObject"
// HeadObjectRequest generates a request for the HeadObject operation.
func (c *S3) HeadObjectRequest(input *HeadObjectInput) (req *request.Request, output *HeadObjectOutput) {
op := &request.Operation{
Name: opHeadObject,
HTTPMethod: "HEAD",
HTTPPath: "/{Bucket}/{Key+}",
}
if input == nil {
input = &HeadObjectInput{}
}
req = c.newRequest(op, input, output)
output = &HeadObjectOutput{}
req.Data = output
return
}
// The HEAD operation retrieves metadata from an object without returning the
// object itself. This operation is useful if you're only interested in an object's
// metadata. To use HEAD, you must have READ access to the object.
func (c *S3) HeadObject(input *HeadObjectInput) (*HeadObjectOutput, error) {
req, out := c.HeadObjectRequest(input)
err := req.Send()
return out, err
}
const opListBuckets = "ListBuckets"
// ListBucketsRequest generates a request for the ListBuckets operation.
func (c *S3) ListBucketsRequest(input *ListBucketsInput) (req *request.Request, output *ListBucketsOutput) {
op := &request.Operation{
Name: opListBuckets,
HTTPMethod: "GET",
HTTPPath: "/",
}
if input == nil {
input = &ListBucketsInput{}
}
req = c.newRequest(op, input, output)
output = &ListBucketsOutput{}
req.Data = output
return
}
// Returns a list of all buckets owned by the authenticated sender of the request.
func (c *S3) ListBuckets(input *ListBucketsInput) (*ListBucketsOutput, error) {
req, out := c.ListBucketsRequest(input)
err := req.Send()
return out, err
}
const opListMultipartUploads = "ListMultipartUploads"
// ListMultipartUploadsRequest generates a request for the ListMultipartUploads operation.
func (c *S3) ListMultipartUploadsRequest(input *ListMultipartUploadsInput) (req *request.Request, output *ListMultipartUploadsOutput) {
op := &request.Operation{
Name: opListMultipartUploads,
HTTPMethod: "GET",
HTTPPath: "/{Bucket}?uploads",
Paginator: &request.Paginator{
InputTokens: []string{"KeyMarker", "UploadIdMarker"},
OutputTokens: []string{"NextKeyMarker", "NextUploadIdMarker"},
LimitToken: "MaxUploads",
TruncationToken: "IsTruncated",
},
}
if input == nil {
input = &ListMultipartUploadsInput{}
}
req = c.newRequest(op, input, output)
output = &ListMultipartUploadsOutput{}
req.Data = output
return
}
// This operation lists in-progress multipart uploads.