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