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 BucketNotification
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,19 +34,22 @@ module Aws::S3
30
34
  @bucket_name
31
35
  end
32
36
 
33
-
37
+ # The topic to which notifications are sent and the events for which
38
+ # notifications are generated.
34
39
  # @return [Array<Types::TopicConfiguration>]
35
40
  def topic_configurations
36
41
  data[:topic_configurations]
37
42
  end
38
43
 
39
-
44
+ # The Amazon Simple Queue Service queues to publish messages to and the
45
+ # events for which to publish messages.
40
46
  # @return [Array<Types::QueueConfiguration>]
41
47
  def queue_configurations
42
48
  data[:queue_configurations]
43
49
  end
44
50
 
45
-
51
+ # Describes the AWS Lambda functions to invoke and the events for which
52
+ # to invoke them.
46
53
  # @return [Array<Types::LambdaFunctionConfiguration>]
47
54
  def lambda_function_configurations
48
55
  data[:lambda_function_configurations]
@@ -88,7 +95,8 @@ module Aws::S3
88
95
  # Waiter polls an API operation until a resource enters a desired
89
96
  # state.
90
97
  #
91
- # @note The waiting operation is performed on a copy. The original resource remains unchanged
98
+ # @note The waiting operation is performed on a copy. The original resource
99
+ # remains unchanged.
92
100
  #
93
101
  # ## Basic Usage
94
102
  #
@@ -101,13 +109,15 @@ module Aws::S3
101
109
  #
102
110
  # ## Example
103
111
  #
104
- # instance.wait_until(max_attempts:10, delay:5) {|instance| instance.state.name == 'running' }
112
+ # instance.wait_until(max_attempts:10, delay:5) do |instance|
113
+ # instance.state.name == 'running'
114
+ # end
105
115
  #
106
116
  # ## Configuration
107
117
  #
108
118
  # You can configure the maximum number of polling attempts, and the
109
- # delay (in seconds) between each polling attempt. The waiting condition is set
110
- # by passing a block to {#wait_until}:
119
+ # delay (in seconds) between each polling attempt. The waiting condition is
120
+ # set by passing a block to {#wait_until}:
111
121
  #
112
122
  # # poll for ~25 seconds
113
123
  # resource.wait_until(max_attempts:5,delay:5) {|resource|...}
@@ -138,17 +148,16 @@ module Aws::S3
138
148
  # # resource did not enter the desired state in time
139
149
  # end
140
150
  #
151
+ # @yieldparam [Resource] resource to be used in the waiting condition.
141
152
  #
142
- # @yield param [Resource] resource to be used in the waiting condition
143
- #
144
- # @raise [Aws::Waiters::Errors::FailureStateError] Raised when the waiter terminates
145
- # because the waiter has entered a state that it will not transition
146
- # out of, preventing success.
153
+ # @raise [Aws::Waiters::Errors::FailureStateError] Raised when the waiter
154
+ # terminates because the waiter has entered a state that it will not
155
+ # transition out of, preventing success.
147
156
  #
148
157
  # yet successful.
149
158
  #
150
- # @raise [Aws::Waiters::Errors::UnexpectedError] Raised when an error is encountered
151
- # while polling for a resource that is not expected.
159
+ # @raise [Aws::Waiters::Errors::UnexpectedError] Raised when an error is
160
+ # encountered while polling for a resource that is not expected.
152
161
  #
153
162
  # @raise [NotImplementedError] Raised when the resource does not
154
163
  #
@@ -188,7 +197,7 @@ module Aws::S3
188
197
  # {
189
198
  # id: "NotificationId",
190
199
  # topic_arn: "TopicArn", # required
