aws-sdk-s3 1.30.1 → 1.112.0

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 +883 -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 +298 -77
  10. data/lib/aws-sdk-s3/bucket_acl.rb +41 -14
  11. data/lib/aws-sdk-s3/bucket_cors.rb +51 -13
  12. data/lib/aws-sdk-s3/bucket_lifecycle.rb +38 -15
  13. data/lib/aws-sdk-s3/bucket_lifecycle_configuration.rb +40 -15
  14. data/lib/aws-sdk-s3/bucket_logging.rb +36 -15
  15. data/lib/aws-sdk-s3/bucket_notification.rb +44 -15
  16. data/lib/aws-sdk-s3/bucket_policy.rb +35 -13
  17. data/lib/aws-sdk-s3/bucket_region_cache.rb +2 -0
  18. data/lib/aws-sdk-s3/bucket_request_payment.rb +35 -12
  19. data/lib/aws-sdk-s3/bucket_tagging.rb +43 -13
  20. data/lib/aws-sdk-s3/bucket_versioning.rb +70 -12
  21. data/lib/aws-sdk-s3/bucket_website.rb +50 -13
  22. data/lib/aws-sdk-s3/client.rb +7889 -661
  23. data/lib/aws-sdk-s3/client_api.rb +436 -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 +23 -6
  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 +20 -7
  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 +53 -13
  65. data/lib/aws-sdk-s3/multipart_stream_uploader.rb +20 -7
  66. data/lib/aws-sdk-s3/multipart_upload.rb +64 -28
  67. data/lib/aws-sdk-s3/multipart_upload_error.rb +2 -0
  68. data/lib/aws-sdk-s3/multipart_upload_part.rb +117 -43
  69. data/lib/aws-sdk-s3/object.rb +656 -152
  70. data/lib/aws-sdk-s3/object_acl.rb +65 -20
  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 +485 -138
  74. data/lib/aws-sdk-s3/object_version.rb +117 -60
  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 +30 -28
  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/sse_cpk.rb +3 -1
  91. data/lib/aws-sdk-s3/plugins/streaming_retry.rb +118 -0
  92. data/lib/aws-sdk-s3/plugins/url_encoded_keys.rb +2 -0
  93. data/lib/aws-sdk-s3/presigned_post.rb +101 -49
  94. data/lib/aws-sdk-s3/presigner.rb +168 -66
  95. data/lib/aws-sdk-s3/resource.rb +41 -5
  96. data/lib/aws-sdk-s3/types.rb +6768 -1033
  97. data/lib/aws-sdk-s3/waiters.rb +67 -1
  98. data/lib/aws-sdk-s3.rb +12 -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 BucketAcl
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,6 +34,7 @@ module Aws::S3
30
34
  @bucket_name
31
35
  end
32
36
 
37
+ # Container for the bucket owner's display name and ID.
33
38
  # @return [Types::Owner]
34
39
  def owner
35
40
  data[:owner]
@@ -81,7 +86,8 @@ module Aws::S3
81
86
  # Waiter polls an API operation until a resource enters a desired
82
87
  # state.
83
88
  #
84
- # @note The waiting operation is performed on a copy. The original resource remains unchanged
89
+ # @note The waiting operation is performed on a copy. The original resource
90
+ # remains unchanged.
85
91
  #
86
92
  # ## Basic Usage
87
93
  #
@@ -94,13 +100,15 @@ module Aws::S3
94
100
  #
95
101
  # ## Example
96
102
  #
97
- # instance.wait_until(max_attempts:10, delay:5) {|instance| instance.state.name == 'running' }
103
+ # instance.wait_until(max_attempts:10, delay:5) do |instance|
104
+ # instance.state.name == 'running'
105
+ # end
98
106
  #
99
107
  # ## Configuration
100
108
  #
101
109
  # You can configure the maximum number of polling attempts, and the
102
- # delay (in seconds) between each polling attempt. The waiting condition is set
103
- # by passing a block to {#wait_until}:
110
+ # delay (in seconds) between each polling attempt. The waiting condition is
111
+ # set by passing a block to {#wait_until}:
104
112
  #
105
113
  # # poll for ~25 seconds
