aws-sdk-s3 1.79.1 → 1.212.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +1548 -0
- data/LICENSE.txt +202 -0
- data/VERSION +1 -0
- data/lib/aws-sdk-s3/access_grants_credentials.rb +57 -0
- data/lib/aws-sdk-s3/access_grants_credentials_provider.rb +250 -0
- data/lib/aws-sdk-s3/bucket.rb +900 -98
- data/lib/aws-sdk-s3/bucket_acl.rb +44 -10
- data/lib/aws-sdk-s3/bucket_cors.rb +51 -11
- data/lib/aws-sdk-s3/bucket_lifecycle.rb +53 -8
- data/lib/aws-sdk-s3/bucket_lifecycle_configuration.rb +107 -9
- data/lib/aws-sdk-s3/bucket_logging.rb +43 -6
- data/lib/aws-sdk-s3/bucket_notification.rb +32 -9
- data/lib/aws-sdk-s3/bucket_policy.rb +90 -6
- data/lib/aws-sdk-s3/bucket_region_cache.rb +9 -5
- data/lib/aws-sdk-s3/bucket_request_payment.rb +38 -8
- data/lib/aws-sdk-s3/bucket_tagging.rb +46 -7
- data/lib/aws-sdk-s3/bucket_versioning.rb +127 -9
- data/lib/aws-sdk-s3/bucket_website.rb +46 -7
- data/lib/aws-sdk-s3/client.rb +13729 -3146
- data/lib/aws-sdk-s3/client_api.rb +1604 -277
- data/lib/aws-sdk-s3/customizations/bucket.rb +31 -47
- data/lib/aws-sdk-s3/customizations/errors.rb +40 -0
- data/lib/aws-sdk-s3/customizations/object.rb +253 -82
- data/lib/aws-sdk-s3/customizations/object_summary.rb +5 -0
- data/lib/aws-sdk-s3/customizations/object_version.rb +13 -0
- data/lib/aws-sdk-s3/customizations/types/permanent_redirect.rb +26 -0
- data/lib/aws-sdk-s3/customizations.rb +28 -29
- data/lib/aws-sdk-s3/default_executor.rb +103 -0
- data/lib/aws-sdk-s3/encryption/client.rb +9 -5
- data/lib/aws-sdk-s3/encryption/decrypt_handler.rb +0 -4
- data/lib/aws-sdk-s3/encryption/default_cipher_provider.rb +2 -0
- data/lib/aws-sdk-s3/encryption/encrypt_handler.rb +2 -0
- data/lib/aws-sdk-s3/encryption/kms_cipher_provider.rb +15 -9
- data/lib/aws-sdk-s3/encryptionV2/client.rb +105 -26
- data/lib/aws-sdk-s3/encryptionV2/decrypt_handler.rb +7 -165
- data/lib/aws-sdk-s3/encryptionV2/decryption.rb +205 -0
- data/lib/aws-sdk-s3/encryptionV2/default_cipher_provider.rb +20 -3
- data/lib/aws-sdk-s3/encryptionV2/encrypt_handler.rb +2 -4
- data/lib/aws-sdk-s3/encryptionV2/io_encrypter.rb +2 -0
- data/lib/aws-sdk-s3/encryptionV2/kms_cipher_provider.rb +18 -6
- data/lib/aws-sdk-s3/encryptionV2/utils.rb +5 -0
- data/lib/aws-sdk-s3/encryptionV3/client.rb +885 -0
- data/lib/aws-sdk-s3/encryptionV3/decrypt_handler.rb +98 -0
- data/lib/aws-sdk-s3/encryptionV3/decryption.rb +244 -0
- data/lib/aws-sdk-s3/encryptionV3/default_cipher_provider.rb +159 -0
- data/lib/aws-sdk-s3/encryptionV3/default_key_provider.rb +35 -0
- data/lib/aws-sdk-s3/encryptionV3/encrypt_handler.rb +98 -0
- data/lib/aws-sdk-s3/encryptionV3/errors.rb +47 -0
- data/lib/aws-sdk-s3/encryptionV3/io_auth_decrypter.rb +60 -0
- data/lib/aws-sdk-s3/encryptionV3/io_decrypter.rb +35 -0
- data/lib/aws-sdk-s3/encryptionV3/io_encrypter.rb +84 -0
- data/lib/aws-sdk-s3/encryptionV3/key_provider.rb +28 -0
- data/lib/aws-sdk-s3/encryptionV3/kms_cipher_provider.rb +159 -0
- data/lib/aws-sdk-s3/encryptionV3/materials.rb +58 -0
- data/lib/aws-sdk-s3/encryptionV3/utils.rb +321 -0
- data/lib/aws-sdk-s3/encryption_v2.rb +1 -0
- data/lib/aws-sdk-s3/encryption_v3.rb +24 -0
- data/lib/aws-sdk-s3/endpoint_parameters.rb +181 -0
- data/lib/aws-sdk-s3/endpoint_provider.rb +889 -0
- data/lib/aws-sdk-s3/endpoints.rb +1544 -0
- data/lib/aws-sdk-s3/errors.rb +80 -1
- data/lib/aws-sdk-s3/event_streams.rb +1 -1
- data/lib/aws-sdk-s3/express_credentials.rb +55 -0
- data/lib/aws-sdk-s3/express_credentials_provider.rb +59 -0
- data/lib/aws-sdk-s3/file_downloader.rb +258 -82
- data/lib/aws-sdk-s3/file_uploader.rb +25 -14
- data/lib/aws-sdk-s3/legacy_signer.rb +17 -26
- data/lib/aws-sdk-s3/multipart_download_error.rb +8 -0
- data/lib/aws-sdk-s3/multipart_file_uploader.rb +111 -86
- data/lib/aws-sdk-s3/multipart_stream_uploader.rb +110 -92
- data/lib/aws-sdk-s3/multipart_upload.rb +304 -14
- data/lib/aws-sdk-s3/multipart_upload_error.rb +3 -4
- data/lib/aws-sdk-s3/multipart_upload_part.rb +344 -20
- data/lib/aws-sdk-s3/object.rb +2457 -225
- data/lib/aws-sdk-s3/object_acl.rb +76 -15
- data/lib/aws-sdk-s3/object_copier.rb +7 -5
- data/lib/aws-sdk-s3/object_multipart_copier.rb +48 -23
- data/lib/aws-sdk-s3/object_summary.rb +2033 -169
- data/lib/aws-sdk-s3/object_version.rb +470 -53
- data/lib/aws-sdk-s3/plugins/accelerate.rb +1 -39
- data/lib/aws-sdk-s3/plugins/access_grants.rb +178 -0
- data/lib/aws-sdk-s3/plugins/arn.rb +70 -0
- data/lib/aws-sdk-s3/plugins/bucket_dns.rb +3 -41
- data/lib/aws-sdk-s3/plugins/bucket_name_restrictions.rb +1 -6
- data/lib/aws-sdk-s3/plugins/checksum_algorithm.rb +44 -0
- data/lib/aws-sdk-s3/plugins/dualstack.rb +2 -49
- data/lib/aws-sdk-s3/plugins/endpoints.rb +86 -0
- data/lib/aws-sdk-s3/plugins/expect_100_continue.rb +3 -1
- data/lib/aws-sdk-s3/plugins/express_session_auth.rb +88 -0
- data/lib/aws-sdk-s3/plugins/get_bucket_location_fix.rb +1 -1
- data/lib/aws-sdk-s3/plugins/http_200_errors.rb +87 -26
- data/lib/aws-sdk-s3/plugins/iad_regional_endpoint.rb +8 -26
- data/lib/aws-sdk-s3/plugins/location_constraint.rb +3 -1
- data/lib/aws-sdk-s3/plugins/md5s.rb +10 -68
- data/lib/aws-sdk-s3/plugins/s3_signer.rb +48 -88
- data/lib/aws-sdk-s3/plugins/streaming_retry.rb +28 -9
- data/lib/aws-sdk-s3/plugins/url_encoded_keys.rb +2 -1
- data/lib/aws-sdk-s3/presigned_post.rb +99 -78
- data/lib/aws-sdk-s3/presigner.rb +50 -42
- data/lib/aws-sdk-s3/resource.rb +144 -15
- data/lib/aws-sdk-s3/transfer_manager.rb +321 -0
- data/lib/aws-sdk-s3/types.rb +12223 -4723
- data/lib/aws-sdk-s3/waiters.rb +1 -1
- data/lib/aws-sdk-s3.rb +37 -28
- data/sig/bucket.rbs +231 -0
- data/sig/bucket_acl.rbs +78 -0
- data/sig/bucket_cors.rbs +69 -0
- data/sig/bucket_lifecycle.rbs +88 -0
- data/sig/bucket_lifecycle_configuration.rbs +115 -0
- data/sig/bucket_logging.rbs +76 -0
- data/sig/bucket_notification.rbs +114 -0
- data/sig/bucket_policy.rbs +59 -0
- data/sig/bucket_request_payment.rbs +54 -0
- data/sig/bucket_tagging.rbs +65 -0
- data/sig/bucket_versioning.rbs +77 -0
- data/sig/bucket_website.rbs +93 -0
- data/sig/client.rbs +2612 -0
- data/sig/customizations/bucket.rbs +19 -0
- data/sig/customizations/object.rbs +38 -0
- data/sig/customizations/object_summary.rbs +35 -0
- data/sig/errors.rbs +44 -0
- data/sig/multipart_upload.rbs +120 -0
- data/sig/multipart_upload_part.rbs +109 -0
- data/sig/object.rbs +464 -0
- data/sig/object_acl.rbs +86 -0
- data/sig/object_summary.rbs +347 -0
- data/sig/object_version.rbs +143 -0
- data/sig/resource.rbs +141 -0
- data/sig/types.rbs +2899 -0
- data/sig/waiters.rbs +95 -0
- metadata +74 -16
- data/lib/aws-sdk-s3/plugins/bucket_arn.rb +0 -212
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
# WARNING ABOUT GENERATED CODE
|
|
4
4
|
#
|
|
5
5
|
# This file is generated. See the contributing guide for more information:
|
|
6
|
-
# https://github.com/aws/aws-sdk-ruby/blob/
|
|
6
|
+
# https://github.com/aws/aws-sdk-ruby/blob/version-3/CONTRIBUTING.md
|
|
7
7
|
#
|
|
8
8
|
# WARNING ABOUT GENERATED CODE
|
|
9
9
|
|
|
@@ -48,13 +48,19 @@ module Aws::S3
|
|
|
48
48
|
data[:queue_configurations]
|
|
49
49
|
end
|
|
50
50
|
|
|
51
|
-
# Describes the
|
|
52
|
-
#
|
|
51
|
+
# Describes the Lambda functions to invoke and the events for which to
|
|
52
|
+
# invoke them.
|
|
53
53
|
# @return [Array<Types::LambdaFunctionConfiguration>]
|
|
54
54
|
def lambda_function_configurations
|
|
55
55
|
data[:lambda_function_configurations]
|
|
56
56
|
end
|
|
57
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
|
+
|
|
58
64
|
# @!endgroup
|
|
59
65
|
|
|
60
66
|
# @return [Client]
|
|
@@ -69,7 +75,9 @@ module Aws::S3
|
|
|
69
75
|
#
|
|
70
76
|
# @return [self]
|
|
71
77
|
def load
|
|
72
|
-
resp =
|
|
78
|
+
resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
|
79
|
+
@client.get_bucket_notification_configuration(bucket: @bucket_name)
|
|
80
|
+
end
|
|
73
81
|
@data = resp.data
|
|
74
82
|
self
|
|
75
83
|
end
|
|
@@ -184,7 +192,9 @@ module Aws::S3
|
|
|
184
192
|
:retry
|
|
185
193
|
end
|
|
186
194
|
end
|
|
187
|
-
Aws::
|
|
195
|
+
Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
|
196
|
+
Aws::Waiters::Waiter.new(options).wait({})
|
|
197
|
+
end
|
|
188
198
|
end
|
|
189
199
|
|
|
190
200
|
# @!group Actions
|
|
@@ -197,7 +207,7 @@ module Aws::S3
|
|
|
197
207
|
# {
|
|
198
208
|
# id: "NotificationId",
|
|
199
209
|
# topic_arn: "TopicArn", # required
|
|
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
|
|
210
|
+
# 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
|
|
201
211
|
# filter: {
|
|
202
212
|
# key: {
|
|
203
213
|
# filter_rules: [
|
|
@@ -214,7 +224,7 @@ module Aws::S3
|
|
|
214
224
|
# {
|
|
215
225
|
# id: "NotificationId",
|
|
216
226
|
# queue_arn: "QueueArn", # required
|
|
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
|
|
227
|
+
# 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
|
|
218
228
|
# filter: {
|
|
219
229
|
# key: {
|
|
220
230
|
# filter_rules: [
|
|
@@ -231,7 +241,7 @@ module Aws::S3
|
|
|
231
241
|
# {
|
|
232
242
|
# id: "NotificationId",
|
|
233
243
|
# lambda_function_arn: "LambdaFunctionArn", # required
|
|
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
|
|
244
|
+
# 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
|
|
235
245
|
# filter: {
|
|
236
246
|
# key: {
|
|
237
247
|
# filter_rules: [
|
|
@@ -244,17 +254,30 @@ module Aws::S3
|
|
|
244
254
|
# },
|
|
245
255
|
# },
|
|
246
256
|
# ],
|
|
257
|
+
# event_bridge_configuration: {
|
|
258
|
+
# },
|
|
247
259
|
# },
|
|
260
|
+
# expected_bucket_owner: "AccountId",
|
|
261
|
+
# skip_destination_validation: false,
|
|
248
262
|
# })
|
|
249
263
|
# @param [Hash] options ({})
|
|
250
264
|
# @option options [required, Types::NotificationConfiguration] :notification_configuration
|
|
251
265
|
# A container for specifying the notification configuration of the
|
|
252
266
|
# bucket. If this element is empty, notifications are turned off for the
|
|
253
267
|
# bucket.
|
|
268
|
+
# @option options [String] :expected_bucket_owner
|
|
269
|
+
# The account ID of the expected bucket owner. If the account ID that
|
|
270
|
+
# you provide does not match the actual owner of the bucket, the request
|
|
271
|
+
# fails with the HTTP status code `403 Forbidden` (access denied).
|
|
272
|
+
# @option options [Boolean] :skip_destination_validation
|
|
273
|
+
# Skips validation of Amazon SQS, Amazon SNS, and Lambda destinations.
|
|
274
|
+
# True or false value.
|
|
254
275
|
# @return [EmptyStructure]
|
|
255
276
|
def put(options = {})
|
|
256
277
|
options = options.merge(bucket: @bucket_name)
|
|
257
|
-
resp =
|
|
278
|
+
resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
|
279
|
+
@client.put_bucket_notification_configuration(options)
|
|
280
|
+
end
|
|
258
281
|
resp.data
|
|
259
282
|
end
|
|
260
283
|
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
# WARNING ABOUT GENERATED CODE
|
|
4
4
|
#
|
|
5
5
|
# This file is generated. See the contributing guide for more information:
|
|
6
|
-
# https://github.com/aws/aws-sdk-ruby/blob/
|
|
6
|
+
# https://github.com/aws/aws-sdk-ruby/blob/version-3/CONTRIBUTING.md
|
|
7
7
|
#
|
|
8
8
|
# WARNING ABOUT GENERATED CODE
|
|
9
9
|
|
|
@@ -54,7 +54,9 @@ module Aws::S3
|
|
|
54
54
|
#
|
|
55
55
|
# @return [self]
|
|
56
56
|
def load
|
|
57
|
-
resp =
|
|
57
|
+
resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
|
58
|
+
@client.get_bucket_policy(bucket: @bucket_name)
|
|
59
|
+
end
|
|
58
60
|
@data = resp.data
|
|
59
61
|
self
|
|
60
62
|
end
|
|
@@ -169,19 +171,35 @@ module Aws::S3
|
|
|
169
171
|
:retry
|
|
170
172
|
end
|
|
171
173
|
end
|
|
172
|
-
Aws::
|
|
174
|
+
Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
|
175
|
+
Aws::Waiters::Waiter.new(options).wait({})
|
|
176
|
+
end
|
|
173
177
|
end
|
|
174
178
|
|
|
175
179
|
# @!group Actions
|
|
176
180
|
|
|
177
181
|
# @example Request syntax with placeholder values
|
|
178
182
|
#
|
|
179
|
-
# bucket_policy.delete(
|
|
183
|
+
# bucket_policy.delete({
|
|
184
|
+
# expected_bucket_owner: "AccountId",
|
|
185
|
+
# })
|
|
180
186
|
# @param [Hash] options ({})
|
|
187
|
+
# @option options [String] :expected_bucket_owner
|
|
188
|
+
# The account ID of the expected bucket owner. If the account ID that
|
|
189
|
+
# you provide does not match the actual owner of the bucket, the request
|
|
190
|
+
# fails with the HTTP status code `403 Forbidden` (access denied).
|
|
191
|
+
#
|
|
192
|
+
# <note markdown="1"> For directory buckets, this header is not supported in this API
|
|
193
|
+
# operation. If you specify this header, the request fails with the HTTP
|
|
194
|
+
# status code `501 Not Implemented`.
|
|
195
|
+
#
|
|
196
|
+
# </note>
|
|
181
197
|
# @return [EmptyStructure]
|
|
182
198
|
def delete(options = {})
|
|
183
199
|
options = options.merge(bucket: @bucket_name)
|
|
184
|
-
resp =
|
|
200
|
+
resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
|
201
|
+
@client.delete_bucket_policy(options)
|
|
202
|
+
end
|
|
185
203
|
resp.data
|
|
186
204
|
end
|
|
187
205
|
|
|
@@ -189,21 +207,87 @@ module Aws::S3
|
|
|
189
207
|
#
|
|
190
208
|
# bucket_policy.put({
|
|
191
209
|
# content_md5: "ContentMD5",
|
|
210
|
+
# checksum_algorithm: "CRC32", # accepts CRC32, CRC32C, SHA1, SHA256, CRC64NVME
|
|
192
211
|
# confirm_remove_self_bucket_access: false,
|
|
193
212
|
# policy: "Policy", # required
|
|
213
|
+
# expected_bucket_owner: "AccountId",
|
|
194
214
|
# })
|
|
195
215
|
# @param [Hash] options ({})
|
|
196
216
|
# @option options [String] :content_md5
|
|
197
217
|
# The MD5 hash of the request body.
|
|
218
|
+
#
|
|
219
|
+
# For requests made using the Amazon Web Services Command Line Interface
|
|
220
|
+
# (CLI) or Amazon Web Services SDKs, this field is calculated
|
|
221
|
+
# automatically.
|
|
222
|
+
#
|
|
223
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
|
224
|
+
#
|
|
225
|
+
# </note>
|
|
226
|
+
# @option options [String] :checksum_algorithm
|
|
227
|
+
# Indicates the algorithm used to create the checksum for the request
|
|
228
|
+
# when you use the SDK. This header will not provide any additional
|
|
229
|
+
# functionality if you don't use the SDK. When you send this header,
|
|
230
|
+
# there must be a corresponding `x-amz-checksum-algorithm ` or
|
|
231
|
+
# `x-amz-trailer` header sent. Otherwise, Amazon S3 fails the request
|
|
232
|
+
# with the HTTP status code `400 Bad Request`.
|
|
233
|
+
#
|
|
234
|
+
# For the `x-amz-checksum-algorithm ` header, replace ` algorithm ` with
|
|
235
|
+
# the supported algorithm from the following list:
|
|
236
|
+
#
|
|
237
|
+
# * `CRC32`
|
|
238
|
+
#
|
|
239
|
+
# * `CRC32C`
|
|
240
|
+
#
|
|
241
|
+
# * `CRC64NVME`
|
|
242
|
+
#
|
|
243
|
+
# * `SHA1`
|
|
244
|
+
#
|
|
245
|
+
# * `SHA256`
|
|
246
|
+
#
|
|
247
|
+
# For more information, see [Checking object integrity][1] in the
|
|
248
|
+
# *Amazon S3 User Guide*.
|
|
249
|
+
#
|
|
250
|
+
# If the individual checksum value you provide through
|
|
251
|
+
# `x-amz-checksum-algorithm ` doesn't match the checksum algorithm you
|
|
252
|
+
# set through `x-amz-sdk-checksum-algorithm`, Amazon S3 fails the
|
|
253
|
+
# request with a `BadDigest` error.
|
|
254
|
+
#
|
|
255
|
+
# <note markdown="1"> For directory buckets, when you use Amazon Web Services SDKs, `CRC32`
|
|
256
|
+
# is the default checksum algorithm that's used for performance.
|
|
257
|
+
#
|
|
258
|
+
# </note>
|
|
259
|
+
#
|
|
260
|
+
#
|
|
261
|
+
#
|
|
262
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
|
|
198
263
|
# @option options [Boolean] :confirm_remove_self_bucket_access
|
|
199
264
|
# Set this parameter to true to confirm that you want to remove your
|
|
200
265
|
# permissions to change this bucket policy in the future.
|
|
266
|
+
#
|
|
267
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
|
268
|
+
#
|
|
269
|
+
# </note>
|
|
201
270
|
# @option options [required, String] :policy
|
|
202
271
|
# The bucket policy as a JSON document.
|
|
272
|
+
#
|
|
273
|
+
# For directory buckets, the only IAM action supported in the bucket
|
|
274
|
+
# policy is `s3express:CreateSession`.
|
|
275
|
+
# @option options [String] :expected_bucket_owner
|
|
276
|
+
# The account ID of the expected bucket owner. If the account ID that
|
|
277
|
+
# you provide does not match the actual owner of the bucket, the request
|
|
278
|
+
# fails with the HTTP status code `403 Forbidden` (access denied).
|
|
279
|
+
#
|
|
280
|
+
# <note markdown="1"> For directory buckets, this header is not supported in this API
|
|
281
|
+
# operation. If you specify this header, the request fails with the HTTP
|
|
282
|
+
# status code `501 Not Implemented`.
|
|
283
|
+
#
|
|
284
|
+
# </note>
|
|
203
285
|
# @return [EmptyStructure]
|
|
204
286
|
def put(options = {})
|
|
205
287
|
options = options.merge(bucket: @bucket_name)
|
|
206
|
-
resp =
|
|
288
|
+
resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
|
289
|
+
@client.put_bucket_policy(options)
|
|
290
|
+
end
|
|
207
291
|
resp.data
|
|
208
292
|
end
|
|
209
293
|
|
|
@@ -15,7 +15,7 @@ module Aws
|
|
|
15
15
|
# Registers a block as a callback. This listener is called when a
|
|
16
16
|
# new bucket/region pair is added to the cache.
|
|
17
17
|
#
|
|
18
|
-
# S3
|
|
18
|
+
# Aws::S3.bucket_region_cache.bucket_added do |bucket_name, region_name|
|
|
19
19
|
# # ...
|
|
20
20
|
# end
|
|
21
21
|
#
|
|
@@ -59,6 +59,14 @@ module Aws
|
|
|
59
59
|
end
|
|
60
60
|
end
|
|
61
61
|
|
|
62
|
+
# @param [String] key
|
|
63
|
+
# @return [Boolean]
|
|
64
|
+
def key?(key)
|
|
65
|
+
@mutex.synchronize do
|
|
66
|
+
@regions.key?(key)
|
|
67
|
+
end
|
|
68
|
+
end
|
|
69
|
+
|
|
62
70
|
# @api private
|
|
63
71
|
def clear
|
|
64
72
|
@mutex.synchronize { @regions = {} }
|
|
@@ -73,9 +81,5 @@ module Aws
|
|
|
73
81
|
alias to_h to_hash
|
|
74
82
|
|
|
75
83
|
end
|
|
76
|
-
|
|
77
|
-
# @api private
|
|
78
|
-
BUCKET_REGIONS = BucketRegionCache.new
|
|
79
|
-
|
|
80
84
|
end
|
|
81
85
|
end
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
# WARNING ABOUT GENERATED CODE
|
|
4
4
|
#
|
|
5
5
|
# This file is generated. See the contributing guide for more information:
|
|
6
|
-
# https://github.com/aws/aws-sdk-ruby/blob/
|
|
6
|
+
# https://github.com/aws/aws-sdk-ruby/blob/version-3/CONTRIBUTING.md
|
|
7
7
|
#
|
|
8
8
|
# WARNING ABOUT GENERATED CODE
|
|
9
9
|
|
|
@@ -54,7 +54,9 @@ module Aws::S3
|
|
|
54
54
|
#
|
|
55
55
|
# @return [self]
|
|
56
56
|
def load
|
|
57
|
-
resp =
|
|
57
|
+
resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
|
58
|
+
@client.get_bucket_request_payment(bucket: @bucket_name)
|
|
59
|
+
end
|
|
58
60
|
@data = resp.data
|
|
59
61
|
self
|
|
60
62
|
end
|
|
@@ -169,7 +171,9 @@ module Aws::S3
|
|
|
169
171
|
:retry
|
|
170
172
|
end
|
|
171
173
|
end
|
|
172
|
-
Aws::
|
|
174
|
+
Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
|
175
|
+
Aws::Waiters::Waiter.new(options).wait({})
|
|
176
|
+
end
|
|
173
177
|
end
|
|
174
178
|
|
|
175
179
|
# @!group Actions
|
|
@@ -178,26 +182,52 @@ module Aws::S3
|
|
|
178
182
|
#
|
|
179
183
|
# bucket_request_payment.put({
|
|
180
184
|
# content_md5: "ContentMD5",
|
|
185
|
+
# checksum_algorithm: "CRC32", # accepts CRC32, CRC32C, SHA1, SHA256, CRC64NVME
|
|
181
186
|
# request_payment_configuration: { # required
|
|
182
187
|
# payer: "Requester", # required, accepts Requester, BucketOwner
|
|
183
188
|
# },
|
|
189
|
+
# expected_bucket_owner: "AccountId",
|
|
184
190
|
# })
|
|
185
191
|
# @param [Hash] options ({})
|
|
186
192
|
# @option options [String] :content_md5
|
|
187
|
-
#
|
|
188
|
-
#
|
|
189
|
-
#
|
|
190
|
-
#
|
|
193
|
+
# The Base64 encoded 128-bit `MD5` digest of the data. You must use this
|
|
194
|
+
# header as a message integrity check to verify that the request body
|
|
195
|
+
# was not corrupted in transit. For more information, see [RFC 1864][1].
|
|
196
|
+
#
|
|
197
|
+
# For requests made using the Amazon Web Services Command Line Interface
|
|
198
|
+
# (CLI) or Amazon Web Services SDKs, this field is calculated
|
|
199
|
+
# automatically.
|
|
191
200
|
#
|
|
192
201
|
#
|
|
193
202
|
#
|
|
194
203
|
# [1]: http://www.ietf.org/rfc/rfc1864.txt
|
|
204
|
+
# @option options [String] :checksum_algorithm
|
|
205
|
+
# Indicates the algorithm used to create the checksum for the request
|
|
206
|
+
# when you use the SDK. This header will not provide any additional
|
|
207
|
+
# functionality if you don't use the SDK. When you send this header,
|
|
208
|
+
# there must be a corresponding `x-amz-checksum` or `x-amz-trailer`
|
|
209
|
+
# header sent. Otherwise, Amazon S3 fails the request with the HTTP
|
|
210
|
+
# status code `400 Bad Request`. For more information, see [Checking
|
|
211
|
+
# object integrity][1] in the *Amazon S3 User Guide*.
|
|
212
|
+
#
|
|
213
|
+
# If you provide an individual checksum, Amazon S3 ignores any provided
|
|
214
|
+
# `ChecksumAlgorithm` parameter.
|
|
215
|
+
#
|
|
216
|
+
#
|
|
217
|
+
#
|
|
218
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
|
|
195
219
|
# @option options [required, Types::RequestPaymentConfiguration] :request_payment_configuration
|
|
196
220
|
# Container for Payer.
|
|
221
|
+
# @option options [String] :expected_bucket_owner
|
|
222
|
+
# The account ID of the expected bucket owner. If the account ID that
|
|
223
|
+
# you provide does not match the actual owner of the bucket, the request
|
|
224
|
+
# fails with the HTTP status code `403 Forbidden` (access denied).
|
|
197
225
|
# @return [EmptyStructure]
|
|
198
226
|
def put(options = {})
|
|
199
227
|
options = options.merge(bucket: @bucket_name)
|
|
200
|
-
resp =
|
|
228
|
+
resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
|
229
|
+
@client.put_bucket_request_payment(options)
|
|
230
|
+
end
|
|
201
231
|
resp.data
|
|
202
232
|
end
|
|
203
233
|
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
# WARNING ABOUT GENERATED CODE
|
|
4
4
|
#
|
|
5
5
|
# This file is generated. See the contributing guide for more information:
|
|
6
|
-
# https://github.com/aws/aws-sdk-ruby/blob/
|
|
6
|
+
# https://github.com/aws/aws-sdk-ruby/blob/version-3/CONTRIBUTING.md
|
|
7
7
|
#
|
|
8
8
|
# WARNING ABOUT GENERATED CODE
|
|
9
9
|
|
|
@@ -54,7 +54,9 @@ module Aws::S3
|
|
|
54
54
|
#
|
|
55
55
|
# @return [self]
|
|
56
56
|
def load
|
|
57
|
-
resp =
|
|
57
|
+
resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
|
58
|
+
@client.get_bucket_tagging(bucket: @bucket_name)
|
|
59
|
+
end
|
|
58
60
|
@data = resp.data
|
|
59
61
|
self
|
|
60
62
|
end
|
|
@@ -169,19 +171,29 @@ module Aws::S3
|
|
|
169
171
|
:retry
|
|
170
172
|
end
|
|
171
173
|
end
|
|
172
|
-
Aws::
|
|
174
|
+
Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
|
175
|
+
Aws::Waiters::Waiter.new(options).wait({})
|
|
176
|
+
end
|
|
173
177
|
end
|
|
174
178
|
|
|
175
179
|
# @!group Actions
|
|
176
180
|
|
|
177
181
|
# @example Request syntax with placeholder values
|
|
178
182
|
#
|
|
179
|
-
# bucket_tagging.delete(
|
|
183
|
+
# bucket_tagging.delete({
|
|
184
|
+
# expected_bucket_owner: "AccountId",
|
|
185
|
+
# })
|
|
180
186
|
# @param [Hash] options ({})
|
|
187
|
+
# @option options [String] :expected_bucket_owner
|
|
188
|
+
# The account ID of the expected bucket owner. If the account ID that
|
|
189
|
+
# you provide does not match the actual owner of the bucket, the request
|
|
190
|
+
# fails with the HTTP status code `403 Forbidden` (access denied).
|
|
181
191
|
# @return [EmptyStructure]
|
|
182
192
|
def delete(options = {})
|
|
183
193
|
options = options.merge(bucket: @bucket_name)
|
|
184
|
-
resp =
|
|
194
|
+
resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
|
195
|
+
@client.delete_bucket_tagging(options)
|
|
196
|
+
end
|
|
185
197
|
resp.data
|
|
186
198
|
end
|
|
187
199
|
|
|
@@ -189,6 +201,7 @@ module Aws::S3
|
|
|
189
201
|
#
|
|
190
202
|
# bucket_tagging.put({
|
|
191
203
|
# content_md5: "ContentMD5",
|
|
204
|
+
# checksum_algorithm: "CRC32", # accepts CRC32, CRC32C, SHA1, SHA256, CRC64NVME
|
|
192
205
|
# tagging: { # required
|
|
193
206
|
# tag_set: [ # required
|
|
194
207
|
# {
|
|
@@ -197,22 +210,48 @@ module Aws::S3
|
|
|
197
210
|
# },
|
|
198
211
|
# ],
|
|
199
212
|
# },
|
|
213
|
+
# expected_bucket_owner: "AccountId",
|
|
200
214
|
# })
|
|
201
215
|
# @param [Hash] options ({})
|
|
202
216
|
# @option options [String] :content_md5
|
|
203
|
-
# The
|
|
217
|
+
# The Base64 encoded 128-bit `MD5` digest of the data. You must use this
|
|
204
218
|
# header as a message integrity check to verify that the request body
|
|
205
219
|
# was not corrupted in transit. For more information, see [RFC 1864][1].
|
|
206
220
|
#
|
|
221
|
+
# For requests made using the Amazon Web Services Command Line Interface
|
|
222
|
+
# (CLI) or Amazon Web Services SDKs, this field is calculated
|
|
223
|
+
# automatically.
|
|
224
|
+
#
|
|
207
225
|
#
|
|
208
226
|
#
|
|
209
227
|
# [1]: http://www.ietf.org/rfc/rfc1864.txt
|
|
228
|
+
# @option options [String] :checksum_algorithm
|
|
229
|
+
# Indicates the algorithm used to create the checksum for the request
|
|
230
|
+
# when you use the SDK. This header will not provide any additional
|
|
231
|
+
# functionality if you don't use the SDK. When you send this header,
|
|
232
|
+
# there must be a corresponding `x-amz-checksum` or `x-amz-trailer`
|
|
233
|
+
# header sent. Otherwise, Amazon S3 fails the request with the HTTP
|
|
234
|
+
# status code `400 Bad Request`. For more information, see [Checking
|
|
235
|
+
# object integrity][1] in the *Amazon S3 User Guide*.
|
|
236
|
+
#
|
|
237
|
+
# If you provide an individual checksum, Amazon S3 ignores any provided
|
|
238
|
+
# `ChecksumAlgorithm` parameter.
|
|
239
|
+
#
|
|
240
|
+
#
|
|
241
|
+
#
|
|
242
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
|
|
210
243
|
# @option options [required, Types::Tagging] :tagging
|
|
211
244
|
# Container for the `TagSet` and `Tag` elements.
|
|
245
|
+
# @option options [String] :expected_bucket_owner
|
|
246
|
+
# The account ID of the expected bucket owner. If the account ID that
|
|
247
|
+
# you provide does not match the actual owner of the bucket, the request
|
|
248
|
+
# fails with the HTTP status code `403 Forbidden` (access denied).
|
|
212
249
|
# @return [EmptyStructure]
|
|
213
250
|
def put(options = {})
|
|
214
251
|
options = options.merge(bucket: @bucket_name)
|
|
215
|
-
resp =
|
|
252
|
+
resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
|
253
|
+
@client.put_bucket_tagging(options)
|
|
254
|
+
end
|
|
216
255
|
resp.data
|
|
217
256
|
end
|
|
218
257
|
|