aws-sdk-s3 1.48.0 → 1.113.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (100) hide show
  1. checksums.yaml +5 -5
  2. data/CHANGELOG.md +888 -0
  3. data/LICENSE.txt +202 -0
  4. data/VERSION +1 -0
  5. data/lib/aws-sdk-s3/arn/access_point_arn.rb +69 -0
  6. data/lib/aws-sdk-s3/arn/multi_region_access_point_arn.rb +68 -0
  7. data/lib/aws-sdk-s3/arn/object_lambda_arn.rb +69 -0
  8. data/lib/aws-sdk-s3/arn/outpost_access_point_arn.rb +74 -0
  9. data/lib/aws-sdk-s3/bucket.rb +375 -82
  10. data/lib/aws-sdk-s3/bucket_acl.rb +55 -15
  11. data/lib/aws-sdk-s3/bucket_cors.rb +67 -14
  12. data/lib/aws-sdk-s3/bucket_lifecycle.rb +54 -16
  13. data/lib/aws-sdk-s3/bucket_lifecycle_configuration.rb +56 -16
  14. data/lib/aws-sdk-s3/bucket_logging.rb +52 -13
  15. data/lib/aws-sdk-s3/bucket_notification.rb +43 -17
  16. data/lib/aws-sdk-s3/bucket_policy.rb +51 -13
  17. data/lib/aws-sdk-s3/bucket_region_cache.rb +2 -0
  18. data/lib/aws-sdk-s3/bucket_request_payment.rb +51 -12
  19. data/lib/aws-sdk-s3/bucket_tagging.rb +59 -14
  20. data/lib/aws-sdk-s3/bucket_versioning.rb +118 -12
  21. data/lib/aws-sdk-s3/bucket_website.rb +66 -17
  22. data/lib/aws-sdk-s3/client.rb +8973 -740
  23. data/lib/aws-sdk-s3/client_api.rb +778 -2
  24. data/lib/aws-sdk-s3/customizations/bucket.rb +59 -16
  25. data/lib/aws-sdk-s3/customizations/multipart_upload.rb +2 -0
  26. data/lib/aws-sdk-s3/customizations/object.rb +200 -62
  27. data/lib/aws-sdk-s3/customizations/object_summary.rb +5 -0
  28. data/lib/aws-sdk-s3/customizations/types/list_object_versions_output.rb +2 -0
  29. data/lib/aws-sdk-s3/customizations.rb +4 -1
  30. data/lib/aws-sdk-s3/encryption/client.rb +22 -5
  31. data/lib/aws-sdk-s3/encryption/decrypt_handler.rb +71 -29
  32. data/lib/aws-sdk-s3/encryption/default_cipher_provider.rb +43 -5
  33. data/lib/aws-sdk-s3/encryption/default_key_provider.rb +2 -0
  34. data/lib/aws-sdk-s3/encryption/encrypt_handler.rb +13 -2
  35. data/lib/aws-sdk-s3/encryption/errors.rb +2 -0
  36. data/lib/aws-sdk-s3/encryption/io_auth_decrypter.rb +2 -0
  37. data/lib/aws-sdk-s3/encryption/io_decrypter.rb +11 -3
  38. data/lib/aws-sdk-s3/encryption/io_encrypter.rb +2 -0
  39. data/lib/aws-sdk-s3/encryption/key_provider.rb +2 -0
  40. data/lib/aws-sdk-s3/encryption/kms_cipher_provider.rb +34 -3
  41. data/lib/aws-sdk-s3/encryption/materials.rb +8 -6
  42. data/lib/aws-sdk-s3/encryption/utils.rb +25 -0
  43. data/lib/aws-sdk-s3/encryption.rb +4 -0
  44. data/lib/aws-sdk-s3/encryptionV2/client.rb +566 -0
  45. data/lib/aws-sdk-s3/encryptionV2/decrypt_handler.rb +222 -0
  46. data/lib/aws-sdk-s3/encryptionV2/default_cipher_provider.rb +170 -0
  47. data/lib/aws-sdk-s3/encryptionV2/default_key_provider.rb +40 -0
  48. data/lib/aws-sdk-s3/encryptionV2/encrypt_handler.rb +65 -0
  49. data/lib/aws-sdk-s3/encryptionV2/errors.rb +37 -0
  50. data/lib/aws-sdk-s3/encryptionV2/io_auth_decrypter.rb +58 -0
  51. data/lib/aws-sdk-s3/encryptionV2/io_decrypter.rb +37 -0
  52. data/lib/aws-sdk-s3/encryptionV2/io_encrypter.rb +73 -0
  53. data/lib/aws-sdk-s3/encryptionV2/key_provider.rb +31 -0
  54. data/lib/aws-sdk-s3/encryptionV2/kms_cipher_provider.rb +169 -0
  55. data/lib/aws-sdk-s3/encryptionV2/materials.rb +60 -0
  56. data/lib/aws-sdk-s3/encryptionV2/utils.rb +103 -0
  57. data/lib/aws-sdk-s3/encryption_v2.rb +23 -0
  58. data/lib/aws-sdk-s3/errors.rb +123 -1
  59. data/lib/aws-sdk-s3/event_streams.rb +8 -1
  60. data/lib/aws-sdk-s3/file_downloader.rb +17 -10
  61. data/lib/aws-sdk-s3/file_part.rb +11 -6
  62. data/lib/aws-sdk-s3/file_uploader.rb +33 -14
  63. data/lib/aws-sdk-s3/legacy_signer.rb +17 -25
  64. data/lib/aws-sdk-s3/multipart_file_uploader.rb +78 -19
  65. data/lib/aws-sdk-s3/multipart_stream_uploader.rb +18 -7
  66. data/lib/aws-sdk-s3/multipart_upload.rb +178 -29
  67. data/lib/aws-sdk-s3/multipart_upload_error.rb +2 -0
  68. data/lib/aws-sdk-s3/multipart_upload_part.rb +233 -42
  69. data/lib/aws-sdk-s3/object.rb +846 -179
  70. data/lib/aws-sdk-s3/object_acl.rb +79 -21
  71. data/lib/aws-sdk-s3/object_copier.rb +2 -0
  72. data/lib/aws-sdk-s3/object_multipart_copier.rb +2 -0
  73. data/lib/aws-sdk-s3/object_summary.rb +611 -162
  74. data/lib/aws-sdk-s3/object_version.rb +162 -71
  75. data/lib/aws-sdk-s3/plugins/accelerate.rb +38 -38
  76. data/lib/aws-sdk-s3/plugins/arn.rb +254 -0
  77. data/lib/aws-sdk-s3/plugins/bucket_dns.rb +8 -8
  78. data/lib/aws-sdk-s3/plugins/bucket_name_restrictions.rb +25 -3
  79. data/lib/aws-sdk-s3/plugins/dualstack.rb +38 -33
  80. data/lib/aws-sdk-s3/plugins/expect_100_continue.rb +4 -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 +73 -0
  84. data/lib/aws-sdk-s3/plugins/location_constraint.rb +2 -0
  85. data/lib/aws-sdk-s3/plugins/md5s.rb +34 -30
  86. data/lib/aws-sdk-s3/plugins/object_lambda_endpoint.rb +25 -0
  87. data/lib/aws-sdk-s3/plugins/redirects.rb +2 -0
  88. data/lib/aws-sdk-s3/plugins/s3_host_id.rb +2 -0
  89. data/lib/aws-sdk-s3/plugins/s3_signer.rb +89 -36
  90. data/lib/aws-sdk-s3/plugins/skip_whole_multipart_get_checksums.rb +31 -0
  91. data/lib/aws-sdk-s3/plugins/sse_cpk.rb +3 -1
  92. data/lib/aws-sdk-s3/plugins/streaming_retry.rb +118 -0
  93. data/lib/aws-sdk-s3/plugins/url_encoded_keys.rb +2 -0
  94. data/lib/aws-sdk-s3/presigned_post.rb +110 -51
  95. data/lib/aws-sdk-s3/presigner.rb +133 -45
  96. data/lib/aws-sdk-s3/resource.rb +43 -7
  97. data/lib/aws-sdk-s3/types.rb +8437 -1132
  98. data/lib/aws-sdk-s3/waiters.rb +67 -1
  99. data/lib/aws-sdk-s3.rb +12 -6
  100. metadata +37 -12
