aws-sdk-s3 1.24.1 → 1.36.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/aws-sdk-s3/bucket.rb +21 -2
- 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 +6 -3
- 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 +566 -127
- data/lib/aws-sdk-s3/client_api.rb +180 -0
- data/lib/aws-sdk-s3/encryption/client.rb +1 -1
- data/lib/aws-sdk-s3/event_streams.rb +6 -0
- data/lib/aws-sdk-s3/multipart_stream_uploader.rb +2 -0
- data/lib/aws-sdk-s3/multipart_upload.rb +1 -0
- data/lib/aws-sdk-s3/multipart_upload_part.rb +1 -1
- data/lib/aws-sdk-s3/object.rb +66 -5
- data/lib/aws-sdk-s3/object_acl.rb +1 -0
- data/lib/aws-sdk-s3/object_summary.rb +49 -5
- data/lib/aws-sdk-s3/object_version.rb +11 -0
- data/lib/aws-sdk-s3/plugins/md5s.rb +3 -0
- data/lib/aws-sdk-s3/plugins/s3_signer.rb +1 -0
- data/lib/aws-sdk-s3/presigner.rb +3 -0
- data/lib/aws-sdk-s3/resource.rb +4 -0
- data/lib/aws-sdk-s3/types.rb +744 -174
- data/lib/aws-sdk-s3.rb +1 -1
- metadata +5 -5
@@ -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
|
@@ -710,6 +743,12 @@ module Aws::S3
|
|
710
743
|
# @option options [String] :tagging
|
711
744
|
# The tag-set for the object. The tag-set must be encoded as URL Query
|
712
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(
|
@@ -801,7 +840,7 @@ module Aws::S3
|
|
801
840
|
# value: "MetadataValue",
|
802
841
|
# },
|
803
842
|
# ],
|
804
|
-
# 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
|
805
844
|
# },
|
806
845
|
# },
|
807
846
|
# },
|
@@ -945,6 +984,7 @@ module Aws::S3
|
|
945
984
|
# object_summary.batch_delete!({
|
946
985
|
# mfa: "MFA",
|
947
986
|
# request_payer: "requester", # accepts requester
|
987
|
+
# bypass_governance_retention: false,
|
948
988
|
# })
|
949
989
|
# @param options ({})
|
950
990
|
# @option options [String] :mfa
|
@@ -956,6 +996,10 @@ module Aws::S3
|
|
956
996
|
# requests. Documentation on downloading objects from requester pays
|
957
997
|
# buckets can be found at
|
958
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.
|
959
1003
|
# @return [void]
|
960
1004
|
def batch_delete!(options = {})
|
961
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|
|
@@ -148,6 +148,7 @@ module Aws
|
|
148
148
|
def resign_with_new_region(context, actual_region)
|
149
149
|
context.http_response.body.truncate(0)
|
150
150
|
context.http_request.endpoint.host = S3Signer.new_hostname(context, actual_region)
|
151
|
+
context.metadata[:redirect_region] = actual_region
|
151
152
|
Aws::Plugins::SignatureV4.apply_signature(
|
152
153
|
context: context,
|
153
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
|
#
|
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)
|