-
Notifications
You must be signed in to change notification settings - Fork 62
/
Copy paths3.jl
5789 lines (5401 loc) · 315 KB
/
s3.jl
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 auto-generated by AWSMetadata.jl
using AWS
using AWS.AWSServices: s3
using AWS.Compat
using AWS.UUIDs
"""
abort_multipart_upload(bucket, key, upload_id)
abort_multipart_upload(bucket, key, upload_id, params::Dict{String,<:Any})
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 action and ensure that the parts list is empty. For
information about permissions required to use the multipart upload, see Multipart Upload
and Permissions. The following operations are related to AbortMultipartUpload:
CreateMultipartUpload UploadPart CompleteMultipartUpload ListParts
ListMultipartUploads
# Arguments
- `bucket`: The bucket name to which the upload was taking place. When using this action
with an access point, you must direct requests to the access point hostname. The access
point hostname takes the form
AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with
an access point through the Amazon Web Services SDKs, you provide the access point ARN in
place of the bucket name. For more information about access point ARNs, see Using access
points in the Amazon S3 User Guide. When using this action with Amazon S3 on Outposts, you
must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the
form AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When using this
action using S3 on Outposts through the Amazon Web Services SDKs, you provide the Outposts
bucket ARN in place of the bucket name. For more information about S3 on Outposts ARNs, see
Using S3 on Outposts in the Amazon S3 User Guide.
- `key`: Key of the object for which the multipart upload was initiated.
- `upload_id`: Upload ID that identifies the multipart upload.
# Optional Parameters
Optional parameters can be passed as a `params::Dict{String,<:Any}`. Valid keys are:
- `"x-amz-expected-bucket-owner"`: The account ID of the expected bucket owner. If the
bucket is owned by a different account, the request will fail with an HTTP 403 (Access
Denied) error.
- `"x-amz-request-payer"`:
"""
function abort_multipart_upload(
Bucket, Key, uploadId; aws_config::AbstractAWSConfig=global_aws_config()
)
return s3(
"DELETE",
"/$(Bucket)/$(Key)",
Dict{String,Any}("uploadId" => uploadId);
aws_config=aws_config,
)
end
function abort_multipart_upload(
Bucket,
Key,
uploadId,
params::AbstractDict{String};
aws_config::AbstractAWSConfig=global_aws_config(),
)
return s3(
"DELETE",
"/$(Bucket)/$(Key)",
Dict{String,Any}(
mergewith(_merge, Dict{String,Any}("uploadId" => uploadId), params)
);
aws_config=aws_config,
)
end
"""
complete_multipart_upload(bucket, key, upload_id)
complete_multipart_upload(bucket, key, upload_id, params::Dict{String,<:Any})
Completes a multipart upload by assembling previously uploaded parts. You first initiate
the multipart upload and then upload all parts using the UploadPart 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. For more information
about multipart uploads, see Uploading Objects Using Multipart Upload. For information
about permissions required to use the multipart upload API, see Multipart Upload and
Permissions. 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 UploadPart AbortMultipartUpload ListParts
ListMultipartUploads
# Arguments
- `bucket`: Name of the bucket to which the multipart upload was initiated. When using this
action with an access point, you must direct requests to the access point hostname. The
access point hostname takes the form
AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with
an access point through the Amazon Web Services SDKs, you provide the access point ARN in
place of the bucket name. For more information about access point ARNs, see Using access
points in the Amazon S3 User Guide. When using this action with Amazon S3 on Outposts, you
must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the
form AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When using this
action using S3 on Outposts through the Amazon Web Services SDKs, you provide the Outposts
bucket ARN in place of the bucket name. For more information about S3 on Outposts ARNs, see
Using S3 on Outposts in the Amazon S3 User Guide.
- `key`: Object key for which the multipart upload was initiated.
- `upload_id`: ID for the initiated multipart upload.
# Optional Parameters
Optional parameters can be passed as a `params::Dict{String,<:Any}`. Valid keys are:
- `"CompleteMultipartUpload"`: The container for the multipart upload request information.
- `"x-amz-expected-bucket-owner"`: The account ID of the expected bucket owner. If the
bucket is owned by a different account, the request will fail with an HTTP 403 (Access
Denied) error.
- `"x-amz-request-payer"`:
"""
function complete_multipart_upload(
Bucket, Key, uploadId; aws_config::AbstractAWSConfig=global_aws_config()
)
return s3(
"POST",
"/$(Bucket)/$(Key)",
Dict{String,Any}("uploadId" => uploadId);
aws_config=aws_config,
)
end
function complete_multipart_upload(
Bucket,
Key,
uploadId,
params::AbstractDict{String};
aws_config::AbstractAWSConfig=global_aws_config(),
)
return s3(
"POST",
"/$(Bucket)/$(Key)",
Dict{String,Any}(
mergewith(_merge, Dict{String,Any}("uploadId" => uploadId), params)
);
aws_config=aws_config,
)
end
"""
copy_object(bucket, key, x-amz-copy-source)
copy_object(bucket, key, x-amz-copy-source, params::Dict{String,<:Any})
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 API. For more information, see Copy Object
Using the REST Multipart Upload API. 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. 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. 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. 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. 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 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.
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. 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 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 and Managing ACLs
Using the REST API. 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 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. The following operations
are related to CopyObject: PutObject GetObject For more information, see Copying
Objects.
# Arguments
- `bucket`: The name of the destination bucket. When using this action with an access
point, you must direct requests to the access point hostname. The access point hostname
takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using
this action with an access point through the Amazon Web Services SDKs, you provide the
access point ARN in place of the bucket name. For more information about access point ARNs,
see Using access points in the Amazon S3 User Guide. When using this action with Amazon S3
on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts
hostname takes the form
AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When using this
action using S3 on Outposts through the Amazon Web Services SDKs, you provide the Outposts
bucket ARN in place of the bucket name. For more information about S3 on Outposts ARNs, see
Using S3 on Outposts in the Amazon S3 User Guide.
- `key`: The key of the destination object.
- `x-amz-copy-source`: Specifies the source object for the copy operation. You specify the
value in one of two formats, depending on whether you want to access the source object
through an access point: For objects not accessed through an access point, specify the
name of the source bucket and the key of the source object, separated by a slash (/). For
example, to copy the object reports/january.pdf from the bucket awsexamplebucket, use
awsexamplebucket/reports/january.pdf. The value must be URL encoded. For objects accessed
through access points, specify the Amazon Resource Name (ARN) of the object as accessed
through the access point, in the format
arn:aws:s3:<Region>:<account-id>:accesspoint/<access-point-name>/object/&l
t;key>. For example, to copy the object reports/january.pdf through access point
my-access-point owned by account 123456789012 in Region us-west-2, use the URL encoding of
arn:aws:s3:us-west-2:123456789012:accesspoint/my-access-point/object/reports/january.pdf.
The value must be URL encoded. Amazon S3 supports copy operations using access points only
when the source and destination buckets are in the same Amazon Web Services Region.
Alternatively, for objects accessed through Amazon S3 on Outposts, specify the ARN of the
object as accessed in the format
arn:aws:s3-outposts:<Region>:<account-id>:outpost/<outpost-id>/object/<
;key>. For example, to copy the object reports/january.pdf through outpost my-outpost
owned by account 123456789012 in Region us-west-2, use the URL encoding of
arn:aws:s3-outposts:us-west-2:123456789012:outpost/my-outpost/object/reports/january.pdf.
The value must be URL encoded. To copy a specific version of an object, append
?versionId=<version-id> to the value (for example,
awsexamplebucket/reports/january.pdf?versionId=QUpfdndhfd8438MNFDN93jdnJFkdmqnh893). If you
don't specify a version ID, Amazon S3 copies the latest version of the source object.
# Optional Parameters
Optional parameters can be passed as a `params::Dict{String,<:Any}`. Valid keys are:
- `"Cache-Control"`: Specifies caching behavior along the request/reply chain.
- `"Content-Disposition"`: Specifies presentational information for the object.
- `"Content-Encoding"`: Specifies what content encodings have been applied to the object
and thus what decoding mechanisms must be applied to obtain the media-type referenced by
the Content-Type header field.
- `"Content-Language"`: The language the content is in.
- `"Content-Type"`: A standard MIME type describing the format of the object data.
- `"Expires"`: The date and time at which the object is no longer cacheable.
- `"x-amz-acl"`: The canned ACL to apply to the object. This action is not supported by
Amazon S3 on Outposts.
- `"x-amz-copy-source-if-match"`: Copies the object if its entity tag (ETag) matches the
specified tag.
- `"x-amz-copy-source-if-modified-since"`: Copies the object if it has been modified since
the specified time.
- `"x-amz-copy-source-if-none-match"`: Copies the object if its entity tag (ETag) is
different than the specified ETag.
- `"x-amz-copy-source-if-unmodified-since"`: Copies the object if it hasn't been modified
since the specified time.
- `"x-amz-copy-source-server-side-encryption-customer-algorithm"`: Specifies the algorithm
to use when decrypting the source object (for example, AES256).
- `"x-amz-copy-source-server-side-encryption-customer-key"`: Specifies the
customer-provided encryption key for Amazon S3 to use to decrypt the source object. The
encryption key provided in this header must be one that was used when the source object was
created.
- `"x-amz-copy-source-server-side-encryption-customer-key-MD5"`: Specifies the 128-bit MD5
digest of the encryption key according to RFC 1321. Amazon S3 uses this header for a
message integrity check to ensure that the encryption key was transmitted without error.
- `"x-amz-expected-bucket-owner"`: The account ID of the expected destination bucket owner.
If the destination bucket is owned by a different account, the request will fail with an
HTTP 403 (Access Denied) error.
- `"x-amz-grant-full-control"`: Gives the grantee READ, READ_ACP, and WRITE_ACP permissions
on the object. This action is not supported by Amazon S3 on Outposts.
- `"x-amz-grant-read"`: Allows grantee to read the object data and its metadata. This
action is not supported by Amazon S3 on Outposts.
- `"x-amz-grant-read-acp"`: Allows grantee to read the object ACL. This action is not
supported by Amazon S3 on Outposts.
- `"x-amz-grant-write-acp"`: Allows grantee to write the ACL for the applicable object.
This action is not supported by Amazon S3 on Outposts.
- `"x-amz-meta-"`: A map of metadata to store with the object in S3.
- `"x-amz-metadata-directive"`: Specifies whether the metadata is copied from the source
object or replaced with metadata provided in the request.
- `"x-amz-object-lock-legal-hold"`: Specifies whether you want to apply a Legal Hold to the
copied object.
- `"x-amz-object-lock-mode"`: The Object Lock mode that you want to apply to the copied
object.
- `"x-amz-object-lock-retain-until-date"`: The date and time when you want the copied
object's Object Lock to expire.
- `"x-amz-request-payer"`:
- `"x-amz-server-side-encryption"`: The server-side encryption algorithm used when storing
this object in Amazon S3 (for example, AES256, aws:kms).
- `"x-amz-server-side-encryption-aws-kms-key-id"`: Specifies the Amazon Web Services KMS
key ID to use for object encryption. All GET and PUT requests for an object protected by
Amazon Web Services KMS will fail if not made via SSL or using SigV4. For information about
configuring using any of the officially supported Amazon Web Services SDKs and Amazon Web
Services CLI, see Specifying the Signature Version in Request Authentication in the Amazon
S3 User Guide.
- `"x-amz-server-side-encryption-bucket-key-enabled"`: Specifies whether Amazon S3 should
use an S3 Bucket Key for object encryption with server-side encryption using AWS KMS
(SSE-KMS). Setting this header to true causes Amazon S3 to use an S3 Bucket Key for object
encryption with SSE-KMS. Specifying this header with a COPY action doesn’t affect
bucket-level settings for S3 Bucket Key.
- `"x-amz-server-side-encryption-context"`: Specifies the Amazon Web Services KMS
Encryption Context to use for object encryption. The value of this header is a
base64-encoded UTF-8 string holding JSON with the encryption context key-value pairs.
- `"x-amz-server-side-encryption-customer-algorithm"`: Specifies the algorithm to use to
when encrypting the object (for example, AES256).
- `"x-amz-server-side-encryption-customer-key"`: Specifies the customer-provided encryption
key for Amazon S3 to use in encrypting data. This value is used to store the object and
then it is discarded; Amazon S3 does not store the encryption key. The key must be
appropriate for use with the algorithm specified in the
x-amz-server-side-encryption-customer-algorithm header.
- `"x-amz-server-side-encryption-customer-key-MD5"`: Specifies the 128-bit MD5 digest of
the encryption key according to RFC 1321. Amazon S3 uses this header for a message
integrity check to ensure that the encryption key was transmitted without error.
- `"x-amz-source-expected-bucket-owner"`: The account ID of the expected source bucket
owner. If the source bucket is owned by a different account, the request will fail with an
HTTP 403 (Access Denied) error.
- `"x-amz-storage-class"`: By default, Amazon S3 uses the STANDARD Storage Class to store
newly created objects. The STANDARD storage class provides high durability and high
availability. Depending on performance needs, you can specify a different Storage Class.
Amazon S3 on Outposts only uses the OUTPOSTS Storage Class. For more information, see
Storage Classes in the Amazon S3 User Guide.
- `"x-amz-tagging"`: The tag-set for the object destination object this value must be used
in conjunction with the TaggingDirective. The tag-set must be encoded as URL Query
parameters.
- `"x-amz-tagging-directive"`: Specifies whether the object tag-set are copied from the
source object or replaced with tag-set provided in the request.
- `"x-amz-website-redirect-location"`: If the bucket is configured as a website, redirects
requests for this object to another object in the same bucket or to an external URL. Amazon
S3 stores the value of this header in the object metadata.
"""
function copy_object(
Bucket, Key, x_amz_copy_source; aws_config::AbstractAWSConfig=global_aws_config()
)
return s3(
"PUT",
"/$(Bucket)/$(Key)",
Dict{String,Any}(
"headers" => Dict{String,Any}("x-amz-copy-source" => x_amz_copy_source)
);
aws_config=aws_config,
)
end
function copy_object(
Bucket,
Key,
x_amz_copy_source,
params::AbstractDict{String};
aws_config::AbstractAWSConfig=global_aws_config(),
)
return s3(
"PUT",
"/$(Bucket)/$(Key)",
Dict{String,Any}(
mergewith(
_merge,
Dict{String,Any}(
"headers" => Dict{String,Any}("x-amz-copy-source" => x_amz_copy_source)
),
params,
),
);
aws_config=aws_config,
)
end
"""
create_bucket(bucket)
create_bucket(bucket, params::Dict{String,<:Any})
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. If you want to create an Amazon S3 on Outposts
bucket, see Create Bucket. 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. 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. When creating a bucket using this operation, you can
optionally specify the accounts or groups that should be granted specific permissions on
the bucket. 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. 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. 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 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 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, only s3:CreateBucket permission is
needed. If ObjectLockEnabledForBucket is set to true in your CreateBucket request,
s3:PutBucketObjectLockConfiguration and s3:PutBucketVersioning permissions are required.
The following operations are related to CreateBucket: PutObject DeleteBucket
# Arguments
- `bucket`: The name of the bucket to create.
# Optional Parameters
Optional parameters can be passed as a `params::Dict{String,<:Any}`. Valid keys are:
- `"CreateBucketConfiguration"`: The configuration information for the bucket.
- `"x-amz-acl"`: The canned ACL to apply to the bucket.
- `"x-amz-bucket-object-lock-enabled"`: Specifies whether you want S3 Object Lock to be
enabled for the new bucket.
- `"x-amz-grant-full-control"`: Allows grantee the read, write, read ACP, and write ACP
permissions on the bucket.
- `"x-amz-grant-read"`: Allows grantee to list the objects in the bucket.
- `"x-amz-grant-read-acp"`: Allows grantee to read the bucket ACL.
- `"x-amz-grant-write"`: Allows grantee to create new objects in the bucket. For the bucket
and object owners of existing objects, also allows deletions and overwrites of those
objects.
- `"x-amz-grant-write-acp"`: Allows grantee to write the ACL for the applicable bucket.
"""
function create_bucket(Bucket; aws_config::AbstractAWSConfig=global_aws_config())
return s3("PUT", "/$(Bucket)"; aws_config=aws_config)
end
function create_bucket(
Bucket, params::AbstractDict{String}; aws_config::AbstractAWSConfig=global_aws_config()
)
return s3("PUT", "/$(Bucket)", params; aws_config=aws_config)
end
"""
create_multipart_upload(bucket, key)
create_multipart_upload(bucket, key, params::Dict{String,<:Any})
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). 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. 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. For information about the permissions required to use the
multipart upload API, see Multipart Upload and Permissions. 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). 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 Key
Management Service (Amazon Web Services KMS) customer master keys (CMKs) or Amazon
S3-managed encryption keys. If you choose to provide your own encryption key, the request
headers you provide in UploadPart and UploadPartCopy 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 CMK, 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 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 Amazon Web
Services KMS CMK, 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. 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. 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. 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 master keys (CMKs) 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
CMK 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 CMKs stored in Amazon
Web Services KMS (SSE-KMS), see Protecting Data Using Server-Side Encryption with CMKs
stored in Amazon Web Services KMS. 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 CMKs stored in Amazon Web Services KMS (SSE-KMS), see Protecting Data Using
Server-Side Encryption with CMKs stored in Amazon Web Services KMS. 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. 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. 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. 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 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 CompleteMultipartUpload AbortMultipartUpload ListParts
ListMultipartUploads
# Arguments
- `bucket`: The name of the bucket to which to initiate the upload When using this action
with an access point, you must direct requests to the access point hostname. The access
point hostname takes the form
AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with
an access point through the Amazon Web Services SDKs, you provide the access point ARN in
place of the bucket name. For more information about access point ARNs, see Using access
points in the Amazon S3 User Guide. When using this action with Amazon S3 on Outposts, you
must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the
form AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When using this
action using S3 on Outposts through the Amazon Web Services SDKs, you provide the Outposts
bucket ARN in place of the bucket name. For more information about S3 on Outposts ARNs, see
Using S3 on Outposts in the Amazon S3 User Guide.
- `key`: Object key for which the multipart upload is to be initiated.
# Optional Parameters
Optional parameters can be passed as a `params::Dict{String,<:Any}`. Valid keys are:
- `"Cache-Control"`: Specifies caching behavior along the request/reply chain.
- `"Content-Disposition"`: Specifies presentational information for the object.
- `"Content-Encoding"`: Specifies what content encodings have been applied to the object
and thus what decoding mechanisms must be applied to obtain the media-type referenced by
the Content-Type header field.
- `"Content-Language"`: The language the content is in.
- `"Content-Type"`: A standard MIME type describing the format of the object data.
- `"Expires"`: The date and time at which the object is no longer cacheable.
- `"x-amz-acl"`: The canned ACL to apply to the object. This action is not supported by
Amazon S3 on Outposts.
- `"x-amz-expected-bucket-owner"`: The account ID of the expected bucket owner. If the
bucket is owned by a different account, the request will fail with an HTTP 403 (Access
Denied) error.
- `"x-amz-grant-full-control"`: Gives the grantee READ, READ_ACP, and WRITE_ACP permissions
on the object. This action is not supported by Amazon S3 on Outposts.
- `"x-amz-grant-read"`: Allows grantee to read the object data and its metadata. This
action is not supported by Amazon S3 on Outposts.
- `"x-amz-grant-read-acp"`: Allows grantee to read the object ACL. This action is not
supported by Amazon S3 on Outposts.
- `"x-amz-grant-write-acp"`: Allows grantee to write the ACL for the applicable object.
This action is not supported by Amazon S3 on Outposts.
- `"x-amz-meta-"`: A map of metadata to store with the object in S3.
- `"x-amz-object-lock-legal-hold"`: Specifies whether you want to apply a Legal Hold to the
uploaded object.
- `"x-amz-object-lock-mode"`: Specifies the Object Lock mode that you want to apply to the
uploaded object.
- `"x-amz-object-lock-retain-until-date"`: Specifies the date and time when you want the
Object Lock to expire.
- `"x-amz-request-payer"`:
- `"x-amz-server-side-encryption"`: The server-side encryption algorithm used when storing
this object in Amazon S3 (for example, AES256, aws:kms).
- `"x-amz-server-side-encryption-aws-kms-key-id"`: Specifies the ID of the symmetric
customer managed Amazon Web Services KMS CMK to use for object encryption. All GET and PUT
requests for an object protected by Amazon Web Services KMS will fail if not made via SSL
or using SigV4. For information about configuring using any of the officially supported
Amazon Web Services SDKs and Amazon Web Services CLI, see Specifying the Signature Version
in Request Authentication in the Amazon S3 User Guide.
- `"x-amz-server-side-encryption-bucket-key-enabled"`: Specifies whether Amazon S3 should
use an S3 Bucket Key for object encryption with server-side encryption using AWS KMS
(SSE-KMS). Setting this header to true causes Amazon S3 to use an S3 Bucket Key for object
encryption with SSE-KMS. Specifying this header with an object action doesn’t affect
bucket-level settings for S3 Bucket Key.
- `"x-amz-server-side-encryption-context"`: Specifies the Amazon Web Services KMS
Encryption Context to use for object encryption. The value of this header is a
base64-encoded UTF-8 string holding JSON with the encryption context key-value pairs.
- `"x-amz-server-side-encryption-customer-algorithm"`: Specifies the algorithm to use to
when encrypting the object (for example, AES256).
- `"x-amz-server-side-encryption-customer-key"`: Specifies the customer-provided encryption
key for Amazon S3 to use in encrypting data. This value is used to store the object and
then it is discarded; Amazon S3 does not store the encryption key. The key must be
appropriate for use with the algorithm specified in the
x-amz-server-side-encryption-customer-algorithm header.
- `"x-amz-server-side-encryption-customer-key-MD5"`: Specifies the 128-bit MD5 digest of
the encryption key according to RFC 1321. Amazon S3 uses this header for a message
integrity check to ensure that the encryption key was transmitted without error.
- `"x-amz-storage-class"`: By default, Amazon S3 uses the STANDARD Storage Class to store
newly created objects. The STANDARD storage class provides high durability and high
availability. Depending on performance needs, you can specify a different Storage Class.
Amazon S3 on Outposts only uses the OUTPOSTS Storage Class. For more information, see
Storage Classes in the Amazon S3 User Guide.
- `"x-amz-tagging"`: The tag-set for the object. The tag-set must be encoded as URL Query
parameters.
- `"x-amz-website-redirect-location"`: If the bucket is configured as a website, redirects
requests for this object to another object in the same bucket or to an external URL. Amazon
S3 stores the value of this header in the object metadata.
"""
function create_multipart_upload(
Bucket, Key; aws_config::AbstractAWSConfig=global_aws_config()
)
return s3("POST", "/$(Bucket)/$(Key)?uploads"; aws_config=aws_config)
end
function create_multipart_upload(
Bucket,
Key,
params::AbstractDict{String};
aws_config::AbstractAWSConfig=global_aws_config(),
)
return s3("POST", "/$(Bucket)/$(Key)?uploads", params; aws_config=aws_config)
end
"""
delete_bucket(bucket)
delete_bucket(bucket, params::Dict{String,<:Any})
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 DeleteObject
# Arguments
- `bucket`: Specifies the bucket being deleted.
# Optional Parameters
Optional parameters can be passed as a `params::Dict{String,<:Any}`. Valid keys are:
- `"x-amz-expected-bucket-owner"`: The account ID of the expected bucket owner. If the
bucket is owned by a different account, the request will fail with an HTTP 403 (Access
Denied) error.
"""
function delete_bucket(Bucket; aws_config::AbstractAWSConfig=global_aws_config())
return s3("DELETE", "/$(Bucket)"; aws_config=aws_config)
end
function delete_bucket(
Bucket, params::AbstractDict{String}; aws_config::AbstractAWSConfig=global_aws_config()
)
return s3("DELETE", "/$(Bucket)", params; aws_config=aws_config)
end
"""
delete_bucket_analytics_configuration(bucket, id)
delete_bucket_analytics_configuration(bucket, id, params::Dict{String,<:Any})
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 and Managing Access Permissions to
Your Amazon S3 Resources. For information about the Amazon S3 analytics feature, see Amazon
S3 Analytics – Storage Class Analysis. The following operations are related to
DeleteBucketAnalyticsConfiguration: GetBucketAnalyticsConfiguration
ListBucketAnalyticsConfigurations PutBucketAnalyticsConfiguration
# Arguments
- `bucket`: The name of the bucket from which an analytics configuration is deleted.
- `id`: The ID that identifies the analytics configuration.
# Optional Parameters
Optional parameters can be passed as a `params::Dict{String,<:Any}`. Valid keys are:
- `"x-amz-expected-bucket-owner"`: The account ID of the expected bucket owner. If the
bucket is owned by a different account, the request will fail with an HTTP 403 (Access
Denied) error.
"""
function delete_bucket_analytics_configuration(
Bucket, id; aws_config::AbstractAWSConfig=global_aws_config()
)
return s3(
"DELETE",
"/$(Bucket)?analytics",
Dict{String,Any}("id" => id);
aws_config=aws_config,
)
end
function delete_bucket_analytics_configuration(
Bucket,
id,
params::AbstractDict{String};
aws_config::AbstractAWSConfig=global_aws_config(),
)
return s3(
"DELETE",
"/$(Bucket)?analytics",
Dict{String,Any}(mergewith(_merge, Dict{String,Any}("id" => id), params));
aws_config=aws_config,
)
end
"""
delete_bucket_cors(bucket)
delete_bucket_cors(bucket, params::Dict{String,<:Any})
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 in the Amazon S3 User Guide. Related Resources:
PutBucketCors RESTOPTIONSobject
# Arguments
- `bucket`: Specifies the bucket whose cors configuration is being deleted.
# Optional Parameters
Optional parameters can be passed as a `params::Dict{String,<:Any}`. Valid keys are:
- `"x-amz-expected-bucket-owner"`: The account ID of the expected bucket owner. If the
bucket is owned by a different account, the request will fail with an HTTP 403 (Access
Denied) error.
"""
function delete_bucket_cors(Bucket; aws_config::AbstractAWSConfig=global_aws_config())
return s3("DELETE", "/$(Bucket)?cors"; aws_config=aws_config)
end
function delete_bucket_cors(
Bucket, params::AbstractDict{String}; aws_config::AbstractAWSConfig=global_aws_config()
)
return s3("DELETE", "/$(Bucket)?cors", params; aws_config=aws_config)
end
"""
delete_bucket_encryption(bucket)
delete_bucket_encryption(bucket, params::Dict{String,<:Any})
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 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 and Managing Access
Permissions to your Amazon S3 Resources in the Amazon S3 User Guide. Related Resources
PutBucketEncryption GetBucketEncryption
# Arguments
- `bucket`: The name of the bucket containing the server-side encryption configuration to
delete.
# Optional Parameters
Optional parameters can be passed as a `params::Dict{String,<:Any}`. Valid keys are:
- `"x-amz-expected-bucket-owner"`: The account ID of the expected bucket owner. If the
bucket is owned by a different account, the request will fail with an HTTP 403 (Access
Denied) error.
"""
function delete_bucket_encryption(Bucket; aws_config::AbstractAWSConfig=global_aws_config())
return s3("DELETE", "/$(Bucket)?encryption"; aws_config=aws_config)
end
function delete_bucket_encryption(
Bucket, params::AbstractDict{String}; aws_config::AbstractAWSConfig=global_aws_config()
)
return s3("DELETE", "/$(Bucket)?encryption", params; aws_config=aws_config)
end
"""
delete_bucket_intelligent_tiering_configuration(bucket, id)
delete_bucket_intelligent_tiering_configuration(bucket, id, params::Dict{String,<:Any})
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 additional operational
overhead. S3 Intelligent-Tiering delivers automatic cost savings by moving data between
access tiers, when access patterns change. The S3 Intelligent-Tiering storage class is
suitable for objects larger than 128 KB that you plan to store for at least 30 days. If the
size of an object is less than 128 KB, it is 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. If you delete an object before the end of the 30-day
minimum storage duration period, you are charged for 30 days. For more information, see
Storage class for automatically optimizing frequently and infrequently accessed objects.
Operations related to DeleteBucketIntelligentTieringConfiguration include:
GetBucketIntelligentTieringConfiguration PutBucketIntelligentTieringConfiguration
ListBucketIntelligentTieringConfigurations
# Arguments
- `bucket`: The name of the Amazon S3 bucket whose configuration you want to modify or
retrieve.
- `id`: The ID used to identify the S3 Intelligent-Tiering configuration.
"""
function delete_bucket_intelligent_tiering_configuration(
Bucket, id; aws_config::AbstractAWSConfig=global_aws_config()
)
return s3(
"DELETE",
"/$(Bucket)?intelligent-tiering",
Dict{String,Any}("id" => id);
aws_config=aws_config,
)
end
function delete_bucket_intelligent_tiering_configuration(
Bucket,
id,
params::AbstractDict{String};
aws_config::AbstractAWSConfig=global_aws_config(),
)
return s3(
"DELETE",
"/$(Bucket)?intelligent-tiering",
Dict{String,Any}(mergewith(_merge, Dict{String,Any}("id" => id), params));
aws_config=aws_config,
)
end
"""
delete_bucket_inventory_configuration(bucket, id)
delete_bucket_inventory_configuration(bucket, id, params::Dict{String,<:Any})
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 and Managing Access Permissions to Your Amazon S3 Resources.
For information about the Amazon S3 inventory feature, see Amazon S3 Inventory. Operations
related to DeleteBucketInventoryConfiguration include: GetBucketInventoryConfiguration
PutBucketInventoryConfiguration ListBucketInventoryConfigurations
# Arguments
- `bucket`: The name of the bucket containing the inventory configuration to delete.
- `id`: The ID used to identify the inventory configuration.
# Optional Parameters
Optional parameters can be passed as a `params::Dict{String,<:Any}`. Valid keys are:
- `"x-amz-expected-bucket-owner"`: The account ID of the expected bucket owner. If the
bucket is owned by a different account, the request will fail with an HTTP 403 (Access
Denied) error.
"""
function delete_bucket_inventory_configuration(
Bucket, id; aws_config::AbstractAWSConfig=global_aws_config()
)
return s3(
"DELETE",
"/$(Bucket)?inventory",
Dict{String,Any}("id" => id);
aws_config=aws_config,
)
end
function delete_bucket_inventory_configuration(
Bucket,
id,
params::AbstractDict{String};
aws_config::AbstractAWSConfig=global_aws_config(),
)
return s3(
"DELETE",
"/$(Bucket)?inventory",
Dict{String,Any}(mergewith(_merge, Dict{String,Any}("id" => id), params));
aws_config=aws_config,
)
end
"""
delete_bucket_lifecycle(bucket)
delete_bucket_lifecycle(bucket, params::Dict{String,<:Any})
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. Related actions include:
PutBucketLifecycleConfiguration GetBucketLifecycleConfiguration
# Arguments
- `bucket`: The bucket name of the lifecycle to delete.
# Optional Parameters
Optional parameters can be passed as a `params::Dict{String,<:Any}`. Valid keys are:
- `"x-amz-expected-bucket-owner"`: The account ID of the expected bucket owner. If the
bucket is owned by a different account, the request will fail with an HTTP 403 (Access
Denied) error.
"""
function delete_bucket_lifecycle(Bucket; aws_config::AbstractAWSConfig=global_aws_config())
return s3("DELETE", "/$(Bucket)?lifecycle"; aws_config=aws_config)
end
function delete_bucket_lifecycle(
Bucket, params::AbstractDict{String}; aws_config::AbstractAWSConfig=global_aws_config()
)
return s3("DELETE", "/$(Bucket)?lifecycle", params; aws_config=aws_config)
end
"""
delete_bucket_metrics_configuration(bucket, id)
delete_bucket_metrics_configuration(bucket, id, params::Dict{String,<:Any})
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 and Managing Access Permissions to
Your Amazon S3 Resources. For information about CloudWatch request metrics for Amazon S3,
see Monitoring Metrics with Amazon CloudWatch. The following operations are related to
DeleteBucketMetricsConfiguration: GetBucketMetricsConfiguration
PutBucketMetricsConfiguration ListBucketMetricsConfigurations Monitoring Metrics
with Amazon CloudWatch
# Arguments
- `bucket`: The name of the bucket containing the metrics configuration to delete.
- `id`: The ID used to identify the metrics configuration.
# Optional Parameters
Optional parameters can be passed as a `params::Dict{String,<:Any}`. Valid keys are:
- `"x-amz-expected-bucket-owner"`: The account ID of the expected bucket owner. If the
bucket is owned by a different account, the request will fail with an HTTP 403 (Access
Denied) error.
"""
function delete_bucket_metrics_configuration(
Bucket, id; aws_config::AbstractAWSConfig=global_aws_config()
)
return s3(
"DELETE", "/$(Bucket)?metrics", Dict{String,Any}("id" => id); aws_config=aws_config
)
end
function delete_bucket_metrics_configuration(
Bucket,
id,
params::AbstractDict{String};
aws_config::AbstractAWSConfig=global_aws_config(),
)
return s3(
"DELETE",
"/$(Bucket)?metrics",
Dict{String,Any}(mergewith(_merge, Dict{String,Any}("id" => id), params));
aws_config=aws_config,
)
end
"""
delete_bucket_ownership_controls(bucket)
delete_bucket_ownership_controls(bucket, params::Dict{String,<:Any})
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. For information about Amazon S3 Object Ownership,
see Using Object Ownership. The following operations are related to
DeleteBucketOwnershipControls: GetBucketOwnershipControls PutBucketOwnershipControls
# Arguments
- `bucket`: The Amazon S3 bucket whose OwnershipControls you want to delete.