191
- # events: ["s3:ReducedRedundancyLostObject"], # required, accepts s3:ReducedRedundancyLostObject, s3:ObjectCreated:*, s3:ObjectCreated:Put, s3:ObjectCreated:Post, s3:ObjectCreated:Copy, s3:ObjectCreated:CompleteMultipartUpload, s3:ObjectRemoved:*, s3:ObjectRemoved:Delete, s3:ObjectRemoved:DeleteMarkerCreated, s3:ObjectRestore:Post, s3:ObjectRestore:Completed
200
+ # events: ["s3:ReducedRedundancyLostObject"], # required, accepts s3:ReducedRedundancyLostObject, s3:ObjectCreated:*, s3:ObjectCreated:Put, s3:ObjectCreated:Post, s3:ObjectCreated:Copy, s3:ObjectCreated:CompleteMultipartUpload, s3:ObjectRemoved:*, s3:ObjectRemoved:Delete, s3:ObjectRemoved:DeleteMarkerCreated, s3:ObjectRestore:*, s3:ObjectRestore:Post, s3:ObjectRestore:Completed, s3:Replication:*, s3:Replication:OperationFailedReplication, s3:Replication:OperationNotTracked, s3:Replication:OperationMissedThreshold, s3:Replication:OperationReplicatedAfterThreshold
192
201
  # filter: {
193
202
  # key: {
194
203
  # filter_rules: [
@@ -205,7 +214,7 @@ module Aws::S3
205
214
  # {
206
215
  # id: "NotificationId",
207
216
  # queue_arn: "QueueArn", # required
208
- # events: ["s3:ReducedRedundancyLostObject"], # required, accepts s3:ReducedRedundancyLostObject, s3:ObjectCreated:*, s3:ObjectCreated:Put, s3:ObjectCreated:Post, s3:ObjectCreated:Copy, s3:ObjectCreated:CompleteMultipartUpload, s3:ObjectRemoved:*, s3:ObjectRemoved:Delete, s3:ObjectRemoved:DeleteMarkerCreated, s3:ObjectRestore:Post, s3:ObjectRestore:Completed
217
+ # events: ["s3:ReducedRedundancyLostObject"], # required, accepts s3:ReducedRedundancyLostObject, s3:ObjectCreated:*, s3:ObjectCreated:Put, s3:ObjectCreated:Post, s3:ObjectCreated:Copy, s3:ObjectCreated:CompleteMultipartUpload, s3:ObjectRemoved:*, s3:ObjectRemoved:Delete, s3:ObjectRemoved:DeleteMarkerCreated, s3:ObjectRestore:*, s3:ObjectRestore:Post, s3:ObjectRestore:Completed, s3:Replication:*, s3:Replication:OperationFailedReplication, s3:Replication:OperationNotTracked, s3:Replication:OperationMissedThreshold, s3:Replication:OperationReplicatedAfterThreshold
209
218
  # filter: {
210
219
  # key: {
211
220
  # filter_rules: [
@@ -222,7 +231,7 @@ module Aws::S3
222
231
  # {
223
232
  # id: "NotificationId",
224
233
  # lambda_function_arn: "LambdaFunctionArn", # required
225
- # events: ["s3:ReducedRedundancyLostObject"], # required, accepts s3:ReducedRedundancyLostObject, s3:ObjectCreated:*, s3:ObjectCreated:Put, s3:ObjectCreated:Post, s3:ObjectCreated:Copy, s3:ObjectCreated:CompleteMultipartUpload, s3:ObjectRemoved:*, s3:ObjectRemoved:Delete, s3:ObjectRemoved:DeleteMarkerCreated, s3:ObjectRestore:Post, s3:ObjectRestore:Completed
234
+ # events: ["s3:ReducedRedundancyLostObject"], # required, accepts s3:ReducedRedundancyLostObject, s3:ObjectCreated:*, s3:ObjectCreated:Put, s3:ObjectCreated:Post, s3:ObjectCreated:Copy, s3:ObjectCreated:CompleteMultipartUpload, s3:ObjectRemoved:*, s3:ObjectRemoved:Delete, s3:ObjectRemoved:DeleteMarkerCreated, s3:ObjectRestore:*, s3:ObjectRestore:Post, s3:ObjectRestore:Completed, s3:Replication:*, s3:Replication:OperationFailedReplication, s3:Replication:OperationNotTracked, s3:Replication:OperationMissedThreshold, s3:Replication:OperationReplicatedAfterThreshold
226
235
  # filter: {