106
114
  # resource.wait_until(max_attempts:5,delay:5) {|resource|...}
@@ -131,17 +139,16 @@ module Aws::S3
131
139
  # # resource did not enter the desired state in time
132
140
  # end
133
141
  #
142
+ # @yieldparam [Resource] resource to be used in the waiting condition.
134
143
  #
135
- # @yield param [Resource] resource to be used in the waiting condition
136
- #
137
- # @raise [Aws::Waiters::Errors::FailureStateError] Raised when the waiter terminates
138
- # because the waiter has entered a state that it will not transition
139
- # out of, preventing success.
144
+ # @raise [Aws::Waiters::Errors::FailureStateError] Raised when the waiter
145
+ # terminates because the waiter has entered a state that it will not
146
+ # transition out of, preventing success.
140
147
  #
141
148
  # yet successful.
142
149
  #
143
- # @raise [Aws::Waiters::Errors::UnexpectedError] Raised when an error is encountered
144
- # while polling for a resource that is not expected.
150
+ # @raise [Aws::Waiters::Errors::UnexpectedError] Raised when an error is
151
+ # encountered while polling for a resource that is not expected.
145
152
  #
146
153
  # @raise [NotImplementedError] Raised when the resource does not
147
154
  #
@@ -201,12 +208,26 @@ module Aws::S3
201
208
  # grant_read_acp: "GrantReadACP",
202
209
  # grant_write: "GrantWrite",
203
210
  # grant_write_acp: "GrantWriteACP",
211
+ # expected_bucket_owner: "AccountId",
204
212
  # })
205
213
  # @param [Hash] options ({})
206
214
  # @option options [String] :acl
207
215
  # The canned ACL to apply to the bucket.
208
216
  # @option options [Types::AccessControlPolicy] :access_control_policy
217
+ # Contains the elements that set the ACL permissions for an object per
218
+ # grantee.
209
219
  # @option options [String] :content_md5
220
+ # The base64-encoded 128-bit MD5 digest of the data. This header must be
221
+ # used as a message integrity check to verify that the request body was
222
+ # not corrupted in transit. For more information, go to [RFC 1864.][1]
223
+ #
224
+ # For requests made using the Amazon Web Services Command Line Interface
225
+ # (CLI) or Amazon Web Services SDKs, this field is calculated
226
+ # automatically.
227
+ #
228
+ #
229
+ #
230
+ # [1]: http://www.ietf.org/rfc/rfc1864.txt
210
231
  # @option options [String] :grant_full_control
211
232
  # Allows grantee the read, write, read ACP, and write ACP permissions on
212
233
  # the bucket.
@@ -215,10 +236,16 @@ module Aws::S3
215
236
  # @option options [String] :grant_read_acp
216
237
  # Allows grantee to read the bucket ACL.
217
238
  # @option options [String] :grant_write
218
- # Allows grantee to create, overwrite, and delete any object in the
219
- # bucket.
239
+ # Allows grantee to create new objects in the bucket.
240
+ #
241
+ # For the bucket and object owners of existing objects, also allows
242
+ # deletions and overwrites of those objects.
220
243
  # @option options [String] :grant_write_acp
221
244
  # Allows grantee to write the ACL for the applicable bucket.
245
+ # @option options [String] :expected_bucket_owner
246
+ # The account ID of the expected bucket owner. If the bucket is owned by
247
+ # a different account, the request will fail with an HTTP `403 (Access
248
+ # Denied)` error.
222
249
  # @return [EmptyStructure]
223
250
  def put(options = {})
224
251
  options = options.merge(bucket: @bucket_name)
@@ -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 BucketCors
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,6 +34,8 @@ module Aws::S3
30
34
  @bucket_name
31
35
  end
32
36
 
37
+ # A set of origins and methods (cross-origin access that you want to
38
+ # allow). You can add up to 100 rules to the configuration.
33
39
  # @return [Array<Types::CORSRule>]
34
40
  def cors_rules
35
41
  data[:cors_rules]
@@ -75,7 +81,8 @@ module Aws::S3
75
81
  # Waiter polls an API operation until a resource enters a desired
76
82
  # state.
77
83
  #
