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