aws-sdk-s3 1.10.0 → 1.208.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 +5 -5
- data/CHANGELOG.md +1517 -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 +1062 -99
- data/lib/aws-sdk-s3/bucket_acl.rb +67 -17
- data/lib/aws-sdk-s3/bucket_cors.rb +80 -17
- data/lib/aws-sdk-s3/bucket_lifecycle.rb +71 -19
- data/lib/aws-sdk-s3/bucket_lifecycle_configuration.rb +126 -20
- data/lib/aws-sdk-s3/bucket_logging.rb +68 -18
- data/lib/aws-sdk-s3/bucket_notification.rb +56 -20
- data/lib/aws-sdk-s3/bucket_policy.rb +108 -17
- data/lib/aws-sdk-s3/bucket_region_cache.rb +11 -5
- data/lib/aws-sdk-s3/bucket_request_payment.rb +60 -15
- data/lib/aws-sdk-s3/bucket_tagging.rb +71 -17
- data/lib/aws-sdk-s3/bucket_versioning.rb +166 -17
- data/lib/aws-sdk-s3/bucket_website.rb +78 -17
- data/lib/aws-sdk-s3/client.rb +20068 -3879
- data/lib/aws-sdk-s3/client_api.rb +1957 -209
- data/lib/aws-sdk-s3/customizations/bucket.rb +57 -38
- data/lib/aws-sdk-s3/customizations/errors.rb +40 -0
- data/lib/aws-sdk-s3/customizations/multipart_upload.rb +2 -0
- data/lib/aws-sdk-s3/customizations/object.rb +338 -68
- data/lib/aws-sdk-s3/customizations/object_summary.rb +17 -0
- data/lib/aws-sdk-s3/customizations/object_version.rb +13 -0
- data/lib/aws-sdk-s3/customizations/types/list_object_versions_output.rb +2 -0
- data/lib/aws-sdk-s3/customizations/types/permanent_redirect.rb +26 -0
- data/lib/aws-sdk-s3/customizations.rb +30 -27
- data/lib/aws-sdk-s3/default_executor.rb +103 -0
- data/lib/aws-sdk-s3/encryption/client.rb +29 -8
- data/lib/aws-sdk-s3/encryption/decrypt_handler.rb +71 -29
- data/lib/aws-sdk-s3/encryption/default_cipher_provider.rb +45 -5
- data/lib/aws-sdk-s3/encryption/default_key_provider.rb +2 -0
- data/lib/aws-sdk-s3/encryption/encrypt_handler.rb +15 -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 +48 -11
- 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 +645 -0
- data/lib/aws-sdk-s3/encryptionV2/decrypt_handler.rb +68 -0
- data/lib/aws-sdk-s3/encryptionV2/decryption.rb +205 -0
- data/lib/aws-sdk-s3/encryptionV2/default_cipher_provider.rb +187 -0
- data/lib/aws-sdk-s3/encryptionV2/default_key_provider.rb +40 -0
- data/lib/aws-sdk-s3/encryptionV2/encrypt_handler.rb +67 -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 +75 -0
- data/lib/aws-sdk-s3/encryptionV2/key_provider.rb +31 -0
- data/lib/aws-sdk-s3/encryptionV2/kms_cipher_provider.rb +181 -0
- data/lib/aws-sdk-s3/encryptionV2/materials.rb +60 -0
- data/lib/aws-sdk-s3/encryptionV2/utils.rb +108 -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 +24 -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 +886 -0
- data/lib/aws-sdk-s3/endpoints.rb +1544 -0
- data/lib/aws-sdk-s3/errors.rb +181 -1
- data/lib/aws-sdk-s3/event_streams.rb +69 -0
- 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 +261 -82
- data/lib/aws-sdk-s3/file_part.rb +16 -13
- data/lib/aws-sdk-s3/file_uploader.rb +37 -22
- data/lib/aws-sdk-s3/legacy_signer.rb +19 -26
- data/lib/aws-sdk-s3/multipart_download_error.rb +8 -0
- data/lib/aws-sdk-s3/multipart_file_uploader.rb +142 -80
- data/lib/aws-sdk-s3/multipart_stream_uploader.rb +191 -0
- data/lib/aws-sdk-s3/multipart_upload.rb +342 -31
- data/lib/aws-sdk-s3/multipart_upload_error.rb +5 -4
- data/lib/aws-sdk-s3/multipart_upload_part.rb +387 -47
- data/lib/aws-sdk-s3/object.rb +2733 -204
- data/lib/aws-sdk-s3/object_acl.rb +112 -25
- data/lib/aws-sdk-s3/object_copier.rb +9 -5
- data/lib/aws-sdk-s3/object_multipart_copier.rb +50 -23
- data/lib/aws-sdk-s3/object_summary.rb +2265 -181
- data/lib/aws-sdk-s3/object_version.rb +542 -74
- data/lib/aws-sdk-s3/plugins/accelerate.rb +17 -64
- 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 +7 -43
- data/lib/aws-sdk-s3/plugins/bucket_name_restrictions.rb +20 -3
- data/lib/aws-sdk-s3/plugins/checksum_algorithm.rb +31 -0
- data/lib/aws-sdk-s3/plugins/dualstack.rb +7 -50
- data/lib/aws-sdk-s3/plugins/endpoints.rb +86 -0
- data/lib/aws-sdk-s3/plugins/expect_100_continue.rb +5 -4
- data/lib/aws-sdk-s3/plugins/express_session_auth.rb +88 -0
- data/lib/aws-sdk-s3/plugins/get_bucket_location_fix.rb +3 -1
- data/lib/aws-sdk-s3/plugins/http_200_errors.rb +62 -17
- data/lib/aws-sdk-s3/plugins/iad_regional_endpoint.rb +44 -0
- data/lib/aws-sdk-s3/plugins/location_constraint.rb +5 -1
- data/lib/aws-sdk-s3/plugins/md5s.rb +14 -67
- data/lib/aws-sdk-s3/plugins/redirects.rb +5 -1
- data/lib/aws-sdk-s3/plugins/s3_host_id.rb +2 -0
- data/lib/aws-sdk-s3/plugins/s3_signer.rb +67 -93
- data/lib/aws-sdk-s3/plugins/sse_cpk.rb +3 -1
- data/lib/aws-sdk-s3/plugins/streaming_retry.rb +137 -0
- data/lib/aws-sdk-s3/plugins/url_encoded_keys.rb +4 -1
- data/lib/aws-sdk-s3/presigned_post.rb +160 -99
- data/lib/aws-sdk-s3/presigner.rb +178 -81
- data/lib/aws-sdk-s3/resource.rb +164 -15
- data/lib/aws-sdk-s3/transfer_manager.rb +303 -0
- data/lib/aws-sdk-s3/types.rb +15981 -4168
- data/lib/aws-sdk-s3/waiters.rb +67 -1
- data/lib/aws-sdk-s3.rb +46 -31
- 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 +97 -14
data/lib/aws-sdk-s3/bucket.rb
CHANGED
|
@@ -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 Bucket
|
|
10
13
|
|
|
11
14
|
extend Aws::Deprecations
|
|
@@ -21,6 +24,7 @@ module Aws::S3
|
|
|
21
24
|
@name = extract_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,12 +34,38 @@ module Aws::S3
|
|
|
30
34
|
@name
|
|
31
35
|
end
|
|
32
36
|
|
|
33
|
-
# Date the bucket was created.
|
|
37
|
+
# Date the bucket was created. This date can change when making changes
|
|
38
|
+
# to your bucket, such as editing its bucket policy.
|
|
34
39
|
# @return [Time]
|
|
35
40
|
def creation_date
|
|
36
41
|
data[:creation_date]
|
|
37
42
|
end
|
|
38
43
|
|
|
44
|
+
# `BucketRegion` indicates the Amazon Web Services region where the
|
|
45
|
+
# bucket is located. If the request contains at least one valid
|
|
46
|
+
# parameter, it is included in the response.
|
|
47
|
+
# @return [String]
|
|
48
|
+
def bucket_region
|
|
49
|
+
data[:bucket_region]
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
# The Amazon Resource Name (ARN) of the S3 bucket. ARNs uniquely
|
|
53
|
+
# identify Amazon Web Services resources across all of Amazon Web
|
|
54
|
+
# Services.
|
|
55
|
+
#
|
|
56
|
+
# <note markdown="1"> This parameter is only supported for S3 directory buckets. For more
|
|
57
|
+
# information, see [Using tags with directory buckets][1].
|
|
58
|
+
#
|
|
59
|
+
# </note>
|
|
60
|
+
#
|
|
61
|
+
#
|
|
62
|
+
#
|
|
63
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/directory-buckets-tagging.html
|
|
64
|
+
# @return [String]
|
|
65
|
+
def bucket_arn
|
|
66
|
+
data[:bucket_arn]
|
|
67
|
+
end
|
|
68
|
+
|
|
39
69
|
# @!endgroup
|
|
40
70
|
|
|
41
71
|
# @return [Client]
|
|
@@ -86,11 +116,13 @@ module Aws::S3
|
|
|
86
116
|
# @option options [Proc] :before_attempt
|
|
87
117
|
# @option options [Proc] :before_wait
|
|
88
118
|
# @return [Bucket]
|
|
89
|
-
def wait_until_exists(options = {})
|
|
119
|
+
def wait_until_exists(options = {}, &block)
|
|
90
120
|
options, params = separate_params_and_options(options)
|
|
91
121
|
waiter = Waiters::BucketExists.new(options)
|
|
92
|
-
yield_waiter_and_warn(waiter, &
|
|
93
|
-
|
|
122
|
+
yield_waiter_and_warn(waiter, &block) if block_given?
|
|
123
|
+
Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
|
124
|
+
waiter.wait(params.merge(bucket: @name))
|
|
125
|
+
end
|
|
94
126
|
Bucket.new({
|
|
95
127
|
name: @name,
|
|
96
128
|
client: @client
|
|
@@ -103,11 +135,13 @@ module Aws::S3
|
|
|
103
135
|
# @option options [Proc] :before_attempt
|
|
104
136
|
# @option options [Proc] :before_wait
|
|
105
137
|
# @return [Bucket]
|
|
106
|
-
def wait_until_not_exists(options = {})
|
|
138
|
+
def wait_until_not_exists(options = {}, &block)
|
|
107
139
|
options, params = separate_params_and_options(options)
|
|
108
140
|
waiter = Waiters::BucketNotExists.new(options)
|
|
109
|
-
yield_waiter_and_warn(waiter, &
|
|
110
|
-
|
|
141
|
+
yield_waiter_and_warn(waiter, &block) if block_given?
|
|
142
|
+
Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
|
143
|
+
waiter.wait(params.merge(bucket: @name))
|
|
144
|
+
end
|
|
111
145
|
Bucket.new({
|
|
112
146
|
name: @name,
|
|
113
147
|
client: @client
|
|
@@ -119,7 +153,8 @@ module Aws::S3
|
|
|
119
153
|
# Waiter polls an API operation until a resource enters a desired
|
|
120
154
|
# state.
|
|
121
155
|
#
|
|
122
|
-
# @note The waiting operation is performed on a copy. The original resource
|
|
156
|
+
# @note The waiting operation is performed on a copy. The original resource
|
|
157
|
+
# remains unchanged.
|
|
123
158
|
#
|
|
124
159
|
# ## Basic Usage
|
|
125
160
|
#
|
|
@@ -132,13 +167,15 @@ module Aws::S3
|
|
|
132
167
|
#
|
|
133
168
|
# ## Example
|
|
134
169
|
#
|
|
135
|
-
# instance.wait_until(max_attempts:10, delay:5)
|
|
170
|
+
# instance.wait_until(max_attempts:10, delay:5) do |instance|
|
|
171
|
+
# instance.state.name == 'running'
|
|
172
|
+
# end
|
|
136
173
|
#
|
|
137
174
|
# ## Configuration
|
|
138
175
|
#
|
|
139
176
|
# You can configure the maximum number of polling attempts, and the
|
|
140
|
-
# delay (in seconds) between each polling attempt. The waiting condition is
|
|
141
|
-
# by passing a block to {#wait_until}:
|
|
177
|
+
# delay (in seconds) between each polling attempt. The waiting condition is
|
|
178
|
+
# set by passing a block to {#wait_until}:
|
|
142
179
|
#
|
|
143
180
|
# # poll for ~25 seconds
|
|
144
181
|
# resource.wait_until(max_attempts:5,delay:5) {|resource|...}
|
|
@@ -169,17 +206,16 @@ module Aws::S3
|
|
|
169
206
|
# # resource did not enter the desired state in time
|
|
170
207
|
# end
|
|
171
208
|
#
|
|
209
|
+
# @yieldparam [Resource] resource to be used in the waiting condition.
|
|
172
210
|
#
|
|
173
|
-
# @
|
|
174
|
-
#
|
|
175
|
-
#
|
|
176
|
-
# because the waiter has entered a state that it will not transition
|
|
177
|
-
# out of, preventing success.
|
|
211
|
+
# @raise [Aws::Waiters::Errors::FailureStateError] Raised when the waiter
|
|
212
|
+
# terminates because the waiter has entered a state that it will not
|
|
213
|
+
# transition out of, preventing success.
|
|
178
214
|
#
|
|
179
215
|
# yet successful.
|
|
180
216
|
#
|
|
181
|
-
# @raise [Aws::Waiters::Errors::UnexpectedError] Raised when an error is
|
|
182
|
-
# while polling for a resource that is not expected.
|
|
217
|
+
# @raise [Aws::Waiters::Errors::UnexpectedError] Raised when an error is
|
|
218
|
+
# encountered while polling for a resource that is not expected.
|
|
183
219
|
#
|
|
184
220
|
# @raise [NotImplementedError] Raised when the resource does not
|
|
185
221
|
#
|
|
@@ -206,7 +242,9 @@ module Aws::S3
|
|
|
206
242
|
:retry
|
|
207
243
|
end
|
|
208
244
|
end
|
|
209
|
-
Aws::
|
|
245
|
+
Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
|
246
|
+
Aws::Waiters::Waiter.new(options).wait({})
|
|
247
|
+
end
|
|
210
248
|
end
|
|
211
249
|
|
|
212
250
|
# @!group Actions
|
|
@@ -216,45 +254,145 @@ module Aws::S3
|
|
|
216
254
|
# bucket.create({
|
|
217
255
|
# acl: "private", # accepts private, public-read, public-read-write, authenticated-read
|
|
218
256
|
# create_bucket_configuration: {
|
|
219
|
-
# location_constraint: "
|
|
257
|
+
# location_constraint: "af-south-1", # accepts af-south-1, ap-east-1, ap-northeast-1, ap-northeast-2, ap-northeast-3, ap-south-1, ap-south-2, ap-southeast-1, ap-southeast-2, ap-southeast-3, ap-southeast-4, ap-southeast-5, ca-central-1, cn-north-1, cn-northwest-1, EU, eu-central-1, eu-central-2, eu-north-1, eu-south-1, eu-south-2, eu-west-1, eu-west-2, eu-west-3, il-central-1, me-central-1, me-south-1, sa-east-1, us-east-2, us-gov-east-1, us-gov-west-1, us-west-1, us-west-2
|
|
258
|
+
# location: {
|
|
259
|
+
# type: "AvailabilityZone", # accepts AvailabilityZone, LocalZone
|
|
260
|
+
# name: "LocationNameAsString",
|
|
261
|
+
# },
|
|
262
|
+
# bucket: {
|
|
263
|
+
# data_redundancy: "SingleAvailabilityZone", # accepts SingleAvailabilityZone, SingleLocalZone
|
|
264
|
+
# type: "Directory", # accepts Directory
|
|
265
|
+
# },
|
|
266
|
+
# tags: [
|
|
267
|
+
# {
|
|
268
|
+
# key: "ObjectKey", # required
|
|
269
|
+
# value: "Value", # required
|
|
270
|
+
# },
|
|
271
|
+
# ],
|
|
220
272
|
# },
|
|
221
273
|
# grant_full_control: "GrantFullControl",
|
|
222
274
|
# grant_read: "GrantRead",
|
|
223
275
|
# grant_read_acp: "GrantReadACP",
|
|
224
276
|
# grant_write: "GrantWrite",
|
|
225
277
|
# grant_write_acp: "GrantWriteACP",
|
|
278
|
+
# object_lock_enabled_for_bucket: false,
|
|
279
|
+
# object_ownership: "BucketOwnerPreferred", # accepts BucketOwnerPreferred, ObjectWriter, BucketOwnerEnforced
|
|
226
280
|
# })
|
|
227
281
|
# @param [Hash] options ({})
|
|
228
282
|
# @option options [String] :acl
|
|
229
283
|
# The canned ACL to apply to the bucket.
|
|
284
|
+
#
|
|
285
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
|
286
|
+
#
|
|
287
|
+
# </note>
|
|
230
288
|
# @option options [Types::CreateBucketConfiguration] :create_bucket_configuration
|
|
289
|
+
# The configuration information for the bucket.
|
|
231
290
|
# @option options [String] :grant_full_control
|
|
232
291
|
# Allows grantee the read, write, read ACP, and write ACP permissions on
|
|
233
292
|
# the bucket.
|
|
293
|
+
#
|
|
294
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
|
295
|
+
#
|
|
296
|
+
# </note>
|
|
234
297
|
# @option options [String] :grant_read
|
|
235
298
|
# Allows grantee to list the objects in the bucket.
|
|
299
|
+
#
|
|
300
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
|
301
|
+
#
|
|
302
|
+
# </note>
|
|
236
303
|
# @option options [String] :grant_read_acp
|
|
237
304
|
# Allows grantee to read the bucket ACL.
|
|
305
|
+
#
|
|
306
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
|
307
|
+
#
|
|
308
|
+
# </note>
|
|
238
309
|
# @option options [String] :grant_write
|
|
239
|
-
# Allows grantee to create
|
|
240
|
-
#
|
|
310
|
+
# Allows grantee to create new objects in the bucket.
|
|
311
|
+
#
|
|
312
|
+
# For the bucket and object owners of existing objects, also allows
|
|
313
|
+
# deletions and overwrites of those objects.
|
|
314
|
+
#
|
|
315
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
|
316
|
+
#
|
|
317
|
+
# </note>
|
|
241
318
|
# @option options [String] :grant_write_acp
|
|
242
319
|
# Allows grantee to write the ACL for the applicable bucket.
|
|
320
|
+
#
|
|
321
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
|
322
|
+
#
|
|
323
|
+
# </note>
|
|
324
|
+
# @option options [Boolean] :object_lock_enabled_for_bucket
|
|
325
|
+
# Specifies whether you want S3 Object Lock to be enabled for the new
|
|
326
|
+
# bucket.
|
|
327
|
+
#
|
|
328
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
|
329
|
+
#
|
|
330
|
+
# </note>
|
|
331
|
+
# @option options [String] :object_ownership
|
|
332
|
+
# The container element for object ownership for a bucket's ownership
|
|
333
|
+
# controls.
|
|
334
|
+
#
|
|
335
|
+
# `BucketOwnerPreferred` - Objects uploaded to the bucket change
|
|
336
|
+
# ownership to the bucket owner if the objects are uploaded with the
|
|
337
|
+
# `bucket-owner-full-control` canned ACL.
|
|
338
|
+
#
|
|
339
|
+
# `ObjectWriter` - The uploading account will own the object if the
|
|
340
|
+
# object is uploaded with the `bucket-owner-full-control` canned ACL.
|
|
341
|
+
#
|
|
342
|
+
# `BucketOwnerEnforced` - Access control lists (ACLs) are disabled and
|
|
343
|
+
# no longer affect permissions. The bucket owner automatically owns and
|
|
344
|
+
# has full control over every object in the bucket. The bucket only
|
|
345
|
+
# accepts PUT requests that don't specify an ACL or specify bucket
|
|
346
|
+
# owner full control ACLs (such as the predefined
|
|
347
|
+
# `bucket-owner-full-control` canned ACL or a custom ACL in XML format
|
|
348
|
+
# that grants the same permissions).
|
|
349
|
+
#
|
|
350
|
+
# By default, `ObjectOwnership` is set to `BucketOwnerEnforced` and ACLs
|
|
351
|
+
# are disabled. We recommend keeping ACLs disabled, except in uncommon
|
|
352
|
+
# use cases where you must control access for each object individually.
|
|
353
|
+
# For more information about S3 Object Ownership, see [Controlling
|
|
354
|
+
# ownership of objects and disabling ACLs for your bucket][1] in the
|
|
355
|
+
# *Amazon S3 User Guide*.
|
|
356
|
+
#
|
|
357
|
+
# <note markdown="1"> This functionality is not supported for directory buckets. Directory
|
|
358
|
+
# buckets use the bucket owner enforced setting for S3 Object Ownership.
|
|
359
|
+
#
|
|
360
|
+
# </note>
|
|
361
|
+
#
|
|
362
|
+
#
|
|
363
|
+
#
|
|
364
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/about-object-ownership.html
|
|
243
365
|
# @return [Types::CreateBucketOutput]
|
|
244
366
|
def create(options = {})
|
|
245
367
|
options = options.merge(bucket: @name)
|
|
246
|
-
resp =
|
|
368
|
+
resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
|
369
|
+
@client.create_bucket(options)
|
|
370
|
+
end
|
|
247
371
|
resp.data
|
|
248
372
|
end
|
|
249
373
|
|
|
250
374
|
# @example Request syntax with placeholder values
|
|
251
375
|
#
|
|
252
|
-
# bucket.delete(
|
|
376
|
+
# bucket.delete({
|
|
377
|
+
# expected_bucket_owner: "AccountId",
|
|
378
|
+
# })
|
|
253
379
|
# @param [Hash] options ({})
|
|
380
|
+
# @option options [String] :expected_bucket_owner
|
|
381
|
+
# The account ID of the expected bucket owner. If the account ID that
|
|
382
|
+
# you provide does not match the actual owner of the bucket, the request
|
|
383
|
+
# fails with the HTTP status code `403 Forbidden` (access denied).
|
|
384
|
+
#
|
|
385
|
+
# <note markdown="1"> For directory buckets, this header is not supported in this API
|
|
386
|
+
# operation. If you specify this header, the request fails with the HTTP
|
|
387
|
+
# status code `501 Not Implemented`.
|
|
388
|
+
#
|
|
389
|
+
# </note>
|
|
254
390
|
# @return [EmptyStructure]
|
|
255
391
|
def delete(options = {})
|
|
256
392
|
options = options.merge(bucket: @name)
|
|
257
|
-
resp =
|
|
393
|
+
resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
|
394
|
+
@client.delete_bucket(options)
|
|
395
|
+
end
|
|
258
396
|
resp.data
|
|
259
397
|
end
|
|
260
398
|
|
|
@@ -266,28 +404,113 @@ module Aws::S3
|
|
|
266
404
|
# {
|
|
267
405
|
# key: "ObjectKey", # required
|
|
268
406
|
# version_id: "ObjectVersionId",
|
|
407
|
+
# etag: "ETag",
|
|
408
|
+
# last_modified_time: Time.now,
|
|
409
|
+
# size: 1,
|
|
269
410
|
# },
|
|
270
411
|
# ],
|
|
271
412
|
# quiet: false,
|
|
272
413
|
# },
|
|
273
414
|
# mfa: "MFA",
|
|
274
415
|
# request_payer: "requester", # accepts requester
|
|
416
|
+
# bypass_governance_retention: false,
|
|
417
|
+
# expected_bucket_owner: "AccountId",
|
|
418
|
+
# checksum_algorithm: "CRC32", # accepts CRC32, CRC32C, SHA1, SHA256, CRC64NVME
|
|
275
419
|
# })
|
|
276
420
|
# @param [Hash] options ({})
|
|
277
421
|
# @option options [required, Types::Delete] :delete
|
|
422
|
+
# Container for the request.
|
|
278
423
|
# @option options [String] :mfa
|
|
279
424
|
# The concatenation of the authentication device's serial number, a
|
|
280
425
|
# space, and the value that is displayed on your authentication device.
|
|
426
|
+
# Required to permanently delete a versioned object if versioning is
|
|
427
|
+
# configured with MFA delete enabled.
|
|
428
|
+
#
|
|
429
|
+
# When performing the `DeleteObjects` operation on an MFA delete enabled
|
|
430
|
+
# bucket, which attempts to delete the specified versioned objects, you
|
|
431
|
+
# must include an MFA token. If you don't provide an MFA token, the
|
|
432
|
+
# entire request will fail, even if there are non-versioned objects that
|
|
433
|
+
# you are trying to delete. If you provide an invalid token, whether
|
|
434
|
+
# there are versioned object keys in the request or not, the entire
|
|
435
|
+
# Multi-Object Delete request will fail. For information about MFA
|
|
436
|
+
# Delete, see [ MFA Delete][1] in the *Amazon S3 User Guide*.
|
|
437
|
+
#
|
|
438
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
|
439
|
+
#
|
|
440
|
+
# </note>
|
|
441
|
+
#
|
|
442
|
+
#
|
|
443
|
+
#
|
|
444
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/Versioning.html#MultiFactorAuthenticationDelete
|
|
281
445
|
# @option options [String] :request_payer
|
|
282
|
-
# Confirms that the requester knows that
|
|
283
|
-
#
|
|
284
|
-
# requests.
|
|
285
|
-
#
|
|
286
|
-
#
|
|
446
|
+
# Confirms that the requester knows that they will be charged for the
|
|
447
|
+
# request. Bucket owners need not specify this parameter in their
|
|
448
|
+
# requests. If either the source or destination S3 bucket has Requester
|
|
449
|
+
# Pays enabled, the requester will pay for corresponding charges to copy
|
|
450
|
+
# the object. For information about downloading objects from Requester
|
|
451
|
+
# Pays buckets, see [Downloading Objects in Requester Pays Buckets][1]
|
|
452
|
+
# in the *Amazon S3 User Guide*.
|
|
453
|
+
#
|
|
454
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
|
455
|
+
#
|
|
456
|
+
# </note>
|
|
457
|
+
#
|
|
458
|
+
#
|
|
459
|
+
#
|
|
460
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
|
|
461
|
+
# @option options [Boolean] :bypass_governance_retention
|
|
462
|
+
# Specifies whether you want to delete this object even if it has a
|
|
463
|
+
# Governance-type Object Lock in place. To use this header, you must
|
|
464
|
+
# have the `s3:BypassGovernanceRetention` permission.
|
|
465
|
+
#
|
|
466
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
|
467
|
+
#
|
|
468
|
+
# </note>
|
|
469
|
+
# @option options [String] :expected_bucket_owner
|
|
470
|
+
# The account ID of the expected bucket owner. If the account ID that
|
|
471
|
+
# you provide does not match the actual owner of the bucket, the request
|
|
472
|
+
# fails with the HTTP status code `403 Forbidden` (access denied).
|
|
473
|
+
# @option options [String] :checksum_algorithm
|
|
474
|
+
# Indicates the algorithm used to create the checksum for the object
|
|
475
|
+
# when you use the SDK. This header will not provide any additional
|
|
476
|
+
# functionality if you don't use the SDK. When you send this header,
|
|
477
|
+
# there must be a corresponding `x-amz-checksum-algorithm ` or
|
|
478
|
+
# `x-amz-trailer` header sent. Otherwise, Amazon S3 fails the request
|
|
479
|
+
# with the HTTP status code `400 Bad Request`.
|
|
480
|
+
#
|
|
481
|
+
# For the `x-amz-checksum-algorithm ` header, replace ` algorithm ` with
|
|
482
|
+
# the supported algorithm from the following list:
|
|
483
|
+
#
|
|
484
|
+
# * `CRC32`
|
|
485
|
+
#
|
|
486
|
+
# * `CRC32C`
|
|
487
|
+
#
|
|
488
|
+
# * `CRC64NVME`
|
|
489
|
+
#
|
|
490
|
+
# * `SHA1`
|
|
491
|
+
#
|
|
492
|
+
# * `SHA256`
|
|
493
|
+
#
|
|
494
|
+
# For more information, see [Checking object integrity][1] in the
|
|
495
|
+
# *Amazon S3 User Guide*.
|
|
496
|
+
#
|
|
497
|
+
# If the individual checksum value you provide through
|
|
498
|
+
# `x-amz-checksum-algorithm ` doesn't match the checksum algorithm you
|
|
499
|
+
# set through `x-amz-sdk-checksum-algorithm`, Amazon S3 fails the
|
|
500
|
+
# request with a `BadDigest` error.
|
|
501
|
+
#
|
|
502
|
+
# If you provide an individual checksum, Amazon S3 ignores any provided
|
|
503
|
+
# `ChecksumAlgorithm` parameter.
|
|
504
|
+
#
|
|
505
|
+
#
|
|
506
|
+
#
|
|
507
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
|
|
287
508
|
# @return [Types::DeleteObjectsOutput]
|
|
288
509
|
def delete_objects(options = {})
|
|
289
510
|
options = options.merge(bucket: @name)
|
|
290
|
-
resp =
|
|
511
|
+
resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
|
512
|
+
@client.delete_objects(options)
|
|
513
|
+
end
|
|
291
514
|
resp.data
|
|
292
515
|
end
|
|
293
516
|
|
|
@@ -303,103 +526,615 @@ module Aws::S3
|
|
|
303
526
|
# content_length: 1,
|
|
304
527
|
# content_md5: "ContentMD5",
|
|
305
528
|
# content_type: "ContentType",
|
|
529
|
+
# checksum_algorithm: "CRC32", # accepts CRC32, CRC32C, SHA1, SHA256, CRC64NVME
|
|
530
|
+
# checksum_crc32: "ChecksumCRC32",
|
|
531
|
+
# checksum_crc32c: "ChecksumCRC32C",
|
|
532
|
+
# checksum_crc64nvme: "ChecksumCRC64NVME",
|
|
533
|
+
# checksum_sha1: "ChecksumSHA1",
|
|
534
|
+
# checksum_sha256: "ChecksumSHA256",
|
|
306
535
|
# expires: Time.now,
|
|
536
|
+
# if_match: "IfMatch",
|
|
537
|
+
# if_none_match: "IfNoneMatch",
|
|
307
538
|
# grant_full_control: "GrantFullControl",
|
|
308
539
|
# grant_read: "GrantRead",
|
|
309
540
|
# grant_read_acp: "GrantReadACP",
|
|
310
541
|
# grant_write_acp: "GrantWriteACP",
|
|
311
542
|
# key: "ObjectKey", # required
|
|
543
|
+
# write_offset_bytes: 1,
|
|
312
544
|
# metadata: {
|
|
313
545
|
# "MetadataKey" => "MetadataValue",
|
|
314
546
|
# },
|
|
315
|
-
# server_side_encryption: "AES256", # accepts AES256, aws:kms
|
|
316
|
-
# storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA, ONEZONE_IA
|
|
547
|
+
# server_side_encryption: "AES256", # accepts AES256, aws:fsx, aws:kms, aws:kms:dsse
|
|
548
|
+
# storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER, DEEP_ARCHIVE, OUTPOSTS, GLACIER_IR, SNOW, EXPRESS_ONEZONE, FSX_OPENZFS, FSX_ONTAP
|
|
317
549
|
# website_redirect_location: "WebsiteRedirectLocation",
|
|
318
550
|
# sse_customer_algorithm: "SSECustomerAlgorithm",
|
|
319
551
|
# sse_customer_key: "SSECustomerKey",
|
|
320
552
|
# sse_customer_key_md5: "SSECustomerKeyMD5",
|
|
321
553
|
# ssekms_key_id: "SSEKMSKeyId",
|
|
554
|
+
# ssekms_encryption_context: "SSEKMSEncryptionContext",
|
|
555
|
+
# bucket_key_enabled: false,
|
|
322
556
|
# request_payer: "requester", # accepts requester
|
|
323
557
|
# tagging: "TaggingHeader",
|
|
558
|
+
# object_lock_mode: "GOVERNANCE", # accepts GOVERNANCE, COMPLIANCE
|
|
559
|
+
# object_lock_retain_until_date: Time.now,
|
|
560
|
+
# object_lock_legal_hold_status: "ON", # accepts ON, OFF
|
|
561
|
+
# expected_bucket_owner: "AccountId",
|
|
324
562
|
# })
|
|
325
563
|
# @param [Hash] options ({})
|
|
326
564
|
# @option options [String] :acl
|
|
327
|
-
# The canned ACL to apply to the object.
|
|
328
|
-
#
|
|
565
|
+
# The canned ACL to apply to the object. For more information, see
|
|
566
|
+
# [Canned ACL][1] in the *Amazon S3 User Guide*.
|
|
567
|
+
#
|
|
568
|
+
# When adding a new object, you can use headers to grant ACL-based
|
|
569
|
+
# permissions to individual Amazon Web Services accounts or to
|
|
570
|
+
# predefined groups defined by Amazon S3. These permissions are then
|
|
571
|
+
# added to the ACL on the object. By default, all objects are private.
|
|
572
|
+
# Only the owner has full access control. For more information, see
|
|
573
|
+
# [Access Control List (ACL) Overview][2] and [Managing ACLs Using the
|
|
574
|
+
# REST API][3] in the *Amazon S3 User Guide*.
|
|
575
|
+
#
|
|
576
|
+
# If the bucket that you're uploading objects to uses the bucket owner
|
|
577
|
+
# enforced setting for S3 Object Ownership, ACLs are disabled and no
|
|
578
|
+
# longer affect permissions. Buckets that use this setting only accept
|
|
579
|
+
# PUT requests that don't specify an ACL or PUT requests that specify
|
|
580
|
+
# bucket owner full control ACLs, such as the
|
|
581
|
+
# `bucket-owner-full-control` canned ACL or an equivalent form of this
|
|
582
|
+
# ACL expressed in the XML format. PUT requests that contain other ACLs
|
|
583
|
+
# (for example, custom grants to certain Amazon Web Services accounts)
|
|
584
|
+
# fail and return a `400` error with the error code
|
|
585
|
+
# `AccessControlListNotSupported`. For more information, see [
|
|
586
|
+
# Controlling ownership of objects and disabling ACLs][4] in the *Amazon
|
|
587
|
+
# S3 User Guide*.
|
|
588
|
+
#
|
|
589
|
+
# <note markdown="1"> * This functionality is not supported for directory buckets.
|
|
590
|
+
#
|
|
591
|
+
# * This functionality is not supported for Amazon S3 on Outposts.
|
|
592
|
+
#
|
|
593
|
+
# </note>
|
|
594
|
+
#
|
|
595
|
+
#
|
|
596
|
+
#
|
|
597
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#CannedACL
|
|
598
|
+
# [2]: https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html
|
|
599
|
+
# [3]: https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-using-rest-api.html
|
|
600
|
+
# [4]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/about-object-ownership.html
|
|
601
|
+
# @option options [String, StringIO, File] :body
|
|
329
602
|
# Object data.
|
|
330
603
|
# @option options [String] :cache_control
|
|
331
|
-
#
|
|
604
|
+
# Can be used to specify caching behavior along the request/reply chain.
|
|
605
|
+
# For more information, see
|
|
606
|
+
# [http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9][1].
|
|
607
|
+
#
|
|
608
|
+
#
|
|
609
|
+
#
|
|
610
|
+
# [1]: http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9
|
|
332
611
|
# @option options [String] :content_disposition
|
|
333
|
-
# Specifies presentational information for the object.
|
|
612
|
+
# Specifies presentational information for the object. For more
|
|
613
|
+
# information, see
|
|
614
|
+
# [https://www.rfc-editor.org/rfc/rfc6266#section-4][1].
|
|
615
|
+
#
|
|
616
|
+
#
|
|
617
|
+
#
|
|
618
|
+
# [1]: https://www.rfc-editor.org/rfc/rfc6266#section-4
|
|
334
619
|
# @option options [String] :content_encoding
|
|
335
620
|
# Specifies what content encodings have been applied to the object and
|
|
336
621
|
# thus what decoding mechanisms must be applied to obtain the media-type
|
|
337
|
-
# referenced by the Content-Type header field.
|
|
622
|
+
# referenced by the Content-Type header field. For more information, see
|
|
623
|
+
# [https://www.rfc-editor.org/rfc/rfc9110.html#field.content-encoding][1].
|
|
624
|
+
#
|
|
625
|
+
#
|
|
626
|
+
#
|
|
627
|
+
# [1]: https://www.rfc-editor.org/rfc/rfc9110.html#field.content-encoding
|
|
338
628
|
# @option options [String] :content_language
|
|
339
629
|
# The language the content is in.
|
|
340
630
|
# @option options [Integer] :content_length
|
|
341
631
|
# Size of the body in bytes. This parameter is useful when the size of
|
|
342
|
-
# the body cannot be determined automatically.
|
|
632
|
+
# the body cannot be determined automatically. For more information, see
|
|
633
|
+
# [https://www.rfc-editor.org/rfc/rfc9110.html#name-content-length][1].
|
|
634
|
+
#
|
|
635
|
+
#
|
|
636
|
+
#
|
|
637
|
+
# [1]: https://www.rfc-editor.org/rfc/rfc9110.html#name-content-length
|
|
343
638
|
# @option options [String] :content_md5
|
|
344
|
-
# The
|
|
639
|
+
# The Base64 encoded 128-bit `MD5` digest of the message (without the
|
|
640
|
+
# headers) according to RFC 1864. This header can be used as a message
|
|
641
|
+
# integrity check to verify that the data is the same data that was
|
|
642
|
+
# originally sent. Although it is optional, we recommend using the
|
|
643
|
+
# Content-MD5 mechanism as an end-to-end integrity check. For more
|
|
644
|
+
# information about REST request authentication, see [REST
|
|
645
|
+
# Authentication][1].
|
|
646
|
+
#
|
|
647
|
+
# <note markdown="1"> The `Content-MD5` or `x-amz-sdk-checksum-algorithm` header is required
|
|
648
|
+
# for any request to upload an object with a retention period configured
|
|
649
|
+
# using Amazon S3 Object Lock. For more information, see [Uploading
|
|
650
|
+
# objects to an Object Lock enabled bucket ][2] in the *Amazon S3 User
|
|
651
|
+
# Guide*.
|
|
652
|
+
#
|
|
653
|
+
# </note>
|
|
654
|
+
#
|
|
655
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
|
656
|
+
#
|
|
657
|
+
# </note>
|
|
658
|
+
#
|
|
659
|
+
#
|
|
660
|
+
#
|
|
661
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/RESTAuthentication.html
|
|
662
|
+
# [2]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-lock-managing.html#object-lock-put-object
|
|
345
663
|
# @option options [String] :content_type
|
|
346
|
-
# A standard MIME type describing the format of the
|
|
664
|
+
# A standard MIME type describing the format of the contents. For more
|
|
665
|
+
# information, see
|
|
666
|
+
# [https://www.rfc-editor.org/rfc/rfc9110.html#name-content-type][1].
|
|
667
|
+
#
|
|
668
|
+
#
|
|
669
|
+
#
|
|
670
|
+
# [1]: https://www.rfc-editor.org/rfc/rfc9110.html#name-content-type
|
|
671
|
+
# @option options [String] :checksum_algorithm
|
|
672
|
+
# Indicates the algorithm used to create the checksum for the object
|
|
673
|
+
# when you use the SDK. This header will not provide any additional
|
|
674
|
+
# functionality if you don't use the SDK. When you send this header,
|
|
675
|
+
# there must be a corresponding `x-amz-checksum-algorithm ` or
|
|
676
|
+
# `x-amz-trailer` header sent. Otherwise, Amazon S3 fails the request
|
|
677
|
+
# with the HTTP status code `400 Bad Request`.
|
|
678
|
+
#
|
|
679
|
+
# For the `x-amz-checksum-algorithm ` header, replace ` algorithm ` with
|
|
680
|
+
# the supported algorithm from the following list:
|
|
681
|
+
#
|
|
682
|
+
# * `CRC32`
|
|
683
|
+
#
|
|
684
|
+
# * `CRC32C`
|
|
685
|
+
#
|
|
686
|
+
# * `CRC64NVME`
|
|
687
|
+
#
|
|
688
|
+
# * `SHA1`
|
|
689
|
+
#
|
|
690
|
+
# * `SHA256`
|
|
691
|
+
#
|
|
692
|
+
# For more information, see [Checking object integrity][1] in the
|
|
693
|
+
# *Amazon S3 User Guide*.
|
|
694
|
+
#
|
|
695
|
+
# If the individual checksum value you provide through
|
|
696
|
+
# `x-amz-checksum-algorithm ` doesn't match the checksum algorithm you
|
|
697
|
+
# set through `x-amz-sdk-checksum-algorithm`, Amazon S3 fails the
|
|
698
|
+
# request with a `BadDigest` error.
|
|
699
|
+
#
|
|
700
|
+
# <note markdown="1"> The `Content-MD5` or `x-amz-sdk-checksum-algorithm` header is required
|
|
701
|
+
# for any request to upload an object with a retention period configured
|
|
702
|
+
# using Amazon S3 Object Lock. For more information, see [Uploading
|
|
703
|
+
# objects to an Object Lock enabled bucket ][2] in the *Amazon S3 User
|
|
704
|
+
# Guide*.
|
|
705
|
+
#
|
|
706
|
+
# </note>
|
|
707
|
+
#
|
|
708
|
+
# For directory buckets, when you use Amazon Web Services SDKs, `CRC32`
|
|
709
|
+
# is the default checksum algorithm that's used for performance.
|
|
710
|
+
#
|
|
711
|
+
#
|
|
712
|
+
#
|
|
713
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
|
|
714
|
+
# [2]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-lock-managing.html#object-lock-put-object
|
|
715
|
+
# @option options [String] :checksum_crc32
|
|
716
|
+
# This header can be used as a data integrity check to verify that the
|
|
717
|
+
# data received is the same data that was originally sent. This header
|
|
718
|
+
# specifies the Base64 encoded, 32-bit `CRC32` checksum of the object.
|
|
719
|
+
# For more information, see [Checking object integrity][1] in the
|
|
720
|
+
# *Amazon S3 User Guide*.
|
|
721
|
+
#
|
|
722
|
+
#
|
|
723
|
+
#
|
|
724
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
|
|
725
|
+
# @option options [String] :checksum_crc32c
|
|
726
|
+
# This header can be used as a data integrity check to verify that the
|
|
727
|
+
# data received is the same data that was originally sent. This header
|
|
728
|
+
# specifies the Base64 encoded, 32-bit `CRC32C` checksum of the object.
|
|
729
|
+
# For more information, see [Checking object integrity][1] in the
|
|
730
|
+
# *Amazon S3 User Guide*.
|
|
731
|
+
#
|
|
732
|
+
#
|
|
733
|
+
#
|
|
734
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
|
|
735
|
+
# @option options [String] :checksum_crc64nvme
|
|
736
|
+
# This header can be used as a data integrity check to verify that the
|
|
737
|
+
# data received is the same data that was originally sent. This header
|
|
738
|
+
# specifies the Base64 encoded, 64-bit `CRC64NVME` checksum of the
|
|
739
|
+
# object. The `CRC64NVME` checksum is always a full object checksum. For
|
|
740
|
+
# more information, see [Checking object integrity in the Amazon S3 User
|
|
741
|
+
# Guide][1].
|
|
742
|
+
#
|
|
743
|
+
#
|
|
744
|
+
#
|
|
745
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
|
|
746
|
+
# @option options [String] :checksum_sha1
|
|
747
|
+
# This header can be used as a data integrity check to verify that the
|
|
748
|
+
# data received is the same data that was originally sent. This header
|
|
749
|
+
# specifies the Base64 encoded, 160-bit `SHA1` digest of the object. For
|
|
750
|
+
# more information, see [Checking object integrity][1] in the *Amazon S3
|
|
751
|
+
# User Guide*.
|
|
752
|
+
#
|
|
753
|
+
#
|
|
754
|
+
#
|
|
755
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
|
|
756
|
+
# @option options [String] :checksum_sha256
|
|
757
|
+
# This header can be used as a data integrity check to verify that the
|
|
758
|
+
# data received is the same data that was originally sent. This header
|
|
759
|
+
# specifies the Base64 encoded, 256-bit `SHA256` digest of the object.
|
|
760
|
+
# For more information, see [Checking object integrity][1] in the
|
|
761
|
+
# *Amazon S3 User Guide*.
|
|
762
|
+
#
|
|
763
|
+
#
|
|
764
|
+
#
|
|
765
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
|
|
347
766
|
# @option options [Time,DateTime,Date,Integer,String] :expires
|
|
348
|
-
# The date and time at which the object is no longer cacheable.
|
|
767
|
+
# The date and time at which the object is no longer cacheable. For more
|
|
768
|
+
# information, see
|
|
769
|
+
# [https://www.rfc-editor.org/rfc/rfc7234#section-5.3][1].
|
|
770
|
+
#
|
|
771
|
+
#
|
|
772
|
+
#
|
|
773
|
+
# [1]: https://www.rfc-editor.org/rfc/rfc7234#section-5.3
|
|
774
|
+
# @option options [String] :if_match
|
|
775
|
+
# Uploads the object only if the ETag (entity tag) value provided during
|
|
776
|
+
# the WRITE operation matches the ETag of the object in S3. If the ETag
|
|
777
|
+
# values do not match, the operation returns a `412 Precondition Failed`
|
|
778
|
+
# error.
|
|
779
|
+
#
|
|
780
|
+
# If a conflicting operation occurs during the upload S3 returns a `409
|
|
781
|
+
# ConditionalRequestConflict` response. On a 409 failure you should
|
|
782
|
+
# fetch the object's ETag and retry the upload.
|
|
783
|
+
#
|
|
784
|
+
# Expects the ETag value as a string.
|
|
785
|
+
#
|
|
786
|
+
# For more information about conditional requests, see [RFC 7232][1], or
|
|
787
|
+
# [Conditional requests][2] in the *Amazon S3 User Guide*.
|
|
788
|
+
#
|
|
789
|
+
#
|
|
790
|
+
#
|
|
791
|
+
# [1]: https://tools.ietf.org/html/rfc7232
|
|
792
|
+
# [2]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/conditional-requests.html
|
|
793
|
+
# @option options [String] :if_none_match
|
|
794
|
+
# Uploads the object only if the object key name does not already exist
|
|
795
|
+
# in the bucket specified. Otherwise, Amazon S3 returns a `412
|
|
796
|
+
# Precondition Failed` error.
|
|
797
|
+
#
|
|
798
|
+
# If a conflicting operation occurs during the upload S3 returns a `409
|
|
799
|
+
# ConditionalRequestConflict` response. On a 409 failure you should
|
|
800
|
+
# retry the upload.
|
|
801
|
+
#
|
|
802
|
+
# Expects the '*' (asterisk) character.
|
|
803
|
+
#
|
|
804
|
+
# For more information about conditional requests, see [RFC 7232][1], or
|
|
805
|
+
# [Conditional requests][2] in the *Amazon S3 User Guide*.
|
|
806
|
+
#
|
|
807
|
+
#
|
|
808
|
+
#
|
|
809
|
+
# [1]: https://tools.ietf.org/html/rfc7232
|
|
810
|
+
# [2]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/conditional-requests.html
|
|
349
811
|
# @option options [String] :grant_full_control
|
|
350
812
|
# Gives the grantee READ, READ\_ACP, and WRITE\_ACP permissions on the
|
|
351
813
|
# object.
|
|
814
|
+
#
|
|
815
|
+
# <note markdown="1"> * This functionality is not supported for directory buckets.
|
|
816
|
+
#
|
|
817
|
+
# * This functionality is not supported for Amazon S3 on Outposts.
|
|
818
|
+
#
|
|
819
|
+
# </note>
|
|
352
820
|
# @option options [String] :grant_read
|
|
353
821
|
# Allows grantee to read the object data and its metadata.
|
|
822
|
+
#
|
|
823
|
+
# <note markdown="1"> * This functionality is not supported for directory buckets.
|
|
824
|
+
#
|
|
825
|
+
# * This functionality is not supported for Amazon S3 on Outposts.
|
|
826
|
+
#
|
|
827
|
+
# </note>
|
|
354
828
|
# @option options [String] :grant_read_acp
|
|
355
829
|
# Allows grantee to read the object ACL.
|
|
830
|
+
#
|
|
831
|
+
# <note markdown="1"> * This functionality is not supported for directory buckets.
|
|
832
|
+
#
|
|
833
|
+
# * This functionality is not supported for Amazon S3 on Outposts.
|
|
834
|
+
#
|
|
835
|
+
# </note>
|
|
356
836
|
# @option options [String] :grant_write_acp
|
|
357
837
|
# Allows grantee to write the ACL for the applicable object.
|
|
838
|
+
#
|
|
839
|
+
# <note markdown="1"> * This functionality is not supported for directory buckets.
|
|
840
|
+
#
|
|
841
|
+
# * This functionality is not supported for Amazon S3 on Outposts.
|
|
842
|
+
#
|
|
843
|
+
# </note>
|
|
358
844
|
# @option options [required, String] :key
|
|
359
|
-
# Object key for which the PUT
|
|
845
|
+
# Object key for which the PUT action was initiated.
|
|
846
|
+
# @option options [Integer] :write_offset_bytes
|
|
847
|
+
# Specifies the offset for appending data to existing objects in bytes.
|
|
848
|
+
# The offset must be equal to the size of the existing object being
|
|
849
|
+
# appended to. If no object exists, setting this header to 0 will create
|
|
850
|
+
# a new object.
|
|
851
|
+
#
|
|
852
|
+
# <note markdown="1"> This functionality is only supported for objects in the Amazon S3
|
|
853
|
+
# Express One Zone storage class in directory buckets.
|
|
854
|
+
#
|
|
855
|
+
# </note>
|
|
360
856
|
# @option options [Hash<String,String>] :metadata
|
|
361
857
|
# A map of metadata to store with the object in S3.
|
|
362
858
|
# @option options [String] :server_side_encryption
|
|
363
|
-
# The
|
|
364
|
-
# S3
|
|
859
|
+
# The server-side encryption algorithm that was used when you store this
|
|
860
|
+
# object in Amazon S3 or Amazon FSx.
|
|
861
|
+
#
|
|
862
|
+
# * <b>General purpose buckets </b> - You have four mutually exclusive
|
|
863
|
+
# options to protect data using server-side encryption in Amazon S3,
|
|
864
|
+
# depending on how you choose to manage the encryption keys.
|
|
865
|
+
# Specifically, the encryption key options are Amazon S3 managed keys
|
|
866
|
+
# (SSE-S3), Amazon Web Services KMS keys (SSE-KMS or DSSE-KMS), and
|
|
867
|
+
# customer-provided keys (SSE-C). Amazon S3 encrypts data with
|
|
868
|
+
# server-side encryption by using Amazon S3 managed keys (SSE-S3) by
|
|
869
|
+
# default. You can optionally tell Amazon S3 to encrypt data at rest
|
|
870
|
+
# by using server-side encryption with other key options. For more
|
|
871
|
+
# information, see [Using Server-Side Encryption][1] in the *Amazon S3
|
|
872
|
+
# User Guide*.
|
|
873
|
+
#
|
|
874
|
+
# * <b>Directory buckets </b> - For directory buckets, there are only
|
|
875
|
+
# two supported options for server-side encryption: server-side
|
|
876
|
+
# encryption with Amazon S3 managed keys (SSE-S3) (`AES256`) and
|
|
877
|
+
# server-side encryption with KMS keys (SSE-KMS) (`aws:kms`). We
|
|
878
|
+
# recommend that the bucket's default encryption uses the desired
|
|
879
|
+
# encryption configuration and you don't override the bucket default
|
|
880
|
+
# encryption in your `CreateSession` requests or `PUT` object
|
|
881
|
+
# requests. Then, new objects are automatically encrypted with the
|
|
882
|
+
# desired encryption settings. For more information, see [Protecting
|
|
883
|
+
# data with server-side encryption][2] in the *Amazon S3 User Guide*.
|
|
884
|
+
# For more information about the encryption overriding behaviors in
|
|
885
|
+
# directory buckets, see [Specifying server-side encryption with KMS
|
|
886
|
+
# for new object uploads][3].
|
|
887
|
+
#
|
|
888
|
+
# In the Zonal endpoint API calls (except [CopyObject][4] and
|
|
889
|
+
# [UploadPartCopy][5]) using the REST API, the encryption request
|
|
890
|
+
# headers must match the encryption settings that are specified in the
|
|
891
|
+
# `CreateSession` request. You can't override the values of the
|
|
892
|
+
# encryption settings (`x-amz-server-side-encryption`,
|
|
893
|
+
# `x-amz-server-side-encryption-aws-kms-key-id`,
|
|
894
|
+
# `x-amz-server-side-encryption-context`, and
|
|
895
|
+
# `x-amz-server-side-encryption-bucket-key-enabled`) that are
|
|
896
|
+
# specified in the `CreateSession` request. You don't need to
|
|
897
|
+
# explicitly specify these encryption settings values in Zonal
|
|
898
|
+
# endpoint API calls, and Amazon S3 will use the encryption settings
|
|
899
|
+
# values from the `CreateSession` request to protect new objects in
|
|
900
|
+
# the directory bucket.
|
|
901
|
+
#
|
|
902
|
+
# <note markdown="1"> When you use the CLI or the Amazon Web Services SDKs, for
|
|
903
|
+
# `CreateSession`, the session token refreshes automatically to avoid
|
|
904
|
+
# service interruptions when a session expires. The CLI or the Amazon
|
|
905
|
+
# Web Services SDKs use the bucket's default encryption configuration
|
|
906
|
+
# for the `CreateSession` request. It's not supported to override the
|
|
907
|
+
# encryption settings values in the `CreateSession` request. So in the
|
|
908
|
+
# Zonal endpoint API calls (except [CopyObject][4] and
|
|
909
|
+
# [UploadPartCopy][5]), the encryption request headers must match the
|
|
910
|
+
# default encryption configuration of the directory bucket.
|
|
911
|
+
#
|
|
912
|
+
# </note>
|
|
913
|
+
#
|
|
914
|
+
# * <b>S3 access points for Amazon FSx </b> - When accessing data stored
|
|
915
|
+
# in Amazon FSx file systems using S3 access points, the only valid
|
|
916
|
+
# server side encryption option is `aws:fsx`. All Amazon FSx file
|
|
917
|
+
# systems have encryption configured by default and are encrypted at
|
|
918
|
+
# rest. Data is automatically encrypted before being written to the
|
|
919
|
+
# file system, and automatically decrypted as it is read. These
|
|
920
|
+
# processes are handled transparently by Amazon FSx.
|
|
921
|
+
#
|
|
922
|
+
#
|
|
923
|
+
#
|
|
924
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingServerSideEncryption.html
|
|
925
|
+
# [2]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-serv-side-encryption.html
|
|
926
|
+
# [3]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-specifying-kms-encryption.html
|
|
927
|
+
# [4]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_CopyObject.html
|
|
928
|
+
# [5]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPartCopy.html
|
|
365
929
|
# @option options [String] :storage_class
|
|
366
|
-
#
|
|
930
|
+
# By default, Amazon S3 uses the STANDARD Storage Class to store newly
|
|
931
|
+
# created objects. The STANDARD storage class provides high durability
|
|
932
|
+
# and high availability. Depending on performance needs, you can specify
|
|
933
|
+
# a different Storage Class. For more information, see [Storage
|
|
934
|
+
# Classes][1] in the *Amazon S3 User Guide*.
|
|
935
|
+
#
|
|
936
|
+
# <note markdown="1"> * Directory buckets only support `EXPRESS_ONEZONE` (the S3 Express One
|
|
937
|
+
# Zone storage class) in Availability Zones and `ONEZONE_IA` (the S3
|
|
938
|
+
# One Zone-Infrequent Access storage class) in Dedicated Local Zones.
|
|
939
|
+
#
|
|
940
|
+
# * Amazon S3 on Outposts only uses the OUTPOSTS Storage Class.
|
|
941
|
+
#
|
|
942
|
+
# </note>
|
|
943
|
+
#
|
|
944
|
+
#
|
|
945
|
+
#
|
|
946
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html
|
|
367
947
|
# @option options [String] :website_redirect_location
|
|
368
948
|
# If the bucket is configured as a website, redirects requests for this
|
|
369
949
|
# object to another object in the same bucket or to an external URL.
|
|
370
|
-
# Amazon S3 stores the value of this header in the object metadata.
|
|
950
|
+
# Amazon S3 stores the value of this header in the object metadata. For
|
|
951
|
+
# information about object metadata, see [Object Key and Metadata][1] in
|
|
952
|
+
# the *Amazon S3 User Guide*.
|
|
953
|
+
#
|
|
954
|
+
# In the following example, the request header sets the redirect to an
|
|
955
|
+
# object (anotherPage.html) in the same bucket:
|
|
956
|
+
#
|
|
957
|
+
# `x-amz-website-redirect-location: /anotherPage.html`
|
|
958
|
+
#
|
|
959
|
+
# In the following example, the request header sets the object redirect
|
|
960
|
+
# to another website:
|
|
961
|
+
#
|
|
962
|
+
# `x-amz-website-redirect-location: http://www.example.com/`
|
|
963
|
+
#
|
|
964
|
+
# For more information about website hosting in Amazon S3, see [Hosting
|
|
965
|
+
# Websites on Amazon S3][2] and [How to Configure Website Page
|
|
966
|
+
# Redirects][3] in the *Amazon S3 User Guide*.
|
|
967
|
+
#
|
|
968
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
|
969
|
+
#
|
|
970
|
+
# </note>
|
|
971
|
+
#
|
|
972
|
+
#
|
|
973
|
+
#
|
|
974
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingMetadata.html
|
|
975
|
+
# [2]: https://docs.aws.amazon.com/AmazonS3/latest/dev/WebsiteHosting.html
|
|
976
|
+
# [3]: https://docs.aws.amazon.com/AmazonS3/latest/dev/how-to-page-redirect.html
|
|
371
977
|
# @option options [String] :sse_customer_algorithm
|
|
372
|
-
# Specifies the algorithm to use
|
|
373
|
-
# AES256).
|
|
978
|
+
# Specifies the algorithm to use when encrypting the object (for
|
|
979
|
+
# example, `AES256`).
|
|
980
|
+
#
|
|
981
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
|
982
|
+
#
|
|
983
|
+
# </note>
|
|
374
984
|
# @option options [String] :sse_customer_key
|
|
375
985
|
# Specifies the customer-provided encryption key for Amazon S3 to use in
|
|
376
986
|
# encrypting data. This value is used to store the object and then it is
|
|
377
|
-
# discarded; Amazon does not store the encryption key. The key must
|
|
378
|
-
# appropriate for use with the algorithm specified in the
|
|
379
|
-
# x-amz-server-side
|
|
987
|
+
# discarded; Amazon S3 does not store the encryption key. The key must
|
|
988
|
+
# be appropriate for use with the algorithm specified in the
|
|
989
|
+
# `x-amz-server-side-encryption-customer-algorithm` header.
|
|
990
|
+
#
|
|
991
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
|
992
|
+
#
|
|
993
|
+
# </note>
|
|
380
994
|
# @option options [String] :sse_customer_key_md5
|
|
381
995
|
# Specifies the 128-bit MD5 digest of the encryption key according to
|
|
382
996
|
# RFC 1321. Amazon S3 uses this header for a message integrity check to
|
|
383
|
-
# ensure the encryption key was transmitted without error.
|
|
997
|
+
# ensure that the encryption key was transmitted without error.
|
|
998
|
+
#
|
|
999
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
|
1000
|
+
#
|
|
1001
|
+
# </note>
|
|
384
1002
|
# @option options [String] :ssekms_key_id
|
|
385
|
-
# Specifies the
|
|
386
|
-
#
|
|
387
|
-
#
|
|
388
|
-
#
|
|
389
|
-
#
|
|
1003
|
+
# Specifies the KMS key ID (Key ID, Key ARN, or Key Alias) to use for
|
|
1004
|
+
# object encryption. If the KMS key doesn't exist in the same account
|
|
1005
|
+
# that's issuing the command, you must use the full Key ARN not the Key
|
|
1006
|
+
# ID.
|
|
1007
|
+
#
|
|
1008
|
+
# **General purpose buckets** - If you specify
|
|
1009
|
+
# `x-amz-server-side-encryption` with `aws:kms` or `aws:kms:dsse`, this
|
|
1010
|
+
# header specifies the ID (Key ID, Key ARN, or Key Alias) of the KMS key
|
|
1011
|
+
# to use. If you specify `x-amz-server-side-encryption:aws:kms` or
|
|
1012
|
+
# `x-amz-server-side-encryption:aws:kms:dsse`, but do not provide
|
|
1013
|
+
# `x-amz-server-side-encryption-aws-kms-key-id`, Amazon S3 uses the
|
|
1014
|
+
# Amazon Web Services managed key (`aws/s3`) to protect the data.
|
|
1015
|
+
#
|
|
1016
|
+
# **Directory buckets** - To encrypt data using SSE-KMS, it's
|
|
1017
|
+
# recommended to specify the `x-amz-server-side-encryption` header to
|
|
1018
|
+
# `aws:kms`. Then, the `x-amz-server-side-encryption-aws-kms-key-id`
|
|
1019
|
+
# header implicitly uses the bucket's default KMS customer managed key
|
|
1020
|
+
# ID. If you want to explicitly set the `
|
|
1021
|
+
# x-amz-server-side-encryption-aws-kms-key-id` header, it must match the
|
|
1022
|
+
# bucket's default customer managed key (using key ID or ARN, not
|
|
1023
|
+
# alias). Your SSE-KMS configuration can only support 1 [customer
|
|
1024
|
+
# managed key][1] per directory bucket's lifetime. The [Amazon Web
|
|
1025
|
+
# Services managed key][2] (`aws/s3`) isn't supported. Incorrect key
|
|
1026
|
+
# specification results in an HTTP `400 Bad Request` error.
|
|
1027
|
+
#
|
|
1028
|
+
#
|
|
1029
|
+
#
|
|
1030
|
+
# [1]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#customer-cmk
|
|
1031
|
+
# [2]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-managed-cmk
|
|
1032
|
+
# @option options [String] :ssekms_encryption_context
|
|
1033
|
+
# Specifies the Amazon Web Services KMS Encryption Context as an
|
|
1034
|
+
# additional encryption context to use for object encryption. The value
|
|
1035
|
+
# of this header is a Base64 encoded string of a UTF-8 encoded JSON,
|
|
1036
|
+
# which contains the encryption context as key-value pairs. This value
|
|
1037
|
+
# is stored as object metadata and automatically gets passed on to
|
|
1038
|
+
# Amazon Web Services KMS for future `GetObject` operations on this
|
|
1039
|
+
# object.
|
|
1040
|
+
#
|
|
1041
|
+
# **General purpose buckets** - This value must be explicitly added
|
|
1042
|
+
# during `CopyObject` operations if you want an additional encryption
|
|
1043
|
+
# context for your object. For more information, see [Encryption
|
|
1044
|
+
# context][1] in the *Amazon S3 User Guide*.
|
|
1045
|
+
#
|
|
1046
|
+
# **Directory buckets** - You can optionally provide an explicit
|
|
1047
|
+
# encryption context value. The value must match the default encryption
|
|
1048
|
+
# context - the bucket Amazon Resource Name (ARN). An additional
|
|
1049
|
+
# encryption context value is not supported.
|
|
1050
|
+
#
|
|
1051
|
+
#
|
|
1052
|
+
#
|
|
1053
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/UsingKMSEncryption.html#encryption-context
|
|
1054
|
+
# @option options [Boolean] :bucket_key_enabled
|
|
1055
|
+
# Specifies whether Amazon S3 should use an S3 Bucket Key for object
|
|
1056
|
+
# encryption with server-side encryption using Key Management Service
|
|
1057
|
+
# (KMS) keys (SSE-KMS).
|
|
1058
|
+
#
|
|
1059
|
+
# **General purpose buckets** - Setting this header to `true` causes
|
|
1060
|
+
# Amazon S3 to use an S3 Bucket Key for object encryption with SSE-KMS.
|
|
1061
|
+
# Also, specifying this header with a PUT action doesn't affect
|
|
1062
|
+
# bucket-level settings for S3 Bucket Key.
|
|
1063
|
+
#
|
|
1064
|
+
# **Directory buckets** - S3 Bucket Keys are always enabled for `GET`
|
|
1065
|
+
# and `PUT` operations in a directory bucket and can’t be disabled. S3
|
|
1066
|
+
# Bucket Keys aren't supported, when you copy SSE-KMS encrypted objects
|
|
1067
|
+
# from general purpose buckets to directory buckets, from directory
|
|
1068
|
+
# buckets to general purpose buckets, or between directory buckets,
|
|
1069
|
+
# through [CopyObject][1], [UploadPartCopy][2], [the Copy operation in
|
|
1070
|
+
# Batch Operations][3], or [the import jobs][4]. In this case, Amazon S3
|
|
1071
|
+
# makes a call to KMS every time a copy request is made for a
|
|
1072
|
+
# KMS-encrypted object.
|
|
1073
|
+
#
|
|
1074
|
+
#
|
|
1075
|
+
#
|
|
1076
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_CopyObject.html
|
|
1077
|
+
# [2]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPartCopy.html
|
|
1078
|
+
# [3]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/directory-buckets-objects-Batch-Ops
|
|
1079
|
+
# [4]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/create-import-job
|
|
390
1080
|
# @option options [String] :request_payer
|
|
391
|
-
# Confirms that the requester knows that
|
|
392
|
-
#
|
|
393
|
-
# requests.
|
|
394
|
-
#
|
|
395
|
-
#
|
|
1081
|
+
# Confirms that the requester knows that they will be charged for the
|
|
1082
|
+
# request. Bucket owners need not specify this parameter in their
|
|
1083
|
+
# requests. If either the source or destination S3 bucket has Requester
|
|
1084
|
+
# Pays enabled, the requester will pay for corresponding charges to copy
|
|
1085
|
+
# the object. For information about downloading objects from Requester
|
|
1086
|
+
# Pays buckets, see [Downloading Objects in Requester Pays Buckets][1]
|
|
1087
|
+
# in the *Amazon S3 User Guide*.
|
|
1088
|
+
#
|
|
1089
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
|
1090
|
+
#
|
|
1091
|
+
# </note>
|
|
1092
|
+
#
|
|
1093
|
+
#
|
|
1094
|
+
#
|
|
1095
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
|
|
396
1096
|
# @option options [String] :tagging
|
|
397
1097
|
# The tag-set for the object. The tag-set must be encoded as URL Query
|
|
398
|
-
# parameters
|
|
1098
|
+
# parameters. (For example, "Key1=Value1")
|
|
1099
|
+
#
|
|
1100
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
|
1101
|
+
#
|
|
1102
|
+
# </note>
|
|
1103
|
+
# @option options [String] :object_lock_mode
|
|
1104
|
+
# The Object Lock mode that you want to apply to this object.
|
|
1105
|
+
#
|
|
1106
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
|
1107
|
+
#
|
|
1108
|
+
# </note>
|
|
1109
|
+
# @option options [Time,DateTime,Date,Integer,String] :object_lock_retain_until_date
|
|
1110
|
+
# The date and time when you want this object's Object Lock to expire.
|
|
1111
|
+
# Must be formatted as a timestamp parameter.
|
|
1112
|
+
#
|
|
1113
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
|
1114
|
+
#
|
|
1115
|
+
# </note>
|
|
1116
|
+
# @option options [String] :object_lock_legal_hold_status
|
|
1117
|
+
# Specifies whether a legal hold will be applied to this object. For
|
|
1118
|
+
# more information about S3 Object Lock, see [Object Lock][1] in the
|
|
1119
|
+
# *Amazon S3 User Guide*.
|
|
1120
|
+
#
|
|
1121
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
|
1122
|
+
#
|
|
1123
|
+
# </note>
|
|
1124
|
+
#
|
|
1125
|
+
#
|
|
1126
|
+
#
|
|
1127
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock.html
|
|
1128
|
+
# @option options [String] :expected_bucket_owner
|
|
1129
|
+
# The account ID of the expected bucket owner. If the account ID that
|
|
1130
|
+
# you provide does not match the actual owner of the bucket, the request
|
|
1131
|
+
# fails with the HTTP status code `403 Forbidden` (access denied).
|
|
399
1132
|
# @return [Object]
|
|
400
1133
|
def put_object(options = {})
|
|
401
1134
|
options = options.merge(bucket: @name)
|
|
402
|
-
|
|
1135
|
+
Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
|
1136
|
+
@client.put_object(options)
|
|
1137
|
+
end
|
|
403
1138
|
Object.new(
|
|
404
1139
|
bucket_name: @name,
|
|
405
1140
|
key: options[:key],
|
|
@@ -457,32 +1192,124 @@ module Aws::S3
|
|
|
457
1192
|
# key_marker: "KeyMarker",
|
|
458
1193
|
# prefix: "Prefix",
|
|
459
1194
|
# upload_id_marker: "UploadIdMarker",
|
|
1195
|
+
# expected_bucket_owner: "AccountId",
|
|
1196
|
+
# request_payer: "requester", # accepts requester
|
|
460
1197
|
# })
|
|
461
1198
|
# @param [Hash] options ({})
|
|
462
1199
|
# @option options [String] :delimiter
|
|
463
1200
|
# Character you use to group keys.
|
|
1201
|
+
#
|
|
1202
|
+
# All keys that contain the same string between the prefix, if
|
|
1203
|
+
# specified, and the first occurrence of the delimiter after the prefix
|
|
1204
|
+
# are grouped under a single result element, `CommonPrefixes`. If you
|
|
1205
|
+
# don't specify the prefix parameter, then the substring starts at the
|
|
1206
|
+
# beginning of the key. The keys that are grouped under `CommonPrefixes`
|
|
1207
|
+
# result element are not returned elsewhere in the response.
|
|
1208
|
+
#
|
|
1209
|
+
# `CommonPrefixes` is filtered out from results if it is not
|
|
1210
|
+
# lexicographically greater than the key-marker.
|
|
1211
|
+
#
|
|
1212
|
+
# <note markdown="1"> **Directory buckets** - For directory buckets, `/` is the only
|
|
1213
|
+
# supported delimiter.
|
|
1214
|
+
#
|
|
1215
|
+
# </note>
|
|
464
1216
|
# @option options [String] :encoding_type
|
|
465
|
-
#
|
|
466
|
-
#
|
|
467
|
-
# Unicode character
|
|
468
|
-
# characters, such as characters with an ASCII value from
|
|
469
|
-
# characters that
|
|
470
|
-
# parameter to request that Amazon S3 encode the keys in the
|
|
1217
|
+
# Encoding type used by Amazon S3 to encode the [object keys][1] in the
|
|
1218
|
+
# response. Responses are encoded only in UTF-8. An object key can
|
|
1219
|
+
# contain any Unicode character. However, the XML 1.0 parser can't
|
|
1220
|
+
# parse certain characters, such as characters with an ASCII value from
|
|
1221
|
+
# 0 to 10. For characters that aren't supported in XML 1.0, you can add
|
|
1222
|
+
# this parameter to request that Amazon S3 encode the keys in the
|
|
1223
|
+
# response. For more information about characters to avoid in object key
|
|
1224
|
+
# names, see [Object key naming guidelines][2].
|
|
1225
|
+
#
|
|
1226
|
+
# <note markdown="1"> When using the URL encoding type, non-ASCII characters that are used
|
|
1227
|
+
# in an object's key name will be percent-encoded according to UTF-8
|
|
1228
|
+
# code values. For example, the object `test_file(3).png` will appear as
|
|
1229
|
+
# `test_file%283%29.png`.
|
|
1230
|
+
#
|
|
1231
|
+
# </note>
|
|
1232
|
+
#
|
|
1233
|
+
#
|
|
1234
|
+
#
|
|
1235
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-keys.html
|
|
1236
|
+
# [2]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-keys.html#object-key-guidelines
|
|
471
1237
|
# @option options [String] :key_marker
|
|
472
|
-
#
|
|
473
|
-
#
|
|
1238
|
+
# Specifies the multipart upload after which listing should begin.
|
|
1239
|
+
#
|
|
1240
|
+
# <note markdown="1"> * **General purpose buckets** - For general purpose buckets,
|
|
1241
|
+
# `key-marker` is an object key. Together with `upload-id-marker`,
|
|
1242
|
+
# this parameter specifies the multipart upload after which listing
|
|
1243
|
+
# should begin.
|
|
1244
|
+
#
|
|
1245
|
+
# If `upload-id-marker` is not specified, only the keys
|
|
1246
|
+
# lexicographically greater than the specified `key-marker` will be
|
|
1247
|
+
# included in the list.
|
|
1248
|
+
#
|
|
1249
|
+
# If `upload-id-marker` is specified, any multipart uploads for a key
|
|
1250
|
+
# equal to the `key-marker` might also be included, provided those
|
|
1251
|
+
# multipart uploads have upload IDs lexicographically greater than the
|
|
1252
|
+
# specified `upload-id-marker`.
|
|
1253
|
+
#
|
|
1254
|
+
# * **Directory buckets** - For directory buckets, `key-marker` is
|
|
1255
|
+
# obfuscated and isn't a real object key. The `upload-id-marker`
|
|
1256
|
+
# parameter isn't supported by directory buckets. To list the
|
|
1257
|
+
# additional multipart uploads, you only need to set the value of
|
|
1258
|
+
# `key-marker` to the `NextKeyMarker` value from the previous
|
|
1259
|
+
# response.
|
|
1260
|
+
#
|
|
1261
|
+
# In the `ListMultipartUploads` response, the multipart uploads
|
|
1262
|
+
# aren't sorted lexicographically based on the object keys.
|
|
1263
|
+
#
|
|
1264
|
+
# </note>
|
|
474
1265
|
# @option options [String] :prefix
|
|
475
1266
|
# Lists in-progress uploads only for those keys that begin with the
|
|
476
|
-
# specified prefix.
|
|
1267
|
+
# specified prefix. You can use prefixes to separate a bucket into
|
|
1268
|
+
# different grouping of keys. (You can think of using `prefix` to make
|
|
1269
|
+
# groups in the same way that you'd use a folder in a file system.)
|
|
1270
|
+
#
|
|
1271
|
+
# <note markdown="1"> **Directory buckets** - For directory buckets, only prefixes that end
|
|
1272
|
+
# in a delimiter (`/`) are supported.
|
|
1273
|
+
#
|
|
1274
|
+
# </note>
|
|
477
1275
|
# @option options [String] :upload_id_marker
|
|
478
1276
|
# Together with key-marker, specifies the multipart upload after which
|
|
479
1277
|
# listing should begin. If key-marker is not specified, the
|
|
480
|
-
# upload-id-marker parameter is ignored.
|
|
1278
|
+
# upload-id-marker parameter is ignored. Otherwise, any multipart
|
|
1279
|
+
# uploads for a key equal to the key-marker might be included in the
|
|
1280
|
+
# list only if they have an upload ID lexicographically greater than the
|
|
1281
|
+
# specified `upload-id-marker`.
|
|
1282
|
+
#
|
|
1283
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
|
1284
|
+
#
|
|
1285
|
+
# </note>
|
|
1286
|
+
# @option options [String] :expected_bucket_owner
|
|
1287
|
+
# The account ID of the expected bucket owner. If the account ID that
|
|
1288
|
+
# you provide does not match the actual owner of the bucket, the request
|
|
1289
|
+
# fails with the HTTP status code `403 Forbidden` (access denied).
|
|
1290
|
+
# @option options [String] :request_payer
|
|
1291
|
+
# Confirms that the requester knows that they will be charged for the
|
|
1292
|
+
# request. Bucket owners need not specify this parameter in their
|
|
1293
|
+
# requests. If either the source or destination S3 bucket has Requester
|
|
1294
|
+
# Pays enabled, the requester will pay for corresponding charges to copy
|
|
1295
|
+
# the object. For information about downloading objects from Requester
|
|
1296
|
+
# Pays buckets, see [Downloading Objects in Requester Pays Buckets][1]
|
|
1297
|
+
# in the *Amazon S3 User Guide*.
|
|
1298
|
+
#
|
|
1299
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
|
1300
|
+
#
|
|
1301
|
+
# </note>
|
|
1302
|
+
#
|
|
1303
|
+
#
|
|
1304
|
+
#
|
|
1305
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
|
|
481
1306
|
# @return [MultipartUpload::Collection]
|
|
482
1307
|
def multipart_uploads(options = {})
|
|
483
1308
|
batches = Enumerator.new do |y|
|
|
484
1309
|
options = options.merge(bucket: @name)
|
|
485
|
-
resp =
|
|
1310
|
+
resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
|
1311
|
+
@client.list_multipart_uploads(options)
|
|
1312
|
+
end
|
|
486
1313
|
resp.each_page do |page|
|
|
487
1314
|
batch = []
|
|
488
1315
|
page.data.uploads.each do |u|
|
|
@@ -526,28 +1353,83 @@ module Aws::S3
|
|
|
526
1353
|
# key_marker: "KeyMarker",
|
|
527
1354
|
# prefix: "Prefix",
|
|
528
1355
|
# version_id_marker: "VersionIdMarker",
|
|
1356
|
+
# expected_bucket_owner: "AccountId",
|
|
1357
|
+
# request_payer: "requester", # accepts requester
|
|
1358
|
+
# optional_object_attributes: ["RestoreStatus"], # accepts RestoreStatus
|
|
529
1359
|
# })
|
|
530
1360
|
# @param [Hash] options ({})
|
|
531
1361
|
# @option options [String] :delimiter
|
|
532
|
-
# A delimiter is a character you
|
|
1362
|
+
# A delimiter is a character that you specify to group keys. All keys
|
|
1363
|
+
# that contain the same string between the `prefix` and the first
|
|
1364
|
+
# occurrence of the delimiter are grouped under a single result element
|
|
1365
|
+
# in `CommonPrefixes`. These groups are counted as one result against
|
|
1366
|
+
# the `max-keys` limitation. These keys are not returned elsewhere in
|
|
1367
|
+
# the response.
|
|
1368
|
+
#
|
|
1369
|
+
# `CommonPrefixes` is filtered out from results if it is not
|
|
1370
|
+
# lexicographically greater than the key-marker.
|
|
533
1371
|
# @option options [String] :encoding_type
|
|
534
|
-
#
|
|
535
|
-
#
|
|
536
|
-
# Unicode character
|
|
537
|
-
# characters, such as characters with an ASCII value from
|
|
538
|
-
# characters that
|
|
539
|
-
# parameter to request that Amazon S3 encode the keys in the
|
|
1372
|
+
# Encoding type used by Amazon S3 to encode the [object keys][1] in the
|
|
1373
|
+
# response. Responses are encoded only in UTF-8. An object key can
|
|
1374
|
+
# contain any Unicode character. However, the XML 1.0 parser can't
|
|
1375
|
+
# parse certain characters, such as characters with an ASCII value from
|
|
1376
|
+
# 0 to 10. For characters that aren't supported in XML 1.0, you can add
|
|
1377
|
+
# this parameter to request that Amazon S3 encode the keys in the
|
|
1378
|
+
# response. For more information about characters to avoid in object key
|
|
1379
|
+
# names, see [Object key naming guidelines][2].
|
|
1380
|
+
#
|
|
1381
|
+
# <note markdown="1"> When using the URL encoding type, non-ASCII characters that are used
|
|
1382
|
+
# in an object's key name will be percent-encoded according to UTF-8
|
|
1383
|
+
# code values. For example, the object `test_file(3).png` will appear as
|
|
1384
|
+
# `test_file%283%29.png`.
|
|
1385
|
+
#
|
|
1386
|
+
# </note>
|
|
1387
|
+
#
|
|
1388
|
+
#
|
|
1389
|
+
#
|
|
1390
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-keys.html
|
|
1391
|
+
# [2]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-keys.html#object-key-guidelines
|
|
540
1392
|
# @option options [String] :key_marker
|
|
541
1393
|
# Specifies the key to start with when listing objects in a bucket.
|
|
542
1394
|
# @option options [String] :prefix
|
|
543
|
-
#
|
|
1395
|
+
# Use this parameter to select only those keys that begin with the
|
|
1396
|
+
# specified prefix. You can use prefixes to separate a bucket into
|
|
1397
|
+
# different groupings of keys. (You can think of using `prefix` to make
|
|
1398
|
+
# groups in the same way that you'd use a folder in a file system.) You
|
|
1399
|
+
# can use `prefix` with `delimiter` to roll up numerous objects into a
|
|
1400
|
+
# single result under `CommonPrefixes`.
|
|
544
1401
|
# @option options [String] :version_id_marker
|
|
545
1402
|
# Specifies the object version you want to start listing from.
|
|
1403
|
+
# @option options [String] :expected_bucket_owner
|
|
1404
|
+
# The account ID of the expected bucket owner. If the account ID that
|
|
1405
|
+
# you provide does not match the actual owner of the bucket, the request
|
|
1406
|
+
# fails with the HTTP status code `403 Forbidden` (access denied).
|
|
1407
|
+
# @option options [String] :request_payer
|
|
1408
|
+
# Confirms that the requester knows that they will be charged for the
|
|
1409
|
+
# request. Bucket owners need not specify this parameter in their
|
|
1410
|
+
# requests. If either the source or destination S3 bucket has Requester
|
|
1411
|
+
# Pays enabled, the requester will pay for corresponding charges to copy
|
|
1412
|
+
# the object. For information about downloading objects from Requester
|
|
1413
|
+
# Pays buckets, see [Downloading Objects in Requester Pays Buckets][1]
|
|
1414
|
+
# in the *Amazon S3 User Guide*.
|
|
1415
|
+
#
|
|
1416
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
|
1417
|
+
#
|
|
1418
|
+
# </note>
|
|
1419
|
+
#
|
|
1420
|
+
#
|
|
1421
|
+
#
|
|
1422
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
|
|
1423
|
+
# @option options [Array<String>] :optional_object_attributes
|
|
1424
|
+
# Specifies the optional fields that you want returned in the response.
|
|
1425
|
+
# Fields that you do not specify are not returned.
|
|
546
1426
|
# @return [ObjectVersion::Collection]
|
|
547
1427
|
def object_versions(options = {})
|
|
548
1428
|
batches = Enumerator.new do |y|
|
|
549
1429
|
options = options.merge(bucket: @name)
|
|
550
|
-
resp =
|
|
1430
|
+
resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
|
1431
|
+
@client.list_object_versions(options)
|
|
1432
|
+
end
|
|
551
1433
|
resp.each_page do |page|
|
|
552
1434
|
batch = []
|
|
553
1435
|
page.data.versions_delete_markers.each do |v|
|
|
@@ -571,29 +1453,105 @@ module Aws::S3
|
|
|
571
1453
|
# delimiter: "Delimiter",
|
|
572
1454
|
# encoding_type: "url", # accepts url
|
|
573
1455
|
# prefix: "Prefix",
|
|
1456
|
+
# fetch_owner: false,
|
|
1457
|
+
# start_after: "StartAfter",
|
|
574
1458
|
# request_payer: "requester", # accepts requester
|
|
1459
|
+
# expected_bucket_owner: "AccountId",
|
|
1460
|
+
# optional_object_attributes: ["RestoreStatus"], # accepts RestoreStatus
|
|
575
1461
|
# })
|
|
576
1462
|
# @param [Hash] options ({})
|
|
577
1463
|
# @option options [String] :delimiter
|
|
578
|
-
# A delimiter is a character you use to group keys.
|
|
1464
|
+
# A delimiter is a character that you use to group keys.
|
|
1465
|
+
#
|
|
1466
|
+
# `CommonPrefixes` is filtered out from results if it is not
|
|
1467
|
+
# lexicographically greater than the `StartAfter` value.
|
|
1468
|
+
#
|
|
1469
|
+
# <note markdown="1"> * **Directory buckets** - For directory buckets, `/` is the only
|
|
1470
|
+
# supported delimiter.
|
|
1471
|
+
#
|
|
1472
|
+
# * <b>Directory buckets </b> - When you query `ListObjectsV2` with a
|
|
1473
|
+
# delimiter during in-progress multipart uploads, the `CommonPrefixes`
|
|
1474
|
+
# response parameter contains the prefixes that are associated with
|
|
1475
|
+
# the in-progress multipart uploads. For more information about
|
|
1476
|
+
# multipart uploads, see [Multipart Upload Overview][1] in the *Amazon
|
|
1477
|
+
# S3 User Guide*.
|
|
1478
|
+
#
|
|
1479
|
+
# </note>
|
|
1480
|
+
#
|
|
1481
|
+
#
|
|
1482
|
+
#
|
|
1483
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuoverview.html
|
|
579
1484
|
# @option options [String] :encoding_type
|
|
580
|
-
#
|
|
581
|
-
#
|
|
582
|
-
# Unicode character
|
|
583
|
-
# characters, such as characters with an ASCII value from
|
|
584
|
-
# characters that
|
|
585
|
-
# parameter to request that Amazon S3 encode the keys in the
|
|
1485
|
+
# Encoding type used by Amazon S3 to encode the [object keys][1] in the
|
|
1486
|
+
# response. Responses are encoded only in UTF-8. An object key can
|
|
1487
|
+
# contain any Unicode character. However, the XML 1.0 parser can't
|
|
1488
|
+
# parse certain characters, such as characters with an ASCII value from
|
|
1489
|
+
# 0 to 10. For characters that aren't supported in XML 1.0, you can add
|
|
1490
|
+
# this parameter to request that Amazon S3 encode the keys in the
|
|
1491
|
+
# response. For more information about characters to avoid in object key
|
|
1492
|
+
# names, see [Object key naming guidelines][2].
|
|
1493
|
+
#
|
|
1494
|
+
# <note markdown="1"> When using the URL encoding type, non-ASCII characters that are used
|
|
1495
|
+
# in an object's key name will be percent-encoded according to UTF-8
|
|
1496
|
+
# code values. For example, the object `test_file(3).png` will appear as
|
|
1497
|
+
# `test_file%283%29.png`.
|
|
1498
|
+
#
|
|
1499
|
+
# </note>
|
|
1500
|
+
#
|
|
1501
|
+
#
|
|
1502
|
+
#
|
|
1503
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-keys.html
|
|
1504
|
+
# [2]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-keys.html#object-key-guidelines
|
|
586
1505
|
# @option options [String] :prefix
|
|
587
1506
|
# Limits the response to keys that begin with the specified prefix.
|
|
1507
|
+
#
|
|
1508
|
+
# <note markdown="1"> **Directory buckets** - For directory buckets, only prefixes that end
|
|
1509
|
+
# in a delimiter (`/`) are supported.
|
|
1510
|
+
#
|
|
1511
|
+
# </note>
|
|
1512
|
+
# @option options [Boolean] :fetch_owner
|
|
1513
|
+
# The owner field is not present in `ListObjectsV2` by default. If you
|
|
1514
|
+
# want to return the owner field with each key in the result, then set
|
|
1515
|
+
# the `FetchOwner` field to `true`.
|
|
1516
|
+
#
|
|
1517
|
+
# <note markdown="1"> **Directory buckets** - For directory buckets, the bucket owner is
|
|
1518
|
+
# returned as the object owner for all objects.
|
|
1519
|
+
#
|
|
1520
|
+
# </note>
|
|
1521
|
+
# @option options [String] :start_after
|
|
1522
|
+
# StartAfter is where you want Amazon S3 to start listing from. Amazon
|
|
1523
|
+
# S3 starts listing after this specified key. StartAfter can be any key
|
|
1524
|
+
# in the bucket.
|
|
1525
|
+
#
|
|
1526
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
|
1527
|
+
#
|
|
1528
|
+
# </note>
|
|
588
1529
|
# @option options [String] :request_payer
|
|
589
1530
|
# Confirms that the requester knows that she or he will be charged for
|
|
590
|
-
# the list objects request. Bucket owners need not specify
|
|
591
|
-
# parameter in their requests.
|
|
1531
|
+
# the list objects request in V2 style. Bucket owners need not specify
|
|
1532
|
+
# this parameter in their requests.
|
|
1533
|
+
#
|
|
1534
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
|
1535
|
+
#
|
|
1536
|
+
# </note>
|
|
1537
|
+
# @option options [String] :expected_bucket_owner
|
|
1538
|
+
# The account ID of the expected bucket owner. If the account ID that
|
|
1539
|
+
# you provide does not match the actual owner of the bucket, the request
|
|
1540
|
+
# fails with the HTTP status code `403 Forbidden` (access denied).
|
|
1541
|
+
# @option options [Array<String>] :optional_object_attributes
|
|
1542
|
+
# Specifies the optional fields that you want returned in the response.
|
|
1543
|
+
# Fields that you do not specify are not returned.
|
|
1544
|
+
#
|
|
1545
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
|
1546
|
+
#
|
|
1547
|
+
# </note>
|
|
592
1548
|
# @return [ObjectSummary::Collection]
|
|
593
1549
|
def objects(options = {})
|
|
594
1550
|
batches = Enumerator.new do |y|
|
|
595
1551
|
options = options.merge(bucket: @name)
|
|
596
|
-
resp =
|
|
1552
|
+
resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
|
1553
|
+
@client.list_objects_v2(options)
|
|
1554
|
+
end
|
|
597
1555
|
resp.each_page do |page|
|
|
598
1556
|
batch = []
|
|
599
1557
|
page.data.contents.each do |c|
|
|
@@ -672,8 +1630,8 @@ module Aws::S3
|
|
|
672
1630
|
|
|
673
1631
|
def yield_waiter_and_warn(waiter, &block)
|
|
674
1632
|
if !@waiter_block_warned
|
|
675
|
-
msg = "pass options to configure the waiter; "
|
|
676
|
-
|
|
1633
|
+
msg = "pass options to configure the waiter; "\
|
|
1634
|
+
"yielding the waiter is deprecated"
|
|
677
1635
|
warn(msg)
|
|
678
1636
|
@waiter_block_warned = true
|
|
679
1637
|
end
|
|
@@ -681,7 +1639,9 @@ module Aws::S3
|
|
|
681
1639
|
end
|
|
682
1640
|
|
|
683
1641
|
def separate_params_and_options(options)
|
|
684
|
-
opts = Set.new(
|
|
1642
|
+
opts = Set.new(
|
|
1643
|
+
[:client, :max_attempts, :delay, :before_attempt, :before_wait]
|
|
1644
|
+
)
|
|
685
1645
|
waiter_opts = {}
|
|
686
1646
|
waiter_params = {}
|
|
687
1647
|
options.each_pair do |key, value|
|
|
@@ -698,3 +1658,6 @@ module Aws::S3
|
|
|
698
1658
|
class Collection < Aws::Resources::Collection; end
|
|
699
1659
|
end
|
|
700
1660
|
end
|
|
1661
|
+
|
|
1662
|
+
# Load customizations if they exist
|
|
1663
|
+
require 'aws-sdk-s3/customizations/bucket'
|