78
- # @note The waiting operation is performed on a copy. The original resource remains unchanged
84
+ # @note The waiting operation is performed on a copy. The original resource
85
+ # remains unchanged.
79
86
  #
80
87
  # ## Basic Usage
81
88
  #
@@ -88,13 +95,15 @@ module Aws::S3
88
95
  #
89
96
  # ## Example
90
97
  #
91
- # instance.wait_until(max_attempts:10, delay:5) {|instance| instance.state.name == 'running' }
98
+ # instance.wait_until(max_attempts:10, delay:5) do |instance|
99
+ # instance.state.name == 'running'
100
+ # end
92
101
  #
93
102
  # ## Configuration
94
103
  #
95
104
  # You can configure the maximum number of polling attempts, and the
96
- # delay (in seconds) between each polling attempt. The waiting condition is set
97
- # by passing a block to {#wait_until}:
105
+ # delay (in seconds) between each polling attempt. The waiting condition is
106
+ # set by passing a block to {#wait_until}:
98
107
  #
99
108
  # # poll for ~25 seconds
100
109
  # resource.wait_until(max_attempts:5,delay:5) {|resource|...}
@@ -125,17 +134,16 @@ module Aws::S3
125
134
  # # resource did not enter the desired state in time
126
135
  # end
127
136
  #
137
+ # @yieldparam [Resource] resource to be used in the waiting condition.
128
138
  #
129
- # @yield param [Resource] resource to be used in the waiting condition
130
- #
131
- # @raise [Aws::Waiters::Errors::FailureStateError] Raised when the waiter terminates
132
- # because the waiter has entered a state that it will not transition
133
- # out of, preventing success.
139
+ # @raise [Aws::Waiters::Errors::FailureStateError] Raised when the waiter
140
+ # terminates because the waiter has entered a state that it will not
141
+ # transition out of, preventing success.
134
142
  #
135
143
  # yet successful.
136
144
  #
137
- # @raise [Aws::Waiters::Errors::UnexpectedError] Raised when an error is encountered
138
- # while polling for a resource that is not expected.
145
+ # @raise [Aws::Waiters::Errors::UnexpectedError] Raised when an error is
146
+ # encountered while polling for a resource that is not expected.
139
147
  #
140
148
  # @raise [NotImplementedError] Raised when the resource does not
141
149
  #
@@ -169,8 +177,14 @@ module Aws::S3
169
177
 
170
178
  # @example Request syntax with placeholder values
171
179
  #
172
- # bucket_cors.delete()
180
+ # bucket_cors.delete({
181
+ # expected_bucket_owner: "AccountId",
182
+ # })
173
183
  # @param [Hash] options ({})
184
+ # @option options [String] :expected_bucket_owner
185
+ # The account ID of the expected bucket owner. If the bucket is owned by
186
+ # a different account, the request will fail with an HTTP `403 (Access
187
+ # Denied)` error.
174
188
  # @return [EmptyStructure]
175
189
  def delete(options = {})
176
190
  options = options.merge(bucket: @bucket_name)
@@ -184,6 +198,7 @@ module Aws::S3
184
198
  # cors_configuration: { # required
185
199
  # cors_rules: [ # required
186
200
  # {
201
+ # id: "ID",
187
202
  # allowed_headers: ["AllowedHeader"],
188
203
  # allowed_methods: ["AllowedMethod"], # required
189
204
  # allowed_origins: ["AllowedOrigin"], # required
@@ -193,10 +208,33 @@ module Aws::S3
193
208
  # ],
194
209
  # },
195
210
  # content_md5: "ContentMD5",
211
+ # expected_bucket_owner: "AccountId",
196
212
  # })
197
213
  # @param [Hash] options ({})
198
214
  # @option options [required, Types::CORSConfiguration] :cors_configuration
215
+ # Describes the cross-origin access configuration for objects in an
216
+ # Amazon S3 bucket. For more information, see [Enabling Cross-Origin
217
+ # Resource Sharing][1] in the *Amazon S3 User Guide*.
218
+ #
219
+ #
220
+ #
221
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/cors.html
199
222
  # @option options [String] :content_md5
