aws-sdk-s3 1.17.0 → 1.114.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/CHANGELOG.md +903 -0
- data/LICENSE.txt +202 -0
- data/VERSION +1 -0
- data/lib/aws-sdk-s3/arn/access_point_arn.rb +69 -0
- data/lib/aws-sdk-s3/arn/multi_region_access_point_arn.rb +68 -0
- data/lib/aws-sdk-s3/arn/object_lambda_arn.rb +69 -0
- data/lib/aws-sdk-s3/arn/outpost_access_point_arn.rb +74 -0
- data/lib/aws-sdk-s3/bucket.rb +393 -75
- data/lib/aws-sdk-s3/bucket_acl.rb +57 -14
- data/lib/aws-sdk-s3/bucket_cors.rb +67 -13
- data/lib/aws-sdk-s3/bucket_lifecycle.rb +54 -15
- data/lib/aws-sdk-s3/bucket_lifecycle_configuration.rb +56 -15
- data/lib/aws-sdk-s3/bucket_logging.rb +52 -15
- data/lib/aws-sdk-s3/bucket_notification.rb +47 -17
- data/lib/aws-sdk-s3/bucket_policy.rb +51 -13
- data/lib/aws-sdk-s3/bucket_region_cache.rb +2 -0
- data/lib/aws-sdk-s3/bucket_request_payment.rb +51 -12
- data/lib/aws-sdk-s3/bucket_tagging.rb +59 -13
- data/lib/aws-sdk-s3/bucket_versioning.rb +118 -12
- data/lib/aws-sdk-s3/bucket_website.rb +66 -13
- data/lib/aws-sdk-s3/client.rb +11474 -2521
- data/lib/aws-sdk-s3/client_api.rb +1074 -4
- data/lib/aws-sdk-s3/customizations/bucket.rb +60 -17
- data/lib/aws-sdk-s3/customizations/multipart_upload.rb +2 -0
- data/lib/aws-sdk-s3/customizations/object.rb +200 -62
- data/lib/aws-sdk-s3/customizations/object_summary.rb +5 -0
- data/lib/aws-sdk-s3/customizations/types/list_object_versions_output.rb +2 -0
- data/lib/aws-sdk-s3/customizations.rb +4 -1
- data/lib/aws-sdk-s3/encryption/client.rb +23 -6
- data/lib/aws-sdk-s3/encryption/decrypt_handler.rb +71 -29
- data/lib/aws-sdk-s3/encryption/default_cipher_provider.rb +43 -5
- data/lib/aws-sdk-s3/encryption/default_key_provider.rb +2 -0
- data/lib/aws-sdk-s3/encryption/encrypt_handler.rb +13 -2
- data/lib/aws-sdk-s3/encryption/errors.rb +2 -0
- data/lib/aws-sdk-s3/encryption/io_auth_decrypter.rb +11 -3
- data/lib/aws-sdk-s3/encryption/io_decrypter.rb +11 -3
- data/lib/aws-sdk-s3/encryption/io_encrypter.rb +2 -0
- data/lib/aws-sdk-s3/encryption/key_provider.rb +2 -0
- data/lib/aws-sdk-s3/encryption/kms_cipher_provider.rb +34 -3
- data/lib/aws-sdk-s3/encryption/materials.rb +8 -6
- data/lib/aws-sdk-s3/encryption/utils.rb +25 -0
- data/lib/aws-sdk-s3/encryption.rb +4 -0
- data/lib/aws-sdk-s3/encryptionV2/client.rb +566 -0
- data/lib/aws-sdk-s3/encryptionV2/decrypt_handler.rb +222 -0
- data/lib/aws-sdk-s3/encryptionV2/default_cipher_provider.rb +170 -0
- data/lib/aws-sdk-s3/encryptionV2/default_key_provider.rb +40 -0
- data/lib/aws-sdk-s3/encryptionV2/encrypt_handler.rb +65 -0
- data/lib/aws-sdk-s3/encryptionV2/errors.rb +37 -0
- data/lib/aws-sdk-s3/encryptionV2/io_auth_decrypter.rb +58 -0
- data/lib/aws-sdk-s3/encryptionV2/io_decrypter.rb +37 -0
- data/lib/aws-sdk-s3/encryptionV2/io_encrypter.rb +73 -0
- data/lib/aws-sdk-s3/encryptionV2/key_provider.rb +31 -0
- data/lib/aws-sdk-s3/encryptionV2/kms_cipher_provider.rb +169 -0
- data/lib/aws-sdk-s3/encryptionV2/materials.rb +60 -0
- data/lib/aws-sdk-s3/encryptionV2/utils.rb +103 -0
- data/lib/aws-sdk-s3/encryption_v2.rb +23 -0
- data/lib/aws-sdk-s3/errors.rb +123 -1
- data/lib/aws-sdk-s3/event_streams.rb +20 -7
- data/lib/aws-sdk-s3/file_downloader.rb +17 -10
- data/lib/aws-sdk-s3/file_part.rb +11 -6
- data/lib/aws-sdk-s3/file_uploader.rb +33 -14
- data/lib/aws-sdk-s3/legacy_signer.rb +17 -25
- data/lib/aws-sdk-s3/multipart_file_uploader.rb +78 -19
- data/lib/aws-sdk-s3/multipart_stream_uploader.rb +21 -8
- data/lib/aws-sdk-s3/multipart_upload.rb +178 -28
- data/lib/aws-sdk-s3/multipart_upload_error.rb +2 -0
- data/lib/aws-sdk-s3/multipart_upload_part.rb +237 -44
- data/lib/aws-sdk-s3/object.rb +899 -154
- data/lib/aws-sdk-s3/object_acl.rb +81 -20
- data/lib/aws-sdk-s3/object_copier.rb +2 -0
- data/lib/aws-sdk-s3/object_multipart_copier.rb +2 -0
- data/lib/aws-sdk-s3/object_summary.rb +651 -139
- data/lib/aws-sdk-s3/object_version.rb +167 -65
- data/lib/aws-sdk-s3/plugins/accelerate.rb +38 -38
- data/lib/aws-sdk-s3/plugins/arn.rb +254 -0
- data/lib/aws-sdk-s3/plugins/bucket_dns.rb +8 -8
- data/lib/aws-sdk-s3/plugins/bucket_name_restrictions.rb +25 -3
- data/lib/aws-sdk-s3/plugins/dualstack.rb +38 -33
- data/lib/aws-sdk-s3/plugins/expect_100_continue.rb +4 -4
- data/lib/aws-sdk-s3/plugins/get_bucket_location_fix.rb +3 -1
- data/lib/aws-sdk-s3/plugins/http_200_errors.rb +11 -3
- data/lib/aws-sdk-s3/plugins/iad_regional_endpoint.rb +73 -0
- data/lib/aws-sdk-s3/plugins/location_constraint.rb +2 -0
- data/lib/aws-sdk-s3/plugins/md5s.rb +34 -27
- data/lib/aws-sdk-s3/plugins/object_lambda_endpoint.rb +25 -0
- data/lib/aws-sdk-s3/plugins/redirects.rb +2 -0
- data/lib/aws-sdk-s3/plugins/s3_host_id.rb +2 -0
- data/lib/aws-sdk-s3/plugins/s3_signer.rb +95 -36
- data/lib/aws-sdk-s3/plugins/skip_whole_multipart_get_checksums.rb +31 -0
- data/lib/aws-sdk-s3/plugins/sse_cpk.rb +3 -1
- data/lib/aws-sdk-s3/plugins/streaming_retry.rb +139 -0
- data/lib/aws-sdk-s3/plugins/url_encoded_keys.rb +2 -0
- data/lib/aws-sdk-s3/presigned_post.rb +110 -51
- data/lib/aws-sdk-s3/presigner.rb +169 -63
- data/lib/aws-sdk-s3/resource.rb +45 -5
- data/lib/aws-sdk-s3/types.rb +9872 -1303
- data/lib/aws-sdk-s3/waiters.rb +67 -1
- data/lib/aws-sdk-s3.rb +12 -6
- metadata +38 -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/
|
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
|
-
#
|
34
|
-
#
|
35
|
-
#
|
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
|
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)
|
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
|
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
|
-
# @
|
133
|
-
#
|
134
|
-
#
|
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
|
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,37 @@ module Aws::S3
|
|
192
202
|
# },
|
193
203
|
# },
|
194
204
|
# content_md5: "ContentMD5",
|
205
|
+
# checksum_algorithm: "CRC32", # accepts CRC32, CRC32C, SHA1, SHA256
|
206
|
+
# expected_bucket_owner: "AccountId",
|
195
207
|
# })
|
196
208
|
# @param [Hash] options ({})
|
197
209
|
# @option options [required, Types::BucketLoggingStatus] :bucket_logging_status
|
210
|
+
# Container for logging status information.
|
198
211
|
# @option options [String] :content_md5
|
212
|
+
# The MD5 hash of the `PutBucketLogging` request body.
|
213
|
+
#
|
214
|
+
# For requests made using the Amazon Web Services Command Line Interface
|
215
|
+
# (CLI) or Amazon Web Services SDKs, this field is calculated
|
216
|
+
# automatically.
|
217
|
+
# @option options [String] :checksum_algorithm
|
218
|
+
# Indicates the algorithm used to create the checksum for the object
|
219
|
+
# when using the SDK. This header will not provide any additional
|
220
|
+
# functionality if not using the SDK. When sending this header, there
|
221
|
+
# must be a corresponding `x-amz-checksum` or `x-amz-trailer` header
|
222
|
+
# sent. Otherwise, Amazon S3 fails the request with the HTTP status code
|
223
|
+
# `400 Bad Request`. For more information, see [Checking object
|
224
|
+
# integrity][1] in the *Amazon S3 User Guide*.
|
225
|
+
#
|
226
|
+
# If you provide an individual checksum, Amazon S3 ignores any provided
|
227
|
+
# `ChecksumAlgorithm` parameter.
|
228
|
+
#
|
229
|
+
#
|
230
|
+
#
|
231
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
|
232
|
+
# @option options [String] :expected_bucket_owner
|
233
|
+
# The account ID of the expected bucket owner. If the bucket is owned by
|
234
|
+
# a different account, the request fails with the HTTP status code `403
|
235
|
+
# Forbidden` (access denied).
|
199
236
|
# @return [EmptyStructure]
|
200
237
|
def put(options = {})
|
201
238
|
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/
|
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,21 +34,33 @@ module Aws::S3
|
|
30
34
|
@bucket_name
|
31
35
|
end
|
32
36
|
|
37
|
+
# The topic to which notifications are sent and the events for which
|
38
|
+
# notifications are generated.
|
33
39
|
# @return [Array<Types::TopicConfiguration>]
|
34
40
|
def topic_configurations
|
35
41
|
data[:topic_configurations]
|
36
42
|
end
|
37
43
|
|
44
|
+
# The Amazon Simple Queue Service queues to publish messages to and the
|
45
|
+
# events for which to publish messages.
|
38
46
|
# @return [Array<Types::QueueConfiguration>]
|
39
47
|
def queue_configurations
|
40
48
|
data[:queue_configurations]
|
41
49
|
end
|
42
50
|
|
51
|
+
# Describes the Lambda functions to invoke and the events for which to
|
52
|
+
# invoke them.
|
43
53
|
# @return [Array<Types::LambdaFunctionConfiguration>]
|
44
54
|
def lambda_function_configurations
|
45
55
|
data[:lambda_function_configurations]
|
46
56
|
end
|
47
57
|
|
58
|
+
# Enables delivery of events to Amazon EventBridge.
|
59
|
+
# @return [Types::EventBridgeConfiguration]
|
60
|
+
def event_bridge_configuration
|
61
|
+
data[:event_bridge_configuration]
|
62
|
+
end
|
63
|
+
|
48
64
|
# @!endgroup
|
49
65
|
|
50
66
|
# @return [Client]
|
@@ -85,7 +101,8 @@ module Aws::S3
|
|
85
101
|
# Waiter polls an API operation until a resource enters a desired
|
86
102
|
# state.
|
87
103
|
#
|
88
|
-
# @note The waiting operation is performed on a copy. The original resource
|
104
|
+
# @note The waiting operation is performed on a copy. The original resource
|
105
|
+
# remains unchanged.
|
89
106
|
#
|
90
107
|
# ## Basic Usage
|
91
108
|
#
|
@@ -98,13 +115,15 @@ module Aws::S3
|
|
98
115
|
#
|
99
116
|
# ## Example
|
100
117
|
#
|
101
|
-
# instance.wait_until(max_attempts:10, delay:5)
|
118
|
+
# instance.wait_until(max_attempts:10, delay:5) do |instance|
|
119
|
+
# instance.state.name == 'running'
|
120
|
+
# end
|
102
121
|
#
|
103
122
|
# ## Configuration
|
104
123
|
#
|
105
124
|
# You can configure the maximum number of polling attempts, and the
|
106
|
-
# delay (in seconds) between each polling attempt. The waiting condition is
|
107
|
-
# by passing a block to {#wait_until}:
|
125
|
+
# delay (in seconds) between each polling attempt. The waiting condition is
|
126
|
+
# set by passing a block to {#wait_until}:
|
108
127
|
#
|
109
128
|
# # poll for ~25 seconds
|
110
129
|
# resource.wait_until(max_attempts:5,delay:5) {|resource|...}
|
@@ -135,17 +154,16 @@ module Aws::S3
|
|
135
154
|
# # resource did not enter the desired state in time
|
136
155
|
# end
|
137
156
|
#
|
157
|
+
# @yieldparam [Resource] resource to be used in the waiting condition.
|
138
158
|
#
|
139
|
-
# @
|
140
|
-
#
|
141
|
-
#
|
142
|
-
# because the waiter has entered a state that it will not transition
|
143
|
-
# out of, preventing success.
|
159
|
+
# @raise [Aws::Waiters::Errors::FailureStateError] Raised when the waiter
|
160
|
+
# terminates because the waiter has entered a state that it will not
|
161
|
+
# transition out of, preventing success.
|
144
162
|
#
|
145
163
|
# yet successful.
|
146
164
|
#
|
147
|
-
# @raise [Aws::Waiters::Errors::UnexpectedError] Raised when an error is
|
148
|
-
# while polling for a resource that is not expected.
|
165
|
+
# @raise [Aws::Waiters::Errors::UnexpectedError] Raised when an error is
|
166
|
+
# encountered while polling for a resource that is not expected.
|
149
167
|
#
|
150
168
|
# @raise [NotImplementedError] Raised when the resource does not
|
151
169
|
#
|
@@ -185,7 +203,7 @@ module Aws::S3
|
|
185
203
|
# {
|
186
204
|
# id: "NotificationId",
|
187
205
|
# topic_arn: "TopicArn", # required
|
188
|
-
# 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
|
206
|
+
# 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, s3:ObjectRestore:Delete, s3:LifecycleTransition, s3:IntelligentTiering, s3:ObjectAcl:Put, s3:LifecycleExpiration:*, s3:LifecycleExpiration:Delete, s3:LifecycleExpiration:DeleteMarkerCreated, s3:ObjectTagging:*, s3:ObjectTagging:Put, s3:ObjectTagging:Delete
|
189
207
|
# filter: {
|
190
208
|
# key: {
|
191
209
|
# filter_rules: [
|
@@ -202,7 +220,7 @@ module Aws::S3
|
|
202
220
|
# {
|
203
221
|
# id: "NotificationId",
|
204
222
|
# queue_arn: "QueueArn", # required
|
205
|
-
# 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
|
223
|
+
# 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, s3:ObjectRestore:Delete, s3:LifecycleTransition, s3:IntelligentTiering, s3:ObjectAcl:Put, s3:LifecycleExpiration:*, s3:LifecycleExpiration:Delete, s3:LifecycleExpiration:DeleteMarkerCreated, s3:ObjectTagging:*, s3:ObjectTagging:Put, s3:ObjectTagging:Delete
|
206
224
|
# filter: {
|
207
225
|
# key: {
|
208
226
|
# filter_rules: [
|
@@ -219,7 +237,7 @@ module Aws::S3
|
|
219
237
|
# {
|
220
238
|
# id: "NotificationId",
|
221
239
|
# lambda_function_arn: "LambdaFunctionArn", # required
|
222
|
-
# 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
|
240
|
+
# 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, s3:ObjectRestore:Delete, s3:LifecycleTransition, s3:IntelligentTiering, s3:ObjectAcl:Put, s3:LifecycleExpiration:*, s3:LifecycleExpiration:Delete, s3:LifecycleExpiration:DeleteMarkerCreated, s3:ObjectTagging:*, s3:ObjectTagging:Put, s3:ObjectTagging:Delete
|
223
241
|
# filter: {
|
224
242
|
# key: {
|
225
243
|
# filter_rules: [
|
@@ -232,12 +250,24 @@ module Aws::S3
|
|
232
250
|
# },
|
233
251
|
# },
|
234
252
|
# ],
|
253
|
+
# event_bridge_configuration: {
|
254
|
+
# },
|
235
255
|
# },
|
256
|
+
# expected_bucket_owner: "AccountId",
|
257
|
+
# skip_destination_validation: false,
|
236
258
|
# })
|
237
259
|
# @param [Hash] options ({})
|
238
260
|
# @option options [required, Types::NotificationConfiguration] :notification_configuration
|
239
|
-
#
|
240
|
-
# If this element is empty, notifications are turned off
|
261
|
+
# A container for specifying the notification configuration of the
|
262
|
+
# bucket. If this element is empty, notifications are turned off for the
|
263
|
+
# bucket.
|
264
|
+
# @option options [String] :expected_bucket_owner
|
265
|
+
# The account ID of the expected bucket owner. If the bucket is owned by
|
266
|
+
# a different account, the request fails with the HTTP status code `403
|
267
|
+
# Forbidden` (access denied).
|
268
|
+
# @option options [Boolean] :skip_destination_validation
|
269
|
+
# Skips validation of Amazon SQS, Amazon SNS, and Lambda destinations.
|
270
|
+
# True or false value.
|
241
271
|
# @return [EmptyStructure]
|
242
272
|
def put(options = {})
|
243
273
|
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/
|
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
|
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)
|
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
|
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
|
-
# @
|
131
|
-
#
|
132
|
-
#
|
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
|
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 fails with the HTTP status code `403
|
186
|
+
# Forbidden` (access denied).
|
175
187
|
# @return [EmptyStructure]
|
176
188
|
def delete(options = {})
|
177
189
|
options = options.merge(bucket: @bucket_name)
|
@@ -183,16 +195,42 @@ module Aws::S3
|
|
183
195
|
#
|
184
196
|
# bucket_policy.put({
|
185
197
|
# content_md5: "ContentMD5",
|
198
|
+
# checksum_algorithm: "CRC32", # accepts CRC32, CRC32C, SHA1, SHA256
|
186
199
|
# confirm_remove_self_bucket_access: false,
|
187
200
|
# policy: "Policy", # required
|
201
|
+
# expected_bucket_owner: "AccountId",
|
188
202
|
# })
|
189
203
|
# @param [Hash] options ({})
|
190
204
|
# @option options [String] :content_md5
|
205
|
+
# The MD5 hash of the request body.
|
206
|
+
#
|
207
|
+
# For requests made using the Amazon Web Services Command Line Interface
|
208
|
+
# (CLI) or Amazon Web Services SDKs, this field is calculated
|
209
|
+
# automatically.
|
210
|
+
# @option options [String] :checksum_algorithm
|
211
|
+
# Indicates the algorithm used to create the checksum for the object
|
212
|
+
# when using the SDK. This header will not provide any additional
|
213
|
+
# functionality if not using the SDK. When sending this header, there
|
214
|
+
# must be a corresponding `x-amz-checksum` or `x-amz-trailer` header
|
215
|
+
# sent. Otherwise, Amazon S3 fails the request with the HTTP status code
|
216
|
+
# `400 Bad Request`. For more information, see [Checking object
|
217
|
+
# integrity][1] in the *Amazon S3 User Guide*.
|
218
|
+
#
|
219
|
+
# If you provide an individual checksum, Amazon S3 ignores any provided
|
220
|
+
# `ChecksumAlgorithm` parameter.
|
221
|
+
#
|
222
|
+
#
|
223
|
+
#
|
224
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
|
191
225
|
# @option options [Boolean] :confirm_remove_self_bucket_access
|
192
226
|
# Set this parameter to true to confirm that you want to remove your
|
193
227
|
# permissions to change this bucket policy in the future.
|
194
228
|
# @option options [required, String] :policy
|
195
229
|
# The bucket policy as a JSON document.
|
230
|
+
# @option options [String] :expected_bucket_owner
|
231
|
+
# The account ID of the expected bucket owner. If the bucket is owned by
|
232
|
+
# a different account, the request fails with the HTTP status code `403
|
233
|
+
# Forbidden` (access denied).
|
196
234
|
# @return [EmptyStructure]
|
197
235
|
def put(options = {})
|
198
236
|
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/
|
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
|
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)
|
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
|
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
|
-
# @
|
131
|
-
#
|
132
|
-
#
|
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
|
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
|
#
|
@@ -172,13 +178,46 @@ module Aws::S3
|
|
172
178
|
#
|
173
179
|
# bucket_request_payment.put({
|
174
180
|
# content_md5: "ContentMD5",
|
181
|
+
# checksum_algorithm: "CRC32", # accepts CRC32, CRC32C, SHA1, SHA256
|
175
182
|
# request_payment_configuration: { # required
|
176
183
|
# payer: "Requester", # required, accepts Requester, BucketOwner
|
177
184
|
# },
|
185
|
+
# expected_bucket_owner: "AccountId",
|
178
186
|
# })
|
179
187
|
# @param [Hash] options ({})
|
180
188
|
# @option options [String] :content_md5
|
189
|
+
# The base64-encoded 128-bit MD5 digest of the data. You must use this
|
190
|
+
# header as a message integrity check to verify that the request body
|
191
|
+
# was not corrupted in transit. For more information, see [RFC 1864][1].
|
192
|
+
#
|
193
|
+
# For requests made using the Amazon Web Services Command Line Interface
|
194
|
+
# (CLI) or Amazon Web Services SDKs, this field is calculated
|
195
|
+
# automatically.
|
196
|
+
#
|
197
|
+
#
|
198
|
+
#
|
199
|
+
# [1]: http://www.ietf.org/rfc/rfc1864.txt
|
200
|
+
# @option options [String] :checksum_algorithm
|
201
|
+
# Indicates the algorithm used to create the checksum for the object
|
202
|
+
# when using the SDK. This header will not provide any additional
|
203
|
+
# functionality if not using the SDK. When sending this header, there
|
204
|
+
# must be a corresponding `x-amz-checksum` or `x-amz-trailer` header
|
205
|
+
# sent. Otherwise, Amazon S3 fails the request with the HTTP status code
|
206
|
+
# `400 Bad Request`. For more information, see [Checking object
|
207
|
+
# integrity][1] in the *Amazon S3 User Guide*.
|
208
|
+
#
|
209
|
+
# If you provide an individual checksum, Amazon S3 ignores any provided
|
210
|
+
# `ChecksumAlgorithm` parameter.
|
211
|
+
#
|
212
|
+
#
|
213
|
+
#
|
214
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
|
181
215
|
# @option options [required, Types::RequestPaymentConfiguration] :request_payment_configuration
|
216
|
+
# Container for Payer.
|
217
|
+
# @option options [String] :expected_bucket_owner
|
218
|
+
# The account ID of the expected bucket owner. If the bucket is owned by
|
219
|
+
# a different account, the request fails with the HTTP status code `403
|
220
|
+
# Forbidden` (access denied).
|
182
221
|
# @return [EmptyStructure]
|
183
222
|
def put(options = {})
|
184
223
|
options = options.merge(bucket: @bucket_name)
|