aws-sdk-s3 1.36.0 → 1.95.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (98) hide show
  1. checksums.yaml +5 -5
  2. data/CHANGELOG.md +768 -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/object_lambda_arn.rb +69 -0
  7. data/lib/aws-sdk-s3/arn/outpost_access_point_arn.rb +73 -0
  8. data/lib/aws-sdk-s3/bucket.rb +277 -76
  9. data/lib/aws-sdk-s3/bucket_acl.rb +40 -15
  10. data/lib/aws-sdk-s3/bucket_cors.rb +50 -14
  11. data/lib/aws-sdk-s3/bucket_lifecycle.rb +33 -14
  12. data/lib/aws-sdk-s3/bucket_lifecycle_configuration.rb +32 -14
  13. data/lib/aws-sdk-s3/bucket_logging.rb +35 -15
  14. data/lib/aws-sdk-s3/bucket_notification.rb +32 -18
  15. data/lib/aws-sdk-s3/bucket_policy.rb +34 -13
  16. data/lib/aws-sdk-s3/bucket_region_cache.rb +2 -0
  17. data/lib/aws-sdk-s3/bucket_request_payment.rb +34 -12
  18. data/lib/aws-sdk-s3/bucket_tagging.rb +42 -14
  19. data/lib/aws-sdk-s3/bucket_versioning.rb +67 -12
  20. data/lib/aws-sdk-s3/bucket_website.rb +49 -17
  21. data/lib/aws-sdk-s3/client.rb +7494 -618
  22. data/lib/aws-sdk-s3/client_api.rb +417 -2
  23. data/lib/aws-sdk-s3/customizations/bucket.rb +59 -16
  24. data/lib/aws-sdk-s3/customizations/multipart_upload.rb +2 -0
  25. data/lib/aws-sdk-s3/customizations/object.rb +125 -60
  26. data/lib/aws-sdk-s3/customizations/object_summary.rb +5 -0
  27. data/lib/aws-sdk-s3/customizations/types/list_object_versions_output.rb +2 -0
  28. data/lib/aws-sdk-s3/customizations.rb +4 -1
  29. data/lib/aws-sdk-s3/encryption/client.rb +22 -5
  30. data/lib/aws-sdk-s3/encryption/decrypt_handler.rb +72 -26
  31. data/lib/aws-sdk-s3/encryption/default_cipher_provider.rb +43 -5
  32. data/lib/aws-sdk-s3/encryption/default_key_provider.rb +2 -0
  33. data/lib/aws-sdk-s3/encryption/encrypt_handler.rb +13 -2
  34. data/lib/aws-sdk-s3/encryption/errors.rb +2 -0
  35. data/lib/aws-sdk-s3/encryption/io_auth_decrypter.rb +2 -0
  36. data/lib/aws-sdk-s3/encryption/io_decrypter.rb +11 -3
  37. data/lib/aws-sdk-s3/encryption/io_encrypter.rb +2 -0
  38. data/lib/aws-sdk-s3/encryption/key_provider.rb +2 -0
  39. data/lib/aws-sdk-s3/encryption/kms_cipher_provider.rb +34 -3
  40. data/lib/aws-sdk-s3/encryption/materials.rb +8 -6
  41. data/lib/aws-sdk-s3/encryption/utils.rb +25 -0
  42. data/lib/aws-sdk-s3/encryption.rb +4 -0
  43. data/lib/aws-sdk-s3/encryptionV2/client.rb +566 -0
  44. data/lib/aws-sdk-s3/encryptionV2/decrypt_handler.rb +226 -0
  45. data/lib/aws-sdk-s3/encryptionV2/default_cipher_provider.rb +170 -0
  46. data/lib/aws-sdk-s3/encryptionV2/default_key_provider.rb +40 -0
  47. data/lib/aws-sdk-s3/encryptionV2/encrypt_handler.rb +69 -0
  48. data/lib/aws-sdk-s3/encryptionV2/errors.rb +37 -0
  49. data/lib/aws-sdk-s3/encryptionV2/io_auth_decrypter.rb +58 -0
  50. data/lib/aws-sdk-s3/encryptionV2/io_decrypter.rb +37 -0
  51. data/lib/aws-sdk-s3/encryptionV2/io_encrypter.rb +73 -0
  52. data/lib/aws-sdk-s3/encryptionV2/key_provider.rb +31 -0
  53. data/lib/aws-sdk-s3/encryptionV2/kms_cipher_provider.rb +169 -0
  54. data/lib/aws-sdk-s3/encryptionV2/materials.rb +60 -0
  55. data/lib/aws-sdk-s3/encryptionV2/utils.rb +103 -0
  56. data/lib/aws-sdk-s3/encryption_v2.rb +23 -0
  57. data/lib/aws-sdk-s3/errors.rb +123 -1
  58. data/lib/aws-sdk-s3/event_streams.rb +15 -8
  59. data/lib/aws-sdk-s3/file_downloader.rb +10 -8
  60. data/lib/aws-sdk-s3/file_part.rb +11 -6
  61. data/lib/aws-sdk-s3/file_uploader.rb +28 -14
  62. data/lib/aws-sdk-s3/legacy_signer.rb +17 -25
  63. data/lib/aws-sdk-s3/multipart_file_uploader.rb +53 -13
  64. data/lib/aws-sdk-s3/multipart_stream_uploader.rb +20 -7
  65. data/lib/aws-sdk-s3/multipart_upload.rb +64 -29
  66. data/lib/aws-sdk-s3/multipart_upload_error.rb +2 -0
  67. data/lib/aws-sdk-s3/multipart_upload_part.rb +115 -42
  68. data/lib/aws-sdk-s3/object.rb +656 -151
  69. data/lib/aws-sdk-s3/object_acl.rb +64 -21
  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 +474 -138
  73. data/lib/aws-sdk-s3/object_version.rb +122 -58
  74. data/lib/aws-sdk-s3/plugins/accelerate.rb +32 -38
  75. data/lib/aws-sdk-s3/plugins/arn.rb +228 -0
  76. data/lib/aws-sdk-s3/plugins/bucket_dns.rb +7 -7
  77. data/lib/aws-sdk-s3/plugins/bucket_name_restrictions.rb +25 -3
  78. data/lib/aws-sdk-s3/plugins/dualstack.rb +15 -4
  79. data/lib/aws-sdk-s3/plugins/expect_100_continue.rb +4 -4
  80. data/lib/aws-sdk-s3/plugins/get_bucket_location_fix.rb +2 -0
  81. data/lib/aws-sdk-s3/plugins/http_200_errors.rb +11 -3
  82. data/lib/aws-sdk-s3/plugins/iad_regional_endpoint.rb +67 -0
  83. data/lib/aws-sdk-s3/plugins/location_constraint.rb +2 -0
  84. data/lib/aws-sdk-s3/plugins/md5s.rb +30 -28
  85. data/lib/aws-sdk-s3/plugins/object_lambda_endpoint.rb +25 -0
  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 +64 -35
  89. data/lib/aws-sdk-s3/plugins/sse_cpk.rb +3 -1
  90. data/lib/aws-sdk-s3/plugins/streaming_retry.rb +118 -0
  91. data/lib/aws-sdk-s3/plugins/url_encoded_keys.rb +2 -0
  92. data/lib/aws-sdk-s3/presigned_post.rb +72 -32
  93. data/lib/aws-sdk-s3/presigner.rb +162 -66
  94. data/lib/aws-sdk-s3/resource.rb +23 -5
  95. data/lib/aws-sdk-s3/types.rb +6441 -952
  96. data/lib/aws-sdk-s3/waiters.rb +67 -1
  97. data/lib/aws-sdk-s3.rb +12 -6
  98. metadata +35 -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 BucketWebsite