223
+ # The base64-encoded 128-bit MD5 digest of the data. This header must be
224
+ # used as a message integrity check to verify that the request body was
225
+ # not corrupted in transit. For more information, go to [RFC 1864.][1]
226
+ #
227
+ # For requests made using the Amazon Web Services Command Line Interface
228
+ # (CLI) or Amazon Web Services SDKs, this field is calculated
229
+ # automatically.
230
+ #
231
+ #
232
+ #
233
+ # [1]: http://www.ietf.org/rfc/rfc1864.txt
234
+ # @option options [String] :expected_bucket_owner
235
+ # The account ID of the expected bucket owner. If the bucket is owned by
236
+ # a different account, the request will fail with an HTTP `403 (Access
237
+ # Denied)` error.
200
238
  # @return [EmptyStructure]
201
239
  def put(options = {})
202
240
  options = options.merge(bucket: @bucket_name)
@@ -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 BucketLifecycle
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,6 +34,7 @@ module Aws::S3
30
34
  @bucket_name
31
35
  end
32
36
 
37
+ # Container for a lifecycle rule.
33
38
  # @return [Array<Types::Rule>]
34
39
  def rules
35
40
  data[:rules]
@@ -75,7 +80,8 @@ module Aws::S3
75
80
  # Waiter polls an API operation until a resource enters a desired
76
81
  # state.
77
82
  #
78
- # @note The waiting operation is performed on a copy. The original resource remains unchanged
83
+ # @note The waiting operation is performed on a copy. The original resource
84
+ # remains unchanged.
79
85
  #
80
86
  # ## Basic Usage
81
87
  #
@@ -88,13 +94,15 @@ module Aws::S3
88
94
  #
89
95
  # ## Example
90
96
  #
91
- # instance.wait_until(max_attempts:10, delay:5) {|instance| instance.state.name == 'running' }
97
+ # instance.wait_until(max_attempts:10, delay:5) do |instance|
98
+ # instance.state.name == 'running'
99
+ # end
92
100
  #
93
101
  # ## Configuration
94
102
  #
95
103
  # You can configure the maximum number of polling attempts, and the
96
- # delay (in seconds) between each polling attempt. The waiting condition is set
97
- # by passing a block to {#wait_until}:
104
+ # delay (in seconds) between each polling attempt. The waiting condition is
105
+ # set by passing a block to {#wait_until}:
98
106
  #
99
107
  # # poll for ~25 seconds
100
108
  # resource.wait_until(max_attempts:5,delay:5) {|resource|...}
@@ -125,17 +133,16 @@ module Aws::S3
125
133
  # # resource did not enter the desired state in time
126
134
  # end
127
135
  #
136
+ # @yieldparam [Resource] resource to be used in the waiting condition.
128
137
  #
129
- # @yield param [Resource] resource to be used in the waiting condition
130
- #
131
- # @raise [Aws::Waiters::Errors::FailureStateError] Raised when the waiter terminates
132
- # because the waiter has entered a state that it will not transition
133
- # out of, preventing success.
138
+ # @raise [Aws::Waiters::Errors::FailureStateError] Raised when the waiter
139
+ # terminates because the waiter has entered a state that it will not
140
+ # transition out of, preventing success.
134
141
  #
135
142
  # yet successful.
136
143
  #
137
- # @raise [Aws::Waiters::Errors::UnexpectedError] Raised when an error is encountered
138
- # while polling for a resource that is not expected.
144
+ # @raise [Aws::Waiters::Errors::UnexpectedError] Raised when an error is
145
+ # encountered while polling for a resource that is not expected.
139
146
  #
140
147
  # @raise [NotImplementedError] Raised when the resource does not
141
148
  #
@@ -169,8 +176,14 @@ module Aws::S3
169
176
 
170
177
  # @example Request syntax with placeholder values
171
178
  #
172
- # bucket_lifecycle.delete()
179
+ # bucket_lifecycle.delete({
180
+ # expected_bucket_owner: "AccountId",
181
+ # })
173
182
  # @param [Hash] options ({})
183
+ # @option options [String] :expected_bucket_owner
184
+ # The account ID of the expected bucket owner. If the bucket is owned by
185
+ # a different account, the request will fail with an HTTP `403 (Access
186
+ # Denied)` error.
174
187
  # @return [EmptyStructure]
