aws-sdk-s3 1.21.0 → 1.117.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (99) hide show
  1. checksums.yaml +5 -5
  2. data/CHANGELOG.md +930 -0
  3. data/LICENSE.txt +202 -0
  4. data/VERSION +1 -0
  5. data/lib/aws-sdk-s3/bucket.rb +393 -75
  6. data/lib/aws-sdk-s3/bucket_acl.rb +57 -14
  7. data/lib/aws-sdk-s3/bucket_cors.rb +67 -13
  8. data/lib/aws-sdk-s3/bucket_lifecycle.rb +54 -15
  9. data/lib/aws-sdk-s3/bucket_lifecycle_configuration.rb +56 -15
  10. data/lib/aws-sdk-s3/bucket_logging.rb +52 -15
  11. data/lib/aws-sdk-s3/bucket_notification.rb +47 -17
  12. data/lib/aws-sdk-s3/bucket_policy.rb +51 -13
  13. data/lib/aws-sdk-s3/bucket_region_cache.rb +2 -0
  14. data/lib/aws-sdk-s3/bucket_request_payment.rb +51 -12
  15. data/lib/aws-sdk-s3/bucket_tagging.rb +59 -13
  16. data/lib/aws-sdk-s3/bucket_versioning.rb +118 -12
  17. data/lib/aws-sdk-s3/bucket_website.rb +66 -13
  18. data/lib/aws-sdk-s3/client.rb +11422 -2518
  19. data/lib/aws-sdk-s3/client_api.rb +1196 -155
  20. data/lib/aws-sdk-s3/customizations/bucket.rb +53 -36
  21. data/lib/aws-sdk-s3/customizations/multipart_upload.rb +2 -0
  22. data/lib/aws-sdk-s3/customizations/object.rb +200 -62
  23. data/lib/aws-sdk-s3/customizations/object_summary.rb +5 -0
  24. data/lib/aws-sdk-s3/customizations/types/list_object_versions_output.rb +2 -0
  25. data/lib/aws-sdk-s3/customizations.rb +4 -1
  26. data/lib/aws-sdk-s3/encryption/client.rb +23 -6
  27. data/lib/aws-sdk-s3/encryption/decrypt_handler.rb +71 -29
  28. data/lib/aws-sdk-s3/encryption/default_cipher_provider.rb +43 -5
  29. data/lib/aws-sdk-s3/encryption/default_key_provider.rb +2 -0
  30. data/lib/aws-sdk-s3/encryption/encrypt_handler.rb +13 -2
  31. data/lib/aws-sdk-s3/encryption/errors.rb +2 -0
  32. data/lib/aws-sdk-s3/encryption/io_auth_decrypter.rb +11 -3
  33. data/lib/aws-sdk-s3/encryption/io_decrypter.rb +11 -3
  34. data/lib/aws-sdk-s3/encryption/io_encrypter.rb +2 -0
  35. data/lib/aws-sdk-s3/encryption/key_provider.rb +2 -0
  36. data/lib/aws-sdk-s3/encryption/kms_cipher_provider.rb +34 -3
  37. data/lib/aws-sdk-s3/encryption/materials.rb +8 -6
  38. data/lib/aws-sdk-s3/encryption/utils.rb +25 -0
  39. data/lib/aws-sdk-s3/encryption.rb +4 -0
  40. data/lib/aws-sdk-s3/encryptionV2/client.rb +566 -0
  41. data/lib/aws-sdk-s3/encryptionV2/decrypt_handler.rb +222 -0
  42. data/lib/aws-sdk-s3/encryptionV2/default_cipher_provider.rb +170 -0
  43. data/lib/aws-sdk-s3/encryptionV2/default_key_provider.rb +40 -0
  44. data/lib/aws-sdk-s3/encryptionV2/encrypt_handler.rb +65 -0
  45. data/lib/aws-sdk-s3/encryptionV2/errors.rb +37 -0
  46. data/lib/aws-sdk-s3/encryptionV2/io_auth_decrypter.rb +58 -0
  47. data/lib/aws-sdk-s3/encryptionV2/io_decrypter.rb +37 -0
  48. data/lib/aws-sdk-s3/encryptionV2/io_encrypter.rb +73 -0
  49. data/lib/aws-sdk-s3/encryptionV2/key_provider.rb +31 -0
  50. data/lib/aws-sdk-s3/encryptionV2/kms_cipher_provider.rb +169 -0
  51. data/lib/aws-sdk-s3/encryptionV2/materials.rb +60 -0
  52. data/lib/aws-sdk-s3/encryptionV2/utils.rb +103 -0
  53. data/lib/aws-sdk-s3/encryption_v2.rb +23 -0
  54. data/lib/aws-sdk-s3/endpoint_parameters.rb +142 -0
  55. data/lib/aws-sdk-s3/endpoint_provider.rb +2020 -0
  56. data/lib/aws-sdk-s3/endpoints.rb +2149 -0
  57. data/lib/aws-sdk-s3/errors.rb +123 -1
  58. data/lib/aws-sdk-s3/event_streams.rb +20 -7
  59. data/lib/aws-sdk-s3/file_downloader.rb +17 -10
  60. data/lib/aws-sdk-s3/file_part.rb +11 -6
  61. data/lib/aws-sdk-s3/file_uploader.rb +33 -14
  62. data/lib/aws-sdk-s3/legacy_signer.rb +17 -25
  63. data/lib/aws-sdk-s3/multipart_file_uploader.rb +78 -19
  64. data/lib/aws-sdk-s3/multipart_stream_uploader.rb +54 -15
  65. data/lib/aws-sdk-s3/multipart_upload.rb +178 -28
  66. data/lib/aws-sdk-s3/multipart_upload_error.rb +2 -0
  67. data/lib/aws-sdk-s3/multipart_upload_part.rb +237 -44
  68. data/lib/aws-sdk-s3/object.rb +897 -154
  69. data/lib/aws-sdk-s3/object_acl.rb +81 -20
  70. data/lib/aws-sdk-s3/object_copier.rb +2 -0
  71. data/lib/aws-sdk-s3/object_multipart_copier.rb +2 -0
  72. data/lib/aws-sdk-s3/object_summary.rb +649 -139
  73. data/lib/aws-sdk-s3/object_version.rb +167 -65
  74. data/lib/aws-sdk-s3/plugins/accelerate.rb +17 -64
  75. data/lib/aws-sdk-s3/plugins/arn.rb +70 -0
  76. data/lib/aws-sdk-s3/plugins/bucket_dns.rb +7 -43
  77. data/lib/aws-sdk-s3/plugins/bucket_name_restrictions.rb +20 -3
  78. data/lib/aws-sdk-s3/plugins/dualstack.rb +7 -50
  79. data/lib/aws-sdk-s3/plugins/endpoints.rb +262 -0
  80. data/lib/aws-sdk-s3/plugins/expect_100_continue.rb +5 -4
  81. data/lib/aws-sdk-s3/plugins/get_bucket_location_fix.rb +3 -1
  82. data/lib/aws-sdk-s3/plugins/http_200_errors.rb +11 -3
  83. data/lib/aws-sdk-s3/plugins/iad_regional_endpoint.rb +44 -0
  84. data/lib/aws-sdk-s3/plugins/location_constraint.rb +2 -0
  85. data/lib/aws-sdk-s3/plugins/md5s.rb +34 -27
  86. data/lib/aws-sdk-s3/plugins/redirects.rb +2 -0
  87. data/lib/aws-sdk-s3/plugins/s3_host_id.rb +2 -0
  88. data/lib/aws-sdk-s3/plugins/s3_signer.rb +55 -92
  89. data/lib/aws-sdk-s3/plugins/skip_whole_multipart_get_checksums.rb +31 -0
  90. data/lib/aws-sdk-s3/plugins/sse_cpk.rb +3 -1
  91. data/lib/aws-sdk-s3/plugins/streaming_retry.rb +139 -0
  92. data/lib/aws-sdk-s3/plugins/url_encoded_keys.rb +2 -0
  93. data/lib/aws-sdk-s3/presigned_post.rb +108 -56
  94. data/lib/aws-sdk-s3/presigner.rb +169 -77
  95. data/lib/aws-sdk-s3/resource.rb +45 -5
  96. data/lib/aws-sdk-s3/types.rb +8564 -3891
  97. data/lib/aws-sdk-s3/waiters.rb +67 -1
  98. data/lib/aws-sdk-s3.rb +16 -6
  99. 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/master/CONTRIBUTING.md
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 Object
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
@@ -46,28 +50,54 @@ module Aws::S3
46
50
  data[:delete_marker]
47
51
  end
48
52
 
53
+ # Indicates that a range of bytes was specified.
49
54
  # @return [String]
50
55
  def accept_ranges
51
56
  data[:accept_ranges]
52
57
  end
53
58
 
54
59
  # If the object expiration is configured (see PUT Bucket lifecycle), the
55
- # response includes this header. It includes the expiry-date and rule-id
56
- # key value pairs providing object expiration information. The value of
57
- # the rule-id is URL encoded.
60
+ # response includes this header. It includes the `expiry-date` and
61
+ # `rule-id` key-value pairs providing object expiration information. The
62
+ # value of the `rule-id` is URL-encoded.
58
63
  # @return [String]
59
64
  def expiration
60
65
  data[:expiration]
61
66
  end
62
67
 
63
- # Provides information about object restoration operation and expiration
64
- # time of the restored object copy.
68
+ # If the object is an archived object (an object whose storage class is
69
+ # GLACIER), the response includes this header if either the archive
70
+ # restoration is in progress (see [RestoreObject][1] or an archive copy
71
+ # is already restored.
72
+ #
73
+ # If an archive copy is already restored, the header value indicates
74
+ # when Amazon S3 is scheduled to delete the object copy. For example:
75
+ #
76
+ # `x-amz-restore: ongoing-request="false", expiry-date="Fri, 21 Dec 2012
77
+ # 00:00:00 GMT"`
78
+ #
79
+ # If the object restoration is in progress, the header returns the value
80
+ # `ongoing-request="true"`.
81
+ #
82
+ # For more information about archiving objects, see [Transitioning
83
+ # Objects: General Considerations][2].
84
+ #
85
+ #
86
+ #
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
65
89
  # @return [String]
