aws-sdk-s3 1.78.0 → 1.87.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/aws-sdk-s3.rb +3 -2
- data/lib/aws-sdk-s3/arn/access_point_arn.rb +62 -0
- data/lib/aws-sdk-s3/arn/outpost_access_point_arn.rb +71 -0
- data/lib/aws-sdk-s3/bucket.rb +65 -6
- data/lib/aws-sdk-s3/bucket_acl.rb +8 -0
- data/lib/aws-sdk-s3/bucket_cors.rb +15 -1
- data/lib/aws-sdk-s3/bucket_lifecycle.rb +14 -1
- data/lib/aws-sdk-s3/bucket_lifecycle_configuration.rb +12 -1
- data/lib/aws-sdk-s3/bucket_logging.rb +8 -0
- data/lib/aws-sdk-s3/bucket_notification.rb +5 -0
- data/lib/aws-sdk-s3/bucket_policy.rb +15 -1
- data/lib/aws-sdk-s3/bucket_request_payment.rb +8 -0
- data/lib/aws-sdk-s3/bucket_tagging.rb +15 -1
- data/lib/aws-sdk-s3/bucket_versioning.rb +24 -0
- data/lib/aws-sdk-s3/bucket_website.rb +15 -1
- data/lib/aws-sdk-s3/client.rb +2659 -778
- data/lib/aws-sdk-s3/client_api.rb +297 -20
- data/lib/aws-sdk-s3/customizations.rb +1 -1
- data/lib/aws-sdk-s3/customizations/bucket.rb +7 -4
- data/lib/aws-sdk-s3/customizations/object.rb +4 -3
- data/lib/aws-sdk-s3/errors.rb +21 -0
- data/lib/aws-sdk-s3/file_uploader.rb +1 -1
- data/lib/aws-sdk-s3/legacy_signer.rb +15 -25
- data/lib/aws-sdk-s3/multipart_upload.rb +15 -0
- data/lib/aws-sdk-s3/multipart_upload_part.rb +63 -6
- data/lib/aws-sdk-s3/object.rb +212 -24
- data/lib/aws-sdk-s3/object_acl.rb +16 -0
- data/lib/aws-sdk-s3/object_summary.rb +179 -14
- data/lib/aws-sdk-s3/object_version.rb +27 -3
- data/lib/aws-sdk-s3/plugins/arn.rb +187 -0
- data/lib/aws-sdk-s3/plugins/bucket_dns.rb +0 -2
- data/lib/aws-sdk-s3/plugins/bucket_name_restrictions.rb +1 -1
- data/lib/aws-sdk-s3/plugins/iad_regional_endpoint.rb +7 -2
- data/lib/aws-sdk-s3/plugins/s3_signer.rb +29 -7
- data/lib/aws-sdk-s3/presigned_post.rb +1 -0
- data/lib/aws-sdk-s3/presigner.rb +19 -5
- data/lib/aws-sdk-s3/types.rb +2301 -287
- metadata +7 -5
- data/lib/aws-sdk-s3/plugins/bucket_arn.rb +0 -212
@@ -29,6 +29,6 @@ require 'aws-sdk-s3/customizations/types/list_object_versions_output'
|
|
29
29
|
Aws::S3::ObjectVersion::Collection,
|
30
30
|
].each do |klass|
|
31
31
|
klass.send(:alias_method, :delete, :batch_delete!)
|
32
|
-
klass.
|
32
|
+
klass.extend Aws::Deprecations
|
33
33
|
klass.send(:deprecated, :delete, use: :batch_delete!)
|
34
34
|
end
|
@@ -12,13 +12,12 @@ module Aws
|
|
12
12
|
# Define a new initialize method that extracts out a bucket ARN.
|
13
13
|
define_method(:initialize) do |*args|
|
14
14
|
old_initialize.bind(self).call(*args)
|
15
|
-
|
15
|
+
resolved_region, arn = Plugins::ARN.resolve_arn!(
|
16
16
|
name,
|
17
17
|
client.config.region,
|
18
18
|
client.config.s3_use_arn_region
|
19
19
|
)
|
20
|
-
@
|
21
|
-
@client.config.region = region
|
20
|
+
@resolved_region = resolved_region
|
22
21
|
@arn = arn
|
23
22
|
end
|
24
23
|
|
@@ -102,7 +101,11 @@ module Aws
|
|
102
101
|
if options[:virtual_host]
|
103
102
|
"http://#{name}"
|
104
103
|
elsif @arn
|
105
|
-
Plugins::
|
104
|
+
Plugins::ARN.resolve_url!(
|
105
|
+
client.config.endpoint.dup,
|
106
|
+
@arn,
|
107
|
+
@resolved_region
|
108
|
+
).to_s
|
106
109
|
else
|
107
110
|
s3_bucket_url
|
108
111
|
end
|
@@ -282,8 +282,8 @@ module Aws
|
|
282
282
|
# # small files are uploaded in a single API call
|
283
283
|
# obj.upload_file('/path/to/file')
|
284
284
|
#
|
285
|
-
# Files larger than `:multipart_threshold` are uploaded
|
286
|
-
# Amazon S3 multipart upload APIs.
|
285
|
+
# Files larger than or equal to `:multipart_threshold` are uploaded
|
286
|
+
# using the Amazon S3 multipart upload APIs.
|
287
287
|
#
|
288
288
|
# # large files are automatically split into parts
|
289
289
|
# # and the parts are uploaded in parallel
|
@@ -313,7 +313,8 @@ module Aws
|
|
313
313
|
# will be empty.
|
314
314
|
#
|
315
315
|
# @option options [Integer] :multipart_threshold (15728640) Files larger
|
316
|
-
# than `:multipart_threshold` are uploaded using the S3
|
316
|
+
# than or equal to `:multipart_threshold` are uploaded using the S3
|
317
|
+
# multipart APIs.
|
317
318
|
# Default threshold is 15MB.
|
318
319
|
#
|
319
320
|
# @option options [Integer] :thread_count (10) The number of parallel
|
data/lib/aws-sdk-s3/errors.rb
CHANGED
@@ -29,6 +29,7 @@ module Aws::S3
|
|
29
29
|
# ## Error Classes
|
30
30
|
# * {BucketAlreadyExists}
|
31
31
|
# * {BucketAlreadyOwnedByYou}
|
32
|
+
# * {InvalidObjectState}
|
32
33
|
# * {NoSuchBucket}
|
33
34
|
# * {NoSuchKey}
|
34
35
|
# * {NoSuchUpload}
|
@@ -61,6 +62,26 @@ module Aws::S3
|
|
61
62
|
end
|
62
63
|
end
|
63
64
|
|
65
|
+
class InvalidObjectState < ServiceError
|
66
|
+
|
67
|
+
# @param [Seahorse::Client::RequestContext] context
|
68
|
+
# @param [String] message
|
69
|
+
# @param [Aws::S3::Types::InvalidObjectState] data
|
70
|
+
def initialize(context, message, data = Aws::EmptyStructure.new)
|
71
|
+
super(context, message, data)
|
72
|
+
end
|
73
|
+
|
74
|
+
# @return [String]
|
75
|
+
def storage_class
|
76
|
+
@data[:storage_class]
|
77
|
+
end
|
78
|
+
|
79
|
+
# @return [String]
|
80
|
+
def access_tier
|
81
|
+
@data[:access_tier]
|
82
|
+
end
|
83
|
+
end
|
84
|
+
|
64
85
|
class NoSuchBucket < ServiceError
|
65
86
|
|
66
87
|
# @param [Seahorse::Client::RequestContext] context
|
@@ -22,7 +22,7 @@ module Aws
|
|
22
22
|
# @return [Client]
|
23
23
|
attr_reader :client
|
24
24
|
|
25
|
-
# @return [Integer] Files larger than this in bytes are uploaded
|
25
|
+
# @return [Integer] Files larger than or equal to this in bytes are uploaded
|
26
26
|
# using a {MultipartFileUploader}.
|
27
27
|
attr_reader :multipart_threshold
|
28
28
|
|
@@ -4,7 +4,6 @@ require 'set'
|
|
4
4
|
require 'time'
|
5
5
|
require 'openssl'
|
6
6
|
require 'cgi'
|
7
|
-
require 'webrick/httputils'
|
8
7
|
require 'aws-sdk-core/query'
|
9
8
|
|
10
9
|
module Aws
|
@@ -157,33 +156,24 @@ module Aws
|
|
157
156
|
end
|
158
157
|
|
159
158
|
def uri_escape(s)
|
160
|
-
|
161
159
|
#URI.escape(s)
|
162
160
|
|
163
|
-
#
|
164
|
-
#
|
165
|
-
#
|
166
|
-
#
|
167
|
-
#
|
168
|
-
#
|
169
|
-
#
|
170
|
-
# (
|
171
|
-
#
|
172
|
-
#
|
173
|
-
#
|
174
|
-
#
|
175
|
-
#
|
176
|
-
#
|
177
|
-
|
178
|
-
# URI.escape(s),
|
179
|
-
# ]
|
180
|
-
# next if e.uniq.length == 1
|
181
|
-
# puts("%5s %5s %5s %5s %5s %5s %5s" % ([s.inspect] + e))
|
182
|
-
# }
|
183
|
-
#
|
184
|
-
WEBrick::HTTPUtils.escape(s).gsub('%5B', '[').gsub('%5D', ']')
|
161
|
+
# (0..255).each {|c|
|
162
|
+
# s = [c].pack("C")
|
163
|
+
# e = [
|
164
|
+
# CGI.escape(s),
|
165
|
+
# ERB::Util.url_encode(s),
|
166
|
+
# URI.encode_www_form_component(s),
|
167
|
+
# WEBrick::HTTPUtils.escape_form(s),
|
168
|
+
# WEBrick::HTTPUtils.escape(s),
|
169
|
+
# URI.escape(s),
|
170
|
+
# URI::DEFAULT_PARSER.escape(s)
|
171
|
+
# ]
|
172
|
+
# next if e.uniq.length == 1
|
173
|
+
# puts("%5s %5s %5s %5s %5s %5s %5s %5s" % ([s.inspect] + e))
|
174
|
+
# }
|
175
|
+
URI::DEFAULT_PARSER.escape(s)
|
185
176
|
end
|
186
|
-
|
187
177
|
end
|
188
178
|
end
|
189
179
|
end
|
@@ -220,6 +220,7 @@ module Aws::S3
|
|
220
220
|
#
|
221
221
|
# multipart_upload.abort({
|
222
222
|
# request_payer: "requester", # accepts requester
|
223
|
+
# expected_bucket_owner: "AccountId",
|
223
224
|
# })
|
224
225
|
# @param [Hash] options ({})
|
225
226
|
# @option options [String] :request_payer
|
@@ -232,6 +233,10 @@ module Aws::S3
|
|
232
233
|
#
|
233
234
|
#
|
234
235
|
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
|
236
|
+
# @option options [String] :expected_bucket_owner
|
237
|
+
# The account id of the expected bucket owner. If the bucket is owned by
|
238
|
+
# a different account, the request will fail with an HTTP `403 (Access
|
239
|
+
# Denied)` error.
|
235
240
|
# @return [Types::AbortMultipartUploadOutput]
|
236
241
|
def abort(options = {})
|
237
242
|
options = options.merge(
|
@@ -255,6 +260,7 @@ module Aws::S3
|
|
255
260
|
# ],
|
256
261
|
# },
|
257
262
|
# request_payer: "requester", # accepts requester
|
263
|
+
# expected_bucket_owner: "AccountId",
|
258
264
|
# })
|
259
265
|
# @param [Hash] options ({})
|
260
266
|
# @option options [Types::CompletedMultipartUpload] :multipart_upload
|
@@ -269,6 +275,10 @@ module Aws::S3
|
|
269
275
|
#
|
270
276
|
#
|
271
277
|
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
|
278
|
+
# @option options [String] :expected_bucket_owner
|
279
|
+
# The account id of the expected bucket owner. If the bucket is owned by
|
280
|
+
# a different account, the request will fail with an HTTP `403 (Access
|
281
|
+
# Denied)` error.
|
272
282
|
# @return [Object]
|
273
283
|
def complete(options = {})
|
274
284
|
options = options.merge(
|
@@ -311,6 +321,7 @@ module Aws::S3
|
|
311
321
|
#
|
312
322
|
# parts = multipart_upload.parts({
|
313
323
|
# request_payer: "requester", # accepts requester
|
324
|
+
# expected_bucket_owner: "AccountId",
|
314
325
|
# })
|
315
326
|
# @param [Hash] options ({})
|
316
327
|
# @option options [String] :request_payer
|
@@ -323,6 +334,10 @@ module Aws::S3
|
|
323
334
|
#
|
324
335
|
#
|
325
336
|
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
|
337
|
+
# @option options [String] :expected_bucket_owner
|
338
|
+
# The account id of the expected bucket owner. If the bucket is owned by
|
339
|
+
# a different account, the request will fail with an HTTP `403 (Access
|
340
|
+
# Denied)` error.
|
326
341
|
# @return [MultipartUploadPart::Collection]
|
327
342
|
def parts(options = {})
|
328
343
|
batches = Enumerator.new do |y|
|
@@ -221,11 +221,55 @@ module Aws::S3
|
|
221
221
|
# copy_source_sse_customer_key: "CopySourceSSECustomerKey",
|
222
222
|
# copy_source_sse_customer_key_md5: "CopySourceSSECustomerKeyMD5",
|
223
223
|
# request_payer: "requester", # accepts requester
|
224
|
+
# expected_bucket_owner: "AccountId",
|
225
|
+
# expected_source_bucket_owner: "AccountId",
|
224
226
|
# })
|
225
227
|
# @param [Hash] options ({})
|
226
228
|
# @option options [required, String] :copy_source
|
227
|
-
#
|
228
|
-
#
|
229
|
+
# Specifies the source object for the copy operation. You specify the
|
230
|
+
# value in one of two formats, depending on whether you want to access
|
231
|
+
# the source object through an [access point][1]\:
|
232
|
+
#
|
233
|
+
# * For objects not accessed through an access point, specify the name
|
234
|
+
# of the source bucket and key of the source object, separated by a
|
235
|
+
# slash (/). For example, to copy the object `reports/january.pdf`
|
236
|
+
# from the bucket `awsexamplebucket`, use
|
237
|
+
# `awsexamplebucket/reports/january.pdf`. The value must be URL
|
238
|
+
# encoded.
|
239
|
+
#
|
240
|
+
# * For objects accessed through access points, specify the Amazon
|
241
|
+
# Resource Name (ARN) of the object as accessed through the access
|
242
|
+
# point, in the format
|
243
|
+
# `arn:aws:s3:<Region>:<account-id>:accesspoint/<access-point-name>/object/<key>`.
|
244
|
+
# For example, to copy the object `reports/january.pdf` through access
|
245
|
+
# point `my-access-point` owned by account `123456789012` in Region
|
246
|
+
# `us-west-2`, use the URL encoding of
|
247
|
+
# `arn:aws:s3:us-west-2:123456789012:accesspoint/my-access-point/object/reports/january.pdf`.
|
248
|
+
# The value must be URL encoded.
|
249
|
+
#
|
250
|
+
# <note markdown="1"> Amazon S3 supports copy operations using access points only when the
|
251
|
+
# source and destination buckets are in the same AWS Region.
|
252
|
+
#
|
253
|
+
# </note>
|
254
|
+
#
|
255
|
+
# Alternatively, for objects accessed through Amazon S3 on Outposts,
|
256
|
+
# specify the ARN of the object as accessed in the format
|
257
|
+
# `arn:aws:s3-outposts:<Region>:<account-id>:outpost/<outpost-id>/object/<key>`.
|
258
|
+
# For example, to copy the object `reports/january.pdf` through
|
259
|
+
# outpost `my-outpost` owned by account `123456789012` in Region
|
260
|
+
# `us-west-2`, use the URL encoding of
|
261
|
+
# `arn:aws:s3-outposts:us-west-2:123456789012:outpost/my-outpost/object/reports/january.pdf`.
|
262
|
+
# The value must be URL encoded.
|
263
|
+
#
|
264
|
+
# To copy a specific version of an object, append
|
265
|
+
# `?versionId=<version-id>` to the value (for example,
|
266
|
+
# `awsexamplebucket/reports/january.pdf?versionId=QUpfdndhfd8438MNFDN93jdnJFkdmqnh893`).
|
267
|
+
# If you don't specify a version ID, Amazon S3 copies the latest
|
268
|
+
# version of the source object.
|
269
|
+
#
|
270
|
+
#
|
271
|
+
#
|
272
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/access-points.html
|
229
273
|
# @option options [String] :copy_source_if_match
|
230
274
|
# Copies the object if its entity tag (ETag) matches the specified tag.
|
231
275
|
# @option options [Time,DateTime,Date,Integer,String] :copy_source_if_modified_since
|
@@ -250,8 +294,8 @@ module Aws::S3
|
|
250
294
|
# encrypting data. This value is used to store the object and then it is
|
251
295
|
# discarded; Amazon S3 does not store the encryption key. The key must
|
252
296
|
# be appropriate for use with the algorithm specified in the
|
253
|
-
# `x-amz-server-side
|
254
|
-
#
|
297
|
+
# `x-amz-server-side-encryption-customer-algorithm` header. This must be
|
298
|
+
# the same encryption key specified in the initiate multipart upload
|
255
299
|
# request.
|
256
300
|
# @option options [String] :sse_customer_key_md5
|
257
301
|
# Specifies the 128-bit MD5 digest of the encryption key according to
|
@@ -278,6 +322,14 @@ module Aws::S3
|
|
278
322
|
#
|
279
323
|
#
|
280
324
|
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
|
325
|
+
# @option options [String] :expected_bucket_owner
|
326
|
+
# The account id of the expected destination bucket owner. If the
|
327
|
+
# destination bucket is owned by a different account, the request will
|
328
|
+
# fail with an HTTP `403 (Access Denied)` error.
|
329
|
+
# @option options [String] :expected_source_bucket_owner
|
330
|
+
# The account id of the expected source bucket owner. If the source
|
331
|
+
# bucket is owned by a different account, the request will fail with an
|
332
|
+
# HTTP `403 (Access Denied)` error.
|
281
333
|
# @return [Types::UploadPartCopyOutput]
|
282
334
|
def copy_from(options = {})
|
283
335
|
options = options.merge(
|
@@ -300,6 +352,7 @@ module Aws::S3
|
|
300
352
|
# sse_customer_key: "SSECustomerKey",
|
301
353
|
# sse_customer_key_md5: "SSECustomerKeyMD5",
|
302
354
|
# request_payer: "requester", # accepts requester
|
355
|
+
# expected_bucket_owner: "AccountId",
|
303
356
|
# })
|
304
357
|
# @param [Hash] options ({})
|
305
358
|
# @option options [String, StringIO, File] :body
|
@@ -319,8 +372,8 @@ module Aws::S3
|
|
319
372
|
# encrypting data. This value is used to store the object and then it is
|
320
373
|
# discarded; Amazon S3 does not store the encryption key. The key must
|
321
374
|
# be appropriate for use with the algorithm specified in the
|
322
|
-
# `x-amz-server-side
|
323
|
-
#
|
375
|
+
# `x-amz-server-side-encryption-customer-algorithm header`. This must be
|
376
|
+
# the same encryption key specified in the initiate multipart upload
|
324
377
|
# request.
|
325
378
|
# @option options [String] :sse_customer_key_md5
|
326
379
|
# Specifies the 128-bit MD5 digest of the encryption key according to
|
@@ -336,6 +389,10 @@ module Aws::S3
|
|
336
389
|
#
|
337
390
|
#
|
338
391
|
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
|
392
|
+
# @option options [String] :expected_bucket_owner
|
393
|
+
# The account id of the expected bucket owner. If the bucket is owned by
|
394
|
+
# a different account, the request will fail with an HTTP `403 (Access
|
395
|
+
# Denied)` error.
|
339
396
|
# @return [Types::UploadPartOutput]
|
340
397
|
def upload(options = {})
|
341
398
|
options = options.merge(
|
data/lib/aws-sdk-s3/object.rb
CHANGED
@@ -67,8 +67,8 @@ module Aws::S3
|
|
67
67
|
|
68
68
|
# If the object is an archived object (an object whose storage class is
|
69
69
|
# GLACIER), the response includes this header if either the archive
|
70
|
-
# restoration is in progress (see RestoreObject or an archive copy
|
71
|
-
# already restored.
|
70
|
+
# restoration is in progress (see [RestoreObject][1] or an archive copy
|
71
|
+
# is already restored.
|
72
72
|
#
|
73
73
|
# If an archive copy is already restored, the header value indicates
|
74
74
|
# when Amazon S3 is scheduled to delete the object copy. For example:
|
@@ -80,16 +80,23 @@ module Aws::S3
|
|
80
80
|
# `ongoing-request="true"`.
|
81
81
|
#
|
82
82
|
# For more information about archiving objects, see [Transitioning
|
83
|
-
# Objects: General Considerations][
|
83
|
+
# Objects: General Considerations][2].
|
84
84
|
#
|
85
85
|
#
|
86
86
|
#
|
87
|
-
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/
|
87
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_RestoreObject.html
|
88
|
+
# [2]: https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lifecycle-mgmt.html#lifecycle-transition-general-considerations
|
88
89
|
# @return [String]
|
89
90
|
def restore
|
90
91
|
data[:restore]
|
91
92
|
end
|
92
93
|
|
94
|
+
# The archive state of the head object.
|
95
|
+
# @return [String]
|
96
|
+
def archive_status
|
97
|
+
data[:archive_status]
|
98
|
+
end
|
99
|
+
|
93
100
|
# Last modified date of the object
|
94
101
|
# @return [Time]
|
95
102
|
def last_modified
|
@@ -217,6 +224,13 @@ module Aws::S3
|
|
217
224
|
data[:ssekms_key_id]
|
218
225
|
end
|
219
226
|
|
227
|
+
# Indicates whether the object uses an S3 Bucket Key for server-side
|
228
|
+
# encryption with AWS KMS (SSE-KMS).
|
229
|
+
# @return [Boolean]
|
230
|
+
def bucket_key_enabled
|
231
|
+
data[:bucket_key_enabled]
|
232
|
+
end
|
233
|
+
|
220
234
|
# Provides storage class information of the object. Amazon S3 returns
|
221
235
|
# this header for all objects except for S3 Standard storage class
|
222
236
|
# objects.
|
@@ -239,12 +253,12 @@ module Aws::S3
|
|
239
253
|
end
|
240
254
|
|
241
255
|
# Amazon S3 can return this header if your request involves a bucket
|
242
|
-
# that is either a source or destination in a replication rule.
|
256
|
+
# that is either a source or a destination in a replication rule.
|
243
257
|
#
|
244
258
|
# In replication, you have a source bucket on which you configure
|
245
|
-
# replication and destination bucket where Amazon S3 stores
|
246
|
-
# replicas. When you request an object (`GetObject`) or object
|
247
|
-
# (`HeadObject`) from these buckets, Amazon S3 will return the
|
259
|
+
# replication and destination bucket or buckets where Amazon S3 stores
|
260
|
+
# object replicas. When you request an object (`GetObject`) or object
|
261
|
+
# metadata (`HeadObject`) from these buckets, Amazon S3 will return the
|
248
262
|
# `x-amz-replication-status` header in the response as follows:
|
249
263
|
#
|
250
264
|
# * If requesting an object from the source bucket — Amazon S3 will
|
@@ -260,9 +274,18 @@ module Aws::S3
|
|
260
274
|
# value PENDING, COMPLETED or FAILED indicating object replication
|
261
275
|
# status.
|
262
276
|
#
|
263
|
-
# * If requesting an object from
|
277
|
+
# * If requesting an object from a destination bucket — Amazon S3 will
|
264
278
|
# return the `x-amz-replication-status` header with value REPLICA if
|
265
|
-
# the object in your request is a replica that Amazon S3 created
|
279
|
+
# the object in your request is a replica that Amazon S3 created and
|
280
|
+
# there is no replica modification replication in progress.
|
281
|
+
#
|
282
|
+
# * When replicating objects to multiple destination buckets the
|
283
|
+
# `x-amz-replication-status` header acts differently. The header of
|
284
|
+
# the source object will only return a value of COMPLETED when
|
285
|
+
# replication is successful to all destinations. The header will
|
286
|
+
# remain at value PENDING until replication has completed for all
|
287
|
+
# destinations. If one or more destinations fails replication the
|
288
|
+
# header will return FAILED.
|
266
289
|
#
|
267
290
|
# For more information, see [Replication][1].
|
268
291
|
#
|
@@ -529,13 +552,14 @@ module Aws::S3
|
|
529
552
|
# metadata_directive: "COPY", # accepts COPY, REPLACE
|
530
553
|
# tagging_directive: "COPY", # accepts COPY, REPLACE
|
531
554
|
# server_side_encryption: "AES256", # accepts AES256, aws:kms
|
532
|
-
# storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER, DEEP_ARCHIVE
|
555
|
+
# storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER, DEEP_ARCHIVE, OUTPOSTS
|
533
556
|
# website_redirect_location: "WebsiteRedirectLocation",
|
534
557
|
# sse_customer_algorithm: "SSECustomerAlgorithm",
|
535
558
|
# sse_customer_key: "SSECustomerKey",
|
536
559
|
# sse_customer_key_md5: "SSECustomerKeyMD5",
|
537
560
|
# ssekms_key_id: "SSEKMSKeyId",
|
538
561
|
# ssekms_encryption_context: "SSEKMSEncryptionContext",
|
562
|
+
# bucket_key_enabled: false,
|
539
563
|
# copy_source_sse_customer_algorithm: "CopySourceSSECustomerAlgorithm",
|
540
564
|
# copy_source_sse_customer_key: "CopySourceSSECustomerKey",
|
541
565
|
# copy_source_sse_customer_key_md5: "CopySourceSSECustomerKeyMD5",
|
@@ -544,10 +568,14 @@ module Aws::S3
|
|
544
568
|
# object_lock_mode: "GOVERNANCE", # accepts GOVERNANCE, COMPLIANCE
|
545
569
|
# object_lock_retain_until_date: Time.now,
|
546
570
|
# object_lock_legal_hold_status: "ON", # accepts ON, OFF
|
571
|
+
# expected_bucket_owner: "AccountId",
|
572
|
+
# expected_source_bucket_owner: "AccountId",
|
547
573
|
# })
|
548
574
|
# @param [Hash] options ({})
|
549
575
|
# @option options [String] :acl
|
550
576
|
# The canned ACL to apply to the object.
|
577
|
+
#
|
578
|
+
# This action is not supported by Amazon S3 on Outposts.
|
551
579
|
# @option options [String] :cache_control
|
552
580
|
# Specifies caching behavior along the request/reply chain.
|
553
581
|
# @option options [String] :content_disposition
|
@@ -561,8 +589,50 @@ module Aws::S3
|
|
561
589
|
# @option options [String] :content_type
|
562
590
|
# A standard MIME type describing the format of the object data.
|
563
591
|
# @option options [required, String] :copy_source
|
564
|
-
#
|
565
|
-
#
|
592
|
+
# Specifies the source object for the copy operation. You specify the
|
593
|
+
# value in one of two formats, depending on whether you want to access
|
594
|
+
# the source object through an [access point][1]\:
|
595
|
+
#
|
596
|
+
# * For objects not accessed through an access point, specify the name
|
597
|
+
# of the source bucket and the key of the source object, separated by
|
598
|
+
# a slash (/). For example, to copy the object `reports/january.pdf`
|
599
|
+
# from the bucket `awsexamplebucket`, use
|
600
|
+
# `awsexamplebucket/reports/january.pdf`. The value must be URL
|
601
|
+
# encoded.
|
602
|
+
#
|
603
|
+
# * For objects accessed through access points, specify the Amazon
|
604
|
+
# Resource Name (ARN) of the object as accessed through the access
|
605
|
+
# point, in the format
|
606
|
+
# `arn:aws:s3:<Region>:<account-id>:accesspoint/<access-point-name>/object/<key>`.
|
607
|
+
# For example, to copy the object `reports/january.pdf` through access
|
608
|
+
# point `my-access-point` owned by account `123456789012` in Region
|
609
|
+
# `us-west-2`, use the URL encoding of
|
610
|
+
# `arn:aws:s3:us-west-2:123456789012:accesspoint/my-access-point/object/reports/january.pdf`.
|
611
|
+
# The value must be URL encoded.
|
612
|
+
#
|
613
|
+
# <note markdown="1"> Amazon S3 supports copy operations using access points only when the
|
614
|
+
# source and destination buckets are in the same AWS Region.
|
615
|
+
#
|
616
|
+
# </note>
|
617
|
+
#
|
618
|
+
# Alternatively, for objects accessed through Amazon S3 on Outposts,
|
619
|
+
# specify the ARN of the object as accessed in the format
|
620
|
+
# `arn:aws:s3-outposts:<Region>:<account-id>:outpost/<outpost-id>/object/<key>`.
|
621
|
+
# For example, to copy the object `reports/january.pdf` through
|
622
|
+
# outpost `my-outpost` owned by account `123456789012` in Region
|
623
|
+
# `us-west-2`, use the URL encoding of
|
624
|
+
# `arn:aws:s3-outposts:us-west-2:123456789012:outpost/my-outpost/object/reports/january.pdf`.
|
625
|
+
# The value must be URL encoded.
|
626
|
+
#
|
627
|
+
# To copy a specific version of an object, append
|
628
|
+
# `?versionId=<version-id>` to the value (for example,
|
629
|
+
# `awsexamplebucket/reports/january.pdf?versionId=QUpfdndhfd8438MNFDN93jdnJFkdmqnh893`).
|
630
|
+
# If you don't specify a version ID, Amazon S3 copies the latest
|
631
|
+
# version of the source object.
|
632
|
+
#
|
633
|
+
#
|
634
|
+
#
|
635
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/access-points.html
|
566
636
|
# @option options [String] :copy_source_if_match
|
567
637
|
# Copies the object if its entity tag (ETag) matches the specified tag.
|
568
638
|
# @option options [Time,DateTime,Date,Integer,String] :copy_source_if_modified_since
|
@@ -578,12 +648,20 @@ module Aws::S3
|
|
578
648
|
# @option options [String] :grant_full_control
|
579
649
|
# Gives the grantee READ, READ\_ACP, and WRITE\_ACP permissions on the
|
580
650
|
# object.
|
651
|
+
#
|
652
|
+
# This action is not supported by Amazon S3 on Outposts.
|
581
653
|
# @option options [String] :grant_read
|
582
654
|
# Allows grantee to read the object data and its metadata.
|
655
|
+
#
|
656
|
+
# This action is not supported by Amazon S3 on Outposts.
|
583
657
|
# @option options [String] :grant_read_acp
|
584
658
|
# Allows grantee to read the object ACL.
|
659
|
+
#
|
660
|
+
# This action is not supported by Amazon S3 on Outposts.
|
585
661
|
# @option options [String] :grant_write_acp
|
586
662
|
# Allows grantee to write the ACL for the applicable object.
|
663
|
+
#
|
664
|
+
# This action is not supported by Amazon S3 on Outposts.
|
587
665
|
# @option options [Hash<String,String>] :metadata
|
588
666
|
# A map of metadata to store with the object in S3.
|
589
667
|
# @option options [String] :metadata_directive
|
@@ -596,7 +674,16 @@ module Aws::S3
|
|
596
674
|
# The server-side encryption algorithm used when storing this object in
|
597
675
|
# Amazon S3 (for example, AES256, aws:kms).
|
598
676
|
# @option options [String] :storage_class
|
599
|
-
#
|
677
|
+
# By default, Amazon S3 uses the STANDARD Storage Class to store newly
|
678
|
+
# created objects. The STANDARD storage class provides high durability
|
679
|
+
# and high availability. Depending on performance needs, you can specify
|
680
|
+
# a different Storage Class. Amazon S3 on Outposts only uses the
|
681
|
+
# OUTPOSTS Storage Class. For more information, see [Storage Classes][1]
|
682
|
+
# in the *Amazon S3 Service Developer Guide*.
|
683
|
+
#
|
684
|
+
#
|
685
|
+
#
|
686
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html
|
600
687
|
# @option options [String] :website_redirect_location
|
601
688
|
# If the bucket is configured as a website, redirects requests for this
|
602
689
|
# object to another object in the same bucket or to an external URL.
|
@@ -609,7 +696,7 @@ module Aws::S3
|
|
609
696
|
# encrypting data. This value is used to store the object and then it is
|
610
697
|
# discarded; Amazon S3 does not store the encryption key. The key must
|
611
698
|
# be appropriate for use with the algorithm specified in the
|
612
|
-
# `x-amz-server-side
|
699
|
+
# `x-amz-server-side-encryption-customer-algorithm` header.
|
613
700
|
# @option options [String] :sse_customer_key_md5
|
614
701
|
# Specifies the 128-bit MD5 digest of the encryption key according to
|
615
702
|
# RFC 1321. Amazon S3 uses this header for a message integrity check to
|
@@ -629,6 +716,14 @@ module Aws::S3
|
|
629
716
|
# Specifies the AWS KMS Encryption Context to use for object encryption.
|
630
717
|
# The value of this header is a base64-encoded UTF-8 string holding JSON
|
631
718
|
# with the encryption context key-value pairs.
|
719
|
+
# @option options [Boolean] :bucket_key_enabled
|
720
|
+
# Specifies whether Amazon S3 should use an S3 Bucket Key for object
|
721
|
+
# encryption with server-side encryption using AWS KMS (SSE-KMS).
|
722
|
+
# Setting this header to `true` causes Amazon S3 to use an S3 Bucket Key
|
723
|
+
# for object encryption with SSE-KMS.
|
724
|
+
#
|
725
|
+
# Specifying this header with a COPY operation doesn’t affect
|
726
|
+
# bucket-level settings for S3 Bucket Key.
|
632
727
|
# @option options [String] :copy_source_sse_customer_algorithm
|
633
728
|
# Specifies the algorithm to use when decrypting the source object (for
|
634
729
|
# example, AES256).
|
@@ -661,6 +756,14 @@ module Aws::S3
|
|
661
756
|
# expire.
|
662
757
|
# @option options [String] :object_lock_legal_hold_status
|
663
758
|
# Specifies whether you want to apply a Legal Hold to the copied object.
|
759
|
+
# @option options [String] :expected_bucket_owner
|
760
|
+
# The account id of the expected destination bucket owner. If the
|
761
|
+
# destination bucket is owned by a different account, the request will
|
762
|
+
# fail with an HTTP `403 (Access Denied)` error.
|
763
|
+
# @option options [String] :expected_source_bucket_owner
|
764
|
+
# The account id of the expected source bucket owner. If the source
|
765
|
+
# bucket is owned by a different account, the request will fail with an
|
766
|
+
# HTTP `403 (Access Denied)` error.
|
664
767
|
# @return [Types::CopyObjectOutput]
|
665
768
|
def copy_from(options = {})
|
666
769
|
options = options.merge(
|
@@ -678,6 +781,7 @@ module Aws::S3
|
|
678
781
|
# version_id: "ObjectVersionId",
|
679
782
|
# request_payer: "requester", # accepts requester
|
680
783
|
# bypass_governance_retention: false,
|
784
|
+
# expected_bucket_owner: "AccountId",
|
681
785
|
# })
|
682
786
|
# @param [Hash] options ({})
|
683
787
|
# @option options [String] :mfa
|
@@ -700,6 +804,10 @@ module Aws::S3
|
|
700
804
|
# @option options [Boolean] :bypass_governance_retention
|
701
805
|
# Indicates whether S3 Object Lock should bypass Governance-mode
|
702
806
|
# restrictions to process this operation.
|
807
|
+
# @option options [String] :expected_bucket_owner
|
808
|
+
# The account id of the expected bucket owner. If the bucket is owned by
|
809
|
+
# a different account, the request will fail with an HTTP `403 (Access
|
810
|
+
# Denied)` error.
|
703
811
|
# @return [Types::DeleteObjectOutput]
|
704
812
|
def delete(options = {})
|
705
813
|
options = options.merge(
|
@@ -730,6 +838,7 @@ module Aws::S3
|
|
730
838
|
# sse_customer_key_md5: "SSECustomerKeyMD5",
|
731
839
|
# request_payer: "requester", # accepts requester
|
732
840
|
# part_number: 1,
|
841
|
+
# expected_bucket_owner: "AccountId",
|
733
842
|
# })
|
734
843
|
# @param [Hash] options ({})
|
735
844
|
# @option options [String] :if_match
|
@@ -779,7 +888,7 @@ module Aws::S3
|
|
779
888
|
# encrypting data. This value is used to store the object and then it is
|
780
889
|
# discarded; Amazon S3 does not store the encryption key. The key must
|
781
890
|
# be appropriate for use with the algorithm specified in the
|
782
|
-
# `x-amz-server-side
|
891
|
+
# `x-amz-server-side-encryption-customer-algorithm` header.
|
783
892
|
# @option options [String] :sse_customer_key_md5
|
784
893
|
# Specifies the 128-bit MD5 digest of the encryption key according to
|
785
894
|
# RFC 1321. Amazon S3 uses this header for a message integrity check to
|
@@ -799,6 +908,10 @@ module Aws::S3
|
|
799
908
|
# between 1 and 10,000. Effectively performs a 'ranged' GET request
|
800
909
|
# for the part specified. Useful for downloading just a part of an
|
801
910
|
# object.
|
911
|
+
# @option options [String] :expected_bucket_owner
|
912
|
+
# The account id of the expected bucket owner. If the bucket is owned by
|
913
|
+
# a different account, the request will fail with an HTTP `403 (Access
|
914
|
+
# Denied)` error.
|
802
915
|
# @return [Types::GetObjectOutput]
|
803
916
|
def get(options = {}, &block)
|
804
917
|
options = options.merge(
|
@@ -827,22 +940,26 @@ module Aws::S3
|
|
827
940
|
# "MetadataKey" => "MetadataValue",
|
828
941
|
# },
|
829
942
|
# server_side_encryption: "AES256", # accepts AES256, aws:kms
|
830
|
-
# storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER, DEEP_ARCHIVE
|
943
|
+
# storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER, DEEP_ARCHIVE, OUTPOSTS
|
831
944
|
# website_redirect_location: "WebsiteRedirectLocation",
|
832
945
|
# sse_customer_algorithm: "SSECustomerAlgorithm",
|
833
946
|
# sse_customer_key: "SSECustomerKey",
|
834
947
|
# sse_customer_key_md5: "SSECustomerKeyMD5",
|
835
948
|
# ssekms_key_id: "SSEKMSKeyId",
|
836
949
|
# ssekms_encryption_context: "SSEKMSEncryptionContext",
|
950
|
+
# bucket_key_enabled: false,
|
837
951
|
# request_payer: "requester", # accepts requester
|
838
952
|
# tagging: "TaggingHeader",
|
839
953
|
# object_lock_mode: "GOVERNANCE", # accepts GOVERNANCE, COMPLIANCE
|
840
954
|
# object_lock_retain_until_date: Time.now,
|
841
955
|
# object_lock_legal_hold_status: "ON", # accepts ON, OFF
|
956
|
+
# expected_bucket_owner: "AccountId",
|
842
957
|
# })
|
843
958
|
# @param [Hash] options ({})
|
844
959
|
# @option options [String] :acl
|
845
960
|
# The canned ACL to apply to the object.
|
961
|
+
#
|
962
|
+
# This action is not supported by Amazon S3 on Outposts.
|
846
963
|
# @option options [String] :cache_control
|
847
964
|
# Specifies caching behavior along the request/reply chain.
|
848
965
|
# @option options [String] :content_disposition
|
@@ -860,19 +977,36 @@ module Aws::S3
|
|
860
977
|
# @option options [String] :grant_full_control
|
861
978
|
# Gives the grantee READ, READ\_ACP, and WRITE\_ACP permissions on the
|
862
979
|
# object.
|
980
|
+
#
|
981
|
+
# This action is not supported by Amazon S3 on Outposts.
|
863
982
|
# @option options [String] :grant_read
|
864
983
|
# Allows grantee to read the object data and its metadata.
|
984
|
+
#
|
985
|
+
# This action is not supported by Amazon S3 on Outposts.
|
865
986
|
# @option options [String] :grant_read_acp
|
866
987
|
# Allows grantee to read the object ACL.
|
988
|
+
#
|
989
|
+
# This action is not supported by Amazon S3 on Outposts.
|
867
990
|
# @option options [String] :grant_write_acp
|
868
991
|
# Allows grantee to write the ACL for the applicable object.
|
992
|
+
#
|
993
|
+
# This action is not supported by Amazon S3 on Outposts.
|
869
994
|
# @option options [Hash<String,String>] :metadata
|
870
995
|
# A map of metadata to store with the object in S3.
|
871
996
|
# @option options [String] :server_side_encryption
|
872
997
|
# The server-side encryption algorithm used when storing this object in
|
873
998
|
# Amazon S3 (for example, AES256, aws:kms).
|
874
999
|
# @option options [String] :storage_class
|
875
|
-
#
|
1000
|
+
# By default, Amazon S3 uses the STANDARD Storage Class to store newly
|
1001
|
+
# created objects. The STANDARD storage class provides high durability
|
1002
|
+
# and high availability. Depending on performance needs, you can specify
|
1003
|
+
# a different Storage Class. Amazon S3 on Outposts only uses the
|
1004
|
+
# OUTPOSTS Storage Class. For more information, see [Storage Classes][1]
|
1005
|
+
# in the *Amazon S3 Service Developer Guide*.
|
1006
|
+
#
|
1007
|
+
#
|
1008
|
+
#
|
1009
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html
|
876
1010
|
# @option options [String] :website_redirect_location
|
877
1011
|
# If the bucket is configured as a website, redirects requests for this
|
878
1012
|
# object to another object in the same bucket or to an external URL.
|
@@ -885,7 +1019,7 @@ module Aws::S3
|
|
885
1019
|
# encrypting data. This value is used to store the object and then it is
|
886
1020
|
# discarded; Amazon S3 does not store the encryption key. The key must
|
887
1021
|
# be appropriate for use with the algorithm specified in the
|
888
|
-
# `x-amz-server-side
|
1022
|
+
# `x-amz-server-side-encryption-customer-algorithm` header.
|
889
1023
|
# @option options [String] :sse_customer_key_md5
|
890
1024
|
# Specifies the 128-bit MD5 digest of the encryption key according to
|
891
1025
|
# RFC 1321. Amazon S3 uses this header for a message integrity check to
|
@@ -905,6 +1039,14 @@ module Aws::S3
|
|
905
1039
|
# Specifies the AWS KMS Encryption Context to use for object encryption.
|
906
1040
|
# The value of this header is a base64-encoded UTF-8 string holding JSON
|
907
1041
|
# with the encryption context key-value pairs.
|
1042
|
+
# @option options [Boolean] :bucket_key_enabled
|
1043
|
+
# Specifies whether Amazon S3 should use an S3 Bucket Key for object
|
1044
|
+
# encryption with server-side encryption using AWS KMS (SSE-KMS).
|
1045
|
+
# Setting this header to `true` causes Amazon S3 to use an S3 Bucket Key
|
1046
|
+
# for object encryption with SSE-KMS.
|
1047
|
+
#
|
1048
|
+
# Specifying this header with an object operation doesn’t affect
|
1049
|
+
# bucket-level settings for S3 Bucket Key.
|
908
1050
|
# @option options [String] :request_payer
|
909
1051
|
# Confirms that the requester knows that they will be charged for the
|
910
1052
|
# request. Bucket owners need not specify this parameter in their
|
@@ -926,6 +1068,10 @@ module Aws::S3
|
|
926
1068
|
# @option options [String] :object_lock_legal_hold_status
|
927
1069
|
# Specifies whether you want to apply a Legal Hold to the uploaded
|
928
1070
|
# object.
|
1071
|
+
# @option options [String] :expected_bucket_owner
|
1072
|
+
# The account id of the expected bucket owner. If the bucket is owned by
|
1073
|
+
# a different account, the request will fail with an HTTP `403 (Access
|
1074
|
+
# Denied)` error.
|
929
1075
|
# @return [MultipartUpload]
|
930
1076
|
def initiate_multipart_upload(options = {})
|
931
1077
|
options = options.merge(
|
@@ -962,24 +1108,28 @@ module Aws::S3
|
|
962
1108
|
# "MetadataKey" => "MetadataValue",
|
963
1109
|
# },
|
964
1110
|
# server_side_encryption: "AES256", # accepts AES256, aws:kms
|
965
|
-
# storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER, DEEP_ARCHIVE
|
1111
|
+
# storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER, DEEP_ARCHIVE, OUTPOSTS
|
966
1112
|
# website_redirect_location: "WebsiteRedirectLocation",
|
967
1113
|
# sse_customer_algorithm: "SSECustomerAlgorithm",
|
968
1114
|
# sse_customer_key: "SSECustomerKey",
|
969
1115
|
# sse_customer_key_md5: "SSECustomerKeyMD5",
|
970
1116
|
# ssekms_key_id: "SSEKMSKeyId",
|
971
1117
|
# ssekms_encryption_context: "SSEKMSEncryptionContext",
|
1118
|
+
# bucket_key_enabled: false,
|
972
1119
|
# request_payer: "requester", # accepts requester
|
973
1120
|
# tagging: "TaggingHeader",
|
974
1121
|
# object_lock_mode: "GOVERNANCE", # accepts GOVERNANCE, COMPLIANCE
|
975
1122
|
# object_lock_retain_until_date: Time.now,
|
976
1123
|
# object_lock_legal_hold_status: "ON", # accepts ON, OFF
|
1124
|
+
# expected_bucket_owner: "AccountId",
|
977
1125
|
# })
|
978
1126
|
# @param [Hash] options ({})
|
979
1127
|
# @option options [String] :acl
|
980
1128
|
# The canned ACL to apply to the object. For more information, see
|
981
1129
|
# [Canned ACL][1].
|
982
1130
|
#
|
1131
|
+
# This action is not supported by Amazon S3 on Outposts.
|
1132
|
+
#
|
983
1133
|
#
|
984
1134
|
#
|
985
1135
|
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#CannedACL
|
@@ -1051,20 +1201,36 @@ module Aws::S3
|
|
1051
1201
|
# @option options [String] :grant_full_control
|
1052
1202
|
# Gives the grantee READ, READ\_ACP, and WRITE\_ACP permissions on the
|
1053
1203
|
# object.
|
1204
|
+
#
|
1205
|
+
# This action is not supported by Amazon S3 on Outposts.
|
1054
1206
|
# @option options [String] :grant_read
|
1055
1207
|
# Allows grantee to read the object data and its metadata.
|
1208
|
+
#
|
1209
|
+
# This action is not supported by Amazon S3 on Outposts.
|
1056
1210
|
# @option options [String] :grant_read_acp
|
1057
1211
|
# Allows grantee to read the object ACL.
|
1212
|
+
#
|
1213
|
+
# This action is not supported by Amazon S3 on Outposts.
|
1058
1214
|
# @option options [String] :grant_write_acp
|
1059
1215
|
# Allows grantee to write the ACL for the applicable object.
|
1216
|
+
#
|
1217
|
+
# This action is not supported by Amazon S3 on Outposts.
|
1060
1218
|
# @option options [Hash<String,String>] :metadata
|
1061
1219
|
# A map of metadata to store with the object in S3.
|
1062
1220
|
# @option options [String] :server_side_encryption
|
1063
1221
|
# The server-side encryption algorithm used when storing this object in
|
1064
1222
|
# Amazon S3 (for example, AES256, aws:kms).
|
1065
1223
|
# @option options [String] :storage_class
|
1066
|
-
#
|
1067
|
-
#
|
1224
|
+
# By default, Amazon S3 uses the STANDARD Storage Class to store newly
|
1225
|
+
# created objects. The STANDARD storage class provides high durability
|
1226
|
+
# and high availability. Depending on performance needs, you can specify
|
1227
|
+
# a different Storage Class. Amazon S3 on Outposts only uses the
|
1228
|
+
# OUTPOSTS Storage Class. For more information, see [Storage Classes][1]
|
1229
|
+
# in the *Amazon S3 Service Developer Guide*.
|
1230
|
+
#
|
1231
|
+
#
|
1232
|
+
#
|
1233
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html
|
1068
1234
|
# @option options [String] :website_redirect_location
|
1069
1235
|
# If the bucket is configured as a website, redirects requests for this
|
1070
1236
|
# object to another object in the same bucket or to an external URL.
|
@@ -1098,7 +1264,7 @@ module Aws::S3
|
|
1098
1264
|
# encrypting data. This value is used to store the object and then it is
|
1099
1265
|
# discarded; Amazon S3 does not store the encryption key. The key must
|
1100
1266
|
# be appropriate for use with the algorithm specified in the
|
1101
|
-
# `x-amz-server-side
|
1267
|
+
# `x-amz-server-side-encryption-customer-algorithm` header.
|
1102
1268
|
# @option options [String] :sse_customer_key_md5
|
1103
1269
|
# Specifies the 128-bit MD5 digest of the encryption key according to
|
1104
1270
|
# RFC 1321. Amazon S3 uses this header for a message integrity check to
|
@@ -1119,6 +1285,14 @@ module Aws::S3
|
|
1119
1285
|
# Specifies the AWS KMS Encryption Context to use for object encryption.
|
1120
1286
|
# The value of this header is a base64-encoded UTF-8 string holding JSON
|
1121
1287
|
# with the encryption context key-value pairs.
|
1288
|
+
# @option options [Boolean] :bucket_key_enabled
|
1289
|
+
# Specifies whether Amazon S3 should use an S3 Bucket Key for object
|
1290
|
+
# encryption with server-side encryption using AWS KMS (SSE-KMS).
|
1291
|
+
# Setting this header to `true` causes Amazon S3 to use an S3 Bucket Key
|
1292
|
+
# for object encryption with SSE-KMS.
|
1293
|
+
#
|
1294
|
+
# Specifying this header with a PUT operation doesn’t affect
|
1295
|
+
# bucket-level settings for S3 Bucket Key.
|
1122
1296
|
# @option options [String] :request_payer
|
1123
1297
|
# Confirms that the requester knows that they will be charged for the
|
1124
1298
|
# request. Bucket owners need not specify this parameter in their
|
@@ -1143,6 +1317,10 @@ module Aws::S3
|
|
1143
1317
|
#
|
1144
1318
|
#
|
1145
1319
|
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock.html
|
1320
|
+
# @option options [String] :expected_bucket_owner
|
1321
|
+
# The account id of the expected bucket owner. If the bucket is owned by
|
1322
|
+
# a different account, the request will fail with an HTTP `403 (Access
|
1323
|
+
# Denied)` error.
|
1146
1324
|
# @return [Types::PutObjectOutput]
|
1147
1325
|
def put(options = {})
|
1148
1326
|
options = options.merge(
|
@@ -1234,11 +1412,12 @@ module Aws::S3
|
|
1234
1412
|
# value: "MetadataValue",
|
1235
1413
|
# },
|
1236
1414
|
# ],
|
1237
|
-
# storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER, DEEP_ARCHIVE
|
1415
|
+
# storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER, DEEP_ARCHIVE, OUTPOSTS
|
1238
1416
|
# },
|
1239
1417
|
# },
|
1240
1418
|
# },
|
1241
1419
|
# request_payer: "requester", # accepts requester
|
1420
|
+
# expected_bucket_owner: "AccountId",
|
1242
1421
|
# })
|
1243
1422
|
# @param [Hash] options ({})
|
1244
1423
|
# @option options [String] :version_id
|
@@ -1255,6 +1434,10 @@ module Aws::S3
|
|
1255
1434
|
#
|
1256
1435
|
#
|
1257
1436
|
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
|
1437
|
+
# @option options [String] :expected_bucket_owner
|
1438
|
+
# The account id of the expected bucket owner. If the bucket is owned by
|
1439
|
+
# a different account, the request will fail with an HTTP `403 (Access
|
1440
|
+
# Denied)` error.
|
1258
1441
|
# @return [Types::RestoreObjectOutput]
|
1259
1442
|
def restore_object(options = {})
|
1260
1443
|
options = options.merge(
|
@@ -1377,6 +1560,7 @@ module Aws::S3
|
|
1377
1560
|
# mfa: "MFA",
|
1378
1561
|
# request_payer: "requester", # accepts requester
|
1379
1562
|
# bypass_governance_retention: false,
|
1563
|
+
# expected_bucket_owner: "AccountId",
|
1380
1564
|
# })
|
1381
1565
|
# @param options ({})
|
1382
1566
|
# @option options [String] :mfa
|
@@ -1398,6 +1582,10 @@ module Aws::S3
|
|
1398
1582
|
# Specifies whether you want to delete this object even if it has a
|
1399
1583
|
# Governance-type Object Lock in place. You must have sufficient
|
1400
1584
|
# permissions to perform this operation.
|
1585
|
+
# @option options [String] :expected_bucket_owner
|
1586
|
+
# The account id of the expected bucket owner. If the bucket is owned by
|
1587
|
+
# a different account, the request will fail with an HTTP `403 (Access
|
1588
|
+
# Denied)` error.
|
1401
1589
|
# @return [void]
|
1402
1590
|
def batch_delete!(options = {})
|
1403
1591
|
batch_enum.each do |batch|
|