10
13
 
11
14
  extend Aws::Deprecations
@@ -21,6 +24,7 @@ module Aws::S3
21
24
  @bucket_name = extract_bucket_name(args, options)
22
25
  @data = options.delete(:data)
23
26
  @client = options.delete(:client) || Client.new(options)
27
+ @waiter_block_warned = false
24
28
  end
25
29
 
26
30
  # @!group Read-Only Attributes
@@ -30,25 +34,29 @@ module Aws::S3
30
34
  @bucket_name
31
35
  end
32
36
 
33
-
37
+ # Specifies the redirect behavior of all requests to a website endpoint
38
+ # of an Amazon S3 bucket.
34
39
  # @return [Types::RedirectAllRequestsTo]
35
40
  def redirect_all_requests_to
36
41
  data[:redirect_all_requests_to]
37
42
  end
38
43
 
39
-
44
+ # The name of the index document for the website (for example
45
+ # `index.html`).
40
46
  # @return [Types::IndexDocument]
41
47
  def index_document
42
48
  data[:index_document]
43
49
  end
44
50
 
45
-
51
+ # The object key name of the website error document to use for 4XX class
52
+ # errors.
46
53
  # @return [Types::ErrorDocument]
47
54
  def error_document
48
55
  data[:error_document]
49
56
  end
50
57
 