66
90
  def restore
67
91
  data[:restore]
68
92
  end
69
93
 
70
- # Last modified date of the object
94
+ # The archive state of the head object.
95
+ # @return [String]
96
+ def archive_status
97
+ data[:archive_status]
98
+ end
99
+
100
+ # Creation date of the object.
71
101
  # @return [Time]
72
102
  def last_modified
73
103
  data[:last_modified]
@@ -79,15 +109,71 @@ module Aws::S3
79
109
  data[:content_length]
80
110
  end
81
111
 
82
- # An ETag is an opaque identifier assigned by a web server to a specific
83
- # version of a resource found at a URL
112
+ # The base64-encoded, 32-bit CRC32 checksum of the object. This will
113
+ # only be present if it was uploaded with the object. With multipart
114
+ # uploads, this may not be a checksum value of the object. For more
115
+ # information about how checksums are calculated with multipart uploads,
116
+ # see [ Checking object integrity][1] in the *Amazon S3 User Guide*.
117
+ #
118
+ #
119
+ #
120
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums
121
+ # @return [String]
122
+ def checksum_crc32
123
+ data[:checksum_crc32]
124
+ end
125
+
126
+ # The base64-encoded, 32-bit CRC32C checksum of the object. This will
127
+ # only be present if it was uploaded with the object. With multipart
128
+ # uploads, this may not be a checksum value of the object. For more
129
+ # information about how checksums are calculated with multipart uploads,
130
+ # see [ Checking object integrity][1] in the *Amazon S3 User Guide*.
131
+ #
132
+ #
133
+ #
134
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums
135
+ # @return [String]
136
+ def checksum_crc32c
137
+ data[:checksum_crc32c]
138
+ end
139
+
140
+ # The base64-encoded, 160-bit SHA-1 digest of the object. This will only
141
+ # be present if it was uploaded with the object. With multipart uploads,
142
+ # this may not be a checksum value of the object. For more information
143
+ # about how checksums are calculated with multipart uploads, see [
144
+ # Checking object integrity][1] in the *Amazon S3 User Guide*.
145
+ #
146
+ #
147
+ #
148
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums
149
+ # @return [String]
150
+ def checksum_sha1
151
+ data[:checksum_sha1]
152
+ end
153
+
154
+ # The base64-encoded, 256-bit SHA-256 digest of the object. This will
155
+ # only be present if it was uploaded with the object. With multipart
156
+ # uploads, this may not be a checksum value of the object. For more
157
+ # information about how checksums are calculated with multipart uploads,
158
+ # see [ Checking object integrity][1] in the *Amazon S3 User Guide*.
159
+ #
160
+ #
161
+ #
162
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums
163
+ # @return [String]
164
+ def checksum_sha256
165
+ data[:checksum_sha256]
166
+ end
167
+
168
+ # An entity tag (ETag) is an opaque identifier assigned by a web server
169
+ # to a specific version of a resource found at a URL.
84
170
  # @return [String]
85
171
  def etag
86
172
  data[:etag]
87
173
  end
88
174
 
89
175
  # This is set to the number of metadata entries not returned in
90
- # x-amz-meta headers. This can happen if you create metadata using an
176
+ # `x-amz-meta` headers. This can happen if you create metadata using an
91
177
  # API like SOAP that supports more flexible metadata than the REST API.
92
178
  # For example, using SOAP, you can create metadata whose values are not
93
179
  # legal HTTP headers.
@@ -153,8 +239,11 @@ module Aws::S3
153
239
  data[:website_redirect_location]
154
240
  end
155
241
 
156
- # The Server-side encryption algorithm used when storing this object in
157
- # S3 (e.g., AES256, aws:kms).
242
+ # If the object is stored using server-side encryption either with an
243
+ # Amazon Web Services KMS key or an Amazon S3-managed encryption key,
244
+ # the response includes this header with the value of the server-side
245
+ # encryption algorithm used when storing this object in Amazon S3 (for
246
+ # example, AES256, aws:kms).
158
247
  # @return [String]
159
248
  def server_side_encryption
160
249
  data[:server_side_encryption]
@@ -175,7 +264,7 @@ module Aws::S3
175
264
  end
176
265
 
177
266
  # If server-side encryption with a customer-provided encryption key was
178
- # requested, the response will include this header to provide round trip
267
+ # requested, the response will include this header to provide round-trip
179
268
  # message integrity verification of the customer-provided encryption
180
269
  # key.
181
270
  # @return [String]
@@ -183,13 +272,30 @@ module Aws::S3
183
272
  data[:sse_customer_key_md5]
184
273
  end
185
274
 
186
- # If present, specifies the ID of the AWS Key Management Service (KMS)
187
- # master encryption key that was used for the object.
275
+ # If present, specifies the ID of the Amazon Web Services Key Management
276
+ # Service (Amazon Web Services KMS) symmetric customer managed key that
277
+ # was used for the object.
188
278
  # @return [String]
189
279
  def ssekms_key_id
190
280
  data[:ssekms_key_id]
191
281
  end
192
282
 
283
+ # Indicates whether the object uses an S3 Bucket Key for server-side
284
+ # encryption with Amazon Web Services KMS (SSE-KMS).
285
+ # @return [Boolean]
286
+ def bucket_key_enabled
287
+ data[:bucket_key_enabled]
288
+ end
289
+
290
+ # Provides storage class information of the object. Amazon S3 returns
291
+ # this header for all objects except for S3 Standard storage class
292
+ # objects.
293
+ #
294
+ # For more information, see [Storage Classes][1].
295
+ #
296
+ #
297
+ #
298
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html
193
299
  # @return [String]
194
300
  def storage_class
195
301
  data[:storage_class]
@@ -202,17 +308,94 @@ module Aws::S3
202
308
  data[:request_charged]
203
309
  end
204
310
 
311
+ # Amazon S3 can return this header if your request involves a bucket
312
+ # that is either a source or a destination in a replication rule.
313
+ #
314
+ # In replication, you have a source bucket on which you configure
315
+ # replication and destination bucket or buckets where Amazon S3 stores
316
+ # object replicas. When you request an object (`GetObject`) or object
317
+ # metadata (`HeadObject`) from these buckets, Amazon S3 will return the
318
+ # `x-amz-replication-status` header in the response as follows:
319
+ #
320
+ # * **If requesting an object from the source bucket**, Amazon S3 will
321
+ # return the `x-amz-replication-status` header if the object in your
322
+ # request is eligible for replication.
323
+ #
324
+ # For example, suppose that in your replication configuration, you
325
+ # specify object prefix `TaxDocs` requesting Amazon S3 to replicate
326
+ # objects with key prefix `TaxDocs`. Any objects you upload with this
327
+ # key name prefix, for example `TaxDocs/document1.pdf`, are eligible
328
+ # for replication. For any object request with this key name prefix,
329
+ # Amazon S3 will return the `x-amz-replication-status` header with
330
+ # value PENDING, COMPLETED or FAILED indicating object replication
331
+ # status.
332
+ #
333
+ # * **If requesting an object from a destination bucket**, Amazon S3
334
+ # will return the `x-amz-replication-status` header with value REPLICA
335
+ # if the object in your request is a replica that Amazon S3 created
336
+ # and there is no replica modification replication in progress.
337
+ #
338
+ # * **When replicating objects to multiple destination buckets**, the
339
+ # `x-amz-replication-status` header acts differently. The header of
340
+ # the source object will only return a value of COMPLETED when
341
+ # replication is successful to all destinations. The header will
342
+ # remain at value PENDING until replication has completed for all
343
+ # destinations. If one or more destinations fails replication the
344
+ # header will return FAILED.
345
+ #
346
+ # For more information, see [Replication][1].
347
+ #
348
+ #
349
+ #
350
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/NotificationHowTo.html
205
351
  # @return [String]
206
352
  def replication_status
207
353
  data[:replication_status]
208
354
  end
209
355
 
210
- # The count of parts this object has.
356
+ # The count of parts this object has. This value is only returned if you
357
+ # specify `partNumber` in your request and the object was uploaded as a
358
+ # multipart upload.
211
359
  # @return [Integer]
212
360
  def parts_count
213
361
  data[:parts_count]
214
362
  end
215
363
 
364
+ # The Object Lock mode, if any, that's in effect for this object. This
365
+ # header is only returned if the requester has the
366
+ # `s3:GetObjectRetention` permission. For more information about S3
367
+ # Object Lock, see [Object Lock][1].
368
+ #
369
+ #
370
+ #
371
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock.html
372
+ # @return [String]
373
+ def object_lock_mode
374
+ data[:object_lock_mode]
375
+ end
376
+
377
+ # The date and time when the Object Lock retention period expires. This
378
+ # header is only returned if the requester has the
379
+ # `s3:GetObjectRetention` permission.
380
+ # @return [Time]
381
+ def object_lock_retain_until_date
382
+ data[:object_lock_retain_until_date]
383
+ end
384
+
385
+ # Specifies whether a legal hold is in effect for this object. This
386
+ # header is only returned if the requester has the
387
+ # `s3:GetObjectLegalHold` permission. This header is not returned if the
388
+ # specified version of this object has never had a legal hold applied.
389
+ # For more information about S3 Object Lock, see [Object Lock][1].
390
+ #
391
+ #
392
+ #
393
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock.html
394
+ # @return [String]
395
+ def object_lock_legal_hold_status
396
+ data[:object_lock_legal_hold_status]
397
+ end
398
+
216
399
  # @!endgroup
217
400
 
218
401
  # @return [Client]
@@ -271,10 +454,10 @@ module Aws::S3
271
454
  # @option options [Proc] :before_attempt
272
455
  # @option options [Proc] :before_wait
273
456
  # @return [Object]
274
- def wait_until_exists(options = {})
457
+ def wait_until_exists(options = {}, &block)
275
458
  options, params = separate_params_and_options(options)
276
459
  waiter = Waiters::ObjectExists.new(options)
277
- yield_waiter_and_warn(waiter, &Proc.new) if block_given?
460
+ yield_waiter_and_warn(waiter, &block) if block_given?
278
461
  waiter.wait(params.merge(bucket: @bucket_name,
279
462
  key: @key))