175
188
  def delete(options = {})
176
189
  options = options.merge(bucket: @bucket_name)
@@ -196,14 +209,16 @@ module Aws::S3
196
209
  # transition: {
197
210
  # date: Time.now,
198
211
  # days: 1,
199
- # storage_class: "GLACIER", # accepts GLACIER, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING
212
+ # storage_class: "GLACIER", # accepts GLACIER, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, DEEP_ARCHIVE, GLACIER_IR
200
213
  # },
201
214
  # noncurrent_version_transition: {
202
215
  # noncurrent_days: 1,
203
- # storage_class: "GLACIER", # accepts GLACIER, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING
216
+ # storage_class: "GLACIER", # accepts GLACIER, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, DEEP_ARCHIVE, GLACIER_IR
217
+ # newer_noncurrent_versions: 1,
204
218
  # },
205
219
  # noncurrent_version_expiration: {
206
220
  # noncurrent_days: 1,
221
+ # newer_noncurrent_versions: 1,
207
222
  # },
208
223
  # abort_incomplete_multipart_upload: {
209
224
  # days_after_initiation: 1,
@@ -211,10 +226,18 @@ module Aws::S3
211
226
  # },
212
227
  # ],
213
228
  # },
229
+ # expected_bucket_owner: "AccountId",
214
230
  # })
215
231
  # @param [Hash] options ({})
216
232
  # @option options [String] :content_md5
233
+ # For requests made using the Amazon Web Services Command Line Interface
234
+ # (CLI) or Amazon Web Services SDKs, this field is calculated
235
+ # automatically.
217
236
  # @option options [Types::LifecycleConfiguration] :lifecycle_configuration
237
+ # @option options [String] :expected_bucket_owner
238
+ # The account ID of the expected bucket owner. If the bucket is owned by
239
+ # a different account, the request will fail with an HTTP `403 (Access
240
+ # Denied)` error.
218
241
  # @return [EmptyStructure]
219
242
  def put(options = {})
220
243
  options = options.merge(bucket: @bucket_name)
@@ -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 BucketLifecycleConfiguration
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,6 +34,7 @@ module Aws::S3
30
34
  @bucket_name
31
35
  end
32
36
 
37
+ # Container for a lifecycle rule.
33
38
  # @return [Array<Types::LifecycleRule>]
34
39
  def rules
35
40
  data[:rules]
@@ -75,7 +80,8 @@ module Aws::S3
75
80
  # Waiter polls an API operation until a resource enters a desired
76
81
  # state.
77
82
  #
78
- # @note The waiting operation is performed on a copy. The original resource remains unchanged
83
+ # @note The waiting operation is performed on a copy. The original resource
84
+ # remains unchanged.
79
85
  #
80
86
  # ## Basic Usage
81
87
  #
@@ -88,13 +94,15 @@ module Aws::S3
88
94
  #
89
95
  # ## Example
90
96
  #
91
- # instance.wait_until(max_attempts:10, delay:5) {|instance| instance.state.name == 'running' }
97
+ # instance.wait_until(max_attempts:10, delay:5) do |instance|
98
+ # instance.state.name == 'running'
99
+ # end
92
100
  #
93
101
  # ## Configuration
94
102
  #
95
103
  # You can configure the maximum number of polling attempts, and the
96
- # delay (in seconds) between each polling attempt. The waiting condition is set
97
- # by passing a block to {#wait_until}:
104
+ # delay (in seconds) between each polling attempt. The waiting condition is
105
+ # set by passing a block to {#wait_until}:
98
106
  #
99
107
  # # poll for ~25 seconds
100
108
  # resource.wait_until(max_attempts:5,delay:5) {|resource|...}
@@ -125,17 +133,16 @@ module Aws::S3
125
133
  # # resource did not enter the desired state in time
126
134
  # end
127
135
  #
136
+ # @yieldparam [Resource] resource to be used in the waiting condition.
128
137
  #