227
236
  # key: {
228
237
  # filter_rules: [
@@ -236,12 +245,17 @@ module Aws::S3
236
245
  # },
237
246
  # ],
238
247
  # },
248
+ # expected_bucket_owner: "AccountId",
239
249
  # })
240
250
  # @param [Hash] options ({})
241
251
  # @option options [required, Types::NotificationConfiguration] :notification_configuration
242
252
  # A container for specifying the notification configuration of the
243
253
  # bucket. If this element is empty, notifications are turned off for the
244
254
  # bucket.
255
+ # @option options [String] :expected_bucket_owner
256
+ # The account ID of the expected bucket owner. If the bucket is owned by
257
+ # a different account, the request will fail with an HTTP `403 (Access
258
+ # Denied)` error.
245
259
  # @return [EmptyStructure]
246
260
  def put(options = {})
247
261
  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 BucketPolicy
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
@@ -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_policy.delete()
179
+ # bucket_policy.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)
@@ -185,14 +197,23 @@ module Aws::S3
185
197
  # content_md5: "ContentMD5",
186
198
  # confirm_remove_self_bucket_access: false,
187
199
  # policy: "Policy", # required
200
+ # expected_bucket_owner: "AccountId",
188
201
  # })
189
202
  # @param [Hash] options ({})
190
203
  # @option options [String] :content_md5
204
+ # The MD5 hash of the request body.
205
+ #
206
+ # For requests made using the AWS Command Line Interface (CLI) or AWS
207
+ # SDKs, this field is calculated automatically.
191
208
  # @option options [Boolean] :confirm_remove_self_bucket_access
192
209
  # Set this parameter to true to confirm that you want to remove your
193
210
  # permissions to change this bucket policy in the future.
194
211
  # @option options [required, String] :policy
195
212
  # The bucket policy as a JSON document.
213
+ # @option options [String] :expected_bucket_owner
214
+ # The account ID of the expected bucket owner. If the bucket is owned by
215
+ # a different account, the request will fail with an HTTP `403 (Access
216
+ # Denied)` error.
196
217
  # @return [EmptyStructure]
197
218
  def put(options = {})
198
219
  options = options.merge(bucket: @bucket_name)
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'thread'
2
4
 
3
5
  module Aws
@@ -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 BucketRequestPayment
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
@@ -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
  #
@@ -175,10 +181,26 @@ module Aws::S3
175
181
  # request_payment_configuration: { # required
176
182
  # payer: "Requester", # required, accepts Requester, BucketOwner
177
183
  # },
184
+ # expected_bucket_owner: "AccountId",
178
185
  # })
179
186
  # @param [Hash] options ({})
180
187
  # @option options [String] :content_md5
188
+ # The base64-encoded 128-bit MD5 digest of the data. You must use this
189
+ # header as a message integrity check to verify that the request body
190
+ # was not corrupted in transit. For more information, see [RFC 1864][1].
191
+ #
192
+ # For requests made using the AWS Command Line Interface (CLI) or AWS
193
+ # SDKs, this field is calculated automatically.
194
+ #
195
+ #
196
+ #
197
+ # [1]: http://www.ietf.org/rfc/rfc1864.txt
181
198
  # @option options [required, Types::RequestPaymentConfiguration] :request_payment_configuration
199
+ # Container for Payer.
200
+ # @option options [String] :expected_bucket_owner
201
+ # The account ID of the expected bucket owner. If the bucket is owned by
202
+ # a different account, the request will fail with an HTTP `403 (Access
203
+ # Denied)` error.
182
204
  # @return [EmptyStructure]
183
205
  def put(options = {})
184
206
  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 BucketTagging
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
+ # Contains the tag set.
34
38
  # @return [Array<Types::Tag>]
35
39
  def tag_set
36
40
  data[:tag_set]
@@ -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_tagging.delete()
179
+ # bucket_tagging.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)
@@ -191,10 +203,26 @@ module Aws::S3
191
203
  # },
