aws-sdk-s3 1.132.0 → 1.151.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 +127 -1
- data/VERSION +1 -1
- data/lib/aws-sdk-s3/access_grants_credentials.rb +57 -0
- data/lib/aws-sdk-s3/access_grants_credentials_provider.rb +241 -0
- data/lib/aws-sdk-s3/bucket.rb +424 -81
- data/lib/aws-sdk-s3/bucket_acl.rb +9 -9
- data/lib/aws-sdk-s3/bucket_cors.rb +12 -12
- data/lib/aws-sdk-s3/bucket_lifecycle.rb +12 -12
- data/lib/aws-sdk-s3/bucket_lifecycle_configuration.rb +12 -12
- data/lib/aws-sdk-s3/bucket_logging.rb +16 -9
- data/lib/aws-sdk-s3/bucket_notification.rb +3 -3
- data/lib/aws-sdk-s3/bucket_policy.rb +58 -14
- data/lib/aws-sdk-s3/bucket_region_cache.rb +9 -5
- data/lib/aws-sdk-s3/bucket_request_payment.rb +9 -9
- data/lib/aws-sdk-s3/bucket_tagging.rb +12 -12
- data/lib/aws-sdk-s3/bucket_versioning.rb +27 -27
- data/lib/aws-sdk-s3/bucket_website.rb +12 -12
- data/lib/aws-sdk-s3/client.rb +5783 -2608
- data/lib/aws-sdk-s3/client_api.rb +114 -18
- data/lib/aws-sdk-s3/customizations/errors.rb +15 -2
- data/lib/aws-sdk-s3/customizations/object.rb +45 -2
- data/lib/aws-sdk-s3/customizations.rb +8 -0
- data/lib/aws-sdk-s3/endpoint_parameters.rb +32 -0
- data/lib/aws-sdk-s3/endpoint_provider.rb +88 -6
- data/lib/aws-sdk-s3/endpoints.rb +440 -0
- data/lib/aws-sdk-s3/express_credentials.rb +55 -0
- data/lib/aws-sdk-s3/express_credentials_provider.rb +59 -0
- data/lib/aws-sdk-s3/file_downloader.rb +119 -24
- data/lib/aws-sdk-s3/multipart_file_uploader.rb +4 -4
- data/lib/aws-sdk-s3/multipart_stream_uploader.rb +5 -4
- data/lib/aws-sdk-s3/multipart_upload.rb +69 -16
- data/lib/aws-sdk-s3/multipart_upload_part.rb +160 -35
- data/lib/aws-sdk-s3/object.rb +1504 -235
- data/lib/aws-sdk-s3/object_acl.rb +29 -15
- data/lib/aws-sdk-s3/object_multipart_copier.rb +10 -8
- data/lib/aws-sdk-s3/object_summary.rb +1367 -254
- data/lib/aws-sdk-s3/object_version.rb +297 -42
- data/lib/aws-sdk-s3/plugins/access_grants.rb +108 -0
- data/lib/aws-sdk-s3/plugins/endpoints.rb +14 -2
- data/lib/aws-sdk-s3/plugins/express_session_auth.rb +91 -0
- data/lib/aws-sdk-s3/plugins/location_constraint.rb +3 -1
- data/lib/aws-sdk-s3/plugins/md5s.rb +2 -1
- data/lib/aws-sdk-s3/plugins/s3_signer.rb +7 -2
- data/lib/aws-sdk-s3/presigner.rb +4 -2
- data/lib/aws-sdk-s3/resource.rb +83 -11
- data/lib/aws-sdk-s3/types.rb +4529 -1361
- data/lib/aws-sdk-s3.rb +1 -1
- data/sig/bucket.rbs +212 -0
- data/sig/bucket_acl.rbs +78 -0
- data/sig/bucket_cors.rbs +69 -0
- data/sig/bucket_lifecycle.rbs +88 -0
- data/sig/bucket_lifecycle_configuration.rbs +111 -0
- data/sig/bucket_logging.rbs +76 -0
- data/sig/bucket_notification.rbs +114 -0
- data/sig/bucket_policy.rbs +59 -0
- data/sig/bucket_request_payment.rbs +54 -0
- data/sig/bucket_tagging.rbs +65 -0
- data/sig/bucket_versioning.rbs +77 -0
- data/sig/bucket_website.rbs +93 -0
- data/sig/client.rbs +2362 -0
- data/sig/customizations/bucket.rbs +19 -0
- data/sig/customizations/object.rbs +38 -0
- data/sig/customizations/object_summary.rbs +35 -0
- data/sig/errors.rbs +34 -0
- data/sig/multipart_upload.rbs +110 -0
- data/sig/multipart_upload_part.rbs +105 -0
- data/sig/object.rbs +436 -0
- data/sig/object_acl.rbs +86 -0
- data/sig/object_summary.rbs +334 -0
- data/sig/object_version.rbs +131 -0
- data/sig/resource.rbs +126 -0
- data/sig/types.rbs +2562 -0
- data/sig/waiters.rbs +83 -0
- metadata +43 -11
@@ -0,0 +1,55 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'set'
|
4
|
+
|
5
|
+
module Aws
|
6
|
+
module S3
|
7
|
+
# @api private
|
8
|
+
class ExpressCredentials
|
9
|
+
include CredentialProvider
|
10
|
+
include RefreshingCredentials
|
11
|
+
|
12
|
+
SYNC_EXPIRATION_LENGTH = 60 # 1 minute
|
13
|
+
ASYNC_EXPIRATION_LENGTH = 120 # 2 minutes
|
14
|
+
|
15
|
+
def initialize(options = {})
|
16
|
+
@client = options[:client]
|
17
|
+
@create_session_params = {}
|
18
|
+
options.each_pair do |key, value|
|
19
|
+
if self.class.create_session_options.include?(key)
|
20
|
+
@create_session_params[key] = value
|
21
|
+
end
|
22
|
+
end
|
23
|
+
@async_refresh = true
|
24
|
+
super
|
25
|
+
end
|
26
|
+
|
27
|
+
# @return [S3::Client]
|
28
|
+
attr_reader :client
|
29
|
+
|
30
|
+
private
|
31
|
+
|
32
|
+
def refresh
|
33
|
+
c = @client.create_session(@create_session_params).credentials
|
34
|
+
@credentials = Credentials.new(
|
35
|
+
c.access_key_id,
|
36
|
+
c.secret_access_key,
|
37
|
+
c.session_token
|
38
|
+
)
|
39
|
+
@expiration = c.expiration
|
40
|
+
end
|
41
|
+
|
42
|
+
class << self
|
43
|
+
|
44
|
+
# @api private
|
45
|
+
def create_session_options
|
46
|
+
@cso ||= begin
|
47
|
+
input = S3::Client.api.operation(:create_session).input
|
48
|
+
Set.new(input.shape.member_names)
|
49
|
+
end
|
50
|
+
end
|
51
|
+
|
52
|
+
end
|
53
|
+
end
|
54
|
+
end
|
55
|
+
end
|
@@ -0,0 +1,59 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Aws
|
4
|
+
module S3
|
5
|
+
# @api private
|
6
|
+
def self.express_credentials_cache
|
7
|
+
@express_credentials_cache ||= LRUCache.new(max_entries: 100)
|
8
|
+
end
|
9
|
+
|
10
|
+
# Returns Credentials class for S3 Express. Accepts CreateSession
|
11
|
+
# params as options. See {Client#create_session} for details.
|
12
|
+
class ExpressCredentialsProvider
|
13
|
+
# @param [Hash] options
|
14
|
+
# @option options [Client] :client The S3 client used to create the
|
15
|
+
# session.
|
16
|
+
# @option options [String] :session_mode (see: {Client#create_session})
|
17
|
+
# @option options [Boolean] :caching (true) When true, credentials will
|
18
|
+
# be cached.
|
19
|
+
# @option options [Callable] :before_refresh Proc called before
|
20
|
+
# credentials are refreshed.
|
21
|
+
def initialize(options = {})
|
22
|
+
@client = options.delete(:client)
|
23
|
+
@caching = options.delete(:caching) != false
|
24
|
+
@options = options
|
25
|
+
return unless @caching
|
26
|
+
|
27
|
+
@cache = Aws::S3.express_credentials_cache
|
28
|
+
end
|
29
|
+
|
30
|
+
def express_credentials_for(bucket)
|
31
|
+
if @caching
|
32
|
+
cached_credentials_for(bucket)
|
33
|
+
else
|
34
|
+
new_credentials_for(bucket)
|
35
|
+
end
|
36
|
+
end
|
37
|
+
|
38
|
+
attr_accessor :client
|
39
|
+
|
40
|
+
private
|
41
|
+
|
42
|
+
def cached_credentials_for(bucket)
|
43
|
+
if @cache.key?(bucket)
|
44
|
+
@cache[bucket]
|
45
|
+
else
|
46
|
+
@cache[bucket] = new_credentials_for(bucket)
|
47
|
+
end
|
48
|
+
end
|
49
|
+
|
50
|
+
def new_credentials_for(bucket)
|
51
|
+
ExpressCredentials.new(
|
52
|
+
bucket: bucket,
|
53
|
+
client: @client,
|
54
|
+
**@options
|
55
|
+
)
|
56
|
+
end
|
57
|
+
end
|
58
|
+
end
|
59
|
+
end
|
@@ -31,9 +31,17 @@ module Aws
|
|
31
31
|
key: options[:key],
|
32
32
|
}
|
33
33
|
@params[:version_id] = options[:version_id] if options[:version_id]
|
34
|
-
|
34
|
+
|
35
|
+
# checksum_mode only supports the value "ENABLED"
|
36
|
+
# falsey values (false/nil) or "DISABLED" should be considered
|
37
|
+
# disabled and the api parameter should be unset.
|
38
|
+
if (checksum_mode = options.fetch(:checksum_mode, 'ENABLED'))
|
39
|
+
@params[:checksum_mode] = checksum_mode unless checksum_mode.upcase == 'DISABLED'
|
40
|
+
end
|
35
41
|
@on_checksum_validated = options[:on_checksum_validated]
|
36
42
|
|
43
|
+
@progress_callback = options[:progress_callback]
|
44
|
+
|
37
45
|
validate!
|
38
46
|
|
39
47
|
Aws::Plugins::UserAgent.feature('s3-transfer') do
|
@@ -43,7 +51,7 @@ module Aws
|
|
43
51
|
when 'get_range'
|
44
52
|
if @chunk_size
|
45
53
|
resp = @client.head_object(@params)
|
46
|
-
multithreaded_get_by_ranges(
|
54
|
+
multithreaded_get_by_ranges(resp.content_length)
|
47
55
|
else
|
48
56
|
msg = 'In :get_range mode, :chunk_size must be provided'
|
49
57
|
raise ArgumentError, msg
|
@@ -76,7 +84,7 @@ module Aws
|
|
76
84
|
if resp.content_length <= MIN_CHUNK_SIZE
|
77
85
|
single_request
|
78
86
|
else
|
79
|
-
multithreaded_get_by_ranges(
|
87
|
+
multithreaded_get_by_ranges(resp.content_length)
|
80
88
|
end
|
81
89
|
else
|
82
90
|
# partNumber is an option
|
@@ -93,9 +101,9 @@ module Aws
|
|
93
101
|
chunk_size = compute_chunk(file_size)
|
94
102
|
part_size = (file_size.to_f / count.to_f).ceil
|
95
103
|
if chunk_size < part_size
|
96
|
-
multithreaded_get_by_ranges(
|
104
|
+
multithreaded_get_by_ranges(file_size)
|
97
105
|
else
|
98
|
-
multithreaded_get_by_parts(count)
|
106
|
+
multithreaded_get_by_parts(count, file_size)
|
99
107
|
end
|
100
108
|
end
|
101
109
|
|
@@ -127,30 +135,64 @@ module Aws
|
|
127
135
|
chunks.each_slice(@thread_count).to_a
|
128
136
|
end
|
129
137
|
|
130
|
-
def multithreaded_get_by_ranges(
|
131
|
-
|
138
|
+
def multithreaded_get_by_ranges(file_size)
|
139
|
+
offset = 0
|
140
|
+
default_chunk_size = compute_chunk(file_size)
|
141
|
+
chunks = []
|
142
|
+
part_number = 1 # parts start at 1
|
143
|
+
while offset < file_size
|
144
|
+
progress = offset + default_chunk_size
|
145
|
+
progress = file_size if progress > file_size
|
146
|
+
range = "bytes=#{offset}-#{progress - 1}"
|
147
|
+
chunks << Part.new(
|
148
|
+
part_number: part_number,
|
149
|
+
size: (progress-offset),
|
150
|
+
params: @params.merge(range: range)
|
151
|
+
)
|
152
|
+
part_number += 1
|
153
|
+
offset = progress
|
154
|
+
end
|
155
|
+
download_in_threads(PartList.new(chunks), file_size)
|
132
156
|
end
|
133
157
|
|
134
|
-
def multithreaded_get_by_parts(
|
135
|
-
|
158
|
+
def multithreaded_get_by_parts(n_parts, total_size)
|
159
|
+
parts = (1..n_parts).map do |part|
|
160
|
+
Part.new(part_number: part, params: @params.merge(part_number: part))
|
161
|
+
end
|
162
|
+
download_in_threads(PartList.new(parts), total_size)
|
136
163
|
end
|
137
164
|
|
138
|
-
def
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
165
|
+
def download_in_threads(pending, total_size)
|
166
|
+
threads = []
|
167
|
+
if @progress_callback
|
168
|
+
progress = MultipartProgress.new(pending, total_size, @progress_callback)
|
169
|
+
end
|
170
|
+
@thread_count.times do
|
171
|
+
thread = Thread.new do
|
172
|
+
begin
|
173
|
+
while part = pending.shift
|
174
|
+
if progress
|
175
|
+
part.params[:on_chunk_received] =
|
176
|
+
proc do |_chunk, bytes, total|
|
177
|
+
progress.call(part.part_number, bytes, total)
|
178
|
+
end
|
179
|
+
end
|
180
|
+
resp = @client.get_object(part.params)
|
181
|
+
write(resp)
|
182
|
+
if @on_checksum_validated && resp.checksum_validated
|
183
|
+
@on_checksum_validated.call(resp.checksum_validated, resp)
|
184
|
+
end
|
149
185
|
end
|
186
|
+
nil
|
187
|
+
rescue => error
|
188
|
+
# keep other threads from downloading other parts
|
189
|
+
pending.clear!
|
190
|
+
raise error
|
150
191
|
end
|
151
192
|
end
|
152
|
-
threads
|
193
|
+
threads << thread
|
153
194
|
end
|
195
|
+
threads.map(&:value).compact
|
154
196
|
end
|
155
197
|
|
156
198
|
def write(resp)
|
@@ -160,9 +202,9 @@ module Aws
|
|
160
202
|
end
|
161
203
|
|
162
204
|
def single_request
|
163
|
-
|
164
|
-
|
165
|
-
)
|
205
|
+
params = @params.merge(response_target: @path)
|
206
|
+
params[:on_chunk_received] = single_part_progress if @progress_callback
|
207
|
+
resp = @client.get_object(params)
|
166
208
|
|
167
209
|
return resp unless @on_checksum_validated
|
168
210
|
|
@@ -172,6 +214,59 @@ module Aws
|
|
172
214
|
|
173
215
|
resp
|
174
216
|
end
|
217
|
+
|
218
|
+
def single_part_progress
|
219
|
+
proc do |_chunk, bytes_read, total_size|
|
220
|
+
@progress_callback.call([bytes_read], [total_size], total_size)
|
221
|
+
end
|
222
|
+
end
|
223
|
+
|
224
|
+
class Part < Struct.new(:part_number, :size, :params)
|
225
|
+
include Aws::Structure
|
226
|
+
end
|
227
|
+
|
228
|
+
# @api private
|
229
|
+
class PartList
|
230
|
+
include Enumerable
|
231
|
+
def initialize(parts = [])
|
232
|
+
@parts = parts
|
233
|
+
@mutex = Mutex.new
|
234
|
+
end
|
235
|
+
|
236
|
+
def shift
|
237
|
+
@mutex.synchronize { @parts.shift }
|
238
|
+
end
|
239
|
+
|
240
|
+
def size
|
241
|
+
@mutex.synchronize { @parts.size }
|
242
|
+
end
|
243
|
+
|
244
|
+
def clear!
|
245
|
+
@mutex.synchronize { @parts.clear }
|
246
|
+
end
|
247
|
+
|
248
|
+
def each(&block)
|
249
|
+
@mutex.synchronize { @parts.each(&block) }
|
250
|
+
end
|
251
|
+
end
|
252
|
+
|
253
|
+
# @api private
|
254
|
+
class MultipartProgress
|
255
|
+
def initialize(parts, total_size, progress_callback)
|
256
|
+
@bytes_received = Array.new(parts.size, 0)
|
257
|
+
@part_sizes = parts.map(&:size)
|
258
|
+
@total_size = total_size
|
259
|
+
@progress_callback = progress_callback
|
260
|
+
end
|
261
|
+
|
262
|
+
def call(part_number, bytes_received, total)
|
263
|
+
# part numbers start at 1
|
264
|
+
@bytes_received[part_number - 1] = bytes_received
|
265
|
+
# part size may not be known until we get the first response
|
266
|
+
@part_sizes[part_number - 1] ||= total
|
267
|
+
@progress_callback.call(@bytes_received, @part_sizes, @total_size)
|
268
|
+
end
|
269
|
+
end
|
175
270
|
end
|
176
271
|
end
|
177
272
|
end
|
@@ -89,12 +89,13 @@ module Aws
|
|
89
89
|
key: options[:key],
|
90
90
|
upload_id: upload_id
|
91
91
|
)
|
92
|
-
msg = "multipart upload failed: #{errors.map(&:message).join(
|
92
|
+
msg = "multipart upload failed: #{errors.map(&:message).join('; ')}"
|
93
93
|
raise MultipartUploadError.new(msg, errors)
|
94
94
|
rescue MultipartUploadError => error
|
95
95
|
raise error
|
96
96
|
rescue => error
|
97
|
-
msg = "failed to abort multipart upload: #{error.message}"
|
97
|
+
msg = "failed to abort multipart upload: #{error.message}. "\
|
98
|
+
"Multipart upload failed: #{errors.map(&:message).join('; ')}"
|
98
99
|
raise MultipartUploadError.new(msg, errors + [error])
|
99
100
|
end
|
100
101
|
|
@@ -146,7 +147,7 @@ module Aws
|
|
146
147
|
if (callback = options[:progress_callback])
|
147
148
|
progress = MultipartProgress.new(pending, callback)
|
148
149
|
end
|
149
|
-
@thread_count.times do
|
150
|
+
options.fetch(:thread_count, @thread_count).times do
|
150
151
|
thread = Thread.new do
|
151
152
|
begin
|
152
153
|
while part = pending.shift
|
@@ -175,7 +176,6 @@ module Aws
|
|
175
176
|
error
|
176
177
|
end
|
177
178
|
end
|
178
|
-
thread.abort_on_exception = true
|
179
179
|
threads << thread
|
180
180
|
end
|
181
181
|
threads.map(&:value).compact
|
@@ -43,6 +43,7 @@ module Aws
|
|
43
43
|
|
44
44
|
# @option options [required,String] :bucket
|
45
45
|
# @option options [required,String] :key
|
46
|
+
# @option options [Integer] :thread_count (THREAD_COUNT)
|
46
47
|
# @return [Seahorse::Client::Response] - the CompleteMultipartUploadResponse
|
47
48
|
def upload(options = {}, &block)
|
48
49
|
Aws::Plugins::UserAgent.feature('s3-transfer') do
|
@@ -101,12 +102,13 @@ module Aws
|
|
101
102
|
key: options[:key],
|
102
103
|
upload_id: upload_id
|
103
104
|
)
|
104
|
-
msg = "multipart upload failed: #{errors.map(&:message).join(
|
105
|
+
msg = "multipart upload failed: #{errors.map(&:message).join('; ')}"
|
105
106
|
raise MultipartUploadError.new(msg, errors)
|
106
107
|
rescue MultipartUploadError => error
|
107
108
|
raise error
|
108
109
|
rescue => error
|
109
|
-
msg = "failed to abort multipart upload: #{error.message}"
|
110
|
+
msg = "failed to abort multipart upload: #{error.message}. "\
|
111
|
+
"Multipart upload failed: #{errors.map(&:message).join('; ')}"
|
110
112
|
raise MultipartUploadError.new(msg, errors + [error])
|
111
113
|
end
|
112
114
|
|
@@ -151,7 +153,7 @@ module Aws
|
|
151
153
|
def upload_in_threads(read_pipe, completed, options, thread_errors)
|
152
154
|
mutex = Mutex.new
|
153
155
|
part_number = 0
|
154
|
-
@thread_count.times.map do
|
156
|
+
options.fetch(:thread_count, @thread_count).times.map do
|
155
157
|
thread = Thread.new do
|
156
158
|
begin
|
157
159
|
loop do
|
@@ -192,7 +194,6 @@ module Aws
|
|
192
194
|
error
|
193
195
|
end
|
194
196
|
end
|
195
|
-
thread.abort_on_exception = true
|
196
197
|
thread
|
197
198
|
end
|
198
199
|
end
|
@@ -69,6 +69,11 @@ module Aws::S3
|
|
69
69
|
end
|
70
70
|
|
71
71
|
# The class of storage used to store the object.
|
72
|
+
#
|
73
|
+
# <note markdown="1"> **Directory buckets** - Only the S3 Express One Zone storage class is
|
74
|
+
# supported by directory buckets to store objects.
|
75
|
+
#
|
76
|
+
# </note>
|
72
77
|
# @return [String]
|
73
78
|
def storage_class
|
74
79
|
data[:storage_class]
|
@@ -76,6 +81,11 @@ module Aws::S3
|
|
76
81
|
|
77
82
|
# Specifies the owner of the object that is part of the multipart
|
78
83
|
# upload.
|
84
|
+
#
|
85
|
+
# <note markdown="1"> **Directory buckets** - The bucket owner is returned as the object
|
86
|
+
# owner for all the objects.
|
87
|
+
#
|
88
|
+
# </note>
|
79
89
|
# @return [Types::Owner]
|
80
90
|
def owner
|
81
91
|
data[:owner]
|
@@ -234,17 +244,23 @@ module Aws::S3
|
|
234
244
|
# @option options [String] :request_payer
|
235
245
|
# Confirms that the requester knows that they will be charged for the
|
236
246
|
# request. Bucket owners need not specify this parameter in their
|
237
|
-
# requests.
|
247
|
+
# requests. If either the source or destination S3 bucket has Requester
|
248
|
+
# Pays enabled, the requester will pay for corresponding charges to copy
|
249
|
+
# the object. For information about downloading objects from Requester
|
238
250
|
# Pays buckets, see [Downloading Objects in Requester Pays Buckets][1]
|
239
251
|
# in the *Amazon S3 User Guide*.
|
240
252
|
#
|
253
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
254
|
+
#
|
255
|
+
# </note>
|
256
|
+
#
|
241
257
|
#
|
242
258
|
#
|
243
259
|
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
|
244
260
|
# @option options [String] :expected_bucket_owner
|
245
|
-
# The account ID of the expected bucket owner. If the
|
246
|
-
#
|
247
|
-
# Forbidden` (access denied).
|
261
|
+
# The account ID of the expected bucket owner. If the account ID that
|
262
|
+
# you provide does not match the actual owner of the bucket, the request
|
263
|
+
# fails with the HTTP status code `403 Forbidden` (access denied).
|
248
264
|
# @return [Types::AbortMultipartUploadOutput]
|
249
265
|
def abort(options = {})
|
250
266
|
options = options.merge(
|
@@ -329,32 +345,47 @@ module Aws::S3
|
|
329
345
|
# @option options [String] :request_payer
|
330
346
|
# Confirms that the requester knows that they will be charged for the
|
331
347
|
# request. Bucket owners need not specify this parameter in their
|
332
|
-
# requests.
|
348
|
+
# requests. If either the source or destination S3 bucket has Requester
|
349
|
+
# Pays enabled, the requester will pay for corresponding charges to copy
|
350
|
+
# the object. For information about downloading objects from Requester
|
333
351
|
# Pays buckets, see [Downloading Objects in Requester Pays Buckets][1]
|
334
352
|
# in the *Amazon S3 User Guide*.
|
335
353
|
#
|
354
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
355
|
+
#
|
356
|
+
# </note>
|
357
|
+
#
|
336
358
|
#
|
337
359
|
#
|
338
360
|
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
|
339
361
|
# @option options [String] :expected_bucket_owner
|
340
|
-
# The account ID of the expected bucket owner. If the
|
341
|
-
#
|
342
|
-
# Forbidden` (access denied).
|
362
|
+
# The account ID of the expected bucket owner. If the account ID that
|
363
|
+
# you provide does not match the actual owner of the bucket, the request
|
364
|
+
# fails with the HTTP status code `403 Forbidden` (access denied).
|
343
365
|
# @option options [String] :sse_customer_algorithm
|
344
366
|
# The server-side encryption (SSE) algorithm used to encrypt the object.
|
345
|
-
# This parameter is
|
346
|
-
# checksum algorithm
|
347
|
-
# SSE-C keys][1] in the
|
367
|
+
# This parameter is required only when the object was created using a
|
368
|
+
# checksum algorithm or if your bucket policy requires the use of SSE-C.
|
369
|
+
# For more information, see [Protecting data using SSE-C keys][1] in the
|
370
|
+
# *Amazon S3 User Guide*.
|
348
371
|
#
|
372
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
349
373
|
#
|
374
|
+
# </note>
|
350
375
|
#
|
351
|
-
#
|
376
|
+
#
|
377
|
+
#
|
378
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/ServerSideEncryptionCustomerKeys.html#ssec-require-condition-key
|
352
379
|
# @option options [String] :sse_customer_key
|
353
380
|
# The server-side encryption (SSE) customer managed key. This parameter
|
354
381
|
# is needed only when the object was created using a checksum algorithm.
|
355
382
|
# For more information, see [Protecting data using SSE-C keys][1] in the
|
356
383
|
# *Amazon S3 User Guide*.
|
357
384
|
#
|
385
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
386
|
+
#
|
387
|
+
# </note>
|
388
|
+
#
|
358
389
|
#
|
359
390
|
#
|
360
391
|
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html
|
@@ -364,6 +395,10 @@ module Aws::S3
|
|
364
395
|
# algorithm. For more information, see [Protecting data using SSE-C
|
365
396
|
# keys][1] in the *Amazon S3 User Guide*.
|
366
397
|
#
|
398
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
399
|
+
#
|
400
|
+
# </note>
|
401
|
+
#
|
367
402
|
#
|
368
403
|
#
|
369
404
|
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html
|
@@ -420,23 +455,33 @@ module Aws::S3
|
|
420
455
|
# @option options [String] :request_payer
|
421
456
|
# Confirms that the requester knows that they will be charged for the
|
422
457
|
# request. Bucket owners need not specify this parameter in their
|
423
|
-
# requests.
|
458
|
+
# requests. If either the source or destination S3 bucket has Requester
|
459
|
+
# Pays enabled, the requester will pay for corresponding charges to copy
|
460
|
+
# the object. For information about downloading objects from Requester
|
424
461
|
# Pays buckets, see [Downloading Objects in Requester Pays Buckets][1]
|
425
462
|
# in the *Amazon S3 User Guide*.
|
426
463
|
#
|
464
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
465
|
+
#
|
466
|
+
# </note>
|
467
|
+
#
|
427
468
|
#
|
428
469
|
#
|
429
470
|
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
|
430
471
|
# @option options [String] :expected_bucket_owner
|
431
|
-
# The account ID of the expected bucket owner. If the
|
432
|
-
#
|
433
|
-
# Forbidden` (access denied).
|
472
|
+
# The account ID of the expected bucket owner. If the account ID that
|
473
|
+
# you provide does not match the actual owner of the bucket, the request
|
474
|
+
# fails with the HTTP status code `403 Forbidden` (access denied).
|
434
475
|
# @option options [String] :sse_customer_algorithm
|
435
476
|
# The server-side encryption (SSE) algorithm used to encrypt the object.
|
436
477
|
# This parameter is needed only when the object was created using a
|
437
478
|
# checksum algorithm. For more information, see [Protecting data using
|
438
479
|
# SSE-C keys][1] in the *Amazon S3 User Guide*.
|
439
480
|
#
|
481
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
482
|
+
#
|
483
|
+
# </note>
|
484
|
+
#
|
440
485
|
#
|
441
486
|
#
|
442
487
|
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html
|
@@ -446,6 +491,10 @@ module Aws::S3
|
|
446
491
|
# For more information, see [Protecting data using SSE-C keys][1] in the
|
447
492
|
# *Amazon S3 User Guide*.
|
448
493
|
#
|
494
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
495
|
+
#
|
496
|
+
# </note>
|
497
|
+
#
|
449
498
|
#
|
450
499
|
#
|
451
500
|
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html
|
@@ -455,6 +504,10 @@ module Aws::S3
|
|
455
504
|
# algorithm. For more information, see [Protecting data using SSE-C
|
456
505
|
# keys][1] in the *Amazon S3 User Guide*.
|
457
506
|
#
|
507
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
508
|
+
#
|
509
|
+
# </note>
|
510
|
+
#
|
458
511
|
#
|
459
512
|
#
|
460
513
|
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html
|