129
- # @yield param [Resource] resource to be used in the waiting condition
130
- #
131
- # @raise [Aws::Waiters::Errors::FailureStateError] Raised when the waiter terminates
132
- # because the waiter has entered a state that it will not transition
133
- # out of, preventing success.
138
+ # @raise [Aws::Waiters::Errors::FailureStateError] Raised when the waiter
139
+ # terminates because the waiter has entered a state that it will not
140
+ # transition out of, preventing success.
134
141
  #
135
142
  # yet successful.
136
143
  #
137
- # @raise [Aws::Waiters::Errors::UnexpectedError] Raised when an error is encountered
138
- # while polling for a resource that is not expected.
144
+ # @raise [Aws::Waiters::Errors::UnexpectedError] Raised when an error is
145
+ # encountered while polling for a resource that is not expected.
139
146
  #
140
147
  # @raise [NotImplementedError] Raised when the resource does not
141
148
  #
@@ -169,8 +176,14 @@ module Aws::S3
169
176
 
170
177
  # @example Request syntax with placeholder values
171
178
  #
172
- # bucket_lifecycle_configuration.delete()
179
+ # bucket_lifecycle_configuration.delete({
180
+ # expected_bucket_owner: "AccountId",
181
+ # })
173
182
  # @param [Hash] options ({})
183
+ # @option options [String] :expected_bucket_owner
184
+ # The account ID of the expected bucket owner. If the bucket is owned by
185
+ # a different account, the request will fail with an HTTP `403 (Access
186
+ # Denied)` error.
174
187
  # @return [EmptyStructure]
175
188
  def delete(options = {})
176
189
  options = options.merge(bucket: @bucket_name)
@@ -197,6 +210,8 @@ module Aws::S3
197
210
  # key: "ObjectKey", # required
198
211
  # value: "Value", # required
199
212
  # },
213
+ # object_size_greater_than: 1,
214
+ # object_size_less_than: 1,
200
215
  # and: {
201
216
  # prefix: "Prefix",
202
217
  # tags: [
@@ -205,6 +220,8 @@ module Aws::S3
205
220
  # value: "Value", # required
206
221
  # },
207
222
  # ],
223
+ # object_size_greater_than: 1,
224
+ # object_size_less_than: 1,
208
225
  # },
209
226
  # },
210
227
  # status: "Enabled", # required, accepts Enabled, Disabled
@@ -212,17 +229,19 @@ module Aws::S3
212
229
  # {
213
230
  # date: Time.now,
214
231
  # days: 1,
215
- # storage_class: "GLACIER", # accepts GLACIER, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING
232
+ # storage_class: "GLACIER", # accepts GLACIER, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, DEEP_ARCHIVE, GLACIER_IR
216
233
  # },
217
234
  # ],
218
235
  # noncurrent_version_transitions: [
219
236
  # {
220
237
  # noncurrent_days: 1,
221
- # storage_class: "GLACIER", # accepts GLACIER, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING
238
+ # storage_class: "GLACIER", # accepts GLACIER, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, DEEP_ARCHIVE, GLACIER_IR
239
+ # newer_noncurrent_versions: 1,
222
240
  # },
223
241
  # ],
224
242
  # noncurrent_version_expiration: {
225
243
  # noncurrent_days: 1,
244
+ # newer_noncurrent_versions: 1,
226
245
  # },
227
246
  # abort_incomplete_multipart_upload: {
228
247
  # days_after_initiation: 1,
@@ -230,9 +249,15 @@ module Aws::S3
230
249
  # },
231
250
  # ],
232
251
  # },
252
+ # expected_bucket_owner: "AccountId",
233
253
  # })
234
254
  # @param [Hash] options ({})
235
255
  # @option options [Types::BucketLifecycleConfiguration] :lifecycle_configuration
256
+ # Container for lifecycle rules. You can add as many as 1,000 rules.
257
+ # @option options [String] :expected_bucket_owner
258
+ # The account ID of the expected bucket owner. If the bucket is owned by
259
+ # a different account, the request will fail with an HTTP `403 (Access
260
+ # Denied)` error.
236
261
  # @return [EmptyStructure]
237
262
  def put(options = {})
238
263
  options = options.merge(bucket: @bucket_name)
@@ -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 BucketLogging
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,9 +34,13 @@ module Aws::S3
30
34
  @bucket_name