192
204
  # ],
193
205
  # },
206
+ # expected_bucket_owner: "AccountId",
194
207
  # })
195
208
  # @param [Hash] options ({})
196
209
  # @option options [String] :content_md5
210
+ # The base64-encoded 128-bit MD5 digest of the data. You must use this
211
+ # header as a message integrity check to verify that the request body
212
+ # was not corrupted in transit. For more information, see [RFC 1864][1].
213
+ #
214
+ # For requests made using the AWS Command Line Interface (CLI) or AWS
215
+ # SDKs, this field is calculated automatically.
216
+ #
217
+ #
218
+ #
219
+ # [1]: http://www.ietf.org/rfc/rfc1864.txt
197
220
  # @option options [required, Types::Tagging] :tagging
221
+ # Container for the `TagSet` and `Tag` elements.
222
+ # @option options [String] :expected_bucket_owner
223
+ # The account ID of the expected bucket owner. If the bucket is owned by
224
+ # a different account, the request will fail with an HTTP `403 (Access
225
+ # Denied)` error.
198
226
  # @return [EmptyStructure]
199
227
  def put(options = {})
200
228
  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 BucketVersioning
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
@@ -85,7 +89,8 @@ module Aws::S3
85
89
  # Waiter polls an API operation until a resource enters a desired
86
90
  # state.
87
91
  #
88
- # @note The waiting operation is performed on a copy. The original resource remains unchanged
92
+ # @note The waiting operation is performed on a copy. The original resource
93
+ # remains unchanged.
89
94
  #
90
95
  # ## Basic Usage
91
96
  #
@@ -98,13 +103,15 @@ module Aws::S3
98
103
  #
99
104
  # ## Example
100
105
  #
101
- # instance.wait_until(max_attempts:10, delay:5) {|instance| instance.state.name == 'running' }
106
+ # instance.wait_until(max_attempts:10, delay:5) do |instance|
107
+ # instance.state.name == 'running'
108
+ # end
102
109
  #
103
110
  # ## Configuration
104
111
  #
105
112
  # You can configure the maximum number of polling attempts, and the
106
- # delay (in seconds) between each polling attempt. The waiting condition is set
107
- # by passing a block to {#wait_until}:
113
+ # delay (in seconds) between each polling attempt. The waiting condition is
114
+ # set by passing a block to {#wait_until}:
108
115
  #
109
116
  # # poll for ~25 seconds
110
117
  # resource.wait_until(max_attempts:5,delay:5) {|resource|...}
@@ -135,17 +142,16 @@ module Aws::S3
135
142
  # # resource did not enter the desired state in time
136
143
  # end
137
144
  #
145
+ # @yieldparam [Resource] resource to be used in the waiting condition.
138
146
  #
139
- # @yield param [Resource] resource to be used in the waiting condition
140
- #
141
- # @raise [Aws::Waiters::Errors::FailureStateError] Raised when the waiter terminates
142
- # because the waiter has entered a state that it will not transition
143
- # out of, preventing success.
147
+ # @raise [Aws::Waiters::Errors::FailureStateError] Raised when the waiter
148
+ # terminates because the waiter has entered a state that it will not
149
+ # transition out of, preventing success.
144
150
  #
145
151
  # yet successful.
146
152
  #
147
- # @raise [Aws::Waiters::Errors::UnexpectedError] Raised when an error is encountered
148
- # while polling for a resource that is not expected.
153
+ # @raise [Aws::Waiters::Errors::UnexpectedError] Raised when an error is
154
+ # encountered while polling for a resource that is not expected.
149
155
  #
150
156
  # @raise [NotImplementedError] Raised when the resource does not
151
157
  #
@@ -182,12 +188,28 @@ module Aws::S3
182
188
  # bucket_versioning.enable({
183
189
  # content_md5: "ContentMD5",
184
190
  # mfa: "MFA",
191
+ # expected_bucket_owner: "AccountId",
185
192
  # })
186
193
  # @param [Hash] options ({})
187
194
  # @option options [String] :content_md5
