aws-sdk-s3 1.45.0 → 1.143.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/CHANGELOG.md +1106 -0
- data/LICENSE.txt +202 -0
- data/VERSION +1 -0
- data/lib/aws-sdk-s3/bucket.rb +784 -98
- data/lib/aws-sdk-s3/bucket_acl.rb +64 -18
- data/lib/aws-sdk-s3/bucket_cors.rb +79 -18
- data/lib/aws-sdk-s3/bucket_lifecycle.rb +66 -20
- data/lib/aws-sdk-s3/bucket_lifecycle_configuration.rb +68 -20
- data/lib/aws-sdk-s3/bucket_logging.rb +68 -16
- data/lib/aws-sdk-s3/bucket_notification.rb +52 -20
- data/lib/aws-sdk-s3/bucket_policy.rb +107 -17
- data/lib/aws-sdk-s3/bucket_region_cache.rb +2 -0
- data/lib/aws-sdk-s3/bucket_request_payment.rb +60 -15
- data/lib/aws-sdk-s3/bucket_tagging.rb +71 -18
- data/lib/aws-sdk-s3/bucket_versioning.rb +133 -17
- data/lib/aws-sdk-s3/bucket_website.rb +78 -21
- data/lib/aws-sdk-s3/client.rb +12610 -902
- data/lib/aws-sdk-s3/client_api.rb +1086 -191
- data/lib/aws-sdk-s3/customizations/bucket.rb +56 -37
- data/lib/aws-sdk-s3/customizations/errors.rb +27 -0
- data/lib/aws-sdk-s3/customizations/multipart_upload.rb +2 -0
- data/lib/aws-sdk-s3/customizations/object.rb +282 -68
- data/lib/aws-sdk-s3/customizations/object_summary.rb +5 -0
- data/lib/aws-sdk-s3/customizations/types/list_object_versions_output.rb +2 -0
- data/lib/aws-sdk-s3/customizations/types/permanent_redirect.rb +26 -0
- data/lib/aws-sdk-s3/customizations.rb +11 -1
- data/lib/aws-sdk-s3/encryption/client.rb +28 -7
- data/lib/aws-sdk-s3/encryption/decrypt_handler.rb +71 -29
- data/lib/aws-sdk-s3/encryption/default_cipher_provider.rb +43 -5
- data/lib/aws-sdk-s3/encryption/default_key_provider.rb +2 -0
- data/lib/aws-sdk-s3/encryption/encrypt_handler.rb +13 -2
- data/lib/aws-sdk-s3/encryption/errors.rb +2 -0
- data/lib/aws-sdk-s3/encryption/io_auth_decrypter.rb +2 -0
- 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 +46 -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 +570 -0
- data/lib/aws-sdk-s3/encryptionV2/decrypt_handler.rb +223 -0
- data/lib/aws-sdk-s3/encryptionV2/default_cipher_provider.rb +170 -0
- data/lib/aws-sdk-s3/encryptionV2/default_key_provider.rb +40 -0
- data/lib/aws-sdk-s3/encryptionV2/encrypt_handler.rb +65 -0
- data/lib/aws-sdk-s3/encryptionV2/errors.rb +37 -0
- data/lib/aws-sdk-s3/encryptionV2/io_auth_decrypter.rb +58 -0
- data/lib/aws-sdk-s3/encryptionV2/io_decrypter.rb +37 -0
- data/lib/aws-sdk-s3/encryptionV2/io_encrypter.rb +73 -0
- data/lib/aws-sdk-s3/encryptionV2/key_provider.rb +31 -0
- data/lib/aws-sdk-s3/encryptionV2/kms_cipher_provider.rb +173 -0
- data/lib/aws-sdk-s3/encryptionV2/materials.rb +60 -0
- data/lib/aws-sdk-s3/encryptionV2/utils.rb +103 -0
- data/lib/aws-sdk-s3/encryption_v2.rb +23 -0
- data/lib/aws-sdk-s3/endpoint_parameters.rb +178 -0
- data/lib/aws-sdk-s3/endpoint_provider.rb +591 -0
- data/lib/aws-sdk-s3/endpoints.rb +2590 -0
- data/lib/aws-sdk-s3/errors.rb +123 -1
- data/lib/aws-sdk-s3/event_streams.rb +8 -1
- data/lib/aws-sdk-s3/express_credentials.rb +55 -0
- data/lib/aws-sdk-s3/express_credentials_cache.rb +30 -0
- data/lib/aws-sdk-s3/express_credentials_provider.rb +36 -0
- data/lib/aws-sdk-s3/file_downloader.rb +176 -44
- data/lib/aws-sdk-s3/file_part.rb +11 -6
- data/lib/aws-sdk-s3/file_uploader.rb +39 -18
- data/lib/aws-sdk-s3/legacy_signer.rb +17 -25
- data/lib/aws-sdk-s3/multipart_file_uploader.rb +78 -20
- data/lib/aws-sdk-s3/multipart_stream_uploader.rb +56 -18
- data/lib/aws-sdk-s3/multipart_upload.rb +242 -32
- data/lib/aws-sdk-s3/multipart_upload_error.rb +2 -0
- data/lib/aws-sdk-s3/multipart_upload_part.rb +367 -45
- data/lib/aws-sdk-s3/object.rb +2191 -227
- data/lib/aws-sdk-s3/object_acl.rb +103 -25
- data/lib/aws-sdk-s3/object_copier.rb +9 -5
- data/lib/aws-sdk-s3/object_multipart_copier.rb +43 -19
- data/lib/aws-sdk-s3/object_summary.rb +1811 -208
- data/lib/aws-sdk-s3/object_version.rb +452 -80
- data/lib/aws-sdk-s3/plugins/accelerate.rb +17 -64
- 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/dualstack.rb +7 -50
- data/lib/aws-sdk-s3/plugins/endpoints.rb +274 -0
- data/lib/aws-sdk-s3/plugins/expect_100_continue.rb +5 -4
- data/lib/aws-sdk-s3/plugins/express_session_auth.rb +91 -0
- data/lib/aws-sdk-s3/plugins/get_bucket_location_fix.rb +3 -1
- data/lib/aws-sdk-s3/plugins/http_200_errors.rb +11 -3
- data/lib/aws-sdk-s3/plugins/iad_regional_endpoint.rb +44 -0
- data/lib/aws-sdk-s3/plugins/location_constraint.rb +5 -1
- data/lib/aws-sdk-s3/plugins/md5s.rb +35 -30
- data/lib/aws-sdk-s3/plugins/redirects.rb +2 -0
- data/lib/aws-sdk-s3/plugins/s3_host_id.rb +2 -0
- data/lib/aws-sdk-s3/plugins/s3_signer.rb +56 -92
- data/lib/aws-sdk-s3/plugins/skip_whole_multipart_get_checksums.rb +31 -0
- data/lib/aws-sdk-s3/plugins/sse_cpk.rb +3 -1
- data/lib/aws-sdk-s3/plugins/streaming_retry.rb +139 -0
- data/lib/aws-sdk-s3/plugins/url_encoded_keys.rb +2 -0
- data/lib/aws-sdk-s3/presigned_post.rb +160 -99
- data/lib/aws-sdk-s3/presigner.rb +171 -80
- data/lib/aws-sdk-s3/resource.rb +120 -8
- data/lib/aws-sdk-s3/types.rb +11353 -4225
- data/lib/aws-sdk-s3/waiters.rb +67 -1
- data/lib/aws-sdk-s3.rb +16 -6
- data/sig/bucket.rbs +212 -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 +111 -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 +2360 -0
- data/sig/errors.rbs +34 -0
- data/sig/multipart_upload.rbs +110 -0
- data/sig/multipart_upload_part.rbs +105 -0
- data/sig/object.rbs +436 -0
- data/sig/object_acl.rbs +86 -0
- data/sig/object_summary.rbs +334 -0
- data/sig/object_version.rbs +131 -0
- data/sig/resource.rbs +124 -0
- data/sig/types.rbs +2562 -0
- data/sig/waiters.rbs +83 -0
- metadata +68 -15
data/lib/aws-sdk-s3/object.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 Object
|
10
13
|
|
11
14
|
extend Aws::Deprecations
|
@@ -24,6 +27,7 @@ module Aws::S3
|
|
24
27
|
@key = extract_key(args, options)
|
25
28
|
@data = options.delete(:data)
|
26
29
|
@client = options.delete(:client) || Client.new(options)
|
30
|
+
@waiter_block_warned = false
|
27
31
|
end
|
28
32
|
|
29
33
|
# @!group Read-Only Attributes
|
@@ -41,34 +45,82 @@ module Aws::S3
|
|
41
45
|
# Specifies whether the object retrieved was (true) or was not (false) a
|
42
46
|
# Delete Marker. If false, this response header does not appear in the
|
43
47
|
# response.
|
48
|
+
#
|
49
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
50
|
+
#
|
51
|
+
# </note>
|
44
52
|
# @return [Boolean]
|
45
53
|
def delete_marker
|
46
54
|
data[:delete_marker]
|
47
55
|
end
|
48
56
|
|
49
|
-
|
57
|
+
# Indicates that a range of bytes was specified.
|
50
58
|
# @return [String]
|
51
59
|
def accept_ranges
|
52
60
|
data[:accept_ranges]
|
53
61
|
end
|
54
62
|
|
55
|
-
# If the object expiration is configured (see
|
56
|
-
#
|
57
|
-
#
|
58
|
-
# the rule-id is
|
63
|
+
# If the object expiration is configured (see [
|
64
|
+
# `PutBucketLifecycleConfiguration` ][1]), the response includes this
|
65
|
+
# header. It includes the `expiry-date` and `rule-id` key-value pairs
|
66
|
+
# providing object expiration information. The value of the `rule-id` is
|
67
|
+
# URL-encoded.
|
68
|
+
#
|
69
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
70
|
+
#
|
71
|
+
# </note>
|
72
|
+
#
|
73
|
+
#
|
74
|
+
#
|
75
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketLifecycleConfiguration.html
|
59
76
|
# @return [String]
|
60
77
|
def expiration
|
61
78
|
data[:expiration]
|
62
79
|
end
|
63
80
|
|
64
|
-
#
|
65
|
-
#
|
81
|
+
# If the object is an archived object (an object whose storage class is
|
82
|
+
# GLACIER), the response includes this header if either the archive
|
83
|
+
# restoration is in progress (see [RestoreObject][1] or an archive copy
|
84
|
+
# is already restored.
|
85
|
+
#
|
86
|
+
# If an archive copy is already restored, the header value indicates
|
87
|
+
# when Amazon S3 is scheduled to delete the object copy. For example:
|
88
|
+
#
|
89
|
+
# `x-amz-restore: ongoing-request="false", expiry-date="Fri, 21 Dec 2012
|
90
|
+
# 00:00:00 GMT"`
|
91
|
+
#
|
92
|
+
# If the object restoration is in progress, the header returns the value
|
93
|
+
# `ongoing-request="true"`.
|
94
|
+
#
|
95
|
+
# For more information about archiving objects, see [Transitioning
|
96
|
+
# Objects: General Considerations][2].
|
97
|
+
#
|
98
|
+
# <note markdown="1"> This functionality is not supported for directory buckets. Only the S3
|
99
|
+
# Express One Zone storage class is supported by directory buckets to
|
100
|
+
# store objects.
|
101
|
+
#
|
102
|
+
# </note>
|
103
|
+
#
|
104
|
+
#
|
105
|
+
#
|
106
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_RestoreObject.html
|
107
|
+
# [2]: https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lifecycle-mgmt.html#lifecycle-transition-general-considerations
|
66
108
|
# @return [String]
|
67
109
|
def restore
|
68
110
|
data[:restore]
|
69
111
|
end
|
70
112
|
|
71
|
-
#
|
113
|
+
# The archive state of the head object.
|
114
|
+
#
|
115
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
116
|
+
#
|
117
|
+
# </note>
|
118
|
+
# @return [String]
|
119
|
+
def archive_status
|
120
|
+
data[:archive_status]
|
121
|
+
end
|
122
|
+
|
123
|
+
# Date and time when the object was last modified.
|
72
124
|
# @return [Time]
|
73
125
|
def last_modified
|
74
126
|
data[:last_modified]
|
@@ -80,24 +132,100 @@ module Aws::S3
|
|
80
132
|
data[:content_length]
|
81
133
|
end
|
82
134
|
|
83
|
-
#
|
84
|
-
#
|
135
|
+
# The base64-encoded, 32-bit CRC32 checksum of the object. This will
|
136
|
+
# only be present if it was uploaded with the object. When you use an
|
137
|
+
# API operation on an object that was uploaded using multipart uploads,
|
138
|
+
# this value may not be a direct checksum value of the full object.
|
139
|
+
# Instead, it's a calculation based on the checksum values of each
|
140
|
+
# individual part. For more information about how checksums are
|
141
|
+
# calculated with multipart uploads, see [ Checking object integrity][1]
|
142
|
+
# in the *Amazon S3 User Guide*.
|
143
|
+
#
|
144
|
+
#
|
145
|
+
#
|
146
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums
|
147
|
+
# @return [String]
|
148
|
+
def checksum_crc32
|
149
|
+
data[:checksum_crc32]
|
150
|
+
end
|
151
|
+
|
152
|
+
# The base64-encoded, 32-bit CRC32C checksum of the object. This will
|
153
|
+
# only be present if it was uploaded with the object. When you use an
|
154
|
+
# API operation on an object that was uploaded using multipart uploads,
|
155
|
+
# this value may not be a direct checksum value of the full object.
|
156
|
+
# Instead, it's a calculation based on the checksum values of each
|
157
|
+
# individual part. For more information about how checksums are
|
158
|
+
# calculated with multipart uploads, see [ Checking object integrity][1]
|
159
|
+
# in the *Amazon S3 User Guide*.
|
160
|
+
#
|
161
|
+
#
|
162
|
+
#
|
163
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums
|
164
|
+
# @return [String]
|
165
|
+
def checksum_crc32c
|
166
|
+
data[:checksum_crc32c]
|
167
|
+
end
|
168
|
+
|
169
|
+
# The base64-encoded, 160-bit SHA-1 digest of the object. This will only
|
170
|
+
# be present if it was uploaded with the object. When you use the API
|
171
|
+
# operation on an object that was uploaded using multipart uploads, this
|
172
|
+
# value may not be a direct checksum value of the full object. Instead,
|
173
|
+
# it's a calculation based on the checksum values of each individual
|
174
|
+
# part. For more information about how checksums are calculated with
|
175
|
+
# multipart uploads, see [ Checking object integrity][1] in the *Amazon
|
176
|
+
# S3 User Guide*.
|
177
|
+
#
|
178
|
+
#
|
179
|
+
#
|
180
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums
|
181
|
+
# @return [String]
|
182
|
+
def checksum_sha1
|
183
|
+
data[:checksum_sha1]
|
184
|
+
end
|
185
|
+
|
186
|
+
# The base64-encoded, 256-bit SHA-256 digest of the object. This will
|
187
|
+
# only be present if it was uploaded with the object. When you use an
|
188
|
+
# API operation on an object that was uploaded using multipart uploads,
|
189
|
+
# this value may not be a direct checksum value of the full object.
|
190
|
+
# Instead, it's a calculation based on the checksum values of each
|
191
|
+
# individual part. For more information about how checksums are
|
192
|
+
# calculated with multipart uploads, see [ Checking object integrity][1]
|
193
|
+
# in the *Amazon S3 User Guide*.
|
194
|
+
#
|
195
|
+
#
|
196
|
+
#
|
197
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums
|
198
|
+
# @return [String]
|
199
|
+
def checksum_sha256
|
200
|
+
data[:checksum_sha256]
|
201
|
+
end
|
202
|
+
|
203
|
+
# An entity tag (ETag) is an opaque identifier assigned by a web server
|
204
|
+
# to a specific version of a resource found at a URL.
|
85
205
|
# @return [String]
|
86
206
|
def etag
|
87
207
|
data[:etag]
|
88
208
|
end
|
89
209
|
|
90
210
|
# This is set to the number of metadata entries not returned in
|
91
|
-
# x-amz-meta headers. This can happen if you create metadata using an
|
211
|
+
# `x-amz-meta` headers. This can happen if you create metadata using an
|
92
212
|
# API like SOAP that supports more flexible metadata than the REST API.
|
93
213
|
# For example, using SOAP, you can create metadata whose values are not
|
94
214
|
# legal HTTP headers.
|
215
|
+
#
|
216
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
217
|
+
#
|
218
|
+
# </note>
|
95
219
|
# @return [Integer]
|
96
220
|
def missing_meta
|
97
221
|
data[:missing_meta]
|
98
222
|
end
|
99
223
|
|
100
|
-
# Version of the object.
|
224
|
+
# Version ID of the object.
|
225
|
+
#
|
226
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
227
|
+
#
|
228
|
+
# </note>
|
101
229
|
# @return [String]
|
102
230
|
def version_id
|
103
231
|
data[:version_id]
|
@@ -115,7 +243,7 @@ module Aws::S3
|
|
115
243
|
data[:content_disposition]
|
116
244
|
end
|
117
245
|
|
118
|
-
#
|
246
|
+
# Indicates what content encodings have been applied to the object and
|
119
247
|
# thus what decoding mechanisms must be applied to obtain the media-type
|
120
248
|
# referenced by the Content-Type header field.
|
121
249
|
# @return [String]
|
@@ -149,13 +277,22 @@ module Aws::S3
|
|
149
277
|
# If the bucket is configured as a website, redirects requests for this
|
150
278
|
# object to another object in the same bucket or to an external URL.
|
151
279
|
# Amazon S3 stores the value of this header in the object metadata.
|
280
|
+
#
|
281
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
282
|
+
#
|
283
|
+
# </note>
|
152
284
|
# @return [String]
|
153
285
|
def website_redirect_location
|
154
286
|
data[:website_redirect_location]
|
155
287
|
end
|
156
288
|
|
157
|
-
# The
|
158
|
-
# S3 (
|
289
|
+
# The server-side encryption algorithm used when you store this object
|
290
|
+
# in Amazon S3 (for example, `AES256`, `aws:kms`, `aws:kms:dsse`).
|
291
|
+
#
|
292
|
+
# <note markdown="1"> For directory buckets, only server-side encryption with Amazon S3
|
293
|
+
# managed keys (SSE-S3) (`AES256`) is supported.
|
294
|
+
#
|
295
|
+
# </note>
|
159
296
|
# @return [String]
|
160
297
|
def server_side_encryption
|
161
298
|
data[:server_side_encryption]
|
@@ -168,30 +305,67 @@ module Aws::S3
|
|
168
305
|
end
|
169
306
|
|
170
307
|
# If server-side encryption with a customer-provided encryption key was
|
171
|
-
# requested, the response will include this header
|
172
|
-
# encryption algorithm used.
|
308
|
+
# requested, the response will include this header to confirm the
|
309
|
+
# encryption algorithm that's used.
|
310
|
+
#
|
311
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
312
|
+
#
|
313
|
+
# </note>
|
173
314
|
# @return [String]
|
174
315
|
def sse_customer_algorithm
|
175
316
|
data[:sse_customer_algorithm]
|
176
317
|
end
|
177
318
|
|
178
319
|
# If server-side encryption with a customer-provided encryption key was
|
179
|
-
# requested, the response will include this header to provide
|
180
|
-
# message integrity verification of the customer-provided
|
181
|
-
# key.
|
320
|
+
# requested, the response will include this header to provide the
|
321
|
+
# round-trip message integrity verification of the customer-provided
|
322
|
+
# encryption key.
|
323
|
+
#
|
324
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
325
|
+
#
|
326
|
+
# </note>
|
182
327
|
# @return [String]
|
183
328
|
def sse_customer_key_md5
|
184
329
|
data[:sse_customer_key_md5]
|
185
330
|
end
|
186
331
|
|
187
|
-
# If present,
|
188
|
-
#
|
332
|
+
# If present, indicates the ID of the Key Management Service (KMS)
|
333
|
+
# symmetric encryption customer managed key that was used for the
|
334
|
+
# object.
|
335
|
+
#
|
336
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
337
|
+
#
|
338
|
+
# </note>
|
189
339
|
# @return [String]
|
190
340
|
def ssekms_key_id
|
191
341
|
data[:ssekms_key_id]
|
192
342
|
end
|
193
343
|
|
194
|
-
|
344
|
+
# Indicates whether the object uses an S3 Bucket Key for server-side
|
345
|
+
# encryption with Key Management Service (KMS) keys (SSE-KMS).
|
346
|
+
#
|
347
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
348
|
+
#
|
349
|
+
# </note>
|
350
|
+
# @return [Boolean]
|
351
|
+
def bucket_key_enabled
|
352
|
+
data[:bucket_key_enabled]
|
353
|
+
end
|
354
|
+
|
355
|
+
# Provides storage class information of the object. Amazon S3 returns
|
356
|
+
# this header for all objects except for S3 Standard storage class
|
357
|
+
# objects.
|
358
|
+
#
|
359
|
+
# For more information, see [Storage Classes][1].
|
360
|
+
#
|
361
|
+
# <note markdown="1"> <b>Directory buckets </b> - Only the S3 Express One Zone storage class
|
362
|
+
# is supported by directory buckets to store objects.
|
363
|
+
#
|
364
|
+
# </note>
|
365
|
+
#
|
366
|
+
#
|
367
|
+
#
|
368
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html
|
195
369
|
# @return [String]
|
196
370
|
def storage_class
|
197
371
|
data[:storage_class]
|
@@ -199,36 +373,114 @@ module Aws::S3
|
|
199
373
|
|
200
374
|
# If present, indicates that the requester was successfully charged for
|
201
375
|
# the request.
|
376
|
+
#
|
377
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
378
|
+
#
|
379
|
+
# </note>
|
202
380
|
# @return [String]
|
203
381
|
def request_charged
|
204
382
|
data[:request_charged]
|
205
383
|
end
|
206
384
|
|
207
|
-
|
385
|
+
# Amazon S3 can return this header if your request involves a bucket
|
386
|
+
# that is either a source or a destination in a replication rule.
|
387
|
+
#
|
388
|
+
# In replication, you have a source bucket on which you configure
|
389
|
+
# replication and destination bucket or buckets where Amazon S3 stores
|
390
|
+
# object replicas. When you request an object (`GetObject`) or object
|
391
|
+
# metadata (`HeadObject`) from these buckets, Amazon S3 will return the
|
392
|
+
# `x-amz-replication-status` header in the response as follows:
|
393
|
+
#
|
394
|
+
# * **If requesting an object from the source bucket**, Amazon S3 will
|
395
|
+
# return the `x-amz-replication-status` header if the object in your
|
396
|
+
# request is eligible for replication.
|
397
|
+
#
|
398
|
+
# For example, suppose that in your replication configuration, you
|
399
|
+
# specify object prefix `TaxDocs` requesting Amazon S3 to replicate
|
400
|
+
# objects with key prefix `TaxDocs`. Any objects you upload with this
|
401
|
+
# key name prefix, for example `TaxDocs/document1.pdf`, are eligible
|
402
|
+
# for replication. For any object request with this key name prefix,
|
403
|
+
# Amazon S3 will return the `x-amz-replication-status` header with
|
404
|
+
# value PENDING, COMPLETED or FAILED indicating object replication
|
405
|
+
# status.
|
406
|
+
#
|
407
|
+
# * **If requesting an object from a destination bucket**, Amazon S3
|
408
|
+
# will return the `x-amz-replication-status` header with value REPLICA
|
409
|
+
# if the object in your request is a replica that Amazon S3 created
|
410
|
+
# and there is no replica modification replication in progress.
|
411
|
+
#
|
412
|
+
# * **When replicating objects to multiple destination buckets**, the
|
413
|
+
# `x-amz-replication-status` header acts differently. The header of
|
414
|
+
# the source object will only return a value of COMPLETED when
|
415
|
+
# replication is successful to all destinations. The header will
|
416
|
+
# remain at value PENDING until replication has completed for all
|
417
|
+
# destinations. If one or more destinations fails replication the
|
418
|
+
# header will return FAILED.
|
419
|
+
#
|
420
|
+
# For more information, see [Replication][1].
|
421
|
+
#
|
422
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
423
|
+
#
|
424
|
+
# </note>
|
425
|
+
#
|
426
|
+
#
|
427
|
+
#
|
428
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/NotificationHowTo.html
|
208
429
|
# @return [String]
|
209
430
|
def replication_status
|
210
431
|
data[:replication_status]
|
211
432
|
end
|
212
433
|
|
213
|
-
# The count of parts this object has.
|
434
|
+
# The count of parts this object has. This value is only returned if you
|
435
|
+
# specify `partNumber` in your request and the object was uploaded as a
|
436
|
+
# multipart upload.
|
214
437
|
# @return [Integer]
|
215
438
|
def parts_count
|
216
439
|
data[:parts_count]
|
217
440
|
end
|
218
441
|
|
219
|
-
# The
|
442
|
+
# The Object Lock mode, if any, that's in effect for this object. This
|
443
|
+
# header is only returned if the requester has the
|
444
|
+
# `s3:GetObjectRetention` permission. For more information about S3
|
445
|
+
# Object Lock, see [Object Lock][1].
|
446
|
+
#
|
447
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
448
|
+
#
|
449
|
+
# </note>
|
450
|
+
#
|
451
|
+
#
|
452
|
+
#
|
453
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock.html
|
220
454
|
# @return [String]
|
221
455
|
def object_lock_mode
|
222
456
|
data[:object_lock_mode]
|
223
457
|
end
|
224
458
|
|
225
|
-
# The date and time when
|
459
|
+
# The date and time when the Object Lock retention period expires. This
|
460
|
+
# header is only returned if the requester has the
|
461
|
+
# `s3:GetObjectRetention` permission.
|
462
|
+
#
|
463
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
464
|
+
#
|
465
|
+
# </note>
|
226
466
|
# @return [Time]
|
227
467
|
def object_lock_retain_until_date
|
228
468
|
data[:object_lock_retain_until_date]
|
229
469
|
end
|
230
470
|
|
231
|
-
#
|
471
|
+
# Specifies whether a legal hold is in effect for this object. This
|
472
|
+
# header is only returned if the requester has the
|
473
|
+
# `s3:GetObjectLegalHold` permission. This header is not returned if the
|
474
|
+
# specified version of this object has never had a legal hold applied.
|
475
|
+
# For more information about S3 Object Lock, see [Object Lock][1].
|
476
|
+
#
|
477
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
478
|
+
#
|
479
|
+
# </note>
|
480
|
+
#
|
481
|
+
#
|
482
|
+
#
|
483
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock.html
|
232
484
|
# @return [String]
|
233
485
|
def object_lock_legal_hold_status
|
234
486
|
data[:object_lock_legal_hold_status]
|
@@ -248,10 +500,12 @@ module Aws::S3
|
|
248
500
|
#
|
249
501
|
# @return [self]
|
250
502
|
def load
|
251
|
-
resp =
|
503
|
+
resp = Aws::Plugins::UserAgent.feature('resource') do
|
504
|
+
@client.head_object(
|
252
505
|
bucket: @bucket_name,
|
253
506
|
key: @key
|
254
507
|
)
|
508
|
+
end
|
255
509
|
@data = resp.data
|
256
510
|
self
|
257
511
|
end
|
@@ -296,8 +550,10 @@ module Aws::S3
|
|
296
550
|
options, params = separate_params_and_options(options)
|
297
551
|
waiter = Waiters::ObjectExists.new(options)
|
298
552
|
yield_waiter_and_warn(waiter, &block) if block_given?
|
299
|
-
|
553
|
+
Aws::Plugins::UserAgent.feature('resource') do
|
554
|
+
waiter.wait(params.merge(bucket: @bucket_name,
|
300
555
|
key: @key))
|
556
|
+
end
|
301
557
|
Object.new({
|
302
558
|
bucket_name: @bucket_name,
|
303
559
|
key: @key,
|
@@ -315,8 +571,10 @@ module Aws::S3
|
|
315
571
|
options, params = separate_params_and_options(options)
|
316
572
|
waiter = Waiters::ObjectNotExists.new(options)
|
317
573
|
yield_waiter_and_warn(waiter, &block) if block_given?
|
318
|
-
|
574
|
+
Aws::Plugins::UserAgent.feature('resource') do
|
575
|
+
waiter.wait(params.merge(bucket: @bucket_name,
|
319
576
|
key: @key))
|
577
|
+
end
|
320
578
|
Object.new({
|
321
579
|
bucket_name: @bucket_name,
|
322
580
|
key: @key,
|
@@ -329,7 +587,8 @@ module Aws::S3
|
|
329
587
|
# Waiter polls an API operation until a resource enters a desired
|
330
588
|
# state.
|
331
589
|
#
|
332
|
-
# @note The waiting operation is performed on a copy. The original resource
|
590
|
+
# @note The waiting operation is performed on a copy. The original resource
|
591
|
+
# remains unchanged.
|
333
592
|
#
|
334
593
|
# ## Basic Usage
|
335
594
|
#
|
@@ -342,13 +601,15 @@ module Aws::S3
|
|
342
601
|
#
|
343
602
|
# ## Example
|
344
603
|
#
|
345
|
-
# instance.wait_until(max_attempts:10, delay:5)
|
604
|
+
# instance.wait_until(max_attempts:10, delay:5) do |instance|
|
605
|
+
# instance.state.name == 'running'
|
606
|
+
# end
|
346
607
|
#
|
347
608
|
# ## Configuration
|
348
609
|
#
|
349
610
|
# You can configure the maximum number of polling attempts, and the
|
350
|
-
# delay (in seconds) between each polling attempt. The waiting condition is
|
351
|
-
# by passing a block to {#wait_until}:
|
611
|
+
# delay (in seconds) between each polling attempt. The waiting condition is
|
612
|
+
# set by passing a block to {#wait_until}:
|
352
613
|
#
|
353
614
|
# # poll for ~25 seconds
|
354
615
|
# resource.wait_until(max_attempts:5,delay:5) {|resource|...}
|
@@ -379,17 +640,16 @@ module Aws::S3
|
|
379
640
|
# # resource did not enter the desired state in time
|
380
641
|
# end
|
381
642
|
#
|
643
|
+
# @yieldparam [Resource] resource to be used in the waiting condition.
|
382
644
|
#
|
383
|
-
# @
|
384
|
-
#
|
385
|
-
#
|
386
|
-
# because the waiter has entered a state that it will not transition
|
387
|
-
# out of, preventing success.
|
645
|
+
# @raise [Aws::Waiters::Errors::FailureStateError] Raised when the waiter
|
646
|
+
# terminates because the waiter has entered a state that it will not
|
647
|
+
# transition out of, preventing success.
|
388
648
|
#
|
389
649
|
# yet successful.
|
390
650
|
#
|
391
|
-
# @raise [Aws::Waiters::Errors::UnexpectedError] Raised when an error is
|
392
|
-
# while polling for a resource that is not expected.
|
651
|
+
# @raise [Aws::Waiters::Errors::UnexpectedError] Raised when an error is
|
652
|
+
# encountered while polling for a resource that is not expected.
|
393
653
|
#
|
394
654
|
# @raise [NotImplementedError] Raised when the resource does not
|
395
655
|
#
|
@@ -416,7 +676,9 @@ module Aws::S3
|
|
416
676
|
:retry
|
417
677
|
end
|
418
678
|
end
|
419
|
-
Aws::
|
679
|
+
Aws::Plugins::UserAgent.feature('resource') do
|
680
|
+
Aws::Waiters::Waiter.new(options).wait({})
|
681
|
+
end
|
420
682
|
end
|
421
683
|
|
422
684
|
# @!group Actions
|
@@ -426,6 +688,7 @@ module Aws::S3
|
|
426
688
|
# object.copy_from({
|
427
689
|
# acl: "private", # accepts private, public-read, public-read-write, authenticated-read, aws-exec-read, bucket-owner-read, bucket-owner-full-control
|
428
690
|
# cache_control: "CacheControl",
|
691
|
+
# checksum_algorithm: "CRC32", # accepts CRC32, CRC32C, SHA1, SHA256
|
429
692
|
# content_disposition: "ContentDisposition",
|
430
693
|
# content_encoding: "ContentEncoding",
|
431
694
|
# content_language: "ContentLanguage",
|
@@ -445,14 +708,15 @@ module Aws::S3
|
|
445
708
|
# },
|
446
709
|
# metadata_directive: "COPY", # accepts COPY, REPLACE
|
447
710
|
# tagging_directive: "COPY", # accepts COPY, REPLACE
|
448
|
-
# server_side_encryption: "AES256", # accepts AES256, aws:kms
|
449
|
-
# storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER, DEEP_ARCHIVE
|
711
|
+
# server_side_encryption: "AES256", # accepts AES256, aws:kms, aws:kms:dsse
|
712
|
+
# storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER, DEEP_ARCHIVE, OUTPOSTS, GLACIER_IR, SNOW, EXPRESS_ONEZONE
|
450
713
|
# website_redirect_location: "WebsiteRedirectLocation",
|
451
714
|
# sse_customer_algorithm: "SSECustomerAlgorithm",
|
452
715
|
# sse_customer_key: "SSECustomerKey",
|
453
716
|
# sse_customer_key_md5: "SSECustomerKeyMD5",
|
454
717
|
# ssekms_key_id: "SSEKMSKeyId",
|
455
718
|
# ssekms_encryption_context: "SSEKMSEncryptionContext",
|
719
|
+
# bucket_key_enabled: false,
|
456
720
|
# copy_source_sse_customer_algorithm: "CopySourceSSECustomerAlgorithm",
|
457
721
|
# copy_source_sse_customer_key: "CopySourceSSECustomerKey",
|
458
722
|
# copy_source_sse_customer_key_md5: "CopySourceSSECustomerKeyMD5",
|
@@ -461,121 +725,630 @@ module Aws::S3
|
|
461
725
|
# object_lock_mode: "GOVERNANCE", # accepts GOVERNANCE, COMPLIANCE
|
462
726
|
# object_lock_retain_until_date: Time.now,
|
463
727
|
# object_lock_legal_hold_status: "ON", # accepts ON, OFF
|
728
|
+
# expected_bucket_owner: "AccountId",
|
729
|
+
# expected_source_bucket_owner: "AccountId",
|
464
730
|
# })
|
465
731
|
# @param [Hash] options ({})
|
466
732
|
# @option options [String] :acl
|
467
|
-
# The canned ACL to apply to the object.
|
733
|
+
# The canned access control list (ACL) to apply to the object.
|
734
|
+
#
|
735
|
+
# When you copy an object, the ACL metadata is not preserved and is set
|
736
|
+
# to `private` by default. Only the owner has full access control. To
|
737
|
+
# override the default ACL setting, specify a new ACL when you generate
|
738
|
+
# a copy request. For more information, see [Using ACLs][1].
|
739
|
+
#
|
740
|
+
# If the destination bucket that you're copying objects to uses the
|
741
|
+
# bucket owner enforced setting for S3 Object Ownership, ACLs are
|
742
|
+
# disabled and no longer affect permissions. Buckets that use this
|
743
|
+
# setting only accept `PUT` requests that don't specify an ACL or `PUT`
|
744
|
+
# requests that specify bucket owner full control ACLs, such as the
|
745
|
+
# `bucket-owner-full-control` canned ACL or an equivalent form of this
|
746
|
+
# ACL expressed in the XML format. For more information, see
|
747
|
+
# [Controlling ownership of objects and disabling ACLs][2] in the
|
748
|
+
# *Amazon S3 User Guide*.
|
749
|
+
#
|
750
|
+
# <note markdown="1"> * If your destination bucket uses the bucket owner enforced setting
|
751
|
+
# for Object Ownership, all objects written to the bucket by any
|
752
|
+
# account will be owned by the bucket owner.
|
753
|
+
#
|
754
|
+
# * This functionality is not supported for directory buckets.
|
755
|
+
#
|
756
|
+
# * This functionality is not supported for Amazon S3 on Outposts.
|
757
|
+
#
|
758
|
+
# </note>
|
759
|
+
#
|
760
|
+
#
|
761
|
+
#
|
762
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/S3_ACLs_UsingACLs.html
|
763
|
+
# [2]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/about-object-ownership.html
|
468
764
|
# @option options [String] :cache_control
|
469
|
-
# Specifies caching behavior along the request/reply chain.
|
765
|
+
# Specifies the caching behavior along the request/reply chain.
|
766
|
+
# @option options [String] :checksum_algorithm
|
767
|
+
# Indicates the algorithm that you want Amazon S3 to use to create the
|
768
|
+
# checksum for the object. For more information, see [Checking object
|
769
|
+
# integrity][1] in the *Amazon S3 User Guide*.
|
770
|
+
#
|
771
|
+
# When you copy an object, if the source object has a checksum, that
|
772
|
+
# checksum value will be copied to the new object by default. If the
|
773
|
+
# `CopyObject` request does not include this `x-amz-checksum-algorithm`
|
774
|
+
# header, the checksum algorithm will be copied from the source object
|
775
|
+
# to the destination object (if it's present on the source object). You
|
776
|
+
# can optionally specify a different checksum algorithm to use with the
|
777
|
+
# `x-amz-checksum-algorithm` header. Unrecognized or unsupported values
|
778
|
+
# will respond with the HTTP status code `400 Bad Request`.
|
779
|
+
#
|
780
|
+
# <note markdown="1"> For directory buckets, when you use Amazon Web Services SDKs, `CRC32`
|
781
|
+
# is the default checksum algorithm that's used for performance.
|
782
|
+
#
|
783
|
+
# </note>
|
784
|
+
#
|
785
|
+
#
|
786
|
+
#
|
787
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
|
470
788
|
# @option options [String] :content_disposition
|
471
|
-
# Specifies presentational information for the object.
|
789
|
+
# Specifies presentational information for the object. Indicates whether
|
790
|
+
# an object should be displayed in a web browser or downloaded as a
|
791
|
+
# file. It allows specifying the desired filename for the downloaded
|
792
|
+
# file.
|
472
793
|
# @option options [String] :content_encoding
|
473
794
|
# Specifies what content encodings have been applied to the object and
|
474
795
|
# thus what decoding mechanisms must be applied to obtain the media-type
|
475
796
|
# referenced by the Content-Type header field.
|
797
|
+
#
|
798
|
+
# <note markdown="1"> For directory buckets, only the `aws-chunked` value is supported in
|
799
|
+
# this header field.
|
800
|
+
#
|
801
|
+
# </note>
|
476
802
|
# @option options [String] :content_language
|
477
803
|
# The language the content is in.
|
478
804
|
# @option options [String] :content_type
|
479
|
-
# A standard MIME type
|
805
|
+
# A standard MIME type that describes the format of the object data.
|
480
806
|
# @option options [required, String] :copy_source
|
481
|
-
#
|
482
|
-
#
|
807
|
+
# Specifies the source object for the copy operation. The source object
|
808
|
+
# can be up to 5 GB. If the source object is an object that was uploaded
|
809
|
+
# by using a multipart upload, the object copy will be a single part
|
810
|
+
# object after the source object is copied to the destination bucket.
|
811
|
+
#
|
812
|
+
# You specify the value of the copy source in one of two formats,
|
813
|
+
# depending on whether you want to access the source object through an
|
814
|
+
# [access point][1]:
|
815
|
+
#
|
816
|
+
# * For objects not accessed through an access point, specify the name
|
817
|
+
# of the source bucket and the key of the source object, separated by
|
818
|
+
# a slash (/). For example, to copy the object `reports/january.pdf`
|
819
|
+
# from the general purpose bucket `awsexamplebucket`, use
|
820
|
+
# `awsexamplebucket/reports/january.pdf`. The value must be
|
821
|
+
# URL-encoded. To copy the object `reports/january.pdf` from the
|
822
|
+
# directory bucket `awsexamplebucket--use1-az5--x-s3`, use
|
823
|
+
# `awsexamplebucket--use1-az5--x-s3/reports/january.pdf`. The value
|
824
|
+
# must be URL-encoded.
|
825
|
+
#
|
826
|
+
# * For objects accessed through access points, specify the Amazon
|
827
|
+
# Resource Name (ARN) of the object as accessed through the access
|
828
|
+
# point, in the format
|
829
|
+
# `arn:aws:s3:<Region>:<account-id>:accesspoint/<access-point-name>/object/<key>`.
|
830
|
+
# For example, to copy the object `reports/january.pdf` through access
|
831
|
+
# point `my-access-point` owned by account `123456789012` in Region
|
832
|
+
# `us-west-2`, use the URL encoding of
|
833
|
+
# `arn:aws:s3:us-west-2:123456789012:accesspoint/my-access-point/object/reports/january.pdf`.
|
834
|
+
# The value must be URL encoded.
|
835
|
+
#
|
836
|
+
# <note markdown="1"> * Amazon S3 supports copy operations using Access points only when
|
837
|
+
# the source and destination buckets are in the same Amazon Web
|
838
|
+
# Services Region.
|
839
|
+
#
|
840
|
+
# * Access points are not supported by directory buckets.
|
841
|
+
#
|
842
|
+
# </note>
|
843
|
+
#
|
844
|
+
# Alternatively, for objects accessed through Amazon S3 on Outposts,
|
845
|
+
# specify the ARN of the object as accessed in the format
|
846
|
+
# `arn:aws:s3-outposts:<Region>:<account-id>:outpost/<outpost-id>/object/<key>`.
|
847
|
+
# For example, to copy the object `reports/january.pdf` through
|
848
|
+
# outpost `my-outpost` owned by account `123456789012` in Region
|
849
|
+
# `us-west-2`, use the URL encoding of
|
850
|
+
# `arn:aws:s3-outposts:us-west-2:123456789012:outpost/my-outpost/object/reports/january.pdf`.
|
851
|
+
# The value must be URL-encoded.
|
852
|
+
#
|
853
|
+
# If your source bucket versioning is enabled, the `x-amz-copy-source`
|
854
|
+
# header by default identifies the current version of an object to copy.
|
855
|
+
# If the current version is a delete marker, Amazon S3 behaves as if the
|
856
|
+
# object was deleted. To copy a different version, use the `versionId`
|
857
|
+
# query parameter. Specifically, append `?versionId=<version-id>` to the
|
858
|
+
# value (for example,
|
859
|
+
# `awsexamplebucket/reports/january.pdf?versionId=QUpfdndhfd8438MNFDN93jdnJFkdmqnh893`).
|
860
|
+
# If you don't specify a version ID, Amazon S3 copies the latest
|
861
|
+
# version of the source object.
|
862
|
+
#
|
863
|
+
# If you enable versioning on the destination bucket, Amazon S3
|
864
|
+
# generates a unique version ID for the copied object. This version ID
|
865
|
+
# is different from the version ID of the source object. Amazon S3
|
866
|
+
# returns the version ID of the copied object in the `x-amz-version-id`
|
867
|
+
# response header in the response.
|
868
|
+
#
|
869
|
+
# If you do not enable versioning or suspend it on the destination
|
870
|
+
# bucket, the version ID that Amazon S3 generates in the
|
871
|
+
# `x-amz-version-id` response header is always null.
|
872
|
+
#
|
873
|
+
# <note markdown="1"> **Directory buckets** - S3 Versioning isn't enabled and supported for
|
874
|
+
# directory buckets.
|
875
|
+
#
|
876
|
+
# </note>
|
877
|
+
#
|
878
|
+
#
|
879
|
+
#
|
880
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/access-points.html
|
483
881
|
# @option options [String] :copy_source_if_match
|
484
882
|
# Copies the object if its entity tag (ETag) matches the specified tag.
|
883
|
+
#
|
884
|
+
# If both the `x-amz-copy-source-if-match` and
|
885
|
+
# `x-amz-copy-source-if-unmodified-since` headers are present in the
|
886
|
+
# request and evaluate as follows, Amazon S3 returns `200 OK` and copies
|
887
|
+
# the data:
|
888
|
+
#
|
889
|
+
# * `x-amz-copy-source-if-match` condition evaluates to true
|
890
|
+
#
|
891
|
+
# * `x-amz-copy-source-if-unmodified-since` condition evaluates to false
|
485
892
|
# @option options [Time,DateTime,Date,Integer,String] :copy_source_if_modified_since
|
486
893
|
# Copies the object if it has been modified since the specified time.
|
894
|
+
#
|
895
|
+
# If both the `x-amz-copy-source-if-none-match` and
|
896
|
+
# `x-amz-copy-source-if-modified-since` headers are present in the
|
897
|
+
# request and evaluate as follows, Amazon S3 returns the `412
|
898
|
+
# Precondition Failed` response code:
|
899
|
+
#
|
900
|
+
# * `x-amz-copy-source-if-none-match` condition evaluates to false
|
901
|
+
#
|
902
|
+
# * `x-amz-copy-source-if-modified-since` condition evaluates to true
|
487
903
|
# @option options [String] :copy_source_if_none_match
|
488
904
|
# Copies the object if its entity tag (ETag) is different than the
|
489
905
|
# specified ETag.
|
906
|
+
#
|
907
|
+
# If both the `x-amz-copy-source-if-none-match` and
|
908
|
+
# `x-amz-copy-source-if-modified-since` headers are present in the
|
909
|
+
# request and evaluate as follows, Amazon S3 returns the `412
|
910
|
+
# Precondition Failed` response code:
|
911
|
+
#
|
912
|
+
# * `x-amz-copy-source-if-none-match` condition evaluates to false
|
913
|
+
#
|
914
|
+
# * `x-amz-copy-source-if-modified-since` condition evaluates to true
|
490
915
|
# @option options [Time,DateTime,Date,Integer,String] :copy_source_if_unmodified_since
|
491
916
|
# Copies the object if it hasn't been modified since the specified
|
492
917
|
# time.
|
918
|
+
#
|
919
|
+
# If both the `x-amz-copy-source-if-match` and
|
920
|
+
# `x-amz-copy-source-if-unmodified-since` headers are present in the
|
921
|
+
# request and evaluate as follows, Amazon S3 returns `200 OK` and copies
|
922
|
+
# the data:
|
923
|
+
#
|
924
|
+
# * `x-amz-copy-source-if-match` condition evaluates to true
|
925
|
+
#
|
926
|
+
# * `x-amz-copy-source-if-unmodified-since` condition evaluates to false
|
493
927
|
# @option options [Time,DateTime,Date,Integer,String] :expires
|
494
928
|
# The date and time at which the object is no longer cacheable.
|
495
929
|
# @option options [String] :grant_full_control
|
496
930
|
# Gives the grantee READ, READ\_ACP, and WRITE\_ACP permissions on the
|
497
931
|
# object.
|
932
|
+
#
|
933
|
+
# <note markdown="1"> * This functionality is not supported for directory buckets.
|
934
|
+
#
|
935
|
+
# * This functionality is not supported for Amazon S3 on Outposts.
|
936
|
+
#
|
937
|
+
# </note>
|
498
938
|
# @option options [String] :grant_read
|
499
939
|
# Allows grantee to read the object data and its metadata.
|
940
|
+
#
|
941
|
+
# <note markdown="1"> * This functionality is not supported for directory buckets.
|
942
|
+
#
|
943
|
+
# * This functionality is not supported for Amazon S3 on Outposts.
|
944
|
+
#
|
945
|
+
# </note>
|
500
946
|
# @option options [String] :grant_read_acp
|
501
947
|
# Allows grantee to read the object ACL.
|
948
|
+
#
|
949
|
+
# <note markdown="1"> * This functionality is not supported for directory buckets.
|
950
|
+
#
|
951
|
+
# * This functionality is not supported for Amazon S3 on Outposts.
|
952
|
+
#
|
953
|
+
# </note>
|
502
954
|
# @option options [String] :grant_write_acp
|
503
955
|
# Allows grantee to write the ACL for the applicable object.
|
956
|
+
#
|
957
|
+
# <note markdown="1"> * This functionality is not supported for directory buckets.
|
958
|
+
#
|
959
|
+
# * This functionality is not supported for Amazon S3 on Outposts.
|
960
|
+
#
|
961
|
+
# </note>
|
504
962
|
# @option options [Hash<String,String>] :metadata
|
505
963
|
# A map of metadata to store with the object in S3.
|
506
964
|
# @option options [String] :metadata_directive
|
507
965
|
# Specifies whether the metadata is copied from the source object or
|
508
|
-
# replaced with metadata provided in the request.
|
966
|
+
# replaced with metadata that's provided in the request. When copying
|
967
|
+
# an object, you can preserve all metadata (the default) or specify new
|
968
|
+
# metadata. If this header isn’t specified, `COPY` is the default
|
969
|
+
# behavior.
|
970
|
+
#
|
971
|
+
# **General purpose bucket** - For general purpose buckets, when you
|
972
|
+
# grant permissions, you can use the `s3:x-amz-metadata-directive`
|
973
|
+
# condition key to enforce certain metadata behavior when objects are
|
974
|
+
# uploaded. For more information, see [Amazon S3 condition key
|
975
|
+
# examples][1] in the *Amazon S3 User Guide*.
|
976
|
+
#
|
977
|
+
# <note markdown="1"> `x-amz-website-redirect-location` is unique to each object and is not
|
978
|
+
# copied when using the `x-amz-metadata-directive` header. To copy the
|
979
|
+
# value, you must specify `x-amz-website-redirect-location` in the
|
980
|
+
# request header.
|
981
|
+
#
|
982
|
+
# </note>
|
983
|
+
#
|
984
|
+
#
|
985
|
+
#
|
986
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/amazon-s3-policy-keys.html
|
509
987
|
# @option options [String] :tagging_directive
|
510
|
-
# Specifies whether the object tag-set
|
511
|
-
# or replaced with tag-set provided in the request.
|
988
|
+
# Specifies whether the object tag-set is copied from the source object
|
989
|
+
# or replaced with the tag-set that's provided in the request.
|
990
|
+
#
|
991
|
+
# The default value is `COPY`.
|
992
|
+
#
|
993
|
+
# <note markdown="1"> **Directory buckets** - For directory buckets in a `CopyObject`
|
994
|
+
# operation, only the empty tag-set is supported. Any requests that
|
995
|
+
# attempt to write non-empty tags into directory buckets will receive a
|
996
|
+
# `501 Not Implemented` status code. When the destination bucket is a
|
997
|
+
# directory bucket, you will receive a `501 Not Implemented` response in
|
998
|
+
# any of the following situations:
|
999
|
+
#
|
1000
|
+
# * When you attempt to `COPY` the tag-set from an S3 source object that
|
1001
|
+
# has non-empty tags.
|
1002
|
+
#
|
1003
|
+
# * When you attempt to `REPLACE` the tag-set of a source object and set
|
1004
|
+
# a non-empty value to `x-amz-tagging`.
|
1005
|
+
#
|
1006
|
+
# * When you don't set the `x-amz-tagging-directive` header and the
|
1007
|
+
# source object has non-empty tags. This is because the default value
|
1008
|
+
# of `x-amz-tagging-directive` is `COPY`.
|
1009
|
+
#
|
1010
|
+
# Because only the empty tag-set is supported for directory buckets in a
|
1011
|
+
# `CopyObject` operation, the following situations are allowed:
|
1012
|
+
#
|
1013
|
+
# * When you attempt to `COPY` the tag-set from a directory bucket
|
1014
|
+
# source object that has no tags to a general purpose bucket. It
|
1015
|
+
# copies an empty tag-set to the destination object.
|
1016
|
+
#
|
1017
|
+
# * When you attempt to `REPLACE` the tag-set of a directory bucket
|
1018
|
+
# source object and set the `x-amz-tagging` value of the directory
|
1019
|
+
# bucket destination object to empty.
|
1020
|
+
#
|
1021
|
+
# * When you attempt to `REPLACE` the tag-set of a general purpose
|
1022
|
+
# bucket source object that has non-empty tags and set the
|
1023
|
+
# `x-amz-tagging` value of the directory bucket destination object to
|
1024
|
+
# empty.
|
1025
|
+
#
|
1026
|
+
# * When you attempt to `REPLACE` the tag-set of a directory bucket
|
1027
|
+
# source object and don't set the `x-amz-tagging` value of the
|
1028
|
+
# directory bucket destination object. This is because the default
|
1029
|
+
# value of `x-amz-tagging` is the empty value.
|
1030
|
+
#
|
1031
|
+
# </note>
|
512
1032
|
# @option options [String] :server_side_encryption
|
513
|
-
# The
|
514
|
-
# S3 (
|
1033
|
+
# The server-side encryption algorithm used when storing this object in
|
1034
|
+
# Amazon S3 (for example, `AES256`, `aws:kms`, `aws:kms:dsse`).
|
1035
|
+
# Unrecognized or unsupported values won’t write a destination object
|
1036
|
+
# and will receive a `400 Bad Request` response.
|
1037
|
+
#
|
1038
|
+
# Amazon S3 automatically encrypts all new objects that are copied to an
|
1039
|
+
# S3 bucket. When copying an object, if you don't specify encryption
|
1040
|
+
# information in your copy request, the encryption setting of the target
|
1041
|
+
# object is set to the default encryption configuration of the
|
1042
|
+
# destination bucket. By default, all buckets have a base level of
|
1043
|
+
# encryption configuration that uses server-side encryption with Amazon
|
1044
|
+
# S3 managed keys (SSE-S3). If the destination bucket has a default
|
1045
|
+
# encryption configuration that uses server-side encryption with Key
|
1046
|
+
# Management Service (KMS) keys (SSE-KMS), dual-layer server-side
|
1047
|
+
# encryption with Amazon Web Services KMS keys (DSSE-KMS), or
|
1048
|
+
# server-side encryption with customer-provided encryption keys (SSE-C),
|
1049
|
+
# Amazon S3 uses the corresponding KMS key, or a customer-provided key
|
1050
|
+
# to encrypt the target object copy.
|
1051
|
+
#
|
1052
|
+
# When you perform a `CopyObject` operation, if you want to use a
|
1053
|
+
# different type of encryption setting for the target object, you can
|
1054
|
+
# specify appropriate encryption-related headers to encrypt the target
|
1055
|
+
# object with an Amazon S3 managed key, a KMS key, or a
|
1056
|
+
# customer-provided key. If the encryption setting in your request is
|
1057
|
+
# different from the default encryption configuration of the destination
|
1058
|
+
# bucket, the encryption setting in your request takes precedence.
|
1059
|
+
#
|
1060
|
+
# With server-side encryption, Amazon S3 encrypts your data as it writes
|
1061
|
+
# your data to disks in its data centers and decrypts the data when you
|
1062
|
+
# access it. For more information about server-side encryption, see
|
1063
|
+
# [Using Server-Side Encryption][1] in the *Amazon S3 User Guide*.
|
1064
|
+
#
|
1065
|
+
# <note markdown="1"> For directory buckets, only server-side encryption with Amazon S3
|
1066
|
+
# managed keys (SSE-S3) (`AES256`) is supported.
|
1067
|
+
#
|
1068
|
+
# </note>
|
1069
|
+
#
|
1070
|
+
#
|
1071
|
+
#
|
1072
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/serv-side-encryption.html
|
515
1073
|
# @option options [String] :storage_class
|
516
|
-
#
|
1074
|
+
# If the `x-amz-storage-class` header is not used, the copied object
|
1075
|
+
# will be stored in the `STANDARD` Storage Class by default. The
|
1076
|
+
# `STANDARD` storage class provides high durability and high
|
1077
|
+
# availability. Depending on performance needs, you can specify a
|
1078
|
+
# different Storage Class.
|
1079
|
+
#
|
1080
|
+
# <note markdown="1"> * <b>Directory buckets </b> - For directory buckets, only the S3
|
1081
|
+
# Express One Zone storage class is supported to store newly created
|
1082
|
+
# objects. Unsupported storage class values won't write a destination
|
1083
|
+
# object and will respond with the HTTP status code `400 Bad Request`.
|
1084
|
+
#
|
1085
|
+
# * <b>Amazon S3 on Outposts </b> - S3 on Outposts only uses the
|
1086
|
+
# `OUTPOSTS` Storage Class.
|
1087
|
+
#
|
1088
|
+
# </note>
|
1089
|
+
#
|
1090
|
+
# You can use the `CopyObject` action to change the storage class of an
|
1091
|
+
# object that is already stored in Amazon S3 by using the
|
1092
|
+
# `x-amz-storage-class` header. For more information, see [Storage
|
1093
|
+
# Classes][1] in the *Amazon S3 User Guide*.
|
1094
|
+
#
|
1095
|
+
# Before using an object as a source object for the copy operation, you
|
1096
|
+
# must restore a copy of it if it meets any of the following conditions:
|
1097
|
+
#
|
1098
|
+
# * The storage class of the source object is `GLACIER` or
|
1099
|
+
# `DEEP_ARCHIVE`.
|
1100
|
+
#
|
1101
|
+
# * The storage class of the source object is `INTELLIGENT_TIERING` and
|
1102
|
+
# it's [S3 Intelligent-Tiering access tier][2] is `Archive Access` or
|
1103
|
+
# `Deep Archive Access`.
|
1104
|
+
#
|
1105
|
+
# For more information, see [RestoreObject][3] and [Copying Objects][4]
|
1106
|
+
# in the *Amazon S3 User Guide*.
|
1107
|
+
#
|
1108
|
+
#
|
1109
|
+
#
|
1110
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html
|
1111
|
+
# [2]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/intelligent-tiering-overview.html#intel-tiering-tier-definition
|
1112
|
+
# [3]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_RestoreObject.html
|
1113
|
+
# [4]: https://docs.aws.amazon.com/AmazonS3/latest/dev/CopyingObjectsExamples.html
|
517
1114
|
# @option options [String] :website_redirect_location
|
518
|
-
# If the bucket is configured as a website, redirects
|
519
|
-
# object to another object in the same bucket or
|
520
|
-
# Amazon S3 stores the value of this header in the
|
1115
|
+
# If the destination bucket is configured as a website, redirects
|
1116
|
+
# requests for this object copy to another object in the same bucket or
|
1117
|
+
# to an external URL. Amazon S3 stores the value of this header in the
|
1118
|
+
# object metadata. This value is unique to each object and is not copied
|
1119
|
+
# when using the `x-amz-metadata-directive` header. Instead, you may opt
|
1120
|
+
# to provide this header in combination with the
|
1121
|
+
# `x-amz-metadata-directive` header.
|
1122
|
+
#
|
1123
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
1124
|
+
#
|
1125
|
+
# </note>
|
521
1126
|
# @option options [String] :sse_customer_algorithm
|
522
|
-
# Specifies the algorithm to use
|
523
|
-
# AES256).
|
1127
|
+
# Specifies the algorithm to use when encrypting the object (for
|
1128
|
+
# example, `AES256`).
|
1129
|
+
#
|
1130
|
+
# When you perform a `CopyObject` operation, if you want to use a
|
1131
|
+
# different type of encryption setting for the target object, you can
|
1132
|
+
# specify appropriate encryption-related headers to encrypt the target
|
1133
|
+
# object with an Amazon S3 managed key, a KMS key, or a
|
1134
|
+
# customer-provided key. If the encryption setting in your request is
|
1135
|
+
# different from the default encryption configuration of the destination
|
1136
|
+
# bucket, the encryption setting in your request takes precedence.
|
1137
|
+
#
|
1138
|
+
# <note markdown="1"> This functionality is not supported when the destination bucket is a
|
1139
|
+
# directory bucket.
|
1140
|
+
#
|
1141
|
+
# </note>
|
524
1142
|
# @option options [String] :sse_customer_key
|
525
1143
|
# Specifies the customer-provided encryption key for Amazon S3 to use in
|
526
1144
|
# encrypting data. This value is used to store the object and then it is
|
527
|
-
# discarded
|
528
|
-
# appropriate for use with the algorithm specified in the
|
529
|
-
# x-amz-server-side
|
1145
|
+
# discarded. Amazon S3 does not store the encryption key. The key must
|
1146
|
+
# be appropriate for use with the algorithm specified in the
|
1147
|
+
# `x-amz-server-side-encryption-customer-algorithm` header.
|
1148
|
+
#
|
1149
|
+
# <note markdown="1"> This functionality is not supported when the destination bucket is a
|
1150
|
+
# directory bucket.
|
1151
|
+
#
|
1152
|
+
# </note>
|
530
1153
|
# @option options [String] :sse_customer_key_md5
|
531
1154
|
# Specifies the 128-bit MD5 digest of the encryption key according to
|
532
1155
|
# RFC 1321. Amazon S3 uses this header for a message integrity check to
|
533
|
-
# ensure the encryption key was transmitted without error.
|
1156
|
+
# ensure that the encryption key was transmitted without error.
|
1157
|
+
#
|
1158
|
+
# <note markdown="1"> This functionality is not supported when the destination bucket is a
|
1159
|
+
# directory bucket.
|
1160
|
+
#
|
1161
|
+
# </note>
|
534
1162
|
# @option options [String] :ssekms_key_id
|
535
|
-
# Specifies the
|
536
|
-
# PUT requests for an object protected by
|
537
|
-
# via SSL or using SigV4.
|
538
|
-
#
|
539
|
-
#
|
1163
|
+
# Specifies the KMS ID (Key ID, Key ARN, or Key Alias) to use for object
|
1164
|
+
# encryption. All GET and PUT requests for an object protected by KMS
|
1165
|
+
# will fail if they're not made via SSL or using SigV4. For information
|
1166
|
+
# about configuring any of the officially supported Amazon Web Services
|
1167
|
+
# SDKs and Amazon Web Services CLI, see [Specifying the Signature
|
1168
|
+
# Version in Request Authentication][1] in the *Amazon S3 User Guide*.
|
1169
|
+
#
|
1170
|
+
# <note markdown="1"> This functionality is not supported when the destination bucket is a
|
1171
|
+
# directory bucket.
|
1172
|
+
#
|
1173
|
+
# </note>
|
1174
|
+
#
|
1175
|
+
#
|
1176
|
+
#
|
1177
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingAWSSDK.html#specify-signature-version
|
540
1178
|
# @option options [String] :ssekms_encryption_context
|
541
|
-
# Specifies the
|
542
|
-
# The value of this header is a base64-encoded UTF-8
|
543
|
-
# with the encryption context key-value pairs.
|
1179
|
+
# Specifies the Amazon Web Services KMS Encryption Context to use for
|
1180
|
+
# object encryption. The value of this header is a base64-encoded UTF-8
|
1181
|
+
# string holding JSON with the encryption context key-value pairs. This
|
1182
|
+
# value must be explicitly added to specify encryption context for
|
1183
|
+
# `CopyObject` requests.
|
1184
|
+
#
|
1185
|
+
# <note markdown="1"> This functionality is not supported when the destination bucket is a
|
1186
|
+
# directory bucket.
|
1187
|
+
#
|
1188
|
+
# </note>
|
1189
|
+
# @option options [Boolean] :bucket_key_enabled
|
1190
|
+
# Specifies whether Amazon S3 should use an S3 Bucket Key for object
|
1191
|
+
# encryption with server-side encryption using Key Management Service
|
1192
|
+
# (KMS) keys (SSE-KMS). If a target object uses SSE-KMS, you can enable
|
1193
|
+
# an S3 Bucket Key for the object.
|
1194
|
+
#
|
1195
|
+
# Setting this header to `true` causes Amazon S3 to use an S3 Bucket Key
|
1196
|
+
# for object encryption with SSE-KMS. Specifying this header with a COPY
|
1197
|
+
# action doesn’t affect bucket-level settings for S3 Bucket Key.
|
1198
|
+
#
|
1199
|
+
# For more information, see [Amazon S3 Bucket Keys][1] in the *Amazon S3
|
1200
|
+
# User Guide*.
|
1201
|
+
#
|
1202
|
+
# <note markdown="1"> This functionality is not supported when the destination bucket is a
|
1203
|
+
# directory bucket.
|
1204
|
+
#
|
1205
|
+
# </note>
|
1206
|
+
#
|
1207
|
+
#
|
1208
|
+
#
|
1209
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/bucket-key.html
|
544
1210
|
# @option options [String] :copy_source_sse_customer_algorithm
|
545
|
-
# Specifies the algorithm to use when decrypting the source object
|
546
|
-
#
|
1211
|
+
# Specifies the algorithm to use when decrypting the source object (for
|
1212
|
+
# example, `AES256`).
|
1213
|
+
#
|
1214
|
+
# If the source object for the copy is stored in Amazon S3 using SSE-C,
|
1215
|
+
# you must provide the necessary encryption information in your request
|
1216
|
+
# so that Amazon S3 can decrypt the object for copying.
|
1217
|
+
#
|
1218
|
+
# <note markdown="1"> This functionality is not supported when the source object is in a
|
1219
|
+
# directory bucket.
|
1220
|
+
#
|
1221
|
+
# </note>
|
547
1222
|
# @option options [String] :copy_source_sse_customer_key
|
548
1223
|
# Specifies the customer-provided encryption key for Amazon S3 to use to
|
549
1224
|
# decrypt the source object. The encryption key provided in this header
|
550
|
-
# must be one that was used when the source object was created.
|
1225
|
+
# must be the same one that was used when the source object was created.
|
1226
|
+
#
|
1227
|
+
# If the source object for the copy is stored in Amazon S3 using SSE-C,
|
1228
|
+
# you must provide the necessary encryption information in your request
|
1229
|
+
# so that Amazon S3 can decrypt the object for copying.
|
1230
|
+
#
|
1231
|
+
# <note markdown="1"> This functionality is not supported when the source object is in a
|
1232
|
+
# directory bucket.
|
1233
|
+
#
|
1234
|
+
# </note>
|
551
1235
|
# @option options [String] :copy_source_sse_customer_key_md5
|
552
1236
|
# Specifies the 128-bit MD5 digest of the encryption key according to
|
553
1237
|
# RFC 1321. Amazon S3 uses this header for a message integrity check to
|
554
|
-
# ensure the encryption key was transmitted without error.
|
1238
|
+
# ensure that the encryption key was transmitted without error.
|
1239
|
+
#
|
1240
|
+
# If the source object for the copy is stored in Amazon S3 using SSE-C,
|
1241
|
+
# you must provide the necessary encryption information in your request
|
1242
|
+
# so that Amazon S3 can decrypt the object for copying.
|
1243
|
+
#
|
1244
|
+
# <note markdown="1"> This functionality is not supported when the source object is in a
|
1245
|
+
# directory bucket.
|
1246
|
+
#
|
1247
|
+
# </note>
|
555
1248
|
# @option options [String] :request_payer
|
556
|
-
# Confirms that the requester knows that
|
557
|
-
#
|
558
|
-
# requests.
|
559
|
-
#
|
560
|
-
#
|
1249
|
+
# Confirms that the requester knows that they will be charged for the
|
1250
|
+
# request. Bucket owners need not specify this parameter in their
|
1251
|
+
# requests. If either the source or destination S3 bucket has Requester
|
1252
|
+
# Pays enabled, the requester will pay for corresponding charges to copy
|
1253
|
+
# the object. For information about downloading objects from Requester
|
1254
|
+
# Pays buckets, see [Downloading Objects in Requester Pays Buckets][1]
|
1255
|
+
# in the *Amazon S3 User Guide*.
|
1256
|
+
#
|
1257
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
1258
|
+
#
|
1259
|
+
# </note>
|
1260
|
+
#
|
1261
|
+
#
|
1262
|
+
#
|
1263
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
|
561
1264
|
# @option options [String] :tagging
|
562
|
-
# The tag-set for the object
|
563
|
-
# in conjunction with the
|
564
|
-
#
|
1265
|
+
# The tag-set for the object copy in the destination bucket. This value
|
1266
|
+
# must be used in conjunction with the `x-amz-tagging-directive` if you
|
1267
|
+
# choose `REPLACE` for the `x-amz-tagging-directive`. If you choose
|
1268
|
+
# `COPY` for the `x-amz-tagging-directive`, you don't need to set the
|
1269
|
+
# `x-amz-tagging` header, because the tag-set will be copied from the
|
1270
|
+
# source object directly. The tag-set must be encoded as URL Query
|
1271
|
+
# parameters.
|
1272
|
+
#
|
1273
|
+
# The default value is the empty value.
|
1274
|
+
#
|
1275
|
+
# <note markdown="1"> **Directory buckets** - For directory buckets in a `CopyObject`
|
1276
|
+
# operation, only the empty tag-set is supported. Any requests that
|
1277
|
+
# attempt to write non-empty tags into directory buckets will receive a
|
1278
|
+
# `501 Not Implemented` status code. When the destination bucket is a
|
1279
|
+
# directory bucket, you will receive a `501 Not Implemented` response in
|
1280
|
+
# any of the following situations:
|
1281
|
+
#
|
1282
|
+
# * When you attempt to `COPY` the tag-set from an S3 source object that
|
1283
|
+
# has non-empty tags.
|
1284
|
+
#
|
1285
|
+
# * When you attempt to `REPLACE` the tag-set of a source object and set
|
1286
|
+
# a non-empty value to `x-amz-tagging`.
|
1287
|
+
#
|
1288
|
+
# * When you don't set the `x-amz-tagging-directive` header and the
|
1289
|
+
# source object has non-empty tags. This is because the default value
|
1290
|
+
# of `x-amz-tagging-directive` is `COPY`.
|
1291
|
+
#
|
1292
|
+
# Because only the empty tag-set is supported for directory buckets in a
|
1293
|
+
# `CopyObject` operation, the following situations are allowed:
|
1294
|
+
#
|
1295
|
+
# * When you attempt to `COPY` the tag-set from a directory bucket
|
1296
|
+
# source object that has no tags to a general purpose bucket. It
|
1297
|
+
# copies an empty tag-set to the destination object.
|
1298
|
+
#
|
1299
|
+
# * When you attempt to `REPLACE` the tag-set of a directory bucket
|
1300
|
+
# source object and set the `x-amz-tagging` value of the directory
|
1301
|
+
# bucket destination object to empty.
|
1302
|
+
#
|
1303
|
+
# * When you attempt to `REPLACE` the tag-set of a general purpose
|
1304
|
+
# bucket source object that has non-empty tags and set the
|
1305
|
+
# `x-amz-tagging` value of the directory bucket destination object to
|
1306
|
+
# empty.
|
1307
|
+
#
|
1308
|
+
# * When you attempt to `REPLACE` the tag-set of a directory bucket
|
1309
|
+
# source object and don't set the `x-amz-tagging` value of the
|
1310
|
+
# directory bucket destination object. This is because the default
|
1311
|
+
# value of `x-amz-tagging` is the empty value.
|
1312
|
+
#
|
1313
|
+
# </note>
|
565
1314
|
# @option options [String] :object_lock_mode
|
566
|
-
# The
|
1315
|
+
# The Object Lock mode that you want to apply to the object copy.
|
1316
|
+
#
|
1317
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
1318
|
+
#
|
1319
|
+
# </note>
|
567
1320
|
# @option options [Time,DateTime,Date,Integer,String] :object_lock_retain_until_date
|
568
|
-
# The date and time when you want the
|
1321
|
+
# The date and time when you want the Object Lock of the object copy to
|
569
1322
|
# expire.
|
1323
|
+
#
|
1324
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
1325
|
+
#
|
1326
|
+
# </note>
|
570
1327
|
# @option options [String] :object_lock_legal_hold_status
|
571
|
-
# Specifies whether you want to apply a
|
1328
|
+
# Specifies whether you want to apply a legal hold to the object copy.
|
1329
|
+
#
|
1330
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
1331
|
+
#
|
1332
|
+
# </note>
|
1333
|
+
# @option options [String] :expected_bucket_owner
|
1334
|
+
# The account ID of the expected destination bucket owner. If the
|
1335
|
+
# account ID that you provide does not match the actual owner of the
|
1336
|
+
# destination bucket, the request fails with the HTTP status code `403
|
1337
|
+
# Forbidden` (access denied).
|
1338
|
+
# @option options [String] :expected_source_bucket_owner
|
1339
|
+
# The account ID of the expected source bucket owner. If the account ID
|
1340
|
+
# that you provide does not match the actual owner of the source bucket,
|
1341
|
+
# the request fails with the HTTP status code `403 Forbidden` (access
|
1342
|
+
# denied).
|
572
1343
|
# @return [Types::CopyObjectOutput]
|
573
1344
|
def copy_from(options = {})
|
574
1345
|
options = options.merge(
|
575
1346
|
bucket: @bucket_name,
|
576
1347
|
key: @key
|
577
1348
|
)
|
578
|
-
resp =
|
1349
|
+
resp = Aws::Plugins::UserAgent.feature('resource') do
|
1350
|
+
@client.copy_object(options)
|
1351
|
+
end
|
579
1352
|
resp.data
|
580
1353
|
end
|
581
1354
|
|
@@ -586,29 +1359,62 @@ module Aws::S3
|
|
586
1359
|
# version_id: "ObjectVersionId",
|
587
1360
|
# request_payer: "requester", # accepts requester
|
588
1361
|
# bypass_governance_retention: false,
|
1362
|
+
# expected_bucket_owner: "AccountId",
|
589
1363
|
# })
|
590
1364
|
# @param [Hash] options ({})
|
591
1365
|
# @option options [String] :mfa
|
592
1366
|
# The concatenation of the authentication device's serial number, a
|
593
1367
|
# space, and the value that is displayed on your authentication device.
|
1368
|
+
# Required to permanently delete a versioned object if versioning is
|
1369
|
+
# configured with MFA delete enabled.
|
1370
|
+
#
|
1371
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
1372
|
+
#
|
1373
|
+
# </note>
|
594
1374
|
# @option options [String] :version_id
|
595
|
-
#
|
1375
|
+
# Version ID used to reference a specific version of the object.
|
1376
|
+
#
|
1377
|
+
# <note markdown="1"> For directory buckets in this API operation, only the `null` value of
|
1378
|
+
# the version ID is supported.
|
1379
|
+
#
|
1380
|
+
# </note>
|
596
1381
|
# @option options [String] :request_payer
|
597
|
-
# Confirms that the requester knows that
|
598
|
-
#
|
599
|
-
# requests.
|
600
|
-
#
|
601
|
-
#
|
1382
|
+
# Confirms that the requester knows that they will be charged for the
|
1383
|
+
# request. Bucket owners need not specify this parameter in their
|
1384
|
+
# requests. If either the source or destination S3 bucket has Requester
|
1385
|
+
# Pays enabled, the requester will pay for corresponding charges to copy
|
1386
|
+
# the object. For information about downloading objects from Requester
|
1387
|
+
# Pays buckets, see [Downloading Objects in Requester Pays Buckets][1]
|
1388
|
+
# in the *Amazon S3 User Guide*.
|
1389
|
+
#
|
1390
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
1391
|
+
#
|
1392
|
+
# </note>
|
1393
|
+
#
|
1394
|
+
#
|
1395
|
+
#
|
1396
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
|
602
1397
|
# @option options [Boolean] :bypass_governance_retention
|
603
|
-
# Indicates whether
|
604
|
-
# restrictions to process this operation.
|
1398
|
+
# Indicates whether S3 Object Lock should bypass Governance-mode
|
1399
|
+
# restrictions to process this operation. To use this header, you must
|
1400
|
+
# have the `s3:BypassGovernanceRetention` permission.
|
1401
|
+
#
|
1402
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
1403
|
+
#
|
1404
|
+
# </note>
|
1405
|
+
# @option options [String] :expected_bucket_owner
|
1406
|
+
# The account ID of the expected bucket owner. If the account ID that
|
1407
|
+
# you provide does not match the actual owner of the bucket, the request
|
1408
|
+
# fails with the HTTP status code `403 Forbidden` (access denied).
|
605
1409
|
# @return [Types::DeleteObjectOutput]
|
606
1410
|
def delete(options = {})
|
607
1411
|
options = options.merge(
|
608
1412
|
bucket: @bucket_name,
|
609
1413
|
key: @key
|
610
1414
|
)
|
611
|
-
resp =
|
1415
|
+
resp = Aws::Plugins::UserAgent.feature('resource') do
|
1416
|
+
@client.delete_object(options)
|
1417
|
+
end
|
612
1418
|
resp.data
|
613
1419
|
end
|
614
1420
|
|
@@ -632,69 +1438,239 @@ module Aws::S3
|
|
632
1438
|
# sse_customer_key_md5: "SSECustomerKeyMD5",
|
633
1439
|
# request_payer: "requester", # accepts requester
|
634
1440
|
# part_number: 1,
|
1441
|
+
# expected_bucket_owner: "AccountId",
|
1442
|
+
# checksum_mode: "ENABLED", # accepts ENABLED
|
635
1443
|
# })
|
636
1444
|
# @param [Hash] options ({})
|
637
1445
|
# @option options [String] :if_match
|
638
1446
|
# Return the object only if its entity tag (ETag) is the same as the one
|
639
|
-
# specified
|
1447
|
+
# specified in this header; otherwise, return a `412 Precondition
|
1448
|
+
# Failed` error.
|
1449
|
+
#
|
1450
|
+
# If both of the `If-Match` and `If-Unmodified-Since` headers are
|
1451
|
+
# present in the request as follows: `If-Match` condition evaluates to
|
1452
|
+
# `true`, and; `If-Unmodified-Since` condition evaluates to `false`;
|
1453
|
+
# then, S3 returns `200 OK` and the data requested.
|
1454
|
+
#
|
1455
|
+
# For more information about conditional requests, see [RFC 7232][1].
|
1456
|
+
#
|
1457
|
+
#
|
1458
|
+
#
|
1459
|
+
# [1]: https://tools.ietf.org/html/rfc7232
|
640
1460
|
# @option options [Time,DateTime,Date,Integer,String] :if_modified_since
|
641
1461
|
# Return the object only if it has been modified since the specified
|
642
|
-
# time
|
1462
|
+
# time; otherwise, return a `304 Not Modified` error.
|
1463
|
+
#
|
1464
|
+
# If both of the `If-None-Match` and `If-Modified-Since` headers are
|
1465
|
+
# present in the request as follows:` If-None-Match` condition evaluates
|
1466
|
+
# to `false`, and; `If-Modified-Since` condition evaluates to `true`;
|
1467
|
+
# then, S3 returns `304 Not Modified` status code.
|
1468
|
+
#
|
1469
|
+
# For more information about conditional requests, see [RFC 7232][1].
|
1470
|
+
#
|
1471
|
+
#
|
1472
|
+
#
|
1473
|
+
# [1]: https://tools.ietf.org/html/rfc7232
|
643
1474
|
# @option options [String] :if_none_match
|
644
1475
|
# Return the object only if its entity tag (ETag) is different from the
|
645
|
-
# one specified
|
1476
|
+
# one specified in this header; otherwise, return a `304 Not Modified`
|
1477
|
+
# error.
|
1478
|
+
#
|
1479
|
+
# If both of the `If-None-Match` and `If-Modified-Since` headers are
|
1480
|
+
# present in the request as follows:` If-None-Match` condition evaluates
|
1481
|
+
# to `false`, and; `If-Modified-Since` condition evaluates to `true`;
|
1482
|
+
# then, S3 returns `304 Not Modified` HTTP status code.
|
1483
|
+
#
|
1484
|
+
# For more information about conditional requests, see [RFC 7232][1].
|
1485
|
+
#
|
1486
|
+
#
|
1487
|
+
#
|
1488
|
+
# [1]: https://tools.ietf.org/html/rfc7232
|
646
1489
|
# @option options [Time,DateTime,Date,Integer,String] :if_unmodified_since
|
647
1490
|
# Return the object only if it has not been modified since the specified
|
648
|
-
# time
|
1491
|
+
# time; otherwise, return a `412 Precondition Failed` error.
|
1492
|
+
#
|
1493
|
+
# If both of the `If-Match` and `If-Unmodified-Since` headers are
|
1494
|
+
# present in the request as follows: `If-Match` condition evaluates to
|
1495
|
+
# `true`, and; `If-Unmodified-Since` condition evaluates to `false`;
|
1496
|
+
# then, S3 returns `200 OK` and the data requested.
|
1497
|
+
#
|
1498
|
+
# For more information about conditional requests, see [RFC 7232][1].
|
1499
|
+
#
|
1500
|
+
#
|
1501
|
+
#
|
1502
|
+
# [1]: https://tools.ietf.org/html/rfc7232
|
649
1503
|
# @option options [String] :range
|
650
|
-
# Downloads the specified range
|
651
|
-
# about the HTTP Range header,
|
652
|
-
#
|
1504
|
+
# Downloads the specified byte range of an object. For more information
|
1505
|
+
# about the HTTP Range header, see
|
1506
|
+
# [https://www.rfc-editor.org/rfc/rfc9110.html#name-range][1].
|
1507
|
+
#
|
1508
|
+
# <note markdown="1"> Amazon S3 doesn't support retrieving multiple ranges of data per
|
1509
|
+
# `GET` request.
|
1510
|
+
#
|
1511
|
+
# </note>
|
1512
|
+
#
|
1513
|
+
#
|
1514
|
+
#
|
1515
|
+
# [1]: https://www.rfc-editor.org/rfc/rfc9110.html#name-range
|
653
1516
|
# @option options [String] :response_cache_control
|
654
|
-
# Sets the Cache-Control header of the response.
|
1517
|
+
# Sets the `Cache-Control` header of the response.
|
655
1518
|
# @option options [String] :response_content_disposition
|
656
|
-
# Sets the Content-Disposition header of the response
|
1519
|
+
# Sets the `Content-Disposition` header of the response.
|
657
1520
|
# @option options [String] :response_content_encoding
|
658
|
-
# Sets the Content-Encoding header of the response.
|
1521
|
+
# Sets the `Content-Encoding` header of the response.
|
659
1522
|
# @option options [String] :response_content_language
|
660
|
-
# Sets the Content-Language header of the response.
|
1523
|
+
# Sets the `Content-Language` header of the response.
|
661
1524
|
# @option options [String] :response_content_type
|
662
|
-
# Sets the Content-Type header of the response.
|
1525
|
+
# Sets the `Content-Type` header of the response.
|
663
1526
|
# @option options [Time,DateTime,Date,Integer,String] :response_expires
|
664
|
-
# Sets the Expires header of the response.
|
1527
|
+
# Sets the `Expires` header of the response.
|
665
1528
|
# @option options [String] :version_id
|
666
|
-
#
|
1529
|
+
# Version ID used to reference a specific version of the object.
|
1530
|
+
#
|
1531
|
+
# By default, the `GetObject` operation returns the current version of
|
1532
|
+
# an object. To return a different version, use the `versionId`
|
1533
|
+
# subresource.
|
1534
|
+
#
|
1535
|
+
# <note markdown="1"> * If you include a `versionId` in your request header, you must have
|
1536
|
+
# the `s3:GetObjectVersion` permission to access a specific version of
|
1537
|
+
# an object. The `s3:GetObject` permission is not required in this
|
1538
|
+
# scenario.
|
1539
|
+
#
|
1540
|
+
# * If you request the current version of an object without a specific
|
1541
|
+
# `versionId` in the request header, only the `s3:GetObject`
|
1542
|
+
# permission is required. The `s3:GetObjectVersion` permission is not
|
1543
|
+
# required in this scenario.
|
1544
|
+
#
|
1545
|
+
# * **Directory buckets** - S3 Versioning isn't enabled and supported
|
1546
|
+
# for directory buckets. For this API operation, only the `null` value
|
1547
|
+
# of the version ID is supported by directory buckets. You can only
|
1548
|
+
# specify `null` to the `versionId` query parameter in the request.
|
1549
|
+
#
|
1550
|
+
# </note>
|
1551
|
+
#
|
1552
|
+
# For more information about versioning, see [PutBucketVersioning][1].
|
1553
|
+
#
|
1554
|
+
#
|
1555
|
+
#
|
1556
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketVersioning.html
|
667
1557
|
# @option options [String] :sse_customer_algorithm
|
668
|
-
# Specifies the algorithm to use
|
669
|
-
# AES256).
|
1558
|
+
# Specifies the algorithm to use when decrypting the object (for
|
1559
|
+
# example, `AES256`).
|
1560
|
+
#
|
1561
|
+
# If you encrypt an object by using server-side encryption with
|
1562
|
+
# customer-provided encryption keys (SSE-C) when you store the object in
|
1563
|
+
# Amazon S3, then when you GET the object, you must use the following
|
1564
|
+
# headers:
|
1565
|
+
#
|
1566
|
+
# * `x-amz-server-side-encryption-customer-algorithm`
|
1567
|
+
#
|
1568
|
+
# * `x-amz-server-side-encryption-customer-key`
|
1569
|
+
#
|
1570
|
+
# * `x-amz-server-side-encryption-customer-key-MD5`
|
1571
|
+
#
|
1572
|
+
# For more information about SSE-C, see [Server-Side Encryption (Using
|
1573
|
+
# Customer-Provided Encryption Keys)][1] in the *Amazon S3 User Guide*.
|
1574
|
+
#
|
1575
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
1576
|
+
#
|
1577
|
+
# </note>
|
1578
|
+
#
|
1579
|
+
#
|
1580
|
+
#
|
1581
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html
|
670
1582
|
# @option options [String] :sse_customer_key
|
671
|
-
# Specifies the customer-provided encryption key
|
672
|
-
#
|
673
|
-
#
|
674
|
-
#
|
675
|
-
#
|
1583
|
+
# Specifies the customer-provided encryption key that you originally
|
1584
|
+
# provided for Amazon S3 to encrypt the data before storing it. This
|
1585
|
+
# value is used to decrypt the object when recovering it and must match
|
1586
|
+
# the one used when storing the data. The key must be appropriate for
|
1587
|
+
# use with the algorithm specified in the
|
1588
|
+
# `x-amz-server-side-encryption-customer-algorithm` header.
|
1589
|
+
#
|
1590
|
+
# If you encrypt an object by using server-side encryption with
|
1591
|
+
# customer-provided encryption keys (SSE-C) when you store the object in
|
1592
|
+
# Amazon S3, then when you GET the object, you must use the following
|
1593
|
+
# headers:
|
1594
|
+
#
|
1595
|
+
# * `x-amz-server-side-encryption-customer-algorithm`
|
1596
|
+
#
|
1597
|
+
# * `x-amz-server-side-encryption-customer-key`
|
1598
|
+
#
|
1599
|
+
# * `x-amz-server-side-encryption-customer-key-MD5`
|
1600
|
+
#
|
1601
|
+
# For more information about SSE-C, see [Server-Side Encryption (Using
|
1602
|
+
# Customer-Provided Encryption Keys)][1] in the *Amazon S3 User Guide*.
|
1603
|
+
#
|
1604
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
1605
|
+
#
|
1606
|
+
# </note>
|
1607
|
+
#
|
1608
|
+
#
|
1609
|
+
#
|
1610
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html
|
676
1611
|
# @option options [String] :sse_customer_key_md5
|
677
|
-
# Specifies the 128-bit MD5 digest of the encryption
|
678
|
-
# RFC 1321. Amazon S3 uses this header for a message
|
679
|
-
# ensure the encryption key was transmitted
|
1612
|
+
# Specifies the 128-bit MD5 digest of the customer-provided encryption
|
1613
|
+
# key according to RFC 1321. Amazon S3 uses this header for a message
|
1614
|
+
# integrity check to ensure that the encryption key was transmitted
|
1615
|
+
# without error.
|
1616
|
+
#
|
1617
|
+
# If you encrypt an object by using server-side encryption with
|
1618
|
+
# customer-provided encryption keys (SSE-C) when you store the object in
|
1619
|
+
# Amazon S3, then when you GET the object, you must use the following
|
1620
|
+
# headers:
|
1621
|
+
#
|
1622
|
+
# * `x-amz-server-side-encryption-customer-algorithm`
|
1623
|
+
#
|
1624
|
+
# * `x-amz-server-side-encryption-customer-key`
|
1625
|
+
#
|
1626
|
+
# * `x-amz-server-side-encryption-customer-key-MD5`
|
1627
|
+
#
|
1628
|
+
# For more information about SSE-C, see [Server-Side Encryption (Using
|
1629
|
+
# Customer-Provided Encryption Keys)][1] in the *Amazon S3 User Guide*.
|
1630
|
+
#
|
1631
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
1632
|
+
#
|
1633
|
+
# </note>
|
1634
|
+
#
|
1635
|
+
#
|
1636
|
+
#
|
1637
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html
|
680
1638
|
# @option options [String] :request_payer
|
681
|
-
# Confirms that the requester knows that
|
682
|
-
#
|
683
|
-
# requests.
|
684
|
-
#
|
685
|
-
#
|
1639
|
+
# Confirms that the requester knows that they will be charged for the
|
1640
|
+
# request. Bucket owners need not specify this parameter in their
|
1641
|
+
# requests. If either the source or destination S3 bucket has Requester
|
1642
|
+
# Pays enabled, the requester will pay for corresponding charges to copy
|
1643
|
+
# the object. For information about downloading objects from Requester
|
1644
|
+
# Pays buckets, see [Downloading Objects in Requester Pays Buckets][1]
|
1645
|
+
# in the *Amazon S3 User Guide*.
|
1646
|
+
#
|
1647
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
1648
|
+
#
|
1649
|
+
# </note>
|
1650
|
+
#
|
1651
|
+
#
|
1652
|
+
#
|
1653
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
|
686
1654
|
# @option options [Integer] :part_number
|
687
1655
|
# Part number of the object being read. This is a positive integer
|
688
1656
|
# between 1 and 10,000. Effectively performs a 'ranged' GET request
|
689
1657
|
# for the part specified. Useful for downloading just a part of an
|
690
1658
|
# object.
|
1659
|
+
# @option options [String] :expected_bucket_owner
|
1660
|
+
# The account ID of the expected bucket owner. If the account ID that
|
1661
|
+
# you provide does not match the actual owner of the bucket, the request
|
1662
|
+
# fails with the HTTP status code `403 Forbidden` (access denied).
|
1663
|
+
# @option options [String] :checksum_mode
|
1664
|
+
# To retrieve the checksum, this mode must be enabled.
|
691
1665
|
# @return [Types::GetObjectOutput]
|
692
1666
|
def get(options = {}, &block)
|
693
1667
|
options = options.merge(
|
694
1668
|
bucket: @bucket_name,
|
695
1669
|
key: @key
|
696
1670
|
)
|
697
|
-
resp =
|
1671
|
+
resp = Aws::Plugins::UserAgent.feature('resource') do
|
1672
|
+
@client.get_object(options, &block)
|
1673
|
+
end
|
698
1674
|
resp.data
|
699
1675
|
end
|
700
1676
|
|
@@ -715,23 +1691,48 @@ module Aws::S3
|
|
715
1691
|
# metadata: {
|
716
1692
|
# "MetadataKey" => "MetadataValue",
|
717
1693
|
# },
|
718
|
-
# server_side_encryption: "AES256", # accepts AES256, aws:kms
|
719
|
-
# storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER, DEEP_ARCHIVE
|
1694
|
+
# server_side_encryption: "AES256", # accepts AES256, aws:kms, aws:kms:dsse
|
1695
|
+
# storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER, DEEP_ARCHIVE, OUTPOSTS, GLACIER_IR, SNOW, EXPRESS_ONEZONE
|
720
1696
|
# website_redirect_location: "WebsiteRedirectLocation",
|
721
1697
|
# sse_customer_algorithm: "SSECustomerAlgorithm",
|
722
1698
|
# sse_customer_key: "SSECustomerKey",
|
723
1699
|
# sse_customer_key_md5: "SSECustomerKeyMD5",
|
724
1700
|
# ssekms_key_id: "SSEKMSKeyId",
|
725
1701
|
# ssekms_encryption_context: "SSEKMSEncryptionContext",
|
1702
|
+
# bucket_key_enabled: false,
|
726
1703
|
# request_payer: "requester", # accepts requester
|
727
1704
|
# tagging: "TaggingHeader",
|
728
1705
|
# object_lock_mode: "GOVERNANCE", # accepts GOVERNANCE, COMPLIANCE
|
729
1706
|
# object_lock_retain_until_date: Time.now,
|
730
1707
|
# object_lock_legal_hold_status: "ON", # accepts ON, OFF
|
1708
|
+
# expected_bucket_owner: "AccountId",
|
1709
|
+
# checksum_algorithm: "CRC32", # accepts CRC32, CRC32C, SHA1, SHA256
|
731
1710
|
# })
|
732
1711
|
# @param [Hash] options ({})
|
733
1712
|
# @option options [String] :acl
|
734
|
-
# The canned ACL to apply to the object.
|
1713
|
+
# The canned ACL to apply to the object. Amazon S3 supports a set of
|
1714
|
+
# predefined ACLs, known as *canned ACLs*. Each canned ACL has a
|
1715
|
+
# predefined set of grantees and permissions. For more information, see
|
1716
|
+
# [Canned ACL][1] in the *Amazon S3 User Guide*.
|
1717
|
+
#
|
1718
|
+
# By default, all objects are private. Only the owner has full access
|
1719
|
+
# control. When uploading an object, you can grant access permissions to
|
1720
|
+
# individual Amazon Web Services accounts or to predefined groups
|
1721
|
+
# defined by Amazon S3. These permissions are then added to the access
|
1722
|
+
# control list (ACL) on the new object. For more information, see [Using
|
1723
|
+
# ACLs][2]. One way to grant the permissions using the request headers
|
1724
|
+
# is to specify a canned ACL with the `x-amz-acl` request header.
|
1725
|
+
#
|
1726
|
+
# <note markdown="1"> * This functionality is not supported for directory buckets.
|
1727
|
+
#
|
1728
|
+
# * This functionality is not supported for Amazon S3 on Outposts.
|
1729
|
+
#
|
1730
|
+
# </note>
|
1731
|
+
#
|
1732
|
+
#
|
1733
|
+
#
|
1734
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#CannedACL
|
1735
|
+
# [2]: https://docs.aws.amazon.com/AmazonS3/latest/dev/S3_ACLs_UsingACLs.html
|
735
1736
|
# @option options [String] :cache_control
|
736
1737
|
# Specifies caching behavior along the request/reply chain.
|
737
1738
|
# @option options [String] :content_disposition
|
@@ -740,79 +1741,421 @@ module Aws::S3
|
|
740
1741
|
# Specifies what content encodings have been applied to the object and
|
741
1742
|
# thus what decoding mechanisms must be applied to obtain the media-type
|
742
1743
|
# referenced by the Content-Type header field.
|
1744
|
+
#
|
1745
|
+
# <note markdown="1"> For directory buckets, only the `aws-chunked` value is supported in
|
1746
|
+
# this header field.
|
1747
|
+
#
|
1748
|
+
# </note>
|
743
1749
|
# @option options [String] :content_language
|
744
|
-
# The language the content is in.
|
1750
|
+
# The language that the content is in.
|
745
1751
|
# @option options [String] :content_type
|
746
1752
|
# A standard MIME type describing the format of the object data.
|
747
1753
|
# @option options [Time,DateTime,Date,Integer,String] :expires
|
748
1754
|
# The date and time at which the object is no longer cacheable.
|
749
1755
|
# @option options [String] :grant_full_control
|
750
|
-
#
|
751
|
-
# object.
|
1756
|
+
# Specify access permissions explicitly to give the grantee READ,
|
1757
|
+
# READ\_ACP, and WRITE\_ACP permissions on the object.
|
1758
|
+
#
|
1759
|
+
# By default, all objects are private. Only the owner has full access
|
1760
|
+
# control. When uploading an object, you can use this header to
|
1761
|
+
# explicitly grant access permissions to specific Amazon Web Services
|
1762
|
+
# accounts or groups. This header maps to specific permissions that
|
1763
|
+
# Amazon S3 supports in an ACL. For more information, see [Access
|
1764
|
+
# Control List (ACL) Overview][1] in the *Amazon S3 User Guide*.
|
1765
|
+
#
|
1766
|
+
# You specify each grantee as a type=value pair, where the type is one
|
1767
|
+
# of the following:
|
1768
|
+
#
|
1769
|
+
# * `id` – if the value specified is the canonical user ID of an Amazon
|
1770
|
+
# Web Services account
|
1771
|
+
#
|
1772
|
+
# * `uri` – if you are granting permissions to a predefined group
|
1773
|
+
#
|
1774
|
+
# * `emailAddress` – if the value specified is the email address of an
|
1775
|
+
# Amazon Web Services account
|
1776
|
+
#
|
1777
|
+
# <note markdown="1"> Using email addresses to specify a grantee is only supported in the
|
1778
|
+
# following Amazon Web Services Regions:
|
1779
|
+
#
|
1780
|
+
# * US East (N. Virginia)
|
1781
|
+
#
|
1782
|
+
# * US West (N. California)
|
1783
|
+
#
|
1784
|
+
# * US West (Oregon)
|
1785
|
+
#
|
1786
|
+
# * Asia Pacific (Singapore)
|
1787
|
+
#
|
1788
|
+
# * Asia Pacific (Sydney)
|
1789
|
+
#
|
1790
|
+
# * Asia Pacific (Tokyo)
|
1791
|
+
#
|
1792
|
+
# * Europe (Ireland)
|
1793
|
+
#
|
1794
|
+
# * South America (São Paulo)
|
1795
|
+
#
|
1796
|
+
# For a list of all the Amazon S3 supported Regions and endpoints, see
|
1797
|
+
# [Regions and Endpoints][2] in the Amazon Web Services General
|
1798
|
+
# Reference.
|
1799
|
+
#
|
1800
|
+
# </note>
|
1801
|
+
#
|
1802
|
+
# For example, the following `x-amz-grant-read` header grants the Amazon
|
1803
|
+
# Web Services accounts identified by account IDs permissions to read
|
1804
|
+
# object data and its metadata:
|
1805
|
+
#
|
1806
|
+
# `x-amz-grant-read: id="11112222333", id="444455556666" `
|
1807
|
+
#
|
1808
|
+
# <note markdown="1"> * This functionality is not supported for directory buckets.
|
1809
|
+
#
|
1810
|
+
# * This functionality is not supported for Amazon S3 on Outposts.
|
1811
|
+
#
|
1812
|
+
# </note>
|
1813
|
+
#
|
1814
|
+
#
|
1815
|
+
#
|
1816
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html
|
1817
|
+
# [2]: https://docs.aws.amazon.com/general/latest/gr/rande.html#s3_region
|
752
1818
|
# @option options [String] :grant_read
|
753
|
-
#
|
1819
|
+
# Specify access permissions explicitly to allow grantee to read the
|
1820
|
+
# object data and its metadata.
|
1821
|
+
#
|
1822
|
+
# By default, all objects are private. Only the owner has full access
|
1823
|
+
# control. When uploading an object, you can use this header to
|
1824
|
+
# explicitly grant access permissions to specific Amazon Web Services
|
1825
|
+
# accounts or groups. This header maps to specific permissions that
|
1826
|
+
# Amazon S3 supports in an ACL. For more information, see [Access
|
1827
|
+
# Control List (ACL) Overview][1] in the *Amazon S3 User Guide*.
|
1828
|
+
#
|
1829
|
+
# You specify each grantee as a type=value pair, where the type is one
|
1830
|
+
# of the following:
|
1831
|
+
#
|
1832
|
+
# * `id` – if the value specified is the canonical user ID of an Amazon
|
1833
|
+
# Web Services account
|
1834
|
+
#
|
1835
|
+
# * `uri` – if you are granting permissions to a predefined group
|
1836
|
+
#
|
1837
|
+
# * `emailAddress` – if the value specified is the email address of an
|
1838
|
+
# Amazon Web Services account
|
1839
|
+
#
|
1840
|
+
# <note markdown="1"> Using email addresses to specify a grantee is only supported in the
|
1841
|
+
# following Amazon Web Services Regions:
|
1842
|
+
#
|
1843
|
+
# * US East (N. Virginia)
|
1844
|
+
#
|
1845
|
+
# * US West (N. California)
|
1846
|
+
#
|
1847
|
+
# * US West (Oregon)
|
1848
|
+
#
|
1849
|
+
# * Asia Pacific (Singapore)
|
1850
|
+
#
|
1851
|
+
# * Asia Pacific (Sydney)
|
1852
|
+
#
|
1853
|
+
# * Asia Pacific (Tokyo)
|
1854
|
+
#
|
1855
|
+
# * Europe (Ireland)
|
1856
|
+
#
|
1857
|
+
# * South America (São Paulo)
|
1858
|
+
#
|
1859
|
+
# For a list of all the Amazon S3 supported Regions and endpoints, see
|
1860
|
+
# [Regions and Endpoints][2] in the Amazon Web Services General
|
1861
|
+
# Reference.
|
1862
|
+
#
|
1863
|
+
# </note>
|
1864
|
+
#
|
1865
|
+
# For example, the following `x-amz-grant-read` header grants the Amazon
|
1866
|
+
# Web Services accounts identified by account IDs permissions to read
|
1867
|
+
# object data and its metadata:
|
1868
|
+
#
|
1869
|
+
# `x-amz-grant-read: id="11112222333", id="444455556666" `
|
1870
|
+
#
|
1871
|
+
# <note markdown="1"> * This functionality is not supported for directory buckets.
|
1872
|
+
#
|
1873
|
+
# * This functionality is not supported for Amazon S3 on Outposts.
|
1874
|
+
#
|
1875
|
+
# </note>
|
1876
|
+
#
|
1877
|
+
#
|
1878
|
+
#
|
1879
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html
|
1880
|
+
# [2]: https://docs.aws.amazon.com/general/latest/gr/rande.html#s3_region
|
754
1881
|
# @option options [String] :grant_read_acp
|
755
|
-
#
|
1882
|
+
# Specify access permissions explicitly to allows grantee to read the
|
1883
|
+
# object ACL.
|
1884
|
+
#
|
1885
|
+
# By default, all objects are private. Only the owner has full access
|
1886
|
+
# control. When uploading an object, you can use this header to
|
1887
|
+
# explicitly grant access permissions to specific Amazon Web Services
|
1888
|
+
# accounts or groups. This header maps to specific permissions that
|
1889
|
+
# Amazon S3 supports in an ACL. For more information, see [Access
|
1890
|
+
# Control List (ACL) Overview][1] in the *Amazon S3 User Guide*.
|
1891
|
+
#
|
1892
|
+
# You specify each grantee as a type=value pair, where the type is one
|
1893
|
+
# of the following:
|
1894
|
+
#
|
1895
|
+
# * `id` – if the value specified is the canonical user ID of an Amazon
|
1896
|
+
# Web Services account
|
1897
|
+
#
|
1898
|
+
# * `uri` – if you are granting permissions to a predefined group
|
1899
|
+
#
|
1900
|
+
# * `emailAddress` – if the value specified is the email address of an
|
1901
|
+
# Amazon Web Services account
|
1902
|
+
#
|
1903
|
+
# <note markdown="1"> Using email addresses to specify a grantee is only supported in the
|
1904
|
+
# following Amazon Web Services Regions:
|
1905
|
+
#
|
1906
|
+
# * US East (N. Virginia)
|
1907
|
+
#
|
1908
|
+
# * US West (N. California)
|
1909
|
+
#
|
1910
|
+
# * US West (Oregon)
|
1911
|
+
#
|
1912
|
+
# * Asia Pacific (Singapore)
|
1913
|
+
#
|
1914
|
+
# * Asia Pacific (Sydney)
|
1915
|
+
#
|
1916
|
+
# * Asia Pacific (Tokyo)
|
1917
|
+
#
|
1918
|
+
# * Europe (Ireland)
|
1919
|
+
#
|
1920
|
+
# * South America (São Paulo)
|
1921
|
+
#
|
1922
|
+
# For a list of all the Amazon S3 supported Regions and endpoints, see
|
1923
|
+
# [Regions and Endpoints][2] in the Amazon Web Services General
|
1924
|
+
# Reference.
|
1925
|
+
#
|
1926
|
+
# </note>
|
1927
|
+
#
|
1928
|
+
# For example, the following `x-amz-grant-read` header grants the Amazon
|
1929
|
+
# Web Services accounts identified by account IDs permissions to read
|
1930
|
+
# object data and its metadata:
|
1931
|
+
#
|
1932
|
+
# `x-amz-grant-read: id="11112222333", id="444455556666" `
|
1933
|
+
#
|
1934
|
+
# <note markdown="1"> * This functionality is not supported for directory buckets.
|
1935
|
+
#
|
1936
|
+
# * This functionality is not supported for Amazon S3 on Outposts.
|
1937
|
+
#
|
1938
|
+
# </note>
|
1939
|
+
#
|
1940
|
+
#
|
1941
|
+
#
|
1942
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html
|
1943
|
+
# [2]: https://docs.aws.amazon.com/general/latest/gr/rande.html#s3_region
|
756
1944
|
# @option options [String] :grant_write_acp
|
757
|
-
#
|
1945
|
+
# Specify access permissions explicitly to allows grantee to allow
|
1946
|
+
# grantee to write the ACL for the applicable object.
|
1947
|
+
#
|
1948
|
+
# By default, all objects are private. Only the owner has full access
|
1949
|
+
# control. When uploading an object, you can use this header to
|
1950
|
+
# explicitly grant access permissions to specific Amazon Web Services
|
1951
|
+
# accounts or groups. This header maps to specific permissions that
|
1952
|
+
# Amazon S3 supports in an ACL. For more information, see [Access
|
1953
|
+
# Control List (ACL) Overview][1] in the *Amazon S3 User Guide*.
|
1954
|
+
#
|
1955
|
+
# You specify each grantee as a type=value pair, where the type is one
|
1956
|
+
# of the following:
|
1957
|
+
#
|
1958
|
+
# * `id` – if the value specified is the canonical user ID of an Amazon
|
1959
|
+
# Web Services account
|
1960
|
+
#
|
1961
|
+
# * `uri` – if you are granting permissions to a predefined group
|
1962
|
+
#
|
1963
|
+
# * `emailAddress` – if the value specified is the email address of an
|
1964
|
+
# Amazon Web Services account
|
1965
|
+
#
|
1966
|
+
# <note markdown="1"> Using email addresses to specify a grantee is only supported in the
|
1967
|
+
# following Amazon Web Services Regions:
|
1968
|
+
#
|
1969
|
+
# * US East (N. Virginia)
|
1970
|
+
#
|
1971
|
+
# * US West (N. California)
|
1972
|
+
#
|
1973
|
+
# * US West (Oregon)
|
1974
|
+
#
|
1975
|
+
# * Asia Pacific (Singapore)
|
1976
|
+
#
|
1977
|
+
# * Asia Pacific (Sydney)
|
1978
|
+
#
|
1979
|
+
# * Asia Pacific (Tokyo)
|
1980
|
+
#
|
1981
|
+
# * Europe (Ireland)
|
1982
|
+
#
|
1983
|
+
# * South America (São Paulo)
|
1984
|
+
#
|
1985
|
+
# For a list of all the Amazon S3 supported Regions and endpoints, see
|
1986
|
+
# [Regions and Endpoints][2] in the Amazon Web Services General
|
1987
|
+
# Reference.
|
1988
|
+
#
|
1989
|
+
# </note>
|
1990
|
+
#
|
1991
|
+
# For example, the following `x-amz-grant-read` header grants the Amazon
|
1992
|
+
# Web Services accounts identified by account IDs permissions to read
|
1993
|
+
# object data and its metadata:
|
1994
|
+
#
|
1995
|
+
# `x-amz-grant-read: id="11112222333", id="444455556666" `
|
1996
|
+
#
|
1997
|
+
# <note markdown="1"> * This functionality is not supported for directory buckets.
|
1998
|
+
#
|
1999
|
+
# * This functionality is not supported for Amazon S3 on Outposts.
|
2000
|
+
#
|
2001
|
+
# </note>
|
2002
|
+
#
|
2003
|
+
#
|
2004
|
+
#
|
2005
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html
|
2006
|
+
# [2]: https://docs.aws.amazon.com/general/latest/gr/rande.html#s3_region
|
758
2007
|
# @option options [Hash<String,String>] :metadata
|
759
2008
|
# A map of metadata to store with the object in S3.
|
760
2009
|
# @option options [String] :server_side_encryption
|
761
|
-
# The
|
762
|
-
# S3 (
|
2010
|
+
# The server-side encryption algorithm used when you store this object
|
2011
|
+
# in Amazon S3 (for example, `AES256`, `aws:kms`).
|
2012
|
+
#
|
2013
|
+
# <note markdown="1"> For directory buckets, only server-side encryption with Amazon S3
|
2014
|
+
# managed keys (SSE-S3) (`AES256`) is supported.
|
2015
|
+
#
|
2016
|
+
# </note>
|
763
2017
|
# @option options [String] :storage_class
|
764
|
-
#
|
2018
|
+
# By default, Amazon S3 uses the STANDARD Storage Class to store newly
|
2019
|
+
# created objects. The STANDARD storage class provides high durability
|
2020
|
+
# and high availability. Depending on performance needs, you can specify
|
2021
|
+
# a different Storage Class. For more information, see [Storage
|
2022
|
+
# Classes][1] in the *Amazon S3 User Guide*.
|
2023
|
+
#
|
2024
|
+
# <note markdown="1"> * For directory buckets, only the S3 Express One Zone storage class is
|
2025
|
+
# supported to store newly created objects.
|
2026
|
+
#
|
2027
|
+
# * Amazon S3 on Outposts only uses the OUTPOSTS Storage Class.
|
2028
|
+
#
|
2029
|
+
# </note>
|
2030
|
+
#
|
2031
|
+
#
|
2032
|
+
#
|
2033
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html
|
765
2034
|
# @option options [String] :website_redirect_location
|
766
2035
|
# If the bucket is configured as a website, redirects requests for this
|
767
2036
|
# object to another object in the same bucket or to an external URL.
|
768
2037
|
# Amazon S3 stores the value of this header in the object metadata.
|
2038
|
+
#
|
2039
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
2040
|
+
#
|
2041
|
+
# </note>
|
769
2042
|
# @option options [String] :sse_customer_algorithm
|
770
|
-
# Specifies the algorithm to use
|
771
|
-
# AES256).
|
2043
|
+
# Specifies the algorithm to use when encrypting the object (for
|
2044
|
+
# example, AES256).
|
2045
|
+
#
|
2046
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
2047
|
+
#
|
2048
|
+
# </note>
|
772
2049
|
# @option options [String] :sse_customer_key
|
773
2050
|
# Specifies the customer-provided encryption key for Amazon S3 to use in
|
774
2051
|
# encrypting data. This value is used to store the object and then it is
|
775
|
-
# discarded; Amazon does not store the encryption key. The key must
|
776
|
-
# appropriate for use with the algorithm specified in the
|
777
|
-
# x-amz-server-side
|
2052
|
+
# discarded; Amazon S3 does not store the encryption key. The key must
|
2053
|
+
# be appropriate for use with the algorithm specified in the
|
2054
|
+
# `x-amz-server-side-encryption-customer-algorithm` header.
|
2055
|
+
#
|
2056
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
2057
|
+
#
|
2058
|
+
# </note>
|
778
2059
|
# @option options [String] :sse_customer_key_md5
|
779
|
-
# Specifies the 128-bit MD5 digest of the encryption
|
780
|
-
# RFC 1321. Amazon S3 uses this header for a message
|
781
|
-
# ensure the encryption key was transmitted
|
2060
|
+
# Specifies the 128-bit MD5 digest of the customer-provided encryption
|
2061
|
+
# key according to RFC 1321. Amazon S3 uses this header for a message
|
2062
|
+
# integrity check to ensure that the encryption key was transmitted
|
2063
|
+
# without error.
|
2064
|
+
#
|
2065
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
2066
|
+
#
|
2067
|
+
# </note>
|
782
2068
|
# @option options [String] :ssekms_key_id
|
783
|
-
# Specifies the
|
784
|
-
#
|
785
|
-
#
|
786
|
-
#
|
787
|
-
#
|
2069
|
+
# Specifies the ID (Key ID, Key ARN, or Key Alias) of the symmetric
|
2070
|
+
# encryption customer managed key to use for object encryption.
|
2071
|
+
#
|
2072
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
2073
|
+
#
|
2074
|
+
# </note>
|
788
2075
|
# @option options [String] :ssekms_encryption_context
|
789
|
-
# Specifies the
|
790
|
-
# The value of this header is a base64-encoded UTF-8
|
791
|
-
# with the encryption context key-value pairs.
|
2076
|
+
# Specifies the Amazon Web Services KMS Encryption Context to use for
|
2077
|
+
# object encryption. The value of this header is a base64-encoded UTF-8
|
2078
|
+
# string holding JSON with the encryption context key-value pairs.
|
2079
|
+
#
|
2080
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
2081
|
+
#
|
2082
|
+
# </note>
|
2083
|
+
# @option options [Boolean] :bucket_key_enabled
|
2084
|
+
# Specifies whether Amazon S3 should use an S3 Bucket Key for object
|
2085
|
+
# encryption with server-side encryption using Key Management Service
|
2086
|
+
# (KMS) keys (SSE-KMS). Setting this header to `true` causes Amazon S3
|
2087
|
+
# to use an S3 Bucket Key for object encryption with SSE-KMS.
|
2088
|
+
#
|
2089
|
+
# Specifying this header with an object action doesn’t affect
|
2090
|
+
# bucket-level settings for S3 Bucket Key.
|
2091
|
+
#
|
2092
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
2093
|
+
#
|
2094
|
+
# </note>
|
792
2095
|
# @option options [String] :request_payer
|
793
|
-
# Confirms that the requester knows that
|
794
|
-
#
|
795
|
-
# requests.
|
796
|
-
#
|
797
|
-
#
|
2096
|
+
# Confirms that the requester knows that they will be charged for the
|
2097
|
+
# request. Bucket owners need not specify this parameter in their
|
2098
|
+
# requests. If either the source or destination S3 bucket has Requester
|
2099
|
+
# Pays enabled, the requester will pay for corresponding charges to copy
|
2100
|
+
# the object. For information about downloading objects from Requester
|
2101
|
+
# Pays buckets, see [Downloading Objects in Requester Pays Buckets][1]
|
2102
|
+
# in the *Amazon S3 User Guide*.
|
2103
|
+
#
|
2104
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
2105
|
+
#
|
2106
|
+
# </note>
|
2107
|
+
#
|
2108
|
+
#
|
2109
|
+
#
|
2110
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
|
798
2111
|
# @option options [String] :tagging
|
799
2112
|
# The tag-set for the object. The tag-set must be encoded as URL Query
|
800
|
-
# parameters
|
2113
|
+
# parameters.
|
2114
|
+
#
|
2115
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
2116
|
+
#
|
2117
|
+
# </note>
|
801
2118
|
# @option options [String] :object_lock_mode
|
802
|
-
# Specifies the
|
2119
|
+
# Specifies the Object Lock mode that you want to apply to the uploaded
|
803
2120
|
# object.
|
2121
|
+
#
|
2122
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
2123
|
+
#
|
2124
|
+
# </note>
|
804
2125
|
# @option options [Time,DateTime,Date,Integer,String] :object_lock_retain_until_date
|
805
|
-
# Specifies the date and time when you want the
|
2126
|
+
# Specifies the date and time when you want the Object Lock to expire.
|
2127
|
+
#
|
2128
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
2129
|
+
#
|
2130
|
+
# </note>
|
806
2131
|
# @option options [String] :object_lock_legal_hold_status
|
807
|
-
# Specifies whether you want to apply a
|
2132
|
+
# Specifies whether you want to apply a legal hold to the uploaded
|
808
2133
|
# object.
|
2134
|
+
#
|
2135
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
2136
|
+
#
|
2137
|
+
# </note>
|
2138
|
+
# @option options [String] :expected_bucket_owner
|
2139
|
+
# The account ID of the expected bucket owner. If the account ID that
|
2140
|
+
# you provide does not match the actual owner of the bucket, the request
|
2141
|
+
# fails with the HTTP status code `403 Forbidden` (access denied).
|
2142
|
+
# @option options [String] :checksum_algorithm
|
2143
|
+
# Indicates the algorithm that you want Amazon S3 to use to create the
|
2144
|
+
# checksum for the object. For more information, see [Checking object
|
2145
|
+
# integrity][1] in the *Amazon S3 User Guide*.
|
2146
|
+
#
|
2147
|
+
#
|
2148
|
+
#
|
2149
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
|
809
2150
|
# @return [MultipartUpload]
|
810
2151
|
def initiate_multipart_upload(options = {})
|
811
2152
|
options = options.merge(
|
812
2153
|
bucket: @bucket_name,
|
813
2154
|
key: @key
|
814
2155
|
)
|
815
|
-
resp =
|
2156
|
+
resp = Aws::Plugins::UserAgent.feature('resource') do
|
2157
|
+
@client.create_multipart_upload(options)
|
2158
|
+
end
|
816
2159
|
MultipartUpload.new(
|
817
2160
|
bucket_name: @bucket_name,
|
818
2161
|
object_key: @key,
|
@@ -833,6 +2176,11 @@ module Aws::S3
|
|
833
2176
|
# content_length: 1,
|
834
2177
|
# content_md5: "ContentMD5",
|
835
2178
|
# content_type: "ContentType",
|
2179
|
+
# checksum_algorithm: "CRC32", # accepts CRC32, CRC32C, SHA1, SHA256
|
2180
|
+
# checksum_crc32: "ChecksumCRC32",
|
2181
|
+
# checksum_crc32c: "ChecksumCRC32C",
|
2182
|
+
# checksum_sha1: "ChecksumSHA1",
|
2183
|
+
# checksum_sha256: "ChecksumSHA256",
|
836
2184
|
# expires: Time.now,
|
837
2185
|
# grant_full_control: "GrantFullControl",
|
838
2186
|
# grant_read: "GrantRead",
|
@@ -841,111 +2189,444 @@ module Aws::S3
|
|
841
2189
|
# metadata: {
|
842
2190
|
# "MetadataKey" => "MetadataValue",
|
843
2191
|
# },
|
844
|
-
# server_side_encryption: "AES256", # accepts AES256, aws:kms
|
845
|
-
# storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER, DEEP_ARCHIVE
|
2192
|
+
# server_side_encryption: "AES256", # accepts AES256, aws:kms, aws:kms:dsse
|
2193
|
+
# storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER, DEEP_ARCHIVE, OUTPOSTS, GLACIER_IR, SNOW, EXPRESS_ONEZONE
|
846
2194
|
# website_redirect_location: "WebsiteRedirectLocation",
|
847
2195
|
# sse_customer_algorithm: "SSECustomerAlgorithm",
|
848
2196
|
# sse_customer_key: "SSECustomerKey",
|
849
2197
|
# sse_customer_key_md5: "SSECustomerKeyMD5",
|
850
2198
|
# ssekms_key_id: "SSEKMSKeyId",
|
851
2199
|
# ssekms_encryption_context: "SSEKMSEncryptionContext",
|
2200
|
+
# bucket_key_enabled: false,
|
852
2201
|
# request_payer: "requester", # accepts requester
|
853
2202
|
# tagging: "TaggingHeader",
|
854
2203
|
# object_lock_mode: "GOVERNANCE", # accepts GOVERNANCE, COMPLIANCE
|
855
2204
|
# object_lock_retain_until_date: Time.now,
|
856
2205
|
# object_lock_legal_hold_status: "ON", # accepts ON, OFF
|
2206
|
+
# expected_bucket_owner: "AccountId",
|
857
2207
|
# })
|
858
2208
|
# @param [Hash] options ({})
|
859
2209
|
# @option options [String] :acl
|
860
|
-
# The canned ACL to apply to the object.
|
861
|
-
#
|
2210
|
+
# The canned ACL to apply to the object. For more information, see
|
2211
|
+
# [Canned ACL][1] in the *Amazon S3 User Guide*.
|
2212
|
+
#
|
2213
|
+
# When adding a new object, you can use headers to grant ACL-based
|
2214
|
+
# permissions to individual Amazon Web Services accounts or to
|
2215
|
+
# predefined groups defined by Amazon S3. These permissions are then
|
2216
|
+
# added to the ACL on the object. By default, all objects are private.
|
2217
|
+
# Only the owner has full access control. For more information, see
|
2218
|
+
# [Access Control List (ACL) Overview][2] and [Managing ACLs Using the
|
2219
|
+
# REST API][3] in the *Amazon S3 User Guide*.
|
2220
|
+
#
|
2221
|
+
# If the bucket that you're uploading objects to uses the bucket owner
|
2222
|
+
# enforced setting for S3 Object Ownership, ACLs are disabled and no
|
2223
|
+
# longer affect permissions. Buckets that use this setting only accept
|
2224
|
+
# PUT requests that don't specify an ACL or PUT requests that specify
|
2225
|
+
# bucket owner full control ACLs, such as the
|
2226
|
+
# `bucket-owner-full-control` canned ACL or an equivalent form of this
|
2227
|
+
# ACL expressed in the XML format. PUT requests that contain other ACLs
|
2228
|
+
# (for example, custom grants to certain Amazon Web Services accounts)
|
2229
|
+
# fail and return a `400` error with the error code
|
2230
|
+
# `AccessControlListNotSupported`. For more information, see [
|
2231
|
+
# Controlling ownership of objects and disabling ACLs][4] in the *Amazon
|
2232
|
+
# S3 User Guide*.
|
2233
|
+
#
|
2234
|
+
# <note markdown="1"> * This functionality is not supported for directory buckets.
|
2235
|
+
#
|
2236
|
+
# * This functionality is not supported for Amazon S3 on Outposts.
|
2237
|
+
#
|
2238
|
+
# </note>
|
2239
|
+
#
|
2240
|
+
#
|
2241
|
+
#
|
2242
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#CannedACL
|
2243
|
+
# [2]: https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html
|
2244
|
+
# [3]: https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-using-rest-api.html
|
2245
|
+
# [4]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/about-object-ownership.html
|
2246
|
+
# @option options [String, StringIO, File] :body
|
862
2247
|
# Object data.
|
863
2248
|
# @option options [String] :cache_control
|
864
|
-
#
|
2249
|
+
# Can be used to specify caching behavior along the request/reply chain.
|
2250
|
+
# For more information, see
|
2251
|
+
# [http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9][1].
|
2252
|
+
#
|
2253
|
+
#
|
2254
|
+
#
|
2255
|
+
# [1]: http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9
|
865
2256
|
# @option options [String] :content_disposition
|
866
|
-
# Specifies presentational information for the object.
|
2257
|
+
# Specifies presentational information for the object. For more
|
2258
|
+
# information, see
|
2259
|
+
# [https://www.rfc-editor.org/rfc/rfc6266#section-4][1].
|
2260
|
+
#
|
2261
|
+
#
|
2262
|
+
#
|
2263
|
+
# [1]: https://www.rfc-editor.org/rfc/rfc6266#section-4
|
867
2264
|
# @option options [String] :content_encoding
|
868
2265
|
# Specifies what content encodings have been applied to the object and
|
869
2266
|
# thus what decoding mechanisms must be applied to obtain the media-type
|
870
|
-
# referenced by the Content-Type header field.
|
2267
|
+
# referenced by the Content-Type header field. For more information, see
|
2268
|
+
# [https://www.rfc-editor.org/rfc/rfc9110.html#field.content-encoding][1].
|
2269
|
+
#
|
2270
|
+
#
|
2271
|
+
#
|
2272
|
+
# [1]: https://www.rfc-editor.org/rfc/rfc9110.html#field.content-encoding
|
871
2273
|
# @option options [String] :content_language
|
872
2274
|
# The language the content is in.
|
873
2275
|
# @option options [Integer] :content_length
|
874
2276
|
# Size of the body in bytes. This parameter is useful when the size of
|
875
|
-
# the body cannot be determined automatically.
|
2277
|
+
# the body cannot be determined automatically. For more information, see
|
2278
|
+
# [https://www.rfc-editor.org/rfc/rfc9110.html#name-content-length][1].
|
2279
|
+
#
|
2280
|
+
#
|
2281
|
+
#
|
2282
|
+
# [1]: https://www.rfc-editor.org/rfc/rfc9110.html#name-content-length
|
876
2283
|
# @option options [String] :content_md5
|
877
|
-
# The base64-encoded 128-bit MD5 digest of the
|
878
|
-
#
|
879
|
-
#
|
2284
|
+
# The base64-encoded 128-bit MD5 digest of the message (without the
|
2285
|
+
# headers) according to RFC 1864. This header can be used as a message
|
2286
|
+
# integrity check to verify that the data is the same data that was
|
2287
|
+
# originally sent. Although it is optional, we recommend using the
|
2288
|
+
# Content-MD5 mechanism as an end-to-end integrity check. For more
|
2289
|
+
# information about REST request authentication, see [REST
|
2290
|
+
# Authentication][1].
|
2291
|
+
#
|
2292
|
+
# <note markdown="1"> The `Content-MD5` header is required for any request to upload an
|
2293
|
+
# object with a retention period configured using Amazon S3 Object Lock.
|
2294
|
+
# For more information about Amazon S3 Object Lock, see [Amazon S3
|
2295
|
+
# Object Lock Overview][2] in the *Amazon S3 User Guide*.
|
2296
|
+
#
|
2297
|
+
# </note>
|
2298
|
+
#
|
2299
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
2300
|
+
#
|
2301
|
+
# </note>
|
2302
|
+
#
|
2303
|
+
#
|
2304
|
+
#
|
2305
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/RESTAuthentication.html
|
2306
|
+
# [2]: https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock-overview.html
|
880
2307
|
# @option options [String] :content_type
|
881
|
-
# A standard MIME type describing the format of the
|
2308
|
+
# A standard MIME type describing the format of the contents. For more
|
2309
|
+
# information, see
|
2310
|
+
# [https://www.rfc-editor.org/rfc/rfc9110.html#name-content-type][1].
|
2311
|
+
#
|
2312
|
+
#
|
2313
|
+
#
|
2314
|
+
# [1]: https://www.rfc-editor.org/rfc/rfc9110.html#name-content-type
|
2315
|
+
# @option options [String] :checksum_algorithm
|
2316
|
+
# Indicates the algorithm used to create the checksum for the object
|
2317
|
+
# when you use the SDK. This header will not provide any additional
|
2318
|
+
# functionality if you don't use the SDK. When you send this header,
|
2319
|
+
# there must be a corresponding `x-amz-checksum-algorithm ` or
|
2320
|
+
# `x-amz-trailer` header sent. Otherwise, Amazon S3 fails the request
|
2321
|
+
# with the HTTP status code `400 Bad Request`.
|
2322
|
+
#
|
2323
|
+
# For the `x-amz-checksum-algorithm ` header, replace ` algorithm ` with
|
2324
|
+
# the supported algorithm from the following list:
|
2325
|
+
#
|
2326
|
+
# * CRC32
|
2327
|
+
#
|
2328
|
+
# * CRC32C
|
2329
|
+
#
|
2330
|
+
# * SHA1
|
2331
|
+
#
|
2332
|
+
# * SHA256
|
2333
|
+
#
|
2334
|
+
# For more information, see [Checking object integrity][1] in the
|
2335
|
+
# *Amazon S3 User Guide*.
|
2336
|
+
#
|
2337
|
+
# If the individual checksum value you provide through
|
2338
|
+
# `x-amz-checksum-algorithm ` doesn't match the checksum algorithm you
|
2339
|
+
# set through `x-amz-sdk-checksum-algorithm`, Amazon S3 ignores any
|
2340
|
+
# provided `ChecksumAlgorithm` parameter and uses the checksum algorithm
|
2341
|
+
# that matches the provided value in `x-amz-checksum-algorithm `.
|
2342
|
+
#
|
2343
|
+
# <note markdown="1"> For directory buckets, when you use Amazon Web Services SDKs, `CRC32`
|
2344
|
+
# is the default checksum algorithm that's used for performance.
|
2345
|
+
#
|
2346
|
+
# </note>
|
2347
|
+
#
|
2348
|
+
#
|
2349
|
+
#
|
2350
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
|
2351
|
+
# @option options [String] :checksum_crc32
|
2352
|
+
# This header can be used as a data integrity check to verify that the
|
2353
|
+
# data received is the same data that was originally sent. This header
|
2354
|
+
# specifies the base64-encoded, 32-bit CRC32 checksum of the object. For
|
2355
|
+
# more information, see [Checking object integrity][1] in the *Amazon S3
|
2356
|
+
# User Guide*.
|
2357
|
+
#
|
2358
|
+
#
|
2359
|
+
#
|
2360
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
|
2361
|
+
# @option options [String] :checksum_crc32c
|
2362
|
+
# This header can be used as a data integrity check to verify that the
|
2363
|
+
# data received is the same data that was originally sent. This header
|
2364
|
+
# specifies the base64-encoded, 32-bit CRC32C checksum of the object.
|
2365
|
+
# For more information, see [Checking object integrity][1] in the
|
2366
|
+
# *Amazon S3 User Guide*.
|
2367
|
+
#
|
2368
|
+
#
|
2369
|
+
#
|
2370
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
|
2371
|
+
# @option options [String] :checksum_sha1
|
2372
|
+
# This header can be used as a data integrity check to verify that the
|
2373
|
+
# data received is the same data that was originally sent. This header
|
2374
|
+
# specifies the base64-encoded, 160-bit SHA-1 digest of the object. For
|
2375
|
+
# more information, see [Checking object integrity][1] in the *Amazon S3
|
2376
|
+
# User Guide*.
|
2377
|
+
#
|
2378
|
+
#
|
2379
|
+
#
|
2380
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
|
2381
|
+
# @option options [String] :checksum_sha256
|
2382
|
+
# This header can be used as a data integrity check to verify that the
|
2383
|
+
# data received is the same data that was originally sent. This header
|
2384
|
+
# specifies the base64-encoded, 256-bit SHA-256 digest of the object.
|
2385
|
+
# For more information, see [Checking object integrity][1] in the
|
2386
|
+
# *Amazon S3 User Guide*.
|
2387
|
+
#
|
2388
|
+
#
|
2389
|
+
#
|
2390
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
|
882
2391
|
# @option options [Time,DateTime,Date,Integer,String] :expires
|
883
|
-
# The date and time at which the object is no longer cacheable.
|
2392
|
+
# The date and time at which the object is no longer cacheable. For more
|
2393
|
+
# information, see
|
2394
|
+
# [https://www.rfc-editor.org/rfc/rfc7234#section-5.3][1].
|
2395
|
+
#
|
2396
|
+
#
|
2397
|
+
#
|
2398
|
+
# [1]: https://www.rfc-editor.org/rfc/rfc7234#section-5.3
|
884
2399
|
# @option options [String] :grant_full_control
|
885
2400
|
# Gives the grantee READ, READ\_ACP, and WRITE\_ACP permissions on the
|
886
2401
|
# object.
|
2402
|
+
#
|
2403
|
+
# <note markdown="1"> * This functionality is not supported for directory buckets.
|
2404
|
+
#
|
2405
|
+
# * This functionality is not supported for Amazon S3 on Outposts.
|
2406
|
+
#
|
2407
|
+
# </note>
|
887
2408
|
# @option options [String] :grant_read
|
888
2409
|
# Allows grantee to read the object data and its metadata.
|
2410
|
+
#
|
2411
|
+
# <note markdown="1"> * This functionality is not supported for directory buckets.
|
2412
|
+
#
|
2413
|
+
# * This functionality is not supported for Amazon S3 on Outposts.
|
2414
|
+
#
|
2415
|
+
# </note>
|
889
2416
|
# @option options [String] :grant_read_acp
|
890
2417
|
# Allows grantee to read the object ACL.
|
2418
|
+
#
|
2419
|
+
# <note markdown="1"> * This functionality is not supported for directory buckets.
|
2420
|
+
#
|
2421
|
+
# * This functionality is not supported for Amazon S3 on Outposts.
|
2422
|
+
#
|
2423
|
+
# </note>
|
891
2424
|
# @option options [String] :grant_write_acp
|
892
2425
|
# Allows grantee to write the ACL for the applicable object.
|
2426
|
+
#
|
2427
|
+
# <note markdown="1"> * This functionality is not supported for directory buckets.
|
2428
|
+
#
|
2429
|
+
# * This functionality is not supported for Amazon S3 on Outposts.
|
2430
|
+
#
|
2431
|
+
# </note>
|
893
2432
|
# @option options [Hash<String,String>] :metadata
|
894
2433
|
# A map of metadata to store with the object in S3.
|
895
2434
|
# @option options [String] :server_side_encryption
|
896
|
-
# The
|
897
|
-
# S3 (
|
2435
|
+
# The server-side encryption algorithm that was used when you store this
|
2436
|
+
# object in Amazon S3 (for example, `AES256`, `aws:kms`,
|
2437
|
+
# `aws:kms:dsse`).
|
2438
|
+
#
|
2439
|
+
# <b>General purpose buckets </b> - You have four mutually exclusive
|
2440
|
+
# options to protect data using server-side encryption in Amazon S3,
|
2441
|
+
# depending on how you choose to manage the encryption keys.
|
2442
|
+
# Specifically, the encryption key options are Amazon S3 managed keys
|
2443
|
+
# (SSE-S3), Amazon Web Services KMS keys (SSE-KMS or DSSE-KMS), and
|
2444
|
+
# customer-provided keys (SSE-C). Amazon S3 encrypts data with
|
2445
|
+
# server-side encryption by using Amazon S3 managed keys (SSE-S3) by
|
2446
|
+
# default. You can optionally tell Amazon S3 to encrypt data at rest by
|
2447
|
+
# using server-side encryption with other key options. For more
|
2448
|
+
# information, see [Using Server-Side Encryption][1] in the *Amazon S3
|
2449
|
+
# User Guide*.
|
2450
|
+
#
|
2451
|
+
# <b>Directory buckets </b> - For directory buckets, only the
|
2452
|
+
# server-side encryption with Amazon S3 managed keys (SSE-S3) (`AES256`)
|
2453
|
+
# value is supported.
|
2454
|
+
#
|
2455
|
+
#
|
2456
|
+
#
|
2457
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingServerSideEncryption.html
|
898
2458
|
# @option options [String] :storage_class
|
899
|
-
#
|
2459
|
+
# By default, Amazon S3 uses the STANDARD Storage Class to store newly
|
2460
|
+
# created objects. The STANDARD storage class provides high durability
|
2461
|
+
# and high availability. Depending on performance needs, you can specify
|
2462
|
+
# a different Storage Class. For more information, see [Storage
|
2463
|
+
# Classes][1] in the *Amazon S3 User Guide*.
|
2464
|
+
#
|
2465
|
+
# <note markdown="1"> * For directory buckets, only the S3 Express One Zone storage class is
|
2466
|
+
# supported to store newly created objects.
|
2467
|
+
#
|
2468
|
+
# * Amazon S3 on Outposts only uses the OUTPOSTS Storage Class.
|
2469
|
+
#
|
2470
|
+
# </note>
|
2471
|
+
#
|
2472
|
+
#
|
2473
|
+
#
|
2474
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html
|
900
2475
|
# @option options [String] :website_redirect_location
|
901
2476
|
# If the bucket is configured as a website, redirects requests for this
|
902
2477
|
# object to another object in the same bucket or to an external URL.
|
903
|
-
# Amazon S3 stores the value of this header in the object metadata.
|
2478
|
+
# Amazon S3 stores the value of this header in the object metadata. For
|
2479
|
+
# information about object metadata, see [Object Key and Metadata][1] in
|
2480
|
+
# the *Amazon S3 User Guide*.
|
2481
|
+
#
|
2482
|
+
# In the following example, the request header sets the redirect to an
|
2483
|
+
# object (anotherPage.html) in the same bucket:
|
2484
|
+
#
|
2485
|
+
# `x-amz-website-redirect-location: /anotherPage.html`
|
2486
|
+
#
|
2487
|
+
# In the following example, the request header sets the object redirect
|
2488
|
+
# to another website:
|
2489
|
+
#
|
2490
|
+
# `x-amz-website-redirect-location: http://www.example.com/`
|
2491
|
+
#
|
2492
|
+
# For more information about website hosting in Amazon S3, see [Hosting
|
2493
|
+
# Websites on Amazon S3][2] and [How to Configure Website Page
|
2494
|
+
# Redirects][3] in the *Amazon S3 User Guide*.
|
2495
|
+
#
|
2496
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
2497
|
+
#
|
2498
|
+
# </note>
|
2499
|
+
#
|
2500
|
+
#
|
2501
|
+
#
|
2502
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingMetadata.html
|
2503
|
+
# [2]: https://docs.aws.amazon.com/AmazonS3/latest/dev/WebsiteHosting.html
|
2504
|
+
# [3]: https://docs.aws.amazon.com/AmazonS3/latest/dev/how-to-page-redirect.html
|
904
2505
|
# @option options [String] :sse_customer_algorithm
|
905
|
-
# Specifies the algorithm to use
|
906
|
-
# AES256).
|
2506
|
+
# Specifies the algorithm to use when encrypting the object (for
|
2507
|
+
# example, `AES256`).
|
2508
|
+
#
|
2509
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
2510
|
+
#
|
2511
|
+
# </note>
|
907
2512
|
# @option options [String] :sse_customer_key
|
908
2513
|
# Specifies the customer-provided encryption key for Amazon S3 to use in
|
909
2514
|
# encrypting data. This value is used to store the object and then it is
|
910
|
-
# discarded; Amazon does not store the encryption key. The key must
|
911
|
-
# appropriate for use with the algorithm specified in the
|
912
|
-
# x-amz-server-side
|
2515
|
+
# discarded; Amazon S3 does not store the encryption key. The key must
|
2516
|
+
# be appropriate for use with the algorithm specified in the
|
2517
|
+
# `x-amz-server-side-encryption-customer-algorithm` header.
|
2518
|
+
#
|
2519
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
2520
|
+
#
|
2521
|
+
# </note>
|
913
2522
|
# @option options [String] :sse_customer_key_md5
|
914
2523
|
# Specifies the 128-bit MD5 digest of the encryption key according to
|
915
2524
|
# RFC 1321. Amazon S3 uses this header for a message integrity check to
|
916
|
-
# ensure the encryption key was transmitted without error.
|
2525
|
+
# ensure that the encryption key was transmitted without error.
|
2526
|
+
#
|
2527
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
2528
|
+
#
|
2529
|
+
# </note>
|
917
2530
|
# @option options [String] :ssekms_key_id
|
918
|
-
#
|
919
|
-
#
|
920
|
-
#
|
921
|
-
#
|
922
|
-
#
|
2531
|
+
# If `x-amz-server-side-encryption` has a valid value of `aws:kms` or
|
2532
|
+
# `aws:kms:dsse`, this header specifies the ID (Key ID, Key ARN, or Key
|
2533
|
+
# Alias) of the Key Management Service (KMS) symmetric encryption
|
2534
|
+
# customer managed key that was used for the object. If you specify
|
2535
|
+
# `x-amz-server-side-encryption:aws:kms` or
|
2536
|
+
# `x-amz-server-side-encryption:aws:kms:dsse`, but do not provide`
|
2537
|
+
# x-amz-server-side-encryption-aws-kms-key-id`, Amazon S3 uses the
|
2538
|
+
# Amazon Web Services managed key (`aws/s3`) to protect the data. If the
|
2539
|
+
# KMS key does not exist in the same account that's issuing the
|
2540
|
+
# command, you must use the full ARN and not just the ID.
|
2541
|
+
#
|
2542
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
2543
|
+
#
|
2544
|
+
# </note>
|
923
2545
|
# @option options [String] :ssekms_encryption_context
|
924
|
-
# Specifies the
|
925
|
-
# The value of this header is a base64-encoded UTF-8
|
926
|
-
# with the encryption context key-value pairs.
|
2546
|
+
# Specifies the Amazon Web Services KMS Encryption Context to use for
|
2547
|
+
# object encryption. The value of this header is a base64-encoded UTF-8
|
2548
|
+
# string holding JSON with the encryption context key-value pairs. This
|
2549
|
+
# value is stored as object metadata and automatically gets passed on to
|
2550
|
+
# Amazon Web Services KMS for future `GetObject` or `CopyObject`
|
2551
|
+
# operations on this object. This value must be explicitly added during
|
2552
|
+
# `CopyObject` operations.
|
2553
|
+
#
|
2554
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
2555
|
+
#
|
2556
|
+
# </note>
|
2557
|
+
# @option options [Boolean] :bucket_key_enabled
|
2558
|
+
# Specifies whether Amazon S3 should use an S3 Bucket Key for object
|
2559
|
+
# encryption with server-side encryption using Key Management Service
|
2560
|
+
# (KMS) keys (SSE-KMS). Setting this header to `true` causes Amazon S3
|
2561
|
+
# to use an S3 Bucket Key for object encryption with SSE-KMS.
|
2562
|
+
#
|
2563
|
+
# Specifying this header with a PUT action doesn’t affect bucket-level
|
2564
|
+
# settings for S3 Bucket Key.
|
2565
|
+
#
|
2566
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
2567
|
+
#
|
2568
|
+
# </note>
|
927
2569
|
# @option options [String] :request_payer
|
928
|
-
# Confirms that the requester knows that
|
929
|
-
#
|
930
|
-
# requests.
|
931
|
-
#
|
932
|
-
#
|
2570
|
+
# Confirms that the requester knows that they will be charged for the
|
2571
|
+
# request. Bucket owners need not specify this parameter in their
|
2572
|
+
# requests. If either the source or destination S3 bucket has Requester
|
2573
|
+
# Pays enabled, the requester will pay for corresponding charges to copy
|
2574
|
+
# the object. For information about downloading objects from Requester
|
2575
|
+
# Pays buckets, see [Downloading Objects in Requester Pays Buckets][1]
|
2576
|
+
# in the *Amazon S3 User Guide*.
|
2577
|
+
#
|
2578
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
2579
|
+
#
|
2580
|
+
# </note>
|
2581
|
+
#
|
2582
|
+
#
|
2583
|
+
#
|
2584
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
|
933
2585
|
# @option options [String] :tagging
|
934
2586
|
# The tag-set for the object. The tag-set must be encoded as URL Query
|
935
2587
|
# parameters. (For example, "Key1=Value1")
|
2588
|
+
#
|
2589
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
2590
|
+
#
|
2591
|
+
# </note>
|
936
2592
|
# @option options [String] :object_lock_mode
|
937
|
-
# The
|
2593
|
+
# The Object Lock mode that you want to apply to this object.
|
2594
|
+
#
|
2595
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
2596
|
+
#
|
2597
|
+
# </note>
|
938
2598
|
# @option options [Time,DateTime,Date,Integer,String] :object_lock_retain_until_date
|
939
|
-
# The date and time when you want this object's
|
2599
|
+
# The date and time when you want this object's Object Lock to expire.
|
2600
|
+
# Must be formatted as a timestamp parameter.
|
2601
|
+
#
|
2602
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
2603
|
+
#
|
2604
|
+
# </note>
|
940
2605
|
# @option options [String] :object_lock_legal_hold_status
|
941
|
-
#
|
2606
|
+
# Specifies whether a legal hold will be applied to this object. For
|
2607
|
+
# more information about S3 Object Lock, see [Object Lock][1] in the
|
2608
|
+
# *Amazon S3 User Guide*.
|
2609
|
+
#
|
2610
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
2611
|
+
#
|
2612
|
+
# </note>
|
2613
|
+
#
|
2614
|
+
#
|
2615
|
+
#
|
2616
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock.html
|
2617
|
+
# @option options [String] :expected_bucket_owner
|
2618
|
+
# The account ID of the expected bucket owner. If the account ID that
|
2619
|
+
# you provide does not match the actual owner of the bucket, the request
|
2620
|
+
# fails with the HTTP status code `403 Forbidden` (access denied).
|
942
2621
|
# @return [Types::PutObjectOutput]
|
943
2622
|
def put(options = {})
|
944
2623
|
options = options.merge(
|
945
2624
|
bucket: @bucket_name,
|
946
2625
|
key: @key
|
947
2626
|
)
|
948
|
-
resp =
|
2627
|
+
resp = Aws::Plugins::UserAgent.feature('resource') do
|
2628
|
+
@client.put_object(options)
|
2629
|
+
end
|
949
2630
|
resp.data
|
950
2631
|
end
|
951
2632
|
|
@@ -999,7 +2680,7 @@ module Aws::S3
|
|
999
2680
|
# bucket_name: "BucketName", # required
|
1000
2681
|
# prefix: "LocationPrefix", # required
|
1001
2682
|
# encryption: {
|
1002
|
-
# encryption_type: "AES256", # required, accepts AES256, aws:kms
|
2683
|
+
# encryption_type: "AES256", # required, accepts AES256, aws:kms, aws:kms:dsse
|
1003
2684
|
# kms_key_id: "SSEKMSKeyId",
|
1004
2685
|
# kms_context: "KMSContext",
|
1005
2686
|
# },
|
@@ -1030,28 +2711,234 @@ module Aws::S3
|
|
1030
2711
|
# value: "MetadataValue",
|
1031
2712
|
# },
|
1032
2713
|
# ],
|
1033
|
-
# storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER, DEEP_ARCHIVE
|
2714
|
+
# storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER, DEEP_ARCHIVE, OUTPOSTS, GLACIER_IR, SNOW, EXPRESS_ONEZONE
|
1034
2715
|
# },
|
1035
2716
|
# },
|
1036
2717
|
# },
|
1037
2718
|
# request_payer: "requester", # accepts requester
|
2719
|
+
# checksum_algorithm: "CRC32", # accepts CRC32, CRC32C, SHA1, SHA256
|
2720
|
+
# expected_bucket_owner: "AccountId",
|
1038
2721
|
# })
|
1039
2722
|
# @param [Hash] options ({})
|
1040
2723
|
# @option options [String] :version_id
|
2724
|
+
# VersionId used to reference a specific version of the object.
|
1041
2725
|
# @option options [Types::RestoreRequest] :restore_request
|
2726
|
+
# Container for restore job parameters.
|
1042
2727
|
# @option options [String] :request_payer
|
1043
|
-
# Confirms that the requester knows that
|
1044
|
-
#
|
1045
|
-
# requests.
|
1046
|
-
#
|
1047
|
-
#
|
2728
|
+
# Confirms that the requester knows that they will be charged for the
|
2729
|
+
# request. Bucket owners need not specify this parameter in their
|
2730
|
+
# requests. If either the source or destination S3 bucket has Requester
|
2731
|
+
# Pays enabled, the requester will pay for corresponding charges to copy
|
2732
|
+
# the object. For information about downloading objects from Requester
|
2733
|
+
# Pays buckets, see [Downloading Objects in Requester Pays Buckets][1]
|
2734
|
+
# in the *Amazon S3 User Guide*.
|
2735
|
+
#
|
2736
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
2737
|
+
#
|
2738
|
+
# </note>
|
2739
|
+
#
|
2740
|
+
#
|
2741
|
+
#
|
2742
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
|
2743
|
+
# @option options [String] :checksum_algorithm
|
2744
|
+
# Indicates the algorithm used to create the checksum for the object
|
2745
|
+
# when you use the SDK. This header will not provide any additional
|
2746
|
+
# functionality if you don't use the SDK. When you send this header,
|
2747
|
+
# there must be a corresponding `x-amz-checksum` or `x-amz-trailer`
|
2748
|
+
# header sent. Otherwise, Amazon S3 fails the request with the HTTP
|
2749
|
+
# status code `400 Bad Request`. For more information, see [Checking
|
2750
|
+
# object integrity][1] in the *Amazon S3 User Guide*.
|
2751
|
+
#
|
2752
|
+
# If you provide an individual checksum, Amazon S3 ignores any provided
|
2753
|
+
# `ChecksumAlgorithm` parameter.
|
2754
|
+
#
|
2755
|
+
#
|
2756
|
+
#
|
2757
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
|
2758
|
+
# @option options [String] :expected_bucket_owner
|
2759
|
+
# The account ID of the expected bucket owner. If the account ID that
|
2760
|
+
# you provide does not match the actual owner of the bucket, the request
|
2761
|
+
# fails with the HTTP status code `403 Forbidden` (access denied).
|
1048
2762
|
# @return [Types::RestoreObjectOutput]
|
1049
2763
|
def restore_object(options = {})
|
1050
2764
|
options = options.merge(
|
1051
2765
|
bucket: @bucket_name,
|
1052
2766
|
key: @key
|
1053
2767
|
)
|
1054
|
-
resp =
|
2768
|
+
resp = Aws::Plugins::UserAgent.feature('resource') do
|
2769
|
+
@client.restore_object(options)
|
2770
|
+
end
|
2771
|
+
resp.data
|
2772
|
+
end
|
2773
|
+
|
2774
|
+
# @example Request syntax with placeholder values
|
2775
|
+
#
|
2776
|
+
# object.head({
|
2777
|
+
# if_match: "IfMatch",
|
2778
|
+
# if_modified_since: Time.now,
|
2779
|
+
# if_none_match: "IfNoneMatch",
|
2780
|
+
# if_unmodified_since: Time.now,
|
2781
|
+
# range: "Range",
|
2782
|
+
# version_id: "ObjectVersionId",
|
2783
|
+
# sse_customer_algorithm: "SSECustomerAlgorithm",
|
2784
|
+
# sse_customer_key: "SSECustomerKey",
|
2785
|
+
# sse_customer_key_md5: "SSECustomerKeyMD5",
|
2786
|
+
# request_payer: "requester", # accepts requester
|
2787
|
+
# part_number: 1,
|
2788
|
+
# expected_bucket_owner: "AccountId",
|
2789
|
+
# checksum_mode: "ENABLED", # accepts ENABLED
|
2790
|
+
# })
|
2791
|
+
# @param [Hash] options ({})
|
2792
|
+
# @option options [String] :if_match
|
2793
|
+
# Return the object only if its entity tag (ETag) is the same as the one
|
2794
|
+
# specified; otherwise, return a 412 (precondition failed) error.
|
2795
|
+
#
|
2796
|
+
# If both of the `If-Match` and `If-Unmodified-Since` headers are
|
2797
|
+
# present in the request as follows:
|
2798
|
+
#
|
2799
|
+
# * `If-Match` condition evaluates to `true`, and;
|
2800
|
+
#
|
2801
|
+
# * `If-Unmodified-Since` condition evaluates to `false`;
|
2802
|
+
#
|
2803
|
+
# Then Amazon S3 returns `200 OK` and the data requested.
|
2804
|
+
#
|
2805
|
+
# For more information about conditional requests, see [RFC 7232][1].
|
2806
|
+
#
|
2807
|
+
#
|
2808
|
+
#
|
2809
|
+
# [1]: https://tools.ietf.org/html/rfc7232
|
2810
|
+
# @option options [Time,DateTime,Date,Integer,String] :if_modified_since
|
2811
|
+
# Return the object only if it has been modified since the specified
|
2812
|
+
# time; otherwise, return a 304 (not modified) error.
|
2813
|
+
#
|
2814
|
+
# If both of the `If-None-Match` and `If-Modified-Since` headers are
|
2815
|
+
# present in the request as follows:
|
2816
|
+
#
|
2817
|
+
# * `If-None-Match` condition evaluates to `false`, and;
|
2818
|
+
#
|
2819
|
+
# * `If-Modified-Since` condition evaluates to `true`;
|
2820
|
+
#
|
2821
|
+
# Then Amazon S3 returns the `304 Not Modified` response code.
|
2822
|
+
#
|
2823
|
+
# For more information about conditional requests, see [RFC 7232][1].
|
2824
|
+
#
|
2825
|
+
#
|
2826
|
+
#
|
2827
|
+
# [1]: https://tools.ietf.org/html/rfc7232
|
2828
|
+
# @option options [String] :if_none_match
|
2829
|
+
# Return the object only if its entity tag (ETag) is different from the
|
2830
|
+
# one specified; otherwise, return a 304 (not modified) error.
|
2831
|
+
#
|
2832
|
+
# If both of the `If-None-Match` and `If-Modified-Since` headers are
|
2833
|
+
# present in the request as follows:
|
2834
|
+
#
|
2835
|
+
# * `If-None-Match` condition evaluates to `false`, and;
|
2836
|
+
#
|
2837
|
+
# * `If-Modified-Since` condition evaluates to `true`;
|
2838
|
+
#
|
2839
|
+
# Then Amazon S3 returns the `304 Not Modified` response code.
|
2840
|
+
#
|
2841
|
+
# For more information about conditional requests, see [RFC 7232][1].
|
2842
|
+
#
|
2843
|
+
#
|
2844
|
+
#
|
2845
|
+
# [1]: https://tools.ietf.org/html/rfc7232
|
2846
|
+
# @option options [Time,DateTime,Date,Integer,String] :if_unmodified_since
|
2847
|
+
# Return the object only if it has not been modified since the specified
|
2848
|
+
# time; otherwise, return a 412 (precondition failed) error.
|
2849
|
+
#
|
2850
|
+
# If both of the `If-Match` and `If-Unmodified-Since` headers are
|
2851
|
+
# present in the request as follows:
|
2852
|
+
#
|
2853
|
+
# * `If-Match` condition evaluates to `true`, and;
|
2854
|
+
#
|
2855
|
+
# * `If-Unmodified-Since` condition evaluates to `false`;
|
2856
|
+
#
|
2857
|
+
# Then Amazon S3 returns `200 OK` and the data requested.
|
2858
|
+
#
|
2859
|
+
# For more information about conditional requests, see [RFC 7232][1].
|
2860
|
+
#
|
2861
|
+
#
|
2862
|
+
#
|
2863
|
+
# [1]: https://tools.ietf.org/html/rfc7232
|
2864
|
+
# @option options [String] :range
|
2865
|
+
# HeadObject returns only the metadata for an object. If the Range is
|
2866
|
+
# satisfiable, only the `ContentLength` is affected in the response. If
|
2867
|
+
# the Range is not satisfiable, S3 returns a `416 - Requested Range Not
|
2868
|
+
# Satisfiable` error.
|
2869
|
+
# @option options [String] :version_id
|
2870
|
+
# Version ID used to reference a specific version of the object.
|
2871
|
+
#
|
2872
|
+
# <note markdown="1"> For directory buckets in this API operation, only the `null` value of
|
2873
|
+
# the version ID is supported.
|
2874
|
+
#
|
2875
|
+
# </note>
|
2876
|
+
# @option options [String] :sse_customer_algorithm
|
2877
|
+
# Specifies the algorithm to use when encrypting the object (for
|
2878
|
+
# example, AES256).
|
2879
|
+
#
|
2880
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
2881
|
+
#
|
2882
|
+
# </note>
|
2883
|
+
# @option options [String] :sse_customer_key
|
2884
|
+
# Specifies the customer-provided encryption key for Amazon S3 to use in
|
2885
|
+
# encrypting data. This value is used to store the object and then it is
|
2886
|
+
# discarded; Amazon S3 does not store the encryption key. The key must
|
2887
|
+
# be appropriate for use with the algorithm specified in the
|
2888
|
+
# `x-amz-server-side-encryption-customer-algorithm` header.
|
2889
|
+
#
|
2890
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
2891
|
+
#
|
2892
|
+
# </note>
|
2893
|
+
# @option options [String] :sse_customer_key_md5
|
2894
|
+
# Specifies the 128-bit MD5 digest of the encryption key according to
|
2895
|
+
# RFC 1321. Amazon S3 uses this header for a message integrity check to
|
2896
|
+
# ensure that the encryption key was transmitted without error.
|
2897
|
+
#
|
2898
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
2899
|
+
#
|
2900
|
+
# </note>
|
2901
|
+
# @option options [String] :request_payer
|
2902
|
+
# Confirms that the requester knows that they will be charged for the
|
2903
|
+
# request. Bucket owners need not specify this parameter in their
|
2904
|
+
# requests. If either the source or destination S3 bucket has Requester
|
2905
|
+
# Pays enabled, the requester will pay for corresponding charges to copy
|
2906
|
+
# the object. For information about downloading objects from Requester
|
2907
|
+
# Pays buckets, see [Downloading Objects in Requester Pays Buckets][1]
|
2908
|
+
# in the *Amazon S3 User Guide*.
|
2909
|
+
#
|
2910
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
2911
|
+
#
|
2912
|
+
# </note>
|
2913
|
+
#
|
2914
|
+
#
|
2915
|
+
#
|
2916
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
|
2917
|
+
# @option options [Integer] :part_number
|
2918
|
+
# Part number of the object being read. This is a positive integer
|
2919
|
+
# between 1 and 10,000. Effectively performs a 'ranged' HEAD request
|
2920
|
+
# for the part specified. Useful querying about the size of the part and
|
2921
|
+
# the number of parts in this object.
|
2922
|
+
# @option options [String] :expected_bucket_owner
|
2923
|
+
# The account ID of the expected bucket owner. If the account ID that
|
2924
|
+
# you provide does not match the actual owner of the bucket, the request
|
2925
|
+
# fails with the HTTP status code `403 Forbidden` (access denied).
|
2926
|
+
# @option options [String] :checksum_mode
|
2927
|
+
# To retrieve the checksum, this parameter must be enabled.
|
2928
|
+
#
|
2929
|
+
# In addition, if you enable `ChecksumMode` and the object is encrypted
|
2930
|
+
# with Amazon Web Services Key Management Service (Amazon Web Services
|
2931
|
+
# KMS), you must have permission to use the `kms:Decrypt` action for the
|
2932
|
+
# request to succeed.
|
2933
|
+
# @return [Types::HeadObjectOutput]
|
2934
|
+
def head(options = {})
|
2935
|
+
options = options.merge(
|
2936
|
+
bucket: @bucket_name,
|
2937
|
+
key: @key
|
2938
|
+
)
|
2939
|
+
resp = Aws::Plugins::UserAgent.feature('resource') do
|
2940
|
+
@client.head_object(options)
|
2941
|
+
end
|
1055
2942
|
resp.data
|
1056
2943
|
end
|
1057
2944
|
|
@@ -1132,8 +3019,8 @@ module Aws::S3
|
|
1132
3019
|
|
1133
3020
|
def yield_waiter_and_warn(waiter, &block)
|
1134
3021
|
if !@waiter_block_warned
|
1135
|
-
msg = "pass options to configure the waiter; "
|
1136
|
-
|
3022
|
+
msg = "pass options to configure the waiter; "\
|
3023
|
+
"yielding the waiter is deprecated"
|
1137
3024
|
warn(msg)
|
1138
3025
|
@waiter_block_warned = true
|
1139
3026
|
end
|
@@ -1141,7 +3028,9 @@ module Aws::S3
|
|
1141
3028
|
end
|
1142
3029
|
|
1143
3030
|
def separate_params_and_options(options)
|
1144
|
-
opts = Set.new(
|
3031
|
+
opts = Set.new(
|
3032
|
+
[:client, :max_attempts, :delay, :before_attempt, :before_wait]
|
3033
|
+
)
|
1145
3034
|
waiter_opts = {}
|
1146
3035
|
waiter_params = {}
|
1147
3036
|
options.each_pair do |key, value|
|
@@ -1165,21 +3054,94 @@ module Aws::S3
|
|
1165
3054
|
# mfa: "MFA",
|
1166
3055
|
# request_payer: "requester", # accepts requester
|
1167
3056
|
# bypass_governance_retention: false,
|
3057
|
+
# expected_bucket_owner: "AccountId",
|
3058
|
+
# checksum_algorithm: "CRC32", # accepts CRC32, CRC32C, SHA1, SHA256
|
1168
3059
|
# })
|
1169
3060
|
# @param options ({})
|
1170
3061
|
# @option options [String] :mfa
|
1171
3062
|
# The concatenation of the authentication device's serial number, a
|
1172
3063
|
# space, and the value that is displayed on your authentication device.
|
3064
|
+
# Required to permanently delete a versioned object if versioning is
|
3065
|
+
# configured with MFA delete enabled.
|
3066
|
+
#
|
3067
|
+
# When performing the `DeleteObjects` operation on an MFA delete enabled
|
3068
|
+
# bucket, which attempts to delete the specified versioned objects, you
|
3069
|
+
# must include an MFA token. If you don't provide an MFA token, the
|
3070
|
+
# entire request will fail, even if there are non-versioned objects that
|
3071
|
+
# you are trying to delete. If you provide an invalid token, whether
|
3072
|
+
# there are versioned object keys in the request or not, the entire
|
3073
|
+
# Multi-Object Delete request will fail. For information about MFA
|
3074
|
+
# Delete, see [ MFA Delete][1] in the *Amazon S3 User Guide*.
|
3075
|
+
#
|
3076
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
3077
|
+
#
|
3078
|
+
# </note>
|
3079
|
+
#
|
3080
|
+
#
|
3081
|
+
#
|
3082
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/Versioning.html#MultiFactorAuthenticationDelete
|
1173
3083
|
# @option options [String] :request_payer
|
1174
|
-
# Confirms that the requester knows that
|
1175
|
-
#
|
1176
|
-
# requests.
|
1177
|
-
#
|
1178
|
-
#
|
3084
|
+
# Confirms that the requester knows that they will be charged for the
|
3085
|
+
# request. Bucket owners need not specify this parameter in their
|
3086
|
+
# requests. If either the source or destination S3 bucket has Requester
|
3087
|
+
# Pays enabled, the requester will pay for corresponding charges to copy
|
3088
|
+
# the object. For information about downloading objects from Requester
|
3089
|
+
# Pays buckets, see [Downloading Objects in Requester Pays Buckets][1]
|
3090
|
+
# in the *Amazon S3 User Guide*.
|
3091
|
+
#
|
3092
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
3093
|
+
#
|
3094
|
+
# </note>
|
3095
|
+
#
|
3096
|
+
#
|
3097
|
+
#
|
3098
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
|
1179
3099
|
# @option options [Boolean] :bypass_governance_retention
|
1180
3100
|
# Specifies whether you want to delete this object even if it has a
|
1181
|
-
# Governance-type
|
1182
|
-
#
|
3101
|
+
# Governance-type Object Lock in place. To use this header, you must
|
3102
|
+
# have the `s3:BypassGovernanceRetention` permission.
|
3103
|
+
#
|
3104
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
3105
|
+
#
|
3106
|
+
# </note>
|
3107
|
+
# @option options [String] :expected_bucket_owner
|
3108
|
+
# The account ID of the expected bucket owner. If the account ID that
|
3109
|
+
# you provide does not match the actual owner of the bucket, the request
|
3110
|
+
# fails with the HTTP status code `403 Forbidden` (access denied).
|
3111
|
+
# @option options [String] :checksum_algorithm
|
3112
|
+
# Indicates the algorithm used to create the checksum for the object
|
3113
|
+
# when you use the SDK. This header will not provide any additional
|
3114
|
+
# functionality if you don't use the SDK. When you send this header,
|
3115
|
+
# there must be a corresponding `x-amz-checksum-algorithm ` or
|
3116
|
+
# `x-amz-trailer` header sent. Otherwise, Amazon S3 fails the request
|
3117
|
+
# with the HTTP status code `400 Bad Request`.
|
3118
|
+
#
|
3119
|
+
# For the `x-amz-checksum-algorithm ` header, replace ` algorithm ` with
|
3120
|
+
# the supported algorithm from the following list:
|
3121
|
+
#
|
3122
|
+
# * CRC32
|
3123
|
+
#
|
3124
|
+
# * CRC32C
|
3125
|
+
#
|
3126
|
+
# * SHA1
|
3127
|
+
#
|
3128
|
+
# * SHA256
|
3129
|
+
#
|
3130
|
+
# For more information, see [Checking object integrity][1] in the
|
3131
|
+
# *Amazon S3 User Guide*.
|
3132
|
+
#
|
3133
|
+
# If the individual checksum value you provide through
|
3134
|
+
# `x-amz-checksum-algorithm ` doesn't match the checksum algorithm you
|
3135
|
+
# set through `x-amz-sdk-checksum-algorithm`, Amazon S3 ignores any
|
3136
|
+
# provided `ChecksumAlgorithm` parameter and uses the checksum algorithm
|
3137
|
+
# that matches the provided value in `x-amz-checksum-algorithm `.
|
3138
|
+
#
|
3139
|
+
# If you provide an individual checksum, Amazon S3 ignores any provided
|
3140
|
+
# `ChecksumAlgorithm` parameter.
|
3141
|
+
#
|
3142
|
+
#
|
3143
|
+
#
|
3144
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
|
1183
3145
|
# @return [void]
|
1184
3146
|
def batch_delete!(options = {})
|
1185
3147
|
batch_enum.each do |batch|
|
@@ -1192,7 +3154,9 @@ module Aws::S3
|
|
1192
3154
|
key: item.key
|
1193
3155
|
}
|
1194
3156
|
end
|
1195
|
-
|
3157
|
+
Aws::Plugins::UserAgent.feature('resource') do
|
3158
|
+
batch[0].client.delete_objects(params)
|
3159
|
+
end
|
1196
3160
|
end
|
1197
3161
|
nil
|
1198
3162
|
end
|