aws-sdk-s3 1.136.0 → 1.142.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +35 -0
- data/VERSION +1 -1
- data/lib/aws-sdk-s3/bucket.rb +424 -93
- data/lib/aws-sdk-s3/bucket_acl.rb +9 -9
- data/lib/aws-sdk-s3/bucket_cors.rb +12 -12
- data/lib/aws-sdk-s3/bucket_lifecycle.rb +12 -12
- data/lib/aws-sdk-s3/bucket_lifecycle_configuration.rb +12 -12
- data/lib/aws-sdk-s3/bucket_logging.rb +16 -9
- data/lib/aws-sdk-s3/bucket_notification.rb +3 -3
- data/lib/aws-sdk-s3/bucket_policy.rb +58 -14
- data/lib/aws-sdk-s3/bucket_request_payment.rb +9 -9
- data/lib/aws-sdk-s3/bucket_tagging.rb +12 -12
- data/lib/aws-sdk-s3/bucket_versioning.rb +27 -27
- data/lib/aws-sdk-s3/bucket_website.rb +12 -12
- data/lib/aws-sdk-s3/client.rb +5527 -2417
- data/lib/aws-sdk-s3/client_api.rb +111 -16
- data/lib/aws-sdk-s3/customizations.rb +5 -0
- data/lib/aws-sdk-s3/endpoint_parameters.rb +32 -0
- data/lib/aws-sdk-s3/endpoint_provider.rb +82 -0
- data/lib/aws-sdk-s3/endpoints.rb +440 -0
- data/lib/aws-sdk-s3/express_credentials.rb +55 -0
- data/lib/aws-sdk-s3/express_credentials_cache.rb +30 -0
- data/lib/aws-sdk-s3/express_credentials_provider.rb +36 -0
- data/lib/aws-sdk-s3/file_downloader.rb +0 -1
- data/lib/aws-sdk-s3/multipart_file_uploader.rb +0 -1
- data/lib/aws-sdk-s3/multipart_stream_uploader.rb +0 -1
- data/lib/aws-sdk-s3/multipart_upload.rb +75 -28
- data/lib/aws-sdk-s3/multipart_upload_part.rb +164 -43
- data/lib/aws-sdk-s3/object.rb +1498 -247
- data/lib/aws-sdk-s3/object_acl.rb +31 -19
- data/lib/aws-sdk-s3/object_summary.rb +1369 -272
- data/lib/aws-sdk-s3/object_version.rb +305 -58
- data/lib/aws-sdk-s3/plugins/endpoints.rb +13 -2
- data/lib/aws-sdk-s3/plugins/express_session_auth.rb +90 -0
- data/lib/aws-sdk-s3/plugins/location_constraint.rb +3 -1
- data/lib/aws-sdk-s3/plugins/md5s.rb +2 -1
- data/lib/aws-sdk-s3/presigner.rb +2 -2
- data/lib/aws-sdk-s3/resource.rb +83 -11
- data/lib/aws-sdk-s3/types.rb +4338 -1252
- data/lib/aws-sdk-s3.rb +1 -1
- metadata +11 -7
@@ -0,0 +1,55 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'set'
|
4
|
+
|
5
|
+
module Aws
|
6
|
+
module S3
|
7
|
+
# @api private
|
8
|
+
class ExpressCredentials
|
9
|
+
include CredentialProvider
|
10
|
+
include RefreshingCredentials
|
11
|
+
|
12
|
+
SYNC_EXPIRATION_LENGTH = 60 # 1 minute
|
13
|
+
ASYNC_EXPIRATION_LENGTH = 120 # 2 minutes
|
14
|
+
|
15
|
+
def initialize(options = {})
|
16
|
+
@client = options[:client]
|
17
|
+
@create_session_params = {}
|
18
|
+
options.each_pair do |key, value|
|
19
|
+
if self.class.create_session_options.include?(key)
|
20
|
+
@create_session_params[key] = value
|
21
|
+
end
|
22
|
+
end
|
23
|
+
@async_refresh = true
|
24
|
+
super
|
25
|
+
end
|
26
|
+
|
27
|
+
# @return [S3::Client]
|
28
|
+
attr_reader :client
|
29
|
+
|
30
|
+
private
|
31
|
+
|
32
|
+
def refresh
|
33
|
+
c = @client.create_session(@create_session_params).credentials
|
34
|
+
@credentials = Credentials.new(
|
35
|
+
c.access_key_id,
|
36
|
+
c.secret_access_key,
|
37
|
+
c.session_token
|
38
|
+
)
|
39
|
+
@expiration = c.expiration
|
40
|
+
end
|
41
|
+
|
42
|
+
class << self
|
43
|
+
|
44
|
+
# @api private
|
45
|
+
def create_session_options
|
46
|
+
@cso ||= begin
|
47
|
+
input = S3::Client.api.operation(:create_session).input
|
48
|
+
Set.new(input.shape.member_names)
|
49
|
+
end
|
50
|
+
end
|
51
|
+
|
52
|
+
end
|
53
|
+
end
|
54
|
+
end
|
55
|
+
end
|
@@ -0,0 +1,30 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Aws
|
4
|
+
module S3
|
5
|
+
# @api private
|
6
|
+
class ExpressCredentialsCache
|
7
|
+
def initialize
|
8
|
+
@credentials = {}
|
9
|
+
@mutex = Mutex.new
|
10
|
+
end
|
11
|
+
|
12
|
+
def [](bucket_name)
|
13
|
+
@mutex.synchronize { @credentials[bucket_name] }
|
14
|
+
end
|
15
|
+
|
16
|
+
def []=(bucket_name, credential_provider)
|
17
|
+
@mutex.synchronize do
|
18
|
+
@credentials[bucket_name] = credential_provider
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
22
|
+
def clear
|
23
|
+
@mutex.synchronize { @credentials = {} }
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
27
|
+
# @api private
|
28
|
+
EXPRESS_CREDENTIALS_CACHE = ExpressCredentialsCache.new
|
29
|
+
end
|
30
|
+
end
|
@@ -0,0 +1,36 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Aws
|
4
|
+
module S3
|
5
|
+
# Returns Credentials class for S3 Express. Accepts CreateSession
|
6
|
+
# params as options. See {Client#create_session} for details.
|
7
|
+
class ExpressCredentialsProvider
|
8
|
+
# @param [Hash] options
|
9
|
+
# @option options [Client] :client The S3 client used to create the session.
|
10
|
+
# @option options [String] :session_mode (see: {Client#create_session})
|
11
|
+
# @option options [Callable] :before_refresh Proc called before
|
12
|
+
# credentials are refreshed.
|
13
|
+
def initialize(options = {})
|
14
|
+
@client = options.delete(:client)
|
15
|
+
@options = options
|
16
|
+
@cache = EXPRESS_CREDENTIALS_CACHE
|
17
|
+
end
|
18
|
+
|
19
|
+
def express_credentials_for(bucket)
|
20
|
+
@cache[bucket] || new_credentials_for(bucket)
|
21
|
+
end
|
22
|
+
|
23
|
+
attr_accessor :client
|
24
|
+
|
25
|
+
private
|
26
|
+
|
27
|
+
def new_credentials_for(bucket)
|
28
|
+
@cache[bucket] = ExpressCredentials.new(
|
29
|
+
bucket: bucket,
|
30
|
+
client: @client,
|
31
|
+
**@options
|
32
|
+
)
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
@@ -69,6 +69,11 @@ module Aws::S3
|
|
69
69
|
end
|
70
70
|
|
71
71
|
# The class of storage used to store the object.
|
72
|
+
#
|
73
|
+
# <note markdown="1"> **Directory buckets** - Only the S3 Express One Zone storage class is
|
74
|
+
# supported by directory buckets to store objects.
|
75
|
+
#
|
76
|
+
# </note>
|
72
77
|
# @return [String]
|
73
78
|
def storage_class
|
74
79
|
data[:storage_class]
|
@@ -76,6 +81,11 @@ module Aws::S3
|
|
76
81
|
|
77
82
|
# Specifies the owner of the object that is part of the multipart
|
78
83
|
# upload.
|
84
|
+
#
|
85
|
+
# <note markdown="1"> **Directory buckets** - The bucket owner is returned as the object
|
86
|
+
# owner for all the objects.
|
87
|
+
#
|
88
|
+
# </note>
|
79
89
|
# @return [Types::Owner]
|
80
90
|
def owner
|
81
91
|
data[:owner]
|
@@ -234,19 +244,23 @@ module Aws::S3
|
|
234
244
|
# @option options [String] :request_payer
|
235
245
|
# Confirms that the requester knows that they will be charged for the
|
236
246
|
# request. Bucket owners need not specify this parameter in their
|
237
|
-
# requests. If either the source or destination
|
238
|
-
#
|
239
|
-
#
|
240
|
-
#
|
241
|
-
#
|
247
|
+
# requests. If either the source or destination S3 bucket has Requester
|
248
|
+
# Pays enabled, the requester will pay for corresponding charges to copy
|
249
|
+
# the object. For information about downloading objects from Requester
|
250
|
+
# Pays buckets, see [Downloading Objects in Requester Pays Buckets][1]
|
251
|
+
# in the *Amazon S3 User Guide*.
|
252
|
+
#
|
253
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
254
|
+
#
|
255
|
+
# </note>
|
242
256
|
#
|
243
257
|
#
|
244
258
|
#
|
245
259
|
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
|
246
260
|
# @option options [String] :expected_bucket_owner
|
247
|
-
# The account ID of the expected bucket owner. If the
|
248
|
-
#
|
249
|
-
# Forbidden` (access denied).
|
261
|
+
# The account ID of the expected bucket owner. If the account ID that
|
262
|
+
# you provide does not match the actual owner of the bucket, the request
|
263
|
+
# fails with the HTTP status code `403 Forbidden` (access denied).
|
250
264
|
# @return [Types::AbortMultipartUploadOutput]
|
251
265
|
def abort(options = {})
|
252
266
|
options = options.merge(
|
@@ -331,34 +345,47 @@ module Aws::S3
|
|
331
345
|
# @option options [String] :request_payer
|
332
346
|
# Confirms that the requester knows that they will be charged for the
|
333
347
|
# request. Bucket owners need not specify this parameter in their
|
334
|
-
# requests. If either the source or destination
|
335
|
-
#
|
336
|
-
#
|
337
|
-
#
|
338
|
-
#
|
348
|
+
# requests. If either the source or destination S3 bucket has Requester
|
349
|
+
# Pays enabled, the requester will pay for corresponding charges to copy
|
350
|
+
# the object. For information about downloading objects from Requester
|
351
|
+
# Pays buckets, see [Downloading Objects in Requester Pays Buckets][1]
|
352
|
+
# in the *Amazon S3 User Guide*.
|
353
|
+
#
|
354
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
355
|
+
#
|
356
|
+
# </note>
|
339
357
|
#
|
340
358
|
#
|
341
359
|
#
|
342
360
|
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
|
343
361
|
# @option options [String] :expected_bucket_owner
|
344
|
-
# The account ID of the expected bucket owner. If the
|
345
|
-
#
|
346
|
-
# Forbidden` (access denied).
|
362
|
+
# The account ID of the expected bucket owner. If the account ID that
|
363
|
+
# you provide does not match the actual owner of the bucket, the request
|
364
|
+
# fails with the HTTP status code `403 Forbidden` (access denied).
|
347
365
|
# @option options [String] :sse_customer_algorithm
|
348
366
|
# The server-side encryption (SSE) algorithm used to encrypt the object.
|
349
|
-
# This parameter is
|
350
|
-
# checksum algorithm
|
351
|
-
# SSE-C keys][1] in the
|
367
|
+
# This parameter is required only when the object was created using a
|
368
|
+
# checksum algorithm or if your bucket policy requires the use of SSE-C.
|
369
|
+
# For more information, see [Protecting data using SSE-C keys][1] in the
|
370
|
+
# *Amazon S3 User Guide*.
|
352
371
|
#
|
372
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
353
373
|
#
|
374
|
+
# </note>
|
354
375
|
#
|
355
|
-
#
|
376
|
+
#
|
377
|
+
#
|
378
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/ServerSideEncryptionCustomerKeys.html#ssec-require-condition-key
|
356
379
|
# @option options [String] :sse_customer_key
|
357
380
|
# The server-side encryption (SSE) customer managed key. This parameter
|
358
381
|
# is needed only when the object was created using a checksum algorithm.
|
359
382
|
# For more information, see [Protecting data using SSE-C keys][1] in the
|
360
383
|
# *Amazon S3 User Guide*.
|
361
384
|
#
|
385
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
386
|
+
#
|
387
|
+
# </note>
|
388
|
+
#
|
362
389
|
#
|
363
390
|
#
|
364
391
|
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html
|
@@ -368,6 +395,10 @@ module Aws::S3
|
|
368
395
|
# algorithm. For more information, see [Protecting data using SSE-C
|
369
396
|
# keys][1] in the *Amazon S3 User Guide*.
|
370
397
|
#
|
398
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
399
|
+
#
|
400
|
+
# </note>
|
401
|
+
#
|
371
402
|
#
|
372
403
|
#
|
373
404
|
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html
|
@@ -424,25 +455,33 @@ module Aws::S3
|
|
424
455
|
# @option options [String] :request_payer
|
425
456
|
# Confirms that the requester knows that they will be charged for the
|
426
457
|
# request. Bucket owners need not specify this parameter in their
|
427
|
-
# requests. If either the source or destination
|
428
|
-
#
|
429
|
-
#
|
430
|
-
#
|
431
|
-
#
|
458
|
+
# requests. If either the source or destination S3 bucket has Requester
|
459
|
+
# Pays enabled, the requester will pay for corresponding charges to copy
|
460
|
+
# the object. For information about downloading objects from Requester
|
461
|
+
# Pays buckets, see [Downloading Objects in Requester Pays Buckets][1]
|
462
|
+
# in the *Amazon S3 User Guide*.
|
463
|
+
#
|
464
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
465
|
+
#
|
466
|
+
# </note>
|
432
467
|
#
|
433
468
|
#
|
434
469
|
#
|
435
470
|
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
|
436
471
|
# @option options [String] :expected_bucket_owner
|
437
|
-
# The account ID of the expected bucket owner. If the
|
438
|
-
#
|
439
|
-
# Forbidden` (access denied).
|
472
|
+
# The account ID of the expected bucket owner. If the account ID that
|
473
|
+
# you provide does not match the actual owner of the bucket, the request
|
474
|
+
# fails with the HTTP status code `403 Forbidden` (access denied).
|
440
475
|
# @option options [String] :sse_customer_algorithm
|
441
476
|
# The server-side encryption (SSE) algorithm used to encrypt the object.
|
442
477
|
# This parameter is needed only when the object was created using a
|
443
478
|
# checksum algorithm. For more information, see [Protecting data using
|
444
479
|
# SSE-C keys][1] in the *Amazon S3 User Guide*.
|
445
480
|
#
|
481
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
482
|
+
#
|
483
|
+
# </note>
|
484
|
+
#
|
446
485
|
#
|
447
486
|
#
|
448
487
|
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html
|
@@ -452,6 +491,10 @@ module Aws::S3
|
|
452
491
|
# For more information, see [Protecting data using SSE-C keys][1] in the
|
453
492
|
# *Amazon S3 User Guide*.
|
454
493
|
#
|
494
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
495
|
+
#
|
496
|
+
# </note>
|
497
|
+
#
|
455
498
|
#
|
456
499
|
#
|
457
500
|
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html
|
@@ -461,6 +504,10 @@ module Aws::S3
|
|
461
504
|
# algorithm. For more information, see [Protecting data using SSE-C
|
462
505
|
# keys][1] in the *Amazon S3 User Guide*.
|
463
506
|
#
|
507
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
508
|
+
#
|
509
|
+
# </note>
|
510
|
+
#
|
464
511
|
#
|
465
512
|
#
|
466
513
|
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html
|
@@ -91,10 +91,13 @@ module Aws::S3
|
|
91
91
|
end
|
92
92
|
|
93
93
|
# The base64-encoded, 32-bit CRC32C checksum of the object. This will
|
94
|
-
# only be present if it was uploaded with the object.
|
95
|
-
#
|
96
|
-
#
|
97
|
-
#
|
94
|
+
# only be present if it was uploaded with the object. When you use an
|
95
|
+
# API operation on an object that was uploaded using multipart uploads,
|
96
|
+
# this value may not be a direct checksum value of the full object.
|
97
|
+
# Instead, it's a calculation based on the checksum values of each
|
98
|
+
# individual part. For more information about how checksums are
|
99
|
+
# calculated with multipart uploads, see [ Checking object integrity][1]
|
100
|
+
# in the *Amazon S3 User Guide*.
|
98
101
|
#
|
99
102
|
#
|
100
103
|
#
|
@@ -105,10 +108,13 @@ module Aws::S3
|
|
105
108
|
end
|
106
109
|
|
107
110
|
# The base64-encoded, 160-bit SHA-1 digest of the object. This will only
|
108
|
-
# be present if it was uploaded with the object.
|
109
|
-
#
|
110
|
-
#
|
111
|
-
#
|
111
|
+
# be present if it was uploaded with the object. When you use the API
|
112
|
+
# operation on an object that was uploaded using multipart uploads, this
|
113
|
+
# value may not be a direct checksum value of the full object. Instead,
|
114
|
+
# it's a calculation based on the checksum values of each individual
|
115
|
+
# part. For more information about how checksums are calculated with
|
116
|
+
# multipart uploads, see [ Checking object integrity][1] in the *Amazon
|
117
|
+
# S3 User Guide*.
|
112
118
|
#
|
113
119
|
#
|
114
120
|
#
|
@@ -305,9 +311,11 @@ module Aws::S3
|
|
305
311
|
# `arn:aws:s3:us-west-2:123456789012:accesspoint/my-access-point/object/reports/january.pdf`.
|
306
312
|
# The value must be URL encoded.
|
307
313
|
#
|
308
|
-
# <note markdown="1"> Amazon S3 supports copy operations using
|
309
|
-
#
|
310
|
-
#
|
314
|
+
# <note markdown="1"> * Amazon S3 supports copy operations using Access points only when
|
315
|
+
# the source and destination buckets are in the same Amazon Web
|
316
|
+
# Services Region.
|
317
|
+
#
|
318
|
+
# * Access points are not supported by directory buckets.
|
311
319
|
#
|
312
320
|
# </note>
|
313
321
|
#
|
@@ -320,25 +328,82 @@ module Aws::S3
|
|
320
328
|
# `arn:aws:s3-outposts:us-west-2:123456789012:outpost/my-outpost/object/reports/january.pdf`.
|
321
329
|
# The value must be URL-encoded.
|
322
330
|
#
|
323
|
-
#
|
324
|
-
#
|
325
|
-
#
|
326
|
-
#
|
327
|
-
# version
|
331
|
+
# If your bucket has versioning enabled, you could have multiple
|
332
|
+
# versions of the same object. By default, `x-amz-copy-source`
|
333
|
+
# identifies the current version of the source object to copy. To copy a
|
334
|
+
# specific version of the source object to copy, append
|
335
|
+
# `?versionId=<version-id>` to the `x-amz-copy-source` request header
|
336
|
+
# (for example, `x-amz-copy-source:
|
337
|
+
# /awsexamplebucket/reports/january.pdf?versionId=QUpfdndhfd8438MNFDN93jdnJFkdmqnh893`).
|
338
|
+
#
|
339
|
+
# If the current version is a delete marker and you don't specify a
|
340
|
+
# versionId in the `x-amz-copy-source` request header, Amazon S3 returns
|
341
|
+
# a `404 Not Found` error, because the object does not exist. If you
|
342
|
+
# specify versionId in the `x-amz-copy-source` and the versionId is a
|
343
|
+
# delete marker, Amazon S3 returns an HTTP `400 Bad Request` error,
|
344
|
+
# because you are not allowed to specify a delete marker as a version
|
345
|
+
# for the `x-amz-copy-source`.
|
346
|
+
#
|
347
|
+
# <note markdown="1"> **Directory buckets** - S3 Versioning isn't enabled and supported for
|
348
|
+
# directory buckets.
|
349
|
+
#
|
350
|
+
# </note>
|
328
351
|
#
|
329
352
|
#
|
330
353
|
#
|
331
354
|
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/access-points.html
|
332
355
|
# @option options [String] :copy_source_if_match
|
333
356
|
# Copies the object if its entity tag (ETag) matches the specified tag.
|
357
|
+
#
|
358
|
+
# If both of the `x-amz-copy-source-if-match` and
|
359
|
+
# `x-amz-copy-source-if-unmodified-since` headers are present in the
|
360
|
+
# request as follows:
|
361
|
+
#
|
362
|
+
# `x-amz-copy-source-if-match` condition evaluates to `true`, and;
|
363
|
+
#
|
364
|
+
# `x-amz-copy-source-if-unmodified-since` condition evaluates to
|
365
|
+
# `false`;
|
366
|
+
#
|
367
|
+
# Amazon S3 returns `200 OK` and copies the data.
|
334
368
|
# @option options [Time,DateTime,Date,Integer,String] :copy_source_if_modified_since
|
335
369
|
# Copies the object if it has been modified since the specified time.
|
370
|
+
#
|
371
|
+
# If both of the `x-amz-copy-source-if-none-match` and
|
372
|
+
# `x-amz-copy-source-if-modified-since` headers are present in the
|
373
|
+
# request as follows:
|
374
|
+
#
|
375
|
+
# `x-amz-copy-source-if-none-match` condition evaluates to `false`, and;
|
376
|
+
#
|
377
|
+
# `x-amz-copy-source-if-modified-since` condition evaluates to `true`;
|
378
|
+
#
|
379
|
+
# Amazon S3 returns `412 Precondition Failed` response code.
|
336
380
|
# @option options [String] :copy_source_if_none_match
|
337
381
|
# Copies the object if its entity tag (ETag) is different than the
|
338
382
|
# specified ETag.
|
383
|
+
#
|
384
|
+
# If both of the `x-amz-copy-source-if-none-match` and
|
385
|
+
# `x-amz-copy-source-if-modified-since` headers are present in the
|
386
|
+
# request as follows:
|
387
|
+
#
|
388
|
+
# `x-amz-copy-source-if-none-match` condition evaluates to `false`, and;
|
389
|
+
#
|
390
|
+
# `x-amz-copy-source-if-modified-since` condition evaluates to `true`;
|
391
|
+
#
|
392
|
+
# Amazon S3 returns `412 Precondition Failed` response code.
|
339
393
|
# @option options [Time,DateTime,Date,Integer,String] :copy_source_if_unmodified_since
|
340
394
|
# Copies the object if it hasn't been modified since the specified
|
341
395
|
# time.
|
396
|
+
#
|
397
|
+
# If both of the `x-amz-copy-source-if-match` and
|
398
|
+
# `x-amz-copy-source-if-unmodified-since` headers are present in the
|
399
|
+
# request as follows:
|
400
|
+
#
|
401
|
+
# `x-amz-copy-source-if-match` condition evaluates to `true`, and;
|
402
|
+
#
|
403
|
+
# `x-amz-copy-source-if-unmodified-since` condition evaluates to
|
404
|
+
# `false`;
|
405
|
+
#
|
406
|
+
# Amazon S3 returns `200 OK` and copies the data.
|
342
407
|
# @option options [String] :copy_source_range
|
343
408
|
# The range of bytes to copy from the source object. The range value
|
344
409
|
# must use the form bytes=first-last, where the first and last are the
|
@@ -346,8 +411,13 @@ module Aws::S3
|
|
346
411
|
# you want to copy the first 10 bytes of the source. You can copy a
|
347
412
|
# range only if the source object is greater than 5 MB.
|
348
413
|
# @option options [String] :sse_customer_algorithm
|
349
|
-
# Specifies the algorithm to use
|
414
|
+
# Specifies the algorithm to use when encrypting the object (for
|
350
415
|
# example, AES256).
|
416
|
+
#
|
417
|
+
# <note markdown="1"> This functionality is not supported when the destination bucket is a
|
418
|
+
# directory bucket.
|
419
|
+
#
|
420
|
+
# </note>
|
351
421
|
# @option options [String] :sse_customer_key
|
352
422
|
# Specifies the customer-provided encryption key for Amazon S3 to use in
|
353
423
|
# encrypting data. This value is used to store the object and then it is
|
@@ -356,41 +426,72 @@ module Aws::S3
|
|
356
426
|
# `x-amz-server-side-encryption-customer-algorithm` header. This must be
|
357
427
|
# the same encryption key specified in the initiate multipart upload
|
358
428
|
# request.
|
429
|
+
#
|
430
|
+
# <note markdown="1"> This functionality is not supported when the destination bucket is a
|
431
|
+
# directory bucket.
|
432
|
+
#
|
433
|
+
# </note>
|
359
434
|
# @option options [String] :sse_customer_key_md5
|
360
435
|
# Specifies the 128-bit MD5 digest of the encryption key according to
|
361
436
|
# RFC 1321. Amazon S3 uses this header for a message integrity check to
|
362
437
|
# ensure that the encryption key was transmitted without error.
|
438
|
+
#
|
439
|
+
# <note markdown="1"> This functionality is not supported when the destination bucket is a
|
440
|
+
# directory bucket.
|
441
|
+
#
|
442
|
+
# </note>
|
363
443
|
# @option options [String] :copy_source_sse_customer_algorithm
|
364
444
|
# Specifies the algorithm to use when decrypting the source object (for
|
365
|
-
# example, AES256).
|
445
|
+
# example, `AES256`).
|
446
|
+
#
|
447
|
+
# <note markdown="1"> This functionality is not supported when the source object is in a
|
448
|
+
# directory bucket.
|
449
|
+
#
|
450
|
+
# </note>
|
366
451
|
# @option options [String] :copy_source_sse_customer_key
|
367
452
|
# Specifies the customer-provided encryption key for Amazon S3 to use to
|
368
453
|
# decrypt the source object. The encryption key provided in this header
|
369
454
|
# must be one that was used when the source object was created.
|
455
|
+
#
|
456
|
+
# <note markdown="1"> This functionality is not supported when the source object is in a
|
457
|
+
# directory bucket.
|
458
|
+
#
|
459
|
+
# </note>
|
370
460
|
# @option options [String] :copy_source_sse_customer_key_md5
|
371
461
|
# Specifies the 128-bit MD5 digest of the encryption key according to
|
372
462
|
# RFC 1321. Amazon S3 uses this header for a message integrity check to
|
373
463
|
# ensure that the encryption key was transmitted without error.
|
464
|
+
#
|
465
|
+
# <note markdown="1"> This functionality is not supported when the source object is in a
|
466
|
+
# directory bucket.
|
467
|
+
#
|
468
|
+
# </note>
|
374
469
|
# @option options [String] :request_payer
|
375
470
|
# Confirms that the requester knows that they will be charged for the
|
376
471
|
# request. Bucket owners need not specify this parameter in their
|
377
|
-
# requests. If either the source or destination
|
378
|
-
#
|
379
|
-
#
|
380
|
-
#
|
381
|
-
#
|
472
|
+
# requests. If either the source or destination S3 bucket has Requester
|
473
|
+
# Pays enabled, the requester will pay for corresponding charges to copy
|
474
|
+
# the object. For information about downloading objects from Requester
|
475
|
+
# Pays buckets, see [Downloading Objects in Requester Pays Buckets][1]
|
476
|
+
# in the *Amazon S3 User Guide*.
|
477
|
+
#
|
478
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
479
|
+
#
|
480
|
+
# </note>
|
382
481
|
#
|
383
482
|
#
|
384
483
|
#
|
385
484
|
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
|
386
485
|
# @option options [String] :expected_bucket_owner
|
387
486
|
# The account ID of the expected destination bucket owner. If the
|
388
|
-
#
|
389
|
-
# with the HTTP status code `403
|
487
|
+
# account ID that you provide does not match the actual owner of the
|
488
|
+
# destination bucket, the request fails with the HTTP status code `403
|
489
|
+
# Forbidden` (access denied).
|
390
490
|
# @option options [String] :expected_source_bucket_owner
|
391
|
-
# The account ID of the expected source bucket owner. If the
|
392
|
-
#
|
393
|
-
# HTTP status code `403 Forbidden` (access
|
491
|
+
# The account ID of the expected source bucket owner. If the account ID
|
492
|
+
# that you provide does not match the actual owner of the source bucket,
|
493
|
+
# the request fails with the HTTP status code `403 Forbidden` (access
|
494
|
+
# denied).
|
394
495
|
# @return [Types::UploadPartCopyOutput]
|
395
496
|
def copy_from(options = {})
|
396
497
|
options = options.merge(
|
@@ -432,14 +533,18 @@ module Aws::S3
|
|
432
533
|
# The base64-encoded 128-bit MD5 digest of the part data. This parameter
|
433
534
|
# is auto-populated when using the command from the CLI. This parameter
|
434
535
|
# is required if object lock parameters are specified.
|
536
|
+
#
|
537
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
538
|
+
#
|
539
|
+
# </note>
|
435
540
|
# @option options [String] :checksum_algorithm
|
436
541
|
# Indicates the algorithm used to create the checksum for the object
|
437
|
-
# when
|
438
|
-
# functionality if
|
439
|
-
# must be a corresponding `x-amz-checksum` or `x-amz-trailer`
|
440
|
-
# sent. Otherwise, Amazon S3 fails the request with the HTTP
|
441
|
-
# `400 Bad Request`. For more information, see [Checking
|
442
|
-
# integrity][1] in the *Amazon S3 User Guide*.
|
542
|
+
# when you use the SDK. This header will not provide any additional
|
543
|
+
# functionality if you don't use the SDK. When you send this header,
|
544
|
+
# there must be a corresponding `x-amz-checksum` or `x-amz-trailer`
|
545
|
+
# header sent. Otherwise, Amazon S3 fails the request with the HTTP
|
546
|
+
# status code `400 Bad Request`. For more information, see [Checking
|
547
|
+
# object integrity][1] in the *Amazon S3 User Guide*.
|
443
548
|
#
|
444
549
|
# If you provide an individual checksum, Amazon S3 ignores any provided
|
445
550
|
# `ChecksumAlgorithm` parameter.
|
@@ -491,8 +596,12 @@ module Aws::S3
|
|
491
596
|
#
|
492
597
|
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
|
493
598
|
# @option options [String] :sse_customer_algorithm
|
494
|
-
# Specifies the algorithm to use
|
599
|
+
# Specifies the algorithm to use when encrypting the object (for
|
495
600
|
# example, AES256).
|
601
|
+
#
|
602
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
603
|
+
#
|
604
|
+
# </note>
|
496
605
|
# @option options [String] :sse_customer_key
|
497
606
|
# Specifies the customer-provided encryption key for Amazon S3 to use in
|
498
607
|
# encrypting data. This value is used to store the object and then it is
|
@@ -501,26 +610,38 @@ module Aws::S3
|
|
501
610
|
# `x-amz-server-side-encryption-customer-algorithm header`. This must be
|
502
611
|
# the same encryption key specified in the initiate multipart upload
|
503
612
|
# request.
|
613
|
+
#
|
614
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
615
|
+
#
|
616
|
+
# </note>
|
504
617
|
# @option options [String] :sse_customer_key_md5
|
505
618
|
# Specifies the 128-bit MD5 digest of the encryption key according to
|
506
619
|
# RFC 1321. Amazon S3 uses this header for a message integrity check to
|
507
620
|
# ensure that the encryption key was transmitted without error.
|
621
|
+
#
|
622
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
623
|
+
#
|
624
|
+
# </note>
|
508
625
|
# @option options [String] :request_payer
|
509
626
|
# Confirms that the requester knows that they will be charged for the
|
510
627
|
# request. Bucket owners need not specify this parameter in their
|
511
|
-
# requests. If either the source or destination
|
512
|
-
#
|
513
|
-
#
|
514
|
-
#
|
515
|
-
#
|
628
|
+
# requests. If either the source or destination S3 bucket has Requester
|
629
|
+
# Pays enabled, the requester will pay for corresponding charges to copy
|
630
|
+
# the object. For information about downloading objects from Requester
|
631
|
+
# Pays buckets, see [Downloading Objects in Requester Pays Buckets][1]
|
632
|
+
# in the *Amazon S3 User Guide*.
|
633
|
+
#
|
634
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
635
|
+
#
|
636
|
+
# </note>
|
516
637
|
#
|
517
638
|
#
|
518
639
|
#
|
519
640
|
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
|
520
641
|
# @option options [String] :expected_bucket_owner
|
521
|
-
# The account ID of the expected bucket owner. If the
|
522
|
-
#
|
523
|
-
# Forbidden` (access denied).
|
642
|
+
# The account ID of the expected bucket owner. If the account ID that
|
643
|
+
# you provide does not match the actual owner of the bucket, the request
|
644
|
+
# fails with the HTTP status code `403 Forbidden` (access denied).
|
524
645
|
# @return [Types::UploadPartOutput]
|
525
646
|
def upload(options = {})
|
526
647
|
options = options.merge(
|