51
-
58
+ # Rules that define when a redirect is applied and the redirect
59
+ # behavior.
52
60
  # @return [Array<Types::RoutingRule>]
53
61
  def routing_rules
54
62
  data[:routing_rules]
@@ -94,7 +102,8 @@ module Aws::S3
94
102
  # Waiter polls an API operation until a resource enters a desired
95
103
  # state.
96
104
  #
97
- # @note The waiting operation is performed on a copy. The original resource remains unchanged
105
+ # @note The waiting operation is performed on a copy. The original resource
106
+ # remains unchanged.
98
107
  #
99
108
  # ## Basic Usage
100
109
  #
@@ -107,13 +116,15 @@ module Aws::S3
107
116
  #
108
117
  # ## Example
109
118
  #
110
- # instance.wait_until(max_attempts:10, delay:5) {|instance| instance.state.name == 'running' }
119
+ # instance.wait_until(max_attempts:10, delay:5) do |instance|
120
+ # instance.state.name == 'running'
121
+ # end
111
122
  #
112
123
  # ## Configuration
113
124
  #
114
125
  # You can configure the maximum number of polling attempts, and the
115
- # delay (in seconds) between each polling attempt. The waiting condition is set
116
- # by passing a block to {#wait_until}:
126
+ # delay (in seconds) between each polling attempt. The waiting condition is
127
+ # set by passing a block to {#wait_until}:
117
128
  #
118
129
  # # poll for ~25 seconds
119
130
  # resource.wait_until(max_attempts:5,delay:5) {|resource|...}
@@ -144,17 +155,16 @@ module Aws::S3
144
155
  # # resource did not enter the desired state in time
145
156
  # end
146
157
  #
158
+ # @yieldparam [Resource] resource to be used in the waiting condition.
147
159
  #
148
- # @yield param [Resource] resource to be used in the waiting condition
149
- #
150
- # @raise [Aws::Waiters::Errors::FailureStateError] Raised when the waiter terminates
151
- # because the waiter has entered a state that it will not transition
152
- # out of, preventing success.
160
+ # @raise [Aws::Waiters::Errors::FailureStateError] Raised when the waiter
161
+ # terminates because the waiter has entered a state that it will not
162
+ # transition out of, preventing success.
153
163
  #
154
164
  # yet successful.
155
165
  #
156
- # @raise [Aws::Waiters::Errors::UnexpectedError] Raised when an error is encountered
157
- # while polling for a resource that is not expected.
166
+ # @raise [Aws::Waiters::Errors::UnexpectedError] Raised when an error is
167
+ # encountered while polling for a resource that is not expected.
158
168
  #
159
169
  # @raise [NotImplementedError] Raised when the resource does not
160
170
  #
@@ -188,8 +198,14 @@ module Aws::S3
188
198
 
189
199
  # @example Request syntax with placeholder values
190
200
  #
191
- # bucket_website.delete()
201
+ # bucket_website.delete({
202
+ # expected_bucket_owner: "AccountId",
203
+ # })
192
204
  # @param [Hash] options ({})
205
+ # @option options [String] :expected_bucket_owner
206
+ # The account ID of the expected bucket owner. If the bucket is owned by
207
+ # a different account, the request will fail with an HTTP `403 (Access
208
+ # Denied)` error.
193
209
  # @return [EmptyStructure]
194
210
  def delete(options = {})
195
211
  options = options.merge(bucket: @bucket_name)
@@ -228,10 +244,26 @@ module Aws::S3
228
244
  # },
229
245
  # ],
230
246
  # },
247
+ # expected_bucket_owner: "AccountId",
231
248
  # })
232
249
  # @param [Hash] options ({})
233
250
  # @option options [String] :content_md5
251
+ # The base64-encoded 128-bit MD5 digest of the data. You must use this
252
+ # header as a message integrity check to verify that the request body
253
+ # was not corrupted in transit. For more information, see [RFC 1864][1].
254
+ #
255
+ # For requests made using the AWS Command Line Interface (CLI) or AWS
256
+ # SDKs, this field is calculated automatically.
257
+ #
258
+ #
259
+ #
260
+ # [1]: http://www.ietf.org/rfc/rfc1864.txt
234
261
  # @option options [required, Types::WebsiteConfiguration] :website_configuration
262
+ # Container for the request.
263
+ # @option options [String] :expected_bucket_owner
264
+ # The account ID of the expected bucket owner. If the bucket is owned by
265
+ # a different account, the request will fail with an HTTP `403 (Access
266
+ # Denied)` error.
235
267
  # @return [EmptyStructure]
236
268
  def put(options = {})
237
269
  options = options.merge(bucket: @bucket_name)