@@ -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 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,43 @@ 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
+ # The algorithm that was used to create a checksum of the object.
76
+ # @return [Array<String>]
77
+ def checksum_algorithm
78
+ data[:checksum_algorithm]
79
+ end
80
+
81
+ # Size in bytes of the object
54
82
  # @return [Integer]
55
83
  def size
56
84
  data[:size]
@@ -62,7 +90,7 @@ module Aws::S3
62
90
  data[:storage_class]
63
91
  end
64
92
 
65
-
93
+ # The owner of the object
66
94
  # @return [Types::Owner]
67
95
  def owner
68
96
  data[:owner]
@@ -155,7 +183,8 @@ module Aws::S3
155
183
  # Waiter polls an API operation until a resource enters a desired
156
184
  # state.
157
185
  #
158
- # @note The waiting operation is performed on a copy. The original resource remains unchanged
186
+ # @note The waiting operation is performed on a copy. The original resource
187
+ # remains unchanged.
159
188
  #
160
189
  # ## Basic Usage
161
190
  #
@@ -168,13 +197,15 @@ module Aws::S3
168
197
  #
169
198
  # ## Example
170
199
  #
171
- # instance.wait_until(max_attempts:10, delay:5) {|instance| instance.state.name == 'running' }
200
+ # instance.wait_until(max_attempts:10, delay:5) do |instance|
201
+ # instance.state.name == 'running'
202
+ # end
172
203
  #
173
204
  # ## Configuration
174
205
  #
175
206
  # You can configure the maximum number of polling attempts, and the
176
- # delay (in seconds) between each polling attempt. The waiting condition is set
177
- # by passing a block to {#wait_until}:
207
+ # delay (in seconds) between each polling attempt. The waiting condition is
208
+ # set by passing a block to {#wait_until}:
178
209
  #
179
210
  # # poll for ~25 seconds
180
211
  # resource.wait_until(max_attempts:5,delay:5) {|resource|...}
@@ -205,17 +236,16 @@ module Aws::S3
205
236
  # # resource did not enter the desired state in time
206
237
  # end
207
238
  #
239
+ # @yieldparam [Resource] resource to be used in the waiting condition.
208
240
  #
209
- # @yield param [Resource] resource to be used in the waiting condition
210
- #
211
- # @raise [Aws::Waiters::Errors::FailureStateError] Raised when the waiter terminates
212
- # because the waiter has entered a state that it will not transition
213
- # out of, preventing success.
241
+ # @raise [Aws::Waiters::Errors::FailureStateError] Raised when the waiter
242
+ # terminates because the waiter has entered a state that it will not
243
+ # transition out of, preventing success.
214
244
  #
215
245
  # yet successful.
216
246
  #
217
- # @raise [Aws::Waiters::Errors::UnexpectedError] Raised when an error is encountered
218
- # while polling for a resource that is not expected.
247
+ # @raise [Aws::Waiters::Errors::UnexpectedError] Raised when an error is
248
+ # encountered while polling for a resource that is not expected.
219
249
  #
220
250
  # @raise [NotImplementedError] Raised when the resource does not
221
251
  #
@@ -252,6 +282,7 @@ module Aws::S3
252
282
  # object_summary.copy_from({
253
283
  # acl: "private", # accepts private, public-read, public-read-write, authenticated-read, aws-exec-read, bucket-owner-read, bucket-owner-full-control
254
284
  # cache_control: "CacheControl",
285
+ # checksum_algorithm: "CRC32", # accepts CRC32, CRC32C, SHA1, SHA256
255
286
  # content_disposition: "ContentDisposition",
256
287
  # content_encoding: "ContentEncoding",
257
288
  # content_language: "ContentLanguage",
@@ -272,13 +303,14 @@ module Aws::S3
272
303
  # metadata_directive: "COPY", # accepts COPY, REPLACE
273
304
  # tagging_directive: "COPY", # accepts COPY, REPLACE
274
305
  # server_side_encryption: "AES256", # accepts AES256, aws:kms
275
- # storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER, DEEP_ARCHIVE
306
+ # storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER, DEEP_ARCHIVE, OUTPOSTS, GLACIER_IR
276
307
  # website_redirect_location: "WebsiteRedirectLocation",
277
308
  # sse_customer_algorithm: "SSECustomerAlgorithm",
278
309
  # sse_customer_key: "SSECustomerKey",
279
310
  # sse_customer_key_md5: "SSECustomerKeyMD5",
280
311
  # ssekms_key_id: "SSEKMSKeyId",
281
312
  # ssekms_encryption_context: "SSEKMSEncryptionContext",
313
+ # bucket_key_enabled: false,
282
314
  # copy_source_sse_customer_algorithm: "CopySourceSSECustomerAlgorithm",
283
315
  # copy_source_sse_customer_key: "CopySourceSSECustomerKey",
284
316
  # copy_source_sse_customer_key_md5: "CopySourceSSECustomerKeyMD5",
@@ -287,12 +319,24 @@ module Aws::S3
287
319
  # object_lock_mode: "GOVERNANCE", # accepts GOVERNANCE, COMPLIANCE
288
320
  # object_lock_retain_until_date: Time.now,
289
321
  # object_lock_legal_hold_status: "ON", # accepts ON, OFF
322
+ # expected_bucket_owner: "AccountId",
323
+ # expected_source_bucket_owner: "AccountId",
290
324
  # })
291
325
  # @param [Hash] options ({})
292
326
  # @option options [String] :acl
293
327
  # The canned ACL to apply to the object.
328
+ #
329
+ # This action is not supported by Amazon S3 on Outposts.
294
330
  # @option options [String] :cache_control
295
331
  # Specifies caching behavior along the request/reply chain.
332
+ # @option options [String] :checksum_algorithm
333
+ # Indicates the algorithm you want Amazon S3 to use to create the
334
+ # checksum for the object. For more information, see [Checking object
335
+ # integrity][1] in the *Amazon S3 User Guide*.
336
+ #
337
+ #
338
+ #
339
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
296
340
  # @option options [String] :content_disposition
297
341
  # Specifies presentational information for the object.
298
342
  # @option options [String] :content_encoding
@@ -304,8 +348,51 @@ module Aws::S3
304
348
  # @option options [String] :content_type
305
349
  # A standard MIME type describing the format of the object data.
306
350
  # @option options [required, String] :copy_source
307
- # The name of the source bucket and key name of the source object,
308
- # separated by a slash (/). Must be URL-encoded.
351
+ # Specifies the source object for the copy operation. You specify the
352
+ # value in one of two formats, depending on whether you want to access
353
+ # the source object through an [access point][1]\:
354
+ #
355
+ # * For objects not accessed through an access point, specify the name
356
+ # of the source bucket and the key of the source object, separated by
357
+ # a slash (/). For example, to copy the object `reports/january.pdf`
358
+ # from the bucket `awsexamplebucket`, use
359
+ # `awsexamplebucket/reports/january.pdf`. The value must be
360
+ # URL-encoded.
361
+ #
362
+ # * For objects accessed through access points, specify the Amazon
363
+ # Resource Name (ARN) of the object as accessed through the access
364
+ # point, in the format
365
+ # `arn:aws:s3:<Region>:<account-id>:accesspoint/<access-point-name>/object/<key>`.
366
+ # For example, to copy the object `reports/january.pdf` through access
367
+ # point `my-access-point` owned by account `123456789012` in Region
368
+ # `us-west-2`, use the URL encoding of
369
+ # `arn:aws:s3:us-west-2:123456789012:accesspoint/my-access-point/object/reports/january.pdf`.
370
+ # The value must be URL encoded.
371
+ #
372
+ # <note markdown="1"> Amazon S3 supports copy operations using access points only when the
373
+ # source and destination buckets are in the same Amazon Web Services
374
+ # Region.
375
+ #
376
+ # </note>
377
+ #
378
+ # Alternatively, for objects accessed through Amazon S3 on Outposts,
379
+ # specify the ARN of the object as accessed in the format
380
+ # `arn:aws:s3-outposts:<Region>:<account-id>:outpost/<outpost-id>/object/<key>`.
381
+ # For example, to copy the object `reports/january.pdf` through
382
+ # outpost `my-outpost` owned by account `123456789012` in Region
383
+ # `us-west-2`, use the URL encoding of
384
+ # `arn:aws:s3-outposts:us-west-2:123456789012:outpost/my-outpost/object/reports/january.pdf`.
385
+ # The value must be URL-encoded.
386
+ #
387
+ # To copy a specific version of an object, append
388
+ # `?versionId=<version-id>` to the value (for example,
389
+ # `awsexamplebucket/reports/january.pdf?versionId=QUpfdndhfd8438MNFDN93jdnJFkdmqnh893`).
390
+ # If you don't specify a version ID, Amazon S3 copies the latest
391
+ # version of the source object.
392
+ #
393
+ #
394
+ #
395
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/access-points.html
309
396
  # @option options [String] :copy_source_if_match
