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