aws-sdk-s3 1.118.0 → 1.119.2
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/client.rb +213 -213
- data/lib/aws-sdk-s3/customizations/errors.rb +27 -0
- data/lib/aws-sdk-s3/customizations/object.rb +4 -1
- data/lib/aws-sdk-s3/customizations/types/permanent_redirect.rb +26 -0
- data/lib/aws-sdk-s3/customizations.rb +2 -0
- data/lib/aws-sdk-s3/endpoint_provider.rb +239 -173
- data/lib/aws-sdk-s3/multipart_upload_part.rb +1 -1
- data/lib/aws-sdk-s3/object.rb +1 -1
- data/lib/aws-sdk-s3/object_multipart_copier.rb +11 -5
- data/lib/aws-sdk-s3/object_summary.rb +1 -1
- data/lib/aws-sdk-s3/types.rb +8 -9
- data/lib/aws-sdk-s3.rb +1 -1
- metadata +4 -2
@@ -284,7 +284,7 @@ module Aws::S3
|
|
284
284
|
# @option options [required, String] :copy_source
|
285
285
|
# Specifies the source object for the copy operation. You specify the
|
286
286
|
# value in one of two formats, depending on whether you want to access
|
287
|
-
# the source object through an [access point][1]
|
287
|
+
# the source object through an [access point][1]:
|
288
288
|
#
|
289
289
|
# * For objects not accessed through an access point, specify the name
|
290
290
|
# of the source bucket and key of the source object, separated by a
|
data/lib/aws-sdk-s3/object.rb
CHANGED
@@ -658,7 +658,7 @@ module Aws::S3
|
|
658
658
|
# @option options [required, String] :copy_source
|
659
659
|
# Specifies the source object for the copy operation. You specify the
|
660
660
|
# value in one of two formats, depending on whether you want to access
|
661
|
-
# the source object through an [access point][1]
|
661
|
+
# the source object through an [access point][1]:
|
662
662
|
#
|
663
663
|
# * For objects not accessed through an access point, specify the name
|
664
664
|
# of the source bucket and the key of the source object, separated by
|
@@ -24,6 +24,9 @@ module Aws
|
|
24
24
|
@thread_count = options.delete(:thread_count) || 10
|
25
25
|
@min_part_size = options.delete(:min_part_size) || (FIVE_MB * 10)
|
26
26
|
@client = options[:client] || Client.new
|
27
|
+
if options[:checksum_algorithm]
|
28
|
+
raise ArgumentError, 'Multipart Copy does not support setting :checksum_algorithm'
|
29
|
+
end
|
27
30
|
end
|
28
31
|
|
29
32
|
# @return [Client]
|
@@ -31,8 +34,9 @@ module Aws
|
|
31
34
|
|
32
35
|
# @option (see S3::Client#copy_object)
|
33
36
|
def copy(options = {})
|
34
|
-
|
35
|
-
|
37
|
+
metadata = source_metadata(options)
|
38
|
+
size = metadata[:content_length]
|
39
|
+
options[:upload_id] = initiate_upload(metadata.merge(options))
|
36
40
|
begin
|
37
41
|
parts = copy_parts(size, default_part_size(size), options)
|
38
42
|
complete_upload(parts, options)
|
@@ -118,8 +122,10 @@ module Aws
|
|
118
122
|
end
|
119
123
|
end
|
120
124
|
|
121
|
-
def
|
122
|
-
|
125
|
+
def source_metadata(options)
|
126
|
+
if options[:content_length]
|
127
|
+
return { content_length: options.delete(:content_length) }
|
128
|
+
end
|
123
129
|
|
124
130
|
client = options[:copy_source_client] || @client
|
125
131
|
|
@@ -132,7 +138,7 @@ module Aws
|
|
132
138
|
key = CGI.unescape(key)
|
133
139
|
opts = { bucket: bucket, key: key }
|
134
140
|
opts[:version_id] = version_id if version_id
|
135
|
-
client.head_object(opts).
|
141
|
+
client.head_object(opts).to_h
|
136
142
|
end
|
137
143
|
|
138
144
|
def default_part_size(source_size)
|
@@ -352,7 +352,7 @@ module Aws::S3
|
|
352
352
|
# @option options [required, String] :copy_source
|
353
353
|
# Specifies the source object for the copy operation. You specify the
|
354
354
|
# value in one of two formats, depending on whether you want to access
|
355
|
-
# the source object through an [access point][1]
|
355
|
+
# the source object through an [access point][1]:
|
356
356
|
#
|
357
357
|
# * For objects not accessed through an access point, specify the name
|
358
358
|
# of the source bucket and the key of the source object, separated by
|
data/lib/aws-sdk-s3/types.rb
CHANGED
@@ -460,16 +460,15 @@ module Aws::S3
|
|
460
460
|
# @!attribute [rw] file_header_info
|
461
461
|
# Describes the first line of input. Valid values are:
|
462
462
|
#
|
463
|
-
# * `NONE
|
463
|
+
# * `NONE`: First line is not a header.
|
464
464
|
#
|
465
|
-
# * `IGNORE
|
465
|
+
# * `IGNORE`: First line is a header, but you can't use the header
|
466
466
|
# values to indicate the column in an expression. You can use column
|
467
467
|
# position (such as \_1, \_2, …) to indicate the column (`SELECT
|
468
468
|
# s._1 FROM OBJECT s`).
|
469
469
|
#
|
470
|
-
# * `Use
|
471
|
-
#
|
472
|
-
# OBJECT`).
|
470
|
+
# * `Use`: First line is a header, and you can use the header value to
|
471
|
+
# identify a column in an expression (`SELECT "name" FROM OBJECT`).
|
473
472
|
# @return [String]
|
474
473
|
#
|
475
474
|
# @!attribute [rw] comments
|
@@ -533,9 +532,9 @@ module Aws::S3
|
|
533
532
|
# @!attribute [rw] quote_fields
|
534
533
|
# Indicates whether to use quotation marks around output fields.
|
535
534
|
#
|
536
|
-
# * `ALWAYS
|
535
|
+
# * `ALWAYS`: Always use quotation marks for output fields.
|
537
536
|
#
|
538
|
-
# * `ASNEEDED
|
537
|
+
# * `ASNEEDED`: Use quotation marks for output fields when needed.
|
539
538
|
# @return [String]
|
540
539
|
#
|
541
540
|
# @!attribute [rw] quote_escape_character
|
@@ -1298,7 +1297,7 @@ module Aws::S3
|
|
1298
1297
|
# @!attribute [rw] copy_source
|
1299
1298
|
# Specifies the source object for the copy operation. You specify the
|
1300
1299
|
# value in one of two formats, depending on whether you want to access
|
1301
|
-
# the source object through an [access point][1]
|
1300
|
+
# the source object through an [access point][1]:
|
1302
1301
|
#
|
1303
1302
|
# * For objects not accessed through an access point, specify the name
|
1304
1303
|
# of the source bucket and the key of the source object, separated
|
@@ -13107,7 +13106,7 @@ module Aws::S3
|
|
13107
13106
|
# @!attribute [rw] copy_source
|
13108
13107
|
# Specifies the source object for the copy operation. You specify the
|
13109
13108
|
# value in one of two formats, depending on whether you want to access
|
13110
|
-
# the source object through an [access point][1]
|
13109
|
+
# the source object through an [access point][1]:
|
13111
13110
|
#
|
13112
13111
|
# * For objects not accessed through an access point, specify the name
|
13113
13112
|
# of the source bucket and key of the source object, separated by a
|
data/lib/aws-sdk-s3.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: aws-sdk-s3
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.119.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Amazon Web Services
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-03-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aws-sdk-kms
|
@@ -87,10 +87,12 @@ files:
|
|
87
87
|
- lib/aws-sdk-s3/client_api.rb
|
88
88
|
- lib/aws-sdk-s3/customizations.rb
|
89
89
|
- lib/aws-sdk-s3/customizations/bucket.rb
|
90
|
+
- lib/aws-sdk-s3/customizations/errors.rb
|
90
91
|
- lib/aws-sdk-s3/customizations/multipart_upload.rb
|
91
92
|
- lib/aws-sdk-s3/customizations/object.rb
|
92
93
|
- lib/aws-sdk-s3/customizations/object_summary.rb
|
93
94
|
- lib/aws-sdk-s3/customizations/types/list_object_versions_output.rb
|
95
|
+
- lib/aws-sdk-s3/customizations/types/permanent_redirect.rb
|
94
96
|
- lib/aws-sdk-s3/encryption.rb
|
95
97
|
- lib/aws-sdk-s3/encryption/client.rb
|
96
98
|
- lib/aws-sdk-s3/encryption/decrypt_handler.rb
|