310
397
  # Copies the object if its entity tag (ETag) matches the specified tag.
311
398
  # @option options [Time,DateTime,Date,Integer,String] :copy_source_if_modified_since
@@ -321,12 +408,20 @@ module Aws::S3
321
408
  # @option options [String] :grant_full_control
322
409
  # Gives the grantee READ, READ\_ACP, and WRITE\_ACP permissions on the
323
410
  # object.
411
+ #
412
+ # This action is not supported by Amazon S3 on Outposts.
324
413
  # @option options [String] :grant_read
325
414
  # Allows grantee to read the object data and its metadata.
415
+ #
416
+ # This action is not supported by Amazon S3 on Outposts.
326
417
  # @option options [String] :grant_read_acp
327
418
  # Allows grantee to read the object ACL.
419
+ #
420
+ # This action is not supported by Amazon S3 on Outposts.
328
421
  # @option options [String] :grant_write_acp
329
422
  # Allows grantee to write the ACL for the applicable object.
423
+ #
424
+ # This action is not supported by Amazon S3 on Outposts.
330
425
  # @option options [Hash<String,String>] :metadata
331
426
  # A map of metadata to store with the object in S3.
332
427
  # @option options [String] :metadata_directive
@@ -336,40 +431,63 @@ module Aws::S3
336
431
  # Specifies whether the object tag-set are copied from the source object
337
432
  # or replaced with tag-set provided in the request.
338
433
  # @option options [String] :server_side_encryption
339
- # The Server-side encryption algorithm used when storing this object in
340
- # S3 (e.g., AES256, aws:kms).
434
+ # The server-side encryption algorithm used when storing this object in
435
+ # Amazon S3 (for example, AES256, aws:kms).
341
436
  # @option options [String] :storage_class
342
- # The type of storage to use for the object. Defaults to 'STANDARD'.
437
+ # By default, Amazon S3 uses the STANDARD Storage Class to store newly
438
+ # created objects. The STANDARD storage class provides high durability
439
+ # and high availability. Depending on performance needs, you can specify
440
+ # a different Storage Class. Amazon S3 on Outposts only uses the
441
+ # OUTPOSTS Storage Class. For more information, see [Storage Classes][1]
442
+ # in the *Amazon S3 User Guide*.
443
+ #
444
+ #
445
+ #
446
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html
343
447
  # @option options [String] :website_redirect_location
344
448
  # If the bucket is configured as a website, redirects requests for this
345
449
  # object to another object in the same bucket or to an external URL.
346
450
  # Amazon S3 stores the value of this header in the object metadata.
347
451
  # @option options [String] :sse_customer_algorithm
348
- # Specifies the algorithm to use to when encrypting the object (e.g.,
349
- # AES256).
452
+ # Specifies the algorithm to use to when encrypting the object (for
453
+ # example, AES256).
350
454
  # @option options [String] :sse_customer_key
351
455
  # Specifies the customer-provided encryption key for Amazon S3 to use in
352
456
  # encrypting data. This value is used to store the object and then it is
353
- # discarded; Amazon does not store the encryption key. The key must be
354
- # appropriate for use with the algorithm specified in the
355
- # x-amz-server-side​-encryption​-customer-algorithm header.
457
+ # discarded; Amazon S3 does not store the encryption key. The key must
458
+ # be appropriate for use with the algorithm specified in the
459
+ # `x-amz-server-side-encryption-customer-algorithm` header.
356
460
  # @option options [String] :sse_customer_key_md5
357
461
  # Specifies the 128-bit MD5 digest of the encryption key according to
358
462
  # RFC 1321. Amazon S3 uses this header for a message integrity check to
359
- # ensure the encryption key was transmitted without error.
463
+ # ensure that the encryption key was transmitted without error.
360
464
  # @option options [String] :ssekms_key_id
361
- # Specifies the AWS KMS key ID to use for object encryption. All GET and
362
- # PUT requests for an object protected by AWS KMS will fail if not made
363
- # via SSL or using SigV4. Documentation on configuring any of the
364
- # officially supported AWS SDKs and CLI can be found at
365
- # http://docs.aws.amazon.com/AmazonS3/latest/dev/UsingAWSSDK.html#specify-signature-version
465
+ # Specifies the Amazon Web Services KMS key ID to use for object
466
+ # encryption. All GET and PUT requests for an object protected by Amazon
467
+ # Web Services KMS will fail if not made via SSL or using SigV4. For
468
+ # information about configuring using any of the officially supported
469
+ # Amazon Web Services SDKs and Amazon Web Services CLI, see [Specifying
470
+ # the Signature Version in Request Authentication][1] in the *Amazon S3
471
+ # User Guide*.
472
+ #
473
+ #
474
+ #
475
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingAWSSDK.html#specify-signature-version
366
476
  # @option options [String] :ssekms_encryption_context
367
- # Specifies the AWS KMS Encryption Context to use for object encryption.
368
- # The value of this header is a base64-encoded UTF-8 string holding JSON
369
- # with the encryption context key-value pairs.
477
+ # Specifies the Amazon Web Services KMS Encryption Context to use for
478
+ # object encryption. The value of this header is a base64-encoded UTF-8
479
+ # string holding JSON with the encryption context key-value pairs.
480
+ # @option options [Boolean] :bucket_key_enabled
481
+ # Specifies whether Amazon S3 should use an S3 Bucket Key for object
482
+ # encryption with server-side encryption using AWS KMS (SSE-KMS).
483
+ # Setting this header to `true` causes Amazon S3 to use an S3 Bucket Key
484
+ # for object encryption with SSE-KMS.
485
+ #
486
+ # Specifying this header with a COPY action doesn’t affect bucket-level
487
+ # settings for S3 Bucket Key.
370
488
  # @option options [String] :copy_source_sse_customer_algorithm
371
- # Specifies the algorithm to use when decrypting the source object
372
- # (e.g., AES256).
489
+ # Specifies the algorithm to use when decrypting the source object (for
490
+ # example, AES256).
373
491
  # @option options [String] :copy_source_sse_customer_key
374
492
  # Specifies the customer-provided encryption key for Amazon S3 to use to
375
493
  # decrypt the source object. The encryption key provided in this header
@@ -377,24 +495,36 @@ module Aws::S3
377
495
  # @option options [String] :copy_source_sse_customer_key_md5
378
496
  # Specifies the 128-bit MD5 digest of the encryption key according to
379
497
  # RFC 1321. Amazon S3 uses this header for a message integrity check to
380
- # ensure the encryption key was transmitted without error.
498
+ # ensure that the encryption key was transmitted without error.
381
499
  # @option options [String] :request_payer
382
- # Confirms that the requester knows that she or he will be charged for
383
- # the request. Bucket owners need not specify this parameter in their
384
- # requests. Documentation on downloading objects from requester pays
385
- # buckets can be found at
386
- # http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
500
+ # Confirms that the requester knows that they will be charged for the
501
+ # request. Bucket owners need not specify this parameter in their
502
+ # requests. For information about downloading objects from Requester
503
+ # Pays buckets, see [Downloading Objects in Requester Pays Buckets][1]
504
+ # in the *Amazon S3 User Guide*.
505
+ #
506
+ #
507
+ #
508
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
387
509
  # @option options [String] :tagging
388
510
  # The tag-set for the object destination object this value must be used
389
- # in conjunction with the TaggingDirective. The tag-set must be encoded
390
- # as URL Query parameters
511
+ # in conjunction with the `TaggingDirective`. The tag-set must be
512
+ # encoded as URL Query parameters.
391
513
  # @option options [String] :object_lock_mode