31
35
  end
32
36
 
33
- # Container for logging information. Presence of this element indicates
34
- # that logging is enabled. Parameters TargetBucket and TargetPrefix are
35
- # required in this case.
37
+ # Describes where logs are stored and the prefix that Amazon S3 assigns
38
+ # to all log object keys for a bucket. For more information, see [PUT
39
+ # Bucket logging][1] in the *Amazon S3 API Reference*.
40
+ #
41
+ #
42
+ #
43
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketPUTlogging.html
36
44
  # @return [Types::LoggingEnabled]
37
45
  def logging_enabled
38
46
  data[:logging_enabled]
@@ -78,7 +86,8 @@ module Aws::S3
78
86
  # Waiter polls an API operation until a resource enters a desired
79
87
  # state.
80
88
  #
81
- # @note The waiting operation is performed on a copy. The original resource remains unchanged
89
+ # @note The waiting operation is performed on a copy. The original resource
90
+ # remains unchanged.
82
91
  #
83
92
  # ## Basic Usage
84
93
  #
@@ -91,13 +100,15 @@ module Aws::S3
91
100
  #
92
101
  # ## Example
93
102
  #
94
- # instance.wait_until(max_attempts:10, delay:5) {|instance| instance.state.name == 'running' }
103
+ # instance.wait_until(max_attempts:10, delay:5) do |instance|
104
+ # instance.state.name == 'running'
105
+ # end
95
106
  #
96
107
  # ## Configuration
97
108
  #
98
109
  # You can configure the maximum number of polling attempts, and the
99
- # delay (in seconds) between each polling attempt. The waiting condition is set
100
- # by passing a block to {#wait_until}:
110
+ # delay (in seconds) between each polling attempt. The waiting condition is
111
+ # set by passing a block to {#wait_until}:
101
112
  #
102
113
  # # poll for ~25 seconds
103
114
  # resource.wait_until(max_attempts:5,delay:5) {|resource|...}
@@ -128,17 +139,16 @@ module Aws::S3
128
139
  # # resource did not enter the desired state in time
129
140
  # end
130
141
  #
142
+ # @yieldparam [Resource] resource to be used in the waiting condition.
131
143
  #
132
- # @yield param [Resource] resource to be used in the waiting condition
133
- #
134
- # @raise [Aws::Waiters::Errors::FailureStateError] Raised when the waiter terminates
135
- # because the waiter has entered a state that it will not transition
136
- # out of, preventing success.
144
+ # @raise [Aws::Waiters::Errors::FailureStateError] Raised when the waiter
145
+ # terminates because the waiter has entered a state that it will not
146
+ # transition out of, preventing success.
137
147
  #
138
148
  # yet successful.
139
149
  #
140
- # @raise [Aws::Waiters::Errors::UnexpectedError] Raised when an error is encountered
141
- # while polling for a resource that is not expected.
150
+ # @raise [Aws::Waiters::Errors::UnexpectedError] Raised when an error is
151
+ # encountered while polling for a resource that is not expected.
142
152
  #
143
153
  # @raise [NotImplementedError] Raised when the resource does not
144
154
  #
@@ -192,10 +202,21 @@ module Aws::S3
192
202
  # },
193
203
  # },
194
204
  # content_md5: "ContentMD5",
205
+ # expected_bucket_owner: "AccountId",
195
206
  # })
196
207
  # @param [Hash] options ({})
197
208
  # @option options [required, Types::BucketLoggingStatus] :bucket_logging_status
209
+ # Container for logging status information.
198
210
  # @option options [String] :content_md5
211
+ # The MD5 hash of the `PutBucketLogging` request body.
212
+ #
213
+ # For requests made using the Amazon Web Services Command Line Interface
214
+ # (CLI) or Amazon Web Services SDKs, this field is calculated
215
+ # automatically.
216
+ # @option options [String] :expected_bucket_owner
217
+ # The account ID of the expected bucket owner. If the bucket is owned by
218
+ # a different account, the request will fail with an HTTP `403 (Access
219
+ # Denied)` error.
199
220
  # @return [EmptyStructure]
200
221
  def put(options = {})
201
222
  options = options.merge(bucket: @bucket_name)