aws-sdk-s3 1.31.0 → 1.111.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/CHANGELOG.md +868 -0
- data/LICENSE.txt +202 -0
- data/VERSION +1 -0
- data/lib/aws-sdk-s3/arn/access_point_arn.rb +69 -0
- data/lib/aws-sdk-s3/arn/multi_region_access_point_arn.rb +68 -0
- data/lib/aws-sdk-s3/arn/object_lambda_arn.rb +69 -0
- data/lib/aws-sdk-s3/arn/outpost_access_point_arn.rb +74 -0
- data/lib/aws-sdk-s3/bucket.rb +298 -78
- data/lib/aws-sdk-s3/bucket_acl.rb +41 -15
- data/lib/aws-sdk-s3/bucket_cors.rb +51 -14
- data/lib/aws-sdk-s3/bucket_lifecycle.rb +38 -16
- data/lib/aws-sdk-s3/bucket_lifecycle_configuration.rb +40 -16
- data/lib/aws-sdk-s3/bucket_logging.rb +36 -15
- data/lib/aws-sdk-s3/bucket_notification.rb +44 -18
- data/lib/aws-sdk-s3/bucket_policy.rb +35 -13
- data/lib/aws-sdk-s3/bucket_region_cache.rb +2 -0
- data/lib/aws-sdk-s3/bucket_request_payment.rb +35 -12
- data/lib/aws-sdk-s3/bucket_tagging.rb +43 -14
- data/lib/aws-sdk-s3/bucket_versioning.rb +70 -12
- data/lib/aws-sdk-s3/bucket_website.rb +50 -17
- data/lib/aws-sdk-s3/client.rb +7851 -628
- data/lib/aws-sdk-s3/client_api.rb +436 -2
- data/lib/aws-sdk-s3/customizations/bucket.rb +59 -16
- data/lib/aws-sdk-s3/customizations/multipart_upload.rb +2 -0
- data/lib/aws-sdk-s3/customizations/object.rb +200 -62
- data/lib/aws-sdk-s3/customizations/object_summary.rb +5 -0
- data/lib/aws-sdk-s3/customizations/types/list_object_versions_output.rb +2 -0
- data/lib/aws-sdk-s3/customizations.rb +4 -1
- data/lib/aws-sdk-s3/encryption/client.rb +23 -6
- data/lib/aws-sdk-s3/encryption/decrypt_handler.rb +71 -29
- data/lib/aws-sdk-s3/encryption/default_cipher_provider.rb +43 -5
- data/lib/aws-sdk-s3/encryption/default_key_provider.rb +2 -0
- data/lib/aws-sdk-s3/encryption/encrypt_handler.rb +13 -2
- data/lib/aws-sdk-s3/encryption/errors.rb +2 -0
- data/lib/aws-sdk-s3/encryption/io_auth_decrypter.rb +2 -0
- data/lib/aws-sdk-s3/encryption/io_decrypter.rb +11 -3
- data/lib/aws-sdk-s3/encryption/io_encrypter.rb +2 -0
- data/lib/aws-sdk-s3/encryption/key_provider.rb +2 -0
- data/lib/aws-sdk-s3/encryption/kms_cipher_provider.rb +34 -3
- data/lib/aws-sdk-s3/encryption/materials.rb +8 -6
- data/lib/aws-sdk-s3/encryption/utils.rb +25 -0
- data/lib/aws-sdk-s3/encryption.rb +4 -0
- data/lib/aws-sdk-s3/encryptionV2/client.rb +566 -0
- data/lib/aws-sdk-s3/encryptionV2/decrypt_handler.rb +222 -0
- data/lib/aws-sdk-s3/encryptionV2/default_cipher_provider.rb +170 -0
- data/lib/aws-sdk-s3/encryptionV2/default_key_provider.rb +40 -0
- data/lib/aws-sdk-s3/encryptionV2/encrypt_handler.rb +65 -0
- data/lib/aws-sdk-s3/encryptionV2/errors.rb +37 -0
- data/lib/aws-sdk-s3/encryptionV2/io_auth_decrypter.rb +58 -0
- data/lib/aws-sdk-s3/encryptionV2/io_decrypter.rb +37 -0
- data/lib/aws-sdk-s3/encryptionV2/io_encrypter.rb +73 -0
- data/lib/aws-sdk-s3/encryptionV2/key_provider.rb +31 -0
- data/lib/aws-sdk-s3/encryptionV2/kms_cipher_provider.rb +169 -0
- data/lib/aws-sdk-s3/encryptionV2/materials.rb +60 -0
- data/lib/aws-sdk-s3/encryptionV2/utils.rb +103 -0
- data/lib/aws-sdk-s3/encryption_v2.rb +23 -0
- data/lib/aws-sdk-s3/errors.rb +123 -1
- data/lib/aws-sdk-s3/event_streams.rb +20 -7
- data/lib/aws-sdk-s3/file_downloader.rb +16 -9
- data/lib/aws-sdk-s3/file_part.rb +11 -6
- data/lib/aws-sdk-s3/file_uploader.rb +33 -14
- data/lib/aws-sdk-s3/legacy_signer.rb +17 -25
- data/lib/aws-sdk-s3/multipart_file_uploader.rb +53 -13
- data/lib/aws-sdk-s3/multipart_stream_uploader.rb +20 -7
- data/lib/aws-sdk-s3/multipart_upload.rb +64 -29
- data/lib/aws-sdk-s3/multipart_upload_error.rb +2 -0
- data/lib/aws-sdk-s3/multipart_upload_part.rb +116 -42
- data/lib/aws-sdk-s3/object.rb +656 -156
- data/lib/aws-sdk-s3/object_acl.rb +65 -21
- data/lib/aws-sdk-s3/object_copier.rb +2 -0
- data/lib/aws-sdk-s3/object_multipart_copier.rb +2 -0
- data/lib/aws-sdk-s3/object_summary.rb +485 -143
- data/lib/aws-sdk-s3/object_version.rb +117 -62
- data/lib/aws-sdk-s3/plugins/accelerate.rb +38 -38
- data/lib/aws-sdk-s3/plugins/arn.rb +254 -0
- data/lib/aws-sdk-s3/plugins/bucket_dns.rb +8 -8
- data/lib/aws-sdk-s3/plugins/bucket_name_restrictions.rb +25 -3
- data/lib/aws-sdk-s3/plugins/dualstack.rb +38 -33
- data/lib/aws-sdk-s3/plugins/expect_100_continue.rb +4 -4
- data/lib/aws-sdk-s3/plugins/get_bucket_location_fix.rb +3 -1
- data/lib/aws-sdk-s3/plugins/http_200_errors.rb +11 -3
- data/lib/aws-sdk-s3/plugins/iad_regional_endpoint.rb +73 -0
- data/lib/aws-sdk-s3/plugins/location_constraint.rb +2 -0
- data/lib/aws-sdk-s3/plugins/md5s.rb +30 -28
- data/lib/aws-sdk-s3/plugins/object_lambda_endpoint.rb +25 -0
- data/lib/aws-sdk-s3/plugins/redirects.rb +2 -0
- data/lib/aws-sdk-s3/plugins/s3_host_id.rb +2 -0
- data/lib/aws-sdk-s3/plugins/s3_signer.rb +89 -36
- data/lib/aws-sdk-s3/plugins/sse_cpk.rb +3 -1
- data/lib/aws-sdk-s3/plugins/streaming_retry.rb +118 -0
- data/lib/aws-sdk-s3/plugins/url_encoded_keys.rb +2 -0
- data/lib/aws-sdk-s3/presigned_post.rb +72 -32
- data/lib/aws-sdk-s3/presigner.rb +168 -66
- data/lib/aws-sdk-s3/resource.rb +41 -5
- data/lib/aws-sdk-s3/types.rb +6758 -1027
- data/lib/aws-sdk-s3/waiters.rb +67 -1
- data/lib/aws-sdk-s3.rb +12 -6
- metadata +37 -13
@@ -1,11 +1,14 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
# WARNING ABOUT GENERATED CODE
|
2
4
|
#
|
3
5
|
# This file is generated. See the contributing guide for more information:
|
4
|
-
# https://github.com/aws/aws-sdk-ruby/blob/
|
6
|
+
# https://github.com/aws/aws-sdk-ruby/blob/version-3/CONTRIBUTING.md
|
5
7
|
#
|
6
8
|
# WARNING ABOUT GENERATED CODE
|
7
9
|
|
8
10
|
module Aws::S3
|
11
|
+
|
9
12
|
class ObjectSummary
|
10
13
|
|
11
14
|
extend Aws::Deprecations
|
@@ -24,6 +27,7 @@ module Aws::S3
|
|
24
27
|
@key = extract_key(args, options)
|
25
28
|
@data = options.delete(:data)
|
26
29
|
@client = options.delete(:client) || Client.new(options)
|
30
|
+
@waiter_block_warned = false
|
27
31
|
end
|
28
32
|
|
29
33
|
# @!group Read-Only Attributes
|
@@ -38,19 +42,37 @@ module Aws::S3
|
|
38
42
|
@key
|
39
43
|
end
|
40
44
|
|
41
|
-
|
45
|
+
# Creation date of the object.
|
42
46
|
# @return [Time]
|
43
47
|
def last_modified
|
44
48
|
data[:last_modified]
|
45
49
|
end
|
46
50
|
|
47
|
-
|
51
|
+
# The entity tag is a hash of the object. The ETag reflects changes only
|
52
|
+
# to the contents of an object, not its metadata. The ETag may or may
|
53
|
+
# not be an MD5 digest of the object data. Whether or not it is depends
|
54
|
+
# on how the object was created and how it is encrypted as described
|
55
|
+
# below:
|
56
|
+
#
|
57
|
+
# * Objects created by the PUT Object, POST Object, or Copy operation,
|
58
|
+
# or through the Amazon Web Services Management Console, and are
|
59
|
+
# encrypted by SSE-S3 or plaintext, have ETags that are an MD5 digest
|
60
|
+
# of their object data.
|
61
|
+
#
|
62
|
+
# * Objects created by the PUT Object, POST Object, or Copy operation,
|
63
|
+
# or through the Amazon Web Services Management Console, and are
|
64
|
+
# encrypted by SSE-C or SSE-KMS, have ETags that are not an MD5 digest
|
65
|
+
# of their object data.
|
66
|
+
#
|
67
|
+
# * If an object is created by either the Multipart Upload or Part Copy
|
68
|
+
# operation, the ETag is not an MD5 digest, regardless of the method
|
69
|
+
# of encryption.
|
48
70
|
# @return [String]
|
49
71
|
def etag
|
50
72
|
data[:etag]
|
51
73
|
end
|
52
74
|
|
53
|
-
|
75
|
+
# Size in bytes of the object
|
54
76
|
# @return [Integer]
|
55
77
|
def size
|
56
78
|
data[:size]
|
@@ -62,7 +84,7 @@ module Aws::S3
|
|
62
84
|
data[:storage_class]
|
63
85
|
end
|
64
86
|
|
65
|
-
|
87
|
+
# The owner of the object
|
66
88
|
# @return [Types::Owner]
|
67
89
|
def owner
|
68
90
|
data[:owner]
|
@@ -118,10 +140,10 @@ module Aws::S3
|
|
118
140
|
# @option options [Proc] :before_attempt
|
119
141
|
# @option options [Proc] :before_wait
|
120
142
|
# @return [ObjectSummary]
|
121
|
-
def wait_until_exists(options = {})
|
143
|
+
def wait_until_exists(options = {}, &block)
|
122
144
|
options, params = separate_params_and_options(options)
|
123
145
|
waiter = Waiters::ObjectExists.new(options)
|
124
|
-
yield_waiter_and_warn(waiter, &
|
146
|
+
yield_waiter_and_warn(waiter, &block) if block_given?
|
125
147
|
waiter.wait(params.merge(bucket: @bucket_name,
|
126
148
|
key: @key))
|
127
149
|
ObjectSummary.new({
|
@@ -137,10 +159,10 @@ module Aws::S3
|
|
137
159
|
# @option options [Proc] :before_attempt
|
138
160
|
# @option options [Proc] :before_wait
|
139
161
|
# @return [ObjectSummary]
|
140
|
-
def wait_until_not_exists(options = {})
|
162
|
+
def wait_until_not_exists(options = {}, &block)
|
141
163
|
options, params = separate_params_and_options(options)
|
142
164
|
waiter = Waiters::ObjectNotExists.new(options)
|
143
|
-
yield_waiter_and_warn(waiter, &
|
165
|
+
yield_waiter_and_warn(waiter, &block) if block_given?
|
144
166
|
waiter.wait(params.merge(bucket: @bucket_name,
|
145
167
|
key: @key))
|
146
168
|
ObjectSummary.new({
|
@@ -155,7 +177,8 @@ module Aws::S3
|
|
155
177
|
# Waiter polls an API operation until a resource enters a desired
|
156
178
|
# state.
|
157
179
|
#
|
158
|
-
# @note The waiting operation is performed on a copy. The original resource
|
180
|
+
# @note The waiting operation is performed on a copy. The original resource
|
181
|
+
# remains unchanged.
|
159
182
|
#
|
160
183
|
# ## Basic Usage
|
161
184
|
#
|
@@ -168,13 +191,15 @@ module Aws::S3
|
|
168
191
|
#
|
169
192
|
# ## Example
|
170
193
|
#
|
171
|
-
# instance.wait_until(max_attempts:10, delay:5)
|
194
|
+
# instance.wait_until(max_attempts:10, delay:5) do |instance|
|
195
|
+
# instance.state.name == 'running'
|
196
|
+
# end
|
172
197
|
#
|
173
198
|
# ## Configuration
|
174
199
|
#
|
175
200
|
# You can configure the maximum number of polling attempts, and the
|
176
|
-
# delay (in seconds) between each polling attempt. The waiting condition is
|
177
|
-
# by passing a block to {#wait_until}:
|
201
|
+
# delay (in seconds) between each polling attempt. The waiting condition is
|
202
|
+
# set by passing a block to {#wait_until}:
|
178
203
|
#
|
179
204
|
# # poll for ~25 seconds
|
180
205
|
# resource.wait_until(max_attempts:5,delay:5) {|resource|...}
|
@@ -205,17 +230,16 @@ module Aws::S3
|
|
205
230
|
# # resource did not enter the desired state in time
|
206
231
|
# end
|
207
232
|
#
|
233
|
+
# @yieldparam [Resource] resource to be used in the waiting condition.
|
208
234
|
#
|
209
|
-
# @
|
210
|
-
#
|
211
|
-
#
|
212
|
-
# because the waiter has entered a state that it will not transition
|
213
|
-
# out of, preventing success.
|
235
|
+
# @raise [Aws::Waiters::Errors::FailureStateError] Raised when the waiter
|
236
|
+
# terminates because the waiter has entered a state that it will not
|
237
|
+
# transition out of, preventing success.
|
214
238
|
#
|
215
239
|
# yet successful.
|
216
240
|
#
|
217
|
-
# @raise [Aws::Waiters::Errors::UnexpectedError] Raised when an error is
|
218
|
-
# while polling for a resource that is not expected.
|
241
|
+
# @raise [Aws::Waiters::Errors::UnexpectedError] Raised when an error is
|
242
|
+
# encountered while polling for a resource that is not expected.
|
219
243
|
#
|
220
244
|
# @raise [NotImplementedError] Raised when the resource does not
|
221
245
|
#
|
@@ -272,12 +296,14 @@ module Aws::S3
|
|
272
296
|
# metadata_directive: "COPY", # accepts COPY, REPLACE
|
273
297
|
# tagging_directive: "COPY", # accepts COPY, REPLACE
|
274
298
|
# server_side_encryption: "AES256", # accepts AES256, aws:kms
|
275
|
-
# storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER
|
299
|
+
# storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER, DEEP_ARCHIVE, OUTPOSTS, GLACIER_IR
|
276
300
|
# website_redirect_location: "WebsiteRedirectLocation",
|
277
301
|
# sse_customer_algorithm: "SSECustomerAlgorithm",
|
278
302
|
# sse_customer_key: "SSECustomerKey",
|
279
303
|
# sse_customer_key_md5: "SSECustomerKeyMD5",
|
280
304
|
# ssekms_key_id: "SSEKMSKeyId",
|
305
|
+
# ssekms_encryption_context: "SSEKMSEncryptionContext",
|
306
|
+
# bucket_key_enabled: false,
|
281
307
|
# copy_source_sse_customer_algorithm: "CopySourceSSECustomerAlgorithm",
|
282
308
|
# copy_source_sse_customer_key: "CopySourceSSECustomerKey",
|
283
309
|
# copy_source_sse_customer_key_md5: "CopySourceSSECustomerKeyMD5",
|
@@ -286,10 +312,14 @@ module Aws::S3
|
|
286
312
|
# object_lock_mode: "GOVERNANCE", # accepts GOVERNANCE, COMPLIANCE
|
287
313
|
# object_lock_retain_until_date: Time.now,
|
288
314
|
# object_lock_legal_hold_status: "ON", # accepts ON, OFF
|
315
|
+
# expected_bucket_owner: "AccountId",
|
316
|
+
# expected_source_bucket_owner: "AccountId",
|
289
317
|
# })
|
290
318
|
# @param [Hash] options ({})
|
291
319
|
# @option options [String] :acl
|
292
320
|
# The canned ACL to apply to the object.
|
321
|
+
#
|
322
|
+
# This action is not supported by Amazon S3 on Outposts.
|
293
323
|
# @option options [String] :cache_control
|
294
324
|
# Specifies caching behavior along the request/reply chain.
|
295
325
|
# @option options [String] :content_disposition
|
@@ -303,8 +333,51 @@ module Aws::S3
|
|
303
333
|
# @option options [String] :content_type
|
304
334
|
# A standard MIME type describing the format of the object data.
|
305
335
|
# @option options [required, String] :copy_source
|
306
|
-
#
|
307
|
-
#
|
336
|
+
# Specifies the source object for the copy operation. You specify the
|
337
|
+
# value in one of two formats, depending on whether you want to access
|
338
|
+
# the source object through an [access point][1]\:
|
339
|
+
#
|
340
|
+
# * For objects not accessed through an access point, specify the name
|
341
|
+
# of the source bucket and the key of the source object, separated by
|
342
|
+
# a slash (/). For example, to copy the object `reports/january.pdf`
|
343
|
+
# from the bucket `awsexamplebucket`, use
|
344
|
+
# `awsexamplebucket/reports/january.pdf`. The value must be URL
|
345
|
+
# encoded.
|
346
|
+
#
|
347
|
+
# * For objects accessed through access points, specify the Amazon
|
348
|
+
# Resource Name (ARN) of the object as accessed through the access
|
349
|
+
# point, in the format
|
350
|
+
# `arn:aws:s3:<Region>:<account-id>:accesspoint/<access-point-name>/object/<key>`.
|
351
|
+
# For example, to copy the object `reports/january.pdf` through access
|
352
|
+
# point `my-access-point` owned by account `123456789012` in Region
|
353
|
+
# `us-west-2`, use the URL encoding of
|
354
|
+
# `arn:aws:s3:us-west-2:123456789012:accesspoint/my-access-point/object/reports/january.pdf`.
|
355
|
+
# The value must be URL encoded.
|
356
|
+
#
|
357
|
+
# <note markdown="1"> Amazon S3 supports copy operations using access points only when the
|
358
|
+
# source and destination buckets are in the same Amazon Web Services
|
359
|
+
# Region.
|
360
|
+
#
|
361
|
+
# </note>
|
362
|
+
#
|
363
|
+
# Alternatively, for objects accessed through Amazon S3 on Outposts,
|
364
|
+
# specify the ARN of the object as accessed in the format
|
365
|
+
# `arn:aws:s3-outposts:<Region>:<account-id>:outpost/<outpost-id>/object/<key>`.
|
366
|
+
# For example, to copy the object `reports/january.pdf` through
|
367
|
+
# outpost `my-outpost` owned by account `123456789012` in Region
|
368
|
+
# `us-west-2`, use the URL encoding of
|
369
|
+
# `arn:aws:s3-outposts:us-west-2:123456789012:outpost/my-outpost/object/reports/january.pdf`.
|
370
|
+
# The value must be URL encoded.
|
371
|
+
#
|
372
|
+
# To copy a specific version of an object, append
|
373
|
+
# `?versionId=<version-id>` to the value (for example,
|
374
|
+
# `awsexamplebucket/reports/january.pdf?versionId=QUpfdndhfd8438MNFDN93jdnJFkdmqnh893`).
|
375
|
+
# If you don't specify a version ID, Amazon S3 copies the latest
|
376
|
+
# version of the source object.
|
377
|
+
#
|
378
|
+
#
|
379
|
+
#
|
380
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/access-points.html
|
308
381
|
# @option options [String] :copy_source_if_match
|
309
382
|
# Copies the object if its entity tag (ETag) matches the specified tag.
|
310
383
|
# @option options [Time,DateTime,Date,Integer,String] :copy_source_if_modified_since
|
@@ -320,12 +393,20 @@ module Aws::S3
|
|
320
393
|
# @option options [String] :grant_full_control
|
321
394
|
# Gives the grantee READ, READ\_ACP, and WRITE\_ACP permissions on the
|
322
395
|
# object.
|
396
|
+
#
|
397
|
+
# This action is not supported by Amazon S3 on Outposts.
|
323
398
|
# @option options [String] :grant_read
|
324
399
|
# Allows grantee to read the object data and its metadata.
|
400
|
+
#
|
401
|
+
# This action is not supported by Amazon S3 on Outposts.
|
325
402
|
# @option options [String] :grant_read_acp
|
326
403
|
# Allows grantee to read the object ACL.
|
404
|
+
#
|
405
|
+
# This action is not supported by Amazon S3 on Outposts.
|
327
406
|
# @option options [String] :grant_write_acp
|
328
407
|
# Allows grantee to write the ACL for the applicable object.
|
408
|
+
#
|
409
|
+
# This action is not supported by Amazon S3 on Outposts.
|
329
410
|
# @option options [Hash<String,String>] :metadata
|
330
411
|
# A map of metadata to store with the object in S3.
|
331
412
|
# @option options [String] :metadata_directive
|
@@ -335,36 +416,63 @@ module Aws::S3
|
|
335
416
|
# Specifies whether the object tag-set are copied from the source object
|
336
417
|
# or replaced with tag-set provided in the request.
|
337
418
|
# @option options [String] :server_side_encryption
|
338
|
-
# The
|
339
|
-
# S3 (
|
419
|
+
# The server-side encryption algorithm used when storing this object in
|
420
|
+
# Amazon S3 (for example, AES256, aws:kms).
|
340
421
|
# @option options [String] :storage_class
|
341
|
-
#
|
422
|
+
# By default, Amazon S3 uses the STANDARD Storage Class to store newly
|
423
|
+
# created objects. The STANDARD storage class provides high durability
|
424
|
+
# and high availability. Depending on performance needs, you can specify
|
425
|
+
# a different Storage Class. Amazon S3 on Outposts only uses the
|
426
|
+
# OUTPOSTS Storage Class. For more information, see [Storage Classes][1]
|
427
|
+
# in the *Amazon S3 User Guide*.
|
428
|
+
#
|
429
|
+
#
|
430
|
+
#
|
431
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html
|
342
432
|
# @option options [String] :website_redirect_location
|
343
433
|
# If the bucket is configured as a website, redirects requests for this
|
344
434
|
# object to another object in the same bucket or to an external URL.
|
345
435
|
# Amazon S3 stores the value of this header in the object metadata.
|
346
436
|
# @option options [String] :sse_customer_algorithm
|
347
|
-
# Specifies the algorithm to use to when encrypting the object (
|
348
|
-
# AES256).
|
437
|
+
# Specifies the algorithm to use to when encrypting the object (for
|
438
|
+
# example, AES256).
|
349
439
|
# @option options [String] :sse_customer_key
|
350
440
|
# Specifies the customer-provided encryption key for Amazon S3 to use in
|
351
441
|
# encrypting data. This value is used to store the object and then it is
|
352
|
-
# discarded; Amazon does not store the encryption key. The key must
|
353
|
-
# appropriate for use with the algorithm specified in the
|
354
|
-
# x-amz-server-side
|
442
|
+
# discarded; Amazon S3 does not store the encryption key. The key must
|
443
|
+
# be appropriate for use with the algorithm specified in the
|
444
|
+
# `x-amz-server-side-encryption-customer-algorithm` header.
|
355
445
|
# @option options [String] :sse_customer_key_md5
|
356
446
|
# Specifies the 128-bit MD5 digest of the encryption key according to
|
357
447
|
# RFC 1321. Amazon S3 uses this header for a message integrity check to
|
358
|
-
# ensure the encryption key was transmitted without error.
|
448
|
+
# ensure that the encryption key was transmitted without error.
|
359
449
|
# @option options [String] :ssekms_key_id
|
360
|
-
# Specifies the
|
361
|
-
# PUT requests for an object protected by
|
362
|
-
# via SSL or using SigV4.
|
363
|
-
#
|
364
|
-
#
|
450
|
+
# Specifies the Amazon Web Services KMS key ID to use for object
|
451
|
+
# encryption. All GET and PUT requests for an object protected by Amazon
|
452
|
+
# Web Services KMS will fail if not made via SSL or using SigV4. For
|
453
|
+
# information about configuring using any of the officially supported
|
454
|
+
# Amazon Web Services SDKs and Amazon Web Services CLI, see [Specifying
|
455
|
+
# the Signature Version in Request Authentication][1] in the *Amazon S3
|
456
|
+
# User Guide*.
|
457
|
+
#
|
458
|
+
#
|
459
|
+
#
|
460
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingAWSSDK.html#specify-signature-version
|
461
|
+
# @option options [String] :ssekms_encryption_context
|
462
|
+
# Specifies the Amazon Web Services KMS Encryption Context to use for
|
463
|
+
# object encryption. The value of this header is a base64-encoded UTF-8
|
464
|
+
# string holding JSON with the encryption context key-value pairs.
|
465
|
+
# @option options [Boolean] :bucket_key_enabled
|
466
|
+
# Specifies whether Amazon S3 should use an S3 Bucket Key for object
|
467
|
+
# encryption with server-side encryption using AWS KMS (SSE-KMS).
|
468
|
+
# Setting this header to `true` causes Amazon S3 to use an S3 Bucket Key
|
469
|
+
# for object encryption with SSE-KMS.
|
470
|
+
#
|
471
|
+
# Specifying this header with a COPY action doesn’t affect bucket-level
|
472
|
+
# settings for S3 Bucket Key.
|
365
473
|
# @option options [String] :copy_source_sse_customer_algorithm
|
366
|
-
# Specifies the algorithm to use when decrypting the source object
|
367
|
-
#
|
474
|
+
# Specifies the algorithm to use when decrypting the source object (for
|
475
|
+
# example, AES256).
|
368
476
|
# @option options [String] :copy_source_sse_customer_key
|
369
477
|
# Specifies the customer-provided encryption key for Amazon S3 to use to
|
370
478
|
# decrypt the source object. The encryption key provided in this header
|
@@ -372,17 +480,21 @@ module Aws::S3
|
|
372
480
|
# @option options [String] :copy_source_sse_customer_key_md5
|
373
481
|
# Specifies the 128-bit MD5 digest of the encryption key according to
|
374
482
|
# RFC 1321. Amazon S3 uses this header for a message integrity check to
|
375
|
-
# ensure the encryption key was transmitted without error.
|
483
|
+
# ensure that the encryption key was transmitted without error.
|
376
484
|
# @option options [String] :request_payer
|
377
|
-
# Confirms that the requester knows that
|
378
|
-
#
|
379
|
-
# requests.
|
380
|
-
# buckets
|
381
|
-
#
|
485
|
+
# Confirms that the requester knows that they will be charged for the
|
486
|
+
# request. Bucket owners need not specify this parameter in their
|
487
|
+
# requests. For information about downloading objects from requester
|
488
|
+
# pays buckets, see [Downloading Objects in Requestor Pays Buckets][1]
|
489
|
+
# in the *Amazon S3 User Guide*.
|
490
|
+
#
|
491
|
+
#
|
492
|
+
#
|
493
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
|
382
494
|
# @option options [String] :tagging
|
383
495
|
# The tag-set for the object destination object this value must be used
|
384
|
-
# in conjunction with the TaggingDirective
|
385
|
-
# as URL Query parameters
|
496
|
+
# in conjunction with the `TaggingDirective`. The tag-set must be
|
497
|
+
# encoded as URL Query parameters.
|
386
498
|
# @option options [String] :object_lock_mode
|
387
499
|
# The Object Lock mode that you want to apply to the copied object.
|
388
500
|
# @option options [Time,DateTime,Date,Integer,String] :object_lock_retain_until_date
|
@@ -390,6 +502,14 @@ module Aws::S3
|
|
390
502
|
# expire.
|
391
503
|
# @option options [String] :object_lock_legal_hold_status
|
392
504
|
# Specifies whether you want to apply a Legal Hold to the copied object.
|
505
|
+
# @option options [String] :expected_bucket_owner
|
506
|
+
# The account ID of the expected destination bucket owner. If the
|
507
|
+
# destination bucket is owned by a different account, the request will
|
508
|
+
# fail with an HTTP `403 (Access Denied)` error.
|
509
|
+
# @option options [String] :expected_source_bucket_owner
|
510
|
+
# The account ID of the expected source bucket owner. If the source
|
511
|
+
# bucket is owned by a different account, the request will fail with an
|
512
|
+
# HTTP `403 (Access Denied)` error.
|
393
513
|
# @return [Types::CopyObjectOutput]
|
394
514
|
def copy_from(options = {})
|
395
515
|
options = options.merge(
|
@@ -407,22 +527,34 @@ module Aws::S3
|
|
407
527
|
# version_id: "ObjectVersionId",
|
408
528
|
# request_payer: "requester", # accepts requester
|
409
529
|
# bypass_governance_retention: false,
|
530
|
+
# expected_bucket_owner: "AccountId",
|
410
531
|
# })
|
411
532
|
# @param [Hash] options ({})
|
412
533
|
# @option options [String] :mfa
|
413
534
|
# The concatenation of the authentication device's serial number, a
|
414
535
|
# space, and the value that is displayed on your authentication device.
|
536
|
+
# Required to permanently delete a versioned object if versioning is
|
537
|
+
# configured with MFA delete enabled.
|
415
538
|
# @option options [String] :version_id
|
416
539
|
# VersionId used to reference a specific version of the object.
|
417
540
|
# @option options [String] :request_payer
|
418
|
-
# Confirms that the requester knows that
|
419
|
-
#
|
420
|
-
# requests.
|
421
|
-
# buckets
|
422
|
-
#
|
541
|
+
# Confirms that the requester knows that they will be charged for the
|
542
|
+
# request. Bucket owners need not specify this parameter in their
|
543
|
+
# requests. For information about downloading objects from requester
|
544
|
+
# pays buckets, see [Downloading Objects in Requestor Pays Buckets][1]
|
545
|
+
# in the *Amazon S3 User Guide*.
|
546
|
+
#
|
547
|
+
#
|
548
|
+
#
|
549
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
|
423
550
|
# @option options [Boolean] :bypass_governance_retention
|
424
551
|
# Indicates whether S3 Object Lock should bypass Governance-mode
|
425
|
-
# restrictions to process this operation.
|
552
|
+
# restrictions to process this operation. To use this header, you must
|
553
|
+
# have the `s3:PutBucketPublicAccessBlock` permission.
|
554
|
+
# @option options [String] :expected_bucket_owner
|
555
|
+
# The account ID of the expected bucket owner. If the bucket is owned by
|
556
|
+
# a different account, the request will fail with an HTTP `403 (Access
|
557
|
+
# Denied)` error.
|
426
558
|
# @return [Types::DeleteObjectOutput]
|
427
559
|
def delete(options = {})
|
428
560
|
options = options.merge(
|
@@ -453,6 +585,7 @@ module Aws::S3
|
|
453
585
|
# sse_customer_key_md5: "SSECustomerKeyMD5",
|
454
586
|
# request_payer: "requester", # accepts requester
|
455
587
|
# part_number: 1,
|
588
|
+
# expected_bucket_owner: "AccountId",
|
456
589
|
# })
|
457
590
|
# @param [Hash] options ({})
|
458
591
|
# @option options [String] :if_match
|
@@ -469,46 +602,63 @@ module Aws::S3
|
|
469
602
|
# time, otherwise return a 412 (precondition failed).
|
470
603
|
# @option options [String] :range
|
471
604
|
# Downloads the specified range bytes of an object. For more information
|
472
|
-
# about the HTTP Range header,
|
473
|
-
#
|
605
|
+
# about the HTTP Range header, see
|
606
|
+
# [https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.35][1].
|
607
|
+
#
|
608
|
+
# <note markdown="1"> Amazon S3 doesn't support retrieving multiple ranges of data per
|
609
|
+
# `GET` request.
|
610
|
+
#
|
611
|
+
# </note>
|
612
|
+
#
|
613
|
+
#
|
614
|
+
#
|
615
|
+
# [1]: https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.35
|
474
616
|
# @option options [String] :response_cache_control
|
475
|
-
# Sets the Cache-Control header of the response.
|
617
|
+
# Sets the `Cache-Control` header of the response.
|
476
618
|
# @option options [String] :response_content_disposition
|
477
|
-
# Sets the Content-Disposition header of the response
|
619
|
+
# Sets the `Content-Disposition` header of the response
|
478
620
|
# @option options [String] :response_content_encoding
|
479
|
-
# Sets the Content-Encoding header of the response.
|
621
|
+
# Sets the `Content-Encoding` header of the response.
|
480
622
|
# @option options [String] :response_content_language
|
481
|
-
# Sets the Content-Language header of the response.
|
623
|
+
# Sets the `Content-Language` header of the response.
|
482
624
|
# @option options [String] :response_content_type
|
483
|
-
# Sets the Content-Type header of the response.
|
625
|
+
# Sets the `Content-Type` header of the response.
|
484
626
|
# @option options [Time,DateTime,Date,Integer,String] :response_expires
|
485
|
-
# Sets the Expires header of the response.
|
627
|
+
# Sets the `Expires` header of the response.
|
486
628
|
# @option options [String] :version_id
|
487
629
|
# VersionId used to reference a specific version of the object.
|
488
630
|
# @option options [String] :sse_customer_algorithm
|
489
|
-
# Specifies the algorithm to use to when
|
490
|
-
# AES256).
|
631
|
+
# Specifies the algorithm to use to when decrypting the object (for
|
632
|
+
# example, AES256).
|
491
633
|
# @option options [String] :sse_customer_key
|
492
|
-
# Specifies the customer-provided encryption key for Amazon S3 to
|
493
|
-
#
|
494
|
-
#
|
495
|
-
# appropriate for use with the algorithm specified in the
|
496
|
-
# x-amz-server-side
|
634
|
+
# Specifies the customer-provided encryption key for Amazon S3 used to
|
635
|
+
# encrypt the data. This value is used to decrypt the object when
|
636
|
+
# recovering it and must match the one used when storing the data. The
|
637
|
+
# key must be appropriate for use with the algorithm specified in the
|
638
|
+
# `x-amz-server-side-encryption-customer-algorithm` header.
|
497
639
|
# @option options [String] :sse_customer_key_md5
|
498
640
|
# Specifies the 128-bit MD5 digest of the encryption key according to
|
499
641
|
# RFC 1321. Amazon S3 uses this header for a message integrity check to
|
500
|
-
# ensure the encryption key was transmitted without error.
|
642
|
+
# ensure that the encryption key was transmitted without error.
|
501
643
|
# @option options [String] :request_payer
|
502
|
-
# Confirms that the requester knows that
|
503
|
-
#
|
504
|
-
# requests.
|
505
|
-
# buckets
|
506
|
-
#
|
644
|
+
# Confirms that the requester knows that they will be charged for the
|
645
|
+
# request. Bucket owners need not specify this parameter in their
|
646
|
+
# requests. For information about downloading objects from requester
|
647
|
+
# pays buckets, see [Downloading Objects in Requestor Pays Buckets][1]
|
648
|
+
# in the *Amazon S3 User Guide*.
|
649
|
+
#
|
650
|
+
#
|
651
|
+
#
|
652
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
|
507
653
|
# @option options [Integer] :part_number
|
508
654
|
# Part number of the object being read. This is a positive integer
|
509
655
|
# between 1 and 10,000. Effectively performs a 'ranged' GET request
|
510
656
|
# for the part specified. Useful for downloading just a part of an
|
511
657
|
# object.
|
658
|
+
# @option options [String] :expected_bucket_owner
|
659
|
+
# The account ID of the expected bucket owner. If the bucket is owned by
|
660
|
+
# a different account, the request will fail with an HTTP `403 (Access
|
661
|
+
# Denied)` error.
|
512
662
|
# @return [Types::GetObjectOutput]
|
513
663
|
def get(options = {}, &block)
|
514
664
|
options = options.merge(
|
@@ -537,21 +687,26 @@ module Aws::S3
|
|
537
687
|
# "MetadataKey" => "MetadataValue",
|
538
688
|
# },
|
539
689
|
# server_side_encryption: "AES256", # accepts AES256, aws:kms
|
540
|
-
# storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER
|
690
|
+
# storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER, DEEP_ARCHIVE, OUTPOSTS, GLACIER_IR
|
541
691
|
# website_redirect_location: "WebsiteRedirectLocation",
|
542
692
|
# sse_customer_algorithm: "SSECustomerAlgorithm",
|
543
693
|
# sse_customer_key: "SSECustomerKey",
|
544
694
|
# sse_customer_key_md5: "SSECustomerKeyMD5",
|
545
695
|
# ssekms_key_id: "SSEKMSKeyId",
|
696
|
+
# ssekms_encryption_context: "SSEKMSEncryptionContext",
|
697
|
+
# bucket_key_enabled: false,
|
546
698
|
# request_payer: "requester", # accepts requester
|
547
699
|
# tagging: "TaggingHeader",
|
548
700
|
# object_lock_mode: "GOVERNANCE", # accepts GOVERNANCE, COMPLIANCE
|
549
701
|
# object_lock_retain_until_date: Time.now,
|
550
702
|
# object_lock_legal_hold_status: "ON", # accepts ON, OFF
|
703
|
+
# expected_bucket_owner: "AccountId",
|
551
704
|
# })
|
552
705
|
# @param [Hash] options ({})
|
553
706
|
# @option options [String] :acl
|
554
707
|
# The canned ACL to apply to the object.
|
708
|
+
#
|
709
|
+
# This action is not supported by Amazon S3 on Outposts.
|
555
710
|
# @option options [String] :cache_control
|
556
711
|
# Specifies caching behavior along the request/reply chain.
|
557
712
|
# @option options [String] :content_disposition
|
@@ -569,51 +724,90 @@ module Aws::S3
|
|
569
724
|
# @option options [String] :grant_full_control
|
570
725
|
# Gives the grantee READ, READ\_ACP, and WRITE\_ACP permissions on the
|
571
726
|
# object.
|
727
|
+
#
|
728
|
+
# This action is not supported by Amazon S3 on Outposts.
|
572
729
|
# @option options [String] :grant_read
|
573
730
|
# Allows grantee to read the object data and its metadata.
|
731
|
+
#
|
732
|
+
# This action is not supported by Amazon S3 on Outposts.
|
574
733
|
# @option options [String] :grant_read_acp
|
575
734
|
# Allows grantee to read the object ACL.
|
735
|
+
#
|
736
|
+
# This action is not supported by Amazon S3 on Outposts.
|
576
737
|
# @option options [String] :grant_write_acp
|
577
738
|
# Allows grantee to write the ACL for the applicable object.
|
739
|
+
#
|
740
|
+
# This action is not supported by Amazon S3 on Outposts.
|
578
741
|
# @option options [Hash<String,String>] :metadata
|
579
742
|
# A map of metadata to store with the object in S3.
|
580
743
|
# @option options [String] :server_side_encryption
|
581
|
-
# The
|
582
|
-
# S3 (
|
744
|
+
# The server-side encryption algorithm used when storing this object in
|
745
|
+
# Amazon S3 (for example, AES256, aws:kms).
|
583
746
|
# @option options [String] :storage_class
|
584
|
-
#
|
747
|
+
# By default, Amazon S3 uses the STANDARD Storage Class to store newly
|
748
|
+
# created objects. The STANDARD storage class provides high durability
|
749
|
+
# and high availability. Depending on performance needs, you can specify
|
750
|
+
# a different Storage Class. Amazon S3 on Outposts only uses the
|
751
|
+
# OUTPOSTS Storage Class. For more information, see [Storage Classes][1]
|
752
|
+
# in the *Amazon S3 User Guide*.
|
753
|
+
#
|
754
|
+
#
|
755
|
+
#
|
756
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html
|
585
757
|
# @option options [String] :website_redirect_location
|
586
758
|
# If the bucket is configured as a website, redirects requests for this
|
587
759
|
# object to another object in the same bucket or to an external URL.
|
588
760
|
# Amazon S3 stores the value of this header in the object metadata.
|
589
761
|
# @option options [String] :sse_customer_algorithm
|
590
|
-
# Specifies the algorithm to use to when encrypting the object (
|
591
|
-
# AES256).
|
762
|
+
# Specifies the algorithm to use to when encrypting the object (for
|
763
|
+
# example, AES256).
|
592
764
|
# @option options [String] :sse_customer_key
|
593
765
|
# Specifies the customer-provided encryption key for Amazon S3 to use in
|
594
766
|
# encrypting data. This value is used to store the object and then it is
|
595
|
-
# discarded; Amazon does not store the encryption key. The key must
|
596
|
-
# appropriate for use with the algorithm specified in the
|
597
|
-
# x-amz-server-side
|
767
|
+
# discarded; Amazon S3 does not store the encryption key. The key must
|
768
|
+
# be appropriate for use with the algorithm specified in the
|
769
|
+
# `x-amz-server-side-encryption-customer-algorithm` header.
|
598
770
|
# @option options [String] :sse_customer_key_md5
|
599
771
|
# Specifies the 128-bit MD5 digest of the encryption key according to
|
600
772
|
# RFC 1321. Amazon S3 uses this header for a message integrity check to
|
601
|
-
# ensure the encryption key was transmitted without error.
|
773
|
+
# ensure that the encryption key was transmitted without error.
|
602
774
|
# @option options [String] :ssekms_key_id
|
603
|
-
# Specifies the
|
604
|
-
# PUT requests for an object protected by
|
605
|
-
# via SSL or using SigV4.
|
606
|
-
#
|
607
|
-
#
|
775
|
+
# Specifies the ID of the symmetric customer managed key to use for
|
776
|
+
# object encryption. All GET and PUT requests for an object protected by
|
777
|
+
# Amazon Web Services KMS will fail if not made via SSL or using SigV4.
|
778
|
+
# For information about configuring using any of the officially
|
779
|
+
# supported Amazon Web Services SDKs and Amazon Web Services CLI, see
|
780
|
+
# [Specifying the Signature Version in Request Authentication][1] in the
|
781
|
+
# *Amazon S3 User Guide*.
|
782
|
+
#
|
783
|
+
#
|
784
|
+
#
|
785
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingAWSSDK.html#specify-signature-version
|
786
|
+
# @option options [String] :ssekms_encryption_context
|
787
|
+
# Specifies the Amazon Web Services KMS Encryption Context to use for
|
788
|
+
# object encryption. The value of this header is a base64-encoded UTF-8
|
789
|
+
# string holding JSON with the encryption context key-value pairs.
|
790
|
+
# @option options [Boolean] :bucket_key_enabled
|
791
|
+
# Specifies whether Amazon S3 should use an S3 Bucket Key for object
|
792
|
+
# encryption with server-side encryption using AWS KMS (SSE-KMS).
|
793
|
+
# Setting this header to `true` causes Amazon S3 to use an S3 Bucket Key
|
794
|
+
# for object encryption with SSE-KMS.
|
795
|
+
#
|
796
|
+
# Specifying this header with an object action doesn’t affect
|
797
|
+
# bucket-level settings for S3 Bucket Key.
|
608
798
|
# @option options [String] :request_payer
|
609
|
-
# Confirms that the requester knows that
|
610
|
-
#
|
611
|
-
# requests.
|
612
|
-
# buckets
|
613
|
-
#
|
799
|
+
# Confirms that the requester knows that they will be charged for the
|
800
|
+
# request. Bucket owners need not specify this parameter in their
|
801
|
+
# requests. For information about downloading objects from requester
|
802
|
+
# pays buckets, see [Downloading Objects in Requestor Pays Buckets][1]
|
803
|
+
# in the *Amazon S3 User Guide*.
|
804
|
+
#
|
805
|
+
#
|
806
|
+
#
|
807
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
|
614
808
|
# @option options [String] :tagging
|
615
809
|
# The tag-set for the object. The tag-set must be encoded as URL Query
|
616
|
-
# parameters
|
810
|
+
# parameters.
|
617
811
|
# @option options [String] :object_lock_mode
|
618
812
|
# Specifies the Object Lock mode that you want to apply to the uploaded
|
619
813
|
# object.
|
@@ -622,6 +816,10 @@ module Aws::S3
|
|
622
816
|
# @option options [String] :object_lock_legal_hold_status
|
623
817
|
# Specifies whether you want to apply a Legal Hold to the uploaded
|
624
818
|
# object.
|
819
|
+
# @option options [String] :expected_bucket_owner
|
820
|
+
# The account ID of the expected bucket owner. If the bucket is owned by
|
821
|
+
# a different account, the request will fail with an HTTP `403 (Access
|
822
|
+
# Denied)` error.
|
625
823
|
# @return [MultipartUpload]
|
626
824
|
def initiate_multipart_upload(options = {})
|
627
825
|
options = options.merge(
|
@@ -658,88 +856,199 @@ module Aws::S3
|
|
658
856
|
# "MetadataKey" => "MetadataValue",
|
659
857
|
# },
|
660
858
|
# server_side_encryption: "AES256", # accepts AES256, aws:kms
|
661
|
-
# storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER
|
859
|
+
# storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER, DEEP_ARCHIVE, OUTPOSTS, GLACIER_IR
|
662
860
|
# website_redirect_location: "WebsiteRedirectLocation",
|
663
861
|
# sse_customer_algorithm: "SSECustomerAlgorithm",
|
664
862
|
# sse_customer_key: "SSECustomerKey",
|
665
863
|
# sse_customer_key_md5: "SSECustomerKeyMD5",
|
666
864
|
# ssekms_key_id: "SSEKMSKeyId",
|
865
|
+
# ssekms_encryption_context: "SSEKMSEncryptionContext",
|
866
|
+
# bucket_key_enabled: false,
|
667
867
|
# request_payer: "requester", # accepts requester
|
668
868
|
# tagging: "TaggingHeader",
|
669
869
|
# object_lock_mode: "GOVERNANCE", # accepts GOVERNANCE, COMPLIANCE
|
670
870
|
# object_lock_retain_until_date: Time.now,
|
671
871
|
# object_lock_legal_hold_status: "ON", # accepts ON, OFF
|
872
|
+
# expected_bucket_owner: "AccountId",
|
672
873
|
# })
|
673
874
|
# @param [Hash] options ({})
|
674
875
|
# @option options [String] :acl
|
675
|
-
# The canned ACL to apply to the object.
|
676
|
-
#
|
876
|
+
# The canned ACL to apply to the object. For more information, see
|
877
|
+
# [Canned ACL][1].
|
878
|
+
#
|
879
|
+
# This action is not supported by Amazon S3 on Outposts.
|
880
|
+
#
|
881
|
+
#
|
882
|
+
#
|
883
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#CannedACL
|
884
|
+
# @option options [String, StringIO, File] :body
|
677
885
|
# Object data.
|
678
886
|
# @option options [String] :cache_control
|
679
|
-
#
|
887
|
+
# Can be used to specify caching behavior along the request/reply chain.
|
888
|
+
# For more information, see
|
889
|
+
# [http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9][1].
|
890
|
+
#
|
891
|
+
#
|
892
|
+
#
|
893
|
+
# [1]: http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9
|
680
894
|
# @option options [String] :content_disposition
|
681
|
-
# Specifies presentational information for the object.
|
895
|
+
# Specifies presentational information for the object. For more
|
896
|
+
# information, see
|
897
|
+
# [http://www.w3.org/Protocols/rfc2616/rfc2616-sec19.html#sec19.5.1][1].
|
898
|
+
#
|
899
|
+
#
|
900
|
+
#
|
901
|
+
# [1]: http://www.w3.org/Protocols/rfc2616/rfc2616-sec19.html#sec19.5.1
|
682
902
|
# @option options [String] :content_encoding
|
683
903
|
# Specifies what content encodings have been applied to the object and
|
684
904
|
# thus what decoding mechanisms must be applied to obtain the media-type
|
685
|
-
# referenced by the Content-Type header field.
|
905
|
+
# referenced by the Content-Type header field. For more information, see
|
906
|
+
# [http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.11][1].
|
907
|
+
#
|
908
|
+
#
|
909
|
+
#
|
910
|
+
# [1]: http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.11
|
686
911
|
# @option options [String] :content_language
|
687
912
|
# The language the content is in.
|
688
913
|
# @option options [Integer] :content_length
|
689
914
|
# Size of the body in bytes. This parameter is useful when the size of
|
690
|
-
# the body cannot be determined automatically.
|
915
|
+
# the body cannot be determined automatically. For more information, see
|
916
|
+
# [http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.13][1].
|
917
|
+
#
|
918
|
+
#
|
919
|
+
#
|
920
|
+
# [1]: http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.13
|
691
921
|
# @option options [String] :content_md5
|
692
|
-
# The base64-encoded 128-bit MD5 digest of the
|
693
|
-
#
|
922
|
+
# The base64-encoded 128-bit MD5 digest of the message (without the
|
923
|
+
# headers) according to RFC 1864. This header can be used as a message
|
924
|
+
# integrity check to verify that the data is the same data that was
|
925
|
+
# originally sent. Although it is optional, we recommend using the
|
926
|
+
# Content-MD5 mechanism as an end-to-end integrity check. For more
|
927
|
+
# information about REST request authentication, see [REST
|
928
|
+
# Authentication][1].
|
929
|
+
#
|
930
|
+
#
|
931
|
+
#
|
932
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/RESTAuthentication.html
|
694
933
|
# @option options [String] :content_type
|
695
|
-
# A standard MIME type describing the format of the
|
934
|
+
# A standard MIME type describing the format of the contents. For more
|
935
|
+
# information, see
|
936
|
+
# [http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.17][1].
|
937
|
+
#
|
938
|
+
#
|
939
|
+
#
|
940
|
+
# [1]: http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.17
|
696
941
|
# @option options [Time,DateTime,Date,Integer,String] :expires
|
697
|
-
# The date and time at which the object is no longer cacheable.
|
942
|
+
# The date and time at which the object is no longer cacheable. For more
|
943
|
+
# information, see
|
944
|
+
# [http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.21][1].
|
945
|
+
#
|
946
|
+
#
|
947
|
+
#
|
948
|
+
# [1]: http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.21
|
698
949
|
# @option options [String] :grant_full_control
|
699
950
|
# Gives the grantee READ, READ\_ACP, and WRITE\_ACP permissions on the
|
700
951
|
# object.
|
952
|
+
#
|
953
|
+
# This action is not supported by Amazon S3 on Outposts.
|
701
954
|
# @option options [String] :grant_read
|
702
955
|
# Allows grantee to read the object data and its metadata.
|
956
|
+
#
|
957
|
+
# This action is not supported by Amazon S3 on Outposts.
|
703
958
|
# @option options [String] :grant_read_acp
|
704
959
|
# Allows grantee to read the object ACL.
|
960
|
+
#
|
961
|
+
# This action is not supported by Amazon S3 on Outposts.
|
705
962
|
# @option options [String] :grant_write_acp
|
706
963
|
# Allows grantee to write the ACL for the applicable object.
|
964
|
+
#
|
965
|
+
# This action is not supported by Amazon S3 on Outposts.
|
707
966
|
# @option options [Hash<String,String>] :metadata
|
708
967
|
# A map of metadata to store with the object in S3.
|
709
968
|
# @option options [String] :server_side_encryption
|
710
|
-
# The
|
711
|
-
# S3 (
|
969
|
+
# The server-side encryption algorithm used when storing this object in
|
970
|
+
# Amazon S3 (for example, AES256, aws:kms).
|
712
971
|
# @option options [String] :storage_class
|
713
|
-
#
|
972
|
+
# By default, Amazon S3 uses the STANDARD Storage Class to store newly
|
973
|
+
# created objects. The STANDARD storage class provides high durability
|
974
|
+
# and high availability. Depending on performance needs, you can specify
|
975
|
+
# a different Storage Class. Amazon S3 on Outposts only uses the
|
976
|
+
# OUTPOSTS Storage Class. For more information, see [Storage Classes][1]
|
977
|
+
# in the *Amazon S3 User Guide*.
|
978
|
+
#
|
979
|
+
#
|
980
|
+
#
|
981
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html
|
714
982
|
# @option options [String] :website_redirect_location
|
715
983
|
# If the bucket is configured as a website, redirects requests for this
|
716
984
|
# object to another object in the same bucket or to an external URL.
|
717
|
-
# Amazon S3 stores the value of this header in the object metadata.
|
985
|
+
# Amazon S3 stores the value of this header in the object metadata. For
|
986
|
+
# information about object metadata, see [Object Key and Metadata][1].
|
987
|
+
#
|
988
|
+
# In the following example, the request header sets the redirect to an
|
989
|
+
# object (anotherPage.html) in the same bucket:
|
990
|
+
#
|
991
|
+
# `x-amz-website-redirect-location: /anotherPage.html`
|
992
|
+
#
|
993
|
+
# In the following example, the request header sets the object redirect
|
994
|
+
# to another website:
|
995
|
+
#
|
996
|
+
# `x-amz-website-redirect-location: http://www.example.com/`
|
997
|
+
#
|
998
|
+
# For more information about website hosting in Amazon S3, see [Hosting
|
999
|
+
# Websites on Amazon S3][2] and [How to Configure Website Page
|
1000
|
+
# Redirects][3].
|
1001
|
+
#
|
1002
|
+
#
|
1003
|
+
#
|
1004
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingMetadata.html
|
1005
|
+
# [2]: https://docs.aws.amazon.com/AmazonS3/latest/dev/WebsiteHosting.html
|
1006
|
+
# [3]: https://docs.aws.amazon.com/AmazonS3/latest/dev/how-to-page-redirect.html
|
718
1007
|
# @option options [String] :sse_customer_algorithm
|
719
|
-
# Specifies the algorithm to use to when encrypting the object (
|
720
|
-
# AES256).
|
1008
|
+
# Specifies the algorithm to use to when encrypting the object (for
|
1009
|
+
# example, AES256).
|
721
1010
|
# @option options [String] :sse_customer_key
|
722
1011
|
# Specifies the customer-provided encryption key for Amazon S3 to use in
|
723
1012
|
# encrypting data. This value is used to store the object and then it is
|
724
|
-
# discarded; Amazon does not store the encryption key. The key must
|
725
|
-
# appropriate for use with the algorithm specified in the
|
726
|
-
# x-amz-server-side
|
1013
|
+
# discarded; Amazon S3 does not store the encryption key. The key must
|
1014
|
+
# be appropriate for use with the algorithm specified in the
|
1015
|
+
# `x-amz-server-side-encryption-customer-algorithm` header.
|
727
1016
|
# @option options [String] :sse_customer_key_md5
|
728
1017
|
# Specifies the 128-bit MD5 digest of the encryption key according to
|
729
1018
|
# RFC 1321. Amazon S3 uses this header for a message integrity check to
|
730
|
-
# ensure the encryption key was transmitted without error.
|
1019
|
+
# ensure that the encryption key was transmitted without error.
|
731
1020
|
# @option options [String] :ssekms_key_id
|
732
|
-
#
|
733
|
-
#
|
734
|
-
#
|
735
|
-
#
|
736
|
-
#
|
1021
|
+
# If `x-amz-server-side-encryption` is present and has the value of
|
1022
|
+
# `aws:kms`, this header specifies the ID of the Amazon Web Services Key
|
1023
|
+
# Management Service (Amazon Web Services KMS) symmetrical customer
|
1024
|
+
# managed key that was used for the object. If you specify
|
1025
|
+
# `x-amz-server-side-encryption:aws:kms`, but do not provide`
|
1026
|
+
# x-amz-server-side-encryption-aws-kms-key-id`, Amazon S3 uses the
|
1027
|
+
# Amazon Web Services managed key to protect the data. If the KMS key
|
1028
|
+
# does not exist in the same account issuing the command, you must use
|
1029
|
+
# the full ARN and not just the ID.
|
1030
|
+
# @option options [String] :ssekms_encryption_context
|
1031
|
+
# Specifies the Amazon Web Services KMS Encryption Context to use for
|
1032
|
+
# object encryption. The value of this header is a base64-encoded UTF-8
|
1033
|
+
# string holding JSON with the encryption context key-value pairs.
|
1034
|
+
# @option options [Boolean] :bucket_key_enabled
|
1035
|
+
# Specifies whether Amazon S3 should use an S3 Bucket Key for object
|
1036
|
+
# encryption with server-side encryption using AWS KMS (SSE-KMS).
|
1037
|
+
# Setting this header to `true` causes Amazon S3 to use an S3 Bucket Key
|
1038
|
+
# for object encryption with SSE-KMS.
|
1039
|
+
#
|
1040
|
+
# Specifying this header with a PUT action doesn’t affect bucket-level
|
1041
|
+
# settings for S3 Bucket Key.
|
737
1042
|
# @option options [String] :request_payer
|
738
|
-
# Confirms that the requester knows that
|
739
|
-
#
|
740
|
-
# requests.
|
741
|
-
# buckets
|
742
|
-
#
|
1043
|
+
# Confirms that the requester knows that they will be charged for the
|
1044
|
+
# request. Bucket owners need not specify this parameter in their
|
1045
|
+
# requests. For information about downloading objects from requester
|
1046
|
+
# pays buckets, see [Downloading Objects in Requestor Pays Buckets][1]
|
1047
|
+
# in the *Amazon S3 User Guide*.
|
1048
|
+
#
|
1049
|
+
#
|
1050
|
+
#
|
1051
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
|
743
1052
|
# @option options [String] :tagging
|
744
1053
|
# The tag-set for the object. The tag-set must be encoded as URL Query
|
745
1054
|
# parameters. (For example, "Key1=Value1")
|
@@ -747,8 +1056,18 @@ module Aws::S3
|
|
747
1056
|
# The Object Lock mode that you want to apply to this object.
|
748
1057
|
# @option options [Time,DateTime,Date,Integer,String] :object_lock_retain_until_date
|
749
1058
|
# The date and time when you want this object's Object Lock to expire.
|
1059
|
+
# Must be formatted as a timestamp parameter.
|
750
1060
|
# @option options [String] :object_lock_legal_hold_status
|
751
|
-
#
|
1061
|
+
# Specifies whether a legal hold will be applied to this object. For
|
1062
|
+
# more information about S3 Object Lock, see [Object Lock][1].
|
1063
|
+
#
|
1064
|
+
#
|
1065
|
+
#
|
1066
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock.html
|
1067
|
+
# @option options [String] :expected_bucket_owner
|
1068
|
+
# The account ID of the expected bucket owner. If the bucket is owned by
|
1069
|
+
# a different account, the request will fail with an HTTP `403 (Access
|
1070
|
+
# Denied)` error.
|
752
1071
|
# @return [Types::PutObjectOutput]
|
753
1072
|
def put(options = {})
|
754
1073
|
options = options.merge(
|
@@ -840,22 +1159,32 @@ module Aws::S3
|
|
840
1159
|
# value: "MetadataValue",
|
841
1160
|
# },
|
842
1161
|
# ],
|
843
|
-
# storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER
|
1162
|
+
# storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER, DEEP_ARCHIVE, OUTPOSTS, GLACIER_IR
|
844
1163
|
# },
|
845
1164
|
# },
|
846
1165
|
# },
|
847
1166
|
# request_payer: "requester", # accepts requester
|
1167
|
+
# expected_bucket_owner: "AccountId",
|
848
1168
|
# })
|
849
1169
|
# @param [Hash] options ({})
|
850
1170
|
# @option options [String] :version_id
|
1171
|
+
# VersionId used to reference a specific version of the object.
|
851
1172
|
# @option options [Types::RestoreRequest] :restore_request
|
852
1173
|
# Container for restore job parameters.
|
853
1174
|
# @option options [String] :request_payer
|
854
|
-
# Confirms that the requester knows that
|
855
|
-
#
|
856
|
-
# requests.
|
857
|
-
# buckets
|
858
|
-
#
|
1175
|
+
# Confirms that the requester knows that they will be charged for the
|
1176
|
+
# request. Bucket owners need not specify this parameter in their
|
1177
|
+
# requests. For information about downloading objects from requester
|
1178
|
+
# pays buckets, see [Downloading Objects in Requestor Pays Buckets][1]
|
1179
|
+
# in the *Amazon S3 User Guide*.
|
1180
|
+
#
|
1181
|
+
#
|
1182
|
+
#
|
1183
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
|
1184
|
+
# @option options [String] :expected_bucket_owner
|
1185
|
+
# The account ID of the expected bucket owner. If the bucket is owned by
|
1186
|
+
# a different account, the request will fail with an HTTP `403 (Access
|
1187
|
+
# Denied)` error.
|
859
1188
|
# @return [Types::RestoreObjectOutput]
|
860
1189
|
def restore_object(options = {})
|
861
1190
|
options = options.merge(
|
@@ -952,8 +1281,8 @@ module Aws::S3
|
|
952
1281
|
|
953
1282
|
def yield_waiter_and_warn(waiter, &block)
|
954
1283
|
if !@waiter_block_warned
|
955
|
-
msg = "pass options to configure the waiter; "
|
956
|
-
|
1284
|
+
msg = "pass options to configure the waiter; "\
|
1285
|
+
"yielding the waiter is deprecated"
|
957
1286
|
warn(msg)
|
958
1287
|
@waiter_block_warned = true
|
959
1288
|
end
|
@@ -961,7 +1290,9 @@ module Aws::S3
|
|
961
1290
|
end
|
962
1291
|
|
963
1292
|
def separate_params_and_options(options)
|
964
|
-
opts = Set.new(
|
1293
|
+
opts = Set.new(
|
1294
|
+
[:client, :max_attempts, :delay, :before_attempt, :before_wait]
|
1295
|
+
)
|
965
1296
|
waiter_opts = {}
|
966
1297
|
waiter_params = {}
|
967
1298
|
options.each_pair do |key, value|
|
@@ -985,21 +1316,32 @@ module Aws::S3
|
|
985
1316
|
# mfa: "MFA",
|
986
1317
|
# request_payer: "requester", # accepts requester
|
987
1318
|
# bypass_governance_retention: false,
|
1319
|
+
# expected_bucket_owner: "AccountId",
|
988
1320
|
# })
|
989
1321
|
# @param options ({})
|
990
1322
|
# @option options [String] :mfa
|
991
1323
|
# The concatenation of the authentication device's serial number, a
|
992
1324
|
# space, and the value that is displayed on your authentication device.
|
1325
|
+
# Required to permanently delete a versioned object if versioning is
|
1326
|
+
# configured with MFA delete enabled.
|
993
1327
|
# @option options [String] :request_payer
|
994
|
-
# Confirms that the requester knows that
|
995
|
-
#
|
996
|
-
# requests.
|
997
|
-
# buckets
|
998
|
-
#
|
1328
|
+
# Confirms that the requester knows that they will be charged for the
|
1329
|
+
# request. Bucket owners need not specify this parameter in their
|
1330
|
+
# requests. For information about downloading objects from requester
|
1331
|
+
# pays buckets, see [Downloading Objects in Requestor Pays Buckets][1]
|
1332
|
+
# in the *Amazon S3 User Guide*.
|
1333
|
+
#
|
1334
|
+
#
|
1335
|
+
#
|
1336
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
|
999
1337
|
# @option options [Boolean] :bypass_governance_retention
|
1000
1338
|
# Specifies whether you want to delete this object even if it has a
|
1001
|
-
# Governance-type Object Lock in place.
|
1002
|
-
#
|
1339
|
+
# Governance-type Object Lock in place. To use this header, you must
|
1340
|
+
# have the `s3:PutBucketPublicAccessBlock` permission.
|
1341
|
+
# @option options [String] :expected_bucket_owner
|
1342
|
+
# The account ID of the expected bucket owner. If the bucket is owned by
|
1343
|
+
# a different account, the request will fail with an HTTP `403 (Access
|
1344
|
+
# Denied)` error.
|
1003
1345
|
# @return [void]
|
1004
1346
|
def batch_delete!(options = {})
|
1005
1347
|
batch_enum.each do |batch|
|