aws-sdk-s3 1.79.1 → 1.212.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +1548 -0
- data/LICENSE.txt +202 -0
- data/VERSION +1 -0
- data/lib/aws-sdk-s3/access_grants_credentials.rb +57 -0
- data/lib/aws-sdk-s3/access_grants_credentials_provider.rb +250 -0
- data/lib/aws-sdk-s3/bucket.rb +900 -98
- data/lib/aws-sdk-s3/bucket_acl.rb +44 -10
- data/lib/aws-sdk-s3/bucket_cors.rb +51 -11
- data/lib/aws-sdk-s3/bucket_lifecycle.rb +53 -8
- data/lib/aws-sdk-s3/bucket_lifecycle_configuration.rb +107 -9
- data/lib/aws-sdk-s3/bucket_logging.rb +43 -6
- data/lib/aws-sdk-s3/bucket_notification.rb +32 -9
- data/lib/aws-sdk-s3/bucket_policy.rb +90 -6
- data/lib/aws-sdk-s3/bucket_region_cache.rb +9 -5
- data/lib/aws-sdk-s3/bucket_request_payment.rb +38 -8
- data/lib/aws-sdk-s3/bucket_tagging.rb +46 -7
- data/lib/aws-sdk-s3/bucket_versioning.rb +127 -9
- data/lib/aws-sdk-s3/bucket_website.rb +46 -7
- data/lib/aws-sdk-s3/client.rb +13729 -3146
- data/lib/aws-sdk-s3/client_api.rb +1604 -277
- data/lib/aws-sdk-s3/customizations/bucket.rb +31 -47
- data/lib/aws-sdk-s3/customizations/errors.rb +40 -0
- data/lib/aws-sdk-s3/customizations/object.rb +253 -82
- data/lib/aws-sdk-s3/customizations/object_summary.rb +5 -0
- data/lib/aws-sdk-s3/customizations/object_version.rb +13 -0
- data/lib/aws-sdk-s3/customizations/types/permanent_redirect.rb +26 -0
- data/lib/aws-sdk-s3/customizations.rb +28 -29
- data/lib/aws-sdk-s3/default_executor.rb +103 -0
- data/lib/aws-sdk-s3/encryption/client.rb +9 -5
- data/lib/aws-sdk-s3/encryption/decrypt_handler.rb +0 -4
- data/lib/aws-sdk-s3/encryption/default_cipher_provider.rb +2 -0
- data/lib/aws-sdk-s3/encryption/encrypt_handler.rb +2 -0
- data/lib/aws-sdk-s3/encryption/kms_cipher_provider.rb +15 -9
- data/lib/aws-sdk-s3/encryptionV2/client.rb +105 -26
- data/lib/aws-sdk-s3/encryptionV2/decrypt_handler.rb +7 -165
- data/lib/aws-sdk-s3/encryptionV2/decryption.rb +205 -0
- data/lib/aws-sdk-s3/encryptionV2/default_cipher_provider.rb +20 -3
- data/lib/aws-sdk-s3/encryptionV2/encrypt_handler.rb +2 -4
- data/lib/aws-sdk-s3/encryptionV2/io_encrypter.rb +2 -0
- data/lib/aws-sdk-s3/encryptionV2/kms_cipher_provider.rb +18 -6
- data/lib/aws-sdk-s3/encryptionV2/utils.rb +5 -0
- data/lib/aws-sdk-s3/encryptionV3/client.rb +885 -0
- data/lib/aws-sdk-s3/encryptionV3/decrypt_handler.rb +98 -0
- data/lib/aws-sdk-s3/encryptionV3/decryption.rb +244 -0
- data/lib/aws-sdk-s3/encryptionV3/default_cipher_provider.rb +159 -0
- data/lib/aws-sdk-s3/encryptionV3/default_key_provider.rb +35 -0
- data/lib/aws-sdk-s3/encryptionV3/encrypt_handler.rb +98 -0
- data/lib/aws-sdk-s3/encryptionV3/errors.rb +47 -0
- data/lib/aws-sdk-s3/encryptionV3/io_auth_decrypter.rb +60 -0
- data/lib/aws-sdk-s3/encryptionV3/io_decrypter.rb +35 -0
- data/lib/aws-sdk-s3/encryptionV3/io_encrypter.rb +84 -0
- data/lib/aws-sdk-s3/encryptionV3/key_provider.rb +28 -0
- data/lib/aws-sdk-s3/encryptionV3/kms_cipher_provider.rb +159 -0
- data/lib/aws-sdk-s3/encryptionV3/materials.rb +58 -0
- data/lib/aws-sdk-s3/encryptionV3/utils.rb +321 -0
- data/lib/aws-sdk-s3/encryption_v2.rb +1 -0
- data/lib/aws-sdk-s3/encryption_v3.rb +24 -0
- data/lib/aws-sdk-s3/endpoint_parameters.rb +181 -0
- data/lib/aws-sdk-s3/endpoint_provider.rb +889 -0
- data/lib/aws-sdk-s3/endpoints.rb +1544 -0
- data/lib/aws-sdk-s3/errors.rb +80 -1
- data/lib/aws-sdk-s3/event_streams.rb +1 -1
- data/lib/aws-sdk-s3/express_credentials.rb +55 -0
- data/lib/aws-sdk-s3/express_credentials_provider.rb +59 -0
- data/lib/aws-sdk-s3/file_downloader.rb +258 -82
- data/lib/aws-sdk-s3/file_uploader.rb +25 -14
- data/lib/aws-sdk-s3/legacy_signer.rb +17 -26
- data/lib/aws-sdk-s3/multipart_download_error.rb +8 -0
- data/lib/aws-sdk-s3/multipart_file_uploader.rb +111 -86
- data/lib/aws-sdk-s3/multipart_stream_uploader.rb +110 -92
- data/lib/aws-sdk-s3/multipart_upload.rb +304 -14
- data/lib/aws-sdk-s3/multipart_upload_error.rb +3 -4
- data/lib/aws-sdk-s3/multipart_upload_part.rb +344 -20
- data/lib/aws-sdk-s3/object.rb +2457 -225
- data/lib/aws-sdk-s3/object_acl.rb +76 -15
- data/lib/aws-sdk-s3/object_copier.rb +7 -5
- data/lib/aws-sdk-s3/object_multipart_copier.rb +48 -23
- data/lib/aws-sdk-s3/object_summary.rb +2033 -169
- data/lib/aws-sdk-s3/object_version.rb +470 -53
- data/lib/aws-sdk-s3/plugins/accelerate.rb +1 -39
- data/lib/aws-sdk-s3/plugins/access_grants.rb +178 -0
- data/lib/aws-sdk-s3/plugins/arn.rb +70 -0
- data/lib/aws-sdk-s3/plugins/bucket_dns.rb +3 -41
- data/lib/aws-sdk-s3/plugins/bucket_name_restrictions.rb +1 -6
- data/lib/aws-sdk-s3/plugins/checksum_algorithm.rb +44 -0
- data/lib/aws-sdk-s3/plugins/dualstack.rb +2 -49
- data/lib/aws-sdk-s3/plugins/endpoints.rb +86 -0
- data/lib/aws-sdk-s3/plugins/expect_100_continue.rb +3 -1
- data/lib/aws-sdk-s3/plugins/express_session_auth.rb +88 -0
- data/lib/aws-sdk-s3/plugins/get_bucket_location_fix.rb +1 -1
- data/lib/aws-sdk-s3/plugins/http_200_errors.rb +87 -26
- data/lib/aws-sdk-s3/plugins/iad_regional_endpoint.rb +8 -26
- data/lib/aws-sdk-s3/plugins/location_constraint.rb +3 -1
- data/lib/aws-sdk-s3/plugins/md5s.rb +10 -68
- data/lib/aws-sdk-s3/plugins/s3_signer.rb +48 -88
- data/lib/aws-sdk-s3/plugins/streaming_retry.rb +28 -9
- data/lib/aws-sdk-s3/plugins/url_encoded_keys.rb +2 -1
- data/lib/aws-sdk-s3/presigned_post.rb +99 -78
- data/lib/aws-sdk-s3/presigner.rb +50 -42
- data/lib/aws-sdk-s3/resource.rb +144 -15
- data/lib/aws-sdk-s3/transfer_manager.rb +321 -0
- data/lib/aws-sdk-s3/types.rb +12223 -4723
- data/lib/aws-sdk-s3/waiters.rb +1 -1
- data/lib/aws-sdk-s3.rb +37 -28
- data/sig/bucket.rbs +231 -0
- data/sig/bucket_acl.rbs +78 -0
- data/sig/bucket_cors.rbs +69 -0
- data/sig/bucket_lifecycle.rbs +88 -0
- data/sig/bucket_lifecycle_configuration.rbs +115 -0
- data/sig/bucket_logging.rbs +76 -0
- data/sig/bucket_notification.rbs +114 -0
- data/sig/bucket_policy.rbs +59 -0
- data/sig/bucket_request_payment.rbs +54 -0
- data/sig/bucket_tagging.rbs +65 -0
- data/sig/bucket_versioning.rbs +77 -0
- data/sig/bucket_website.rbs +93 -0
- data/sig/client.rbs +2612 -0
- data/sig/customizations/bucket.rbs +19 -0
- data/sig/customizations/object.rbs +38 -0
- data/sig/customizations/object_summary.rbs +35 -0
- data/sig/errors.rbs +44 -0
- data/sig/multipart_upload.rbs +120 -0
- data/sig/multipart_upload_part.rbs +109 -0
- data/sig/object.rbs +464 -0
- data/sig/object_acl.rbs +86 -0
- data/sig/object_summary.rbs +347 -0
- data/sig/object_version.rbs +143 -0
- data/sig/resource.rbs +141 -0
- data/sig/types.rbs +2899 -0
- data/sig/waiters.rbs +95 -0
- metadata +74 -16
- data/lib/aws-sdk-s3/plugins/bucket_arn.rb +0 -212
data/lib/aws-sdk-s3/object.rb
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
# WARNING ABOUT GENERATED CODE
|
|
4
4
|
#
|
|
5
5
|
# This file is generated. See the contributing guide for more information:
|
|
6
|
-
# https://github.com/aws/aws-sdk-ruby/blob/
|
|
6
|
+
# https://github.com/aws/aws-sdk-ruby/blob/version-3/CONTRIBUTING.md
|
|
7
7
|
#
|
|
8
8
|
# WARNING ABOUT GENERATED CODE
|
|
9
9
|
|
|
@@ -45,6 +45,10 @@ module Aws::S3
|
|
|
45
45
|
# Specifies whether the object retrieved was (true) or was not (false) a
|
|
46
46
|
# Delete Marker. If false, this response header does not appear in the
|
|
47
47
|
# response.
|
|
48
|
+
#
|
|
49
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
|
50
|
+
#
|
|
51
|
+
# </note>
|
|
48
52
|
# @return [Boolean]
|
|
49
53
|
def delete_marker
|
|
50
54
|
data[:delete_marker]
|
|
@@ -56,10 +60,21 @@ module Aws::S3
|
|
|
56
60
|
data[:accept_ranges]
|
|
57
61
|
end
|
|
58
62
|
|
|
59
|
-
# If the object expiration is configured (see
|
|
60
|
-
#
|
|
61
|
-
#
|
|
62
|
-
# 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"> Object expiration information is not returned in directory buckets and
|
|
70
|
+
# this header returns the value "`NotImplemented`" in all responses
|
|
71
|
+
# for directory buckets.
|
|
72
|
+
#
|
|
73
|
+
# </note>
|
|
74
|
+
#
|
|
75
|
+
#
|
|
76
|
+
#
|
|
77
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketLifecycleConfiguration.html
|
|
63
78
|
# @return [String]
|
|
64
79
|
def expiration
|
|
65
80
|
data[:expiration]
|
|
@@ -67,30 +82,48 @@ module Aws::S3
|
|
|
67
82
|
|
|
68
83
|
# If the object is an archived object (an object whose storage class is
|
|
69
84
|
# GLACIER), the response includes this header if either the archive
|
|
70
|
-
# restoration is in progress (see RestoreObject or an archive copy
|
|
71
|
-
# already restored.
|
|
85
|
+
# restoration is in progress (see [RestoreObject][1] or an archive copy
|
|
86
|
+
# is already restored.
|
|
72
87
|
#
|
|
73
88
|
# If an archive copy is already restored, the header value indicates
|
|
74
89
|
# when Amazon S3 is scheduled to delete the object copy. For example:
|
|
75
90
|
#
|
|
76
|
-
# `x-amz-restore: ongoing-request="false", expiry-date="Fri,
|
|
91
|
+
# `x-amz-restore: ongoing-request="false", expiry-date="Fri, 21 Dec 2012
|
|
77
92
|
# 00:00:00 GMT"`
|
|
78
93
|
#
|
|
79
94
|
# If the object restoration is in progress, the header returns the value
|
|
80
95
|
# `ongoing-request="true"`.
|
|
81
96
|
#
|
|
82
97
|
# For more information about archiving objects, see [Transitioning
|
|
83
|
-
# Objects: General Considerations][
|
|
98
|
+
# Objects: General Considerations][2].
|
|
99
|
+
#
|
|
100
|
+
# <note markdown="1"> This functionality is not supported for directory buckets. Directory
|
|
101
|
+
# buckets only support `EXPRESS_ONEZONE` (the S3 Express One Zone
|
|
102
|
+
# storage class) in Availability Zones and `ONEZONE_IA` (the S3 One
|
|
103
|
+
# Zone-Infrequent Access storage class) in Dedicated Local Zones.
|
|
84
104
|
#
|
|
105
|
+
# </note>
|
|
85
106
|
#
|
|
86
107
|
#
|
|
87
|
-
#
|
|
108
|
+
#
|
|
109
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_RestoreObject.html
|
|
110
|
+
# [2]: https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lifecycle-mgmt.html#lifecycle-transition-general-considerations
|
|
88
111
|
# @return [String]
|
|
89
112
|
def restore
|
|
90
113
|
data[:restore]
|
|
91
114
|
end
|
|
92
115
|
|
|
93
|
-
#
|
|
116
|
+
# The archive state of the head object.
|
|
117
|
+
#
|
|
118
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
|
119
|
+
#
|
|
120
|
+
# </note>
|
|
121
|
+
# @return [String]
|
|
122
|
+
def archive_status
|
|
123
|
+
data[:archive_status]
|
|
124
|
+
end
|
|
125
|
+
|
|
126
|
+
# Date and time when the object was last modified.
|
|
94
127
|
# @return [Time]
|
|
95
128
|
def last_modified
|
|
96
129
|
data[:last_modified]
|
|
@@ -102,8 +135,103 @@ module Aws::S3
|
|
|
102
135
|
data[:content_length]
|
|
103
136
|
end
|
|
104
137
|
|
|
105
|
-
#
|
|
106
|
-
#
|
|
138
|
+
# The Base64 encoded, 32-bit `CRC32 checksum` of the object. This
|
|
139
|
+
# checksum is only present if the checksum was uploaded with the object.
|
|
140
|
+
# When you use an API operation on an object that was uploaded using
|
|
141
|
+
# multipart uploads, this value may not be a direct checksum value of
|
|
142
|
+
# the full object. Instead, it's a calculation based on the checksum
|
|
143
|
+
# values of each individual part. For more information about how
|
|
144
|
+
# checksums are calculated with multipart uploads, see [ Checking object
|
|
145
|
+
# integrity][1] in the *Amazon S3 User Guide*.
|
|
146
|
+
#
|
|
147
|
+
#
|
|
148
|
+
#
|
|
149
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums
|
|
150
|
+
# @return [String]
|
|
151
|
+
def checksum_crc32
|
|
152
|
+
data[:checksum_crc32]
|
|
153
|
+
end
|
|
154
|
+
|
|
155
|
+
# The Base64 encoded, 32-bit `CRC32C` checksum of the object. This
|
|
156
|
+
# checksum is only present if the checksum was uploaded with the object.
|
|
157
|
+
# When you use an API operation on an object that was uploaded using
|
|
158
|
+
# multipart uploads, this value may not be a direct checksum value of
|
|
159
|
+
# the full object. Instead, it's a calculation based on the checksum
|
|
160
|
+
# values of each individual part. For more information about how
|
|
161
|
+
# checksums are calculated with multipart uploads, see [ Checking object
|
|
162
|
+
# integrity][1] in the *Amazon S3 User Guide*.
|
|
163
|
+
#
|
|
164
|
+
#
|
|
165
|
+
#
|
|
166
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums
|
|
167
|
+
# @return [String]
|
|
168
|
+
def checksum_crc32c
|
|
169
|
+
data[:checksum_crc32c]
|
|
170
|
+
end
|
|
171
|
+
|
|
172
|
+
# The Base64 encoded, 64-bit `CRC64NVME` checksum of the object. For
|
|
173
|
+
# more information, see [Checking object integrity in the Amazon S3 User
|
|
174
|
+
# Guide][1].
|
|
175
|
+
#
|
|
176
|
+
#
|
|
177
|
+
#
|
|
178
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
|
|
179
|
+
# @return [String]
|
|
180
|
+
def checksum_crc64nvme
|
|
181
|
+
data[:checksum_crc64nvme]
|
|
182
|
+
end
|
|
183
|
+
|
|
184
|
+
# The Base64 encoded, 160-bit `SHA1` digest of the object. This checksum
|
|
185
|
+
# is only present if the checksum was uploaded with the object. When you
|
|
186
|
+
# use the API operation on an object that was uploaded using multipart
|
|
187
|
+
# uploads, this value may not be a direct checksum value of the full
|
|
188
|
+
# object. Instead, it's a calculation based on the checksum values of
|
|
189
|
+
# each individual part. For more information about how checksums are
|
|
190
|
+
# calculated with multipart uploads, see [ Checking object integrity][1]
|
|
191
|
+
# in the *Amazon S3 User Guide*.
|
|
192
|
+
#
|
|
193
|
+
#
|
|
194
|
+
#
|
|
195
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums
|
|
196
|
+
# @return [String]
|
|
197
|
+
def checksum_sha1
|
|
198
|
+
data[:checksum_sha1]
|
|
199
|
+
end
|
|
200
|
+
|
|
201
|
+
# The Base64 encoded, 256-bit `SHA256` digest of the object. This
|
|
202
|
+
# checksum is only present if the checksum was uploaded with the object.
|
|
203
|
+
# When you use an API operation on an object that was uploaded using
|
|
204
|
+
# multipart uploads, this value may not be a direct checksum value of
|
|
205
|
+
# the full object. Instead, it's a calculation based on the checksum
|
|
206
|
+
# values of each individual part. For more information about how
|
|
207
|
+
# checksums are calculated with multipart uploads, see [ Checking object
|
|
208
|
+
# integrity][1] in the *Amazon S3 User Guide*.
|
|
209
|
+
#
|
|
210
|
+
#
|
|
211
|
+
#
|
|
212
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums
|
|
213
|
+
# @return [String]
|
|
214
|
+
def checksum_sha256
|
|
215
|
+
data[:checksum_sha256]
|
|
216
|
+
end
|
|
217
|
+
|
|
218
|
+
# The checksum type, which determines how part-level checksums are
|
|
219
|
+
# combined to create an object-level checksum for multipart objects. You
|
|
220
|
+
# can use this header response to verify that the checksum type that is
|
|
221
|
+
# received is the same checksum type that was specified in
|
|
222
|
+
# `CreateMultipartUpload` request. For more information, see [Checking
|
|
223
|
+
# object integrity in the Amazon S3 User Guide][1].
|
|
224
|
+
#
|
|
225
|
+
#
|
|
226
|
+
#
|
|
227
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
|
|
228
|
+
# @return [String]
|
|
229
|
+
def checksum_type
|
|
230
|
+
data[:checksum_type]
|
|
231
|
+
end
|
|
232
|
+
|
|
233
|
+
# An entity tag (ETag) is an opaque identifier assigned by a web server
|
|
234
|
+
# to a specific version of a resource found at a URL.
|
|
107
235
|
# @return [String]
|
|
108
236
|
def etag
|
|
109
237
|
data[:etag]
|
|
@@ -114,12 +242,20 @@ module Aws::S3
|
|
|
114
242
|
# API like SOAP that supports more flexible metadata than the REST API.
|
|
115
243
|
# For example, using SOAP, you can create metadata whose values are not
|
|
116
244
|
# legal HTTP headers.
|
|
245
|
+
#
|
|
246
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
|
247
|
+
#
|
|
248
|
+
# </note>
|
|
117
249
|
# @return [Integer]
|
|
118
250
|
def missing_meta
|
|
119
251
|
data[:missing_meta]
|
|
120
252
|
end
|
|
121
253
|
|
|
122
|
-
# Version of the object.
|
|
254
|
+
# Version ID of the object.
|
|
255
|
+
#
|
|
256
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
|
257
|
+
#
|
|
258
|
+
# </note>
|
|
123
259
|
# @return [String]
|
|
124
260
|
def version_id
|
|
125
261
|
data[:version_id]
|
|
@@ -137,7 +273,7 @@ module Aws::S3
|
|
|
137
273
|
data[:content_disposition]
|
|
138
274
|
end
|
|
139
275
|
|
|
140
|
-
#
|
|
276
|
+
# Indicates what content encodings have been applied to the object and
|
|
141
277
|
# thus what decoding mechanisms must be applied to obtain the media-type
|
|
142
278
|
# referenced by the Content-Type header field.
|
|
143
279
|
# @return [String]
|
|
@@ -157,6 +293,13 @@ module Aws::S3
|
|
|
157
293
|
data[:content_type]
|
|
158
294
|
end
|
|
159
295
|
|
|
296
|
+
# The portion of the object returned in the response for a `GET`
|
|
297
|
+
# request.
|
|
298
|
+
# @return [String]
|
|
299
|
+
def content_range
|
|
300
|
+
data[:content_range]
|
|
301
|
+
end
|
|
302
|
+
|
|
160
303
|
# The date and time at which the object is no longer cacheable.
|
|
161
304
|
# @return [Time]
|
|
162
305
|
def expires
|
|
@@ -171,16 +314,22 @@ module Aws::S3
|
|
|
171
314
|
# If the bucket is configured as a website, redirects requests for this
|
|
172
315
|
# object to another object in the same bucket or to an external URL.
|
|
173
316
|
# Amazon S3 stores the value of this header in the object metadata.
|
|
317
|
+
#
|
|
318
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
|
319
|
+
#
|
|
320
|
+
# </note>
|
|
174
321
|
# @return [String]
|
|
175
322
|
def website_redirect_location
|
|
176
323
|
data[:website_redirect_location]
|
|
177
324
|
end
|
|
178
325
|
|
|
179
|
-
#
|
|
180
|
-
#
|
|
181
|
-
#
|
|
182
|
-
#
|
|
183
|
-
#
|
|
326
|
+
# The server-side encryption algorithm used when you store this object
|
|
327
|
+
# in Amazon S3 or Amazon FSx.
|
|
328
|
+
#
|
|
329
|
+
# <note markdown="1"> When accessing data stored in Amazon FSx file systems using S3 access
|
|
330
|
+
# points, the only valid server side encryption option is `aws:fsx`.
|
|
331
|
+
#
|
|
332
|
+
# </note>
|
|
184
333
|
# @return [String]
|
|
185
334
|
def server_side_encryption
|
|
186
335
|
data[:server_side_encryption]
|
|
@@ -193,36 +342,57 @@ module Aws::S3
|
|
|
193
342
|
end
|
|
194
343
|
|
|
195
344
|
# If server-side encryption with a customer-provided encryption key was
|
|
196
|
-
# requested, the response will include this header
|
|
197
|
-
# encryption algorithm used.
|
|
345
|
+
# requested, the response will include this header to confirm the
|
|
346
|
+
# encryption algorithm that's used.
|
|
347
|
+
#
|
|
348
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
|
349
|
+
#
|
|
350
|
+
# </note>
|
|
198
351
|
# @return [String]
|
|
199
352
|
def sse_customer_algorithm
|
|
200
353
|
data[:sse_customer_algorithm]
|
|
201
354
|
end
|
|
202
355
|
|
|
203
356
|
# If server-side encryption with a customer-provided encryption key was
|
|
204
|
-
# requested, the response will include this header to provide
|
|
205
|
-
# message integrity verification of the customer-provided
|
|
206
|
-
# key.
|
|
357
|
+
# requested, the response will include this header to provide the
|
|
358
|
+
# round-trip message integrity verification of the customer-provided
|
|
359
|
+
# encryption key.
|
|
360
|
+
#
|
|
361
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
|
362
|
+
#
|
|
363
|
+
# </note>
|
|
207
364
|
# @return [String]
|
|
208
365
|
def sse_customer_key_md5
|
|
209
366
|
data[:sse_customer_key_md5]
|
|
210
367
|
end
|
|
211
368
|
|
|
212
|
-
# If present,
|
|
213
|
-
#
|
|
214
|
-
# used for the object.
|
|
369
|
+
# If present, indicates the ID of the KMS key that was used for object
|
|
370
|
+
# encryption.
|
|
215
371
|
# @return [String]
|
|
216
372
|
def ssekms_key_id
|
|
217
373
|
data[:ssekms_key_id]
|
|
218
374
|
end
|
|
219
375
|
|
|
376
|
+
# Indicates whether the object uses an S3 Bucket Key for server-side
|
|
377
|
+
# encryption with Key Management Service (KMS) keys (SSE-KMS).
|
|
378
|
+
# @return [Boolean]
|
|
379
|
+
def bucket_key_enabled
|
|
380
|
+
data[:bucket_key_enabled]
|
|
381
|
+
end
|
|
382
|
+
|
|
220
383
|
# Provides storage class information of the object. Amazon S3 returns
|
|
221
384
|
# this header for all objects except for S3 Standard storage class
|
|
222
385
|
# objects.
|
|
223
386
|
#
|
|
224
387
|
# For more information, see [Storage Classes][1].
|
|
225
388
|
#
|
|
389
|
+
# <note markdown="1"> <b>Directory buckets </b> - Directory buckets only support
|
|
390
|
+
# `EXPRESS_ONEZONE` (the S3 Express One Zone storage class) in
|
|
391
|
+
# Availability Zones and `ONEZONE_IA` (the S3 One Zone-Infrequent Access
|
|
392
|
+
# storage class) in Dedicated Local Zones.
|
|
393
|
+
#
|
|
394
|
+
# </note>
|
|
395
|
+
#
|
|
226
396
|
#
|
|
227
397
|
#
|
|
228
398
|
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html
|
|
@@ -232,22 +402,32 @@ module Aws::S3
|
|
|
232
402
|
end
|
|
233
403
|
|
|
234
404
|
# If present, indicates that the requester was successfully charged for
|
|
235
|
-
# the request.
|
|
405
|
+
# the request. For more information, see [Using Requester Pays buckets
|
|
406
|
+
# for storage transfers and usage][1] in the *Amazon Simple Storage
|
|
407
|
+
# Service user guide*.
|
|
408
|
+
#
|
|
409
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
|
410
|
+
#
|
|
411
|
+
# </note>
|
|
412
|
+
#
|
|
413
|
+
#
|
|
414
|
+
#
|
|
415
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/RequesterPaysBuckets.html
|
|
236
416
|
# @return [String]
|
|
237
417
|
def request_charged
|
|
238
418
|
data[:request_charged]
|
|
239
419
|
end
|
|
240
420
|
|
|
241
421
|
# Amazon S3 can return this header if your request involves a bucket
|
|
242
|
-
# that is either a source or destination in a replication rule.
|
|
422
|
+
# that is either a source or a destination in a replication rule.
|
|
243
423
|
#
|
|
244
424
|
# In replication, you have a source bucket on which you configure
|
|
245
|
-
# replication and destination bucket where Amazon S3 stores
|
|
246
|
-
# replicas. When you request an object (`GetObject`) or object
|
|
247
|
-
# (`HeadObject`) from these buckets, Amazon S3 will return the
|
|
425
|
+
# replication and destination bucket or buckets where Amazon S3 stores
|
|
426
|
+
# object replicas. When you request an object (`GetObject`) or object
|
|
427
|
+
# metadata (`HeadObject`) from these buckets, Amazon S3 will return the
|
|
248
428
|
# `x-amz-replication-status` header in the response as follows:
|
|
249
429
|
#
|
|
250
|
-
# * If requesting an object from the source bucket
|
|
430
|
+
# * **If requesting an object from the source bucket**, Amazon S3 will
|
|
251
431
|
# return the `x-amz-replication-status` header if the object in your
|
|
252
432
|
# request is eligible for replication.
|
|
253
433
|
#
|
|
@@ -260,12 +440,25 @@ module Aws::S3
|
|
|
260
440
|
# value PENDING, COMPLETED or FAILED indicating object replication
|
|
261
441
|
# status.
|
|
262
442
|
#
|
|
263
|
-
# * If requesting an object from
|
|
264
|
-
# return the `x-amz-replication-status` header with value REPLICA
|
|
265
|
-
# the object in your request is a replica that Amazon S3 created
|
|
443
|
+
# * **If requesting an object from a destination bucket**, Amazon S3
|
|
444
|
+
# will return the `x-amz-replication-status` header with value REPLICA
|
|
445
|
+
# if the object in your request is a replica that Amazon S3 created
|
|
446
|
+
# and there is no replica modification replication in progress.
|
|
447
|
+
#
|
|
448
|
+
# * **When replicating objects to multiple destination buckets**, the
|
|
449
|
+
# `x-amz-replication-status` header acts differently. The header of
|
|
450
|
+
# the source object will only return a value of COMPLETED when
|
|
451
|
+
# replication is successful to all destinations. The header will
|
|
452
|
+
# remain at value PENDING until replication has completed for all
|
|
453
|
+
# destinations. If one or more destinations fails replication the
|
|
454
|
+
# header will return FAILED.
|
|
266
455
|
#
|
|
267
456
|
# For more information, see [Replication][1].
|
|
268
457
|
#
|
|
458
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
|
459
|
+
#
|
|
460
|
+
# </note>
|
|
461
|
+
#
|
|
269
462
|
#
|
|
270
463
|
#
|
|
271
464
|
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/NotificationHowTo.html
|
|
@@ -274,17 +467,41 @@ module Aws::S3
|
|
|
274
467
|
data[:replication_status]
|
|
275
468
|
end
|
|
276
469
|
|
|
277
|
-
# The count of parts this object has.
|
|
470
|
+
# The count of parts this object has. This value is only returned if you
|
|
471
|
+
# specify `partNumber` in your request and the object was uploaded as a
|
|
472
|
+
# multipart upload.
|
|
278
473
|
# @return [Integer]
|
|
279
474
|
def parts_count
|
|
280
475
|
data[:parts_count]
|
|
281
476
|
end
|
|
282
477
|
|
|
478
|
+
# The number of tags, if any, on the object, when you have the relevant
|
|
479
|
+
# permission to read object tags.
|
|
480
|
+
#
|
|
481
|
+
# You can use [GetObjectTagging][1] to retrieve the tag set associated
|
|
482
|
+
# with an object.
|
|
483
|
+
#
|
|
484
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
|
485
|
+
#
|
|
486
|
+
# </note>
|
|
487
|
+
#
|
|
488
|
+
#
|
|
489
|
+
#
|
|
490
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectTagging.html
|
|
491
|
+
# @return [Integer]
|
|
492
|
+
def tag_count
|
|
493
|
+
data[:tag_count]
|
|
494
|
+
end
|
|
495
|
+
|
|
283
496
|
# The Object Lock mode, if any, that's in effect for this object. This
|
|
284
497
|
# header is only returned if the requester has the
|
|
285
498
|
# `s3:GetObjectRetention` permission. For more information about S3
|
|
286
499
|
# Object Lock, see [Object Lock][1].
|
|
287
500
|
#
|
|
501
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
|
502
|
+
#
|
|
503
|
+
# </note>
|
|
504
|
+
#
|
|
288
505
|
#
|
|
289
506
|
#
|
|
290
507
|
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock.html
|
|
@@ -296,6 +513,10 @@ module Aws::S3
|
|
|
296
513
|
# The date and time when the Object Lock retention period expires. This
|
|
297
514
|
# header is only returned if the requester has the
|
|
298
515
|
# `s3:GetObjectRetention` permission.
|
|
516
|
+
#
|
|
517
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
|
518
|
+
#
|
|
519
|
+
# </note>
|
|
299
520
|
# @return [Time]
|
|
300
521
|
def object_lock_retain_until_date
|
|
301
522
|
data[:object_lock_retain_until_date]
|
|
@@ -307,6 +528,10 @@ module Aws::S3
|
|
|
307
528
|
# specified version of this object has never had a legal hold applied.
|
|
308
529
|
# For more information about S3 Object Lock, see [Object Lock][1].
|
|
309
530
|
#
|
|
531
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
|
532
|
+
#
|
|
533
|
+
# </note>
|
|
534
|
+
#
|
|
310
535
|
#
|
|
311
536
|
#
|
|
312
537
|
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock.html
|
|
@@ -329,10 +554,12 @@ module Aws::S3
|
|
|
329
554
|
#
|
|
330
555
|
# @return [self]
|
|
331
556
|
def load
|
|
332
|
-
resp =
|
|
557
|
+
resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
|
558
|
+
@client.head_object(
|
|
333
559
|
bucket: @bucket_name,
|
|
334
560
|
key: @key
|
|
335
561
|
)
|
|
562
|
+
end
|
|
336
563
|
@data = resp.data
|
|
337
564
|
self
|
|
338
565
|
end
|
|
@@ -377,8 +604,10 @@ module Aws::S3
|
|
|
377
604
|
options, params = separate_params_and_options(options)
|
|
378
605
|
waiter = Waiters::ObjectExists.new(options)
|
|
379
606
|
yield_waiter_and_warn(waiter, &block) if block_given?
|
|
380
|
-
|
|
607
|
+
Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
|
608
|
+
waiter.wait(params.merge(bucket: @bucket_name,
|
|
381
609
|
key: @key))
|
|
610
|
+
end
|
|
382
611
|
Object.new({
|
|
383
612
|
bucket_name: @bucket_name,
|
|
384
613
|
key: @key,
|
|
@@ -396,8 +625,10 @@ module Aws::S3
|
|
|
396
625
|
options, params = separate_params_and_options(options)
|
|
397
626
|
waiter = Waiters::ObjectNotExists.new(options)
|
|
398
627
|
yield_waiter_and_warn(waiter, &block) if block_given?
|
|
399
|
-
|
|
628
|
+
Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
|
629
|
+
waiter.wait(params.merge(bucket: @bucket_name,
|
|
400
630
|
key: @key))
|
|
631
|
+
end
|
|
401
632
|
Object.new({
|
|
402
633
|
bucket_name: @bucket_name,
|
|
403
634
|
key: @key,
|
|
@@ -499,7 +730,9 @@ module Aws::S3
|
|
|
499
730
|
:retry
|
|
500
731
|
end
|
|
501
732
|
end
|
|
502
|
-
Aws::
|
|
733
|
+
Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
|
734
|
+
Aws::Waiters::Waiter.new(options).wait({})
|
|
735
|
+
end
|
|
503
736
|
end
|
|
504
737
|
|
|
505
738
|
# @!group Actions
|
|
@@ -509,6 +742,7 @@ module Aws::S3
|
|
|
509
742
|
# object.copy_from({
|
|
510
743
|
# acl: "private", # accepts private, public-read, public-read-write, authenticated-read, aws-exec-read, bucket-owner-read, bucket-owner-full-control
|
|
511
744
|
# cache_control: "CacheControl",
|
|
745
|
+
# checksum_algorithm: "CRC32", # accepts CRC32, CRC32C, SHA1, SHA256, CRC64NVME
|
|
512
746
|
# content_disposition: "ContentDisposition",
|
|
513
747
|
# content_encoding: "ContentEncoding",
|
|
514
748
|
# content_language: "ContentLanguage",
|
|
@@ -523,19 +757,22 @@ module Aws::S3
|
|
|
523
757
|
# grant_read: "GrantRead",
|
|
524
758
|
# grant_read_acp: "GrantReadACP",
|
|
525
759
|
# grant_write_acp: "GrantWriteACP",
|
|
760
|
+
# if_match: "IfMatch",
|
|
761
|
+
# if_none_match: "IfNoneMatch",
|
|
526
762
|
# metadata: {
|
|
527
763
|
# "MetadataKey" => "MetadataValue",
|
|
528
764
|
# },
|
|
529
765
|
# metadata_directive: "COPY", # accepts COPY, REPLACE
|
|
530
766
|
# tagging_directive: "COPY", # accepts COPY, REPLACE
|
|
531
|
-
# server_side_encryption: "AES256", # accepts AES256, aws:kms
|
|
532
|
-
# storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER, DEEP_ARCHIVE
|
|
767
|
+
# server_side_encryption: "AES256", # accepts AES256, aws:fsx, aws:kms, aws:kms:dsse
|
|
768
|
+
# storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER, DEEP_ARCHIVE, OUTPOSTS, GLACIER_IR, SNOW, EXPRESS_ONEZONE, FSX_OPENZFS, FSX_ONTAP
|
|
533
769
|
# website_redirect_location: "WebsiteRedirectLocation",
|
|
534
770
|
# sse_customer_algorithm: "SSECustomerAlgorithm",
|
|
535
771
|
# sse_customer_key: "SSECustomerKey",
|
|
536
772
|
# sse_customer_key_md5: "SSECustomerKeyMD5",
|
|
537
773
|
# ssekms_key_id: "SSEKMSKeyId",
|
|
538
774
|
# ssekms_encryption_context: "SSEKMSEncryptionContext",
|
|
775
|
+
# bucket_key_enabled: false,
|
|
539
776
|
# copy_source_sse_customer_algorithm: "CopySourceSSECustomerAlgorithm",
|
|
540
777
|
# copy_source_sse_customer_key: "CopySourceSSECustomerKey",
|
|
541
778
|
# copy_source_sse_customer_key_md5: "CopySourceSSECustomerKeyMD5",
|
|
@@ -544,130 +781,730 @@ module Aws::S3
|
|
|
544
781
|
# object_lock_mode: "GOVERNANCE", # accepts GOVERNANCE, COMPLIANCE
|
|
545
782
|
# object_lock_retain_until_date: Time.now,
|
|
546
783
|
# object_lock_legal_hold_status: "ON", # accepts ON, OFF
|
|
784
|
+
# expected_bucket_owner: "AccountId",
|
|
785
|
+
# expected_source_bucket_owner: "AccountId",
|
|
547
786
|
# })
|
|
548
787
|
# @param [Hash] options ({})
|
|
549
788
|
# @option options [String] :acl
|
|
550
|
-
# The canned ACL to apply to the object.
|
|
789
|
+
# The canned access control list (ACL) to apply to the object.
|
|
790
|
+
#
|
|
791
|
+
# When you copy an object, the ACL metadata is not preserved and is set
|
|
792
|
+
# to `private` by default. Only the owner has full access control. To
|
|
793
|
+
# override the default ACL setting, specify a new ACL when you generate
|
|
794
|
+
# a copy request. For more information, see [Using ACLs][1].
|
|
795
|
+
#
|
|
796
|
+
# If the destination bucket that you're copying objects to uses the
|
|
797
|
+
# bucket owner enforced setting for S3 Object Ownership, ACLs are
|
|
798
|
+
# disabled and no longer affect permissions. Buckets that use this
|
|
799
|
+
# setting only accept `PUT` requests that don't specify an ACL or `PUT`
|
|
800
|
+
# requests that specify bucket owner full control ACLs, such as the
|
|
801
|
+
# `bucket-owner-full-control` canned ACL or an equivalent form of this
|
|
802
|
+
# ACL expressed in the XML format. For more information, see
|
|
803
|
+
# [Controlling ownership of objects and disabling ACLs][2] in the
|
|
804
|
+
# *Amazon S3 User Guide*.
|
|
805
|
+
#
|
|
806
|
+
# <note markdown="1"> * If your destination bucket uses the bucket owner enforced setting
|
|
807
|
+
# for Object Ownership, all objects written to the bucket by any
|
|
808
|
+
# account will be owned by the bucket owner.
|
|
809
|
+
#
|
|
810
|
+
# * This functionality is not supported for directory buckets.
|
|
811
|
+
#
|
|
812
|
+
# * This functionality is not supported for Amazon S3 on Outposts.
|
|
813
|
+
#
|
|
814
|
+
# </note>
|
|
815
|
+
#
|
|
816
|
+
#
|
|
817
|
+
#
|
|
818
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/S3_ACLs_UsingACLs.html
|
|
819
|
+
# [2]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/about-object-ownership.html
|
|
551
820
|
# @option options [String] :cache_control
|
|
552
|
-
# Specifies caching behavior along the request/reply chain.
|
|
821
|
+
# Specifies the caching behavior along the request/reply chain.
|
|
822
|
+
# @option options [String] :checksum_algorithm
|
|
823
|
+
# Indicates the algorithm that you want Amazon S3 to use to create the
|
|
824
|
+
# checksum for the object. For more information, see [Checking object
|
|
825
|
+
# integrity][1] in the *Amazon S3 User Guide*.
|
|
826
|
+
#
|
|
827
|
+
# When you copy an object, if the source object has a checksum, that
|
|
828
|
+
# checksum value will be copied to the new object by default. If the
|
|
829
|
+
# `CopyObject` request does not include this `x-amz-checksum-algorithm`
|
|
830
|
+
# header, the checksum algorithm will be copied from the source object
|
|
831
|
+
# to the destination object (if it's present on the source object). You
|
|
832
|
+
# can optionally specify a different checksum algorithm to use with the
|
|
833
|
+
# `x-amz-checksum-algorithm` header. Unrecognized or unsupported values
|
|
834
|
+
# will respond with the HTTP status code `400 Bad Request`.
|
|
835
|
+
#
|
|
836
|
+
# <note markdown="1"> For directory buckets, when you use Amazon Web Services SDKs, `CRC32`
|
|
837
|
+
# is the default checksum algorithm that's used for performance.
|
|
838
|
+
#
|
|
839
|
+
# </note>
|
|
840
|
+
#
|
|
841
|
+
#
|
|
842
|
+
#
|
|
843
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
|
|
553
844
|
# @option options [String] :content_disposition
|
|
554
|
-
# Specifies presentational information for the object.
|
|
845
|
+
# Specifies presentational information for the object. Indicates whether
|
|
846
|
+
# an object should be displayed in a web browser or downloaded as a
|
|
847
|
+
# file. It allows specifying the desired filename for the downloaded
|
|
848
|
+
# file.
|
|
555
849
|
# @option options [String] :content_encoding
|
|
556
850
|
# Specifies what content encodings have been applied to the object and
|
|
557
851
|
# thus what decoding mechanisms must be applied to obtain the media-type
|
|
558
852
|
# referenced by the Content-Type header field.
|
|
853
|
+
#
|
|
854
|
+
# <note markdown="1"> For directory buckets, only the `aws-chunked` value is supported in
|
|
855
|
+
# this header field.
|
|
856
|
+
#
|
|
857
|
+
# </note>
|
|
559
858
|
# @option options [String] :content_language
|
|
560
859
|
# The language the content is in.
|
|
561
860
|
# @option options [String] :content_type
|
|
562
|
-
# A standard MIME type
|
|
861
|
+
# A standard MIME type that describes the format of the object data.
|
|
563
862
|
# @option options [required, String] :copy_source
|
|
564
|
-
#
|
|
565
|
-
#
|
|
863
|
+
# Specifies the source object for the copy operation. The source object
|
|
864
|
+
# can be up to 5 GB. If the source object is an object that was uploaded
|
|
865
|
+
# by using a multipart upload, the object copy will be a single part
|
|
866
|
+
# object after the source object is copied to the destination bucket.
|
|
867
|
+
#
|
|
868
|
+
# You specify the value of the copy source in one of two formats,
|
|
869
|
+
# depending on whether you want to access the source object through an
|
|
870
|
+
# [access point][1]:
|
|
871
|
+
#
|
|
872
|
+
# * For objects not accessed through an access point, specify the name
|
|
873
|
+
# of the source bucket and the key of the source object, separated by
|
|
874
|
+
# a slash (/). For example, to copy the object `reports/january.pdf`
|
|
875
|
+
# from the general purpose bucket `awsexamplebucket`, use
|
|
876
|
+
# `awsexamplebucket/reports/january.pdf`. The value must be
|
|
877
|
+
# URL-encoded. To copy the object `reports/january.pdf` from the
|
|
878
|
+
# directory bucket `awsexamplebucket--use1-az5--x-s3`, use
|
|
879
|
+
# `awsexamplebucket--use1-az5--x-s3/reports/january.pdf`. The value
|
|
880
|
+
# must be URL-encoded.
|
|
881
|
+
#
|
|
882
|
+
# * For objects accessed through access points, specify the Amazon
|
|
883
|
+
# Resource Name (ARN) of the object as accessed through the access
|
|
884
|
+
# point, in the format
|
|
885
|
+
# `arn:aws:s3:<Region>:<account-id>:accesspoint/<access-point-name>/object/<key>`.
|
|
886
|
+
# For example, to copy the object `reports/january.pdf` through access
|
|
887
|
+
# point `my-access-point` owned by account `123456789012` in Region
|
|
888
|
+
# `us-west-2`, use the URL encoding of
|
|
889
|
+
# `arn:aws:s3:us-west-2:123456789012:accesspoint/my-access-point/object/reports/january.pdf`.
|
|
890
|
+
# The value must be URL encoded.
|
|
891
|
+
#
|
|
892
|
+
# <note markdown="1"> * Amazon S3 supports copy operations using Access points only when
|
|
893
|
+
# the source and destination buckets are in the same Amazon Web
|
|
894
|
+
# Services Region.
|
|
895
|
+
#
|
|
896
|
+
# * Access points are not supported by directory buckets.
|
|
897
|
+
#
|
|
898
|
+
# </note>
|
|
899
|
+
#
|
|
900
|
+
# Alternatively, for objects accessed through Amazon S3 on Outposts,
|
|
901
|
+
# specify the ARN of the object as accessed in the format
|
|
902
|
+
# `arn:aws:s3-outposts:<Region>:<account-id>:outpost/<outpost-id>/object/<key>`.
|
|
903
|
+
# For example, to copy the object `reports/january.pdf` through
|
|
904
|
+
# outpost `my-outpost` owned by account `123456789012` in Region
|
|
905
|
+
# `us-west-2`, use the URL encoding of
|
|
906
|
+
# `arn:aws:s3-outposts:us-west-2:123456789012:outpost/my-outpost/object/reports/january.pdf`.
|
|
907
|
+
# The value must be URL-encoded.
|
|
908
|
+
#
|
|
909
|
+
# If your source bucket versioning is enabled, the `x-amz-copy-source`
|
|
910
|
+
# header by default identifies the current version of an object to copy.
|
|
911
|
+
# If the current version is a delete marker, Amazon S3 behaves as if the
|
|
912
|
+
# object was deleted. To copy a different version, use the `versionId`
|
|
913
|
+
# query parameter. Specifically, append `?versionId=<version-id>` to the
|
|
914
|
+
# value (for example,
|
|
915
|
+
# `awsexamplebucket/reports/january.pdf?versionId=QUpfdndhfd8438MNFDN93jdnJFkdmqnh893`).
|
|
916
|
+
# If you don't specify a version ID, Amazon S3 copies the latest
|
|
917
|
+
# version of the source object.
|
|
918
|
+
#
|
|
919
|
+
# If you enable versioning on the destination bucket, Amazon S3
|
|
920
|
+
# generates a unique version ID for the copied object. This version ID
|
|
921
|
+
# is different from the version ID of the source object. Amazon S3
|
|
922
|
+
# returns the version ID of the copied object in the `x-amz-version-id`
|
|
923
|
+
# response header in the response.
|
|
924
|
+
#
|
|
925
|
+
# If you do not enable versioning or suspend it on the destination
|
|
926
|
+
# bucket, the version ID that Amazon S3 generates in the
|
|
927
|
+
# `x-amz-version-id` response header is always null.
|
|
928
|
+
#
|
|
929
|
+
# <note markdown="1"> **Directory buckets** - S3 Versioning isn't enabled and supported for
|
|
930
|
+
# directory buckets.
|
|
931
|
+
#
|
|
932
|
+
# </note>
|
|
933
|
+
#
|
|
934
|
+
#
|
|
935
|
+
#
|
|
936
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/access-points.html
|
|
566
937
|
# @option options [String] :copy_source_if_match
|
|
567
938
|
# Copies the object if its entity tag (ETag) matches the specified tag.
|
|
939
|
+
#
|
|
940
|
+
# If both the `x-amz-copy-source-if-match` and
|
|
941
|
+
# `x-amz-copy-source-if-unmodified-since` headers are present in the
|
|
942
|
+
# request and evaluate as follows, Amazon S3 returns `200 OK` and copies
|
|
943
|
+
# the data:
|
|
944
|
+
#
|
|
945
|
+
# * `x-amz-copy-source-if-match` condition evaluates to true
|
|
946
|
+
#
|
|
947
|
+
# * `x-amz-copy-source-if-unmodified-since` condition evaluates to false
|
|
568
948
|
# @option options [Time,DateTime,Date,Integer,String] :copy_source_if_modified_since
|
|
569
949
|
# Copies the object if it has been modified since the specified time.
|
|
950
|
+
#
|
|
951
|
+
# If both the `x-amz-copy-source-if-none-match` and
|
|
952
|
+
# `x-amz-copy-source-if-modified-since` headers are present in the
|
|
953
|
+
# request and evaluate as follows, Amazon S3 returns the `412
|
|
954
|
+
# Precondition Failed` response code:
|
|
955
|
+
#
|
|
956
|
+
# * `x-amz-copy-source-if-none-match` condition evaluates to false
|
|
957
|
+
#
|
|
958
|
+
# * `x-amz-copy-source-if-modified-since` condition evaluates to true
|
|
570
959
|
# @option options [String] :copy_source_if_none_match
|
|
571
960
|
# Copies the object if its entity tag (ETag) is different than the
|
|
572
961
|
# specified ETag.
|
|
962
|
+
#
|
|
963
|
+
# If both the `x-amz-copy-source-if-none-match` and
|
|
964
|
+
# `x-amz-copy-source-if-modified-since` headers are present in the
|
|
965
|
+
# request and evaluate as follows, Amazon S3 returns the `412
|
|
966
|
+
# Precondition Failed` response code:
|
|
967
|
+
#
|
|
968
|
+
# * `x-amz-copy-source-if-none-match` condition evaluates to false
|
|
969
|
+
#
|
|
970
|
+
# * `x-amz-copy-source-if-modified-since` condition evaluates to true
|
|
573
971
|
# @option options [Time,DateTime,Date,Integer,String] :copy_source_if_unmodified_since
|
|
574
972
|
# Copies the object if it hasn't been modified since the specified
|
|
575
973
|
# time.
|
|
974
|
+
#
|
|
975
|
+
# If both the `x-amz-copy-source-if-match` and
|
|
976
|
+
# `x-amz-copy-source-if-unmodified-since` headers are present in the
|
|
977
|
+
# request and evaluate as follows, Amazon S3 returns `200 OK` and copies
|
|
978
|
+
# the data:
|
|
979
|
+
#
|
|
980
|
+
# * `x-amz-copy-source-if-match` condition evaluates to true
|
|
981
|
+
#
|
|
982
|
+
# * `x-amz-copy-source-if-unmodified-since` condition evaluates to false
|
|
576
983
|
# @option options [Time,DateTime,Date,Integer,String] :expires
|
|
577
984
|
# The date and time at which the object is no longer cacheable.
|
|
578
985
|
# @option options [String] :grant_full_control
|
|
579
986
|
# Gives the grantee READ, READ\_ACP, and WRITE\_ACP permissions on the
|
|
580
987
|
# object.
|
|
988
|
+
#
|
|
989
|
+
# <note markdown="1"> * This functionality is not supported for directory buckets.
|
|
990
|
+
#
|
|
991
|
+
# * This functionality is not supported for Amazon S3 on Outposts.
|
|
992
|
+
#
|
|
993
|
+
# </note>
|
|
581
994
|
# @option options [String] :grant_read
|
|
582
995
|
# Allows grantee to read the object data and its metadata.
|
|
996
|
+
#
|
|
997
|
+
# <note markdown="1"> * This functionality is not supported for directory buckets.
|
|
998
|
+
#
|
|
999
|
+
# * This functionality is not supported for Amazon S3 on Outposts.
|
|
1000
|
+
#
|
|
1001
|
+
# </note>
|
|
583
1002
|
# @option options [String] :grant_read_acp
|
|
584
1003
|
# Allows grantee to read the object ACL.
|
|
1004
|
+
#
|
|
1005
|
+
# <note markdown="1"> * This functionality is not supported for directory buckets.
|
|
1006
|
+
#
|
|
1007
|
+
# * This functionality is not supported for Amazon S3 on Outposts.
|
|
1008
|
+
#
|
|
1009
|
+
# </note>
|
|
585
1010
|
# @option options [String] :grant_write_acp
|
|
586
1011
|
# Allows grantee to write the ACL for the applicable object.
|
|
1012
|
+
#
|
|
1013
|
+
# <note markdown="1"> * This functionality is not supported for directory buckets.
|
|
1014
|
+
#
|
|
1015
|
+
# * This functionality is not supported for Amazon S3 on Outposts.
|
|
1016
|
+
#
|
|
1017
|
+
# </note>
|
|
1018
|
+
# @option options [String] :if_match
|
|
1019
|
+
# Copies the object if the entity tag (ETag) of the destination object
|
|
1020
|
+
# matches the specified tag. If the ETag values do not match, the
|
|
1021
|
+
# operation returns a `412 Precondition Failed` error. If a concurrent
|
|
1022
|
+
# operation occurs during the upload S3 returns a `409
|
|
1023
|
+
# ConditionalRequestConflict` response. On a 409 failure you should
|
|
1024
|
+
# fetch the object's ETag and retry the upload.
|
|
1025
|
+
#
|
|
1026
|
+
# Expects the ETag value as a string.
|
|
1027
|
+
#
|
|
1028
|
+
# For more information about conditional requests, see [RFC 7232][1].
|
|
1029
|
+
#
|
|
1030
|
+
#
|
|
1031
|
+
#
|
|
1032
|
+
# [1]: https://tools.ietf.org/html/rfc7232
|
|
1033
|
+
# @option options [String] :if_none_match
|
|
1034
|
+
# Copies the object only if the object key name at the destination does
|
|
1035
|
+
# not already exist in the bucket specified. Otherwise, Amazon S3
|
|
1036
|
+
# returns a `412 Precondition Failed` error. If a concurrent operation
|
|
1037
|
+
# occurs during the upload S3 returns a `409 ConditionalRequestConflict`
|
|
1038
|
+
# response. On a 409 failure you should retry the upload.
|
|
1039
|
+
#
|
|
1040
|
+
# Expects the '*' (asterisk) character.
|
|
1041
|
+
#
|
|
1042
|
+
# For more information about conditional requests, see [RFC 7232][1].
|
|
1043
|
+
#
|
|
1044
|
+
#
|
|
1045
|
+
#
|
|
1046
|
+
# [1]: https://tools.ietf.org/html/rfc7232
|
|
587
1047
|
# @option options [Hash<String,String>] :metadata
|
|
588
1048
|
# A map of metadata to store with the object in S3.
|
|
589
1049
|
# @option options [String] :metadata_directive
|
|
590
1050
|
# Specifies whether the metadata is copied from the source object or
|
|
591
|
-
# replaced with metadata provided in the request.
|
|
1051
|
+
# replaced with metadata that's provided in the request. When copying
|
|
1052
|
+
# an object, you can preserve all metadata (the default) or specify new
|
|
1053
|
+
# metadata. If this header isn’t specified, `COPY` is the default
|
|
1054
|
+
# behavior.
|
|
1055
|
+
#
|
|
1056
|
+
# **General purpose bucket** - For general purpose buckets, when you
|
|
1057
|
+
# grant permissions, you can use the `s3:x-amz-metadata-directive`
|
|
1058
|
+
# condition key to enforce certain metadata behavior when objects are
|
|
1059
|
+
# uploaded. For more information, see [Amazon S3 condition key
|
|
1060
|
+
# examples][1] in the *Amazon S3 User Guide*.
|
|
1061
|
+
#
|
|
1062
|
+
# <note markdown="1"> `x-amz-website-redirect-location` is unique to each object and is not
|
|
1063
|
+
# copied when using the `x-amz-metadata-directive` header. To copy the
|
|
1064
|
+
# value, you must specify `x-amz-website-redirect-location` in the
|
|
1065
|
+
# request header.
|
|
1066
|
+
#
|
|
1067
|
+
# </note>
|
|
1068
|
+
#
|
|
1069
|
+
#
|
|
1070
|
+
#
|
|
1071
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/amazon-s3-policy-keys.html
|
|
592
1072
|
# @option options [String] :tagging_directive
|
|
593
|
-
# Specifies whether the object tag-set
|
|
594
|
-
# or replaced with tag-set provided in the request.
|
|
1073
|
+
# Specifies whether the object tag-set is copied from the source object
|
|
1074
|
+
# or replaced with the tag-set that's provided in the request.
|
|
1075
|
+
#
|
|
1076
|
+
# The default value is `COPY`.
|
|
1077
|
+
#
|
|
1078
|
+
# <note markdown="1"> **Directory buckets** - For directory buckets in a `CopyObject`
|
|
1079
|
+
# operation, only the empty tag-set is supported. Any requests that
|
|
1080
|
+
# attempt to write non-empty tags into directory buckets will receive a
|
|
1081
|
+
# `501 Not Implemented` status code. When the destination bucket is a
|
|
1082
|
+
# directory bucket, you will receive a `501 Not Implemented` response in
|
|
1083
|
+
# any of the following situations:
|
|
1084
|
+
#
|
|
1085
|
+
# * When you attempt to `COPY` the tag-set from an S3 source object that
|
|
1086
|
+
# has non-empty tags.
|
|
1087
|
+
#
|
|
1088
|
+
# * When you attempt to `REPLACE` the tag-set of a source object and set
|
|
1089
|
+
# a non-empty value to `x-amz-tagging`.
|
|
1090
|
+
#
|
|
1091
|
+
# * When you don't set the `x-amz-tagging-directive` header and the
|
|
1092
|
+
# source object has non-empty tags. This is because the default value
|
|
1093
|
+
# of `x-amz-tagging-directive` is `COPY`.
|
|
1094
|
+
#
|
|
1095
|
+
# Because only the empty tag-set is supported for directory buckets in a
|
|
1096
|
+
# `CopyObject` operation, the following situations are allowed:
|
|
1097
|
+
#
|
|
1098
|
+
# * When you attempt to `COPY` the tag-set from a directory bucket
|
|
1099
|
+
# source object that has no tags to a general purpose bucket. It
|
|
1100
|
+
# copies an empty tag-set to the destination object.
|
|
1101
|
+
#
|
|
1102
|
+
# * When you attempt to `REPLACE` the tag-set of a directory bucket
|
|
1103
|
+
# source object and set the `x-amz-tagging` value of the directory
|
|
1104
|
+
# bucket destination object to empty.
|
|
1105
|
+
#
|
|
1106
|
+
# * When you attempt to `REPLACE` the tag-set of a general purpose
|
|
1107
|
+
# bucket source object that has non-empty tags and set the
|
|
1108
|
+
# `x-amz-tagging` value of the directory bucket destination object to
|
|
1109
|
+
# empty.
|
|
1110
|
+
#
|
|
1111
|
+
# * When you attempt to `REPLACE` the tag-set of a directory bucket
|
|
1112
|
+
# source object and don't set the `x-amz-tagging` value of the
|
|
1113
|
+
# directory bucket destination object. This is because the default
|
|
1114
|
+
# value of `x-amz-tagging` is the empty value.
|
|
1115
|
+
#
|
|
1116
|
+
# </note>
|
|
595
1117
|
# @option options [String] :server_side_encryption
|
|
596
1118
|
# The server-side encryption algorithm used when storing this object in
|
|
597
|
-
# Amazon S3
|
|
1119
|
+
# Amazon S3. Unrecognized or unsupported values won’t write a
|
|
1120
|
+
# destination object and will receive a `400 Bad Request` response.
|
|
1121
|
+
#
|
|
1122
|
+
# Amazon S3 automatically encrypts all new objects that are copied to an
|
|
1123
|
+
# S3 bucket. When copying an object, if you don't specify encryption
|
|
1124
|
+
# information in your copy request, the encryption setting of the target
|
|
1125
|
+
# object is set to the default encryption configuration of the
|
|
1126
|
+
# destination bucket. By default, all buckets have a base level of
|
|
1127
|
+
# encryption configuration that uses server-side encryption with Amazon
|
|
1128
|
+
# S3 managed keys (SSE-S3). If the destination bucket has a different
|
|
1129
|
+
# default encryption configuration, Amazon S3 uses the corresponding
|
|
1130
|
+
# encryption key to encrypt the target object copy.
|
|
1131
|
+
#
|
|
1132
|
+
# With server-side encryption, Amazon S3 encrypts your data as it writes
|
|
1133
|
+
# your data to disks in its data centers and decrypts the data when you
|
|
1134
|
+
# access it. For more information about server-side encryption, see
|
|
1135
|
+
# [Using Server-Side Encryption][1] in the *Amazon S3 User Guide*.
|
|
1136
|
+
#
|
|
1137
|
+
# <b>General purpose buckets </b>
|
|
1138
|
+
#
|
|
1139
|
+
# * For general purpose buckets, there are the following supported
|
|
1140
|
+
# options for server-side encryption: server-side encryption with Key
|
|
1141
|
+
# Management Service (KMS) keys (SSE-KMS), dual-layer server-side
|
|
1142
|
+
# encryption with Amazon Web Services KMS keys (DSSE-KMS), and
|
|
1143
|
+
# server-side encryption with customer-provided encryption keys
|
|
1144
|
+
# (SSE-C). Amazon S3 uses the corresponding KMS key, or a
|
|
1145
|
+
# customer-provided key to encrypt the target object copy.
|
|
1146
|
+
#
|
|
1147
|
+
# * When you perform a `CopyObject` operation, if you want to use a
|
|
1148
|
+
# different type of encryption setting for the target object, you can
|
|
1149
|
+
# specify appropriate encryption-related headers to encrypt the target
|
|
1150
|
+
# object with an Amazon S3 managed key, a KMS key, or a
|
|
1151
|
+
# customer-provided key. If the encryption setting in your request is
|
|
1152
|
+
# different from the default encryption configuration of the
|
|
1153
|
+
# destination bucket, the encryption setting in your request takes
|
|
1154
|
+
# precedence.
|
|
1155
|
+
#
|
|
1156
|
+
# <b>Directory buckets </b>
|
|
1157
|
+
#
|
|
1158
|
+
# * For directory buckets, there are only two supported options for
|
|
1159
|
+
# server-side encryption: server-side encryption with Amazon S3
|
|
1160
|
+
# managed keys (SSE-S3) (`AES256`) and server-side encryption with KMS
|
|
1161
|
+
# keys (SSE-KMS) (`aws:kms`). We recommend that the bucket's default
|
|
1162
|
+
# encryption uses the desired encryption configuration and you don't
|
|
1163
|
+
# override the bucket default encryption in your `CreateSession`
|
|
1164
|
+
# requests or `PUT` object requests. Then, new objects are
|
|
1165
|
+
# automatically encrypted with the desired encryption settings. For
|
|
1166
|
+
# more information, see [Protecting data with server-side
|
|
1167
|
+
# encryption][2] in the *Amazon S3 User Guide*. For more information
|
|
1168
|
+
# about the encryption overriding behaviors in directory buckets, see
|
|
1169
|
+
# [Specifying server-side encryption with KMS for new object
|
|
1170
|
+
# uploads][3].
|
|
1171
|
+
#
|
|
1172
|
+
# * To encrypt new object copies to a directory bucket with SSE-KMS, we
|
|
1173
|
+
# recommend you specify SSE-KMS as the directory bucket's default
|
|
1174
|
+
# encryption configuration with a KMS key (specifically, a [customer
|
|
1175
|
+
# managed key][4]). The [Amazon Web Services managed key][5]
|
|
1176
|
+
# (`aws/s3`) isn't supported. Your SSE-KMS configuration can only
|
|
1177
|
+
# support 1 [customer managed key][4] per directory bucket for the
|
|
1178
|
+
# lifetime of the bucket. After you specify a customer managed key for
|
|
1179
|
+
# SSE-KMS, you can't override the customer managed key for the
|
|
1180
|
+
# bucket's SSE-KMS configuration. Then, when you perform a
|
|
1181
|
+
# `CopyObject` operation and want to specify server-side encryption
|
|
1182
|
+
# settings for new object copies with SSE-KMS in the
|
|
1183
|
+
# encryption-related request headers, you must ensure the encryption
|
|
1184
|
+
# key is the same customer managed key that you specified for the
|
|
1185
|
+
# directory bucket's default encryption configuration.
|
|
1186
|
+
#
|
|
1187
|
+
# * <b>S3 access points for Amazon FSx </b> - When accessing data stored
|
|
1188
|
+
# in Amazon FSx file systems using S3 access points, the only valid
|
|
1189
|
+
# server side encryption option is `aws:fsx`. All Amazon FSx file
|
|
1190
|
+
# systems have encryption configured by default and are encrypted at
|
|
1191
|
+
# rest. Data is automatically encrypted before being written to the
|
|
1192
|
+
# file system, and automatically decrypted as it is read. These
|
|
1193
|
+
# processes are handled transparently by Amazon FSx.
|
|
1194
|
+
#
|
|
1195
|
+
#
|
|
1196
|
+
#
|
|
1197
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/serv-side-encryption.html
|
|
1198
|
+
# [2]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-serv-side-encryption.html
|
|
1199
|
+
# [3]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-specifying-kms-encryption.html
|
|
1200
|
+
# [4]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#customer-cmk
|
|
1201
|
+
# [5]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-managed-cmk
|
|
598
1202
|
# @option options [String] :storage_class
|
|
599
|
-
#
|
|
1203
|
+
# If the `x-amz-storage-class` header is not used, the copied object
|
|
1204
|
+
# will be stored in the `STANDARD` Storage Class by default. The
|
|
1205
|
+
# `STANDARD` storage class provides high durability and high
|
|
1206
|
+
# availability. Depending on performance needs, you can specify a
|
|
1207
|
+
# different Storage Class.
|
|
1208
|
+
#
|
|
1209
|
+
# <note markdown="1"> * <b>Directory buckets </b> - Directory buckets only support
|
|
1210
|
+
# `EXPRESS_ONEZONE` (the S3 Express One Zone storage class) in
|
|
1211
|
+
# Availability Zones and `ONEZONE_IA` (the S3 One Zone-Infrequent
|
|
1212
|
+
# Access storage class) in Dedicated Local Zones. Unsupported storage
|
|
1213
|
+
# class values won't write a destination object and will respond with
|
|
1214
|
+
# the HTTP status code `400 Bad Request`.
|
|
1215
|
+
#
|
|
1216
|
+
# * <b>Amazon S3 on Outposts </b> - S3 on Outposts only uses the
|
|
1217
|
+
# `OUTPOSTS` Storage Class.
|
|
1218
|
+
#
|
|
1219
|
+
# </note>
|
|
1220
|
+
#
|
|
1221
|
+
# You can use the `CopyObject` action to change the storage class of an
|
|
1222
|
+
# object that is already stored in Amazon S3 by using the
|
|
1223
|
+
# `x-amz-storage-class` header. For more information, see [Storage
|
|
1224
|
+
# Classes][1] in the *Amazon S3 User Guide*.
|
|
1225
|
+
#
|
|
1226
|
+
# Before using an object as a source object for the copy operation, you
|
|
1227
|
+
# must restore a copy of it if it meets any of the following conditions:
|
|
1228
|
+
#
|
|
1229
|
+
# * The storage class of the source object is `GLACIER` or
|
|
1230
|
+
# `DEEP_ARCHIVE`.
|
|
1231
|
+
#
|
|
1232
|
+
# * The storage class of the source object is `INTELLIGENT_TIERING` and
|
|
1233
|
+
# it's [S3 Intelligent-Tiering access tier][2] is `Archive Access` or
|
|
1234
|
+
# `Deep Archive Access`.
|
|
1235
|
+
#
|
|
1236
|
+
# For more information, see [RestoreObject][3] and [Copying Objects][4]
|
|
1237
|
+
# in the *Amazon S3 User Guide*.
|
|
1238
|
+
#
|
|
1239
|
+
#
|
|
1240
|
+
#
|
|
1241
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html
|
|
1242
|
+
# [2]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/intelligent-tiering-overview.html#intel-tiering-tier-definition
|
|
1243
|
+
# [3]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_RestoreObject.html
|
|
1244
|
+
# [4]: https://docs.aws.amazon.com/AmazonS3/latest/dev/CopyingObjectsExamples.html
|
|
600
1245
|
# @option options [String] :website_redirect_location
|
|
601
|
-
# If the bucket is configured as a website, redirects
|
|
602
|
-
# object to another object in the same bucket or
|
|
603
|
-
# Amazon S3 stores the value of this header in the
|
|
1246
|
+
# If the destination bucket is configured as a website, redirects
|
|
1247
|
+
# requests for this object copy to another object in the same bucket or
|
|
1248
|
+
# to an external URL. Amazon S3 stores the value of this header in the
|
|
1249
|
+
# object metadata. This value is unique to each object and is not copied
|
|
1250
|
+
# when using the `x-amz-metadata-directive` header. Instead, you may opt
|
|
1251
|
+
# to provide this header in combination with the
|
|
1252
|
+
# `x-amz-metadata-directive` header.
|
|
1253
|
+
#
|
|
1254
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
|
1255
|
+
#
|
|
1256
|
+
# </note>
|
|
604
1257
|
# @option options [String] :sse_customer_algorithm
|
|
605
|
-
# Specifies the algorithm to use
|
|
606
|
-
# example, AES256).
|
|
1258
|
+
# Specifies the algorithm to use when encrypting the object (for
|
|
1259
|
+
# example, `AES256`).
|
|
1260
|
+
#
|
|
1261
|
+
# When you perform a `CopyObject` operation, if you want to use a
|
|
1262
|
+
# different type of encryption setting for the target object, you can
|
|
1263
|
+
# specify appropriate encryption-related headers to encrypt the target
|
|
1264
|
+
# object with an Amazon S3 managed key, a KMS key, or a
|
|
1265
|
+
# customer-provided key. If the encryption setting in your request is
|
|
1266
|
+
# different from the default encryption configuration of the destination
|
|
1267
|
+
# bucket, the encryption setting in your request takes precedence.
|
|
1268
|
+
#
|
|
1269
|
+
# <note markdown="1"> This functionality is not supported when the destination bucket is a
|
|
1270
|
+
# directory bucket.
|
|
1271
|
+
#
|
|
1272
|
+
# </note>
|
|
607
1273
|
# @option options [String] :sse_customer_key
|
|
608
1274
|
# Specifies the customer-provided encryption key for Amazon S3 to use in
|
|
609
1275
|
# encrypting data. This value is used to store the object and then it is
|
|
610
|
-
# discarded
|
|
1276
|
+
# discarded. Amazon S3 does not store the encryption key. The key must
|
|
611
1277
|
# be appropriate for use with the algorithm specified in the
|
|
612
|
-
# `x-amz-server-side
|
|
1278
|
+
# `x-amz-server-side-encryption-customer-algorithm` header.
|
|
1279
|
+
#
|
|
1280
|
+
# <note markdown="1"> This functionality is not supported when the destination bucket is a
|
|
1281
|
+
# directory bucket.
|
|
1282
|
+
#
|
|
1283
|
+
# </note>
|
|
613
1284
|
# @option options [String] :sse_customer_key_md5
|
|
614
1285
|
# Specifies the 128-bit MD5 digest of the encryption key according to
|
|
615
1286
|
# RFC 1321. Amazon S3 uses this header for a message integrity check to
|
|
616
1287
|
# ensure that the encryption key was transmitted without error.
|
|
1288
|
+
#
|
|
1289
|
+
# <note markdown="1"> This functionality is not supported when the destination bucket is a
|
|
1290
|
+
# directory bucket.
|
|
1291
|
+
#
|
|
1292
|
+
# </note>
|
|
617
1293
|
# @option options [String] :ssekms_key_id
|
|
618
|
-
# Specifies the
|
|
619
|
-
# PUT requests for an object protected by
|
|
620
|
-
# via SSL or using SigV4. For
|
|
621
|
-
#
|
|
622
|
-
#
|
|
623
|
-
#
|
|
1294
|
+
# Specifies the KMS key ID (Key ID, Key ARN, or Key Alias) to use for
|
|
1295
|
+
# object encryption. All GET and PUT requests for an object protected by
|
|
1296
|
+
# KMS will fail if they're not made via SSL or using SigV4. For
|
|
1297
|
+
# information about configuring any of the officially supported Amazon
|
|
1298
|
+
# Web Services SDKs and Amazon Web Services CLI, see [Specifying the
|
|
1299
|
+
# Signature Version in Request Authentication][1] in the *Amazon S3 User
|
|
1300
|
+
# Guide*.
|
|
1301
|
+
#
|
|
1302
|
+
# **Directory buckets** - To encrypt data using SSE-KMS, it's
|
|
1303
|
+
# recommended to specify the `x-amz-server-side-encryption` header to
|
|
1304
|
+
# `aws:kms`. Then, the `x-amz-server-side-encryption-aws-kms-key-id`
|
|
1305
|
+
# header implicitly uses the bucket's default KMS customer managed key
|
|
1306
|
+
# ID. If you want to explicitly set the `
|
|
1307
|
+
# x-amz-server-side-encryption-aws-kms-key-id` header, it must match the
|
|
1308
|
+
# bucket's default customer managed key (using key ID or ARN, not
|
|
1309
|
+
# alias). Your SSE-KMS configuration can only support 1 [customer
|
|
1310
|
+
# managed key][2] per directory bucket's lifetime. The [Amazon Web
|
|
1311
|
+
# Services managed key][3] (`aws/s3`) isn't supported. Incorrect key
|
|
1312
|
+
# specification results in an HTTP `400 Bad Request` error.
|
|
624
1313
|
#
|
|
625
1314
|
#
|
|
626
1315
|
#
|
|
627
1316
|
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingAWSSDK.html#specify-signature-version
|
|
1317
|
+
# [2]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#customer-cmk
|
|
1318
|
+
# [3]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-managed-cmk
|
|
628
1319
|
# @option options [String] :ssekms_encryption_context
|
|
629
|
-
# Specifies the
|
|
630
|
-
#
|
|
631
|
-
#
|
|
1320
|
+
# Specifies the Amazon Web Services KMS Encryption Context as an
|
|
1321
|
+
# additional encryption context to use for the destination object
|
|
1322
|
+
# encryption. The value of this header is a base64-encoded UTF-8 string
|
|
1323
|
+
# holding JSON with the encryption context key-value pairs.
|
|
1324
|
+
#
|
|
1325
|
+
# **General purpose buckets** - This value must be explicitly added to
|
|
1326
|
+
# specify encryption context for `CopyObject` requests if you want an
|
|
1327
|
+
# additional encryption context for your destination object. The
|
|
1328
|
+
# additional encryption context of the source object won't be copied to
|
|
1329
|
+
# the destination object. For more information, see [Encryption
|
|
1330
|
+
# context][1] in the *Amazon S3 User Guide*.
|
|
1331
|
+
#
|
|
1332
|
+
# **Directory buckets** - You can optionally provide an explicit
|
|
1333
|
+
# encryption context value. The value must match the default encryption
|
|
1334
|
+
# context - the bucket Amazon Resource Name (ARN). An additional
|
|
1335
|
+
# encryption context value is not supported.
|
|
1336
|
+
#
|
|
1337
|
+
#
|
|
1338
|
+
#
|
|
1339
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/UsingKMSEncryption.html#encryption-context
|
|
1340
|
+
# @option options [Boolean] :bucket_key_enabled
|
|
1341
|
+
# Specifies whether Amazon S3 should use an S3 Bucket Key for object
|
|
1342
|
+
# encryption with server-side encryption using Key Management Service
|
|
1343
|
+
# (KMS) keys (SSE-KMS). If a target object uses SSE-KMS, you can enable
|
|
1344
|
+
# an S3 Bucket Key for the object.
|
|
1345
|
+
#
|
|
1346
|
+
# Setting this header to `true` causes Amazon S3 to use an S3 Bucket Key
|
|
1347
|
+
# for object encryption with SSE-KMS. Specifying this header with a COPY
|
|
1348
|
+
# action doesn’t affect bucket-level settings for S3 Bucket Key.
|
|
1349
|
+
#
|
|
1350
|
+
# For more information, see [Amazon S3 Bucket Keys][1] in the *Amazon S3
|
|
1351
|
+
# User Guide*.
|
|
1352
|
+
#
|
|
1353
|
+
# <note markdown="1"> **Directory buckets** - S3 Bucket Keys aren't supported, when you
|
|
1354
|
+
# copy SSE-KMS encrypted objects from general purpose buckets to
|
|
1355
|
+
# directory buckets, from directory buckets to general purpose buckets,
|
|
1356
|
+
# or between directory buckets, through [CopyObject][2]. In this case,
|
|
1357
|
+
# Amazon S3 makes a call to KMS every time a copy request is made for a
|
|
1358
|
+
# KMS-encrypted object.
|
|
1359
|
+
#
|
|
1360
|
+
# </note>
|
|
1361
|
+
#
|
|
1362
|
+
#
|
|
1363
|
+
#
|
|
1364
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/bucket-key.html
|
|
1365
|
+
# [2]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_CopyObject.html
|
|
632
1366
|
# @option options [String] :copy_source_sse_customer_algorithm
|
|
633
1367
|
# Specifies the algorithm to use when decrypting the source object (for
|
|
634
|
-
# example, AES256).
|
|
1368
|
+
# example, `AES256`).
|
|
1369
|
+
#
|
|
1370
|
+
# If the source object for the copy is stored in Amazon S3 using SSE-C,
|
|
1371
|
+
# you must provide the necessary encryption information in your request
|
|
1372
|
+
# so that Amazon S3 can decrypt the object for copying.
|
|
1373
|
+
#
|
|
1374
|
+
# <note markdown="1"> This functionality is not supported when the source object is in a
|
|
1375
|
+
# directory bucket.
|
|
1376
|
+
#
|
|
1377
|
+
# </note>
|
|
635
1378
|
# @option options [String] :copy_source_sse_customer_key
|
|
636
1379
|
# Specifies the customer-provided encryption key for Amazon S3 to use to
|
|
637
1380
|
# decrypt the source object. The encryption key provided in this header
|
|
638
|
-
# must be one that was used when the source object was created.
|
|
1381
|
+
# must be the same one that was used when the source object was created.
|
|
1382
|
+
#
|
|
1383
|
+
# If the source object for the copy is stored in Amazon S3 using SSE-C,
|
|
1384
|
+
# you must provide the necessary encryption information in your request
|
|
1385
|
+
# so that Amazon S3 can decrypt the object for copying.
|
|
1386
|
+
#
|
|
1387
|
+
# <note markdown="1"> This functionality is not supported when the source object is in a
|
|
1388
|
+
# directory bucket.
|
|
1389
|
+
#
|
|
1390
|
+
# </note>
|
|
639
1391
|
# @option options [String] :copy_source_sse_customer_key_md5
|
|
640
1392
|
# Specifies the 128-bit MD5 digest of the encryption key according to
|
|
641
1393
|
# RFC 1321. Amazon S3 uses this header for a message integrity check to
|
|
642
1394
|
# ensure that the encryption key was transmitted without error.
|
|
1395
|
+
#
|
|
1396
|
+
# If the source object for the copy is stored in Amazon S3 using SSE-C,
|
|
1397
|
+
# you must provide the necessary encryption information in your request
|
|
1398
|
+
# so that Amazon S3 can decrypt the object for copying.
|
|
1399
|
+
#
|
|
1400
|
+
# <note markdown="1"> This functionality is not supported when the source object is in a
|
|
1401
|
+
# directory bucket.
|
|
1402
|
+
#
|
|
1403
|
+
# </note>
|
|
643
1404
|
# @option options [String] :request_payer
|
|
644
1405
|
# Confirms that the requester knows that they will be charged for the
|
|
645
1406
|
# request. Bucket owners need not specify this parameter in their
|
|
646
|
-
# requests.
|
|
647
|
-
#
|
|
648
|
-
#
|
|
1407
|
+
# requests. If either the source or destination S3 bucket has Requester
|
|
1408
|
+
# Pays enabled, the requester will pay for corresponding charges to copy
|
|
1409
|
+
# the object. For information about downloading objects from Requester
|
|
1410
|
+
# Pays buckets, see [Downloading Objects in Requester Pays Buckets][1]
|
|
1411
|
+
# in the *Amazon S3 User Guide*.
|
|
1412
|
+
#
|
|
1413
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
|
1414
|
+
#
|
|
1415
|
+
# </note>
|
|
649
1416
|
#
|
|
650
1417
|
#
|
|
651
1418
|
#
|
|
652
1419
|
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
|
|
653
1420
|
# @option options [String] :tagging
|
|
654
|
-
# The tag-set for the object
|
|
655
|
-
# in conjunction with the `
|
|
656
|
-
#
|
|
1421
|
+
# The tag-set for the object copy in the destination bucket. This value
|
|
1422
|
+
# must be used in conjunction with the `x-amz-tagging-directive` if you
|
|
1423
|
+
# choose `REPLACE` for the `x-amz-tagging-directive`. If you choose
|
|
1424
|
+
# `COPY` for the `x-amz-tagging-directive`, you don't need to set the
|
|
1425
|
+
# `x-amz-tagging` header, because the tag-set will be copied from the
|
|
1426
|
+
# source object directly. The tag-set must be encoded as URL Query
|
|
1427
|
+
# parameters.
|
|
1428
|
+
#
|
|
1429
|
+
# The default value is the empty value.
|
|
1430
|
+
#
|
|
1431
|
+
# <note markdown="1"> **Directory buckets** - For directory buckets in a `CopyObject`
|
|
1432
|
+
# operation, only the empty tag-set is supported. Any requests that
|
|
1433
|
+
# attempt to write non-empty tags into directory buckets will receive a
|
|
1434
|
+
# `501 Not Implemented` status code. When the destination bucket is a
|
|
1435
|
+
# directory bucket, you will receive a `501 Not Implemented` response in
|
|
1436
|
+
# any of the following situations:
|
|
1437
|
+
#
|
|
1438
|
+
# * When you attempt to `COPY` the tag-set from an S3 source object that
|
|
1439
|
+
# has non-empty tags.
|
|
1440
|
+
#
|
|
1441
|
+
# * When you attempt to `REPLACE` the tag-set of a source object and set
|
|
1442
|
+
# a non-empty value to `x-amz-tagging`.
|
|
1443
|
+
#
|
|
1444
|
+
# * When you don't set the `x-amz-tagging-directive` header and the
|
|
1445
|
+
# source object has non-empty tags. This is because the default value
|
|
1446
|
+
# of `x-amz-tagging-directive` is `COPY`.
|
|
1447
|
+
#
|
|
1448
|
+
# Because only the empty tag-set is supported for directory buckets in a
|
|
1449
|
+
# `CopyObject` operation, the following situations are allowed:
|
|
1450
|
+
#
|
|
1451
|
+
# * When you attempt to `COPY` the tag-set from a directory bucket
|
|
1452
|
+
# source object that has no tags to a general purpose bucket. It
|
|
1453
|
+
# copies an empty tag-set to the destination object.
|
|
1454
|
+
#
|
|
1455
|
+
# * When you attempt to `REPLACE` the tag-set of a directory bucket
|
|
1456
|
+
# source object and set the `x-amz-tagging` value of the directory
|
|
1457
|
+
# bucket destination object to empty.
|
|
1458
|
+
#
|
|
1459
|
+
# * When you attempt to `REPLACE` the tag-set of a general purpose
|
|
1460
|
+
# bucket source object that has non-empty tags and set the
|
|
1461
|
+
# `x-amz-tagging` value of the directory bucket destination object to
|
|
1462
|
+
# empty.
|
|
1463
|
+
#
|
|
1464
|
+
# * When you attempt to `REPLACE` the tag-set of a directory bucket
|
|
1465
|
+
# source object and don't set the `x-amz-tagging` value of the
|
|
1466
|
+
# directory bucket destination object. This is because the default
|
|
1467
|
+
# value of `x-amz-tagging` is the empty value.
|
|
1468
|
+
#
|
|
1469
|
+
# </note>
|
|
657
1470
|
# @option options [String] :object_lock_mode
|
|
658
|
-
# The Object Lock mode that you want to apply to the
|
|
1471
|
+
# The Object Lock mode that you want to apply to the object copy.
|
|
1472
|
+
#
|
|
1473
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
|
1474
|
+
#
|
|
1475
|
+
# </note>
|
|
659
1476
|
# @option options [Time,DateTime,Date,Integer,String] :object_lock_retain_until_date
|
|
660
|
-
# The date and time when you want the
|
|
1477
|
+
# The date and time when you want the Object Lock of the object copy to
|
|
661
1478
|
# expire.
|
|
1479
|
+
#
|
|
1480
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
|
1481
|
+
#
|
|
1482
|
+
# </note>
|
|
662
1483
|
# @option options [String] :object_lock_legal_hold_status
|
|
663
|
-
# Specifies whether you want to apply a
|
|
1484
|
+
# Specifies whether you want to apply a legal hold to the object copy.
|
|
1485
|
+
#
|
|
1486
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
|
1487
|
+
#
|
|
1488
|
+
# </note>
|
|
1489
|
+
# @option options [String] :expected_bucket_owner
|
|
1490
|
+
# The account ID of the expected destination bucket owner. If the
|
|
1491
|
+
# account ID that you provide does not match the actual owner of the
|
|
1492
|
+
# destination bucket, the request fails with the HTTP status code `403
|
|
1493
|
+
# Forbidden` (access denied).
|
|
1494
|
+
# @option options [String] :expected_source_bucket_owner
|
|
1495
|
+
# The account ID of the expected source bucket owner. If the account ID
|
|
1496
|
+
# that you provide does not match the actual owner of the source bucket,
|
|
1497
|
+
# the request fails with the HTTP status code `403 Forbidden` (access
|
|
1498
|
+
# denied).
|
|
664
1499
|
# @return [Types::CopyObjectOutput]
|
|
665
1500
|
def copy_from(options = {})
|
|
666
1501
|
options = options.merge(
|
|
667
1502
|
bucket: @bucket_name,
|
|
668
1503
|
key: @key
|
|
669
1504
|
)
|
|
670
|
-
resp =
|
|
1505
|
+
resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
|
1506
|
+
@client.copy_object(options)
|
|
1507
|
+
end
|
|
671
1508
|
resp.data
|
|
672
1509
|
end
|
|
673
1510
|
|
|
@@ -678,6 +1515,10 @@ module Aws::S3
|
|
|
678
1515
|
# version_id: "ObjectVersionId",
|
|
679
1516
|
# request_payer: "requester", # accepts requester
|
|
680
1517
|
# bypass_governance_retention: false,
|
|
1518
|
+
# expected_bucket_owner: "AccountId",
|
|
1519
|
+
# if_match: "IfMatch",
|
|
1520
|
+
# if_match_last_modified_time: Time.now,
|
|
1521
|
+
# if_match_size: 1,
|
|
681
1522
|
# })
|
|
682
1523
|
# @param [Hash] options ({})
|
|
683
1524
|
# @option options [String] :mfa
|
|
@@ -685,28 +1526,92 @@ module Aws::S3
|
|
|
685
1526
|
# space, and the value that is displayed on your authentication device.
|
|
686
1527
|
# Required to permanently delete a versioned object if versioning is
|
|
687
1528
|
# configured with MFA delete enabled.
|
|
688
|
-
#
|
|
689
|
-
#
|
|
1529
|
+
#
|
|
1530
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
|
1531
|
+
#
|
|
1532
|
+
# </note>
|
|
1533
|
+
# @option options [String] :version_id
|
|
1534
|
+
# Version ID used to reference a specific version of the object.
|
|
1535
|
+
#
|
|
1536
|
+
# <note markdown="1"> For directory buckets in this API operation, only the `null` value of
|
|
1537
|
+
# the version ID is supported.
|
|
1538
|
+
#
|
|
1539
|
+
# </note>
|
|
690
1540
|
# @option options [String] :request_payer
|
|
691
1541
|
# Confirms that the requester knows that they will be charged for the
|
|
692
1542
|
# request. Bucket owners need not specify this parameter in their
|
|
693
|
-
# requests.
|
|
694
|
-
#
|
|
695
|
-
#
|
|
1543
|
+
# requests. If either the source or destination S3 bucket has Requester
|
|
1544
|
+
# Pays enabled, the requester will pay for corresponding charges to copy
|
|
1545
|
+
# the object. For information about downloading objects from Requester
|
|
1546
|
+
# Pays buckets, see [Downloading Objects in Requester Pays Buckets][1]
|
|
1547
|
+
# in the *Amazon S3 User Guide*.
|
|
1548
|
+
#
|
|
1549
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
|
1550
|
+
#
|
|
1551
|
+
# </note>
|
|
696
1552
|
#
|
|
697
1553
|
#
|
|
698
1554
|
#
|
|
699
1555
|
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
|
|
700
1556
|
# @option options [Boolean] :bypass_governance_retention
|
|
701
1557
|
# Indicates whether S3 Object Lock should bypass Governance-mode
|
|
702
|
-
# restrictions to process this operation.
|
|
1558
|
+
# restrictions to process this operation. To use this header, you must
|
|
1559
|
+
# have the `s3:BypassGovernanceRetention` permission.
|
|
1560
|
+
#
|
|
1561
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
|
1562
|
+
#
|
|
1563
|
+
# </note>
|
|
1564
|
+
# @option options [String] :expected_bucket_owner
|
|
1565
|
+
# The account ID of the expected bucket owner. If the account ID that
|
|
1566
|
+
# you provide does not match the actual owner of the bucket, the request
|
|
1567
|
+
# fails with the HTTP status code `403 Forbidden` (access denied).
|
|
1568
|
+
# @option options [String] :if_match
|
|
1569
|
+
# Deletes the object if the ETag (entity tag) value provided during the
|
|
1570
|
+
# delete operation matches the ETag of the object in S3. If the ETag
|
|
1571
|
+
# values do not match, the operation returns a `412 Precondition Failed`
|
|
1572
|
+
# error.
|
|
1573
|
+
#
|
|
1574
|
+
# Expects the ETag value as a string. `If-Match` does accept a string
|
|
1575
|
+
# value of an '*' (asterisk) character to denote a match of any ETag.
|
|
1576
|
+
#
|
|
1577
|
+
# For more information about conditional requests, see [RFC 7232][1].
|
|
1578
|
+
#
|
|
1579
|
+
#
|
|
1580
|
+
#
|
|
1581
|
+
# [1]: https://tools.ietf.org/html/rfc7232
|
|
1582
|
+
# @option options [Time,DateTime,Date,Integer,String] :if_match_last_modified_time
|
|
1583
|
+
# If present, the object is deleted only if its modification times
|
|
1584
|
+
# matches the provided `Timestamp`. If the `Timestamp` values do not
|
|
1585
|
+
# match, the operation returns a `412 Precondition Failed` error. If the
|
|
1586
|
+
# `Timestamp` matches or if the object doesn’t exist, the operation
|
|
1587
|
+
# returns a `204 Success (No Content)` response.
|
|
1588
|
+
#
|
|
1589
|
+
# <note markdown="1"> This functionality is only supported for directory buckets.
|
|
1590
|
+
#
|
|
1591
|
+
# </note>
|
|
1592
|
+
# @option options [Integer] :if_match_size
|
|
1593
|
+
# If present, the object is deleted only if its size matches the
|
|
1594
|
+
# provided size in bytes. If the `Size` value does not match, the
|
|
1595
|
+
# operation returns a `412 Precondition Failed` error. If the `Size`
|
|
1596
|
+
# matches or if the object doesn’t exist, the operation returns a `204
|
|
1597
|
+
# Success (No Content)` response.
|
|
1598
|
+
#
|
|
1599
|
+
# <note markdown="1"> This functionality is only supported for directory buckets.
|
|
1600
|
+
#
|
|
1601
|
+
# </note>
|
|
1602
|
+
#
|
|
1603
|
+
# You can use the `If-Match`, `x-amz-if-match-last-modified-time` and
|
|
1604
|
+
# `x-amz-if-match-size` conditional headers in conjunction with
|
|
1605
|
+
# each-other or individually.
|
|
703
1606
|
# @return [Types::DeleteObjectOutput]
|
|
704
1607
|
def delete(options = {})
|
|
705
1608
|
options = options.merge(
|
|
706
1609
|
bucket: @bucket_name,
|
|
707
1610
|
key: @key
|
|
708
1611
|
)
|
|
709
|
-
resp =
|
|
1612
|
+
resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
|
1613
|
+
@client.delete_object(options)
|
|
1614
|
+
end
|
|
710
1615
|
resp.data
|
|
711
1616
|
end
|
|
712
1617
|
|
|
@@ -730,24 +1635,72 @@ module Aws::S3
|
|
|
730
1635
|
# sse_customer_key_md5: "SSECustomerKeyMD5",
|
|
731
1636
|
# request_payer: "requester", # accepts requester
|
|
732
1637
|
# part_number: 1,
|
|
1638
|
+
# expected_bucket_owner: "AccountId",
|
|
1639
|
+
# checksum_mode: "ENABLED", # accepts ENABLED
|
|
733
1640
|
# })
|
|
734
1641
|
# @param [Hash] options ({})
|
|
735
1642
|
# @option options [String] :if_match
|
|
736
1643
|
# Return the object only if its entity tag (ETag) is the same as the one
|
|
737
|
-
# specified
|
|
1644
|
+
# specified in this header; otherwise, return a `412 Precondition
|
|
1645
|
+
# Failed` error.
|
|
1646
|
+
#
|
|
1647
|
+
# If both of the `If-Match` and `If-Unmodified-Since` headers are
|
|
1648
|
+
# present in the request as follows: `If-Match` condition evaluates to
|
|
1649
|
+
# `true`, and; `If-Unmodified-Since` condition evaluates to `false`;
|
|
1650
|
+
# then, S3 returns `200 OK` and the data requested.
|
|
1651
|
+
#
|
|
1652
|
+
# For more information about conditional requests, see [RFC 7232][1].
|
|
1653
|
+
#
|
|
1654
|
+
#
|
|
1655
|
+
#
|
|
1656
|
+
# [1]: https://tools.ietf.org/html/rfc7232
|
|
738
1657
|
# @option options [Time,DateTime,Date,Integer,String] :if_modified_since
|
|
739
1658
|
# Return the object only if it has been modified since the specified
|
|
740
|
-
# time
|
|
1659
|
+
# time; otherwise, return a `304 Not Modified` error.
|
|
1660
|
+
#
|
|
1661
|
+
# If both of the `If-None-Match` and `If-Modified-Since` headers are
|
|
1662
|
+
# present in the request as follows:` If-None-Match` condition evaluates
|
|
1663
|
+
# to `false`, and; `If-Modified-Since` condition evaluates to `true`;
|
|
1664
|
+
# then, S3 returns `304 Not Modified` status code.
|
|
1665
|
+
#
|
|
1666
|
+
# For more information about conditional requests, see [RFC 7232][1].
|
|
1667
|
+
#
|
|
1668
|
+
#
|
|
1669
|
+
#
|
|
1670
|
+
# [1]: https://tools.ietf.org/html/rfc7232
|
|
741
1671
|
# @option options [String] :if_none_match
|
|
742
1672
|
# Return the object only if its entity tag (ETag) is different from the
|
|
743
|
-
# one specified
|
|
1673
|
+
# one specified in this header; otherwise, return a `304 Not Modified`
|
|
1674
|
+
# error.
|
|
1675
|
+
#
|
|
1676
|
+
# If both of the `If-None-Match` and `If-Modified-Since` headers are
|
|
1677
|
+
# present in the request as follows:` If-None-Match` condition evaluates
|
|
1678
|
+
# to `false`, and; `If-Modified-Since` condition evaluates to `true`;
|
|
1679
|
+
# then, S3 returns `304 Not Modified` HTTP status code.
|
|
1680
|
+
#
|
|
1681
|
+
# For more information about conditional requests, see [RFC 7232][1].
|
|
1682
|
+
#
|
|
1683
|
+
#
|
|
1684
|
+
#
|
|
1685
|
+
# [1]: https://tools.ietf.org/html/rfc7232
|
|
744
1686
|
# @option options [Time,DateTime,Date,Integer,String] :if_unmodified_since
|
|
745
1687
|
# Return the object only if it has not been modified since the specified
|
|
746
|
-
# time
|
|
1688
|
+
# time; otherwise, return a `412 Precondition Failed` error.
|
|
1689
|
+
#
|
|
1690
|
+
# If both of the `If-Match` and `If-Unmodified-Since` headers are
|
|
1691
|
+
# present in the request as follows: `If-Match` condition evaluates to
|
|
1692
|
+
# `true`, and; `If-Unmodified-Since` condition evaluates to `false`;
|
|
1693
|
+
# then, S3 returns `200 OK` and the data requested.
|
|
1694
|
+
#
|
|
1695
|
+
# For more information about conditional requests, see [RFC 7232][1].
|
|
1696
|
+
#
|
|
1697
|
+
#
|
|
1698
|
+
#
|
|
1699
|
+
# [1]: https://tools.ietf.org/html/rfc7232
|
|
747
1700
|
# @option options [String] :range
|
|
748
|
-
# Downloads the specified range
|
|
1701
|
+
# Downloads the specified byte range of an object. For more information
|
|
749
1702
|
# about the HTTP Range header, see
|
|
750
|
-
# [https://www.
|
|
1703
|
+
# [https://www.rfc-editor.org/rfc/rfc9110.html#name-range][1].
|
|
751
1704
|
#
|
|
752
1705
|
# <note markdown="1"> Amazon S3 doesn't support retrieving multiple ranges of data per
|
|
753
1706
|
# `GET` request.
|
|
@@ -756,11 +1709,11 @@ module Aws::S3
|
|
|
756
1709
|
#
|
|
757
1710
|
#
|
|
758
1711
|
#
|
|
759
|
-
# [1]: https://www.
|
|
1712
|
+
# [1]: https://www.rfc-editor.org/rfc/rfc9110.html#name-range
|
|
760
1713
|
# @option options [String] :response_cache_control
|
|
761
1714
|
# Sets the `Cache-Control` header of the response.
|
|
762
1715
|
# @option options [String] :response_content_disposition
|
|
763
|
-
# Sets the `Content-Disposition` header of the response
|
|
1716
|
+
# Sets the `Content-Disposition` header of the response.
|
|
764
1717
|
# @option options [String] :response_content_encoding
|
|
765
1718
|
# Sets the `Content-Encoding` header of the response.
|
|
766
1719
|
# @option options [String] :response_content_language
|
|
@@ -770,26 +1723,127 @@ module Aws::S3
|
|
|
770
1723
|
# @option options [Time,DateTime,Date,Integer,String] :response_expires
|
|
771
1724
|
# Sets the `Expires` header of the response.
|
|
772
1725
|
# @option options [String] :version_id
|
|
773
|
-
#
|
|
1726
|
+
# Version ID used to reference a specific version of the object.
|
|
1727
|
+
#
|
|
1728
|
+
# By default, the `GetObject` operation returns the current version of
|
|
1729
|
+
# an object. To return a different version, use the `versionId`
|
|
1730
|
+
# subresource.
|
|
1731
|
+
#
|
|
1732
|
+
# <note markdown="1"> * If you include a `versionId` in your request header, you must have
|
|
1733
|
+
# the `s3:GetObjectVersion` permission to access a specific version of
|
|
1734
|
+
# an object. The `s3:GetObject` permission is not required in this
|
|
1735
|
+
# scenario.
|
|
1736
|
+
#
|
|
1737
|
+
# * If you request the current version of an object without a specific
|
|
1738
|
+
# `versionId` in the request header, only the `s3:GetObject`
|
|
1739
|
+
# permission is required. The `s3:GetObjectVersion` permission is not
|
|
1740
|
+
# required in this scenario.
|
|
1741
|
+
#
|
|
1742
|
+
# * **Directory buckets** - S3 Versioning isn't enabled and supported
|
|
1743
|
+
# for directory buckets. For this API operation, only the `null` value
|
|
1744
|
+
# of the version ID is supported by directory buckets. You can only
|
|
1745
|
+
# specify `null` to the `versionId` query parameter in the request.
|
|
1746
|
+
#
|
|
1747
|
+
# </note>
|
|
1748
|
+
#
|
|
1749
|
+
# For more information about versioning, see [PutBucketVersioning][1].
|
|
1750
|
+
#
|
|
1751
|
+
#
|
|
1752
|
+
#
|
|
1753
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketVersioning.html
|
|
774
1754
|
# @option options [String] :sse_customer_algorithm
|
|
775
|
-
# Specifies the algorithm to use
|
|
776
|
-
# example, AES256).
|
|
1755
|
+
# Specifies the algorithm to use when decrypting the object (for
|
|
1756
|
+
# example, `AES256`).
|
|
1757
|
+
#
|
|
1758
|
+
# If you encrypt an object by using server-side encryption with
|
|
1759
|
+
# customer-provided encryption keys (SSE-C) when you store the object in
|
|
1760
|
+
# Amazon S3, then when you GET the object, you must use the following
|
|
1761
|
+
# headers:
|
|
1762
|
+
#
|
|
1763
|
+
# * `x-amz-server-side-encryption-customer-algorithm`
|
|
1764
|
+
#
|
|
1765
|
+
# * `x-amz-server-side-encryption-customer-key`
|
|
1766
|
+
#
|
|
1767
|
+
# * `x-amz-server-side-encryption-customer-key-MD5`
|
|
1768
|
+
#
|
|
1769
|
+
# For more information about SSE-C, see [Server-Side Encryption (Using
|
|
1770
|
+
# Customer-Provided Encryption Keys)][1] in the *Amazon S3 User Guide*.
|
|
1771
|
+
#
|
|
1772
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
|
1773
|
+
#
|
|
1774
|
+
# </note>
|
|
1775
|
+
#
|
|
1776
|
+
#
|
|
1777
|
+
#
|
|
1778
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html
|
|
777
1779
|
# @option options [String] :sse_customer_key
|
|
778
|
-
# Specifies the customer-provided encryption key
|
|
779
|
-
#
|
|
780
|
-
#
|
|
781
|
-
#
|
|
782
|
-
#
|
|
1780
|
+
# Specifies the customer-provided encryption key that you originally
|
|
1781
|
+
# provided for Amazon S3 to encrypt the data before storing it. This
|
|
1782
|
+
# value is used to decrypt the object when recovering it and must match
|
|
1783
|
+
# the one used when storing the data. The key must be appropriate for
|
|
1784
|
+
# use with the algorithm specified in the
|
|
1785
|
+
# `x-amz-server-side-encryption-customer-algorithm` header.
|
|
1786
|
+
#
|
|
1787
|
+
# If you encrypt an object by using server-side encryption with
|
|
1788
|
+
# customer-provided encryption keys (SSE-C) when you store the object in
|
|
1789
|
+
# Amazon S3, then when you GET the object, you must use the following
|
|
1790
|
+
# headers:
|
|
1791
|
+
#
|
|
1792
|
+
# * `x-amz-server-side-encryption-customer-algorithm`
|
|
1793
|
+
#
|
|
1794
|
+
# * `x-amz-server-side-encryption-customer-key`
|
|
1795
|
+
#
|
|
1796
|
+
# * `x-amz-server-side-encryption-customer-key-MD5`
|
|
1797
|
+
#
|
|
1798
|
+
# For more information about SSE-C, see [Server-Side Encryption (Using
|
|
1799
|
+
# Customer-Provided Encryption Keys)][1] in the *Amazon S3 User Guide*.
|
|
1800
|
+
#
|
|
1801
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
|
1802
|
+
#
|
|
1803
|
+
# </note>
|
|
1804
|
+
#
|
|
1805
|
+
#
|
|
1806
|
+
#
|
|
1807
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html
|
|
783
1808
|
# @option options [String] :sse_customer_key_md5
|
|
784
|
-
# Specifies the 128-bit MD5 digest of the encryption
|
|
785
|
-
# RFC 1321. Amazon S3 uses this header for a message
|
|
786
|
-
# ensure that the encryption key was transmitted
|
|
1809
|
+
# Specifies the 128-bit MD5 digest of the customer-provided encryption
|
|
1810
|
+
# key according to RFC 1321. Amazon S3 uses this header for a message
|
|
1811
|
+
# integrity check to ensure that the encryption key was transmitted
|
|
1812
|
+
# without error.
|
|
1813
|
+
#
|
|
1814
|
+
# If you encrypt an object by using server-side encryption with
|
|
1815
|
+
# customer-provided encryption keys (SSE-C) when you store the object in
|
|
1816
|
+
# Amazon S3, then when you GET the object, you must use the following
|
|
1817
|
+
# headers:
|
|
1818
|
+
#
|
|
1819
|
+
# * `x-amz-server-side-encryption-customer-algorithm`
|
|
1820
|
+
#
|
|
1821
|
+
# * `x-amz-server-side-encryption-customer-key`
|
|
1822
|
+
#
|
|
1823
|
+
# * `x-amz-server-side-encryption-customer-key-MD5`
|
|
1824
|
+
#
|
|
1825
|
+
# For more information about SSE-C, see [Server-Side Encryption (Using
|
|
1826
|
+
# Customer-Provided Encryption Keys)][1] in the *Amazon S3 User Guide*.
|
|
1827
|
+
#
|
|
1828
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
|
1829
|
+
#
|
|
1830
|
+
# </note>
|
|
1831
|
+
#
|
|
1832
|
+
#
|
|
1833
|
+
#
|
|
1834
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html
|
|
787
1835
|
# @option options [String] :request_payer
|
|
788
1836
|
# Confirms that the requester knows that they will be charged for the
|
|
789
1837
|
# request. Bucket owners need not specify this parameter in their
|
|
790
|
-
# requests.
|
|
791
|
-
#
|
|
792
|
-
#
|
|
1838
|
+
# requests. If either the source or destination S3 bucket has Requester
|
|
1839
|
+
# Pays enabled, the requester will pay for corresponding charges to copy
|
|
1840
|
+
# the object. For information about downloading objects from Requester
|
|
1841
|
+
# Pays buckets, see [Downloading Objects in Requester Pays Buckets][1]
|
|
1842
|
+
# in the *Amazon S3 User Guide*.
|
|
1843
|
+
#
|
|
1844
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
|
1845
|
+
#
|
|
1846
|
+
# </note>
|
|
793
1847
|
#
|
|
794
1848
|
#
|
|
795
1849
|
#
|
|
@@ -799,13 +1853,21 @@ module Aws::S3
|
|
|
799
1853
|
# between 1 and 10,000. Effectively performs a 'ranged' GET request
|
|
800
1854
|
# for the part specified. Useful for downloading just a part of an
|
|
801
1855
|
# object.
|
|
1856
|
+
# @option options [String] :expected_bucket_owner
|
|
1857
|
+
# The account ID of the expected bucket owner. If the account ID that
|
|
1858
|
+
# you provide does not match the actual owner of the bucket, the request
|
|
1859
|
+
# fails with the HTTP status code `403 Forbidden` (access denied).
|
|
1860
|
+
# @option options [String] :checksum_mode
|
|
1861
|
+
# To retrieve the checksum, this mode must be enabled.
|
|
802
1862
|
# @return [Types::GetObjectOutput]
|
|
803
1863
|
def get(options = {}, &block)
|
|
804
1864
|
options = options.merge(
|
|
805
1865
|
bucket: @bucket_name,
|
|
806
1866
|
key: @key
|
|
807
1867
|
)
|
|
808
|
-
resp =
|
|
1868
|
+
resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
|
1869
|
+
@client.get_object(options, &block)
|
|
1870
|
+
end
|
|
809
1871
|
resp.data
|
|
810
1872
|
end
|
|
811
1873
|
|
|
@@ -826,23 +1888,49 @@ module Aws::S3
|
|
|
826
1888
|
# metadata: {
|
|
827
1889
|
# "MetadataKey" => "MetadataValue",
|
|
828
1890
|
# },
|
|
829
|
-
# server_side_encryption: "AES256", # accepts AES256, aws:kms
|
|
830
|
-
# storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER, DEEP_ARCHIVE
|
|
1891
|
+
# server_side_encryption: "AES256", # accepts AES256, aws:fsx, aws:kms, aws:kms:dsse
|
|
1892
|
+
# storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER, DEEP_ARCHIVE, OUTPOSTS, GLACIER_IR, SNOW, EXPRESS_ONEZONE, FSX_OPENZFS, FSX_ONTAP
|
|
831
1893
|
# website_redirect_location: "WebsiteRedirectLocation",
|
|
832
1894
|
# sse_customer_algorithm: "SSECustomerAlgorithm",
|
|
833
1895
|
# sse_customer_key: "SSECustomerKey",
|
|
834
1896
|
# sse_customer_key_md5: "SSECustomerKeyMD5",
|
|
835
1897
|
# ssekms_key_id: "SSEKMSKeyId",
|
|
836
1898
|
# ssekms_encryption_context: "SSEKMSEncryptionContext",
|
|
1899
|
+
# bucket_key_enabled: false,
|
|
837
1900
|
# request_payer: "requester", # accepts requester
|
|
838
1901
|
# tagging: "TaggingHeader",
|
|
839
1902
|
# object_lock_mode: "GOVERNANCE", # accepts GOVERNANCE, COMPLIANCE
|
|
840
1903
|
# object_lock_retain_until_date: Time.now,
|
|
841
1904
|
# object_lock_legal_hold_status: "ON", # accepts ON, OFF
|
|
1905
|
+
# expected_bucket_owner: "AccountId",
|
|
1906
|
+
# checksum_algorithm: "CRC32", # accepts CRC32, CRC32C, SHA1, SHA256, CRC64NVME
|
|
1907
|
+
# checksum_type: "COMPOSITE", # accepts COMPOSITE, FULL_OBJECT
|
|
842
1908
|
# })
|
|
843
1909
|
# @param [Hash] options ({})
|
|
844
1910
|
# @option options [String] :acl
|
|
845
|
-
# The canned ACL to apply to the object.
|
|
1911
|
+
# The canned ACL to apply to the object. Amazon S3 supports a set of
|
|
1912
|
+
# predefined ACLs, known as *canned ACLs*. Each canned ACL has a
|
|
1913
|
+
# predefined set of grantees and permissions. For more information, see
|
|
1914
|
+
# [Canned ACL][1] in the *Amazon S3 User Guide*.
|
|
1915
|
+
#
|
|
1916
|
+
# By default, all objects are private. Only the owner has full access
|
|
1917
|
+
# control. When uploading an object, you can grant access permissions to
|
|
1918
|
+
# individual Amazon Web Services accounts or to predefined groups
|
|
1919
|
+
# defined by Amazon S3. These permissions are then added to the access
|
|
1920
|
+
# control list (ACL) on the new object. For more information, see [Using
|
|
1921
|
+
# ACLs][2]. One way to grant the permissions using the request headers
|
|
1922
|
+
# is to specify a canned ACL with the `x-amz-acl` request header.
|
|
1923
|
+
#
|
|
1924
|
+
# <note markdown="1"> * This functionality is not supported for directory buckets.
|
|
1925
|
+
#
|
|
1926
|
+
# * This functionality is not supported for Amazon S3 on Outposts.
|
|
1927
|
+
#
|
|
1928
|
+
# </note>
|
|
1929
|
+
#
|
|
1930
|
+
#
|
|
1931
|
+
#
|
|
1932
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#CannedACL
|
|
1933
|
+
# [2]: https://docs.aws.amazon.com/AmazonS3/latest/dev/S3_ACLs_UsingACLs.html
|
|
846
1934
|
# @option options [String] :cache_control
|
|
847
1935
|
# Specifies caching behavior along the request/reply chain.
|
|
848
1936
|
# @option options [String] :content_disposition
|
|
@@ -851,66 +1939,459 @@ module Aws::S3
|
|
|
851
1939
|
# Specifies what content encodings have been applied to the object and
|
|
852
1940
|
# thus what decoding mechanisms must be applied to obtain the media-type
|
|
853
1941
|
# referenced by the Content-Type header field.
|
|
1942
|
+
#
|
|
1943
|
+
# <note markdown="1"> For directory buckets, only the `aws-chunked` value is supported in
|
|
1944
|
+
# this header field.
|
|
1945
|
+
#
|
|
1946
|
+
# </note>
|
|
854
1947
|
# @option options [String] :content_language
|
|
855
|
-
# The language the content is in.
|
|
1948
|
+
# The language that the content is in.
|
|
856
1949
|
# @option options [String] :content_type
|
|
857
1950
|
# A standard MIME type describing the format of the object data.
|
|
858
1951
|
# @option options [Time,DateTime,Date,Integer,String] :expires
|
|
859
1952
|
# The date and time at which the object is no longer cacheable.
|
|
860
1953
|
# @option options [String] :grant_full_control
|
|
861
|
-
#
|
|
862
|
-
# object.
|
|
1954
|
+
# Specify access permissions explicitly to give the grantee READ,
|
|
1955
|
+
# READ\_ACP, and WRITE\_ACP permissions on the object.
|
|
1956
|
+
#
|
|
1957
|
+
# By default, all objects are private. Only the owner has full access
|
|
1958
|
+
# control. When uploading an object, you can use this header to
|
|
1959
|
+
# explicitly grant access permissions to specific Amazon Web Services
|
|
1960
|
+
# accounts or groups. This header maps to specific permissions that
|
|
1961
|
+
# Amazon S3 supports in an ACL. For more information, see [Access
|
|
1962
|
+
# Control List (ACL) Overview][1] in the *Amazon S3 User Guide*.
|
|
1963
|
+
#
|
|
1964
|
+
# You specify each grantee as a type=value pair, where the type is one
|
|
1965
|
+
# of the following:
|
|
1966
|
+
#
|
|
1967
|
+
# * `id` – if the value specified is the canonical user ID of an Amazon
|
|
1968
|
+
# Web Services account
|
|
1969
|
+
#
|
|
1970
|
+
# * `uri` – if you are granting permissions to a predefined group
|
|
1971
|
+
#
|
|
1972
|
+
# * `emailAddress` – if the value specified is the email address of an
|
|
1973
|
+
# Amazon Web Services account
|
|
1974
|
+
#
|
|
1975
|
+
# <note markdown="1"> Using email addresses to specify a grantee is only supported in the
|
|
1976
|
+
# following Amazon Web Services Regions:
|
|
1977
|
+
#
|
|
1978
|
+
# * US East (N. Virginia)
|
|
1979
|
+
#
|
|
1980
|
+
# * US West (N. California)
|
|
1981
|
+
#
|
|
1982
|
+
# * US West (Oregon)
|
|
1983
|
+
#
|
|
1984
|
+
# * Asia Pacific (Singapore)
|
|
1985
|
+
#
|
|
1986
|
+
# * Asia Pacific (Sydney)
|
|
1987
|
+
#
|
|
1988
|
+
# * Asia Pacific (Tokyo)
|
|
1989
|
+
#
|
|
1990
|
+
# * Europe (Ireland)
|
|
1991
|
+
#
|
|
1992
|
+
# * South America (São Paulo)
|
|
1993
|
+
#
|
|
1994
|
+
# For a list of all the Amazon S3 supported Regions and endpoints, see
|
|
1995
|
+
# [Regions and Endpoints][2] in the Amazon Web Services General
|
|
1996
|
+
# Reference.
|
|
1997
|
+
#
|
|
1998
|
+
# </note>
|
|
1999
|
+
#
|
|
2000
|
+
# For example, the following `x-amz-grant-read` header grants the Amazon
|
|
2001
|
+
# Web Services accounts identified by account IDs permissions to read
|
|
2002
|
+
# object data and its metadata:
|
|
2003
|
+
#
|
|
2004
|
+
# `x-amz-grant-read: id="11112222333", id="444455556666" `
|
|
2005
|
+
#
|
|
2006
|
+
# <note markdown="1"> * This functionality is not supported for directory buckets.
|
|
2007
|
+
#
|
|
2008
|
+
# * This functionality is not supported for Amazon S3 on Outposts.
|
|
2009
|
+
#
|
|
2010
|
+
# </note>
|
|
2011
|
+
#
|
|
2012
|
+
#
|
|
2013
|
+
#
|
|
2014
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html
|
|
2015
|
+
# [2]: https://docs.aws.amazon.com/general/latest/gr/rande.html#s3_region
|
|
863
2016
|
# @option options [String] :grant_read
|
|
864
|
-
#
|
|
2017
|
+
# Specify access permissions explicitly to allow grantee to read the
|
|
2018
|
+
# object data and its metadata.
|
|
2019
|
+
#
|
|
2020
|
+
# By default, all objects are private. Only the owner has full access
|
|
2021
|
+
# control. When uploading an object, you can use this header to
|
|
2022
|
+
# explicitly grant access permissions to specific Amazon Web Services
|
|
2023
|
+
# accounts or groups. This header maps to specific permissions that
|
|
2024
|
+
# Amazon S3 supports in an ACL. For more information, see [Access
|
|
2025
|
+
# Control List (ACL) Overview][1] in the *Amazon S3 User Guide*.
|
|
2026
|
+
#
|
|
2027
|
+
# You specify each grantee as a type=value pair, where the type is one
|
|
2028
|
+
# of the following:
|
|
2029
|
+
#
|
|
2030
|
+
# * `id` – if the value specified is the canonical user ID of an Amazon
|
|
2031
|
+
# Web Services account
|
|
2032
|
+
#
|
|
2033
|
+
# * `uri` – if you are granting permissions to a predefined group
|
|
2034
|
+
#
|
|
2035
|
+
# * `emailAddress` – if the value specified is the email address of an
|
|
2036
|
+
# Amazon Web Services account
|
|
2037
|
+
#
|
|
2038
|
+
# <note markdown="1"> Using email addresses to specify a grantee is only supported in the
|
|
2039
|
+
# following Amazon Web Services Regions:
|
|
2040
|
+
#
|
|
2041
|
+
# * US East (N. Virginia)
|
|
2042
|
+
#
|
|
2043
|
+
# * US West (N. California)
|
|
2044
|
+
#
|
|
2045
|
+
# * US West (Oregon)
|
|
2046
|
+
#
|
|
2047
|
+
# * Asia Pacific (Singapore)
|
|
2048
|
+
#
|
|
2049
|
+
# * Asia Pacific (Sydney)
|
|
2050
|
+
#
|
|
2051
|
+
# * Asia Pacific (Tokyo)
|
|
2052
|
+
#
|
|
2053
|
+
# * Europe (Ireland)
|
|
2054
|
+
#
|
|
2055
|
+
# * South America (São Paulo)
|
|
2056
|
+
#
|
|
2057
|
+
# For a list of all the Amazon S3 supported Regions and endpoints, see
|
|
2058
|
+
# [Regions and Endpoints][2] in the Amazon Web Services General
|
|
2059
|
+
# Reference.
|
|
2060
|
+
#
|
|
2061
|
+
# </note>
|
|
2062
|
+
#
|
|
2063
|
+
# For example, the following `x-amz-grant-read` header grants the Amazon
|
|
2064
|
+
# Web Services accounts identified by account IDs permissions to read
|
|
2065
|
+
# object data and its metadata:
|
|
2066
|
+
#
|
|
2067
|
+
# `x-amz-grant-read: id="11112222333", id="444455556666" `
|
|
2068
|
+
#
|
|
2069
|
+
# <note markdown="1"> * This functionality is not supported for directory buckets.
|
|
2070
|
+
#
|
|
2071
|
+
# * This functionality is not supported for Amazon S3 on Outposts.
|
|
2072
|
+
#
|
|
2073
|
+
# </note>
|
|
2074
|
+
#
|
|
2075
|
+
#
|
|
2076
|
+
#
|
|
2077
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html
|
|
2078
|
+
# [2]: https://docs.aws.amazon.com/general/latest/gr/rande.html#s3_region
|
|
865
2079
|
# @option options [String] :grant_read_acp
|
|
866
|
-
#
|
|
2080
|
+
# Specify access permissions explicitly to allows grantee to read the
|
|
2081
|
+
# object ACL.
|
|
2082
|
+
#
|
|
2083
|
+
# By default, all objects are private. Only the owner has full access
|
|
2084
|
+
# control. When uploading an object, you can use this header to
|
|
2085
|
+
# explicitly grant access permissions to specific Amazon Web Services
|
|
2086
|
+
# accounts or groups. This header maps to specific permissions that
|
|
2087
|
+
# Amazon S3 supports in an ACL. For more information, see [Access
|
|
2088
|
+
# Control List (ACL) Overview][1] in the *Amazon S3 User Guide*.
|
|
2089
|
+
#
|
|
2090
|
+
# You specify each grantee as a type=value pair, where the type is one
|
|
2091
|
+
# of the following:
|
|
2092
|
+
#
|
|
2093
|
+
# * `id` – if the value specified is the canonical user ID of an Amazon
|
|
2094
|
+
# Web Services account
|
|
2095
|
+
#
|
|
2096
|
+
# * `uri` – if you are granting permissions to a predefined group
|
|
2097
|
+
#
|
|
2098
|
+
# * `emailAddress` – if the value specified is the email address of an
|
|
2099
|
+
# Amazon Web Services account
|
|
2100
|
+
#
|
|
2101
|
+
# <note markdown="1"> Using email addresses to specify a grantee is only supported in the
|
|
2102
|
+
# following Amazon Web Services Regions:
|
|
2103
|
+
#
|
|
2104
|
+
# * US East (N. Virginia)
|
|
2105
|
+
#
|
|
2106
|
+
# * US West (N. California)
|
|
2107
|
+
#
|
|
2108
|
+
# * US West (Oregon)
|
|
2109
|
+
#
|
|
2110
|
+
# * Asia Pacific (Singapore)
|
|
2111
|
+
#
|
|
2112
|
+
# * Asia Pacific (Sydney)
|
|
2113
|
+
#
|
|
2114
|
+
# * Asia Pacific (Tokyo)
|
|
2115
|
+
#
|
|
2116
|
+
# * Europe (Ireland)
|
|
2117
|
+
#
|
|
2118
|
+
# * South America (São Paulo)
|
|
2119
|
+
#
|
|
2120
|
+
# For a list of all the Amazon S3 supported Regions and endpoints, see
|
|
2121
|
+
# [Regions and Endpoints][2] in the Amazon Web Services General
|
|
2122
|
+
# Reference.
|
|
2123
|
+
#
|
|
2124
|
+
# </note>
|
|
2125
|
+
#
|
|
2126
|
+
# For example, the following `x-amz-grant-read` header grants the Amazon
|
|
2127
|
+
# Web Services accounts identified by account IDs permissions to read
|
|
2128
|
+
# object data and its metadata:
|
|
2129
|
+
#
|
|
2130
|
+
# `x-amz-grant-read: id="11112222333", id="444455556666" `
|
|
2131
|
+
#
|
|
2132
|
+
# <note markdown="1"> * This functionality is not supported for directory buckets.
|
|
2133
|
+
#
|
|
2134
|
+
# * This functionality is not supported for Amazon S3 on Outposts.
|
|
2135
|
+
#
|
|
2136
|
+
# </note>
|
|
2137
|
+
#
|
|
2138
|
+
#
|
|
2139
|
+
#
|
|
2140
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html
|
|
2141
|
+
# [2]: https://docs.aws.amazon.com/general/latest/gr/rande.html#s3_region
|
|
867
2142
|
# @option options [String] :grant_write_acp
|
|
868
|
-
#
|
|
2143
|
+
# Specify access permissions explicitly to allows grantee to allow
|
|
2144
|
+
# grantee to write the ACL for the applicable object.
|
|
2145
|
+
#
|
|
2146
|
+
# By default, all objects are private. Only the owner has full access
|
|
2147
|
+
# control. When uploading an object, you can use this header to
|
|
2148
|
+
# explicitly grant access permissions to specific Amazon Web Services
|
|
2149
|
+
# accounts or groups. This header maps to specific permissions that
|
|
2150
|
+
# Amazon S3 supports in an ACL. For more information, see [Access
|
|
2151
|
+
# Control List (ACL) Overview][1] in the *Amazon S3 User Guide*.
|
|
2152
|
+
#
|
|
2153
|
+
# You specify each grantee as a type=value pair, where the type is one
|
|
2154
|
+
# of the following:
|
|
2155
|
+
#
|
|
2156
|
+
# * `id` – if the value specified is the canonical user ID of an Amazon
|
|
2157
|
+
# Web Services account
|
|
2158
|
+
#
|
|
2159
|
+
# * `uri` – if you are granting permissions to a predefined group
|
|
2160
|
+
#
|
|
2161
|
+
# * `emailAddress` – if the value specified is the email address of an
|
|
2162
|
+
# Amazon Web Services account
|
|
2163
|
+
#
|
|
2164
|
+
# <note markdown="1"> Using email addresses to specify a grantee is only supported in the
|
|
2165
|
+
# following Amazon Web Services Regions:
|
|
2166
|
+
#
|
|
2167
|
+
# * US East (N. Virginia)
|
|
2168
|
+
#
|
|
2169
|
+
# * US West (N. California)
|
|
2170
|
+
#
|
|
2171
|
+
# * US West (Oregon)
|
|
2172
|
+
#
|
|
2173
|
+
# * Asia Pacific (Singapore)
|
|
2174
|
+
#
|
|
2175
|
+
# * Asia Pacific (Sydney)
|
|
2176
|
+
#
|
|
2177
|
+
# * Asia Pacific (Tokyo)
|
|
2178
|
+
#
|
|
2179
|
+
# * Europe (Ireland)
|
|
2180
|
+
#
|
|
2181
|
+
# * South America (São Paulo)
|
|
2182
|
+
#
|
|
2183
|
+
# For a list of all the Amazon S3 supported Regions and endpoints, see
|
|
2184
|
+
# [Regions and Endpoints][2] in the Amazon Web Services General
|
|
2185
|
+
# Reference.
|
|
2186
|
+
#
|
|
2187
|
+
# </note>
|
|
2188
|
+
#
|
|
2189
|
+
# For example, the following `x-amz-grant-read` header grants the Amazon
|
|
2190
|
+
# Web Services accounts identified by account IDs permissions to read
|
|
2191
|
+
# object data and its metadata:
|
|
2192
|
+
#
|
|
2193
|
+
# `x-amz-grant-read: id="11112222333", id="444455556666" `
|
|
2194
|
+
#
|
|
2195
|
+
# <note markdown="1"> * This functionality is not supported for directory buckets.
|
|
2196
|
+
#
|
|
2197
|
+
# * This functionality is not supported for Amazon S3 on Outposts.
|
|
2198
|
+
#
|
|
2199
|
+
# </note>
|
|
2200
|
+
#
|
|
2201
|
+
#
|
|
2202
|
+
#
|
|
2203
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html
|
|
2204
|
+
# [2]: https://docs.aws.amazon.com/general/latest/gr/rande.html#s3_region
|
|
869
2205
|
# @option options [Hash<String,String>] :metadata
|
|
870
2206
|
# A map of metadata to store with the object in S3.
|
|
871
2207
|
# @option options [String] :server_side_encryption
|
|
872
|
-
# The server-side encryption algorithm used when
|
|
873
|
-
# Amazon S3
|
|
2208
|
+
# The server-side encryption algorithm used when you store this object
|
|
2209
|
+
# in Amazon S3 or Amazon FSx.
|
|
2210
|
+
#
|
|
2211
|
+
# * <b>Directory buckets </b> - For directory buckets, there are only
|
|
2212
|
+
# two supported options for server-side encryption: server-side
|
|
2213
|
+
# encryption with Amazon S3 managed keys (SSE-S3) (`AES256`) and
|
|
2214
|
+
# server-side encryption with KMS keys (SSE-KMS) (`aws:kms`). We
|
|
2215
|
+
# recommend that the bucket's default encryption uses the desired
|
|
2216
|
+
# encryption configuration and you don't override the bucket default
|
|
2217
|
+
# encryption in your `CreateSession` requests or `PUT` object
|
|
2218
|
+
# requests. Then, new objects are automatically encrypted with the
|
|
2219
|
+
# desired encryption settings. For more information, see [Protecting
|
|
2220
|
+
# data with server-side encryption][1] in the *Amazon S3 User Guide*.
|
|
2221
|
+
# For more information about the encryption overriding behaviors in
|
|
2222
|
+
# directory buckets, see [Specifying server-side encryption with KMS
|
|
2223
|
+
# for new object uploads][2].
|
|
2224
|
+
#
|
|
2225
|
+
# In the Zonal endpoint API calls (except [CopyObject][3] and
|
|
2226
|
+
# [UploadPartCopy][4]) using the REST API, the encryption request
|
|
2227
|
+
# headers must match the encryption settings that are specified in the
|
|
2228
|
+
# `CreateSession` request. You can't override the values of the
|
|
2229
|
+
# encryption settings (`x-amz-server-side-encryption`,
|
|
2230
|
+
# `x-amz-server-side-encryption-aws-kms-key-id`,
|
|
2231
|
+
# `x-amz-server-side-encryption-context`, and
|
|
2232
|
+
# `x-amz-server-side-encryption-bucket-key-enabled`) that are
|
|
2233
|
+
# specified in the `CreateSession` request. You don't need to
|
|
2234
|
+
# explicitly specify these encryption settings values in Zonal
|
|
2235
|
+
# endpoint API calls, and Amazon S3 will use the encryption settings
|
|
2236
|
+
# values from the `CreateSession` request to protect new objects in
|
|
2237
|
+
# the directory bucket.
|
|
2238
|
+
#
|
|
2239
|
+
# <note markdown="1"> When you use the CLI or the Amazon Web Services SDKs, for
|
|
2240
|
+
# `CreateSession`, the session token refreshes automatically to avoid
|
|
2241
|
+
# service interruptions when a session expires. The CLI or the Amazon
|
|
2242
|
+
# Web Services SDKs use the bucket's default encryption configuration
|
|
2243
|
+
# for the `CreateSession` request. It's not supported to override the
|
|
2244
|
+
# encryption settings values in the `CreateSession` request. So in the
|
|
2245
|
+
# Zonal endpoint API calls (except [CopyObject][3] and
|
|
2246
|
+
# [UploadPartCopy][4]), the encryption request headers must match the
|
|
2247
|
+
# default encryption configuration of the directory bucket.
|
|
2248
|
+
#
|
|
2249
|
+
# </note>
|
|
2250
|
+
#
|
|
2251
|
+
# * <b>S3 access points for Amazon FSx </b> - When accessing data stored
|
|
2252
|
+
# in Amazon FSx file systems using S3 access points, the only valid
|
|
2253
|
+
# server side encryption option is `aws:fsx`. All Amazon FSx file
|
|
2254
|
+
# systems have encryption configured by default and are encrypted at
|
|
2255
|
+
# rest. Data is automatically encrypted before being written to the
|
|
2256
|
+
# file system, and automatically decrypted as it is read. These
|
|
2257
|
+
# processes are handled transparently by Amazon FSx.
|
|
2258
|
+
#
|
|
2259
|
+
#
|
|
2260
|
+
#
|
|
2261
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-serv-side-encryption.html
|
|
2262
|
+
# [2]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-specifying-kms-encryption.html
|
|
2263
|
+
# [3]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_CopyObject.html
|
|
2264
|
+
# [4]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPartCopy.html
|
|
874
2265
|
# @option options [String] :storage_class
|
|
875
|
-
#
|
|
2266
|
+
# By default, Amazon S3 uses the STANDARD Storage Class to store newly
|
|
2267
|
+
# created objects. The STANDARD storage class provides high durability
|
|
2268
|
+
# and high availability. Depending on performance needs, you can specify
|
|
2269
|
+
# a different Storage Class. For more information, see [Storage
|
|
2270
|
+
# Classes][1] in the *Amazon S3 User Guide*.
|
|
2271
|
+
#
|
|
2272
|
+
# <note markdown="1"> * Directory buckets only support `EXPRESS_ONEZONE` (the S3 Express One
|
|
2273
|
+
# Zone storage class) in Availability Zones and `ONEZONE_IA` (the S3
|
|
2274
|
+
# One Zone-Infrequent Access storage class) in Dedicated Local Zones.
|
|
2275
|
+
#
|
|
2276
|
+
# * Amazon S3 on Outposts only uses the OUTPOSTS Storage Class.
|
|
2277
|
+
#
|
|
2278
|
+
# </note>
|
|
2279
|
+
#
|
|
2280
|
+
#
|
|
2281
|
+
#
|
|
2282
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html
|
|
876
2283
|
# @option options [String] :website_redirect_location
|
|
877
2284
|
# If the bucket is configured as a website, redirects requests for this
|
|
878
2285
|
# object to another object in the same bucket or to an external URL.
|
|
879
2286
|
# Amazon S3 stores the value of this header in the object metadata.
|
|
2287
|
+
#
|
|
2288
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
|
2289
|
+
#
|
|
2290
|
+
# </note>
|
|
880
2291
|
# @option options [String] :sse_customer_algorithm
|
|
881
|
-
# Specifies the algorithm to use
|
|
2292
|
+
# Specifies the algorithm to use when encrypting the object (for
|
|
882
2293
|
# example, AES256).
|
|
2294
|
+
#
|
|
2295
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
|
2296
|
+
#
|
|
2297
|
+
# </note>
|
|
883
2298
|
# @option options [String] :sse_customer_key
|
|
884
2299
|
# Specifies the customer-provided encryption key for Amazon S3 to use in
|
|
885
2300
|
# encrypting data. This value is used to store the object and then it is
|
|
886
2301
|
# discarded; Amazon S3 does not store the encryption key. The key must
|
|
887
2302
|
# be appropriate for use with the algorithm specified in the
|
|
888
|
-
# `x-amz-server-side
|
|
889
|
-
#
|
|
890
|
-
#
|
|
891
|
-
# RFC 1321. Amazon S3 uses this header for a message integrity check to
|
|
892
|
-
# ensure that the encryption key was transmitted without error.
|
|
893
|
-
# @option options [String] :ssekms_key_id
|
|
894
|
-
# Specifies the ID of the symmetric customer managed AWS KMS CMK to use
|
|
895
|
-
# for object encryption. All GET and PUT requests for an object
|
|
896
|
-
# protected by AWS KMS will fail if not made via SSL or using SigV4. For
|
|
897
|
-
# information about configuring using any of the officially supported
|
|
898
|
-
# AWS SDKs and AWS CLI, see [Specifying the Signature Version in Request
|
|
899
|
-
# Authentication][1] in the *Amazon S3 Developer Guide*.
|
|
2303
|
+
# `x-amz-server-side-encryption-customer-algorithm` header.
|
|
2304
|
+
#
|
|
2305
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
|
900
2306
|
#
|
|
2307
|
+
# </note>
|
|
2308
|
+
# @option options [String] :sse_customer_key_md5
|
|
2309
|
+
# Specifies the 128-bit MD5 digest of the customer-provided encryption
|
|
2310
|
+
# key according to RFC 1321. Amazon S3 uses this header for a message
|
|
2311
|
+
# integrity check to ensure that the encryption key was transmitted
|
|
2312
|
+
# without error.
|
|
901
2313
|
#
|
|
2314
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
|
902
2315
|
#
|
|
903
|
-
#
|
|
2316
|
+
# </note>
|
|
2317
|
+
# @option options [String] :ssekms_key_id
|
|
2318
|
+
# Specifies the KMS key ID (Key ID, Key ARN, or Key Alias) to use for
|
|
2319
|
+
# object encryption. If the KMS key doesn't exist in the same account
|
|
2320
|
+
# that's issuing the command, you must use the full Key ARN not the Key
|
|
2321
|
+
# ID.
|
|
2322
|
+
#
|
|
2323
|
+
# **General purpose buckets** - If you specify
|
|
2324
|
+
# `x-amz-server-side-encryption` with `aws:kms` or `aws:kms:dsse`, this
|
|
2325
|
+
# header specifies the ID (Key ID, Key ARN, or Key Alias) of the KMS key
|
|
2326
|
+
# to use. If you specify `x-amz-server-side-encryption:aws:kms` or
|
|
2327
|
+
# `x-amz-server-side-encryption:aws:kms:dsse`, but do not provide
|
|
2328
|
+
# `x-amz-server-side-encryption-aws-kms-key-id`, Amazon S3 uses the
|
|
2329
|
+
# Amazon Web Services managed key (`aws/s3`) to protect the data.
|
|
2330
|
+
#
|
|
2331
|
+
# **Directory buckets** - To encrypt data using SSE-KMS, it's
|
|
2332
|
+
# recommended to specify the `x-amz-server-side-encryption` header to
|
|
2333
|
+
# `aws:kms`. Then, the `x-amz-server-side-encryption-aws-kms-key-id`
|
|
2334
|
+
# header implicitly uses the bucket's default KMS customer managed key
|
|
2335
|
+
# ID. If you want to explicitly set the `
|
|
2336
|
+
# x-amz-server-side-encryption-aws-kms-key-id` header, it must match the
|
|
2337
|
+
# bucket's default customer managed key (using key ID or ARN, not
|
|
2338
|
+
# alias). Your SSE-KMS configuration can only support 1 [customer
|
|
2339
|
+
# managed key][1] per directory bucket's lifetime. The [Amazon Web
|
|
2340
|
+
# Services managed key][2] (`aws/s3`) isn't supported. Incorrect key
|
|
2341
|
+
# specification results in an HTTP `400 Bad Request` error.
|
|
2342
|
+
#
|
|
2343
|
+
#
|
|
2344
|
+
#
|
|
2345
|
+
# [1]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#customer-cmk
|
|
2346
|
+
# [2]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-managed-cmk
|
|
904
2347
|
# @option options [String] :ssekms_encryption_context
|
|
905
|
-
# Specifies the
|
|
906
|
-
# The value of this header is a
|
|
907
|
-
#
|
|
2348
|
+
# Specifies the Amazon Web Services KMS Encryption Context to use for
|
|
2349
|
+
# object encryption. The value of this header is a Base64 encoded string
|
|
2350
|
+
# of a UTF-8 encoded JSON, which contains the encryption context as
|
|
2351
|
+
# key-value pairs.
|
|
2352
|
+
#
|
|
2353
|
+
# **Directory buckets** - You can optionally provide an explicit
|
|
2354
|
+
# encryption context value. The value must match the default encryption
|
|
2355
|
+
# context - the bucket Amazon Resource Name (ARN). An additional
|
|
2356
|
+
# encryption context value is not supported.
|
|
2357
|
+
# @option options [Boolean] :bucket_key_enabled
|
|
2358
|
+
# Specifies whether Amazon S3 should use an S3 Bucket Key for object
|
|
2359
|
+
# encryption with server-side encryption using Key Management Service
|
|
2360
|
+
# (KMS) keys (SSE-KMS).
|
|
2361
|
+
#
|
|
2362
|
+
# **General purpose buckets** - Setting this header to `true` causes
|
|
2363
|
+
# Amazon S3 to use an S3 Bucket Key for object encryption with SSE-KMS.
|
|
2364
|
+
# Also, specifying this header with a PUT action doesn't affect
|
|
2365
|
+
# bucket-level settings for S3 Bucket Key.
|
|
2366
|
+
#
|
|
2367
|
+
# **Directory buckets** - S3 Bucket Keys are always enabled for `GET`
|
|
2368
|
+
# and `PUT` operations in a directory bucket and can’t be disabled. S3
|
|
2369
|
+
# Bucket Keys aren't supported, when you copy SSE-KMS encrypted objects
|
|
2370
|
+
# from general purpose buckets to directory buckets, from directory
|
|
2371
|
+
# buckets to general purpose buckets, or between directory buckets,
|
|
2372
|
+
# through [CopyObject][1], [UploadPartCopy][2], [the Copy operation in
|
|
2373
|
+
# Batch Operations][3], or [the import jobs][4]. In this case, Amazon S3
|
|
2374
|
+
# makes a call to KMS every time a copy request is made for a
|
|
2375
|
+
# KMS-encrypted object.
|
|
2376
|
+
#
|
|
2377
|
+
#
|
|
2378
|
+
#
|
|
2379
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_CopyObject.html
|
|
2380
|
+
# [2]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPartCopy.html
|
|
2381
|
+
# [3]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/directory-buckets-objects-Batch-Ops
|
|
2382
|
+
# [4]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/create-import-job
|
|
908
2383
|
# @option options [String] :request_payer
|
|
909
2384
|
# Confirms that the requester knows that they will be charged for the
|
|
910
2385
|
# request. Bucket owners need not specify this parameter in their
|
|
911
|
-
# requests.
|
|
912
|
-
#
|
|
913
|
-
#
|
|
2386
|
+
# requests. If either the source or destination S3 bucket has Requester
|
|
2387
|
+
# Pays enabled, the requester will pay for corresponding charges to copy
|
|
2388
|
+
# the object. For information about downloading objects from Requester
|
|
2389
|
+
# Pays buckets, see [Downloading Objects in Requester Pays Buckets][1]
|
|
2390
|
+
# in the *Amazon S3 User Guide*.
|
|
2391
|
+
#
|
|
2392
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
|
2393
|
+
#
|
|
2394
|
+
# </note>
|
|
914
2395
|
#
|
|
915
2396
|
#
|
|
916
2397
|
#
|
|
@@ -918,21 +2399,59 @@ module Aws::S3
|
|
|
918
2399
|
# @option options [String] :tagging
|
|
919
2400
|
# The tag-set for the object. The tag-set must be encoded as URL Query
|
|
920
2401
|
# parameters.
|
|
2402
|
+
#
|
|
2403
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
|
2404
|
+
#
|
|
2405
|
+
# </note>
|
|
921
2406
|
# @option options [String] :object_lock_mode
|
|
922
2407
|
# Specifies the Object Lock mode that you want to apply to the uploaded
|
|
923
2408
|
# object.
|
|
2409
|
+
#
|
|
2410
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
|
2411
|
+
#
|
|
2412
|
+
# </note>
|
|
924
2413
|
# @option options [Time,DateTime,Date,Integer,String] :object_lock_retain_until_date
|
|
925
2414
|
# Specifies the date and time when you want the Object Lock to expire.
|
|
2415
|
+
#
|
|
2416
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
|
2417
|
+
#
|
|
2418
|
+
# </note>
|
|
926
2419
|
# @option options [String] :object_lock_legal_hold_status
|
|
927
|
-
# Specifies whether you want to apply a
|
|
2420
|
+
# Specifies whether you want to apply a legal hold to the uploaded
|
|
928
2421
|
# object.
|
|
2422
|
+
#
|
|
2423
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
|
2424
|
+
#
|
|
2425
|
+
# </note>
|
|
2426
|
+
# @option options [String] :expected_bucket_owner
|
|
2427
|
+
# The account ID of the expected bucket owner. If the account ID that
|
|
2428
|
+
# you provide does not match the actual owner of the bucket, the request
|
|
2429
|
+
# fails with the HTTP status code `403 Forbidden` (access denied).
|
|
2430
|
+
# @option options [String] :checksum_algorithm
|
|
2431
|
+
# Indicates the algorithm that you want Amazon S3 to use to create the
|
|
2432
|
+
# checksum for the object. For more information, see [Checking object
|
|
2433
|
+
# integrity][1] in the *Amazon S3 User Guide*.
|
|
2434
|
+
#
|
|
2435
|
+
#
|
|
2436
|
+
#
|
|
2437
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
|
|
2438
|
+
# @option options [String] :checksum_type
|
|
2439
|
+
# Indicates the checksum type that you want Amazon S3 to use to
|
|
2440
|
+
# calculate the object’s checksum value. For more information, see
|
|
2441
|
+
# [Checking object integrity in the Amazon S3 User Guide][1].
|
|
2442
|
+
#
|
|
2443
|
+
#
|
|
2444
|
+
#
|
|
2445
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
|
|
929
2446
|
# @return [MultipartUpload]
|
|
930
2447
|
def initiate_multipart_upload(options = {})
|
|
931
2448
|
options = options.merge(
|
|
932
2449
|
bucket: @bucket_name,
|
|
933
2450
|
key: @key
|
|
934
2451
|
)
|
|
935
|
-
resp =
|
|
2452
|
+
resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
|
2453
|
+
@client.create_multipart_upload(options)
|
|
2454
|
+
end
|
|
936
2455
|
MultipartUpload.new(
|
|
937
2456
|
bucket_name: @bucket_name,
|
|
938
2457
|
object_key: @key,
|
|
@@ -953,36 +2472,77 @@ module Aws::S3
|
|
|
953
2472
|
# content_length: 1,
|
|
954
2473
|
# content_md5: "ContentMD5",
|
|
955
2474
|
# content_type: "ContentType",
|
|
2475
|
+
# checksum_algorithm: "CRC32", # accepts CRC32, CRC32C, SHA1, SHA256, CRC64NVME
|
|
2476
|
+
# checksum_crc32: "ChecksumCRC32",
|
|
2477
|
+
# checksum_crc32c: "ChecksumCRC32C",
|
|
2478
|
+
# checksum_crc64nvme: "ChecksumCRC64NVME",
|
|
2479
|
+
# checksum_sha1: "ChecksumSHA1",
|
|
2480
|
+
# checksum_sha256: "ChecksumSHA256",
|
|
956
2481
|
# expires: Time.now,
|
|
2482
|
+
# if_match: "IfMatch",
|
|
2483
|
+
# if_none_match: "IfNoneMatch",
|
|
957
2484
|
# grant_full_control: "GrantFullControl",
|
|
958
2485
|
# grant_read: "GrantRead",
|
|
959
2486
|
# grant_read_acp: "GrantReadACP",
|
|
960
2487
|
# grant_write_acp: "GrantWriteACP",
|
|
2488
|
+
# write_offset_bytes: 1,
|
|
961
2489
|
# metadata: {
|
|
962
2490
|
# "MetadataKey" => "MetadataValue",
|
|
963
2491
|
# },
|
|
964
|
-
# server_side_encryption: "AES256", # accepts AES256, aws:kms
|
|
965
|
-
# storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER, DEEP_ARCHIVE
|
|
2492
|
+
# server_side_encryption: "AES256", # accepts AES256, aws:fsx, aws:kms, aws:kms:dsse
|
|
2493
|
+
# storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER, DEEP_ARCHIVE, OUTPOSTS, GLACIER_IR, SNOW, EXPRESS_ONEZONE, FSX_OPENZFS, FSX_ONTAP
|
|
966
2494
|
# website_redirect_location: "WebsiteRedirectLocation",
|
|
967
2495
|
# sse_customer_algorithm: "SSECustomerAlgorithm",
|
|
968
2496
|
# sse_customer_key: "SSECustomerKey",
|
|
969
2497
|
# sse_customer_key_md5: "SSECustomerKeyMD5",
|
|
970
2498
|
# ssekms_key_id: "SSEKMSKeyId",
|
|
971
2499
|
# ssekms_encryption_context: "SSEKMSEncryptionContext",
|
|
2500
|
+
# bucket_key_enabled: false,
|
|
972
2501
|
# request_payer: "requester", # accepts requester
|
|
973
2502
|
# tagging: "TaggingHeader",
|
|
974
2503
|
# object_lock_mode: "GOVERNANCE", # accepts GOVERNANCE, COMPLIANCE
|
|
975
2504
|
# object_lock_retain_until_date: Time.now,
|
|
976
2505
|
# object_lock_legal_hold_status: "ON", # accepts ON, OFF
|
|
2506
|
+
# expected_bucket_owner: "AccountId",
|
|
977
2507
|
# })
|
|
978
2508
|
# @param [Hash] options ({})
|
|
979
2509
|
# @option options [String] :acl
|
|
980
2510
|
# The canned ACL to apply to the object. For more information, see
|
|
981
|
-
# [Canned ACL][1]
|
|
2511
|
+
# [Canned ACL][1] in the *Amazon S3 User Guide*.
|
|
2512
|
+
#
|
|
2513
|
+
# When adding a new object, you can use headers to grant ACL-based
|
|
2514
|
+
# permissions to individual Amazon Web Services accounts or to
|
|
2515
|
+
# predefined groups defined by Amazon S3. These permissions are then
|
|
2516
|
+
# added to the ACL on the object. By default, all objects are private.
|
|
2517
|
+
# Only the owner has full access control. For more information, see
|
|
2518
|
+
# [Access Control List (ACL) Overview][2] and [Managing ACLs Using the
|
|
2519
|
+
# REST API][3] in the *Amazon S3 User Guide*.
|
|
2520
|
+
#
|
|
2521
|
+
# If the bucket that you're uploading objects to uses the bucket owner
|
|
2522
|
+
# enforced setting for S3 Object Ownership, ACLs are disabled and no
|
|
2523
|
+
# longer affect permissions. Buckets that use this setting only accept
|
|
2524
|
+
# PUT requests that don't specify an ACL or PUT requests that specify
|
|
2525
|
+
# bucket owner full control ACLs, such as the
|
|
2526
|
+
# `bucket-owner-full-control` canned ACL or an equivalent form of this
|
|
2527
|
+
# ACL expressed in the XML format. PUT requests that contain other ACLs
|
|
2528
|
+
# (for example, custom grants to certain Amazon Web Services accounts)
|
|
2529
|
+
# fail and return a `400` error with the error code
|
|
2530
|
+
# `AccessControlListNotSupported`. For more information, see [
|
|
2531
|
+
# Controlling ownership of objects and disabling ACLs][4] in the *Amazon
|
|
2532
|
+
# S3 User Guide*.
|
|
2533
|
+
#
|
|
2534
|
+
# <note markdown="1"> * This functionality is not supported for directory buckets.
|
|
2535
|
+
#
|
|
2536
|
+
# * This functionality is not supported for Amazon S3 on Outposts.
|
|
2537
|
+
#
|
|
2538
|
+
# </note>
|
|
982
2539
|
#
|
|
983
2540
|
#
|
|
984
2541
|
#
|
|
985
2542
|
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#CannedACL
|
|
2543
|
+
# [2]: https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html
|
|
2544
|
+
# [3]: https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-using-rest-api.html
|
|
2545
|
+
# [4]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/about-object-ownership.html
|
|
986
2546
|
# @option options [String, StringIO, File] :body
|
|
987
2547
|
# Object data.
|
|
988
2548
|
# @option options [String] :cache_control
|
|
@@ -992,84 +2552,347 @@ module Aws::S3
|
|
|
992
2552
|
#
|
|
993
2553
|
#
|
|
994
2554
|
#
|
|
995
|
-
# [1]: http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9
|
|
996
|
-
# @option options [String] :content_disposition
|
|
997
|
-
# Specifies presentational information for the object. For more
|
|
998
|
-
# information, see
|
|
999
|
-
# [
|
|
2555
|
+
# [1]: http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9
|
|
2556
|
+
# @option options [String] :content_disposition
|
|
2557
|
+
# Specifies presentational information for the object. For more
|
|
2558
|
+
# information, see
|
|
2559
|
+
# [https://www.rfc-editor.org/rfc/rfc6266#section-4][1].
|
|
2560
|
+
#
|
|
2561
|
+
#
|
|
2562
|
+
#
|
|
2563
|
+
# [1]: https://www.rfc-editor.org/rfc/rfc6266#section-4
|
|
2564
|
+
# @option options [String] :content_encoding
|
|
2565
|
+
# Specifies what content encodings have been applied to the object and
|
|
2566
|
+
# thus what decoding mechanisms must be applied to obtain the media-type
|
|
2567
|
+
# referenced by the Content-Type header field. For more information, see
|
|
2568
|
+
# [https://www.rfc-editor.org/rfc/rfc9110.html#field.content-encoding][1].
|
|
2569
|
+
#
|
|
2570
|
+
#
|
|
2571
|
+
#
|
|
2572
|
+
# [1]: https://www.rfc-editor.org/rfc/rfc9110.html#field.content-encoding
|
|
2573
|
+
# @option options [String] :content_language
|
|
2574
|
+
# The language the content is in.
|
|
2575
|
+
# @option options [Integer] :content_length
|
|
2576
|
+
# Size of the body in bytes. This parameter is useful when the size of
|
|
2577
|
+
# the body cannot be determined automatically. For more information, see
|
|
2578
|
+
# [https://www.rfc-editor.org/rfc/rfc9110.html#name-content-length][1].
|
|
2579
|
+
#
|
|
2580
|
+
#
|
|
2581
|
+
#
|
|
2582
|
+
# [1]: https://www.rfc-editor.org/rfc/rfc9110.html#name-content-length
|
|
2583
|
+
# @option options [String] :content_md5
|
|
2584
|
+
# The Base64 encoded 128-bit `MD5` digest of the message (without the
|
|
2585
|
+
# headers) according to RFC 1864. This header can be used as a message
|
|
2586
|
+
# integrity check to verify that the data is the same data that was
|
|
2587
|
+
# originally sent. Although it is optional, we recommend using the
|
|
2588
|
+
# Content-MD5 mechanism as an end-to-end integrity check. For more
|
|
2589
|
+
# information about REST request authentication, see [REST
|
|
2590
|
+
# Authentication][1].
|
|
2591
|
+
#
|
|
2592
|
+
# <note markdown="1"> The `Content-MD5` or `x-amz-sdk-checksum-algorithm` header is required
|
|
2593
|
+
# for any request to upload an object with a retention period configured
|
|
2594
|
+
# using Amazon S3 Object Lock. For more information, see [Uploading
|
|
2595
|
+
# objects to an Object Lock enabled bucket ][2] in the *Amazon S3 User
|
|
2596
|
+
# Guide*.
|
|
2597
|
+
#
|
|
2598
|
+
# </note>
|
|
2599
|
+
#
|
|
2600
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
|
2601
|
+
#
|
|
2602
|
+
# </note>
|
|
2603
|
+
#
|
|
2604
|
+
#
|
|
2605
|
+
#
|
|
2606
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/RESTAuthentication.html
|
|
2607
|
+
# [2]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-lock-managing.html#object-lock-put-object
|
|
2608
|
+
# @option options [String] :content_type
|
|
2609
|
+
# A standard MIME type describing the format of the contents. For more
|
|
2610
|
+
# information, see
|
|
2611
|
+
# [https://www.rfc-editor.org/rfc/rfc9110.html#name-content-type][1].
|
|
2612
|
+
#
|
|
2613
|
+
#
|
|
2614
|
+
#
|
|
2615
|
+
# [1]: https://www.rfc-editor.org/rfc/rfc9110.html#name-content-type
|
|
2616
|
+
# @option options [String] :checksum_algorithm
|
|
2617
|
+
# Indicates the algorithm used to create the checksum for the object
|
|
2618
|
+
# when you use the SDK. This header will not provide any additional
|
|
2619
|
+
# functionality if you don't use the SDK. When you send this header,
|
|
2620
|
+
# there must be a corresponding `x-amz-checksum-algorithm ` or
|
|
2621
|
+
# `x-amz-trailer` header sent. Otherwise, Amazon S3 fails the request
|
|
2622
|
+
# with the HTTP status code `400 Bad Request`.
|
|
2623
|
+
#
|
|
2624
|
+
# For the `x-amz-checksum-algorithm ` header, replace ` algorithm ` with
|
|
2625
|
+
# the supported algorithm from the following list:
|
|
2626
|
+
#
|
|
2627
|
+
# * `CRC32`
|
|
2628
|
+
#
|
|
2629
|
+
# * `CRC32C`
|
|
2630
|
+
#
|
|
2631
|
+
# * `CRC64NVME`
|
|
2632
|
+
#
|
|
2633
|
+
# * `SHA1`
|
|
2634
|
+
#
|
|
2635
|
+
# * `SHA256`
|
|
2636
|
+
#
|
|
2637
|
+
# For more information, see [Checking object integrity][1] in the
|
|
2638
|
+
# *Amazon S3 User Guide*.
|
|
2639
|
+
#
|
|
2640
|
+
# If the individual checksum value you provide through
|
|
2641
|
+
# `x-amz-checksum-algorithm ` doesn't match the checksum algorithm you
|
|
2642
|
+
# set through `x-amz-sdk-checksum-algorithm`, Amazon S3 fails the
|
|
2643
|
+
# request with a `BadDigest` error.
|
|
2644
|
+
#
|
|
2645
|
+
# <note markdown="1"> The `Content-MD5` or `x-amz-sdk-checksum-algorithm` header is required
|
|
2646
|
+
# for any request to upload an object with a retention period configured
|
|
2647
|
+
# using Amazon S3 Object Lock. For more information, see [Uploading
|
|
2648
|
+
# objects to an Object Lock enabled bucket ][2] in the *Amazon S3 User
|
|
2649
|
+
# Guide*.
|
|
2650
|
+
#
|
|
2651
|
+
# </note>
|
|
2652
|
+
#
|
|
2653
|
+
# For directory buckets, when you use Amazon Web Services SDKs, `CRC32`
|
|
2654
|
+
# is the default checksum algorithm that's used for performance.
|
|
2655
|
+
#
|
|
2656
|
+
#
|
|
1000
2657
|
#
|
|
2658
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
|
|
2659
|
+
# [2]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-lock-managing.html#object-lock-put-object
|
|
2660
|
+
# @option options [String] :checksum_crc32
|
|
2661
|
+
# This header can be used as a data integrity check to verify that the
|
|
2662
|
+
# data received is the same data that was originally sent. This header
|
|
2663
|
+
# specifies the Base64 encoded, 32-bit `CRC32` checksum of the object.
|
|
2664
|
+
# For more information, see [Checking object integrity][1] in the
|
|
2665
|
+
# *Amazon S3 User Guide*.
|
|
1001
2666
|
#
|
|
1002
2667
|
#
|
|
1003
|
-
# [1]: http://www.w3.org/Protocols/rfc2616/rfc2616-sec19.html#sec19.5.1
|
|
1004
|
-
# @option options [String] :content_encoding
|
|
1005
|
-
# Specifies what content encodings have been applied to the object and
|
|
1006
|
-
# thus what decoding mechanisms must be applied to obtain the media-type
|
|
1007
|
-
# referenced by the Content-Type header field. For more information, see
|
|
1008
|
-
# [http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.11][1].
|
|
1009
2668
|
#
|
|
2669
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
|
|
2670
|
+
# @option options [String] :checksum_crc32c
|
|
2671
|
+
# This header can be used as a data integrity check to verify that the
|
|
2672
|
+
# data received is the same data that was originally sent. This header
|
|
2673
|
+
# specifies the Base64 encoded, 32-bit `CRC32C` checksum of the object.
|
|
2674
|
+
# For more information, see [Checking object integrity][1] in the
|
|
2675
|
+
# *Amazon S3 User Guide*.
|
|
1010
2676
|
#
|
|
1011
2677
|
#
|
|
1012
|
-
# [1]: http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.11
|
|
1013
|
-
# @option options [String] :content_language
|
|
1014
|
-
# The language the content is in.
|
|
1015
|
-
# @option options [Integer] :content_length
|
|
1016
|
-
# Size of the body in bytes. This parameter is useful when the size of
|
|
1017
|
-
# the body cannot be determined automatically. For more information, see
|
|
1018
|
-
# [http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.13][1].
|
|
1019
2678
|
#
|
|
2679
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
|
|
2680
|
+
# @option options [String] :checksum_crc64nvme
|
|
2681
|
+
# This header can be used as a data integrity check to verify that the
|
|
2682
|
+
# data received is the same data that was originally sent. This header
|
|
2683
|
+
# specifies the Base64 encoded, 64-bit `CRC64NVME` checksum of the
|
|
2684
|
+
# object. The `CRC64NVME` checksum is always a full object checksum. For
|
|
2685
|
+
# more information, see [Checking object integrity in the Amazon S3 User
|
|
2686
|
+
# Guide][1].
|
|
1020
2687
|
#
|
|
1021
2688
|
#
|
|
1022
|
-
# [1]: http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.13
|
|
1023
|
-
# @option options [String] :content_md5
|
|
1024
|
-
# The base64-encoded 128-bit MD5 digest of the message (without the
|
|
1025
|
-
# headers) according to RFC 1864. This header can be used as a message
|
|
1026
|
-
# integrity check to verify that the data is the same data that was
|
|
1027
|
-
# originally sent. Although it is optional, we recommend using the
|
|
1028
|
-
# Content-MD5 mechanism as an end-to-end integrity check. For more
|
|
1029
|
-
# information about REST request authentication, see [REST
|
|
1030
|
-
# Authentication][1].
|
|
1031
2689
|
#
|
|
2690
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
|
|
2691
|
+
# @option options [String] :checksum_sha1
|
|
2692
|
+
# This header can be used as a data integrity check to verify that the
|
|
2693
|
+
# data received is the same data that was originally sent. This header
|
|
2694
|
+
# specifies the Base64 encoded, 160-bit `SHA1` digest of the object. For
|
|
2695
|
+
# more information, see [Checking object integrity][1] in the *Amazon S3
|
|
2696
|
+
# User Guide*.
|
|
1032
2697
|
#
|
|
1033
2698
|
#
|
|
1034
|
-
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/RESTAuthentication.html
|
|
1035
|
-
# @option options [String] :content_type
|
|
1036
|
-
# A standard MIME type describing the format of the contents. For more
|
|
1037
|
-
# information, see
|
|
1038
|
-
# [http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.17][1].
|
|
1039
2699
|
#
|
|
2700
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
|
|
2701
|
+
# @option options [String] :checksum_sha256
|
|
2702
|
+
# This header can be used as a data integrity check to verify that the
|
|
2703
|
+
# data received is the same data that was originally sent. This header
|
|
2704
|
+
# specifies the Base64 encoded, 256-bit `SHA256` digest of the object.
|
|
2705
|
+
# For more information, see [Checking object integrity][1] in the
|
|
2706
|
+
# *Amazon S3 User Guide*.
|
|
1040
2707
|
#
|
|
1041
2708
|
#
|
|
1042
|
-
#
|
|
2709
|
+
#
|
|
2710
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
|
|
1043
2711
|
# @option options [Time,DateTime,Date,Integer,String] :expires
|
|
1044
2712
|
# The date and time at which the object is no longer cacheable. For more
|
|
1045
2713
|
# information, see
|
|
1046
|
-
# [
|
|
2714
|
+
# [https://www.rfc-editor.org/rfc/rfc7234#section-5.3][1].
|
|
2715
|
+
#
|
|
2716
|
+
#
|
|
2717
|
+
#
|
|
2718
|
+
# [1]: https://www.rfc-editor.org/rfc/rfc7234#section-5.3
|
|
2719
|
+
# @option options [String] :if_match
|
|
2720
|
+
# Uploads the object only if the ETag (entity tag) value provided during
|
|
2721
|
+
# the WRITE operation matches the ETag of the object in S3. If the ETag
|
|
2722
|
+
# values do not match, the operation returns a `412 Precondition Failed`
|
|
2723
|
+
# error.
|
|
2724
|
+
#
|
|
2725
|
+
# If a conflicting operation occurs during the upload S3 returns a `409
|
|
2726
|
+
# ConditionalRequestConflict` response. On a 409 failure you should
|
|
2727
|
+
# fetch the object's ETag and retry the upload.
|
|
2728
|
+
#
|
|
2729
|
+
# Expects the ETag value as a string.
|
|
2730
|
+
#
|
|
2731
|
+
# For more information about conditional requests, see [RFC 7232][1], or
|
|
2732
|
+
# [Conditional requests][2] in the *Amazon S3 User Guide*.
|
|
1047
2733
|
#
|
|
1048
2734
|
#
|
|
1049
2735
|
#
|
|
1050
|
-
# [1]:
|
|
2736
|
+
# [1]: https://tools.ietf.org/html/rfc7232
|
|
2737
|
+
# [2]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/conditional-requests.html
|
|
2738
|
+
# @option options [String] :if_none_match
|
|
2739
|
+
# Uploads the object only if the object key name does not already exist
|
|
2740
|
+
# in the bucket specified. Otherwise, Amazon S3 returns a `412
|
|
2741
|
+
# Precondition Failed` error.
|
|
2742
|
+
#
|
|
2743
|
+
# If a conflicting operation occurs during the upload S3 returns a `409
|
|
2744
|
+
# ConditionalRequestConflict` response. On a 409 failure you should
|
|
2745
|
+
# retry the upload.
|
|
2746
|
+
#
|
|
2747
|
+
# Expects the '*' (asterisk) character.
|
|
2748
|
+
#
|
|
2749
|
+
# For more information about conditional requests, see [RFC 7232][1], or
|
|
2750
|
+
# [Conditional requests][2] in the *Amazon S3 User Guide*.
|
|
2751
|
+
#
|
|
2752
|
+
#
|
|
2753
|
+
#
|
|
2754
|
+
# [1]: https://tools.ietf.org/html/rfc7232
|
|
2755
|
+
# [2]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/conditional-requests.html
|
|
1051
2756
|
# @option options [String] :grant_full_control
|
|
1052
2757
|
# Gives the grantee READ, READ\_ACP, and WRITE\_ACP permissions on the
|
|
1053
2758
|
# object.
|
|
2759
|
+
#
|
|
2760
|
+
# <note markdown="1"> * This functionality is not supported for directory buckets.
|
|
2761
|
+
#
|
|
2762
|
+
# * This functionality is not supported for Amazon S3 on Outposts.
|
|
2763
|
+
#
|
|
2764
|
+
# </note>
|
|
1054
2765
|
# @option options [String] :grant_read
|
|
1055
2766
|
# Allows grantee to read the object data and its metadata.
|
|
2767
|
+
#
|
|
2768
|
+
# <note markdown="1"> * This functionality is not supported for directory buckets.
|
|
2769
|
+
#
|
|
2770
|
+
# * This functionality is not supported for Amazon S3 on Outposts.
|
|
2771
|
+
#
|
|
2772
|
+
# </note>
|
|
1056
2773
|
# @option options [String] :grant_read_acp
|
|
1057
2774
|
# Allows grantee to read the object ACL.
|
|
2775
|
+
#
|
|
2776
|
+
# <note markdown="1"> * This functionality is not supported for directory buckets.
|
|
2777
|
+
#
|
|
2778
|
+
# * This functionality is not supported for Amazon S3 on Outposts.
|
|
2779
|
+
#
|
|
2780
|
+
# </note>
|
|
1058
2781
|
# @option options [String] :grant_write_acp
|
|
1059
2782
|
# Allows grantee to write the ACL for the applicable object.
|
|
2783
|
+
#
|
|
2784
|
+
# <note markdown="1"> * This functionality is not supported for directory buckets.
|
|
2785
|
+
#
|
|
2786
|
+
# * This functionality is not supported for Amazon S3 on Outposts.
|
|
2787
|
+
#
|
|
2788
|
+
# </note>
|
|
2789
|
+
# @option options [Integer] :write_offset_bytes
|
|
2790
|
+
# Specifies the offset for appending data to existing objects in bytes.
|
|
2791
|
+
# The offset must be equal to the size of the existing object being
|
|
2792
|
+
# appended to. If no object exists, setting this header to 0 will create
|
|
2793
|
+
# a new object.
|
|
2794
|
+
#
|
|
2795
|
+
# <note markdown="1"> This functionality is only supported for objects in the Amazon S3
|
|
2796
|
+
# Express One Zone storage class in directory buckets.
|
|
2797
|
+
#
|
|
2798
|
+
# </note>
|
|
1060
2799
|
# @option options [Hash<String,String>] :metadata
|
|
1061
2800
|
# A map of metadata to store with the object in S3.
|
|
1062
2801
|
# @option options [String] :server_side_encryption
|
|
1063
|
-
# The server-side encryption algorithm used when
|
|
1064
|
-
# Amazon S3
|
|
2802
|
+
# The server-side encryption algorithm that was used when you store this
|
|
2803
|
+
# object in Amazon S3 or Amazon FSx.
|
|
2804
|
+
#
|
|
2805
|
+
# * <b>General purpose buckets </b> - You have four mutually exclusive
|
|
2806
|
+
# options to protect data using server-side encryption in Amazon S3,
|
|
2807
|
+
# depending on how you choose to manage the encryption keys.
|
|
2808
|
+
# Specifically, the encryption key options are Amazon S3 managed keys
|
|
2809
|
+
# (SSE-S3), Amazon Web Services KMS keys (SSE-KMS or DSSE-KMS), and
|
|
2810
|
+
# customer-provided keys (SSE-C). Amazon S3 encrypts data with
|
|
2811
|
+
# server-side encryption by using Amazon S3 managed keys (SSE-S3) by
|
|
2812
|
+
# default. You can optionally tell Amazon S3 to encrypt data at rest
|
|
2813
|
+
# by using server-side encryption with other key options. For more
|
|
2814
|
+
# information, see [Using Server-Side Encryption][1] in the *Amazon S3
|
|
2815
|
+
# User Guide*.
|
|
2816
|
+
#
|
|
2817
|
+
# * <b>Directory buckets </b> - For directory buckets, there are only
|
|
2818
|
+
# two supported options for server-side encryption: server-side
|
|
2819
|
+
# encryption with Amazon S3 managed keys (SSE-S3) (`AES256`) and
|
|
2820
|
+
# server-side encryption with KMS keys (SSE-KMS) (`aws:kms`). We
|
|
2821
|
+
# recommend that the bucket's default encryption uses the desired
|
|
2822
|
+
# encryption configuration and you don't override the bucket default
|
|
2823
|
+
# encryption in your `CreateSession` requests or `PUT` object
|
|
2824
|
+
# requests. Then, new objects are automatically encrypted with the
|
|
2825
|
+
# desired encryption settings. For more information, see [Protecting
|
|
2826
|
+
# data with server-side encryption][2] in the *Amazon S3 User Guide*.
|
|
2827
|
+
# For more information about the encryption overriding behaviors in
|
|
2828
|
+
# directory buckets, see [Specifying server-side encryption with KMS
|
|
2829
|
+
# for new object uploads][3].
|
|
2830
|
+
#
|
|
2831
|
+
# In the Zonal endpoint API calls (except [CopyObject][4] and
|
|
2832
|
+
# [UploadPartCopy][5]) using the REST API, the encryption request
|
|
2833
|
+
# headers must match the encryption settings that are specified in the
|
|
2834
|
+
# `CreateSession` request. You can't override the values of the
|
|
2835
|
+
# encryption settings (`x-amz-server-side-encryption`,
|
|
2836
|
+
# `x-amz-server-side-encryption-aws-kms-key-id`,
|
|
2837
|
+
# `x-amz-server-side-encryption-context`, and
|
|
2838
|
+
# `x-amz-server-side-encryption-bucket-key-enabled`) that are
|
|
2839
|
+
# specified in the `CreateSession` request. You don't need to
|
|
2840
|
+
# explicitly specify these encryption settings values in Zonal
|
|
2841
|
+
# endpoint API calls, and Amazon S3 will use the encryption settings
|
|
2842
|
+
# values from the `CreateSession` request to protect new objects in
|
|
2843
|
+
# the directory bucket.
|
|
2844
|
+
#
|
|
2845
|
+
# <note markdown="1"> When you use the CLI or the Amazon Web Services SDKs, for
|
|
2846
|
+
# `CreateSession`, the session token refreshes automatically to avoid
|
|
2847
|
+
# service interruptions when a session expires. The CLI or the Amazon
|
|
2848
|
+
# Web Services SDKs use the bucket's default encryption configuration
|
|
2849
|
+
# for the `CreateSession` request. It's not supported to override the
|
|
2850
|
+
# encryption settings values in the `CreateSession` request. So in the
|
|
2851
|
+
# Zonal endpoint API calls (except [CopyObject][4] and
|
|
2852
|
+
# [UploadPartCopy][5]), the encryption request headers must match the
|
|
2853
|
+
# default encryption configuration of the directory bucket.
|
|
2854
|
+
#
|
|
2855
|
+
# </note>
|
|
2856
|
+
#
|
|
2857
|
+
# * <b>S3 access points for Amazon FSx </b> - When accessing data stored
|
|
2858
|
+
# in Amazon FSx file systems using S3 access points, the only valid
|
|
2859
|
+
# server side encryption option is `aws:fsx`. All Amazon FSx file
|
|
2860
|
+
# systems have encryption configured by default and are encrypted at
|
|
2861
|
+
# rest. Data is automatically encrypted before being written to the
|
|
2862
|
+
# file system, and automatically decrypted as it is read. These
|
|
2863
|
+
# processes are handled transparently by Amazon FSx.
|
|
2864
|
+
#
|
|
2865
|
+
#
|
|
2866
|
+
#
|
|
2867
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingServerSideEncryption.html
|
|
2868
|
+
# [2]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-serv-side-encryption.html
|
|
2869
|
+
# [3]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-specifying-kms-encryption.html
|
|
2870
|
+
# [4]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_CopyObject.html
|
|
2871
|
+
# [5]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPartCopy.html
|
|
1065
2872
|
# @option options [String] :storage_class
|
|
1066
|
-
#
|
|
1067
|
-
#
|
|
2873
|
+
# By default, Amazon S3 uses the STANDARD Storage Class to store newly
|
|
2874
|
+
# created objects. The STANDARD storage class provides high durability
|
|
2875
|
+
# and high availability. Depending on performance needs, you can specify
|
|
2876
|
+
# a different Storage Class. For more information, see [Storage
|
|
2877
|
+
# Classes][1] in the *Amazon S3 User Guide*.
|
|
2878
|
+
#
|
|
2879
|
+
# <note markdown="1"> * Directory buckets only support `EXPRESS_ONEZONE` (the S3 Express One
|
|
2880
|
+
# Zone storage class) in Availability Zones and `ONEZONE_IA` (the S3
|
|
2881
|
+
# One Zone-Infrequent Access storage class) in Dedicated Local Zones.
|
|
2882
|
+
#
|
|
2883
|
+
# * Amazon S3 on Outposts only uses the OUTPOSTS Storage Class.
|
|
2884
|
+
#
|
|
2885
|
+
# </note>
|
|
2886
|
+
#
|
|
2887
|
+
#
|
|
2888
|
+
#
|
|
2889
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html
|
|
1068
2890
|
# @option options [String] :website_redirect_location
|
|
1069
2891
|
# If the bucket is configured as a website, redirects requests for this
|
|
1070
2892
|
# object to another object in the same bucket or to an external URL.
|
|
1071
2893
|
# Amazon S3 stores the value of this header in the object metadata. For
|
|
1072
|
-
# information about object metadata, see [Object Key and Metadata][1]
|
|
2894
|
+
# information about object metadata, see [Object Key and Metadata][1] in
|
|
2895
|
+
# the *Amazon S3 User Guide*.
|
|
1073
2896
|
#
|
|
1074
2897
|
# In the following example, the request header sets the redirect to an
|
|
1075
2898
|
# object (anotherPage.html) in the same bucket:
|
|
@@ -1083,7 +2906,11 @@ module Aws::S3
|
|
|
1083
2906
|
#
|
|
1084
2907
|
# For more information about website hosting in Amazon S3, see [Hosting
|
|
1085
2908
|
# Websites on Amazon S3][2] and [How to Configure Website Page
|
|
1086
|
-
# Redirects][3]
|
|
2909
|
+
# Redirects][3] in the *Amazon S3 User Guide*.
|
|
2910
|
+
#
|
|
2911
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
|
2912
|
+
#
|
|
2913
|
+
# </note>
|
|
1087
2914
|
#
|
|
1088
2915
|
#
|
|
1089
2916
|
#
|
|
@@ -1091,40 +2918,120 @@ module Aws::S3
|
|
|
1091
2918
|
# [2]: https://docs.aws.amazon.com/AmazonS3/latest/dev/WebsiteHosting.html
|
|
1092
2919
|
# [3]: https://docs.aws.amazon.com/AmazonS3/latest/dev/how-to-page-redirect.html
|
|
1093
2920
|
# @option options [String] :sse_customer_algorithm
|
|
1094
|
-
# Specifies the algorithm to use
|
|
1095
|
-
# example, AES256).
|
|
2921
|
+
# Specifies the algorithm to use when encrypting the object (for
|
|
2922
|
+
# example, `AES256`).
|
|
2923
|
+
#
|
|
2924
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
|
2925
|
+
#
|
|
2926
|
+
# </note>
|
|
1096
2927
|
# @option options [String] :sse_customer_key
|
|
1097
2928
|
# Specifies the customer-provided encryption key for Amazon S3 to use in
|
|
1098
2929
|
# encrypting data. This value is used to store the object and then it is
|
|
1099
2930
|
# discarded; Amazon S3 does not store the encryption key. The key must
|
|
1100
2931
|
# be appropriate for use with the algorithm specified in the
|
|
1101
|
-
# `x-amz-server-side
|
|
2932
|
+
# `x-amz-server-side-encryption-customer-algorithm` header.
|
|
2933
|
+
#
|
|
2934
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
|
2935
|
+
#
|
|
2936
|
+
# </note>
|
|
1102
2937
|
# @option options [String] :sse_customer_key_md5
|
|
1103
2938
|
# Specifies the 128-bit MD5 digest of the encryption key according to
|
|
1104
2939
|
# RFC 1321. Amazon S3 uses this header for a message integrity check to
|
|
1105
2940
|
# ensure that the encryption key was transmitted without error.
|
|
2941
|
+
#
|
|
2942
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
|
2943
|
+
#
|
|
2944
|
+
# </note>
|
|
1106
2945
|
# @option options [String] :ssekms_key_id
|
|
1107
|
-
#
|
|
1108
|
-
#
|
|
1109
|
-
#
|
|
1110
|
-
#
|
|
1111
|
-
#
|
|
1112
|
-
#
|
|
1113
|
-
#
|
|
1114
|
-
#
|
|
1115
|
-
# `x-amz-server-side-encryption:aws:kms
|
|
1116
|
-
# x-amz-server-side-encryption
|
|
1117
|
-
#
|
|
2946
|
+
# Specifies the KMS key ID (Key ID, Key ARN, or Key Alias) to use for
|
|
2947
|
+
# object encryption. If the KMS key doesn't exist in the same account
|
|
2948
|
+
# that's issuing the command, you must use the full Key ARN not the Key
|
|
2949
|
+
# ID.
|
|
2950
|
+
#
|
|
2951
|
+
# **General purpose buckets** - If you specify
|
|
2952
|
+
# `x-amz-server-side-encryption` with `aws:kms` or `aws:kms:dsse`, this
|
|
2953
|
+
# header specifies the ID (Key ID, Key ARN, or Key Alias) of the KMS key
|
|
2954
|
+
# to use. If you specify `x-amz-server-side-encryption:aws:kms` or
|
|
2955
|
+
# `x-amz-server-side-encryption:aws:kms:dsse`, but do not provide
|
|
2956
|
+
# `x-amz-server-side-encryption-aws-kms-key-id`, Amazon S3 uses the
|
|
2957
|
+
# Amazon Web Services managed key (`aws/s3`) to protect the data.
|
|
2958
|
+
#
|
|
2959
|
+
# **Directory buckets** - To encrypt data using SSE-KMS, it's
|
|
2960
|
+
# recommended to specify the `x-amz-server-side-encryption` header to
|
|
2961
|
+
# `aws:kms`. Then, the `x-amz-server-side-encryption-aws-kms-key-id`
|
|
2962
|
+
# header implicitly uses the bucket's default KMS customer managed key
|
|
2963
|
+
# ID. If you want to explicitly set the `
|
|
2964
|
+
# x-amz-server-side-encryption-aws-kms-key-id` header, it must match the
|
|
2965
|
+
# bucket's default customer managed key (using key ID or ARN, not
|
|
2966
|
+
# alias). Your SSE-KMS configuration can only support 1 [customer
|
|
2967
|
+
# managed key][1] per directory bucket's lifetime. The [Amazon Web
|
|
2968
|
+
# Services managed key][2] (`aws/s3`) isn't supported. Incorrect key
|
|
2969
|
+
# specification results in an HTTP `400 Bad Request` error.
|
|
2970
|
+
#
|
|
2971
|
+
#
|
|
2972
|
+
#
|
|
2973
|
+
# [1]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#customer-cmk
|
|
2974
|
+
# [2]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-managed-cmk
|
|
1118
2975
|
# @option options [String] :ssekms_encryption_context
|
|
1119
|
-
# Specifies the
|
|
1120
|
-
#
|
|
1121
|
-
#
|
|
2976
|
+
# Specifies the Amazon Web Services KMS Encryption Context as an
|
|
2977
|
+
# additional encryption context to use for object encryption. The value
|
|
2978
|
+
# of this header is a Base64 encoded string of a UTF-8 encoded JSON,
|
|
2979
|
+
# which contains the encryption context as key-value pairs. This value
|
|
2980
|
+
# is stored as object metadata and automatically gets passed on to
|
|
2981
|
+
# Amazon Web Services KMS for future `GetObject` operations on this
|
|
2982
|
+
# object.
|
|
2983
|
+
#
|
|
2984
|
+
# **General purpose buckets** - This value must be explicitly added
|
|
2985
|
+
# during `CopyObject` operations if you want an additional encryption
|
|
2986
|
+
# context for your object. For more information, see [Encryption
|
|
2987
|
+
# context][1] in the *Amazon S3 User Guide*.
|
|
2988
|
+
#
|
|
2989
|
+
# **Directory buckets** - You can optionally provide an explicit
|
|
2990
|
+
# encryption context value. The value must match the default encryption
|
|
2991
|
+
# context - the bucket Amazon Resource Name (ARN). An additional
|
|
2992
|
+
# encryption context value is not supported.
|
|
2993
|
+
#
|
|
2994
|
+
#
|
|
2995
|
+
#
|
|
2996
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/UsingKMSEncryption.html#encryption-context
|
|
2997
|
+
# @option options [Boolean] :bucket_key_enabled
|
|
2998
|
+
# Specifies whether Amazon S3 should use an S3 Bucket Key for object
|
|
2999
|
+
# encryption with server-side encryption using Key Management Service
|
|
3000
|
+
# (KMS) keys (SSE-KMS).
|
|
3001
|
+
#
|
|
3002
|
+
# **General purpose buckets** - Setting this header to `true` causes
|
|
3003
|
+
# Amazon S3 to use an S3 Bucket Key for object encryption with SSE-KMS.
|
|
3004
|
+
# Also, specifying this header with a PUT action doesn't affect
|
|
3005
|
+
# bucket-level settings for S3 Bucket Key.
|
|
3006
|
+
#
|
|
3007
|
+
# **Directory buckets** - S3 Bucket Keys are always enabled for `GET`
|
|
3008
|
+
# and `PUT` operations in a directory bucket and can’t be disabled. S3
|
|
3009
|
+
# Bucket Keys aren't supported, when you copy SSE-KMS encrypted objects
|
|
3010
|
+
# from general purpose buckets to directory buckets, from directory
|
|
3011
|
+
# buckets to general purpose buckets, or between directory buckets,
|
|
3012
|
+
# through [CopyObject][1], [UploadPartCopy][2], [the Copy operation in
|
|
3013
|
+
# Batch Operations][3], or [the import jobs][4]. In this case, Amazon S3
|
|
3014
|
+
# makes a call to KMS every time a copy request is made for a
|
|
3015
|
+
# KMS-encrypted object.
|
|
3016
|
+
#
|
|
3017
|
+
#
|
|
3018
|
+
#
|
|
3019
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_CopyObject.html
|
|
3020
|
+
# [2]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPartCopy.html
|
|
3021
|
+
# [3]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/directory-buckets-objects-Batch-Ops
|
|
3022
|
+
# [4]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/create-import-job
|
|
1122
3023
|
# @option options [String] :request_payer
|
|
1123
3024
|
# Confirms that the requester knows that they will be charged for the
|
|
1124
3025
|
# request. Bucket owners need not specify this parameter in their
|
|
1125
|
-
# requests.
|
|
1126
|
-
#
|
|
1127
|
-
#
|
|
3026
|
+
# requests. If either the source or destination S3 bucket has Requester
|
|
3027
|
+
# Pays enabled, the requester will pay for corresponding charges to copy
|
|
3028
|
+
# the object. For information about downloading objects from Requester
|
|
3029
|
+
# Pays buckets, see [Downloading Objects in Requester Pays Buckets][1]
|
|
3030
|
+
# in the *Amazon S3 User Guide*.
|
|
3031
|
+
#
|
|
3032
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
|
3033
|
+
#
|
|
3034
|
+
# </note>
|
|
1128
3035
|
#
|
|
1129
3036
|
#
|
|
1130
3037
|
#
|
|
@@ -1132,24 +3039,48 @@ module Aws::S3
|
|
|
1132
3039
|
# @option options [String] :tagging
|
|
1133
3040
|
# The tag-set for the object. The tag-set must be encoded as URL Query
|
|
1134
3041
|
# parameters. (For example, "Key1=Value1")
|
|
3042
|
+
#
|
|
3043
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
|
3044
|
+
#
|
|
3045
|
+
# </note>
|
|
1135
3046
|
# @option options [String] :object_lock_mode
|
|
1136
3047
|
# The Object Lock mode that you want to apply to this object.
|
|
3048
|
+
#
|
|
3049
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
|
3050
|
+
#
|
|
3051
|
+
# </note>
|
|
1137
3052
|
# @option options [Time,DateTime,Date,Integer,String] :object_lock_retain_until_date
|
|
1138
3053
|
# The date and time when you want this object's Object Lock to expire.
|
|
3054
|
+
# Must be formatted as a timestamp parameter.
|
|
3055
|
+
#
|
|
3056
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
|
3057
|
+
#
|
|
3058
|
+
# </note>
|
|
1139
3059
|
# @option options [String] :object_lock_legal_hold_status
|
|
1140
3060
|
# Specifies whether a legal hold will be applied to this object. For
|
|
1141
|
-
# more information about S3 Object Lock, see [Object Lock][1]
|
|
3061
|
+
# more information about S3 Object Lock, see [Object Lock][1] in the
|
|
3062
|
+
# *Amazon S3 User Guide*.
|
|
3063
|
+
#
|
|
3064
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
|
3065
|
+
#
|
|
3066
|
+
# </note>
|
|
1142
3067
|
#
|
|
1143
3068
|
#
|
|
1144
3069
|
#
|
|
1145
3070
|
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock.html
|
|
3071
|
+
# @option options [String] :expected_bucket_owner
|
|
3072
|
+
# The account ID of the expected bucket owner. If the account ID that
|
|
3073
|
+
# you provide does not match the actual owner of the bucket, the request
|
|
3074
|
+
# fails with the HTTP status code `403 Forbidden` (access denied).
|
|
1146
3075
|
# @return [Types::PutObjectOutput]
|
|
1147
3076
|
def put(options = {})
|
|
1148
3077
|
options = options.merge(
|
|
1149
3078
|
bucket: @bucket_name,
|
|
1150
3079
|
key: @key
|
|
1151
3080
|
)
|
|
1152
|
-
resp =
|
|
3081
|
+
resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
|
3082
|
+
@client.put_object(options)
|
|
3083
|
+
end
|
|
1153
3084
|
resp.data
|
|
1154
3085
|
end
|
|
1155
3086
|
|
|
@@ -1203,7 +3134,7 @@ module Aws::S3
|
|
|
1203
3134
|
# bucket_name: "BucketName", # required
|
|
1204
3135
|
# prefix: "LocationPrefix", # required
|
|
1205
3136
|
# encryption: {
|
|
1206
|
-
# encryption_type: "AES256", # required, accepts AES256, aws:kms
|
|
3137
|
+
# encryption_type: "AES256", # required, accepts AES256, aws:fsx, aws:kms, aws:kms:dsse
|
|
1207
3138
|
# kms_key_id: "SSEKMSKeyId",
|
|
1208
3139
|
# kms_context: "KMSContext",
|
|
1209
3140
|
# },
|
|
@@ -1234,11 +3165,13 @@ module Aws::S3
|
|
|
1234
3165
|
# value: "MetadataValue",
|
|
1235
3166
|
# },
|
|
1236
3167
|
# ],
|
|
1237
|
-
# storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER, DEEP_ARCHIVE
|
|
3168
|
+
# storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER, DEEP_ARCHIVE, OUTPOSTS, GLACIER_IR, SNOW, EXPRESS_ONEZONE, FSX_OPENZFS, FSX_ONTAP
|
|
1238
3169
|
# },
|
|
1239
3170
|
# },
|
|
1240
3171
|
# },
|
|
1241
3172
|
# request_payer: "requester", # accepts requester
|
|
3173
|
+
# checksum_algorithm: "CRC32", # accepts CRC32, CRC32C, SHA1, SHA256, CRC64NVME
|
|
3174
|
+
# expected_bucket_owner: "AccountId",
|
|
1242
3175
|
# })
|
|
1243
3176
|
# @param [Hash] options ({})
|
|
1244
3177
|
# @option options [String] :version_id
|
|
@@ -1248,20 +3181,246 @@ module Aws::S3
|
|
|
1248
3181
|
# @option options [String] :request_payer
|
|
1249
3182
|
# Confirms that the requester knows that they will be charged for the
|
|
1250
3183
|
# request. Bucket owners need not specify this parameter in their
|
|
1251
|
-
# requests.
|
|
1252
|
-
#
|
|
1253
|
-
#
|
|
3184
|
+
# requests. If either the source or destination S3 bucket has Requester
|
|
3185
|
+
# Pays enabled, the requester will pay for corresponding charges to copy
|
|
3186
|
+
# the object. For information about downloading objects from Requester
|
|
3187
|
+
# Pays buckets, see [Downloading Objects in Requester Pays Buckets][1]
|
|
3188
|
+
# in the *Amazon S3 User Guide*.
|
|
3189
|
+
#
|
|
3190
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
|
3191
|
+
#
|
|
3192
|
+
# </note>
|
|
1254
3193
|
#
|
|
1255
3194
|
#
|
|
1256
3195
|
#
|
|
1257
3196
|
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
|
|
3197
|
+
# @option options [String] :checksum_algorithm
|
|
3198
|
+
# Indicates the algorithm used to create the checksum for the object
|
|
3199
|
+
# when you use the SDK. This header will not provide any additional
|
|
3200
|
+
# functionality if you don't use the SDK. When you send this header,
|
|
3201
|
+
# there must be a corresponding `x-amz-checksum` or `x-amz-trailer`
|
|
3202
|
+
# header sent. Otherwise, Amazon S3 fails the request with the HTTP
|
|
3203
|
+
# status code `400 Bad Request`. For more information, see [Checking
|
|
3204
|
+
# object integrity][1] in the *Amazon S3 User Guide*.
|
|
3205
|
+
#
|
|
3206
|
+
# If you provide an individual checksum, Amazon S3 ignores any provided
|
|
3207
|
+
# `ChecksumAlgorithm` parameter.
|
|
3208
|
+
#
|
|
3209
|
+
#
|
|
3210
|
+
#
|
|
3211
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
|
|
3212
|
+
# @option options [String] :expected_bucket_owner
|
|
3213
|
+
# The account ID of the expected bucket owner. If the account ID that
|
|
3214
|
+
# you provide does not match the actual owner of the bucket, the request
|
|
3215
|
+
# fails with the HTTP status code `403 Forbidden` (access denied).
|
|
1258
3216
|
# @return [Types::RestoreObjectOutput]
|
|
1259
3217
|
def restore_object(options = {})
|
|
1260
3218
|
options = options.merge(
|
|
1261
3219
|
bucket: @bucket_name,
|
|
1262
3220
|
key: @key
|
|
1263
3221
|
)
|
|
1264
|
-
resp =
|
|
3222
|
+
resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
|
3223
|
+
@client.restore_object(options)
|
|
3224
|
+
end
|
|
3225
|
+
resp.data
|
|
3226
|
+
end
|
|
3227
|
+
|
|
3228
|
+
# @example Request syntax with placeholder values
|
|
3229
|
+
#
|
|
3230
|
+
# object.head({
|
|
3231
|
+
# if_match: "IfMatch",
|
|
3232
|
+
# if_modified_since: Time.now,
|
|
3233
|
+
# if_none_match: "IfNoneMatch",
|
|
3234
|
+
# if_unmodified_since: Time.now,
|
|
3235
|
+
# range: "Range",
|
|
3236
|
+
# response_cache_control: "ResponseCacheControl",
|
|
3237
|
+
# response_content_disposition: "ResponseContentDisposition",
|
|
3238
|
+
# response_content_encoding: "ResponseContentEncoding",
|
|
3239
|
+
# response_content_language: "ResponseContentLanguage",
|
|
3240
|
+
# response_content_type: "ResponseContentType",
|
|
3241
|
+
# response_expires: Time.now,
|
|
3242
|
+
# version_id: "ObjectVersionId",
|
|
3243
|
+
# sse_customer_algorithm: "SSECustomerAlgorithm",
|
|
3244
|
+
# sse_customer_key: "SSECustomerKey",
|
|
3245
|
+
# sse_customer_key_md5: "SSECustomerKeyMD5",
|
|
3246
|
+
# request_payer: "requester", # accepts requester
|
|
3247
|
+
# part_number: 1,
|
|
3248
|
+
# expected_bucket_owner: "AccountId",
|
|
3249
|
+
# checksum_mode: "ENABLED", # accepts ENABLED
|
|
3250
|
+
# })
|
|
3251
|
+
# @param [Hash] options ({})
|
|
3252
|
+
# @option options [String] :if_match
|
|
3253
|
+
# Return the object only if its entity tag (ETag) is the same as the one
|
|
3254
|
+
# specified; otherwise, return a 412 (precondition failed) error.
|
|
3255
|
+
#
|
|
3256
|
+
# If both of the `If-Match` and `If-Unmodified-Since` headers are
|
|
3257
|
+
# present in the request as follows:
|
|
3258
|
+
#
|
|
3259
|
+
# * `If-Match` condition evaluates to `true`, and;
|
|
3260
|
+
#
|
|
3261
|
+
# * `If-Unmodified-Since` condition evaluates to `false`;
|
|
3262
|
+
#
|
|
3263
|
+
# Then Amazon S3 returns `200 OK` and the data requested.
|
|
3264
|
+
#
|
|
3265
|
+
# For more information about conditional requests, see [RFC 7232][1].
|
|
3266
|
+
#
|
|
3267
|
+
#
|
|
3268
|
+
#
|
|
3269
|
+
# [1]: https://tools.ietf.org/html/rfc7232
|
|
3270
|
+
# @option options [Time,DateTime,Date,Integer,String] :if_modified_since
|
|
3271
|
+
# Return the object only if it has been modified since the specified
|
|
3272
|
+
# time; otherwise, return a 304 (not modified) error.
|
|
3273
|
+
#
|
|
3274
|
+
# If both of the `If-None-Match` and `If-Modified-Since` headers are
|
|
3275
|
+
# present in the request as follows:
|
|
3276
|
+
#
|
|
3277
|
+
# * `If-None-Match` condition evaluates to `false`, and;
|
|
3278
|
+
#
|
|
3279
|
+
# * `If-Modified-Since` condition evaluates to `true`;
|
|
3280
|
+
#
|
|
3281
|
+
# Then Amazon S3 returns the `304 Not Modified` response code.
|
|
3282
|
+
#
|
|
3283
|
+
# For more information about conditional requests, see [RFC 7232][1].
|
|
3284
|
+
#
|
|
3285
|
+
#
|
|
3286
|
+
#
|
|
3287
|
+
# [1]: https://tools.ietf.org/html/rfc7232
|
|
3288
|
+
# @option options [String] :if_none_match
|
|
3289
|
+
# Return the object only if its entity tag (ETag) is different from the
|
|
3290
|
+
# one specified; otherwise, return a 304 (not modified) error.
|
|
3291
|
+
#
|
|
3292
|
+
# If both of the `If-None-Match` and `If-Modified-Since` headers are
|
|
3293
|
+
# present in the request as follows:
|
|
3294
|
+
#
|
|
3295
|
+
# * `If-None-Match` condition evaluates to `false`, and;
|
|
3296
|
+
#
|
|
3297
|
+
# * `If-Modified-Since` condition evaluates to `true`;
|
|
3298
|
+
#
|
|
3299
|
+
# Then Amazon S3 returns the `304 Not Modified` response code.
|
|
3300
|
+
#
|
|
3301
|
+
# For more information about conditional requests, see [RFC 7232][1].
|
|
3302
|
+
#
|
|
3303
|
+
#
|
|
3304
|
+
#
|
|
3305
|
+
# [1]: https://tools.ietf.org/html/rfc7232
|
|
3306
|
+
# @option options [Time,DateTime,Date,Integer,String] :if_unmodified_since
|
|
3307
|
+
# Return the object only if it has not been modified since the specified
|
|
3308
|
+
# time; otherwise, return a 412 (precondition failed) error.
|
|
3309
|
+
#
|
|
3310
|
+
# If both of the `If-Match` and `If-Unmodified-Since` headers are
|
|
3311
|
+
# present in the request as follows:
|
|
3312
|
+
#
|
|
3313
|
+
# * `If-Match` condition evaluates to `true`, and;
|
|
3314
|
+
#
|
|
3315
|
+
# * `If-Unmodified-Since` condition evaluates to `false`;
|
|
3316
|
+
#
|
|
3317
|
+
# Then Amazon S3 returns `200 OK` and the data requested.
|
|
3318
|
+
#
|
|
3319
|
+
# For more information about conditional requests, see [RFC 7232][1].
|
|
3320
|
+
#
|
|
3321
|
+
#
|
|
3322
|
+
#
|
|
3323
|
+
# [1]: https://tools.ietf.org/html/rfc7232
|
|
3324
|
+
# @option options [String] :range
|
|
3325
|
+
# HeadObject returns only the metadata for an object. If the Range is
|
|
3326
|
+
# satisfiable, only the `ContentLength` is affected in the response. If
|
|
3327
|
+
# the Range is not satisfiable, S3 returns a `416 - Requested Range Not
|
|
3328
|
+
# Satisfiable` error.
|
|
3329
|
+
# @option options [String] :response_cache_control
|
|
3330
|
+
# Sets the `Cache-Control` header of the response.
|
|
3331
|
+
# @option options [String] :response_content_disposition
|
|
3332
|
+
# Sets the `Content-Disposition` header of the response.
|
|
3333
|
+
# @option options [String] :response_content_encoding
|
|
3334
|
+
# Sets the `Content-Encoding` header of the response.
|
|
3335
|
+
# @option options [String] :response_content_language
|
|
3336
|
+
# Sets the `Content-Language` header of the response.
|
|
3337
|
+
# @option options [String] :response_content_type
|
|
3338
|
+
# Sets the `Content-Type` header of the response.
|
|
3339
|
+
# @option options [Time,DateTime,Date,Integer,String] :response_expires
|
|
3340
|
+
# Sets the `Expires` header of the response.
|
|
3341
|
+
# @option options [String] :version_id
|
|
3342
|
+
# Version ID used to reference a specific version of the object.
|
|
3343
|
+
#
|
|
3344
|
+
# <note markdown="1"> For directory buckets in this API operation, only the `null` value of
|
|
3345
|
+
# the version ID is supported.
|
|
3346
|
+
#
|
|
3347
|
+
# </note>
|
|
3348
|
+
# @option options [String] :sse_customer_algorithm
|
|
3349
|
+
# Specifies the algorithm to use when encrypting the object (for
|
|
3350
|
+
# example, AES256).
|
|
3351
|
+
#
|
|
3352
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
|
3353
|
+
#
|
|
3354
|
+
# </note>
|
|
3355
|
+
# @option options [String] :sse_customer_key
|
|
3356
|
+
# Specifies the customer-provided encryption key for Amazon S3 to use in
|
|
3357
|
+
# encrypting data. This value is used to store the object and then it is
|
|
3358
|
+
# discarded; Amazon S3 does not store the encryption key. The key must
|
|
3359
|
+
# be appropriate for use with the algorithm specified in the
|
|
3360
|
+
# `x-amz-server-side-encryption-customer-algorithm` header.
|
|
3361
|
+
#
|
|
3362
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
|
3363
|
+
#
|
|
3364
|
+
# </note>
|
|
3365
|
+
# @option options [String] :sse_customer_key_md5
|
|
3366
|
+
# Specifies the 128-bit MD5 digest of the encryption key according to
|
|
3367
|
+
# RFC 1321. Amazon S3 uses this header for a message integrity check to
|
|
3368
|
+
# ensure that the encryption key was transmitted without error.
|
|
3369
|
+
#
|
|
3370
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
|
3371
|
+
#
|
|
3372
|
+
# </note>
|
|
3373
|
+
# @option options [String] :request_payer
|
|
3374
|
+
# Confirms that the requester knows that they will be charged for the
|
|
3375
|
+
# request. Bucket owners need not specify this parameter in their
|
|
3376
|
+
# requests. If either the source or destination S3 bucket has Requester
|
|
3377
|
+
# Pays enabled, the requester will pay for corresponding charges to copy
|
|
3378
|
+
# the object. For information about downloading objects from Requester
|
|
3379
|
+
# Pays buckets, see [Downloading Objects in Requester Pays Buckets][1]
|
|
3380
|
+
# in the *Amazon S3 User Guide*.
|
|
3381
|
+
#
|
|
3382
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
|
3383
|
+
#
|
|
3384
|
+
# </note>
|
|
3385
|
+
#
|
|
3386
|
+
#
|
|
3387
|
+
#
|
|
3388
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
|
|
3389
|
+
# @option options [Integer] :part_number
|
|
3390
|
+
# Part number of the object being read. This is a positive integer
|
|
3391
|
+
# between 1 and 10,000. Effectively performs a 'ranged' HEAD request
|
|
3392
|
+
# for the part specified. Useful querying about the size of the part and
|
|
3393
|
+
# the number of parts in this object.
|
|
3394
|
+
# @option options [String] :expected_bucket_owner
|
|
3395
|
+
# The account ID of the expected bucket owner. If the account ID that
|
|
3396
|
+
# you provide does not match the actual owner of the bucket, the request
|
|
3397
|
+
# fails with the HTTP status code `403 Forbidden` (access denied).
|
|
3398
|
+
# @option options [String] :checksum_mode
|
|
3399
|
+
# To retrieve the checksum, this parameter must be enabled.
|
|
3400
|
+
#
|
|
3401
|
+
# **General purpose buckets** - If you enable checksum mode and the
|
|
3402
|
+
# object is uploaded with a [checksum][1] and encrypted with an Key
|
|
3403
|
+
# Management Service (KMS) key, you must have permission to use the
|
|
3404
|
+
# `kms:Decrypt` action to retrieve the checksum.
|
|
3405
|
+
#
|
|
3406
|
+
# **Directory buckets** - If you enable `ChecksumMode` and the object is
|
|
3407
|
+
# encrypted with Amazon Web Services Key Management Service (Amazon Web
|
|
3408
|
+
# Services KMS), you must also have the `kms:GenerateDataKey` and
|
|
3409
|
+
# `kms:Decrypt` permissions in IAM identity-based policies and KMS key
|
|
3410
|
+
# policies for the KMS key to retrieve the checksum of the object.
|
|
3411
|
+
#
|
|
3412
|
+
#
|
|
3413
|
+
#
|
|
3414
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_Checksum.html
|
|
3415
|
+
# @return [Types::HeadObjectOutput]
|
|
3416
|
+
def head(options = {})
|
|
3417
|
+
options = options.merge(
|
|
3418
|
+
bucket: @bucket_name,
|
|
3419
|
+
key: @key
|
|
3420
|
+
)
|
|
3421
|
+
resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
|
3422
|
+
@client.head_object(options)
|
|
3423
|
+
end
|
|
1265
3424
|
resp.data
|
|
1266
3425
|
end
|
|
1267
3426
|
|
|
@@ -1377,6 +3536,8 @@ module Aws::S3
|
|
|
1377
3536
|
# mfa: "MFA",
|
|
1378
3537
|
# request_payer: "requester", # accepts requester
|
|
1379
3538
|
# bypass_governance_retention: false,
|
|
3539
|
+
# expected_bucket_owner: "AccountId",
|
|
3540
|
+
# checksum_algorithm: "CRC32", # accepts CRC32, CRC32C, SHA1, SHA256, CRC64NVME
|
|
1380
3541
|
# })
|
|
1381
3542
|
# @param options ({})
|
|
1382
3543
|
# @option options [String] :mfa
|
|
@@ -1384,20 +3545,86 @@ module Aws::S3
|
|
|
1384
3545
|
# space, and the value that is displayed on your authentication device.
|
|
1385
3546
|
# Required to permanently delete a versioned object if versioning is
|
|
1386
3547
|
# configured with MFA delete enabled.
|
|
3548
|
+
#
|
|
3549
|
+
# When performing the `DeleteObjects` operation on an MFA delete enabled
|
|
3550
|
+
# bucket, which attempts to delete the specified versioned objects, you
|
|
3551
|
+
# must include an MFA token. If you don't provide an MFA token, the
|
|
3552
|
+
# entire request will fail, even if there are non-versioned objects that
|
|
3553
|
+
# you are trying to delete. If you provide an invalid token, whether
|
|
3554
|
+
# there are versioned object keys in the request or not, the entire
|
|
3555
|
+
# Multi-Object Delete request will fail. For information about MFA
|
|
3556
|
+
# Delete, see [ MFA Delete][1] in the *Amazon S3 User Guide*.
|
|
3557
|
+
#
|
|
3558
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
|
3559
|
+
#
|
|
3560
|
+
# </note>
|
|
3561
|
+
#
|
|
3562
|
+
#
|
|
3563
|
+
#
|
|
3564
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/Versioning.html#MultiFactorAuthenticationDelete
|
|
1387
3565
|
# @option options [String] :request_payer
|
|
1388
3566
|
# Confirms that the requester knows that they will be charged for the
|
|
1389
3567
|
# request. Bucket owners need not specify this parameter in their
|
|
1390
|
-
# requests.
|
|
1391
|
-
#
|
|
1392
|
-
#
|
|
3568
|
+
# requests. If either the source or destination S3 bucket has Requester
|
|
3569
|
+
# Pays enabled, the requester will pay for corresponding charges to copy
|
|
3570
|
+
# the object. For information about downloading objects from Requester
|
|
3571
|
+
# Pays buckets, see [Downloading Objects in Requester Pays Buckets][1]
|
|
3572
|
+
# in the *Amazon S3 User Guide*.
|
|
3573
|
+
#
|
|
3574
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
|
3575
|
+
#
|
|
3576
|
+
# </note>
|
|
1393
3577
|
#
|
|
1394
3578
|
#
|
|
1395
3579
|
#
|
|
1396
3580
|
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
|
|
1397
3581
|
# @option options [Boolean] :bypass_governance_retention
|
|
1398
3582
|
# Specifies whether you want to delete this object even if it has a
|
|
1399
|
-
# Governance-type Object Lock in place.
|
|
1400
|
-
#
|
|
3583
|
+
# Governance-type Object Lock in place. To use this header, you must
|
|
3584
|
+
# have the `s3:BypassGovernanceRetention` permission.
|
|
3585
|
+
#
|
|
3586
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
|
3587
|
+
#
|
|
3588
|
+
# </note>
|
|
3589
|
+
# @option options [String] :expected_bucket_owner
|
|
3590
|
+
# The account ID of the expected bucket owner. If the account ID that
|
|
3591
|
+
# you provide does not match the actual owner of the bucket, the request
|
|
3592
|
+
# fails with the HTTP status code `403 Forbidden` (access denied).
|
|
3593
|
+
# @option options [String] :checksum_algorithm
|
|
3594
|
+
# Indicates the algorithm used to create the checksum for the object
|
|
3595
|
+
# when you use the SDK. This header will not provide any additional
|
|
3596
|
+
# functionality if you don't use the SDK. When you send this header,
|
|
3597
|
+
# there must be a corresponding `x-amz-checksum-algorithm ` or
|
|
3598
|
+
# `x-amz-trailer` header sent. Otherwise, Amazon S3 fails the request
|
|
3599
|
+
# with the HTTP status code `400 Bad Request`.
|
|
3600
|
+
#
|
|
3601
|
+
# For the `x-amz-checksum-algorithm ` header, replace ` algorithm ` with
|
|
3602
|
+
# the supported algorithm from the following list:
|
|
3603
|
+
#
|
|
3604
|
+
# * `CRC32`
|
|
3605
|
+
#
|
|
3606
|
+
# * `CRC32C`
|
|
3607
|
+
#
|
|
3608
|
+
# * `CRC64NVME`
|
|
3609
|
+
#
|
|
3610
|
+
# * `SHA1`
|
|
3611
|
+
#
|
|
3612
|
+
# * `SHA256`
|
|
3613
|
+
#
|
|
3614
|
+
# For more information, see [Checking object integrity][1] in the
|
|
3615
|
+
# *Amazon S3 User Guide*.
|
|
3616
|
+
#
|
|
3617
|
+
# If the individual checksum value you provide through
|
|
3618
|
+
# `x-amz-checksum-algorithm ` doesn't match the checksum algorithm you
|
|
3619
|
+
# set through `x-amz-sdk-checksum-algorithm`, Amazon S3 fails the
|
|
3620
|
+
# request with a `BadDigest` error.
|
|
3621
|
+
#
|
|
3622
|
+
# If you provide an individual checksum, Amazon S3 ignores any provided
|
|
3623
|
+
# `ChecksumAlgorithm` parameter.
|
|
3624
|
+
#
|
|
3625
|
+
#
|
|
3626
|
+
#
|
|
3627
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
|
|
1401
3628
|
# @return [void]
|
|
1402
3629
|
def batch_delete!(options = {})
|
|
1403
3630
|
batch_enum.each do |batch|
|
|
@@ -1410,7 +3637,9 @@ module Aws::S3
|
|
|
1410
3637
|
key: item.key
|
|
1411
3638
|
}
|
|
1412
3639
|
end
|
|
1413
|
-
|
|
3640
|
+
Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
|
3641
|
+
batch[0].client.delete_objects(params)
|
|
3642
|
+
end
|
|
1414
3643
|
end
|
|
1415
3644
|
nil
|
|
1416
3645
|
end
|
|
@@ -1420,3 +3649,6 @@ module Aws::S3
|
|
|
1420
3649
|
end
|
|
1421
3650
|
end
|
|
1422
3651
|
end
|
|
3652
|
+
|
|
3653
|
+
# Load customizations if they exist
|
|
3654
|
+
require 'aws-sdk-s3/customizations/object'
|