aws-sdk-s3 1.107.0 → 1.111.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +20 -0
- data/VERSION +1 -1
- data/lib/aws-sdk-s3/bucket.rb +19 -1
- data/lib/aws-sdk-s3/bucket_lifecycle.rb +2 -2
- data/lib/aws-sdk-s3/bucket_lifecycle_configuration.rb +2 -2
- data/lib/aws-sdk-s3/bucket_notification.rb +15 -3
- data/lib/aws-sdk-s3/client.rb +437 -310
- data/lib/aws-sdk-s3/client_api.rb +7 -0
- data/lib/aws-sdk-s3/object.rb +6 -16
- data/lib/aws-sdk-s3/object_summary.rb +4 -4
- data/lib/aws-sdk-s3/object_version.rb +2 -12
- data/lib/aws-sdk-s3/plugins/iad_regional_endpoint.rb +6 -0
- data/lib/aws-sdk-s3/resource.rb +18 -0
- data/lib/aws-sdk-s3/types.rb +160 -93
- data/lib/aws-sdk-s3.rb +1 -1
- metadata +4 -4
@@ -158,6 +158,7 @@ module Aws::S3
|
|
158
158
|
ErrorMessage = Shapes::StringShape.new(name: 'ErrorMessage')
|
159
159
|
Errors = Shapes::ListShape.new(name: 'Errors', flattened: true)
|
160
160
|
Event = Shapes::StringShape.new(name: 'Event')
|
161
|
+
EventBridgeConfiguration = Shapes::StructureShape.new(name: 'EventBridgeConfiguration')
|
161
162
|
EventList = Shapes::ListShape.new(name: 'EventList', flattened: true)
|
162
163
|
ExistingObjectReplication = Shapes::StructureShape.new(name: 'ExistingObjectReplication')
|
163
164
|
ExistingObjectReplicationStatus = Shapes::StringShape.new(name: 'ExistingObjectReplicationStatus')
|
@@ -521,6 +522,7 @@ module Aws::S3
|
|
521
522
|
ServerSideEncryptionRules = Shapes::ListShape.new(name: 'ServerSideEncryptionRules', flattened: true)
|
522
523
|
Setting = Shapes::BooleanShape.new(name: 'Setting')
|
523
524
|
Size = Shapes::IntegerShape.new(name: 'Size')
|
525
|
+
SkipValidation = Shapes::BooleanShape.new(name: 'SkipValidation')
|
524
526
|
SourceSelectionCriteria = Shapes::StructureShape.new(name: 'SourceSelectionCriteria')
|
525
527
|
SseKmsEncryptedObjects = Shapes::StructureShape.new(name: 'SseKmsEncryptedObjects')
|
526
528
|
SseKmsEncryptedObjectsStatus = Shapes::StringShape.new(name: 'SseKmsEncryptedObjectsStatus')
|
@@ -799,6 +801,7 @@ module Aws::S3
|
|
799
801
|
CreateBucketRequest.add_member(:grant_write, Shapes::ShapeRef.new(shape: GrantWrite, location: "header", location_name: "x-amz-grant-write"))
|
800
802
|
CreateBucketRequest.add_member(:grant_write_acp, Shapes::ShapeRef.new(shape: GrantWriteACP, location: "header", location_name: "x-amz-grant-write-acp"))
|
801
803
|
CreateBucketRequest.add_member(:object_lock_enabled_for_bucket, Shapes::ShapeRef.new(shape: ObjectLockEnabledForBucket, location: "header", location_name: "x-amz-bucket-object-lock-enabled"))
|
804
|
+
CreateBucketRequest.add_member(:object_ownership, Shapes::ShapeRef.new(shape: ObjectOwnership, location: "header", location_name: "x-amz-object-ownership"))
|
802
805
|
CreateBucketRequest.struct_class = Types::CreateBucketRequest
|
803
806
|
CreateBucketRequest[:payload] = :create_bucket_configuration
|
804
807
|
CreateBucketRequest[:payload_member] = CreateBucketRequest.member(:create_bucket_configuration)
|
@@ -1004,6 +1007,8 @@ module Aws::S3
|
|
1004
1007
|
|
1005
1008
|
Errors.member = Shapes::ShapeRef.new(shape: Error)
|
1006
1009
|
|
1010
|
+
EventBridgeConfiguration.struct_class = Types::EventBridgeConfiguration
|
1011
|
+
|
1007
1012
|
EventList.member = Shapes::ShapeRef.new(shape: Event)
|
1008
1013
|
|
1009
1014
|
ExistingObjectReplication.add_member(:status, Shapes::ShapeRef.new(shape: ExistingObjectReplicationStatus, required: true, location_name: "Status"))
|
@@ -1739,6 +1744,7 @@ module Aws::S3
|
|
1739
1744
|
NotificationConfiguration.add_member(:topic_configurations, Shapes::ShapeRef.new(shape: TopicConfigurationList, location_name: "TopicConfiguration"))
|
1740
1745
|
NotificationConfiguration.add_member(:queue_configurations, Shapes::ShapeRef.new(shape: QueueConfigurationList, location_name: "QueueConfiguration"))
|
1741
1746
|
NotificationConfiguration.add_member(:lambda_function_configurations, Shapes::ShapeRef.new(shape: LambdaFunctionConfigurationList, location_name: "CloudFunctionConfiguration"))
|
1747
|
+
NotificationConfiguration.add_member(:event_bridge_configuration, Shapes::ShapeRef.new(shape: EventBridgeConfiguration, location_name: "EventBridgeConfiguration"))
|
1742
1748
|
NotificationConfiguration.struct_class = Types::NotificationConfiguration
|
1743
1749
|
|
1744
1750
|
NotificationConfigurationDeprecated.add_member(:topic_configuration, Shapes::ShapeRef.new(shape: TopicConfigurationDeprecated, location_name: "TopicConfiguration"))
|
@@ -1935,6 +1941,7 @@ module Aws::S3
|
|
1935
1941
|
PutBucketNotificationConfigurationRequest.add_member(:bucket, Shapes::ShapeRef.new(shape: BucketName, required: true, location: "uri", location_name: "Bucket"))
|
1936
1942
|
PutBucketNotificationConfigurationRequest.add_member(:notification_configuration, Shapes::ShapeRef.new(shape: NotificationConfiguration, required: true, location_name: "NotificationConfiguration", metadata: {"xmlNamespace"=>{"uri"=>"http://s3.amazonaws.com/doc/2006-03-01/"}}))
|
1937
1943
|
PutBucketNotificationConfigurationRequest.add_member(:expected_bucket_owner, Shapes::ShapeRef.new(shape: AccountId, location: "header", location_name: "x-amz-expected-bucket-owner"))
|
1944
|
+
PutBucketNotificationConfigurationRequest.add_member(:skip_destination_validation, Shapes::ShapeRef.new(shape: SkipValidation, location: "header", location_name: "x-amz-skip-destination-validation"))
|
1938
1945
|
PutBucketNotificationConfigurationRequest.struct_class = Types::PutBucketNotificationConfigurationRequest
|
1939
1946
|
PutBucketNotificationConfigurationRequest[:payload] = :notification_configuration
|
1940
1947
|
PutBucketNotificationConfigurationRequest[:payload_member] = PutBucketNotificationConfigurationRequest.member(:notification_configuration)
|
data/lib/aws-sdk-s3/object.rb
CHANGED
@@ -552,7 +552,7 @@ module Aws::S3
|
|
552
552
|
# metadata_directive: "COPY", # accepts COPY, REPLACE
|
553
553
|
# tagging_directive: "COPY", # accepts COPY, REPLACE
|
554
554
|
# server_side_encryption: "AES256", # accepts AES256, aws:kms
|
555
|
-
# storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER, DEEP_ARCHIVE, OUTPOSTS
|
555
|
+
# storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER, DEEP_ARCHIVE, OUTPOSTS, GLACIER_IR
|
556
556
|
# website_redirect_location: "WebsiteRedirectLocation",
|
557
557
|
# sse_customer_algorithm: "SSECustomerAlgorithm",
|
558
558
|
# sse_customer_key: "SSECustomerKey",
|
@@ -943,7 +943,7 @@ module Aws::S3
|
|
943
943
|
# "MetadataKey" => "MetadataValue",
|
944
944
|
# },
|
945
945
|
# server_side_encryption: "AES256", # accepts AES256, aws:kms
|
946
|
-
# storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER, DEEP_ARCHIVE, OUTPOSTS
|
946
|
+
# storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER, DEEP_ARCHIVE, OUTPOSTS, GLACIER_IR
|
947
947
|
# website_redirect_location: "WebsiteRedirectLocation",
|
948
948
|
# sse_customer_algorithm: "SSECustomerAlgorithm",
|
949
949
|
# sse_customer_key: "SSECustomerKey",
|
@@ -1112,7 +1112,7 @@ module Aws::S3
|
|
1112
1112
|
# "MetadataKey" => "MetadataValue",
|
1113
1113
|
# },
|
1114
1114
|
# server_side_encryption: "AES256", # accepts AES256, aws:kms
|
1115
|
-
# storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER, DEEP_ARCHIVE, OUTPOSTS
|
1115
|
+
# storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER, DEEP_ARCHIVE, OUTPOSTS, GLACIER_IR
|
1116
1116
|
# website_redirect_location: "WebsiteRedirectLocation",
|
1117
1117
|
# sse_customer_algorithm: "SSECustomerAlgorithm",
|
1118
1118
|
# sse_customer_key: "SSECustomerKey",
|
@@ -1415,7 +1415,7 @@ module Aws::S3
|
|
1415
1415
|
# value: "MetadataValue",
|
1416
1416
|
# },
|
1417
1417
|
# ],
|
1418
|
-
# storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER, DEEP_ARCHIVE, OUTPOSTS
|
1418
|
+
# storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER, DEEP_ARCHIVE, OUTPOSTS, GLACIER_IR
|
1419
1419
|
# },
|
1420
1420
|
# },
|
1421
1421
|
# },
|
@@ -1481,18 +1481,8 @@ module Aws::S3
|
|
1481
1481
|
# Return the object only if it has not been modified since the specified
|
1482
1482
|
# time, otherwise return a 412 (precondition failed).
|
1483
1483
|
# @option options [String] :range
|
1484
|
-
#
|
1485
|
-
#
|
1486
|
-
# [http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.35][1].
|
1487
|
-
#
|
1488
|
-
# <note markdown="1"> Amazon S3 doesn't support retrieving multiple ranges of data per
|
1489
|
-
# `GET` request.
|
1490
|
-
#
|
1491
|
-
# </note>
|
1492
|
-
#
|
1493
|
-
#
|
1494
|
-
#
|
1495
|
-
# [1]: http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.35
|
1484
|
+
# Because `HeadObject` returns only the metadata for an object, this
|
1485
|
+
# parameter has no effect.
|
1496
1486
|
# @option options [String] :version_id
|
1497
1487
|
# VersionId used to reference a specific version of the object.
|
1498
1488
|
# @option options [String] :sse_customer_algorithm
|
@@ -296,7 +296,7 @@ module Aws::S3
|
|
296
296
|
# metadata_directive: "COPY", # accepts COPY, REPLACE
|
297
297
|
# tagging_directive: "COPY", # accepts COPY, REPLACE
|
298
298
|
# server_side_encryption: "AES256", # accepts AES256, aws:kms
|
299
|
-
# storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER, DEEP_ARCHIVE, OUTPOSTS
|
299
|
+
# storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER, DEEP_ARCHIVE, OUTPOSTS, GLACIER_IR
|
300
300
|
# website_redirect_location: "WebsiteRedirectLocation",
|
301
301
|
# sse_customer_algorithm: "SSECustomerAlgorithm",
|
302
302
|
# sse_customer_key: "SSECustomerKey",
|
@@ -687,7 +687,7 @@ module Aws::S3
|
|
687
687
|
# "MetadataKey" => "MetadataValue",
|
688
688
|
# },
|
689
689
|
# server_side_encryption: "AES256", # accepts AES256, aws:kms
|
690
|
-
# storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER, DEEP_ARCHIVE, OUTPOSTS
|
690
|
+
# storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER, DEEP_ARCHIVE, OUTPOSTS, GLACIER_IR
|
691
691
|
# website_redirect_location: "WebsiteRedirectLocation",
|
692
692
|
# sse_customer_algorithm: "SSECustomerAlgorithm",
|
693
693
|
# sse_customer_key: "SSECustomerKey",
|
@@ -856,7 +856,7 @@ module Aws::S3
|
|
856
856
|
# "MetadataKey" => "MetadataValue",
|
857
857
|
# },
|
858
858
|
# server_side_encryption: "AES256", # accepts AES256, aws:kms
|
859
|
-
# storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER, DEEP_ARCHIVE, OUTPOSTS
|
859
|
+
# storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER, DEEP_ARCHIVE, OUTPOSTS, GLACIER_IR
|
860
860
|
# website_redirect_location: "WebsiteRedirectLocation",
|
861
861
|
# sse_customer_algorithm: "SSECustomerAlgorithm",
|
862
862
|
# sse_customer_key: "SSECustomerKey",
|
@@ -1159,7 +1159,7 @@ module Aws::S3
|
|
1159
1159
|
# value: "MetadataValue",
|
1160
1160
|
# },
|
1161
1161
|
# ],
|
1162
|
-
# storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER, DEEP_ARCHIVE, OUTPOSTS
|
1162
|
+
# storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER, DEEP_ARCHIVE, OUTPOSTS, GLACIER_IR
|
1163
1163
|
# },
|
1164
1164
|
# },
|
1165
1165
|
# },
|
@@ -402,18 +402,8 @@ module Aws::S3
|
|
402
402
|
# Return the object only if it has not been modified since the specified
|
403
403
|
# time, otherwise return a 412 (precondition failed).
|
404
404
|
# @option options [String] :range
|
405
|
-
#
|
406
|
-
#
|
407
|
-
# [http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.35][1].
|
408
|
-
#
|
409
|
-
# <note markdown="1"> Amazon S3 doesn't support retrieving multiple ranges of data per
|
410
|
-
# `GET` request.
|
411
|
-
#
|
412
|
-
# </note>
|
413
|
-
#
|
414
|
-
#
|
415
|
-
#
|
416
|
-
# [1]: http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.35
|
405
|
+
# Because `HeadObject` returns only the metadata for an object, this
|
406
|
+
# parameter has no effect.
|
417
407
|
# @option options [String] :sse_customer_algorithm
|
418
408
|
# Specifies the algorithm to use to when encrypting the object (for
|
419
409
|
# example, AES256).
|
@@ -48,8 +48,14 @@ Defaults to `legacy` mode which uses the global endpoint.
|
|
48
48
|
private
|
49
49
|
|
50
50
|
def self.resolve_iad_regional_endpoint(cfg)
|
51
|
+
default_mode_value =
|
52
|
+
if cfg.respond_to?(:defaults_mode_config_resolver)
|
53
|
+
cfg.defaults_mode_config_resolver.resolve(:s3_us_east_1_regional_endpoint)
|
54
|
+
end
|
55
|
+
|
51
56
|
mode = ENV['AWS_S3_US_EAST_1_REGIONAL_ENDPOINT'] ||
|
52
57
|
Aws.shared_config.s3_us_east_1_regional_endpoint(profile: cfg.profile) ||
|
58
|
+
default_mode_value ||
|
53
59
|
'legacy'
|
54
60
|
mode = mode.downcase
|
55
61
|
unless %w(legacy regional).include?(mode)
|
data/lib/aws-sdk-s3/resource.rb
CHANGED
@@ -49,6 +49,7 @@ module Aws::S3
|
|
49
49
|
# grant_write: "GrantWrite",
|
50
50
|
# grant_write_acp: "GrantWriteACP",
|
51
51
|
# object_lock_enabled_for_bucket: false,
|
52
|
+
# object_ownership: "BucketOwnerPreferred", # accepts BucketOwnerPreferred, ObjectWriter, BucketOwnerEnforced
|
52
53
|
# })
|
53
54
|
# @param [Hash] options ({})
|
54
55
|
# @option options [String] :acl
|
@@ -74,6 +75,23 @@ module Aws::S3
|
|
74
75
|
# @option options [Boolean] :object_lock_enabled_for_bucket
|
75
76
|
# Specifies whether you want S3 Object Lock to be enabled for the new
|
76
77
|
# bucket.
|
78
|
+
# @option options [String] :object_ownership
|
79
|
+
# The container element for object ownership for a bucket's ownership
|
80
|
+
# controls.
|
81
|
+
#
|
82
|
+
# BucketOwnerPreferred - Objects uploaded to the bucket change ownership
|
83
|
+
# to the bucket owner if the objects are uploaded with the
|
84
|
+
# `bucket-owner-full-control` canned ACL.
|
85
|
+
#
|
86
|
+
# ObjectWriter - The uploading account will own the object if the object
|
87
|
+
# is uploaded with the `bucket-owner-full-control` canned ACL.
|
88
|
+
#
|
89
|
+
# BucketOwnerEnforced - Access control lists (ACLs) are disabled and no
|
90
|
+
# longer affect permissions. The bucket owner automatically owns and has
|
91
|
+
# full control over every object in the bucket. The bucket only accepts
|
92
|
+
# PUT requests that don't specify an ACL or bucket owner full control
|
93
|
+
# ACLs, such as the `bucket-owner-full-control` canned ACL or an
|
94
|
+
# equivalent form of this ACL expressed in the XML format.
|
77
95
|
# @return [Bucket]
|
78
96
|
def create_bucket(options = {})
|
79
97
|
@client.create_bucket(options)
|