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