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 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,7 +34,7 @@ module Aws::S3
30
34
  @bucket_name
31
35
  end
32
36
 
33
-
37
+ # Container for the bucket owner's display name and ID.
34
38
  # @return [Types::Owner]
35
39
  def owner
36
40
  data[:owner]
@@ -82,7 +86,8 @@ module Aws::S3
82
86
  # Waiter polls an API operation until a resource enters a desired
83
87
  # state.
84
88
  #
85
- # @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.
86
91
  #
87
92
  # ## Basic Usage
88
93
  #
@@ -95,13 +100,15 @@ module Aws::S3
95
100
  #
96
101
  # ## Example
97
102
  #
98
- # 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
99
106
  #
100
107
  # ## Configuration
101
108
  #
102
109
  # You can configure the maximum number of polling attempts, and the
103
- # delay (in seconds) between each polling attempt. The waiting condition is set
104
- # 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}:
105
112
  #
106
113
  # # poll for ~25 seconds
107
114
  # resource.wait_until(max_attempts:5,delay:5) {|resource|...}
@@ -132,17 +139,16 @@ module Aws::S3
132
139
  # # resource did not enter the desired state in time
133
140
  # end
134
141
  #
142
+ # @yieldparam [Resource] resource to be used in the waiting condition.
135
143
  #
136
- # @yield param [Resource] resource to be used in the waiting condition
137
- #
138
- # @raise [Aws::Waiters::Errors::FailureStateError] Raised when the waiter terminates
139
- # because the waiter has entered a state that it will not transition
140
- # 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.
141
147
  #
142
148
  # yet successful.
143
149
  #
144
- # @raise [Aws::Waiters::Errors::UnexpectedError] Raised when an error is encountered
145
- # 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.
146
152
  #
147
153
  # @raise [NotImplementedError] Raised when the resource does not
148
154
  #
@@ -202,12 +208,25 @@ module Aws::S3
202
208
  # grant_read_acp: "GrantReadACP",
203
209
  # grant_write: "GrantWrite",
204
210
  # grant_write_acp: "GrantWriteACP",
211
+ # expected_bucket_owner: "AccountId",
205
212
  # })
206
213
  # @param [Hash] options ({})
207
214
  # @option options [String] :acl
208
215
  # The canned ACL to apply to the bucket.
209
216
  # @option options [Types::AccessControlPolicy] :access_control_policy
217
+ # Contains the elements that set the ACL permissions for an object per
218
+ # grantee.
210
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 AWS Command Line Interface (CLI) or AWS
225
+ # SDKs, this field is calculated automatically.
226
+ #
227
+ #
228
+ #
229
+ # [1]: http://www.ietf.org/rfc/rfc1864.txt
211
230
  # @option options [String] :grant_full_control
212
231
  # Allows grantee the read, write, read ACP, and write ACP permissions on
213
232
  # the bucket.
@@ -216,10 +235,16 @@ module Aws::S3
216
235
  # @option options [String] :grant_read_acp
217
236
  # Allows grantee to read the bucket ACL.
218
237
  # @option options [String] :grant_write
219
- # Allows grantee to create, overwrite, and delete any object in the
220
- # bucket.
238
+ # Allows grantee to create new objects in the bucket.
239
+ #
240
+ # For the bucket and object owners of existing objects, also allows
241
+ # deletions and overwrites of those objects.
221
242
  # @option options [String] :grant_write_acp
222
243
  # Allows grantee to write the ACL for the applicable bucket.
244
+ # @option options [String] :expected_bucket_owner
245
+ # The account ID of the expected bucket owner. If the bucket is owned by
246
+ # a different account, the request will fail with an HTTP `403 (Access
247
+ # Denied)` error.
223
248
  # @return [EmptyStructure]
224
249
  def put(options = {})
225
250
  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,7 +34,8 @@ module Aws::S3
30
34
  @bucket_name
31
35
  end
32
36
 
33
-
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.
34
39
  # @return [Array<Types::CORSRule>]
35
40
  def cors_rules
36
41
  data[:cors_rules]
@@ -76,7 +81,8 @@ module Aws::S3
76
81
  # Waiter polls an API operation until a resource enters a desired
77
82
  # state.
78
83
  #
79
- # @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.
80
86
  #
81
87
  # ## Basic Usage
82
88
  #
@@ -89,13 +95,15 @@ module Aws::S3
89
95
  #
90
96
  # ## Example
91
97
  #
92
- # 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
93
101
  #
94
102
  # ## Configuration
95
103
  #
96
104
  # You can configure the maximum number of polling attempts, and the
