aws-sdk-s3 1.123.1 → 1.132.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/CHANGELOG.md +57 -0
- data/VERSION +1 -1
- data/lib/aws-sdk-s3/bucket.rb +63 -33
- data/lib/aws-sdk-s3/client.rb +517 -465
- data/lib/aws-sdk-s3/client_api.rb +24 -0
- data/lib/aws-sdk-s3/customizations/errors.rb +1 -1
- data/lib/aws-sdk-s3/customizations/object.rb +20 -0
- data/lib/aws-sdk-s3/encryptionV2/decrypt_handler.rb +1 -0
- data/lib/aws-sdk-s3/endpoint_parameters.rb +4 -0
- data/lib/aws-sdk-s3/endpoint_provider.rb +22 -246
- data/lib/aws-sdk-s3/endpoints.rb +1 -0
- data/lib/aws-sdk-s3/file_downloader.rb +27 -1
- data/lib/aws-sdk-s3/object.rb +40 -41
- data/lib/aws-sdk-s3/object_multipart_copier.rb +33 -17
- data/lib/aws-sdk-s3/object_summary.rb +49 -36
- data/lib/aws-sdk-s3/object_version.rb +14 -0
- data/lib/aws-sdk-s3/presigned_post.rb +52 -43
- data/lib/aws-sdk-s3/presigner.rb +4 -2
- data/lib/aws-sdk-s3/resource.rb +1 -1
- data/lib/aws-sdk-s3/types.rb +371 -204
- data/lib/aws-sdk-s3.rb +1 -1
- metadata +6 -6
@@ -296,6 +296,7 @@ module Aws::S3
|
|
296
296
|
IsEnabled = Shapes::BooleanShape.new(name: 'IsEnabled')
|
297
297
|
IsLatest = Shapes::BooleanShape.new(name: 'IsLatest')
|
298
298
|
IsPublic = Shapes::BooleanShape.new(name: 'IsPublic')
|
299
|
+
IsRestoreInProgress = Shapes::BooleanShape.new(name: 'IsRestoreInProgress')
|
299
300
|
IsTruncated = Shapes::BooleanShape.new(name: 'IsTruncated')
|
300
301
|
JSONInput = Shapes::StructureShape.new(name: 'JSONInput')
|
301
302
|
JSONOutput = Shapes::StructureShape.new(name: 'JSONOutput')
|
@@ -409,6 +410,8 @@ module Aws::S3
|
|
409
410
|
ObjectVersionId = Shapes::StringShape.new(name: 'ObjectVersionId')
|
410
411
|
ObjectVersionList = Shapes::ListShape.new(name: 'ObjectVersionList', flattened: true)
|
411
412
|
ObjectVersionStorageClass = Shapes::StringShape.new(name: 'ObjectVersionStorageClass')
|
413
|
+
OptionalObjectAttributes = Shapes::StringShape.new(name: 'OptionalObjectAttributes')
|
414
|
+
OptionalObjectAttributesList = Shapes::ListShape.new(name: 'OptionalObjectAttributesList')
|
412
415
|
OutputLocation = Shapes::StructureShape.new(name: 'OutputLocation')
|
413
416
|
OutputSerialization = Shapes::StructureShape.new(name: 'OutputSerialization')
|
414
417
|
Owner = Shapes::StructureShape.new(name: 'Owner')
|
@@ -507,11 +510,13 @@ module Aws::S3
|
|
507
510
|
ResponseContentType = Shapes::StringShape.new(name: 'ResponseContentType')
|
508
511
|
ResponseExpires = Shapes::TimestampShape.new(name: 'ResponseExpires', timestampFormat: "rfc822")
|
509
512
|
Restore = Shapes::StringShape.new(name: 'Restore')
|
513
|
+
RestoreExpiryDate = Shapes::TimestampShape.new(name: 'RestoreExpiryDate')
|
510
514
|
RestoreObjectOutput = Shapes::StructureShape.new(name: 'RestoreObjectOutput')
|
511
515
|
RestoreObjectRequest = Shapes::StructureShape.new(name: 'RestoreObjectRequest')
|
512
516
|
RestoreOutputPath = Shapes::StringShape.new(name: 'RestoreOutputPath')
|
513
517
|
RestoreRequest = Shapes::StructureShape.new(name: 'RestoreRequest')
|
514
518
|
RestoreRequestType = Shapes::StringShape.new(name: 'RestoreRequestType')
|
519
|
+
RestoreStatus = Shapes::StructureShape.new(name: 'RestoreStatus')
|
515
520
|
Role = Shapes::StringShape.new(name: 'Role')
|
516
521
|
RoutingRule = Shapes::StructureShape.new(name: 'RoutingRule')
|
517
522
|
RoutingRules = Shapes::ListShape.new(name: 'RoutingRules')
|
@@ -1074,10 +1079,12 @@ module Aws::S3
|
|
1074
1079
|
FilterRuleList.member = Shapes::ShapeRef.new(shape: FilterRule)
|
1075
1080
|
|
1076
1081
|
GetBucketAccelerateConfigurationOutput.add_member(:status, Shapes::ShapeRef.new(shape: BucketAccelerateStatus, location_name: "Status"))
|
1082
|
+
GetBucketAccelerateConfigurationOutput.add_member(:request_charged, Shapes::ShapeRef.new(shape: RequestCharged, location: "header", location_name: "x-amz-request-charged"))
|
1077
1083
|
GetBucketAccelerateConfigurationOutput.struct_class = Types::GetBucketAccelerateConfigurationOutput
|
1078
1084
|
|
1079
1085
|
GetBucketAccelerateConfigurationRequest.add_member(:bucket, Shapes::ShapeRef.new(shape: BucketName, required: true, location: "uri", location_name: "Bucket", metadata: {"contextParam"=>{"name"=>"Bucket"}}))
|
1080
1086
|
GetBucketAccelerateConfigurationRequest.add_member(:expected_bucket_owner, Shapes::ShapeRef.new(shape: AccountId, location: "header", location_name: "x-amz-expected-bucket-owner"))
|
1087
|
+
GetBucketAccelerateConfigurationRequest.add_member(:request_payer, Shapes::ShapeRef.new(shape: RequestPayer, location: "header", location_name: "x-amz-request-payer"))
|
1081
1088
|
GetBucketAccelerateConfigurationRequest.struct_class = Types::GetBucketAccelerateConfigurationRequest
|
1082
1089
|
|
1083
1090
|
GetBucketAclOutput.add_member(:owner, Shapes::ShapeRef.new(shape: Owner, location_name: "Owner"))
|
@@ -1664,6 +1671,7 @@ module Aws::S3
|
|
1664
1671
|
ListMultipartUploadsOutput.add_member(:uploads, Shapes::ShapeRef.new(shape: MultipartUploadList, location_name: "Upload"))
|
1665
1672
|
ListMultipartUploadsOutput.add_member(:common_prefixes, Shapes::ShapeRef.new(shape: CommonPrefixList, location_name: "CommonPrefixes"))
|
1666
1673
|
ListMultipartUploadsOutput.add_member(:encoding_type, Shapes::ShapeRef.new(shape: EncodingType, location_name: "EncodingType"))
|
1674
|
+
ListMultipartUploadsOutput.add_member(:request_charged, Shapes::ShapeRef.new(shape: RequestCharged, location: "header", location_name: "x-amz-request-charged"))
|
1667
1675
|
ListMultipartUploadsOutput.struct_class = Types::ListMultipartUploadsOutput
|
1668
1676
|
|
1669
1677
|
ListMultipartUploadsRequest.add_member(:bucket, Shapes::ShapeRef.new(shape: BucketName, required: true, location: "uri", location_name: "Bucket", metadata: {"contextParam"=>{"name"=>"Bucket"}}))
|
@@ -1674,6 +1682,7 @@ module Aws::S3
|
|
1674
1682
|
ListMultipartUploadsRequest.add_member(:prefix, Shapes::ShapeRef.new(shape: Prefix, location: "querystring", location_name: "prefix"))
|
1675
1683
|
ListMultipartUploadsRequest.add_member(:upload_id_marker, Shapes::ShapeRef.new(shape: UploadIdMarker, location: "querystring", location_name: "upload-id-marker"))
|
1676
1684
|
ListMultipartUploadsRequest.add_member(:expected_bucket_owner, Shapes::ShapeRef.new(shape: AccountId, location: "header", location_name: "x-amz-expected-bucket-owner"))
|
1685
|
+
ListMultipartUploadsRequest.add_member(:request_payer, Shapes::ShapeRef.new(shape: RequestPayer, location: "header", location_name: "x-amz-request-payer"))
|
1677
1686
|
ListMultipartUploadsRequest.struct_class = Types::ListMultipartUploadsRequest
|
1678
1687
|
|
1679
1688
|
ListObjectVersionsOutput.add_member(:is_truncated, Shapes::ShapeRef.new(shape: IsTruncated, location_name: "IsTruncated"))
|
@@ -1689,6 +1698,7 @@ module Aws::S3
|
|
1689
1698
|
ListObjectVersionsOutput.add_member(:max_keys, Shapes::ShapeRef.new(shape: MaxKeys, location_name: "MaxKeys"))
|
1690
1699
|
ListObjectVersionsOutput.add_member(:common_prefixes, Shapes::ShapeRef.new(shape: CommonPrefixList, location_name: "CommonPrefixes"))
|
1691
1700
|
ListObjectVersionsOutput.add_member(:encoding_type, Shapes::ShapeRef.new(shape: EncodingType, location_name: "EncodingType"))
|
1701
|
+
ListObjectVersionsOutput.add_member(:request_charged, Shapes::ShapeRef.new(shape: RequestCharged, location: "header", location_name: "x-amz-request-charged"))
|
1692
1702
|
ListObjectVersionsOutput.struct_class = Types::ListObjectVersionsOutput
|
1693
1703
|
|
1694
1704
|
ListObjectVersionsRequest.add_member(:bucket, Shapes::ShapeRef.new(shape: BucketName, required: true, location: "uri", location_name: "Bucket", metadata: {"contextParam"=>{"name"=>"Bucket"}}))
|
@@ -1699,6 +1709,8 @@ module Aws::S3
|
|
1699
1709
|
ListObjectVersionsRequest.add_member(:prefix, Shapes::ShapeRef.new(shape: Prefix, location: "querystring", location_name: "prefix"))
|
1700
1710
|
ListObjectVersionsRequest.add_member(:version_id_marker, Shapes::ShapeRef.new(shape: VersionIdMarker, location: "querystring", location_name: "version-id-marker"))
|
1701
1711
|
ListObjectVersionsRequest.add_member(:expected_bucket_owner, Shapes::ShapeRef.new(shape: AccountId, location: "header", location_name: "x-amz-expected-bucket-owner"))
|
1712
|
+
ListObjectVersionsRequest.add_member(:request_payer, Shapes::ShapeRef.new(shape: RequestPayer, location: "header", location_name: "x-amz-request-payer"))
|
1713
|
+
ListObjectVersionsRequest.add_member(:optional_object_attributes, Shapes::ShapeRef.new(shape: OptionalObjectAttributesList, location: "header", location_name: "x-amz-optional-object-attributes"))
|
1702
1714
|
ListObjectVersionsRequest.struct_class = Types::ListObjectVersionsRequest
|
1703
1715
|
|
1704
1716
|
ListObjectsOutput.add_member(:is_truncated, Shapes::ShapeRef.new(shape: IsTruncated, location_name: "IsTruncated"))
|
@@ -1711,6 +1723,7 @@ module Aws::S3
|
|
1711
1723
|
ListObjectsOutput.add_member(:max_keys, Shapes::ShapeRef.new(shape: MaxKeys, location_name: "MaxKeys"))
|
1712
1724
|
ListObjectsOutput.add_member(:common_prefixes, Shapes::ShapeRef.new(shape: CommonPrefixList, location_name: "CommonPrefixes"))
|
1713
1725
|
ListObjectsOutput.add_member(:encoding_type, Shapes::ShapeRef.new(shape: EncodingType, location_name: "EncodingType"))
|
1726
|
+
ListObjectsOutput.add_member(:request_charged, Shapes::ShapeRef.new(shape: RequestCharged, location: "header", location_name: "x-amz-request-charged"))
|
1714
1727
|
ListObjectsOutput.struct_class = Types::ListObjectsOutput
|
1715
1728
|
|
1716
1729
|
ListObjectsRequest.add_member(:bucket, Shapes::ShapeRef.new(shape: BucketName, required: true, location: "uri", location_name: "Bucket", metadata: {"contextParam"=>{"name"=>"Bucket"}}))
|
@@ -1721,6 +1734,7 @@ module Aws::S3
|
|
1721
1734
|
ListObjectsRequest.add_member(:prefix, Shapes::ShapeRef.new(shape: Prefix, location: "querystring", location_name: "prefix"))
|
1722
1735
|
ListObjectsRequest.add_member(:request_payer, Shapes::ShapeRef.new(shape: RequestPayer, location: "header", location_name: "x-amz-request-payer"))
|
1723
1736
|
ListObjectsRequest.add_member(:expected_bucket_owner, Shapes::ShapeRef.new(shape: AccountId, location: "header", location_name: "x-amz-expected-bucket-owner"))
|
1737
|
+
ListObjectsRequest.add_member(:optional_object_attributes, Shapes::ShapeRef.new(shape: OptionalObjectAttributesList, location: "header", location_name: "x-amz-optional-object-attributes"))
|
1724
1738
|
ListObjectsRequest.struct_class = Types::ListObjectsRequest
|
1725
1739
|
|
1726
1740
|
ListObjectsV2Output.add_member(:is_truncated, Shapes::ShapeRef.new(shape: IsTruncated, location_name: "IsTruncated"))
|
@@ -1735,6 +1749,7 @@ module Aws::S3
|
|
1735
1749
|
ListObjectsV2Output.add_member(:continuation_token, Shapes::ShapeRef.new(shape: Token, location_name: "ContinuationToken"))
|
1736
1750
|
ListObjectsV2Output.add_member(:next_continuation_token, Shapes::ShapeRef.new(shape: NextToken, location_name: "NextContinuationToken"))
|
1737
1751
|
ListObjectsV2Output.add_member(:start_after, Shapes::ShapeRef.new(shape: StartAfter, location_name: "StartAfter"))
|
1752
|
+
ListObjectsV2Output.add_member(:request_charged, Shapes::ShapeRef.new(shape: RequestCharged, location: "header", location_name: "x-amz-request-charged"))
|
1738
1753
|
ListObjectsV2Output.struct_class = Types::ListObjectsV2Output
|
1739
1754
|
|
1740
1755
|
ListObjectsV2Request.add_member(:bucket, Shapes::ShapeRef.new(shape: BucketName, required: true, location: "uri", location_name: "Bucket", metadata: {"contextParam"=>{"name"=>"Bucket"}}))
|
@@ -1747,6 +1762,7 @@ module Aws::S3
|
|
1747
1762
|
ListObjectsV2Request.add_member(:start_after, Shapes::ShapeRef.new(shape: StartAfter, location: "querystring", location_name: "start-after"))
|
1748
1763
|
ListObjectsV2Request.add_member(:request_payer, Shapes::ShapeRef.new(shape: RequestPayer, location: "header", location_name: "x-amz-request-payer"))
|
1749
1764
|
ListObjectsV2Request.add_member(:expected_bucket_owner, Shapes::ShapeRef.new(shape: AccountId, location: "header", location_name: "x-amz-expected-bucket-owner"))
|
1765
|
+
ListObjectsV2Request.add_member(:optional_object_attributes, Shapes::ShapeRef.new(shape: OptionalObjectAttributesList, location: "header", location_name: "x-amz-optional-object-attributes"))
|
1750
1766
|
ListObjectsV2Request.struct_class = Types::ListObjectsV2Request
|
1751
1767
|
|
1752
1768
|
ListPartsOutput.add_member(:abort_date, Shapes::ShapeRef.new(shape: AbortDate, location: "header", location_name: "x-amz-abort-date"))
|
@@ -1860,6 +1876,7 @@ module Aws::S3
|
|
1860
1876
|
Object.add_member(:size, Shapes::ShapeRef.new(shape: Size, location_name: "Size"))
|
1861
1877
|
Object.add_member(:storage_class, Shapes::ShapeRef.new(shape: ObjectStorageClass, location_name: "StorageClass"))
|
1862
1878
|
Object.add_member(:owner, Shapes::ShapeRef.new(shape: Owner, location_name: "Owner"))
|
1879
|
+
Object.add_member(:restore_status, Shapes::ShapeRef.new(shape: RestoreStatus, location_name: "RestoreStatus"))
|
1863
1880
|
Object.struct_class = Types::Object
|
1864
1881
|
|
1865
1882
|
ObjectAlreadyInActiveTierError.struct_class = Types::ObjectAlreadyInActiveTierError
|
@@ -1907,10 +1924,13 @@ module Aws::S3
|
|
1907
1924
|
ObjectVersion.add_member(:is_latest, Shapes::ShapeRef.new(shape: IsLatest, location_name: "IsLatest"))
|
1908
1925
|
ObjectVersion.add_member(:last_modified, Shapes::ShapeRef.new(shape: LastModified, location_name: "LastModified"))
|
1909
1926
|
ObjectVersion.add_member(:owner, Shapes::ShapeRef.new(shape: Owner, location_name: "Owner"))
|
1927
|
+
ObjectVersion.add_member(:restore_status, Shapes::ShapeRef.new(shape: RestoreStatus, location_name: "RestoreStatus"))
|
1910
1928
|
ObjectVersion.struct_class = Types::ObjectVersion
|
1911
1929
|
|
1912
1930
|
ObjectVersionList.member = Shapes::ShapeRef.new(shape: ObjectVersion)
|
1913
1931
|
|
1932
|
+
OptionalObjectAttributesList.member = Shapes::ShapeRef.new(shape: OptionalObjectAttributes)
|
1933
|
+
|
1914
1934
|
OutputLocation.add_member(:s3, Shapes::ShapeRef.new(shape: S3Location, location_name: "S3"))
|
1915
1935
|
OutputLocation.struct_class = Types::OutputLocation
|
1916
1936
|
|
@@ -2384,6 +2404,10 @@ module Aws::S3
|
|
2384
2404
|
RestoreRequest.add_member(:output_location, Shapes::ShapeRef.new(shape: OutputLocation, location_name: "OutputLocation"))
|
2385
2405
|
RestoreRequest.struct_class = Types::RestoreRequest
|
2386
2406
|
|
2407
|
+
RestoreStatus.add_member(:is_restore_in_progress, Shapes::ShapeRef.new(shape: IsRestoreInProgress, location_name: "IsRestoreInProgress"))
|
2408
|
+
RestoreStatus.add_member(:restore_expiry_date, Shapes::ShapeRef.new(shape: RestoreExpiryDate, location_name: "RestoreExpiryDate"))
|
2409
|
+
RestoreStatus.struct_class = Types::RestoreStatus
|
2410
|
+
|
2387
2411
|
RoutingRule.add_member(:condition, Shapes::ShapeRef.new(shape: Condition, location_name: "Condition"))
|
2388
2412
|
RoutingRule.add_member(:redirect, Shapes::ShapeRef.new(shape: Redirect, required: true, location_name: "Redirect"))
|
2389
2413
|
RoutingRule.struct_class = Types::RoutingRule
|
@@ -8,7 +8,7 @@ module Aws
|
|
8
8
|
class PermanentRedirect < ServiceError
|
9
9
|
# @param [Seahorse::Client::RequestContext] context
|
10
10
|
# @param [String] message
|
11
|
-
# @param [Aws::S3::Types::PermanentRedirect]
|
11
|
+
# @param [Aws::S3::Types::PermanentRedirect] _data
|
12
12
|
def initialize(context, message, _data = Aws::EmptyStructure.new)
|
13
13
|
data = Aws::S3::Types::PermanentRedirect.new(message: message)
|
14
14
|
body = context.http_response.body_contents
|
@@ -46,6 +46,14 @@ module Aws
|
|
46
46
|
# different region. You do not need to specify this option
|
47
47
|
# if you have provided a `:source_client` or a `:content_length`.
|
48
48
|
#
|
49
|
+
# @option options [Boolean] :use_source_parts (false) Only used when
|
50
|
+
# `:multipart_copy` is `true`. Use part sizes defined on the source
|
51
|
+
# object if any exist. If copying or moving an object that
|
52
|
+
# is already multipart, this does not re-part the object, instead
|
53
|
+
# re-using the part definitions on the original. That means the etag
|
54
|
+
# and any checksums will not change. This is especially useful if the
|
55
|
+
# source object has parts with varied sizes.
|
56
|
+
#
|
49
57
|
# @example Basic object copy
|
50
58
|
#
|
51
59
|
# bucket = Aws::S3::Bucket.new('target-bucket')
|
@@ -484,6 +492,18 @@ module Aws
|
|
484
492
|
# retrieve the object. For more about object versioning, see:
|
485
493
|
# https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectVersioning.html
|
486
494
|
#
|
495
|
+
# @option options [String] checksum_mode (ENABLED) When `ENABLED` and
|
496
|
+
# the object has a stored checksum, it will be used to validate the
|
497
|
+
# download and will raise an `Aws::Errors::ChecksumError` if
|
498
|
+
# checksum validation fails. You may provide a `on_checksum_validated`
|
499
|
+
# callback if you need to verify that validation occured and which
|
500
|
+
# algorithm was used.
|
501
|
+
#
|
502
|
+
# @option options [Callable] on_checksum_validated Called each time a
|
503
|
+
# request's checksum is validated with the checksum algorithm and the
|
504
|
+
# response. For multipart downloads, this will be called for each
|
505
|
+
# part that is downloaded and validated.
|
506
|
+
#
|
487
507
|
# @return [Boolean] Returns `true` when the file is downloaded without
|
488
508
|
# any errors.
|
489
509
|
def download_file(destination, options = {})
|
@@ -119,6 +119,10 @@ module Aws::S3
|
|
119
119
|
end
|
120
120
|
self[:endpoint] = options[:endpoint]
|
121
121
|
self[:force_path_style] = options[:force_path_style]
|
122
|
+
self[:force_path_style] = false if self[:force_path_style].nil?
|
123
|
+
if self[:force_path_style].nil?
|
124
|
+
raise ArgumentError, "Missing required EndpointParameter: :force_path_style"
|
125
|
+
end
|
122
126
|
self[:accelerate] = options[:accelerate]
|
123
127
|
self[:accelerate] = false if self[:accelerate].nil?
|
124
128
|
if self[:accelerate].nil?
|