392
- # The object lock mode that you want to apply to the copied object.
514
+ # The Object Lock mode that you want to apply to the copied object.
393
515
  # @option options [Time,DateTime,Date,Integer,String] :object_lock_retain_until_date
394
- # The date and time when you want the copied object's object lock to
516
+ # The date and time when you want the copied object's Object Lock to
395
517
  # expire.
396
518
  # @option options [String] :object_lock_legal_hold_status
397
- # Specifies whether you want to apply a Legal Hold to the copied object.
519
+ # Specifies whether you want to apply a legal hold to the copied object.
520
+ # @option options [String] :expected_bucket_owner
521
+ # The account ID of the expected destination bucket owner. If the
522
+ # destination bucket is owned by a different account, the request fails
523
+ # with the HTTP status code `403 Forbidden` (access denied).
524
+ # @option options [String] :expected_source_bucket_owner
525
+ # The account ID of the expected source bucket owner. If the source
526
+ # bucket is owned by a different account, the request fails with the
527
+ # HTTP status code `403 Forbidden` (access denied).
398
528
  # @return [Types::CopyObjectOutput]
399
529
  def copy_from(options = {})
400
530
  options = options.merge(
@@ -412,22 +542,34 @@ module Aws::S3
412
542
  # version_id: "ObjectVersionId",
413
543
  # request_payer: "requester", # accepts requester
414
544
  # bypass_governance_retention: false,
545
+ # expected_bucket_owner: "AccountId",
415
546
  # })
416
547
  # @param [Hash] options ({})
417
548
  # @option options [String] :mfa
418
549
  # The concatenation of the authentication device's serial number, a
419
550
  # space, and the value that is displayed on your authentication device.
551
+ # Required to permanently delete a versioned object if versioning is
552
+ # configured with MFA delete enabled.
420
553
  # @option options [String] :version_id
421
554
  # VersionId used to reference a specific version of the object.
422
555
  # @option options [String] :request_payer
423
- # Confirms that the requester knows that she or he will be charged for
424
- # the request. Bucket owners need not specify this parameter in their
425
- # requests. Documentation on downloading objects from requester pays
426
- # buckets can be found at
427
- # http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
556
+ # Confirms that the requester knows that they will be charged for the
557
+ # request. Bucket owners need not specify this parameter in their
558
+ # requests. For information about downloading objects from Requester
559
+ # Pays buckets, see [Downloading Objects in Requester Pays Buckets][1]
560
+ # in the *Amazon S3 User Guide*.
561
+ #
562
+ #
563
+ #
564
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
428
565
  # @option options [Boolean] :bypass_governance_retention
429
- # Indicates whether Amazon S3 object lock should bypass governance-mode
430
- # restrictions to process this operation.
566
+ # Indicates whether S3 Object Lock should bypass Governance-mode
567
+ # restrictions to process this operation. To use this header, you must
568
+ # have the `s3:BypassGovernanceRetention` permission.
569
+ # @option options [String] :expected_bucket_owner
570
+ # The account ID of the expected bucket owner. If the bucket is owned by
571
+ # a different account, the request fails with the HTTP status code `403
572
+ # Forbidden` (access denied).
431
573
  # @return [Types::DeleteObjectOutput]
432
574
  def delete(options = {})
433
575
  options = options.merge(
@@ -458,62 +600,83 @@ module Aws::S3
458
600
  # sse_customer_key_md5: "SSECustomerKeyMD5",
459
601
  # request_payer: "requester", # accepts requester
460
602
  # part_number: 1,
603
+ # expected_bucket_owner: "AccountId",
604
+ # checksum_mode: "ENABLED", # accepts ENABLED
461
605
  # })
462
606
  # @param [Hash] options ({})
463
607
  # @option options [String] :if_match
464
608
  # Return the object only if its entity tag (ETag) is the same as the one
465
- # specified, otherwise return a 412 (precondition failed).
609
+ # specified; otherwise, return a 412 (precondition failed) error.
466
610
  # @option options [Time,DateTime,Date,Integer,String] :if_modified_since
467
611
  # Return the object only if it has been modified since the specified
468
- # time, otherwise return a 304 (not modified).
612
+ # time; otherwise, return a 304 (not modified) error.
469
613
  # @option options [String] :if_none_match
470
614
  # Return the object only if its entity tag (ETag) is different from the
471
- # one specified, otherwise return a 304 (not modified).
615
+ # one specified; otherwise, return a 304 (not modified) error.
472
616
  # @option options [Time,DateTime,Date,Integer,String] :if_unmodified_since
473
617
  # Return the object only if it has not been modified since the specified
474
- # time, otherwise return a 412 (precondition failed).
618
+ # time; otherwise, return a 412 (precondition failed) error.
475
619
  # @option options [String] :range
476
620
  # Downloads the specified range bytes of an object. For more information
477
- # about the HTTP Range header, go to
478
- # http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.35.
621
+ # about the HTTP Range header, see
622
+ # [https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.35][1].
623
+ #
624
+ # <note markdown="1"> Amazon S3 doesn't support retrieving multiple ranges of data per
625
+ # `GET` request.
626
+ #
627
+ # </note>
628
+ #
629
+ #
630
+ #
631
+ # [1]: https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.35
479
632
  # @option options [String] :response_cache_control
480
- # Sets the Cache-Control header of the response.
633
+ # Sets the `Cache-Control` header of the response.
481
634
  # @option options [String] :response_content_disposition
482
- # Sets the Content-Disposition header of the response
635
+ # Sets the `Content-Disposition` header of the response
483
636
  # @option options [String] :response_content_encoding
484
- # Sets the Content-Encoding header of the response.
637
+ # Sets the `Content-Encoding` header of the response.
485
638
  # @option options [String] :response_content_language
486
- # Sets the Content-Language header of the response.
639
+ # Sets the `Content-Language` header of the response.
487
640
  # @option options [String] :response_content_type
488
- # Sets the Content-Type header of the response.
641
+ # Sets the `Content-Type` header of the response.
489
642
  # @option options [Time,DateTime,Date,Integer,String] :response_expires
490
- # Sets the Expires header of the response.
643
+ # Sets the `Expires` header of the response.
491
644
  # @option options [String] :version_id
492
645
  # VersionId used to reference a specific version of the object.
493
646
  # @option options [String] :sse_customer_algorithm
494
- # Specifies the algorithm to use to when encrypting the object (e.g.,
495
- # AES256).
647
+ # Specifies the algorithm to use to when decrypting the object (for
648
+ # example, AES256).
496
649
  # @option options [String] :sse_customer_key
497
- # Specifies the customer-provided encryption key for Amazon S3 to use in
498
- # encrypting data. This value is used to store the object and then it is
499
- # discarded; Amazon does not store the encryption key. The key must be
500
- # appropriate for use with the algorithm specified in the
501
- # x-amz-server-side​-encryption​-customer-algorithm header.
650
+ # Specifies the customer-provided encryption key for Amazon S3 used to
651
+ # encrypt the data. This value is used to decrypt the object when
652
+ # recovering it and must match the one used when storing the data. The
653
+ # key must be appropriate for use with the algorithm specified in the
654
+ # `x-amz-server-side-encryption-customer-algorithm` header.
502
655
  # @option options [String] :sse_customer_key_md5
503
656
  # Specifies the 128-bit MD5 digest of the encryption key according to
504
657
  # RFC 1321. Amazon S3 uses this header for a message integrity check to
505
- # ensure the encryption key was transmitted without error.
658
+ # ensure that the encryption key was transmitted without error.
506
659
  # @option options [String] :request_payer
507
- # Confirms that the requester knows that she or he will be charged for
508
- # the request. Bucket owners need not specify this parameter in their
509
- # requests. Documentation on downloading objects from requester pays
510
- # buckets can be found at
511
- # http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
660
+ # Confirms that the requester knows that they will be charged for the
661
+ # request. Bucket owners need not specify this parameter in their
662
+ # requests. For information about downloading objects from Requester
663
+ # Pays buckets, see [Downloading Objects in Requester Pays Buckets][1]
664
+ # in the *Amazon S3 User Guide*.
665
+ #
666
+ #
667
+ #
668
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
512
669
  # @option options [Integer] :part_number
513
670
  # Part number of the object being read. This is a positive integer
514
671
  # between 1 and 10,000. Effectively performs a 'ranged' GET request
515
672
  # for the part specified. Useful for downloading just a part of an
516
673
  # object.
674
+ # @option options [String] :expected_bucket_owner
675
+ # The account ID of the expected bucket owner. If the bucket is owned by
676
+ # a different account, the request fails with the HTTP status code `403
677
+ # Forbidden` (access denied).
678
+ # @option options [String] :checksum_mode
679
+ # To retrieve the checksum, this mode must be enabled.
517
680
  # @return [Types::GetObjectOutput]
518
681
  def get(options = {}, &block)
519
682
  options = options.merge(
@@ -542,22 +705,27 @@ module Aws::S3
542
705
  # "MetadataKey" => "MetadataValue",
543
706
  # },
544
707
  # server_side_encryption: "AES256", # accepts AES256, aws:kms
545
- # storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER, DEEP_ARCHIVE
708
+ # storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER, DEEP_ARCHIVE, OUTPOSTS, GLACIER_IR
546
709
  # website_redirect_location: "WebsiteRedirectLocation",
547
710
  # sse_customer_algorithm: "SSECustomerAlgorithm",
548
711
  # sse_customer_key: "SSECustomerKey",
549
712
  # sse_customer_key_md5: "SSECustomerKeyMD5",
550
713
  # ssekms_key_id: "SSEKMSKeyId",
551
714
  # ssekms_encryption_context: "SSEKMSEncryptionContext",
715
+ # bucket_key_enabled: false,
552
716
  # request_payer: "requester", # accepts requester
553
717
  # tagging: "TaggingHeader",
554
718
  # object_lock_mode: "GOVERNANCE", # accepts GOVERNANCE, COMPLIANCE
555
719
  # object_lock_retain_until_date: Time.now,
556
720
  # object_lock_legal_hold_status: "ON", # accepts ON, OFF
721
+ # expected_bucket_owner: "AccountId",
722
+ # checksum_algorithm: "CRC32", # accepts CRC32, CRC32C, SHA1, SHA256
557
723
  # })
558
724
  # @param [Hash] options ({})
559
725
  # @option options [String] :acl
560
726
  # The canned ACL to apply to the object.
727
+ #
728
+ # This action is not supported by Amazon S3 on Outposts.
561
729
  # @option options [String] :cache_control
562
730
  # Specifies caching behavior along the request/reply chain.
563
731
  # @option options [String] :content_disposition
@@ -575,63 +743,110 @@ module Aws::S3
575
743
  # @option options [String] :grant_full_control
576
744
  # Gives the grantee READ, READ\_ACP, and WRITE\_ACP permissions on the
577
745
  # object.
746
+ #
747
+ # This action is not supported by Amazon S3 on Outposts.
578
748
  # @option options [String] :grant_read
579
749
  # Allows grantee to read the object data and its metadata.
750
+ #
751
+ # This action is not supported by Amazon S3 on Outposts.
580
752
  # @option options [String] :grant_read_acp
581
753
  # Allows grantee to read the object ACL.
754
+ #
755
+ # This action is not supported by Amazon S3 on Outposts.
582
756
  # @option options [String] :grant_write_acp
583
757
  # Allows grantee to write the ACL for the applicable object.
758
+ #
759
+ # This action is not supported by Amazon S3 on Outposts.
584
760
  # @option options [Hash<String,String>] :metadata
585
761
  # A map of metadata to store with the object in S3.
586
762
  # @option options [String] :server_side_encryption
587
- # The Server-side encryption algorithm used when storing this object in
588
- # S3 (e.g., AES256, aws:kms).
763
+ # The server-side encryption algorithm used when storing this object in
764
+ # Amazon S3 (for example, AES256, aws:kms).
589
765
  # @option options [String] :storage_class
590
- # The type of storage to use for the object. Defaults to 'STANDARD'.
766
+ # By default, Amazon S3 uses the STANDARD Storage Class to store newly
767
+ # created objects. The STANDARD storage class provides high durability
768
+ # and high availability. Depending on performance needs, you can specify
769
+ # a different Storage Class. Amazon S3 on Outposts only uses the
770
+ # OUTPOSTS Storage Class. For more information, see [Storage Classes][1]
771
+ # in the *Amazon S3 User Guide*.
772
+ #
773
+ #
774
+ #
775
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html
591
776
  # @option options [String] :website_redirect_location
592
777
  # If the bucket is configured as a website, redirects requests for this
593
778
  # object to another object in the same bucket or to an external URL.
594
779
  # Amazon S3 stores the value of this header in the object metadata.
595
780
  # @option options [String] :sse_customer_algorithm
596
- # Specifies the algorithm to use to when encrypting the object (e.g.,
597
- # AES256).
781
+ # Specifies the algorithm to use to when encrypting the object (for
782
+ # example, AES256).
598
783
  # @option options [String] :sse_customer_key
599
784
  # Specifies the customer-provided encryption key for Amazon S3 to use in
600
785
  # encrypting data. This value is used to store the object and then it is
601
- # discarded; Amazon does not store the encryption key. The key must be
602
- # appropriate for use with the algorithm specified in the
603
- # x-amz-server-side​-encryption​-customer-algorithm header.
786
+ # discarded; Amazon S3 does not store the encryption key. The key must
787
+ # be appropriate for use with the algorithm specified in the
788
+ # `x-amz-server-side-encryption-customer-algorithm` header.
604
789
  # @option options [String] :sse_customer_key_md5
605
790
  # Specifies the 128-bit MD5 digest of the encryption key according to
606
791
  # RFC 1321. Amazon S3 uses this header for a message integrity check to
607
- # ensure the encryption key was transmitted without error.
792
+ # ensure that the encryption key was transmitted without error.
608
793
  # @option options [String] :ssekms_key_id
609
- # Specifies the AWS KMS key ID to use for object encryption. All GET and
610
- # PUT requests for an object protected by AWS KMS will fail if not made
611
- # via SSL or using SigV4. Documentation on configuring any of the
612
- # officially supported AWS SDKs and CLI can be found at
613
- # http://docs.aws.amazon.com/AmazonS3/latest/dev/UsingAWSSDK.html#specify-signature-version
794
+ # Specifies the ID of the symmetric customer managed key to use for
795
+ # object encryption. All GET and PUT requests for an object protected by
796
+ # Amazon Web Services KMS will fail if not made via SSL or using SigV4.
797
+ # For information about configuring using any of the officially
798
+ # supported Amazon Web Services SDKs and Amazon Web Services CLI, see
799
+ # [Specifying the Signature Version in Request Authentication][1] in the
800
+ # *Amazon S3 User Guide*.
801
+ #
802
+ #
803
+ #
804
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingAWSSDK.html#specify-signature-version
614
805
  # @option options [String] :ssekms_encryption_context
615
- # Specifies the AWS KMS Encryption Context to use for object encryption.
616
- # The value of this header is a base64-encoded UTF-8 string holding JSON
617
- # with the encryption context key-value pairs.
806
+ # Specifies the Amazon Web Services KMS Encryption Context to use for
807
+ # object encryption. The value of this header is a base64-encoded UTF-8
808
+ # string holding JSON with the encryption context key-value pairs.
809
+ # @option options [Boolean] :bucket_key_enabled
810
+ # Specifies whether Amazon S3 should use an S3 Bucket Key for object
811
+ # encryption with server-side encryption using AWS KMS (SSE-KMS).
812
+ # Setting this header to `true` causes Amazon S3 to use an S3 Bucket Key
813
+ # for object encryption with SSE-KMS.
814
+ #
815
+ # Specifying this header with an object action doesn’t affect
816
+ # bucket-level settings for S3 Bucket Key.
618
817
  # @option options [String] :request_payer
619
- # Confirms that the requester knows that she or he will be charged for
620
- # the request. Bucket owners need not specify this parameter in their
621
- # requests. Documentation on downloading objects from requester pays
622
- # buckets can be found at
623
- # http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
818
+ # Confirms that the requester knows that they will be charged for the
819
+ # request. Bucket owners need not specify this parameter in their
820
+ # requests. For information about downloading objects from Requester
821
+ # Pays buckets, see [Downloading Objects in Requester Pays Buckets][1]
822
+ # in the *Amazon S3 User Guide*.
823
+ #
824
+ #
825
+ #
826
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
624
827
  # @option options [String] :tagging
625
828
  # The tag-set for the object. The tag-set must be encoded as URL Query
626
- # parameters
829
+ # parameters.
627
830
  # @option options [String] :object_lock_mode
628
- # Specifies the object lock mode that you want to apply to the uploaded
831
+ # Specifies the Object Lock mode that you want to apply to the uploaded
629
832
  # object.
630
833
  # @option options [Time,DateTime,Date,Integer,String] :object_lock_retain_until_date
631
- # Specifies the date and time when you want the object lock to expire.
834
+ # Specifies the date and time when you want the Object Lock to expire.
632
835
  # @option options [String] :object_lock_legal_hold_status
633
- # Specifies whether you want to apply a Legal Hold to the uploaded
836
+ # Specifies whether you want to apply a legal hold to the uploaded
634
837
  # object.
838
+ # @option options [String] :expected_bucket_owner
839
+ # The account ID of the expected bucket owner. If the bucket is owned by
840
+ # a different account, the request fails with the HTTP status code `403
841
+ # Forbidden` (access denied).
842
+ # @option options [String] :checksum_algorithm
843
+ # Indicates the algorithm you want Amazon S3 to use to create the
844
+ # checksum for the object. For more information, see [Checking object
845
+ # integrity][1] in the *Amazon S3 User Guide*.
846
+ #
847
+ #
848
+ #
849
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
635
850
  # @return [MultipartUpload]
636
851
  def initiate_multipart_upload(options = {})
637
852
  options = options.merge(
@@ -659,6 +874,11 @@ module Aws::S3
659
874
  # content_length: 1,
660
875
  # content_md5: "ContentMD5",
661
876
  # content_type: "ContentType",
877
+ # checksum_algorithm: "CRC32", # accepts CRC32, CRC32C, SHA1, SHA256
878
+ # checksum_crc32: "ChecksumCRC32",
879
+ # checksum_crc32c: "ChecksumCRC32C",
880
+ # checksum_sha1: "ChecksumSHA1",
881
+ # checksum_sha256: "ChecksumSHA256",
662
882
  # expires: Time.now,
663
883
  # grant_full_control: "GrantFullControl",
664
884
  # grant_read: "GrantRead",
@@ -668,103 +888,273 @@ module Aws::S3
668
888
  # "MetadataKey" => "MetadataValue",
669
889
  # },
670
890
  # server_side_encryption: "AES256", # accepts AES256, aws:kms
671
- # storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER, DEEP_ARCHIVE
891
+ # storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER, DEEP_ARCHIVE, OUTPOSTS, GLACIER_IR
672
892
  # website_redirect_location: "WebsiteRedirectLocation",
673
893
  # sse_customer_algorithm: "SSECustomerAlgorithm",
674
894
  # sse_customer_key: "SSECustomerKey",
675
895
  # sse_customer_key_md5: "SSECustomerKeyMD5",
676
896
  # ssekms_key_id: "SSEKMSKeyId",
677
897
  # ssekms_encryption_context: "SSEKMSEncryptionContext",
898
+ # bucket_key_enabled: false,
678
899
  # request_payer: "requester", # accepts requester
679
900
  # tagging: "TaggingHeader",
680
901
  # object_lock_mode: "GOVERNANCE", # accepts GOVERNANCE, COMPLIANCE
681
902
  # object_lock_retain_until_date: Time.now,
682
903
  # object_lock_legal_hold_status: "ON", # accepts ON, OFF
904
+ # expected_bucket_owner: "AccountId",
683
905
  # })
684
906
  # @param [Hash] options ({})
685
907
  # @option options [String] :acl
686
- # The canned ACL to apply to the object.
687
- # @option options [String, IO] :body
908
+ # The canned ACL to apply to the object. For more information, see
909
+ # [Canned ACL][1].
910
+ #
911
+ # This action is not supported by Amazon S3 on Outposts.
912
+ #
913
+ #
914
+ #
915
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#CannedACL
916
+ # @option options [String, StringIO, File] :body
688
917
  # Object data.
689
918
  # @option options [String] :cache_control
690
- # Specifies caching behavior along the request/reply chain.
919
+ # Can be used to specify caching behavior along the request/reply chain.
920
+ # For more information, see
921
+ # [http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9][1].
922
+ #
923
+ #
924
+ #
925
+ # [1]: http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9
691
926
  # @option options [String] :content_disposition
692
- # Specifies presentational information for the object.
927
+ # Specifies presentational information for the object. For more
928
+ # information, see
929
+ # [http://www.w3.org/Protocols/rfc2616/rfc2616-sec19.html#sec19.5.1][1].
930
+ #
931
+ #
932
+ #
933
+ # [1]: http://www.w3.org/Protocols/rfc2616/rfc2616-sec19.html#sec19.5.1
693
934
  # @option options [String] :content_encoding
694
935
  # Specifies what content encodings have been applied to the object and
695
936
  # thus what decoding mechanisms must be applied to obtain the media-type
696
- # referenced by the Content-Type header field.
937
+ # referenced by the Content-Type header field. For more information, see
938
+ # [http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.11][1].
939
+ #
940
+ #
941
+ #
942
+ # [1]: http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.11
697
943
  # @option options [String] :content_language
698
944
  # The language the content is in.
699
945
  # @option options [Integer] :content_length
700
946
  # Size of the body in bytes. This parameter is useful when the size of
701
- # the body cannot be determined automatically.
947
+ # the body cannot be determined automatically. For more information, see
948
+ # [http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.13][1].
949
+ #
950
+ #
951
+ #
952
+ # [1]: http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.13
702
953
  # @option options [String] :content_md5
703
- # The base64-encoded 128-bit MD5 digest of the part data. This parameter
704
- # is auto-populated when using the command from the CLI. This parameted
705
- # is required if object lock parameters are specified.
954
+ # The base64-encoded 128-bit MD5 digest of the message (without the
955
+ # headers) according to RFC 1864. This header can be used as a message
956
+ # integrity check to verify that the data is the same data that was
957
+ # originally sent. Although it is optional, we recommend using the
958
+ # Content-MD5 mechanism as an end-to-end integrity check. For more
959
+ # information about REST request authentication, see [REST
960
+ # Authentication][1].
961
+ #
962
+ #
963
+ #
964
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/RESTAuthentication.html
706
965
  # @option options [String] :content_type
707
- # A standard MIME type describing the format of the object data.
966
+ # A standard MIME type describing the format of the contents. For more
967
+ # information, see
968
+ # [http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.17][1].
969
+ #
970
+ #
971
+ #
972
+ # [1]: http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.17
973
+ # @option options [String] :checksum_algorithm
974
+ # Indicates the algorithm used to create the checksum for the object
975
+ # when using the SDK. This header will not provide any additional
976
+ # functionality if not using the SDK. When sending this header, there
977
+ # must be a corresponding `x-amz-checksum` or `x-amz-trailer` header
978
+ # sent. Otherwise, Amazon S3 fails the request with the HTTP status code
979
+ # `400 Bad Request`. For more information, see [Checking object
980
+ # integrity][1] in the *Amazon S3 User Guide*.
981
+ #
982
+ # If you provide an individual checksum, Amazon S3 ignores any provided
983
+ # `ChecksumAlgorithm` parameter.
984
+ #
985
+ #
986
+ #
987
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
988
+ # @option options [String] :checksum_crc32
989
+ # This header can be used as a data integrity check to verify that the
990
+ # data received is the same data that was originally sent. This header
991
+ # specifies the base64-encoded, 32-bit CRC32 checksum of the object. For
992
+ # more information, see [Checking object integrity][1] in the *Amazon S3
993
+ # User Guide*.
994
+ #
995
+ #
996
+ #
997
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
998
+ # @option options [String] :checksum_crc32c
999
+ # This header can be used as a data integrity check to verify that the
1000
+ # data received is the same data that was originally sent. This header
1001
+ # specifies the base64-encoded, 32-bit CRC32C checksum of the object.
1002
+ # For more information, see [Checking object integrity][1] in the
1003
+ # *Amazon S3 User Guide*.
1004
+ #
1005
+ #
1006
+ #
1007
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
1008
+ # @option options [String] :checksum_sha1
1009
+ # This header can be used as a data integrity check to verify that the
1010
+ # data received is the same data that was originally sent. This header
1011
+ # specifies the base64-encoded, 160-bit SHA-1 digest of the object. For
1012
+ # more information, see [Checking object integrity][1] in the *Amazon S3
1013
+ # User Guide*.
1014
+ #
1015
+ #
1016
+ #
1017
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
1018
+ # @option options [String] :checksum_sha256
1019
+ # This header can be used as a data integrity check to verify that the
1020
+ # data received is the same data that was originally sent. This header
1021
+ # specifies the base64-encoded, 256-bit SHA-256 digest of the object.
1022
+ # For more information, see [Checking object integrity][1] in the
1023
+ # *Amazon S3 User Guide*.
1024
+ #
1025
+ #
1026
+ #
1027
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
708
1028
  # @option options [Time,DateTime,Date,Integer,String] :expires
709
- # The date and time at which the object is no longer cacheable.
1029
+ # The date and time at which the object is no longer cacheable. For more
1030
+ # information, see
1031
+ # [http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.21][1].
1032
+ #
1033
+ #
1034
+ #
1035
+ # [1]: http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.21
710
1036
  # @option options [String] :grant_full_control
711
1037
  # Gives the grantee READ, READ\_ACP, and WRITE\_ACP permissions on the
712
1038
  # object.
1039
+ #
1040
+ # This action is not supported by Amazon S3 on Outposts.
713
1041
  # @option options [String] :grant_read
714
1042
  # Allows grantee to read the object data and its metadata.
1043
+ #
1044
+ # This action is not supported by Amazon S3 on Outposts.
715
1045
  # @option options [String] :grant_read_acp
716
1046
  # Allows grantee to read the object ACL.
1047
+ #
1048
+ # This action is not supported by Amazon S3 on Outposts.
717
1049
  # @option options [String] :grant_write_acp
718
1050
  # Allows grantee to write the ACL for the applicable object.
1051
+ #
1052
+ # This action is not supported by Amazon S3 on Outposts.
719
1053
  # @option options [Hash<String,String>] :metadata
720
1054
  # A map of metadata to store with the object in S3.
721
1055
  # @option options [String] :server_side_encryption
722
- # The Server-side encryption algorithm used when storing this object in
723
- # S3 (e.g., AES256, aws:kms).
1056
+ # The server-side encryption algorithm used when storing this object in
1057
+ # Amazon S3 (for example, AES256, aws:kms).
724
1058
  # @option options [String] :storage_class
725
- # The type of storage to use for the object. Defaults to 'STANDARD'.
1059
+ # By default, Amazon S3 uses the STANDARD Storage Class to store newly
1060
+ # created objects. The STANDARD storage class provides high durability
1061
+ # and high availability. Depending on performance needs, you can specify
1062
+ # a different Storage Class. Amazon S3 on Outposts only uses the
1063
+ # OUTPOSTS Storage Class. For more information, see [Storage Classes][1]
1064
+ # in the *Amazon S3 User Guide*.
1065
+ #
1066
+ #
1067
+ #
1068
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html
726
1069
  # @option options [String] :website_redirect_location
727
1070
  # If the bucket is configured as a website, redirects requests for this
728
1071
  # object to another object in the same bucket or to an external URL.
729
- # Amazon S3 stores the value of this header in the object metadata.
1072
+ # Amazon S3 stores the value of this header in the object metadata. For
1073
+ # information about object metadata, see [Object Key and Metadata][1].
1074
+ #
1075
+ # In the following example, the request header sets the redirect to an
1076
+ # object (anotherPage.html) in the same bucket:
1077
+ #
1078
+ # `x-amz-website-redirect-location: /anotherPage.html`
1079
+ #
1080
+ # In the following example, the request header sets the object redirect
1081
+ # to another website:
1082
+ #
1083
+ # `x-amz-website-redirect-location: http://www.example.com/`
1084
+ #
1085
+ # For more information about website hosting in Amazon S3, see [Hosting
1086
+ # Websites on Amazon S3][2] and [How to Configure Website Page
1087
+ # Redirects][3].
1088
+ #
1089
+ #
1090
+ #
1091
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingMetadata.html
1092
+ # [2]: https://docs.aws.amazon.com/AmazonS3/latest/dev/WebsiteHosting.html
1093
+ # [3]: https://docs.aws.amazon.com/AmazonS3/latest/dev/how-to-page-redirect.html
730
1094
  # @option options [String] :sse_customer_algorithm
731
- # Specifies the algorithm to use to when encrypting the object (e.g.,
732
- # AES256).
1095
+ # Specifies the algorithm to use to when encrypting the object (for
1096
+ # example, AES256).
733
1097
  # @option options [String] :sse_customer_key
734
1098
  # Specifies the customer-provided encryption key for Amazon S3 to use in
735
1099
  # encrypting data. This value is used to store the object and then it is
736
- # discarded; Amazon does not store the encryption key. The key must be
737
- # appropriate for use with the algorithm specified in the
738
- # x-amz-server-side​-encryption​-customer-algorithm header.
1100
+ # discarded; Amazon S3 does not store the encryption key. The key must
1101
+ # be appropriate for use with the algorithm specified in the
1102
+ # `x-amz-server-side-encryption-customer-algorithm` header.
739
1103
  # @option options [String] :sse_customer_key_md5
740
1104
  # Specifies the 128-bit MD5 digest of the encryption key according to
741
1105
  # RFC 1321. Amazon S3 uses this header for a message integrity check to
742
- # ensure the encryption key was transmitted without error.
1106
+ # ensure that the encryption key was transmitted without error.
743
1107
  # @option options [String] :ssekms_key_id
744
- # Specifies the AWS KMS key ID to use for object encryption. All GET and
745
- # PUT requests for an object protected by AWS KMS will fail if not made
746
- # via SSL or using SigV4. Documentation on configuring any of the
747
- # officially supported AWS SDKs and CLI can be found at
748
- # http://docs.aws.amazon.com/AmazonS3/latest/dev/UsingAWSSDK.html#specify-signature-version
1108
+ # If `x-amz-server-side-encryption` is present and has the value of
1109
+ # `aws:kms`, this header specifies the ID of the Amazon Web Services Key
1110
+ # Management Service (Amazon Web Services KMS) symmetrical customer
1111
+ # managed key that was used for the object. If you specify
1112
+ # `x-amz-server-side-encryption:aws:kms`, but do not provide`
1113
+ # x-amz-server-side-encryption-aws-kms-key-id`, Amazon S3 uses the
1114
+ # Amazon Web Services managed key to protect the data. If the KMS key
1115
+ # does not exist in the same account issuing the command, you must use
1116
+ # the full ARN and not just the ID.
749
1117
  # @option options [String] :ssekms_encryption_context
750
- # Specifies the AWS KMS Encryption Context to use for object encryption.
751
- # The value of this header is a base64-encoded UTF-8 string holding JSON
752
- # with the encryption context key-value pairs.
1118
+ # Specifies the Amazon Web Services KMS Encryption Context to use for
1119
+ # object encryption. The value of this header is a base64-encoded UTF-8
1120
+ # string holding JSON with the encryption context key-value pairs.
1121
+ # @option options [Boolean] :bucket_key_enabled
1122
+ # Specifies whether Amazon S3 should use an S3 Bucket Key for object
1123
+ # encryption with server-side encryption using AWS KMS (SSE-KMS).
1124
+ # Setting this header to `true` causes Amazon S3 to use an S3 Bucket Key
1125
+ # for object encryption with SSE-KMS.
1126
+ #
1127
+ # Specifying this header with a PUT action doesn’t affect bucket-level
1128
+ # settings for S3 Bucket Key.
753
1129
  # @option options [String] :request_payer
754
- # Confirms that the requester knows that she or he will be charged for
755
- # the request. Bucket owners need not specify this parameter in their
756
- # requests. Documentation on downloading objects from requester pays
757
- # buckets can be found at
758
- # http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
1130
+ # Confirms that the requester knows that they will be charged for the
1131
+ # request. Bucket owners need not specify this parameter in their
1132
+ # requests. For information about downloading objects from Requester
1133
+ # Pays buckets, see [Downloading Objects in Requester Pays Buckets][1]
1134
+ # in the *Amazon S3 User Guide*.
1135
+ #
1136
+ #
1137
+ #
1138
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
759
1139
  # @option options [String] :tagging
760
1140
  # The tag-set for the object. The tag-set must be encoded as URL Query
761
1141
  # parameters. (For example, "Key1=Value1")
762
1142
  # @option options [String] :object_lock_mode
763
- # The object lock mode that you want to apply to this object.
1143
+ # The Object Lock mode that you want to apply to this object.
764
1144
  # @option options [Time,DateTime,Date,Integer,String] :object_lock_retain_until_date
765
- # The date and time when you want this object's object lock to expire.
1145
+ # The date and time when you want this object's Object Lock to expire.
1146
+ # Must be formatted as a timestamp parameter.
766
1147
  # @option options [String] :object_lock_legal_hold_status
767
- # The Legal Hold status that you want to apply to the specified object.
1148
+ # Specifies whether a legal hold will be applied to this object. For
1149
+ # more information about S3 Object Lock, see [Object Lock][1].
1150
+ #
1151
+ #
1152
+ #
1153
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock.html
1154
+ # @option options [String] :expected_bucket_owner
1155
+ # The account ID of the expected bucket owner. If the bucket is owned by
1156
+ # a different account, the request fails with the HTTP status code `403
1157
+ # Forbidden` (access denied).
768
1158
  # @return [Types::PutObjectOutput]
769
1159
  def put(options = {})
770
1160
  options = options.merge(
@@ -856,21 +1246,48 @@ module Aws::S3
856
1246
  # value: "MetadataValue",
857
1247
  # },
858
1248
  # ],
859
- # storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER, DEEP_ARCHIVE
1249
+ # storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER, DEEP_ARCHIVE, OUTPOSTS, GLACIER_IR
860
1250
  # },
861
1251
  # },
862
1252
  # },
863
1253
  # request_payer: "requester", # accepts requester
1254
+ # checksum_algorithm: "CRC32", # accepts CRC32, CRC32C, SHA1, SHA256
1255
+ # expected_bucket_owner: "AccountId",
864
1256
  # })
865
1257
  # @param [Hash] options ({})
866
1258
  # @option options [String] :version_id
1259
+ # VersionId used to reference a specific version of the object.
867
1260
  # @option options [Types::RestoreRequest] :restore_request
1261
+ # Container for restore job parameters.
868
1262
  # @option options [String] :request_payer
869
- # Confirms that the requester knows that she or he will be charged for
870
- # the request. Bucket owners need not specify this parameter in their
871
- # requests. Documentation on downloading objects from requester pays
872
- # buckets can be found at
873
- # http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
1263
+ # Confirms that the requester knows that they will be charged for the
1264
+ # request. Bucket owners need not specify this parameter in their
1265
+ # requests. For information about downloading objects from Requester
1266
+ # Pays buckets, see [Downloading Objects in Requester Pays Buckets][1]
1267
+ # in the *Amazon S3 User Guide*.
1268
+ #
1269
+ #
1270
+ #
1271
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
1272
+ # @option options [String] :checksum_algorithm
1273
+ # Indicates the algorithm used to create the checksum for the object
1274
+ # when using the SDK. This header will not provide any additional
1275
+ # functionality if not using the SDK. When sending this header, there
1276
+ # must be a corresponding `x-amz-checksum` or `x-amz-trailer` header
1277
+ # sent. Otherwise, Amazon S3 fails the request with the HTTP status code
1278
+ # `400 Bad Request`. For more information, see [Checking object
1279
+ # integrity][1] in the *Amazon S3 User Guide*.
1280
+ #
1281
+ # If you provide an individual checksum, Amazon S3 ignores any provided
1282
+ # `ChecksumAlgorithm` parameter.
1283
+ #
1284
+ #
1285
+ #
1286
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
1287
+ # @option options [String] :expected_bucket_owner
1288
+ # The account ID of the expected bucket owner. If the bucket is owned by
1289
+ # a different account, the request fails with the HTTP status code `403
1290
+ # Forbidden` (access denied).
874
1291
  # @return [Types::RestoreObjectOutput]
875
1292
  def restore_object(options = {})
876
1293
  options = options.merge(
@@ -967,8 +1384,8 @@ module Aws::S3
967
1384
 
968
1385
  def yield_waiter_and_warn(waiter, &block)
969
1386
  if !@waiter_block_warned
970
- msg = "pass options to configure the waiter; "
971
- msg << "yielding the waiter is deprecated"
1387
+ msg = "pass options to configure the waiter; "\
1388
+ "yielding the waiter is deprecated"
972
1389
  warn(msg)
973
1390
  @waiter_block_warned = true
974
1391
  end
@@ -976,7 +1393,9 @@ module Aws::S3
976
1393
  end
977
1394
 
978
1395
  def separate_params_and_options(options)
979
- opts = Set.new([:client, :max_attempts, :delay, :before_attempt, :before_wait])
1396
+ opts = Set.new(
1397
+ [:client, :max_attempts, :delay, :before_attempt, :before_wait]
1398
+ )
980
1399
  waiter_opts = {}
981
1400
  waiter_params = {}
982
1401
  options.each_pair do |key, value|
@@ -1000,21 +1419,51 @@ module Aws::S3
1000
1419
  # mfa: "MFA",
1001
1420
  # request_payer: "requester", # accepts requester
1002
1421
  # bypass_governance_retention: false,
1422
+ # expected_bucket_owner: "AccountId",
1423
+ # checksum_algorithm: "CRC32", # accepts CRC32, CRC32C, SHA1, SHA256
1003
1424
  # })
1004
1425
  # @param options ({})
1005
1426
  # @option options [String] :mfa
1006
1427
  # The concatenation of the authentication device's serial number, a
1007
1428
  # space, and the value that is displayed on your authentication device.
1429
+ # Required to permanently delete a versioned object if versioning is
1430
+ # configured with MFA delete enabled.
1008
1431
  # @option options [String] :request_payer
1009
- # Confirms that the requester knows that she or he will be charged for
1010
- # the request. Bucket owners need not specify this parameter in their
1011
- # requests. Documentation on downloading objects from requester pays
1012
- # buckets can be found at
1013
- # http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
1432
+ # Confirms that the requester knows that they will be charged for the
1433
+ # request. Bucket owners need not specify this parameter in their
1434
+ # requests. For information about downloading objects from Requester
1435
+ # Pays buckets, see [Downloading Objects in Requester Pays Buckets][1]
1436
+ # in the *Amazon S3 User Guide*.
1437
+ #
1438
+ #
1439
+ #
1440
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
1014
1441
  # @option options [Boolean] :bypass_governance_retention
1015
1442
  # Specifies whether you want to delete this object even if it has a
1016
- # Governance-type object lock in place. You must have sufficient
1017
- # permissions to perform this operation.
1443
+ # Governance-type Object Lock in place. To use this header, you must
1444
+ # have the `s3:BypassGovernanceRetention` permission.
1445
+ # @option options [String] :expected_bucket_owner
1446
+ # The account ID of the expected bucket owner. If the bucket is owned by
1447
+ # a different account, the request fails with the HTTP status code `403
1448
+ # Forbidden` (access denied).
1449
+ # @option options [String] :checksum_algorithm
1450
+ # Indicates the algorithm used to create the checksum for the object
1451
+ # when using the SDK. This header will not provide any additional
1452
+ # functionality if not using the SDK. When sending this header, there
1453
+ # must be a corresponding `x-amz-checksum` or `x-amz-trailer` header
1454
+ # sent. Otherwise, Amazon S3 fails the request with the HTTP status code
1455
+ # `400 Bad Request`. For more information, see [Checking object
1456
+ # integrity][1] in the *Amazon S3 User Guide*.
1457
+ #
1458
+ # If you provide an individual checksum, Amazon S3 ignores any provided
1459
+ # `ChecksumAlgorithm` parameter.
1460
+ #
1461
+ # This checksum algorithm must be the same for all parts and it match
1462
+ # the checksum value supplied in the `CreateMultipartUpload` request.
1463
+ #
1464
+ #
1465
+ #
1466
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
1018
1467
  # @return [void]
1019
1468
  def batch_delete!(options = {})
1020
1469
  batch_enum.each do |batch|