97
- # delay (in seconds) between each polling attempt. The waiting condition is set
98
- # 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}:
99
107
  #
100
108
  # # poll for ~25 seconds
101
109
  # resource.wait_until(max_attempts:5,delay:5) {|resource|...}
@@ -126,17 +134,16 @@ module Aws::S3
126
134
  # # resource did not enter the desired state in time
127
135
  # end
128
136
  #
137
+ # @yieldparam [Resource] resource to be used in the waiting condition.
129
138
  #
130
- # @yield param [Resource] resource to be used in the waiting condition
131
- #
132
- # @raise [Aws::Waiters::Errors::FailureStateError] Raised when the waiter terminates
133
- # because the waiter has entered a state that it will not transition
134
- # 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.
135
142
  #
136
143
  # yet successful.
137
144
  #
138
- # @raise [Aws::Waiters::Errors::UnexpectedError] Raised when an error is encountered
139
- # 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.
140
147
  #
141
148
  # @raise [NotImplementedError] Raised when the resource does not
142
149
  #
@@ -170,8 +177,14 @@ module Aws::S3
170
177
 
171
178
  # @example Request syntax with placeholder values
172
179
  #
173
- # bucket_cors.delete()
180
+ # bucket_cors.delete({
181
+ # expected_bucket_owner: "AccountId",
182
+ # })
174
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.
175
188
  # @return [EmptyStructure]
176
189
  def delete(options = {})
177
190
  options = options.merge(bucket: @bucket_name)
@@ -185,6 +198,7 @@ module Aws::S3
185
198
  # cors_configuration: { # required
186
199
  # cors_rules: [ # required
187
200
  # {
201
+ # id: "ID",
188
202
  # allowed_headers: ["AllowedHeader"],
189
203
  # allowed_methods: ["AllowedMethod"], # required
190
204
  # allowed_origins: ["AllowedOrigin"], # required
@@ -194,10 +208,32 @@ module Aws::S3
194
208
  # ],
195
209
  # },
196
210
  # content_md5: "ContentMD5",
211
+ # expected_bucket_owner: "AccountId",
197
212
  # })
198
213
  # @param [Hash] options ({})
199
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
200
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 AWS Command Line Interface (CLI) or AWS
228
+ # SDKs, this field is calculated automatically.
229
+ #
230
+ #
231
+ #
232
+ # [1]: http://www.ietf.org/rfc/rfc1864.txt
233
+ # @option options [String] :expected_bucket_owner
234
+ # The account ID of the expected bucket owner. If the bucket is owned by
235
+ # a different account, the request will fail with an HTTP `403 (Access
236
+ # Denied)` error.
201
237
  # @return [EmptyStructure]
202
238
  def put(options = {})
203
239
  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,7 +34,7 @@ module Aws::S3
30
34
  @bucket_name
31
35
  end
32
36
 
33
-
37
+ # Container for a lifecycle rule.
34
38
  # @return [Array<Types::Rule>]
35
39
  def rules
36
40
  data[:rules]
@@ -76,7 +80,8 @@ module Aws::S3
76
80
  # Waiter polls an API operation until a resource enters a desired
77
81
  # state.
78
82
  #
79
- # @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.
80
85
  #
81
86
  # ## Basic Usage
82
87
  #
@@ -89,13 +94,15 @@ module Aws::S3
89
94
  #
90
95
  # ## Example
91
96
  #
92
- # 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
93
100
  #
94
101
  # ## Configuration
95
102
  #
96
103
  # You can configure the maximum number of polling attempts, and the
97
- # delay (in seconds) between each polling attempt. The waiting condition is set
98
- # 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}:
99
106
  #
100
107
  # # poll for ~25 seconds
101
108
  # resource.wait_until(max_attempts:5,delay:5) {|resource|...}
@@ -126,17 +133,16 @@ module Aws::S3
126
133
  # # resource did not enter the desired state in time
127
134
  # end
128
135
  #
136
+ # @yieldparam [Resource] resource to be used in the waiting condition.
129
137
  #
130
- # @yield param [Resource] resource to be used in the waiting condition
131
- #
132
- # @raise [Aws::Waiters::Errors::FailureStateError] Raised when the waiter terminates
133
- # because the waiter has entered a state that it will not transition
134
- # 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.
135
141
  #
136
142
  # yet successful.
137
143
  #
138
- # @raise [Aws::Waiters::Errors::UnexpectedError] Raised when an error is encountered
139
- # 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.
140
146
  #
141
147
  # @raise [NotImplementedError] Raised when the resource does not
142
148
  #
@@ -170,8 +176,14 @@ module Aws::S3
170
176
 