280
463
  Object.new({
@@ -290,10 +473,10 @@ module Aws::S3
290
473
  # @option options [Proc] :before_attempt
291
474
  # @option options [Proc] :before_wait
292
475
  # @return [Object]
293
- def wait_until_not_exists(options = {})
476
+ def wait_until_not_exists(options = {}, &block)
294
477
  options, params = separate_params_and_options(options)
295
478
  waiter = Waiters::ObjectNotExists.new(options)
296
- yield_waiter_and_warn(waiter, &Proc.new) if block_given?
479
+ yield_waiter_and_warn(waiter, &block) if block_given?
297
480
  waiter.wait(params.merge(bucket: @bucket_name,
298
481
  key: @key))
299
482
  Object.new({
@@ -308,7 +491,8 @@ module Aws::S3
308
491
  # Waiter polls an API operation until a resource enters a desired
309
492
  # state.
310
493
  #
311
- # @note The waiting operation is performed on a copy. The original resource remains unchanged
494
+ # @note The waiting operation is performed on a copy. The original resource
495
+ # remains unchanged.
312
496
  #
313
497
  # ## Basic Usage
314
498
  #
@@ -321,13 +505,15 @@ module Aws::S3
321
505
  #
322
506
  # ## Example
323
507
  #
324
- # instance.wait_until(max_attempts:10, delay:5) {|instance| instance.state.name == 'running' }
508
+ # instance.wait_until(max_attempts:10, delay:5) do |instance|
509
+ # instance.state.name == 'running'
510
+ # end
325
511
  #
326
512
  # ## Configuration
327
513
  #
328
514
  # You can configure the maximum number of polling attempts, and the
329
- # delay (in seconds) between each polling attempt. The waiting condition is set
330
- # by passing a block to {#wait_until}:
515
+ # delay (in seconds) between each polling attempt. The waiting condition is
516
+ # set by passing a block to {#wait_until}:
331
517
  #
332
518
  # # poll for ~25 seconds
333
519
  # resource.wait_until(max_attempts:5,delay:5) {|resource|...}
@@ -358,17 +544,16 @@ module Aws::S3
358
544
  # # resource did not enter the desired state in time
359
545
  # end
360
546
  #
547
+ # @yieldparam [Resource] resource to be used in the waiting condition.
361
548
  #
362
- # @yield param [Resource] resource to be used in the waiting condition
363
- #
364
- # @raise [Aws::Waiters::Errors::FailureStateError] Raised when the waiter terminates
365
- # because the waiter has entered a state that it will not transition
366
- # out of, preventing success.
549
+ # @raise [Aws::Waiters::Errors::FailureStateError] Raised when the waiter
550
+ # terminates because the waiter has entered a state that it will not
551
+ # transition out of, preventing success.
367
552
  #
368
553
  # yet successful.
369
554
  #
370
- # @raise [Aws::Waiters::Errors::UnexpectedError] Raised when an error is encountered
371
- # while polling for a resource that is not expected.
555
+ # @raise [Aws::Waiters::Errors::UnexpectedError] Raised when an error is
556
+ # encountered while polling for a resource that is not expected.
372
557
  #
373
558
  # @raise [NotImplementedError] Raised when the resource does not
374
559
  #
@@ -405,6 +590,7 @@ module Aws::S3
405
590
  # object.copy_from({
406
591
  # acl: "private", # accepts private, public-read, public-read-write, authenticated-read, aws-exec-read, bucket-owner-read, bucket-owner-full-control
407
592
  # cache_control: "CacheControl",
593
+ # checksum_algorithm: "CRC32", # accepts CRC32, CRC32C, SHA1, SHA256
408
594
  # content_disposition: "ContentDisposition",
409
595
  # content_encoding: "ContentEncoding",
410
596
  # content_language: "ContentLanguage",
@@ -425,23 +611,40 @@ module Aws::S3
425
611
  # metadata_directive: "COPY", # accepts COPY, REPLACE
426
612
  # tagging_directive: "COPY", # accepts COPY, REPLACE
427
613
  # server_side_encryption: "AES256", # accepts AES256, aws:kms
428
- # storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA, ONEZONE_IA
614
+ # storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER, DEEP_ARCHIVE, OUTPOSTS, GLACIER_IR
429
615
  # website_redirect_location: "WebsiteRedirectLocation",
430
616
  # sse_customer_algorithm: "SSECustomerAlgorithm",
431
617
  # sse_customer_key: "SSECustomerKey",
432
618
  # sse_customer_key_md5: "SSECustomerKeyMD5",
433
619
  # ssekms_key_id: "SSEKMSKeyId",
620
+ # ssekms_encryption_context: "SSEKMSEncryptionContext",
621
+ # bucket_key_enabled: false,
434
622
  # copy_source_sse_customer_algorithm: "CopySourceSSECustomerAlgorithm",
435
623
  # copy_source_sse_customer_key: "CopySourceSSECustomerKey",
436
624
  # copy_source_sse_customer_key_md5: "CopySourceSSECustomerKeyMD5",
437
625
  # request_payer: "requester", # accepts requester
438
626
  # tagging: "TaggingHeader",
627
+ # object_lock_mode: "GOVERNANCE", # accepts GOVERNANCE, COMPLIANCE
628
+ # object_lock_retain_until_date: Time.now,
629
+ # object_lock_legal_hold_status: "ON", # accepts ON, OFF
630
+ # expected_bucket_owner: "AccountId",
631
+ # expected_source_bucket_owner: "AccountId",
439
632
  # })
440
633
  # @param [Hash] options ({})
441
634
  # @option options [String] :acl
442
635
  # The canned ACL to apply to the object.
636
+ #
637
+ # This action is not supported by Amazon S3 on Outposts.
443
638
  # @option options [String] :cache_control
444
639
  # Specifies caching behavior along the request/reply chain.
640
+ # @option options [String] :checksum_algorithm
641
+ # Indicates the algorithm you want Amazon S3 to use to create the
642
+ # checksum for the object. For more information, see [Checking object
643
+ # integrity][1] in the *Amazon S3 User Guide*.
644
+ #
645
+ #
646
+ #
647
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
445
648
  # @option options [String] :content_disposition
446
649
  # Specifies presentational information for the object.
447
650
  # @option options [String] :content_encoding
@@ -453,8 +656,51 @@ module Aws::S3
453
656
  # @option options [String] :content_type
454
657
  # A standard MIME type describing the format of the object data.
455
658
  # @option options [required, String] :copy_source
456
- # The name of the source bucket and key name of the source object,
457
- # separated by a slash (/). Must be URL-encoded.
659
+ # Specifies the source object for the copy operation. You specify the
660
+ # value in one of two formats, depending on whether you want to access
661
+ # the source object through an [access point][1]\:
662
+ #
663
+ # * For objects not accessed through an access point, specify the name
664
+ # of the source bucket and the key of the source object, separated by
665
+ # a slash (/). For example, to copy the object `reports/january.pdf`
666
+ # from the bucket `awsexamplebucket`, use
667
+ # `awsexamplebucket/reports/january.pdf`. The value must be
668
+ # URL-encoded.
669
+ #
670
+ # * For objects accessed through access points, specify the Amazon
671
+ # Resource Name (ARN) of the object as accessed through the access
672
+ # point, in the format
673
+ # `arn:aws:s3:<Region>:<account-id>:accesspoint/<access-point-name>/object/<key>`.
674
+ # For example, to copy the object `reports/january.pdf` through access
675
+ # point `my-access-point` owned by account `123456789012` in Region
676
+ # `us-west-2`, use the URL encoding of
677
+ # `arn:aws:s3:us-west-2:123456789012:accesspoint/my-access-point/object/reports/january.pdf`.
678
+ # The value must be URL encoded.
679
+ #
680
+ # <note markdown="1"> Amazon S3 supports copy operations using access points only when the
681
+ # source and destination buckets are in the same Amazon Web Services
682
+ # Region.
683
+ #
684
+ # </note>
685
+ #
686
+ # Alternatively, for objects accessed through Amazon S3 on Outposts,
687
+ # specify the ARN of the object as accessed in the format
688
+ # `arn:aws:s3-outposts:<Region>:<account-id>:outpost/<outpost-id>/object/<key>`.
689
+ # For example, to copy the object `reports/january.pdf` through
690
+ # outpost `my-outpost` owned by account `123456789012` in Region
691
+ # `us-west-2`, use the URL encoding of
692
+ # `arn:aws:s3-outposts:us-west-2:123456789012:outpost/my-outpost/object/reports/january.pdf`.
693
+ # The value must be URL-encoded.
694
+ #
695
+ # To copy a specific version of an object, append
696
+ # `?versionId=<version-id>` to the value (for example,
697
+ # `awsexamplebucket/reports/january.pdf?versionId=QUpfdndhfd8438MNFDN93jdnJFkdmqnh893`).
698
+ # If you don't specify a version ID, Amazon S3 copies the latest
699
+ # version of the source object.
700
+ #
701
+ #
702
+ #
703
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/access-points.html
458
704
  # @option options [String] :copy_source_if_match
459
705
  # Copies the object if its entity tag (ETag) matches the specified tag.
460
706
  # @option options [Time,DateTime,Date,Integer,String] :copy_source_if_modified_since
@@ -470,12 +716,20 @@ module Aws::S3
470
716
  # @option options [String] :grant_full_control
471
717
  # Gives the grantee READ, READ\_ACP, and WRITE\_ACP permissions on the
472
718
  # object.
719
+ #
720
+ # This action is not supported by Amazon S3 on Outposts.
473
721
  # @option options [String] :grant_read
474
722
  # Allows grantee to read the object data and its metadata.
723
+ #
724
+ # This action is not supported by Amazon S3 on Outposts.
475
725
  # @option options [String] :grant_read_acp
476
726
  # Allows grantee to read the object ACL.
727
+ #
728
+ # This action is not supported by Amazon S3 on Outposts.
477
729
  # @option options [String] :grant_write_acp
478
730
  # Allows grantee to write the ACL for the applicable object.
731
+ #
732
+ # This action is not supported by Amazon S3 on Outposts.
479
733
  # @option options [Hash<String,String>] :metadata
480
734
  # A map of metadata to store with the object in S3.
481
735
  # @option options [String] :metadata_directive
@@ -485,36 +739,63 @@ module Aws::S3
485
739
  # Specifies whether the object tag-set are copied from the source object
486
740
  # or replaced with tag-set provided in the request.
487
741
  # @option options [String] :server_side_encryption
488
- # The Server-side encryption algorithm used when storing this object in
489
- # S3 (e.g., AES256, aws:kms).
742
+ # The server-side encryption algorithm used when storing this object in
743
+ # Amazon S3 (for example, AES256, aws:kms).
490
744
  # @option options [String] :storage_class
491
- # The type of storage to use for the object. Defaults to 'STANDARD'.
745
+ # By default, Amazon S3 uses the STANDARD Storage Class to store newly
746
+ # created objects. The STANDARD storage class provides high durability
747
+ # and high availability. Depending on performance needs, you can specify
748
+ # a different Storage Class. Amazon S3 on Outposts only uses the
749
+ # OUTPOSTS Storage Class. For more information, see [Storage Classes][1]
750
+ # in the *Amazon S3 User Guide*.
751
+ #
752
+ #
753
+ #
754
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html
492
755
  # @option options [String] :website_redirect_location
493
756
  # If the bucket is configured as a website, redirects requests for this
494
757
  # object to another object in the same bucket or to an external URL.
495
758
  # Amazon S3 stores the value of this header in the object metadata.
496
759
  # @option options [String] :sse_customer_algorithm
497
- # Specifies the algorithm to use to when encrypting the object (e.g.,
498
- # AES256).
760
+ # Specifies the algorithm to use to when encrypting the object (for
761
+ # example, AES256).
499
762
  # @option options [String] :sse_customer_key
500
763
  # Specifies the customer-provided encryption key for Amazon S3 to use in
501
764
  # encrypting data. This value is used to store the object and then it is
502
- # discarded; Amazon does not store the encryption key. The key must be
503
- # appropriate for use with the algorithm specified in the
504
- # x-amz-server-side​-encryption​-customer-algorithm header.
765
+ # discarded; Amazon S3 does not store the encryption key. The key must
766
+ # be appropriate for use with the algorithm specified in the
767
+ # `x-amz-server-side-encryption-customer-algorithm` header.
505
768
  # @option options [String] :sse_customer_key_md5
506
769
  # Specifies the 128-bit MD5 digest of the encryption key according to
507
770
  # RFC 1321. Amazon S3 uses this header for a message integrity check to
508
- # ensure the encryption key was transmitted without error.
771
+ # ensure that the encryption key was transmitted without error.
509
772
  # @option options [String] :ssekms_key_id
510
- # Specifies the AWS KMS key ID to use for object encryption. All GET and
511
- # PUT requests for an object protected by AWS KMS will fail if not made
512
- # via SSL or using SigV4. Documentation on configuring any of the
513
- # officially supported AWS SDKs and CLI can be found at
514
- # http://docs.aws.amazon.com/AmazonS3/latest/dev/UsingAWSSDK.html#specify-signature-version
773
+ # Specifies the Amazon Web Services KMS key ID to use for object
774
+ # encryption. All GET and PUT requests for an object protected by Amazon
775
+ # Web Services KMS will fail if not made via SSL or using SigV4. For
776
+ # information about configuring using any of the officially supported
777
+ # Amazon Web Services SDKs and Amazon Web Services CLI, see [Specifying
778
+ # the Signature Version in Request Authentication][1] in the *Amazon S3
779
+ # User Guide*.
780
+ #
781
+ #
782
+ #
783
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingAWSSDK.html#specify-signature-version
784
+ # @option options [String] :ssekms_encryption_context
785
+ # Specifies the Amazon Web Services KMS Encryption Context to use for
786
+ # object encryption. The value of this header is a base64-encoded UTF-8
787
+ # string holding JSON with the encryption context key-value pairs.
788
+ # @option options [Boolean] :bucket_key_enabled
789
+ # Specifies whether Amazon S3 should use an S3 Bucket Key for object
790
+ # encryption with server-side encryption using AWS KMS (SSE-KMS).
791
+ # Setting this header to `true` causes Amazon S3 to use an S3 Bucket Key
792
+ # for object encryption with SSE-KMS.
793
+ #
794
+ # Specifying this header with a COPY action doesn’t affect bucket-level
795
+ # settings for S3 Bucket Key.
515
796
  # @option options [String] :copy_source_sse_customer_algorithm
516
- # Specifies the algorithm to use when decrypting the source object
517
- # (e.g., AES256).
797
+ # Specifies the algorithm to use when decrypting the source object (for
798
+ # example, AES256).
518
799
  # @option options [String] :copy_source_sse_customer_key
519
800
  # Specifies the customer-provided encryption key for Amazon S3 to use to
520
801
  # decrypt the source object. The encryption key provided in this header
@@ -522,17 +803,36 @@ module Aws::S3
522
803
  # @option options [String] :copy_source_sse_customer_key_md5
523
804
  # Specifies the 128-bit MD5 digest of the encryption key according to
524
805
  # RFC 1321. Amazon S3 uses this header for a message integrity check to
525
- # ensure the encryption key was transmitted without error.
806
+ # ensure that the encryption key was transmitted without error.
526
807
  # @option options [String] :request_payer
527
- # Confirms that the requester knows that she or he will be charged for
528
- # the request. Bucket owners need not specify this parameter in their
529
- # requests. Documentation on downloading objects from requester pays
530
- # buckets can be found at
531
- # http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
808
+ # Confirms that the requester knows that they will be charged for the
809
+ # request. Bucket owners need not specify this parameter in their
810
+ # requests. For information about downloading objects from Requester
811
+ # Pays buckets, see [Downloading Objects in Requester Pays Buckets][1]
812
+ # in the *Amazon S3 User Guide*.
813
+ #
814
+ #
815
+ #
816
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
532
817
  # @option options [String] :tagging
533
818
  # The tag-set for the object destination object this value must be used
534
- # in conjunction with the TaggingDirective. The tag-set must be encoded
535
- # as URL Query parameters
819
+ # in conjunction with the `TaggingDirective`. The tag-set must be
820
+ # encoded as URL Query parameters.
821
+ # @option options [String] :object_lock_mode
822
+ # The Object Lock mode that you want to apply to the copied object.
823
+ # @option options [Time,DateTime,Date,Integer,String] :object_lock_retain_until_date
824
+ # The date and time when you want the copied object's Object Lock to
825
+ # expire.
826
+ # @option options [String] :object_lock_legal_hold_status
827
+ # Specifies whether you want to apply a legal hold to the copied object.
828
+ # @option options [String] :expected_bucket_owner
829
+ # The account ID of the expected destination bucket owner. If the
830
+ # destination bucket is owned by a different account, the request fails
831
+ # with the HTTP status code `403 Forbidden` (access denied).
832
+ # @option options [String] :expected_source_bucket_owner
833
+ # The account ID of the expected source bucket owner. If the source
834
+ # bucket is owned by a different account, the request fails with the
835
+ # HTTP status code `403 Forbidden` (access denied).
536
836
  # @return [Types::CopyObjectOutput]
537
837
  def copy_from(options = {})
538
838
  options = options.merge(
@@ -549,19 +849,35 @@ module Aws::S3
549
849
  # mfa: "MFA",
550
850
  # version_id: "ObjectVersionId",
551
851
  # request_payer: "requester", # accepts requester
852
+ # bypass_governance_retention: false,
853
+ # expected_bucket_owner: "AccountId",
552
854
  # })
553
855
  # @param [Hash] options ({})
554
856
  # @option options [String] :mfa
555
857
  # The concatenation of the authentication device's serial number, a
556
858
  # space, and the value that is displayed on your authentication device.
859
+ # Required to permanently delete a versioned object if versioning is
860
+ # configured with MFA delete enabled.
557
861
  # @option options [String] :version_id
558
862
  # VersionId used to reference a specific version of the object.
559
863
  # @option options [String] :request_payer
560
- # Confirms that the requester knows that she or he will be charged for
561
- # the request. Bucket owners need not specify this parameter in their
562
- # requests. Documentation on downloading objects from requester pays
563
- # buckets can be found at
564
- # http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
864
+ # Confirms that the requester knows that they will be charged for the
865
+ # request. Bucket owners need not specify this parameter in their
866
+ # requests. For information about downloading objects from Requester
867
+ # Pays buckets, see [Downloading Objects in Requester Pays Buckets][1]
868
+ # in the *Amazon S3 User Guide*.
869
+ #
870
+ #
871
+ #
872
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
873
+ # @option options [Boolean] :bypass_governance_retention
874
+ # Indicates whether S3 Object Lock should bypass Governance-mode
875
+ # restrictions to process this operation. To use this header, you must
876
+ # have the `s3:BypassGovernanceRetention` permission.
877
+ # @option options [String] :expected_bucket_owner
878
+ # The account ID of the expected bucket owner. If the bucket is owned by
879
+ # a different account, the request fails with the HTTP status code `403
880
+ # Forbidden` (access denied).
565
881
  # @return [Types::DeleteObjectOutput]
566
882
  def delete(options = {})
567
883
  options = options.merge(
@@ -592,62 +908,83 @@ module Aws::S3
592
908
  # sse_customer_key_md5: "SSECustomerKeyMD5",
593
909
  # request_payer: "requester", # accepts requester
594
910
  # part_number: 1,
911
+ # expected_bucket_owner: "AccountId",
912
+ # checksum_mode: "ENABLED", # accepts ENABLED
595
913
  # })
596
914
  # @param [Hash] options ({})
597
915
  # @option options [String] :if_match
598
916
  # Return the object only if its entity tag (ETag) is the same as the one
599
- # specified, otherwise return a 412 (precondition failed).
917
+ # specified; otherwise, return a 412 (precondition failed) error.
600
918
  # @option options [Time,DateTime,Date,Integer,String] :if_modified_since
601
919
  # Return the object only if it has been modified since the specified
602
- # time, otherwise return a 304 (not modified).
920
+ # time; otherwise, return a 304 (not modified) error.
603
921
  # @option options [String] :if_none_match
604
922
  # Return the object only if its entity tag (ETag) is different from the
605
- # one specified, otherwise return a 304 (not modified).
923
+ # one specified; otherwise, return a 304 (not modified) error.
606
924
  # @option options [Time,DateTime,Date,Integer,String] :if_unmodified_since
607
925
  # Return the object only if it has not been modified since the specified
608
- # time, otherwise return a 412 (precondition failed).
926
+ # time; otherwise, return a 412 (precondition failed) error.
609
927
  # @option options [String] :range
610
928
  # Downloads the specified range bytes of an object. For more information
611
- # about the HTTP Range header, go to
612
- # http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.35.
929
+ # about the HTTP Range header, see
930
+ # [https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.35][1].
931
+ #
932
+ # <note markdown="1"> Amazon S3 doesn't support retrieving multiple ranges of data per
933
+ # `GET` request.
934
+ #
935
+ # </note>
936
+ #
937
+ #
938
+ #
939
+ # [1]: https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.35
613
940
  # @option options [String] :response_cache_control
614
- # Sets the Cache-Control header of the response.
941
+ # Sets the `Cache-Control` header of the response.
615
942
  # @option options [String] :response_content_disposition
616
- # Sets the Content-Disposition header of the response
943
+ # Sets the `Content-Disposition` header of the response
617
944
  # @option options [String] :response_content_encoding
618
- # Sets the Content-Encoding header of the response.
945
+ # Sets the `Content-Encoding` header of the response.
619
946
  # @option options [String] :response_content_language
620
- # Sets the Content-Language header of the response.
947
+ # Sets the `Content-Language` header of the response.
621
948
  # @option options [String] :response_content_type
622
- # Sets the Content-Type header of the response.
949
+ # Sets the `Content-Type` header of the response.
623
950
  # @option options [Time,DateTime,Date,Integer,String] :response_expires
624
- # Sets the Expires header of the response.
951
+ # Sets the `Expires` header of the response.
625
952
  # @option options [String] :version_id
626
953
  # VersionId used to reference a specific version of the object.
627
954
  # @option options [String] :sse_customer_algorithm
628
- # Specifies the algorithm to use to when encrypting the object (e.g.,
629
- # AES256).
955
+ # Specifies the algorithm to use to when decrypting the object (for
956
+ # example, AES256).
630
957
  # @option options [String] :sse_customer_key
631
- # Specifies the customer-provided encryption key for Amazon S3 to use in
632
- # encrypting data. This value is used to store the object and then it is
633
- # discarded; Amazon does not store the encryption key. The key must be
634
- # appropriate for use with the algorithm specified in the
635
- # x-amz-server-side​-encryption​-customer-algorithm header.
958
+ # Specifies the customer-provided encryption key for Amazon S3 used to
959
+ # encrypt the data. This value is used to decrypt the object when
960
+ # recovering it and must match the one used when storing the data. The
961
+ # key must be appropriate for use with the algorithm specified in the
962
+ # `x-amz-server-side-encryption-customer-algorithm` header.
636
963
  # @option options [String] :sse_customer_key_md5
637
964
  # Specifies the 128-bit MD5 digest of the encryption key according to
638
965
  # RFC 1321. Amazon S3 uses this header for a message integrity check to
639
- # ensure the encryption key was transmitted without error.
966
+ # ensure that the encryption key was transmitted without error.
640
967
  # @option options [String] :request_payer
641
- # Confirms that the requester knows that she or he will be charged for
642
- # the request. Bucket owners need not specify this parameter in their
643
- # requests. Documentation on downloading objects from requester pays
644
- # buckets can be found at
645
- # http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
968
+ # Confirms that the requester knows that they will be charged for the
969
+ # request. Bucket owners need not specify this parameter in their
970
+ # requests. For information about downloading objects from Requester
971
+ # Pays buckets, see [Downloading Objects in Requester Pays Buckets][1]
972
+ # in the *Amazon S3 User Guide*.
973
+ #
974
+ #
975
+ #
976
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
646
977
  # @option options [Integer] :part_number
647
978
  # Part number of the object being read. This is a positive integer
648
979
  # between 1 and 10,000. Effectively performs a 'ranged' GET request
649
980
  # for the part specified. Useful for downloading just a part of an
650
981
  # object.
982
+ # @option options [String] :expected_bucket_owner
983
+ # The account ID of the expected bucket owner. If the bucket is owned by
984
+ # a different account, the request fails with the HTTP status code `403
985
+ # Forbidden` (access denied).
986
+ # @option options [String] :checksum_mode
987
+ # To retrieve the checksum, this mode must be enabled.
651
988
  # @return [Types::GetObjectOutput]
652
989
  def get(options = {}, &block)
653
990
  options = options.merge(
@@ -676,18 +1013,27 @@ module Aws::S3
676
1013
  # "MetadataKey" => "MetadataValue",
677
1014
  # },
678
1015
  # server_side_encryption: "AES256", # accepts AES256, aws:kms
679
- # storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA, ONEZONE_IA
1016
+ # storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER, DEEP_ARCHIVE, OUTPOSTS, GLACIER_IR
680
1017
  # website_redirect_location: "WebsiteRedirectLocation",
681
1018
  # sse_customer_algorithm: "SSECustomerAlgorithm",
682
1019
  # sse_customer_key: "SSECustomerKey",
683
1020
  # sse_customer_key_md5: "SSECustomerKeyMD5",
684
1021
  # ssekms_key_id: "SSEKMSKeyId",
1022
+ # ssekms_encryption_context: "SSEKMSEncryptionContext",
1023
+ # bucket_key_enabled: false,
685
1024
  # request_payer: "requester", # accepts requester
686
1025
  # tagging: "TaggingHeader",
1026
+ # object_lock_mode: "GOVERNANCE", # accepts GOVERNANCE, COMPLIANCE
1027
+ # object_lock_retain_until_date: Time.now,
1028
+ # object_lock_legal_hold_status: "ON", # accepts ON, OFF
1029
+ # expected_bucket_owner: "AccountId",
1030
+ # checksum_algorithm: "CRC32", # accepts CRC32, CRC32C, SHA1, SHA256
687
1031
  # })
688
1032
  # @param [Hash] options ({})
689
1033
  # @option options [String] :acl
690
1034
  # The canned ACL to apply to the object.
1035
+ #
1036
+ # This action is not supported by Amazon S3 on Outposts.
691
1037
  # @option options [String] :cache_control
692
1038
  # Specifies caching behavior along the request/reply chain.
693
1039
  # @option options [String] :content_disposition
@@ -705,51 +1051,110 @@ module Aws::S3
705
1051
  # @option options [String] :grant_full_control
706
1052
  # Gives the grantee READ, READ\_ACP, and WRITE\_ACP permissions on the
707
1053
  # object.
1054
+ #
1055
+ # This action is not supported by Amazon S3 on Outposts.
708
1056
  # @option options [String] :grant_read
709
1057
  # Allows grantee to read the object data and its metadata.
1058
+ #
1059
+ # This action is not supported by Amazon S3 on Outposts.
710
1060
  # @option options [String] :grant_read_acp
711
1061
  # Allows grantee to read the object ACL.
1062
+ #
1063
+ # This action is not supported by Amazon S3 on Outposts.
712
1064
  # @option options [String] :grant_write_acp
713
1065
  # Allows grantee to write the ACL for the applicable object.
1066
+ #
1067
+ # This action is not supported by Amazon S3 on Outposts.
714
1068
  # @option options [Hash<String,String>] :metadata
715
1069
  # A map of metadata to store with the object in S3.
716
1070
  # @option options [String] :server_side_encryption
717
- # The Server-side encryption algorithm used when storing this object in
718
- # S3 (e.g., AES256, aws:kms).
1071
+ # The server-side encryption algorithm used when storing this object in
1072
+ # Amazon S3 (for example, AES256, aws:kms).
719
1073
  # @option options [String] :storage_class
720
- # The type of storage to use for the object. Defaults to 'STANDARD'.
1074
+ # By default, Amazon S3 uses the STANDARD Storage Class to store newly
1075
+ # created objects. The STANDARD storage class provides high durability
1076
+ # and high availability. Depending on performance needs, you can specify
1077
+ # a different Storage Class. Amazon S3 on Outposts only uses the
1078
+ # OUTPOSTS Storage Class. For more information, see [Storage Classes][1]
1079
+ # in the *Amazon S3 User Guide*.
1080
+ #
1081
+ #
1082
+ #
1083
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html
721
1084
  # @option options [String] :website_redirect_location
722
1085
  # If the bucket is configured as a website, redirects requests for this
723
1086
  # object to another object in the same bucket or to an external URL.
724
1087
  # Amazon S3 stores the value of this header in the object metadata.
725
1088
  # @option options [String] :sse_customer_algorithm
726
- # Specifies the algorithm to use to when encrypting the object (e.g.,
727
- # AES256).
1089
+ # Specifies the algorithm to use to when encrypting the object (for
1090
+ # example, AES256).
728
1091
  # @option options [String] :sse_customer_key
729
1092
  # Specifies the customer-provided encryption key for Amazon S3 to use in
730
1093
  # encrypting data. This value is used to store the object and then it is
731
- # discarded; Amazon does not store the encryption key. The key must be
732
- # appropriate for use with the algorithm specified in the
733
- # x-amz-server-side​-encryption​-customer-algorithm header.
1094
+ # discarded; Amazon S3 does not store the encryption key. The key must
1095
+ # be appropriate for use with the algorithm specified in the
1096
+ # `x-amz-server-side-encryption-customer-algorithm` header.
734
1097
  # @option options [String] :sse_customer_key_md5
735
1098
  # Specifies the 128-bit MD5 digest of the encryption key according to
736
1099
  # RFC 1321. Amazon S3 uses this header for a message integrity check to
737
- # ensure the encryption key was transmitted without error.
1100
+ # ensure that the encryption key was transmitted without error.
738
1101
  # @option options [String] :ssekms_key_id
739
- # Specifies the AWS KMS key ID to use for object encryption. All GET and
740
- # PUT requests for an object protected by AWS KMS will fail if not made
741
- # via SSL or using SigV4. Documentation on configuring any of the
742
- # officially supported AWS SDKs and CLI can be found at
743
- # http://docs.aws.amazon.com/AmazonS3/latest/dev/UsingAWSSDK.html#specify-signature-version
1102
+ # Specifies the ID of the symmetric customer managed key to use for
1103
+ # object encryption. All GET and PUT requests for an object protected by
1104
+ # Amazon Web Services KMS will fail if not made via SSL or using SigV4.
1105
+ # For information about configuring using any of the officially
1106
+ # supported Amazon Web Services SDKs and Amazon Web Services CLI, see
1107
+ # [Specifying the Signature Version in Request Authentication][1] in the
1108
+ # *Amazon S3 User Guide*.
1109
+ #
1110
+ #
1111
+ #
1112
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingAWSSDK.html#specify-signature-version
1113
+ # @option options [String] :ssekms_encryption_context
1114
+ # Specifies the Amazon Web Services KMS Encryption Context to use for
1115
+ # object encryption. The value of this header is a base64-encoded UTF-8
1116
+ # string holding JSON with the encryption context key-value pairs.
1117
+ # @option options [Boolean] :bucket_key_enabled
1118
+ # Specifies whether Amazon S3 should use an S3 Bucket Key for object
1119
+ # encryption with server-side encryption using AWS KMS (SSE-KMS).
1120
+ # Setting this header to `true` causes Amazon S3 to use an S3 Bucket Key
1121
+ # for object encryption with SSE-KMS.
1122
+ #
1123
+ # Specifying this header with an object action doesn’t affect
1124
+ # bucket-level settings for S3 Bucket Key.
744
1125
  # @option options [String] :request_payer
745
- # Confirms that the requester knows that she or he will be charged for
746
- # the request. Bucket owners need not specify this parameter in their
747
- # requests. Documentation on downloading objects from requester pays
748
- # buckets can be found at
749
- # http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
1126
+ # Confirms that the requester knows that they will be charged for the
1127
+ # request. Bucket owners need not specify this parameter in their
1128
+ # requests. For information about downloading objects from Requester
1129
+ # Pays buckets, see [Downloading Objects in Requester Pays Buckets][1]
1130
+ # in the *Amazon S3 User Guide*.
1131
+ #
1132
+ #
1133
+ #
1134
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
750
1135
  # @option options [String] :tagging
751
1136
  # The tag-set for the object. The tag-set must be encoded as URL Query
752
- # parameters
1137
+ # parameters.
1138
+ # @option options [String] :object_lock_mode
1139
+ # Specifies the Object Lock mode that you want to apply to the uploaded
1140
+ # object.
1141
+ # @option options [Time,DateTime,Date,Integer,String] :object_lock_retain_until_date
1142
+ # Specifies the date and time when you want the Object Lock to expire.
1143
+ # @option options [String] :object_lock_legal_hold_status
1144
+ # Specifies whether you want to apply a legal hold to the uploaded
1145
+ # object.
1146
+ # @option options [String] :expected_bucket_owner
1147
+ # The account ID of the expected bucket owner. If the bucket is owned by
1148
+ # a different account, the request fails with the HTTP status code `403
1149
+ # Forbidden` (access denied).
1150
+ # @option options [String] :checksum_algorithm
1151
+ # Indicates the algorithm you want Amazon S3 to use to create the
1152
+ # checksum for the object. For more information, see [Checking object
1153
+ # integrity][1] in the *Amazon S3 User Guide*.
1154
+ #
1155
+ #
1156
+ #
1157
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
753
1158
  # @return [MultipartUpload]
754
1159
  def initiate_multipart_upload(options = {})
755
1160
  options = options.merge(
@@ -777,6 +1182,11 @@ module Aws::S3
777
1182
  # content_length: 1,
778
1183
  # content_md5: "ContentMD5",
779
1184
  # content_type: "ContentType",
1185
+ # checksum_algorithm: "CRC32", # accepts CRC32, CRC32C, SHA1, SHA256
1186
+ # checksum_crc32: "ChecksumCRC32",
1187
+ # checksum_crc32c: "ChecksumCRC32C",
1188
+ # checksum_sha1: "ChecksumSHA1",
1189
+ # checksum_sha256: "ChecksumSHA256",
780
1190
  # expires: Time.now,
781
1191
  # grant_full_control: "GrantFullControl",
782
1192
  # grant_read: "GrantRead",
@@ -786,87 +1196,273 @@ module Aws::S3
786
1196
  # "MetadataKey" => "MetadataValue",
787
1197
  # },
788
1198
  # server_side_encryption: "AES256", # accepts AES256, aws:kms
789
- # storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA, ONEZONE_IA
1199
+ # storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER, DEEP_ARCHIVE, OUTPOSTS, GLACIER_IR
790
1200
  # website_redirect_location: "WebsiteRedirectLocation",
791
1201
  # sse_customer_algorithm: "SSECustomerAlgorithm",
792
1202
  # sse_customer_key: "SSECustomerKey",
793
1203
  # sse_customer_key_md5: "SSECustomerKeyMD5",
794
1204
  # ssekms_key_id: "SSEKMSKeyId",
1205
+ # ssekms_encryption_context: "SSEKMSEncryptionContext",
1206
+ # bucket_key_enabled: false,
795
1207
  # request_payer: "requester", # accepts requester
796
1208
  # tagging: "TaggingHeader",
1209
+ # object_lock_mode: "GOVERNANCE", # accepts GOVERNANCE, COMPLIANCE
1210
+ # object_lock_retain_until_date: Time.now,
1211
+ # object_lock_legal_hold_status: "ON", # accepts ON, OFF
1212
+ # expected_bucket_owner: "AccountId",
797
1213
  # })
798
1214
  # @param [Hash] options ({})
799
1215
  # @option options [String] :acl
800
- # The canned ACL to apply to the object.
801
- # @option options [String, IO] :body
1216
+ # The canned ACL to apply to the object. For more information, see
1217
+ # [Canned ACL][1].
1218
+ #
1219
+ # This action is not supported by Amazon S3 on Outposts.
1220
+ #
1221
+ #
1222
+ #
1223
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#CannedACL
1224
+ # @option options [String, StringIO, File] :body
802
1225
  # Object data.
803
1226
  # @option options [String] :cache_control
804
- # Specifies caching behavior along the request/reply chain.
1227
+ # Can be used to specify caching behavior along the request/reply chain.
1228
+ # For more information, see
1229
+ # [http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9][1].
1230
+ #
1231
+ #
1232
+ #
1233
+ # [1]: http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9
805
1234
  # @option options [String] :content_disposition
806
- # Specifies presentational information for the object.
1235
+ # Specifies presentational information for the object. For more
1236
+ # information, see
1237
+ # [http://www.w3.org/Protocols/rfc2616/rfc2616-sec19.html#sec19.5.1][1].
1238
+ #
1239
+ #
1240
+ #
1241
+ # [1]: http://www.w3.org/Protocols/rfc2616/rfc2616-sec19.html#sec19.5.1
807
1242
  # @option options [String] :content_encoding
808
1243
  # Specifies what content encodings have been applied to the object and
809
1244
  # thus what decoding mechanisms must be applied to obtain the media-type
810
- # referenced by the Content-Type header field.
1245
+ # referenced by the Content-Type header field. For more information, see
1246
+ # [http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.11][1].
1247
+ #
1248
+ #
1249
+ #
1250
+ # [1]: http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.11
811
1251
  # @option options [String] :content_language
812
1252
  # The language the content is in.
813
1253
  # @option options [Integer] :content_length
814
1254
  # Size of the body in bytes. This parameter is useful when the size of
815
- # the body cannot be determined automatically.
1255
+ # the body cannot be determined automatically. For more information, see
1256
+ # [http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.13][1].
1257
+ #
1258
+ #
1259
+ #
1260
+ # [1]: http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.13
816
1261
  # @option options [String] :content_md5
817
- # The base64-encoded 128-bit MD5 digest of the part data.
1262
+ # The base64-encoded 128-bit MD5 digest of the message (without the
1263
+ # headers) according to RFC 1864. This header can be used as a message
1264
+ # integrity check to verify that the data is the same data that was
1265
+ # originally sent. Although it is optional, we recommend using the
1266
+ # Content-MD5 mechanism as an end-to-end integrity check. For more
1267
+ # information about REST request authentication, see [REST
1268
+ # Authentication][1].
1269
+ #
1270
+ #
1271
+ #
1272
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/RESTAuthentication.html
818
1273
  # @option options [String] :content_type
819
- # A standard MIME type describing the format of the object data.
1274
+ # A standard MIME type describing the format of the contents. For more
1275
+ # information, see
1276
+ # [http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.17][1].
1277
+ #
1278
+ #
1279
+ #
1280
+ # [1]: http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.17
1281
+ # @option options [String] :checksum_algorithm
1282
+ # Indicates the algorithm used to create the checksum for the object
1283
+ # when using the SDK. This header will not provide any additional
1284
+ # functionality if not using the SDK. When sending this header, there
1285
+ # must be a corresponding `x-amz-checksum` or `x-amz-trailer` header
1286
+ # sent. Otherwise, Amazon S3 fails the request with the HTTP status code
1287
+ # `400 Bad Request`. For more information, see [Checking object
1288
+ # integrity][1] in the *Amazon S3 User Guide*.
1289
+ #
1290
+ # If you provide an individual checksum, Amazon S3 ignores any provided
1291
+ # `ChecksumAlgorithm` parameter.
1292
+ #
1293
+ #
1294
+ #
1295
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
1296
+ # @option options [String] :checksum_crc32
1297
+ # This header can be used as a data integrity check to verify that the
1298
+ # data received is the same data that was originally sent. This header
1299
+ # specifies the base64-encoded, 32-bit CRC32 checksum of the object. For
1300
+ # more information, see [Checking object integrity][1] in the *Amazon S3
1301
+ # User Guide*.
1302
+ #
1303
+ #
1304
+ #
1305
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
1306
+ # @option options [String] :checksum_crc32c
1307
+ # This header can be used as a data integrity check to verify that the
1308
+ # data received is the same data that was originally sent. This header
1309
+ # specifies the base64-encoded, 32-bit CRC32C checksum of the object.
1310
+ # For more information, see [Checking object integrity][1] in the
1311
+ # *Amazon S3 User Guide*.
1312
+ #
1313
+ #
1314
+ #
1315
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
1316
+ # @option options [String] :checksum_sha1
1317
+ # This header can be used as a data integrity check to verify that the
1318
+ # data received is the same data that was originally sent. This header
1319
+ # specifies the base64-encoded, 160-bit SHA-1 digest of the object. For
1320
+ # more information, see [Checking object integrity][1] in the *Amazon S3
1321
+ # User Guide*.
1322
+ #
1323
+ #
1324
+ #
1325
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
1326
+ # @option options [String] :checksum_sha256
1327
+ # This header can be used as a data integrity check to verify that the
1328
+ # data received is the same data that was originally sent. This header
1329
+ # specifies the base64-encoded, 256-bit SHA-256 digest of the object.
1330
+ # For more information, see [Checking object integrity][1] in the
1331
+ # *Amazon S3 User Guide*.
1332
+ #
1333
+ #
1334
+ #
1335
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
820
1336
  # @option options [Time,DateTime,Date,Integer,String] :expires
821
- # The date and time at which the object is no longer cacheable.
1337
+ # The date and time at which the object is no longer cacheable. For more
1338
+ # information, see
1339
+ # [http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.21][1].
1340
+ #
1341
+ #
1342
+ #
1343
+ # [1]: http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.21
822
1344
  # @option options [String] :grant_full_control
823
1345
  # Gives the grantee READ, READ\_ACP, and WRITE\_ACP permissions on the
824
1346
  # object.
1347
+ #
1348
+ # This action is not supported by Amazon S3 on Outposts.
825
1349
  # @option options [String] :grant_read
826
1350
  # Allows grantee to read the object data and its metadata.
1351
+ #
1352
+ # This action is not supported by Amazon S3 on Outposts.
827
1353
  # @option options [String] :grant_read_acp
828
1354
  # Allows grantee to read the object ACL.
1355
+ #
1356
+ # This action is not supported by Amazon S3 on Outposts.
829
1357
  # @option options [String] :grant_write_acp
830
1358
  # Allows grantee to write the ACL for the applicable object.
1359
+ #
1360
+ # This action is not supported by Amazon S3 on Outposts.
831
1361
  # @option options [Hash<String,String>] :metadata
832
1362
  # A map of metadata to store with the object in S3.
833
1363
  # @option options [String] :server_side_encryption
834
- # The Server-side encryption algorithm used when storing this object in
835
- # S3 (e.g., AES256, aws:kms).
1364
+ # The server-side encryption algorithm used when storing this object in
1365
+ # Amazon S3 (for example, AES256, aws:kms).
836
1366
  # @option options [String] :storage_class
837
- # The type of storage to use for the object. Defaults to 'STANDARD'.
1367
+ # By default, Amazon S3 uses the STANDARD Storage Class to store newly
1368
+ # created objects. The STANDARD storage class provides high durability
1369
+ # and high availability. Depending on performance needs, you can specify
1370
+ # a different Storage Class. Amazon S3 on Outposts only uses the
1371
+ # OUTPOSTS Storage Class. For more information, see [Storage Classes][1]
1372
+ # in the *Amazon S3 User Guide*.
1373
+ #
1374
+ #
1375
+ #
1376
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html
838
1377
  # @option options [String] :website_redirect_location
839
1378
  # If the bucket is configured as a website, redirects requests for this
840
1379
  # object to another object in the same bucket or to an external URL.
841
- # Amazon S3 stores the value of this header in the object metadata.
1380
+ # Amazon S3 stores the value of this header in the object metadata. For
1381
+ # information about object metadata, see [Object Key and Metadata][1].
1382
+ #
1383
+ # In the following example, the request header sets the redirect to an
1384
+ # object (anotherPage.html) in the same bucket:
1385
+ #
1386
+ # `x-amz-website-redirect-location: /anotherPage.html`
1387
+ #
1388
+ # In the following example, the request header sets the object redirect
1389
+ # to another website:
1390
+ #
1391
+ # `x-amz-website-redirect-location: http://www.example.com/`
1392
+ #
1393
+ # For more information about website hosting in Amazon S3, see [Hosting
1394
+ # Websites on Amazon S3][2] and [How to Configure Website Page
1395
+ # Redirects][3].
1396
+ #
1397
+ #
1398
+ #
1399
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingMetadata.html
1400
+ # [2]: https://docs.aws.amazon.com/AmazonS3/latest/dev/WebsiteHosting.html
1401
+ # [3]: https://docs.aws.amazon.com/AmazonS3/latest/dev/how-to-page-redirect.html
842
1402
  # @option options [String] :sse_customer_algorithm
843
- # Specifies the algorithm to use to when encrypting the object (e.g.,
844
- # AES256).
1403
+ # Specifies the algorithm to use to when encrypting the object (for
1404
+ # example, AES256).
845
1405
  # @option options [String] :sse_customer_key
846
1406
  # Specifies the customer-provided encryption key for Amazon S3 to use in
847
1407
  # encrypting data. This value is used to store the object and then it is
848
- # discarded; Amazon does not store the encryption key. The key must be
849
- # appropriate for use with the algorithm specified in the
850
- # x-amz-server-side​-encryption​-customer-algorithm header.
1408
+ # discarded; Amazon S3 does not store the encryption key. The key must
1409
+ # be appropriate for use with the algorithm specified in the
1410
+ # `x-amz-server-side-encryption-customer-algorithm` header.
851
1411
  # @option options [String] :sse_customer_key_md5
852
1412
  # Specifies the 128-bit MD5 digest of the encryption key according to
853
1413
  # RFC 1321. Amazon S3 uses this header for a message integrity check to
854
- # ensure the encryption key was transmitted without error.
1414
+ # ensure that the encryption key was transmitted without error.
855
1415
  # @option options [String] :ssekms_key_id
856
- # Specifies the AWS KMS key ID to use for object encryption. All GET and
857
- # PUT requests for an object protected by AWS KMS will fail if not made
858
- # via SSL or using SigV4. Documentation on configuring any of the
859
- # officially supported AWS SDKs and CLI can be found at
860
- # http://docs.aws.amazon.com/AmazonS3/latest/dev/UsingAWSSDK.html#specify-signature-version
1416
+ # If `x-amz-server-side-encryption` is present and has the value of
1417
+ # `aws:kms`, this header specifies the ID of the Amazon Web Services Key
1418
+ # Management Service (Amazon Web Services KMS) symmetrical customer
1419
+ # managed key that was used for the object. If you specify
1420
+ # `x-amz-server-side-encryption:aws:kms`, but do not provide`
1421
+ # x-amz-server-side-encryption-aws-kms-key-id`, Amazon S3 uses the
1422
+ # Amazon Web Services managed key to protect the data. If the KMS key
1423
+ # does not exist in the same account issuing the command, you must use
1424
+ # the full ARN and not just the ID.
1425
+ # @option options [String] :ssekms_encryption_context
1426
+ # Specifies the Amazon Web Services KMS Encryption Context to use for
1427
+ # object encryption. The value of this header is a base64-encoded UTF-8
1428
+ # string holding JSON with the encryption context key-value pairs.
1429
+ # @option options [Boolean] :bucket_key_enabled
1430
+ # Specifies whether Amazon S3 should use an S3 Bucket Key for object
1431
+ # encryption with server-side encryption using AWS KMS (SSE-KMS).
1432
+ # Setting this header to `true` causes Amazon S3 to use an S3 Bucket Key
1433
+ # for object encryption with SSE-KMS.
1434
+ #
1435
+ # Specifying this header with a PUT action doesn’t affect bucket-level
1436
+ # settings for S3 Bucket Key.
861
1437
  # @option options [String] :request_payer
862
- # Confirms that the requester knows that she or he will be charged for
863
- # the request. Bucket owners need not specify this parameter in their
864
- # requests. Documentation on downloading objects from requester pays
865
- # buckets can be found at
866
- # http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
1438
+ # Confirms that the requester knows that they will be charged for the
1439
+ # request. Bucket owners need not specify this parameter in their
1440
+ # requests. For information about downloading objects from Requester
1441
+ # Pays buckets, see [Downloading Objects in Requester Pays Buckets][1]
1442
+ # in the *Amazon S3 User Guide*.
1443
+ #
1444
+ #
1445
+ #
1446
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
867
1447
  # @option options [String] :tagging
868
1448
  # The tag-set for the object. The tag-set must be encoded as URL Query
869
- # parameters
1449
+ # parameters. (For example, "Key1=Value1")
1450
+ # @option options [String] :object_lock_mode
1451
+ # The Object Lock mode that you want to apply to this object.
1452
+ # @option options [Time,DateTime,Date,Integer,String] :object_lock_retain_until_date
1453
+ # The date and time when you want this object's Object Lock to expire.
1454
+ # Must be formatted as a timestamp parameter.
1455
+ # @option options [String] :object_lock_legal_hold_status
1456
+ # Specifies whether a legal hold will be applied to this object. For
1457
+ # more information about S3 Object Lock, see [Object Lock][1].
1458
+ #
1459
+ #
1460
+ #
1461
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock.html
1462
+ # @option options [String] :expected_bucket_owner
1463
+ # The account ID of the expected bucket owner. If the bucket is owned by
1464
+ # a different account, the request fails with the HTTP status code `403
1465
+ # Forbidden` (access denied).
870
1466
  # @return [Types::PutObjectOutput]
871
1467
  def put(options = {})
872
1468
  options = options.merge(
@@ -958,22 +1554,48 @@ module Aws::S3
958
1554
  # value: "MetadataValue",
959
1555
  # },
960
1556
  # ],
961
- # storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA, ONEZONE_IA
1557
+ # storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER, DEEP_ARCHIVE, OUTPOSTS, GLACIER_IR
962
1558
  # },
963
1559
  # },
964
1560
  # },
965
1561
  # request_payer: "requester", # accepts requester
1562
+ # checksum_algorithm: "CRC32", # accepts CRC32, CRC32C, SHA1, SHA256
1563
+ # expected_bucket_owner: "AccountId",
966
1564
  # })
967
1565
  # @param [Hash] options ({})
968
1566
  # @option options [String] :version_id
1567
+ # VersionId used to reference a specific version of the object.
969
1568
  # @option options [Types::RestoreRequest] :restore_request
970
1569
  # Container for restore job parameters.
971
1570
  # @option options [String] :request_payer
972
- # Confirms that the requester knows that she or he will be charged for
973
- # the request. Bucket owners need not specify this parameter in their
974
- # requests. Documentation on downloading objects from requester pays
975
- # buckets can be found at
976
- # http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
1571
+ # Confirms that the requester knows that they will be charged for the
1572
+ # request. Bucket owners need not specify this parameter in their
1573
+ # requests. For information about downloading objects from Requester
1574
+ # Pays buckets, see [Downloading Objects in Requester Pays Buckets][1]
1575
+ # in the *Amazon S3 User Guide*.
1576
+ #
1577
+ #
1578
+ #
1579
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
1580
+ # @option options [String] :checksum_algorithm
1581
+ # Indicates the algorithm used to create the checksum for the object
1582
+ # when using the SDK. This header will not provide any additional
1583
+ # functionality if not using the SDK. When sending this header, there
1584
+ # must be a corresponding `x-amz-checksum` or `x-amz-trailer` header
1585
+ # sent. Otherwise, Amazon S3 fails the request with the HTTP status code
1586
+ # `400 Bad Request`. For more information, see [Checking object
1587
+ # integrity][1] in the *Amazon S3 User Guide*.
1588
+ #
1589
+ # If you provide an individual checksum, Amazon S3 ignores any provided
1590
+ # `ChecksumAlgorithm` parameter.
1591
+ #
1592
+ #
1593
+ #
1594
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
1595
+ # @option options [String] :expected_bucket_owner
1596
+ # The account ID of the expected bucket owner. If the bucket is owned by
1597
+ # a different account, the request fails with the HTTP status code `403
1598
+ # Forbidden` (access denied).
977
1599
  # @return [Types::RestoreObjectOutput]
978
1600
  def restore_object(options = {})
979
1601
  options = options.merge(
@@ -984,6 +1606,90 @@ module Aws::S3
984
1606
  resp.data
985
1607
  end
986
1608
 
1609
+ # @example Request syntax with placeholder values
1610
+ #
1611
+ # object.head({
1612
+ # if_match: "IfMatch",
1613
+ # if_modified_since: Time.now,
1614
+ # if_none_match: "IfNoneMatch",
1615
+ # if_unmodified_since: Time.now,
1616
+ # range: "Range",
1617
+ # version_id: "ObjectVersionId",
1618
+ # sse_customer_algorithm: "SSECustomerAlgorithm",
1619
+ # sse_customer_key: "SSECustomerKey",
1620
+ # sse_customer_key_md5: "SSECustomerKeyMD5",
1621
+ # request_payer: "requester", # accepts requester
1622
+ # part_number: 1,
1623
+ # expected_bucket_owner: "AccountId",
1624
+ # checksum_mode: "ENABLED", # accepts ENABLED
1625
+ # })
1626
+ # @param [Hash] options ({})
1627
+ # @option options [String] :if_match
1628
+ # Return the object only if its entity tag (ETag) is the same as the one
1629
+ # specified; otherwise, return a 412 (precondition failed) error.
1630
+ # @option options [Time,DateTime,Date,Integer,String] :if_modified_since
1631
+ # Return the object only if it has been modified since the specified
1632
+ # time; otherwise, return a 304 (not modified) error.
1633
+ # @option options [String] :if_none_match
1634
+ # Return the object only if its entity tag (ETag) is different from the
1635
+ # one specified; otherwise, return a 304 (not modified) error.
1636
+ # @option options [Time,DateTime,Date,Integer,String] :if_unmodified_since
1637
+ # Return the object only if it has not been modified since the specified
1638
+ # time; otherwise, return a 412 (precondition failed) error.
1639
+ # @option options [String] :range
1640
+ # Because `HeadObject` returns only the metadata for an object, this
1641
+ # parameter has no effect.
1642
+ # @option options [String] :version_id
1643
+ # VersionId used to reference a specific version of the object.
1644
+ # @option options [String] :sse_customer_algorithm
1645
+ # Specifies the algorithm to use to when encrypting the object (for
1646
+ # example, AES256).
1647
+ # @option options [String] :sse_customer_key
1648
+ # Specifies the customer-provided encryption key for Amazon S3 to use in
1649
+ # encrypting data. This value is used to store the object and then it is
1650
+ # discarded; Amazon S3 does not store the encryption key. The key must
1651
+ # be appropriate for use with the algorithm specified in the
1652
+ # `x-amz-server-side-encryption-customer-algorithm` header.
1653
+ # @option options [String] :sse_customer_key_md5
1654
+ # Specifies the 128-bit MD5 digest of the encryption key according to
1655
+ # RFC 1321. Amazon S3 uses this header for a message integrity check to
1656
+ # ensure that the encryption key was transmitted without error.
1657
+ # @option options [String] :request_payer
1658
+ # Confirms that the requester knows that they will be charged for the
1659
+ # request. Bucket owners need not specify this parameter in their
1660
+ # requests. For information about downloading objects from Requester
1661
+ # Pays buckets, see [Downloading Objects in Requester Pays Buckets][1]
1662
+ # in the *Amazon S3 User Guide*.
1663
+ #
1664
+ #
1665
+ #
1666
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
1667
+ # @option options [Integer] :part_number
1668
+ # Part number of the object being read. This is a positive integer
1669
+ # between 1 and 10,000. Effectively performs a 'ranged' HEAD request
1670
+ # for the part specified. Useful querying about the size of the part and
1671
+ # the number of parts in this object.
1672
+ # @option options [String] :expected_bucket_owner
1673
+ # The account ID of the expected bucket owner. If the bucket is owned by
1674
+ # a different account, the request fails with the HTTP status code `403
1675
+ # Forbidden` (access denied).
1676
+ # @option options [String] :checksum_mode
1677
+ # To retrieve the checksum, this parameter must be enabled.
1678
+ #
1679
+ # In addition, if you enable `ChecksumMode` and the object is encrypted
1680
+ # with Amazon Web Services Key Management Service (Amazon Web Services
1681
+ # KMS), you must have permission to use the `kms:Decrypt` action for the
1682
+ # request to succeed.
1683
+ # @return [Types::HeadObjectOutput]
1684
+ def head(options = {})
1685
+ options = options.merge(
1686
+ bucket: @bucket_name,
1687
+ key: @key
1688
+ )
1689
+ resp = @client.head_object(options)
1690
+ resp.data
1691
+ end
1692
+
987
1693
  # @!group Associations
988
1694
 
989
1695
  # @return [ObjectAcl]
@@ -1061,8 +1767,8 @@ module Aws::S3
1061
1767
 
1062
1768
  def yield_waiter_and_warn(waiter, &block)
1063
1769
  if !@waiter_block_warned
1064
- msg = "pass options to configure the waiter; "
1065
- msg << "yielding the waiter is deprecated"
1770
+ msg = "pass options to configure the waiter; "\
1771
+ "yielding the waiter is deprecated"
1066
1772
  warn(msg)
1067
1773
  @waiter_block_warned = true
1068
1774
  end
@@ -1070,7 +1776,9 @@ module Aws::S3
1070
1776
  end
1071
1777
 
1072
1778
  def separate_params_and_options(options)
1073
- opts = Set.new([:client, :max_attempts, :delay, :before_attempt, :before_wait])
1779
+ opts = Set.new(
1780
+ [:client, :max_attempts, :delay, :before_attempt, :before_wait]
1781
+ )
1074
1782
  waiter_opts = {}
1075
1783
  waiter_params = {}
1076
1784
  options.each_pair do |key, value|
@@ -1093,17 +1801,52 @@ module Aws::S3
1093
1801
  # object.batch_delete!({
1094
1802
  # mfa: "MFA",
1095
1803
  # request_payer: "requester", # accepts requester
1804
+ # bypass_governance_retention: false,
1805
+ # expected_bucket_owner: "AccountId",
1806
+ # checksum_algorithm: "CRC32", # accepts CRC32, CRC32C, SHA1, SHA256
1096
1807
  # })
1097
1808
  # @param options ({})
1098
1809
  # @option options [String] :mfa
1099
1810
  # The concatenation of the authentication device's serial number, a
1100
1811
  # space, and the value that is displayed on your authentication device.
1812
+ # Required to permanently delete a versioned object if versioning is
1813
+ # configured with MFA delete enabled.
1101
1814
  # @option options [String] :request_payer
1102
- # Confirms that the requester knows that she or he will be charged for
1103
- # the request. Bucket owners need not specify this parameter in their
1104
- # requests. Documentation on downloading objects from requester pays
1105
- # buckets can be found at
1106
- # http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
1815
+ # Confirms that the requester knows that they will be charged for the
1816
+ # request. Bucket owners need not specify this parameter in their
1817
+ # requests. For information about downloading objects from Requester
1818
+ # Pays buckets, see [Downloading Objects in Requester Pays Buckets][1]
1819
+ # in the *Amazon S3 User Guide*.
1820
+ #
1821
+ #
1822
+ #
1823
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
1824
+ # @option options [Boolean] :bypass_governance_retention
1825
+ # Specifies whether you want to delete this object even if it has a
1826
+ # Governance-type Object Lock in place. To use this header, you must
1827
+ # have the `s3:BypassGovernanceRetention` permission.
1828
+ # @option options [String] :expected_bucket_owner
1829
+ # The account ID of the expected bucket owner. If the bucket is owned by
1830
+ # a different account, the request fails with the HTTP status code `403
1831
+ # Forbidden` (access denied).
1832
+ # @option options [String] :checksum_algorithm
1833
+ # Indicates the algorithm used to create the checksum for the object
1834
+ # when using the SDK. This header will not provide any additional
1835
+ # functionality if not using the SDK. When sending this header, there
1836
+ # must be a corresponding `x-amz-checksum` or `x-amz-trailer` header
1837
+ # sent. Otherwise, Amazon S3 fails the request with the HTTP status code
1838
+ # `400 Bad Request`. For more information, see [Checking object
1839
+ # integrity][1] in the *Amazon S3 User Guide*.
1840
+ #
1841
+ # If you provide an individual checksum, Amazon S3 ignores any provided
1842
+ # `ChecksumAlgorithm` parameter.
1843
+ #
1844
+ # This checksum algorithm must be the same for all parts and it match
1845
+ # the checksum value supplied in the `CreateMultipartUpload` request.
1846
+ #
1847
+ #
1848
+ #
1849
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
1107
1850
  # @return [void]
1108
1851
  def batch_delete!(options = {})
1109
1852
  batch_enum.each do |batch|