aws-sdk-s3 1.166.0 → 1.169.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 +15 -0
- data/VERSION +1 -1
- data/lib/aws-sdk-s3/bucket.rb +48 -27
- data/lib/aws-sdk-s3/bucket_lifecycle_configuration.rb +38 -1
- data/lib/aws-sdk-s3/bucket_policy.rb +4 -4
- data/lib/aws-sdk-s3/client.rb +332 -299
- data/lib/aws-sdk-s3/client_api.rb +13 -1
- data/lib/aws-sdk-s3/endpoint_parameters.rb +13 -18
- data/lib/aws-sdk-s3/endpoints.rb +405 -1405
- data/lib/aws-sdk-s3/multipart_upload.rb +4 -4
- data/lib/aws-sdk-s3/multipart_upload_part.rb +8 -8
- data/lib/aws-sdk-s3/object.rb +79 -56
- data/lib/aws-sdk-s3/object_summary.rb +77 -54
- data/lib/aws-sdk-s3/object_version.rb +4 -4
- data/lib/aws-sdk-s3/plugins/endpoints.rb +1 -204
- data/lib/aws-sdk-s3/resource.rb +25 -1
- data/lib/aws-sdk-s3/types.rb +227 -141
- data/lib/aws-sdk-s3.rb +1 -1
- data/sig/bucket.rbs +3 -0
- data/sig/bucket_lifecycle_configuration.rbs +7 -3
- data/sig/client.rbs +13 -4
- data/sig/resource.rbs +2 -0
- data/sig/types.rbs +11 -0
- metadata +4 -4
@@ -57,6 +57,7 @@ module Aws::S3
|
|
57
57
|
BucketLoggingStatus = Shapes::StructureShape.new(name: 'BucketLoggingStatus')
|
58
58
|
BucketLogsPermission = Shapes::StringShape.new(name: 'BucketLogsPermission')
|
59
59
|
BucketName = Shapes::StringShape.new(name: 'BucketName')
|
60
|
+
BucketRegion = Shapes::StringShape.new(name: 'BucketRegion')
|
60
61
|
BucketType = Shapes::StringShape.new(name: 'BucketType')
|
61
62
|
BucketVersioningStatus = Shapes::StringShape.new(name: 'BucketVersioningStatus')
|
62
63
|
Buckets = Shapes::ListShape.new(name: 'Buckets')
|
@@ -464,6 +465,7 @@ module Aws::S3
|
|
464
465
|
PutBucketEncryptionRequest = Shapes::StructureShape.new(name: 'PutBucketEncryptionRequest')
|
465
466
|
PutBucketIntelligentTieringConfigurationRequest = Shapes::StructureShape.new(name: 'PutBucketIntelligentTieringConfigurationRequest')
|
466
467
|
PutBucketInventoryConfigurationRequest = Shapes::StructureShape.new(name: 'PutBucketInventoryConfigurationRequest')
|
468
|
+
PutBucketLifecycleConfigurationOutput = Shapes::StructureShape.new(name: 'PutBucketLifecycleConfigurationOutput')
|
467
469
|
PutBucketLifecycleConfigurationRequest = Shapes::StructureShape.new(name: 'PutBucketLifecycleConfigurationRequest')
|
468
470
|
PutBucketLifecycleRequest = Shapes::StructureShape.new(name: 'PutBucketLifecycleRequest')
|
469
471
|
PutBucketLoggingRequest = Shapes::StructureShape.new(name: 'PutBucketLoggingRequest')
|
@@ -603,6 +605,7 @@ module Aws::S3
|
|
603
605
|
TopicConfigurationDeprecated = Shapes::StructureShape.new(name: 'TopicConfigurationDeprecated')
|
604
606
|
TopicConfigurationList = Shapes::ListShape.new(name: 'TopicConfigurationList', flattened: true)
|
605
607
|
Transition = Shapes::StructureShape.new(name: 'Transition')
|
608
|
+
TransitionDefaultMinimumObjectSize = Shapes::StringShape.new(name: 'TransitionDefaultMinimumObjectSize')
|
606
609
|
TransitionList = Shapes::ListShape.new(name: 'TransitionList', flattened: true)
|
607
610
|
TransitionStorageClass = Shapes::StringShape.new(name: 'TransitionStorageClass')
|
608
611
|
Type = Shapes::StringShape.new(name: 'Type')
|
@@ -678,6 +681,7 @@ module Aws::S3
|
|
678
681
|
|
679
682
|
Bucket.add_member(:name, Shapes::ShapeRef.new(shape: BucketName, location_name: "Name"))
|
680
683
|
Bucket.add_member(:creation_date, Shapes::ShapeRef.new(shape: CreationDate, location_name: "CreationDate"))
|
684
|
+
Bucket.add_member(:bucket_region, Shapes::ShapeRef.new(shape: BucketRegion, location_name: "BucketRegion"))
|
681
685
|
Bucket.struct_class = Types::Bucket
|
682
686
|
|
683
687
|
BucketAlreadyExists.struct_class = Types::BucketAlreadyExists
|
@@ -1191,6 +1195,7 @@ module Aws::S3
|
|
1191
1195
|
GetBucketInventoryConfigurationRequest.struct_class = Types::GetBucketInventoryConfigurationRequest
|
1192
1196
|
|
1193
1197
|
GetBucketLifecycleConfigurationOutput.add_member(:rules, Shapes::ShapeRef.new(shape: LifecycleRules, location_name: "Rule"))
|
1198
|
+
GetBucketLifecycleConfigurationOutput.add_member(:transition_default_minimum_object_size, Shapes::ShapeRef.new(shape: TransitionDefaultMinimumObjectSize, location: "header", location_name: "x-amz-transition-default-minimum-object-size"))
|
1194
1199
|
GetBucketLifecycleConfigurationOutput.struct_class = Types::GetBucketLifecycleConfigurationOutput
|
1195
1200
|
|
1196
1201
|
GetBucketLifecycleConfigurationRequest.add_member(:bucket, Shapes::ShapeRef.new(shape: BucketName, required: true, location: "uri", location_name: "Bucket", metadata: {"contextParam"=>{"name"=>"Bucket"}}))
|
@@ -1720,10 +1725,13 @@ module Aws::S3
|
|
1720
1725
|
ListBucketsOutput.add_member(:buckets, Shapes::ShapeRef.new(shape: Buckets, location_name: "Buckets"))
|
1721
1726
|
ListBucketsOutput.add_member(:owner, Shapes::ShapeRef.new(shape: Owner, location_name: "Owner"))
|
1722
1727
|
ListBucketsOutput.add_member(:continuation_token, Shapes::ShapeRef.new(shape: NextToken, location_name: "ContinuationToken"))
|
1728
|
+
ListBucketsOutput.add_member(:prefix, Shapes::ShapeRef.new(shape: Prefix, location_name: "Prefix"))
|
1723
1729
|
ListBucketsOutput.struct_class = Types::ListBucketsOutput
|
1724
1730
|
|
1725
1731
|
ListBucketsRequest.add_member(:max_buckets, Shapes::ShapeRef.new(shape: MaxBuckets, location: "querystring", location_name: "max-buckets"))
|
1726
1732
|
ListBucketsRequest.add_member(:continuation_token, Shapes::ShapeRef.new(shape: Token, location: "querystring", location_name: "continuation-token"))
|
1733
|
+
ListBucketsRequest.add_member(:prefix, Shapes::ShapeRef.new(shape: Prefix, location: "querystring", location_name: "prefix"))
|
1734
|
+
ListBucketsRequest.add_member(:bucket_region, Shapes::ShapeRef.new(shape: BucketRegion, location: "querystring", location_name: "bucket-region"))
|
1727
1735
|
ListBucketsRequest.struct_class = Types::ListBucketsRequest
|
1728
1736
|
|
1729
1737
|
ListDirectoryBucketsOutput.add_member(:buckets, Shapes::ShapeRef.new(shape: Buckets, location_name: "Buckets"))
|
@@ -2130,10 +2138,14 @@ module Aws::S3
|
|
2130
2138
|
PutBucketInventoryConfigurationRequest[:payload] = :inventory_configuration
|
2131
2139
|
PutBucketInventoryConfigurationRequest[:payload_member] = PutBucketInventoryConfigurationRequest.member(:inventory_configuration)
|
2132
2140
|
|
2141
|
+
PutBucketLifecycleConfigurationOutput.add_member(:transition_default_minimum_object_size, Shapes::ShapeRef.new(shape: TransitionDefaultMinimumObjectSize, location: "header", location_name: "x-amz-transition-default-minimum-object-size"))
|
2142
|
+
PutBucketLifecycleConfigurationOutput.struct_class = Types::PutBucketLifecycleConfigurationOutput
|
2143
|
+
|
2133
2144
|
PutBucketLifecycleConfigurationRequest.add_member(:bucket, Shapes::ShapeRef.new(shape: BucketName, required: true, location: "uri", location_name: "Bucket", metadata: {"contextParam"=>{"name"=>"Bucket"}}))
|
2134
2145
|
PutBucketLifecycleConfigurationRequest.add_member(:checksum_algorithm, Shapes::ShapeRef.new(shape: ChecksumAlgorithm, location: "header", location_name: "x-amz-sdk-checksum-algorithm"))
|
2135
2146
|
PutBucketLifecycleConfigurationRequest.add_member(:lifecycle_configuration, Shapes::ShapeRef.new(shape: BucketLifecycleConfiguration, location_name: "LifecycleConfiguration", metadata: {"xmlNamespace"=>{"uri"=>"http://s3.amazonaws.com/doc/2006-03-01/"}}))
|
2136
2147
|
PutBucketLifecycleConfigurationRequest.add_member(:expected_bucket_owner, Shapes::ShapeRef.new(shape: AccountId, location: "header", location_name: "x-amz-expected-bucket-owner"))
|
2148
|
+
PutBucketLifecycleConfigurationRequest.add_member(:transition_default_minimum_object_size, Shapes::ShapeRef.new(shape: TransitionDefaultMinimumObjectSize, location: "header", location_name: "x-amz-transition-default-minimum-object-size"))
|
2137
2149
|
PutBucketLifecycleConfigurationRequest.struct_class = Types::PutBucketLifecycleConfigurationRequest
|
2138
2150
|
PutBucketLifecycleConfigurationRequest[:payload] = :lifecycle_configuration
|
2139
2151
|
PutBucketLifecycleConfigurationRequest[:payload_member] = PutBucketLifecycleConfigurationRequest.member(:lifecycle_configuration)
|
@@ -3529,7 +3541,7 @@ module Aws::S3
|
|
3529
3541
|
"requestChecksumRequired" => true,
|
3530
3542
|
}
|
3531
3543
|
o.input = Shapes::ShapeRef.new(shape: PutBucketLifecycleConfigurationRequest)
|
3532
|
-
o.output = Shapes::ShapeRef.new(shape:
|
3544
|
+
o.output = Shapes::ShapeRef.new(shape: PutBucketLifecycleConfigurationOutput)
|
3533
3545
|
end)
|
3534
3546
|
|
3535
3547
|
api.add_operation(:put_bucket_logging, Seahorse::Model::Operation.new.tap do |o|
|
@@ -144,30 +144,15 @@ module Aws::S3
|
|
144
144
|
self[:region] = options[:region]
|
145
145
|
self[:use_fips] = options[:use_fips]
|
146
146
|
self[:use_fips] = false if self[:use_fips].nil?
|
147
|
-
if self[:use_fips].nil?
|
148
|
-
raise ArgumentError, "Missing required EndpointParameter: :use_fips"
|
149
|
-
end
|
150
147
|
self[:use_dual_stack] = options[:use_dual_stack]
|
151
148
|
self[:use_dual_stack] = false if self[:use_dual_stack].nil?
|
152
|
-
if self[:use_dual_stack].nil?
|
153
|
-
raise ArgumentError, "Missing required EndpointParameter: :use_dual_stack"
|
154
|
-
end
|
155
149
|
self[:endpoint] = options[:endpoint]
|
156
150
|
self[:force_path_style] = options[:force_path_style]
|
157
151
|
self[:force_path_style] = false if self[:force_path_style].nil?
|
158
|
-
if self[:force_path_style].nil?
|
159
|
-
raise ArgumentError, "Missing required EndpointParameter: :force_path_style"
|
160
|
-
end
|
161
152
|
self[:accelerate] = options[:accelerate]
|
162
153
|
self[:accelerate] = false if self[:accelerate].nil?
|
163
|
-
if self[:accelerate].nil?
|
164
|
-
raise ArgumentError, "Missing required EndpointParameter: :accelerate"
|
165
|
-
end
|
166
154
|
self[:use_global_endpoint] = options[:use_global_endpoint]
|
167
155
|
self[:use_global_endpoint] = false if self[:use_global_endpoint].nil?
|
168
|
-
if self[:use_global_endpoint].nil?
|
169
|
-
raise ArgumentError, "Missing required EndpointParameter: :use_global_endpoint"
|
170
|
-
end
|
171
156
|
self[:use_object_lambda_endpoint] = options[:use_object_lambda_endpoint]
|
172
157
|
self[:key] = options[:key]
|
173
158
|
self[:prefix] = options[:prefix]
|
@@ -175,12 +160,22 @@ module Aws::S3
|
|
175
160
|
self[:disable_access_points] = options[:disable_access_points]
|
176
161
|
self[:disable_multi_region_access_points] = options[:disable_multi_region_access_points]
|
177
162
|
self[:disable_multi_region_access_points] = false if self[:disable_multi_region_access_points].nil?
|
178
|
-
if self[:disable_multi_region_access_points].nil?
|
179
|
-
raise ArgumentError, "Missing required EndpointParameter: :disable_multi_region_access_points"
|
180
|
-
end
|
181
163
|
self[:use_arn_region] = options[:use_arn_region]
|
182
164
|
self[:use_s3_express_control_endpoint] = options[:use_s3_express_control_endpoint]
|
183
165
|
self[:disable_s3_express_session_auth] = options[:disable_s3_express_session_auth]
|
184
166
|
end
|
167
|
+
|
168
|
+
def self.create(config, options={})
|
169
|
+
new({
|
170
|
+
region: config.region,
|
171
|
+
use_fips: config.use_fips_endpoint,
|
172
|
+
endpoint: (config.endpoint.to_s unless config.regional_endpoint),
|
173
|
+
force_path_style: config.force_path_style,
|
174
|
+
use_global_endpoint: config.s3_us_east_1_regional_endpoint == 'legacy',
|
175
|
+
disable_multi_region_access_points: config.s3_disable_multiregion_access_points,
|
176
|
+
use_arn_region: config.s3_use_arn_region,
|
177
|
+
disable_s3_express_session_auth: config.disable_s3_express_session_auth,
|
178
|
+
}.merge(options))
|
179
|
+
end
|
185
180
|
end
|
186
181
|
end
|