aws-sdk-s3 1.9.0 → 1.40.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/aws-sdk-s3/bucket.rb +22 -3
- data/lib/aws-sdk-s3/bucket_acl.rb +1 -0
- data/lib/aws-sdk-s3/bucket_cors.rb +1 -0
- data/lib/aws-sdk-s3/bucket_lifecycle.rb +3 -2
- data/lib/aws-sdk-s3/bucket_lifecycle_configuration.rb +3 -2
- data/lib/aws-sdk-s3/bucket_notification.rb +9 -5
- data/lib/aws-sdk-s3/bucket_tagging.rb +1 -0
- data/lib/aws-sdk-s3/bucket_website.rb +4 -0
- data/lib/aws-sdk-s3/client.rb +1303 -351
- data/lib/aws-sdk-s3/client_api.rb +352 -2
- data/lib/aws-sdk-s3/customizations/bucket.rb +2 -2
- data/lib/aws-sdk-s3/customizations/object.rb +60 -0
- data/lib/aws-sdk-s3/customizations/object_summary.rb +7 -0
- data/lib/aws-sdk-s3/customizations.rb +1 -0
- data/lib/aws-sdk-s3/encryption/client.rb +1 -1
- data/lib/aws-sdk-s3/encryption/io_auth_decrypter.rb +9 -3
- data/lib/aws-sdk-s3/event_streams.rb +62 -0
- data/lib/aws-sdk-s3/file_downloader.rb +10 -9
- data/lib/aws-sdk-s3/file_part.rb +5 -7
- data/lib/aws-sdk-s3/file_uploader.rb +1 -3
- data/lib/aws-sdk-s3/multipart_stream_uploader.rb +162 -0
- data/lib/aws-sdk-s3/multipart_upload.rb +1 -0
- data/lib/aws-sdk-s3/multipart_upload_part.rb +2 -2
- data/lib/aws-sdk-s3/object.rb +71 -7
- data/lib/aws-sdk-s3/object_acl.rb +1 -0
- data/lib/aws-sdk-s3/object_summary.rb +54 -7
- data/lib/aws-sdk-s3/object_version.rb +11 -0
- data/lib/aws-sdk-s3/plugins/accelerate.rb +4 -0
- data/lib/aws-sdk-s3/plugins/md5s.rb +4 -1
- data/lib/aws-sdk-s3/plugins/redirects.rb +3 -1
- data/lib/aws-sdk-s3/plugins/s3_signer.rb +6 -1
- data/lib/aws-sdk-s3/presigner.rb +4 -0
- data/lib/aws-sdk-s3/resource.rb +4 -0
- data/lib/aws-sdk-s3/types.rb +1539 -227
- data/lib/aws-sdk-s3.rb +2 -1
- metadata +12 -4
data/lib/aws-sdk-s3/object.rb
CHANGED
@@ -46,6 +46,7 @@ module Aws::S3
|
|
46
46
|
data[:delete_marker]
|
47
47
|
end
|
48
48
|
|
49
|
+
|
49
50
|
# @return [String]
|
50
51
|
def accept_ranges
|
51
52
|
data[:accept_ranges]
|
@@ -190,6 +191,7 @@ module Aws::S3
|
|
190
191
|
data[:ssekms_key_id]
|
191
192
|
end
|
192
193
|
|
194
|
+
|
193
195
|
# @return [String]
|
194
196
|
def storage_class
|
195
197
|
data[:storage_class]
|
@@ -202,6 +204,7 @@ module Aws::S3
|
|
202
204
|
data[:request_charged]
|
203
205
|
end
|
204
206
|
|
207
|
+
|
205
208
|
# @return [String]
|
206
209
|
def replication_status
|
207
210
|
data[:replication_status]
|
@@ -213,6 +216,24 @@ module Aws::S3
|
|
213
216
|
data[:parts_count]
|
214
217
|
end
|
215
218
|
|
219
|
+
# The Object Lock mode currently in place for this object.
|
220
|
+
# @return [String]
|
221
|
+
def object_lock_mode
|
222
|
+
data[:object_lock_mode]
|
223
|
+
end
|
224
|
+
|
225
|
+
# The date and time when this object's Object Lock will expire.
|
226
|
+
# @return [Time]
|
227
|
+
def object_lock_retain_until_date
|
228
|
+
data[:object_lock_retain_until_date]
|
229
|
+
end
|
230
|
+
|
231
|
+
# The Legal Hold status for the specified object.
|
232
|
+
# @return [String]
|
233
|
+
def object_lock_legal_hold_status
|
234
|
+
data[:object_lock_legal_hold_status]
|
235
|
+
end
|
236
|
+
|
216
237
|
# @!endgroup
|
217
238
|
|
218
239
|
# @return [Client]
|
@@ -425,7 +446,7 @@ module Aws::S3
|
|
425
446
|
# metadata_directive: "COPY", # accepts COPY, REPLACE
|
426
447
|
# tagging_directive: "COPY", # accepts COPY, REPLACE
|
427
448
|
# server_side_encryption: "AES256", # accepts AES256, aws:kms
|
428
|
-
# storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA, ONEZONE_IA
|
449
|
+
# storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER, DEEP_ARCHIVE
|
429
450
|
# website_redirect_location: "WebsiteRedirectLocation",
|
430
451
|
# sse_customer_algorithm: "SSECustomerAlgorithm",
|
431
452
|
# sse_customer_key: "SSECustomerKey",
|
@@ -436,6 +457,9 @@ module Aws::S3
|
|
436
457
|
# copy_source_sse_customer_key_md5: "CopySourceSSECustomerKeyMD5",
|
437
458
|
# request_payer: "requester", # accepts requester
|
438
459
|
# tagging: "TaggingHeader",
|
460
|
+
# object_lock_mode: "GOVERNANCE", # accepts GOVERNANCE, COMPLIANCE
|
461
|
+
# object_lock_retain_until_date: Time.now,
|
462
|
+
# object_lock_legal_hold_status: "ON", # accepts ON, OFF
|
439
463
|
# })
|
440
464
|
# @param [Hash] options ({})
|
441
465
|
# @option options [String] :acl
|
@@ -533,6 +557,13 @@ module Aws::S3
|
|
533
557
|
# The tag-set for the object destination object this value must be used
|
534
558
|
# in conjunction with the TaggingDirective. The tag-set must be encoded
|
535
559
|
# as URL Query parameters
|
560
|
+
# @option options [String] :object_lock_mode
|
561
|
+
# The Object Lock mode that you want to apply to the copied object.
|
562
|
+
# @option options [Time,DateTime,Date,Integer,String] :object_lock_retain_until_date
|
563
|
+
# The date and time when you want the copied object's Object Lock to
|
564
|
+
# expire.
|
565
|
+
# @option options [String] :object_lock_legal_hold_status
|
566
|
+
# Specifies whether you want to apply a Legal Hold to the copied object.
|
536
567
|
# @return [Types::CopyObjectOutput]
|
537
568
|
def copy_from(options = {})
|
538
569
|
options = options.merge(
|
@@ -549,6 +580,7 @@ module Aws::S3
|
|
549
580
|
# mfa: "MFA",
|
550
581
|
# version_id: "ObjectVersionId",
|
551
582
|
# request_payer: "requester", # accepts requester
|
583
|
+
# bypass_governance_retention: false,
|
552
584
|
# })
|
553
585
|
# @param [Hash] options ({})
|
554
586
|
# @option options [String] :mfa
|
@@ -562,6 +594,9 @@ module Aws::S3
|
|
562
594
|
# requests. Documentation on downloading objects from requester pays
|
563
595
|
# buckets can be found at
|
564
596
|
# http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
|
597
|
+
# @option options [Boolean] :bypass_governance_retention
|
598
|
+
# Indicates whether S3 Object Lock should bypass Governance-mode
|
599
|
+
# restrictions to process this operation.
|
565
600
|
# @return [Types::DeleteObjectOutput]
|
566
601
|
def delete(options = {})
|
567
602
|
options = options.merge(
|
@@ -676,7 +711,7 @@ module Aws::S3
|
|
676
711
|
# "MetadataKey" => "MetadataValue",
|
677
712
|
# },
|
678
713
|
# server_side_encryption: "AES256", # accepts AES256, aws:kms
|
679
|
-
# storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA, ONEZONE_IA
|
714
|
+
# storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER, DEEP_ARCHIVE
|
680
715
|
# website_redirect_location: "WebsiteRedirectLocation",
|
681
716
|
# sse_customer_algorithm: "SSECustomerAlgorithm",
|
682
717
|
# sse_customer_key: "SSECustomerKey",
|
@@ -684,6 +719,9 @@ module Aws::S3
|
|
684
719
|
# ssekms_key_id: "SSEKMSKeyId",
|
685
720
|
# request_payer: "requester", # accepts requester
|
686
721
|
# tagging: "TaggingHeader",
|
722
|
+
# object_lock_mode: "GOVERNANCE", # accepts GOVERNANCE, COMPLIANCE
|
723
|
+
# object_lock_retain_until_date: Time.now,
|
724
|
+
# object_lock_legal_hold_status: "ON", # accepts ON, OFF
|
687
725
|
# })
|
688
726
|
# @param [Hash] options ({})
|
689
727
|
# @option options [String] :acl
|
@@ -750,6 +788,14 @@ module Aws::S3
|
|
750
788
|
# @option options [String] :tagging
|
751
789
|
# The tag-set for the object. The tag-set must be encoded as URL Query
|
752
790
|
# parameters
|
791
|
+
# @option options [String] :object_lock_mode
|
792
|
+
# Specifies the Object Lock mode that you want to apply to the uploaded
|
793
|
+
# object.
|
794
|
+
# @option options [Time,DateTime,Date,Integer,String] :object_lock_retain_until_date
|
795
|
+
# Specifies the date and time when you want the Object Lock to expire.
|
796
|
+
# @option options [String] :object_lock_legal_hold_status
|
797
|
+
# Specifies whether you want to apply a Legal Hold to the uploaded
|
798
|
+
# object.
|
753
799
|
# @return [MultipartUpload]
|
754
800
|
def initiate_multipart_upload(options = {})
|
755
801
|
options = options.merge(
|
@@ -786,7 +832,7 @@ module Aws::S3
|
|
786
832
|
# "MetadataKey" => "MetadataValue",
|
787
833
|
# },
|
788
834
|
# server_side_encryption: "AES256", # accepts AES256, aws:kms
|
789
|
-
# storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA, ONEZONE_IA
|
835
|
+
# storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER, DEEP_ARCHIVE
|
790
836
|
# website_redirect_location: "WebsiteRedirectLocation",
|
791
837
|
# sse_customer_algorithm: "SSECustomerAlgorithm",
|
792
838
|
# sse_customer_key: "SSECustomerKey",
|
@@ -794,6 +840,9 @@ module Aws::S3
|
|
794
840
|
# ssekms_key_id: "SSEKMSKeyId",
|
795
841
|
# request_payer: "requester", # accepts requester
|
796
842
|
# tagging: "TaggingHeader",
|
843
|
+
# object_lock_mode: "GOVERNANCE", # accepts GOVERNANCE, COMPLIANCE
|
844
|
+
# object_lock_retain_until_date: Time.now,
|
845
|
+
# object_lock_legal_hold_status: "ON", # accepts ON, OFF
|
797
846
|
# })
|
798
847
|
# @param [Hash] options ({})
|
799
848
|
# @option options [String] :acl
|
@@ -814,7 +863,8 @@ module Aws::S3
|
|
814
863
|
# Size of the body in bytes. This parameter is useful when the size of
|
815
864
|
# the body cannot be determined automatically.
|
816
865
|
# @option options [String] :content_md5
|
817
|
-
# The base64-encoded 128-bit MD5 digest of the part data.
|
866
|
+
# The base64-encoded 128-bit MD5 digest of the part data. This parameter
|
867
|
+
# is auto-populated when using the command from the CLI
|
818
868
|
# @option options [String] :content_type
|
819
869
|
# A standard MIME type describing the format of the object data.
|
820
870
|
# @option options [Time,DateTime,Date,Integer,String] :expires
|
@@ -866,7 +916,13 @@ module Aws::S3
|
|
866
916
|
# http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
|
867
917
|
# @option options [String] :tagging
|
868
918
|
# The tag-set for the object. The tag-set must be encoded as URL Query
|
869
|
-
# parameters
|
919
|
+
# parameters. (For example, "Key1=Value1")
|
920
|
+
# @option options [String] :object_lock_mode
|
921
|
+
# The Object Lock mode that you want to apply to this object.
|
922
|
+
# @option options [Time,DateTime,Date,Integer,String] :object_lock_retain_until_date
|
923
|
+
# The date and time when you want this object's Object Lock to expire.
|
924
|
+
# @option options [String] :object_lock_legal_hold_status
|
925
|
+
# The Legal Hold status that you want to apply to the specified object.
|
870
926
|
# @return [Types::PutObjectOutput]
|
871
927
|
def put(options = {})
|
872
928
|
options = options.merge(
|
@@ -898,11 +954,14 @@ module Aws::S3
|
|
898
954
|
# record_delimiter: "RecordDelimiter",
|
899
955
|
# field_delimiter: "FieldDelimiter",
|
900
956
|
# quote_character: "QuoteCharacter",
|
957
|
+
# allow_quoted_record_delimiter: false,
|
901
958
|
# },
|
902
|
-
# compression_type: "NONE", # accepts NONE, GZIP
|
959
|
+
# compression_type: "NONE", # accepts NONE, GZIP, BZIP2
|
903
960
|
# json: {
|
904
961
|
# type: "DOCUMENT", # accepts DOCUMENT, LINES
|
905
962
|
# },
|
963
|
+
# parquet: {
|
964
|
+
# },
|
906
965
|
# },
|
907
966
|
# expression_type: "SQL", # required, accepts SQL
|
908
967
|
# expression: "Expression", # required
|
@@ -955,7 +1014,7 @@ module Aws::S3
|
|
955
1014
|
# value: "MetadataValue",
|
956
1015
|
# },
|
957
1016
|
# ],
|
958
|
-
# storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA, ONEZONE_IA
|
1017
|
+
# storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER, DEEP_ARCHIVE
|
959
1018
|
# },
|
960
1019
|
# },
|
961
1020
|
# },
|
@@ -1090,6 +1149,7 @@ module Aws::S3
|
|
1090
1149
|
# object.batch_delete!({
|
1091
1150
|
# mfa: "MFA",
|
1092
1151
|
# request_payer: "requester", # accepts requester
|
1152
|
+
# bypass_governance_retention: false,
|
1093
1153
|
# })
|
1094
1154
|
# @param options ({})
|
1095
1155
|
# @option options [String] :mfa
|
@@ -1101,6 +1161,10 @@ module Aws::S3
|
|
1101
1161
|
# requests. Documentation on downloading objects from requester pays
|
1102
1162
|
# buckets can be found at
|
1103
1163
|
# http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
|
1164
|
+
# @option options [Boolean] :bypass_governance_retention
|
1165
|
+
# Specifies whether you want to delete this object even if it has a
|
1166
|
+
# Governance-type Object Lock in place. You must have sufficient
|
1167
|
+
# permissions to perform this operation.
|
1104
1168
|
# @return [void]
|
1105
1169
|
def batch_delete!(options = {})
|
1106
1170
|
batch_enum.each do |batch|
|
@@ -38,16 +38,19 @@ module Aws::S3
|
|
38
38
|
@key
|
39
39
|
end
|
40
40
|
|
41
|
+
|
41
42
|
# @return [Time]
|
42
43
|
def last_modified
|
43
44
|
data[:last_modified]
|
44
45
|
end
|
45
46
|
|
47
|
+
|
46
48
|
# @return [String]
|
47
49
|
def etag
|
48
50
|
data[:etag]
|
49
51
|
end
|
50
52
|
|
53
|
+
|
51
54
|
# @return [Integer]
|
52
55
|
def size
|
53
56
|
data[:size]
|
@@ -59,6 +62,7 @@ module Aws::S3
|
|
59
62
|
data[:storage_class]
|
60
63
|
end
|
61
64
|
|
65
|
+
|
62
66
|
# @return [Types::Owner]
|
63
67
|
def owner
|
64
68
|
data[:owner]
|
@@ -268,7 +272,7 @@ module Aws::S3
|
|
268
272
|
# metadata_directive: "COPY", # accepts COPY, REPLACE
|
269
273
|
# tagging_directive: "COPY", # accepts COPY, REPLACE
|
270
274
|
# server_side_encryption: "AES256", # accepts AES256, aws:kms
|
271
|
-
# storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA, ONEZONE_IA
|
275
|
+
# storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER, DEEP_ARCHIVE
|
272
276
|
# website_redirect_location: "WebsiteRedirectLocation",
|
273
277
|
# sse_customer_algorithm: "SSECustomerAlgorithm",
|
274
278
|
# sse_customer_key: "SSECustomerKey",
|
@@ -279,6 +283,9 @@ module Aws::S3
|
|
279
283
|
# copy_source_sse_customer_key_md5: "CopySourceSSECustomerKeyMD5",
|
280
284
|
# request_payer: "requester", # accepts requester
|
281
285
|
# tagging: "TaggingHeader",
|
286
|
+
# object_lock_mode: "GOVERNANCE", # accepts GOVERNANCE, COMPLIANCE
|
287
|
+
# object_lock_retain_until_date: Time.now,
|
288
|
+
# object_lock_legal_hold_status: "ON", # accepts ON, OFF
|
282
289
|
# })
|
283
290
|
# @param [Hash] options ({})
|
284
291
|
# @option options [String] :acl
|
@@ -376,6 +383,13 @@ module Aws::S3
|
|
376
383
|
# The tag-set for the object destination object this value must be used
|
377
384
|
# in conjunction with the TaggingDirective. The tag-set must be encoded
|
378
385
|
# as URL Query parameters
|
386
|
+
# @option options [String] :object_lock_mode
|
387
|
+
# The Object Lock mode that you want to apply to the copied object.
|
388
|
+
# @option options [Time,DateTime,Date,Integer,String] :object_lock_retain_until_date
|
389
|
+
# The date and time when you want the copied object's Object Lock to
|
390
|
+
# expire.
|
391
|
+
# @option options [String] :object_lock_legal_hold_status
|
392
|
+
# Specifies whether you want to apply a Legal Hold to the copied object.
|
379
393
|
# @return [Types::CopyObjectOutput]
|
380
394
|
def copy_from(options = {})
|
381
395
|
options = options.merge(
|
@@ -392,6 +406,7 @@ module Aws::S3
|
|
392
406
|
# mfa: "MFA",
|
393
407
|
# version_id: "ObjectVersionId",
|
394
408
|
# request_payer: "requester", # accepts requester
|
409
|
+
# bypass_governance_retention: false,
|
395
410
|
# })
|
396
411
|
# @param [Hash] options ({})
|
397
412
|
# @option options [String] :mfa
|
@@ -405,6 +420,9 @@ module Aws::S3
|
|
405
420
|
# requests. Documentation on downloading objects from requester pays
|
406
421
|
# buckets can be found at
|
407
422
|
# http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
|
423
|
+
# @option options [Boolean] :bypass_governance_retention
|
424
|
+
# Indicates whether S3 Object Lock should bypass Governance-mode
|
425
|
+
# restrictions to process this operation.
|
408
426
|
# @return [Types::DeleteObjectOutput]
|
409
427
|
def delete(options = {})
|
410
428
|
options = options.merge(
|
@@ -519,7 +537,7 @@ module Aws::S3
|
|
519
537
|
# "MetadataKey" => "MetadataValue",
|
520
538
|
# },
|
521
539
|
# server_side_encryption: "AES256", # accepts AES256, aws:kms
|
522
|
-
# storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA, ONEZONE_IA
|
540
|
+
# storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER, DEEP_ARCHIVE
|
523
541
|
# website_redirect_location: "WebsiteRedirectLocation",
|
524
542
|
# sse_customer_algorithm: "SSECustomerAlgorithm",
|
525
543
|
# sse_customer_key: "SSECustomerKey",
|
@@ -527,6 +545,9 @@ module Aws::S3
|
|
527
545
|
# ssekms_key_id: "SSEKMSKeyId",
|
528
546
|
# request_payer: "requester", # accepts requester
|
529
547
|
# tagging: "TaggingHeader",
|
548
|
+
# object_lock_mode: "GOVERNANCE", # accepts GOVERNANCE, COMPLIANCE
|
549
|
+
# object_lock_retain_until_date: Time.now,
|
550
|
+
# object_lock_legal_hold_status: "ON", # accepts ON, OFF
|
530
551
|
# })
|
531
552
|
# @param [Hash] options ({})
|
532
553
|
# @option options [String] :acl
|
@@ -593,6 +614,14 @@ module Aws::S3
|
|
593
614
|
# @option options [String] :tagging
|
594
615
|
# The tag-set for the object. The tag-set must be encoded as URL Query
|
595
616
|
# parameters
|
617
|
+
# @option options [String] :object_lock_mode
|
618
|
+
# Specifies the Object Lock mode that you want to apply to the uploaded
|
619
|
+
# object.
|
620
|
+
# @option options [Time,DateTime,Date,Integer,String] :object_lock_retain_until_date
|
621
|
+
# Specifies the date and time when you want the Object Lock to expire.
|
622
|
+
# @option options [String] :object_lock_legal_hold_status
|
623
|
+
# Specifies whether you want to apply a Legal Hold to the uploaded
|
624
|
+
# object.
|
596
625
|
# @return [MultipartUpload]
|
597
626
|
def initiate_multipart_upload(options = {})
|
598
627
|
options = options.merge(
|
@@ -629,7 +658,7 @@ module Aws::S3
|
|
629
658
|
# "MetadataKey" => "MetadataValue",
|
630
659
|
# },
|
631
660
|
# server_side_encryption: "AES256", # accepts AES256, aws:kms
|
632
|
-
# storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA, ONEZONE_IA
|
661
|
+
# storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER, DEEP_ARCHIVE
|
633
662
|
# website_redirect_location: "WebsiteRedirectLocation",
|
634
663
|
# sse_customer_algorithm: "SSECustomerAlgorithm",
|
635
664
|
# sse_customer_key: "SSECustomerKey",
|
@@ -637,6 +666,9 @@ module Aws::S3
|
|
637
666
|
# ssekms_key_id: "SSEKMSKeyId",
|
638
667
|
# request_payer: "requester", # accepts requester
|
639
668
|
# tagging: "TaggingHeader",
|
669
|
+
# object_lock_mode: "GOVERNANCE", # accepts GOVERNANCE, COMPLIANCE
|
670
|
+
# object_lock_retain_until_date: Time.now,
|
671
|
+
# object_lock_legal_hold_status: "ON", # accepts ON, OFF
|
640
672
|
# })
|
641
673
|
# @param [Hash] options ({})
|
642
674
|
# @option options [String] :acl
|
@@ -657,7 +689,8 @@ module Aws::S3
|
|
657
689
|
# Size of the body in bytes. This parameter is useful when the size of
|
658
690
|
# the body cannot be determined automatically.
|
659
691
|
# @option options [String] :content_md5
|
660
|
-
# The base64-encoded 128-bit MD5 digest of the part data.
|
692
|
+
# The base64-encoded 128-bit MD5 digest of the part data. This parameter
|
693
|
+
# is auto-populated when using the command from the CLI
|
661
694
|
# @option options [String] :content_type
|
662
695
|
# A standard MIME type describing the format of the object data.
|
663
696
|
# @option options [Time,DateTime,Date,Integer,String] :expires
|
@@ -709,7 +742,13 @@ module Aws::S3
|
|
709
742
|
# http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
|
710
743
|
# @option options [String] :tagging
|
711
744
|
# The tag-set for the object. The tag-set must be encoded as URL Query
|
712
|
-
# parameters
|
745
|
+
# parameters. (For example, "Key1=Value1")
|
746
|
+
# @option options [String] :object_lock_mode
|
747
|
+
# The Object Lock mode that you want to apply to this object.
|
748
|
+
# @option options [Time,DateTime,Date,Integer,String] :object_lock_retain_until_date
|
749
|
+
# The date and time when you want this object's Object Lock to expire.
|
750
|
+
# @option options [String] :object_lock_legal_hold_status
|
751
|
+
# The Legal Hold status that you want to apply to the specified object.
|
713
752
|
# @return [Types::PutObjectOutput]
|
714
753
|
def put(options = {})
|
715
754
|
options = options.merge(
|
@@ -741,11 +780,14 @@ module Aws::S3
|
|
741
780
|
# record_delimiter: "RecordDelimiter",
|
742
781
|
# field_delimiter: "FieldDelimiter",
|
743
782
|
# quote_character: "QuoteCharacter",
|
783
|
+
# allow_quoted_record_delimiter: false,
|
744
784
|
# },
|
745
|
-
# compression_type: "NONE", # accepts NONE, GZIP
|
785
|
+
# compression_type: "NONE", # accepts NONE, GZIP, BZIP2
|
746
786
|
# json: {
|
747
787
|
# type: "DOCUMENT", # accepts DOCUMENT, LINES
|
748
788
|
# },
|
789
|
+
# parquet: {
|
790
|
+
# },
|
749
791
|
# },
|
750
792
|
# expression_type: "SQL", # required, accepts SQL
|
751
793
|
# expression: "Expression", # required
|
@@ -798,7 +840,7 @@ module Aws::S3
|
|
798
840
|
# value: "MetadataValue",
|
799
841
|
# },
|
800
842
|
# ],
|
801
|
-
# storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA, ONEZONE_IA
|
843
|
+
# storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER, DEEP_ARCHIVE
|
802
844
|
# },
|
803
845
|
# },
|
804
846
|
# },
|
@@ -942,6 +984,7 @@ module Aws::S3
|
|
942
984
|
# object_summary.batch_delete!({
|
943
985
|
# mfa: "MFA",
|
944
986
|
# request_payer: "requester", # accepts requester
|
987
|
+
# bypass_governance_retention: false,
|
945
988
|
# })
|
946
989
|
# @param options ({})
|
947
990
|
# @option options [String] :mfa
|
@@ -953,6 +996,10 @@ module Aws::S3
|
|
953
996
|
# requests. Documentation on downloading objects from requester pays
|
954
997
|
# buckets can be found at
|
955
998
|
# http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
|
999
|
+
# @option options [Boolean] :bypass_governance_retention
|
1000
|
+
# Specifies whether you want to delete this object even if it has a
|
1001
|
+
# Governance-type Object Lock in place. You must have sufficient
|
1002
|
+
# permissions to perform this operation.
|
956
1003
|
# @return [void]
|
957
1004
|
def batch_delete!(options = {})
|
958
1005
|
batch_enum.each do |batch|
|
@@ -46,6 +46,7 @@ module Aws::S3
|
|
46
46
|
@id
|
47
47
|
end
|
48
48
|
|
49
|
+
|
49
50
|
# @return [String]
|
50
51
|
def etag
|
51
52
|
data[:etag]
|
@@ -88,6 +89,7 @@ module Aws::S3
|
|
88
89
|
data[:last_modified]
|
89
90
|
end
|
90
91
|
|
92
|
+
|
91
93
|
# @return [Types::Owner]
|
92
94
|
def owner
|
93
95
|
data[:owner]
|
@@ -225,6 +227,7 @@ module Aws::S3
|
|
225
227
|
# object_version.delete({
|
226
228
|
# mfa: "MFA",
|
227
229
|
# request_payer: "requester", # accepts requester
|
230
|
+
# bypass_governance_retention: false,
|
228
231
|
# })
|
229
232
|
# @param [Hash] options ({})
|
230
233
|
# @option options [String] :mfa
|
@@ -236,6 +239,9 @@ module Aws::S3
|
|
236
239
|
# requests. Documentation on downloading objects from requester pays
|
237
240
|
# buckets can be found at
|
238
241
|
# http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
|
242
|
+
# @option options [Boolean] :bypass_governance_retention
|
243
|
+
# Indicates whether S3 Object Lock should bypass Governance-mode
|
244
|
+
# restrictions to process this operation.
|
239
245
|
# @return [Types::DeleteObjectOutput]
|
240
246
|
def delete(options = {})
|
241
247
|
options = options.merge(
|
@@ -463,6 +469,7 @@ module Aws::S3
|
|
463
469
|
# object_version.batch_delete!({
|
464
470
|
# mfa: "MFA",
|
465
471
|
# request_payer: "requester", # accepts requester
|
472
|
+
# bypass_governance_retention: false,
|
466
473
|
# })
|
467
474
|
# @param options ({})
|
468
475
|
# @option options [String] :mfa
|
@@ -474,6 +481,10 @@ module Aws::S3
|
|
474
481
|
# requests. Documentation on downloading objects from requester pays
|
475
482
|
# buckets can be found at
|
476
483
|
# http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
|
484
|
+
# @option options [Boolean] :bypass_governance_retention
|
485
|
+
# Specifies whether you want to delete this object even if it has a
|
486
|
+
# Governance-type Object Lock in place. You must have sufficient
|
487
|
+
# permissions to perform this operation.
|
477
488
|
# @return [void]
|
478
489
|
def batch_delete!(options = {})
|
479
490
|
batch_enum.each do |batch|
|
@@ -60,6 +60,8 @@ each bucket. [Go here for more information](http://docs.aws.amazon.com/AmazonS3
|
|
60
60
|
endpoint.port = 443
|
61
61
|
endpoint.host = "#{bucket_name}.s3-accelerate.amazonaws.com"
|
62
62
|
context.http_request.endpoint = endpoint.to_s
|
63
|
+
# s3 accelerate endpoint doesn't work with 'expect' header
|
64
|
+
context.http_request.headers.delete('expect')
|
63
65
|
end
|
64
66
|
|
65
67
|
def use_combined_accelerate_dualstack_endpoint(context)
|
@@ -70,6 +72,8 @@ each bucket. [Go here for more information](http://docs.aws.amazon.com/AmazonS3
|
|
70
72
|
endpoint.port = 443
|
71
73
|
endpoint.host = "#{bucket_name}.s3-accelerate.dualstack.amazonaws.com"
|
72
74
|
context.http_request.endpoint = endpoint.to_s
|
75
|
+
# s3 accelerate endpoint doesn't work with 'expect' header
|
76
|
+
context.http_request.headers.delete('expect')
|
73
77
|
end
|
74
78
|
|
75
79
|
def validate_bucket_name!(bucket_name)
|
@@ -13,6 +13,9 @@ module Aws
|
|
13
13
|
:put_bucket_lifecycle,
|
14
14
|
:put_bucket_policy,
|
15
15
|
:put_bucket_tagging,
|
16
|
+
:put_object_legal_hold,
|
17
|
+
:put_object_lock_configuration,
|
18
|
+
:put_object_retention
|
16
19
|
]
|
17
20
|
|
18
21
|
# @api private
|
@@ -45,7 +48,7 @@ module Aws
|
|
45
48
|
end
|
46
49
|
|
47
50
|
def update_in_chunks(digest, io)
|
48
|
-
while chunk = io.read(CHUNK_SIZE)
|
51
|
+
while chunk = io.read(CHUNK_SIZE, buffer ||= "")
|
49
52
|
digest.update(chunk)
|
50
53
|
end
|
51
54
|
io.rewind
|
@@ -18,7 +18,9 @@ by Amazon S3.
|
|
18
18
|
response = @handler.call(context)
|
19
19
|
if context.http_response.status_code == 307
|
20
20
|
endpoint = context.http_response.headers['location']
|
21
|
-
context.http_request.endpoint
|
21
|
+
unless context.http_request.endpoint.host.include?('fips')
|
22
|
+
context.http_request.endpoint = endpoint
|
23
|
+
end
|
22
24
|
context.http_response.body.truncate(0)
|
23
25
|
@handler.call(context)
|
24
26
|
else
|
@@ -113,7 +113,7 @@ module Aws
|
|
113
113
|
private
|
114
114
|
|
115
115
|
def handle_region_errors(response)
|
116
|
-
if wrong_sigv4_region?(response)
|
116
|
+
if wrong_sigv4_region?(response) && !fips_region?(response)
|
117
117
|
get_region_and_retry(response.context)
|
118
118
|
else
|
119
119
|
response
|
@@ -133,6 +133,10 @@ module Aws
|
|
133
133
|
S3::BUCKET_REGIONS[context.params[:bucket]] = actual_region
|
134
134
|
end
|
135
135
|
|
136
|
+
def fips_region?(resp)
|
137
|
+
resp.context.http_request.endpoint.host.include?('fips')
|
138
|
+
end
|
139
|
+
|
136
140
|
def wrong_sigv4_region?(resp)
|
137
141
|
resp.context.http_response.status_code == 400 &&
|
138
142
|
(
|
@@ -144,6 +148,7 @@ module Aws
|
|
144
148
|
def resign_with_new_region(context, actual_region)
|
145
149
|
context.http_response.body.truncate(0)
|
146
150
|
context.http_request.endpoint.host = S3Signer.new_hostname(context, actual_region)
|
151
|
+
context.metadata[:redirect_region] = actual_region
|
147
152
|
Aws::Plugins::SignatureV4.apply_signature(
|
148
153
|
context: context,
|
149
154
|
signer: S3Signer.build_v4_signer(
|
data/lib/aws-sdk-s3/presigner.rb
CHANGED
@@ -38,6 +38,9 @@ module Aws
|
|
38
38
|
# bucket name will be used as the hostname. This will cause
|
39
39
|
# the returned URL to be 'http' and not 'https'.
|
40
40
|
#
|
41
|
+
# @option params [Boolean] :use_accelerate_endpoint (false) When `true`, Presigner
|
42
|
+
# will attempt to use accelerated endpoint
|
43
|
+
#
|
41
44
|
# @raise [ArgumentError] Raises an ArgumentError if `:expires_in`
|
42
45
|
# exceeds one week.
|
43
46
|
#
|
@@ -98,6 +101,7 @@ module Aws
|
|
98
101
|
req.handlers.remove(Seahorse::Client::Plugins::ContentLength::Handler)
|
99
102
|
|
100
103
|
signer = build_signer(req.context.config)
|
104
|
+
req.context[:presigned_url] = true
|
101
105
|
|
102
106
|
req.handle(step: :send) do |context|
|
103
107
|
|
data/lib/aws-sdk-s3/resource.rb
CHANGED
@@ -34,6 +34,7 @@ module Aws::S3
|
|
34
34
|
# grant_read_acp: "GrantReadACP",
|
35
35
|
# grant_write: "GrantWrite",
|
36
36
|
# grant_write_acp: "GrantWriteACP",
|
37
|
+
# object_lock_enabled_for_bucket: false,
|
37
38
|
# })
|
38
39
|
# @param [Hash] options ({})
|
39
40
|
# @option options [String] :acl
|
@@ -52,6 +53,9 @@ module Aws::S3
|
|
52
53
|
# bucket.
|
53
54
|
# @option options [String] :grant_write_acp
|
54
55
|
# Allows grantee to write the ACL for the applicable bucket.
|
56
|
+
# @option options [Boolean] :object_lock_enabled_for_bucket
|
57
|
+
# Specifies whether you want S3 Object Lock to be enabled for the new
|
58
|
+
# bucket.
|
55
59
|
# @return [Bucket]
|
56
60
|
def create_bucket(options = {})
|
57
61
|
resp = @client.create_bucket(options)
|