195
+ # &gt;The base64-encoded 128-bit MD5 digest of the data. You must use
196
+ # this header as a message integrity check to verify that the request
197
+ # body was not corrupted in transit. For more information, see [RFC
198
+ # 1864][1].
199
+ #
200
+ # For requests made using the AWS Command Line Interface (CLI) or AWS
201
+ # SDKs, this field is calculated automatically.
202
+ #
203
+ #
204
+ #
205
+ # [1]: http://www.ietf.org/rfc/rfc1864.txt
188
206
  # @option options [String] :mfa
189
207
  # The concatenation of the authentication device's serial number, a
190
208
  # space, and the value that is displayed on your authentication device.
209
+ # @option options [String] :expected_bucket_owner
210
+ # The account ID of the expected bucket owner. If the bucket is owned by
211
+ # a different account, the request will fail with an HTTP `403 (Access
212
+ # Denied)` error.
191
213
  # @return [EmptyStructure]
192
214
  def enable(options = {})
193
215
  options = Aws::Util.deep_merge(options,
@@ -209,13 +231,30 @@ module Aws::S3
209
231
  # mfa_delete: "Enabled", # accepts Enabled, Disabled
210
232
  # status: "Enabled", # accepts Enabled, Suspended
211
233
  # },
234
+ # expected_bucket_owner: "AccountId",
212
235
  # })
213
236
  # @param [Hash] options ({})
214
237
  # @option options [String] :content_md5
238
+ # &gt;The base64-encoded 128-bit MD5 digest of the data. You must use
239
+ # this header as a message integrity check to verify that the request
240
+ # body was not corrupted in transit. For more information, see [RFC
241
+ # 1864][1].
242
+ #
243
+ # For requests made using the AWS Command Line Interface (CLI) or AWS
244
+ # SDKs, this field is calculated automatically.
245
+ #
246
+ #
247
+ #
248
+ # [1]: http://www.ietf.org/rfc/rfc1864.txt
215
249
  # @option options [String] :mfa
216
250
  # The concatenation of the authentication device's serial number, a
217
251
  # space, and the value that is displayed on your authentication device.
218
252
  # @option options [required, Types::VersioningConfiguration] :versioning_configuration
253
+ # Container for setting the versioning state.
254
+ # @option options [String] :expected_bucket_owner
255
+ # The account ID of the expected bucket owner. If the bucket is owned by
256
+ # a different account, the request will fail with an HTTP `403 (Access
257
+ # Denied)` error.
219
258
  # @return [EmptyStructure]
220
259
  def put(options = {})
221
260
  options = options.merge(bucket: @bucket_name)
@@ -228,12 +267,28 @@ module Aws::S3
228
267
  # bucket_versioning.suspend({
229
268
  # content_md5: "ContentMD5",
230
269
  # mfa: "MFA",
270
+ # expected_bucket_owner: "AccountId",
231
271
  # })
232
272
  # @param [Hash] options ({})
233
273
  # @option options [String] :content_md5
274
+ # &gt;The base64-encoded 128-bit MD5 digest of the data. You must use
275
+ # this header as a message integrity check to verify that the request
276
+ # body was not corrupted in transit. For more information, see [RFC
277
+ # 1864][1].
278
+ #
279
+ # For requests made using the AWS Command Line Interface (CLI) or AWS
280
+ # SDKs, this field is calculated automatically.
281
+ #
282
+ #
283
+ #
284
+ # [1]: http://www.ietf.org/rfc/rfc1864.txt
234
285
  # @option options [String] :mfa
235
286
  # The concatenation of the authentication device's serial number, a
236
287
  # space, and the value that is displayed on your authentication device.
288
+ # @option options [String] :expected_bucket_owner
289
+ # The account ID of the expected bucket owner. If the bucket is owned by
290
+ # a different account, the request will fail with an HTTP `403 (Access
291
+ # Denied)` error.
237
292
  # @return [EmptyStructure]
238
293
  def suspend(options = {})
239
294
  options = Aws::Util.deep_merge(options,