171
177
  # @example Request syntax with placeholder values
172
178
  #
173
- # bucket_lifecycle.delete()
179
+ # bucket_lifecycle.delete({
180
+ # expected_bucket_owner: "AccountId",
181
+ # })
174
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.
175
187
  # @return [EmptyStructure]
176
188
  def delete(options = {})
177
189
  options = options.merge(bucket: @bucket_name)
@@ -212,10 +224,17 @@ module Aws::S3
212
224
  # },
213
225
  # ],
214
226
  # },
227
+ # expected_bucket_owner: "AccountId",
215
228
  # })
216
229
  # @param [Hash] options ({})
217
230
  # @option options [String] :content_md5
231
+ # For requests made using the AWS Command Line Interface (CLI) or AWS
232
+ # SDKs, this field is calculated automatically.
218
233
  # @option options [Types::LifecycleConfiguration] :lifecycle_configuration
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.
219
238
  # @return [EmptyStructure]
220
239
  def put(options = {})
221
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 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,7 +34,7 @@ module Aws::S3
30
34
  @bucket_name
31
35
  end
32
36
 
33
-
37
+ # Container for a lifecycle rule.
34
38
  # @return [Array<Types::LifecycleRule>]
35
39
  def rules
36
40
  data[:rules]
@@ -76,7 +80,8 @@ module Aws::S3
76
80
  # Waiter polls an API operation until a resource enters a desired
77
81
  # state.
78
82
  #
79
- # @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.
80
85
  #
81
86
  # ## Basic Usage
82
87
  #
@@ -89,13 +94,15 @@ module Aws::S3
89
94
  #
90
95
  # ## Example
91
96
  #
92
- # 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
93
100
  #
94
101
  # ## Configuration
95
102
  #
96
103
  # You can configure the maximum number of polling attempts, and the
97
- # delay (in seconds) between each polling attempt. The waiting condition is set
98
- # 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}:
99
106
  #
100
107
  # # poll for ~25 seconds
101
108
  # resource.wait_until(max_attempts:5,delay:5) {|resource|...}
@@ -126,17 +133,16 @@ module Aws::S3
126
133
  # # resource did not enter the desired state in time
127
134
  # end
128
135
  #
136
+ # @yieldparam [Resource] resource to be used in the waiting condition.
129
137
  #
130
- # @yield param [Resource] resource to be used in the waiting condition
131
- #
132
- # @raise [Aws::Waiters::Errors::FailureStateError] Raised when the waiter terminates
133
- # because the waiter has entered a state that it will not transition
134
- # 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.
135
141
  #
136
142
  # yet successful.
137
143
  #
138
- # @raise [Aws::Waiters::Errors::UnexpectedError] Raised when an error is encountered
139
- # 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.
140
146
  #
141
147
  # @raise [NotImplementedError] Raised when the resource does not
142
148
  #
@@ -170,8 +176,14 @@ module Aws::S3
170
176
 
171
177
  # @example Request syntax with placeholder values
172
178
  #
173
- # bucket_lifecycle_configuration.delete()
179
+ # bucket_lifecycle_configuration.delete({
180
+ # expected_bucket_owner: "AccountId",
181
+ # })
174
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.
175
187
  # @return [EmptyStructure]
176
188
  def delete(options = {})
177
189
  options = options.merge(bucket: @bucket_name)
@@ -231,9 +243,15 @@ module Aws::S3
231
243
  # },
232
244
  # ],
233
245
  # },
246
+ # expected_bucket_owner: "AccountId",
234
247
  # })
235
248
  # @param [Hash] options ({})
236
249
  # @option options [Types::BucketLifecycleConfiguration] :lifecycle_configuration
250
+ # Container for lifecycle rules. You can add as many as 1,000 rules.
251
+ # @option options [String] :expected_bucket_owner
252
+ # The account ID of the expected bucket owner. If the bucket is owned by
253
+ # a different account, the request will fail with an HTTP `403 (Access
254
+ # Denied)` error.
237
255
  # @return [EmptyStructure]
238
256
  def put(options = {})
239
257
  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,20 @@ 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 AWS Command Line Interface (CLI) or AWS
214
+ # SDKs, this field is calculated automatically.
215
+ # @option options [String] :expected_bucket_owner
216
+ # The account ID of the expected bucket owner. If the bucket is owned by
217
+ # a different account, the request will fail with an HTTP `403 (Access
218
+ # Denied)` error.
199
219
  # @return [EmptyStructure]
200
220
  def put(options = {})
201
221
  options = options.merge(bucket: @bucket_name)