aws-sdk-s3 1.127.0 → 1.132.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +30 -0
- data/VERSION +1 -1
- data/lib/aws-sdk-s3/bucket.rb +1 -1
- data/lib/aws-sdk-s3/client.rb +99 -82
- data/lib/aws-sdk-s3/customizations/errors.rb +1 -1
- data/lib/aws-sdk-s3/customizations/object.rb +20 -0
- data/lib/aws-sdk-s3/endpoint_parameters.rb +4 -0
- data/lib/aws-sdk-s3/endpoint_provider.rb +22 -246
- data/lib/aws-sdk-s3/file_downloader.rb +27 -1
- data/lib/aws-sdk-s3/object_multipart_copier.rb +33 -17
- data/lib/aws-sdk-s3/presigned_post.rb +52 -43
- data/lib/aws-sdk-s3/resource.rb +1 -1
- data/lib/aws-sdk-s3.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: adbed389cd50d435107ac0380117b7e1a316f18dc19cc9a140b223320980fb27
|
4
|
+
data.tar.gz: feea3f5c604991ae327c7e3a7c1811ea0de5ab4474154e3bc69162d8262def72
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3f9adfd588e576e5dd17a9abac897b5d3e113b3fefd03de458fc0c8556c9a43336f84af4a3faf4f8516995cfff58cb9085af209f1f2ef8991204e11f7b7e9164
|
7
|
+
data.tar.gz: 5eb78921bec0f584949cec19adc7d6f38c65daabab5f9ed01c7298d7bfb14501512a1ea99abc6449591867bf548bab50ec0fd3fe54c21dd5ddfddafa370aaae6
|
data/CHANGELOG.md
CHANGED
@@ -1,6 +1,36 @@
|
|
1
1
|
Unreleased Changes
|
2
2
|
------------------
|
3
3
|
|
4
|
+
1.132.0 (2023-07-24)
|
5
|
+
------------------
|
6
|
+
|
7
|
+
* Feature - Code Generated Changes, see `./build_tools` or `aws-sdk-core`'s CHANGELOG.md for details.
|
8
|
+
|
9
|
+
* Feature - Add support for verifying checksums in FileDownloader.
|
10
|
+
|
11
|
+
1.131.0 (2023-07-20)
|
12
|
+
------------------
|
13
|
+
|
14
|
+
* Feature - Improve performance of S3 clients by simplifying and optimizing endpoint resolution.
|
15
|
+
|
16
|
+
1.130.0 (2023-07-13)
|
17
|
+
------------------
|
18
|
+
|
19
|
+
* Feature - S3 Inventory now supports Object Access Control List and Object Owner as available object metadata fields in inventory reports.
|
20
|
+
|
21
|
+
* Feature - Allow Object multipart copy API to work when requiring a checksum algorithm.
|
22
|
+
* Feature - Allow Object multipart copy API to optionally copy parts as they exist on the source object if it has parts, instead of generating new part ranges, when specifying `use_source_parts: true`.
|
23
|
+
|
24
|
+
1.129.0 (2023-07-11)
|
25
|
+
------------------
|
26
|
+
|
27
|
+
* Feature - Code Generated Changes, see `./build_tools` or `aws-sdk-core`'s CHANGELOG.md for details.
|
28
|
+
|
29
|
+
1.128.0 (2023-07-06)
|
30
|
+
------------------
|
31
|
+
|
32
|
+
* Feature - Code Generated Changes, see `./build_tools` or `aws-sdk-core`'s CHANGELOG.md for details.
|
33
|
+
|
4
34
|
1.127.0 (2023-06-28)
|
5
35
|
------------------
|
6
36
|
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.
|
1
|
+
1.132.0
|
data/lib/aws-sdk-s3/bucket.rb
CHANGED
@@ -229,7 +229,7 @@ module Aws::S3
|
|
229
229
|
# bucket.create({
|
230
230
|
# acl: "private", # accepts private, public-read, public-read-write, authenticated-read
|
231
231
|
# create_bucket_configuration: {
|
232
|
-
# location_constraint: "af-south-1", # accepts af-south-1, ap-east-1, ap-northeast-1, ap-northeast-2, ap-northeast-3, ap-south-1, ap-southeast-1, ap-southeast-2, ap-southeast-3, ca-central-1, cn-north-1, cn-northwest-1, EU, eu-central-1, eu-north-1, eu-south-1, eu-west-1, eu-west-2, eu-west-3, me-south-1, sa-east-1, us-east-2, us-gov-east-1, us-gov-west-1, us-west-1, us-west-2
|
232
|
+
# location_constraint: "af-south-1", # accepts af-south-1, ap-east-1, ap-northeast-1, ap-northeast-2, ap-northeast-3, ap-south-1, ap-southeast-1, ap-southeast-2, ap-southeast-3, ca-central-1, cn-north-1, cn-northwest-1, EU, eu-central-1, eu-north-1, eu-south-1, eu-west-1, eu-west-2, eu-west-3, me-south-1, sa-east-1, us-east-2, us-gov-east-1, us-gov-west-1, us-west-1, us-west-2, ap-south-2, eu-south-2
|
233
233
|
# },
|
234
234
|
# grant_full_control: "GrantFullControl",
|
235
235
|
# grant_read: "GrantRead",
|
data/lib/aws-sdk-s3/client.rb
CHANGED
@@ -28,6 +28,7 @@ require 'aws-sdk-core/plugins/client_metrics_send_plugin.rb'
|
|
28
28
|
require 'aws-sdk-core/plugins/transfer_encoding.rb'
|
29
29
|
require 'aws-sdk-core/plugins/http_checksum.rb'
|
30
30
|
require 'aws-sdk-core/plugins/checksum_algorithm.rb'
|
31
|
+
require 'aws-sdk-core/plugins/request_compression.rb'
|
31
32
|
require 'aws-sdk-core/plugins/defaults_mode.rb'
|
32
33
|
require 'aws-sdk-core/plugins/recursion_detection.rb'
|
33
34
|
require 'aws-sdk-core/plugins/sign.rb'
|
@@ -96,6 +97,7 @@ module Aws::S3
|
|
96
97
|
add_plugin(Aws::Plugins::TransferEncoding)
|
97
98
|
add_plugin(Aws::Plugins::HttpChecksum)
|
98
99
|
add_plugin(Aws::Plugins::ChecksumAlgorithm)
|
100
|
+
add_plugin(Aws::Plugins::RequestCompression)
|
99
101
|
add_plugin(Aws::Plugins::DefaultsMode)
|
100
102
|
add_plugin(Aws::Plugins::RecursionDetection)
|
101
103
|
add_plugin(Aws::Plugins::Sign)
|
@@ -235,6 +237,10 @@ module Aws::S3
|
|
235
237
|
# Set to true to disable SDK automatically adding host prefix
|
236
238
|
# to default service endpoint when available.
|
237
239
|
#
|
240
|
+
# @option options [Boolean] :disable_request_compression (false)
|
241
|
+
# When set to 'true' the request body will not be compressed
|
242
|
+
# for supported operations.
|
243
|
+
#
|
238
244
|
# @option options [String] :endpoint
|
239
245
|
# The client endpoint is normally constructed from the `:region`
|
240
246
|
# option. You should only configure an `:endpoint` when connecting
|
@@ -266,6 +272,10 @@ module Aws::S3
|
|
266
272
|
# When set to `true`, the bucket name is always left in the
|
267
273
|
# request URI and never moved to the host as a sub-domain.
|
268
274
|
#
|
275
|
+
# @option options [Boolean] :ignore_configured_endpoint_urls
|
276
|
+
# Setting to true disables use of endpoint URLs provided via environment
|
277
|
+
# variables and the shared configuration file.
|
278
|
+
#
|
269
279
|
# @option options [Proc] :input_event_stream_handler
|
270
280
|
# When an EventStream or Proc object is provided, it can be used for sending events for the event stream.
|
271
281
|
#
|
@@ -292,6 +302,11 @@ module Aws::S3
|
|
292
302
|
# Used when loading credentials from the shared credentials file
|
293
303
|
# at HOME/.aws/credentials. When not specified, 'default' is used.
|
294
304
|
#
|
305
|
+
# @option options [Integer] :request_min_compression_size_bytes (10240)
|
306
|
+
# The minimum size in bytes that triggers compression for request
|
307
|
+
# bodies. The value must be non-negative integer value between 0
|
308
|
+
# and 10485780 bytes inclusive.
|
309
|
+
#
|
295
310
|
# @option options [Boolean] :require_https_for_sse_cpk (true)
|
296
311
|
# When `true`, the endpoint **must** be HTTPS for all operations
|
297
312
|
# where server-side-encryption is used with customer-provided keys.
|
@@ -953,8 +968,10 @@ module Aws::S3
|
|
953
968
|
# </note>
|
954
969
|
#
|
955
970
|
# The copy request charge is based on the storage class and Region that
|
956
|
-
# you specify for the destination object.
|
957
|
-
#
|
971
|
+
# you specify for the destination object. The request can also result in
|
972
|
+
# a data retrieval charge for the source if the source storage class
|
973
|
+
# bills for data retrieval. For pricing information, see [Amazon S3
|
974
|
+
# pricing][3].
|
958
975
|
#
|
959
976
|
# Amazon S3 transfer acceleration does not support cross-Region copies.
|
960
977
|
# If you request a cross-Region copy using a transfer acceleration
|
@@ -1680,33 +1697,33 @@ module Aws::S3
|
|
1680
1697
|
# * {Types::CreateBucketOutput#location #location} => String
|
1681
1698
|
#
|
1682
1699
|
#
|
1683
|
-
# @example Example: To create a bucket
|
1700
|
+
# @example Example: To create a bucket in a specific region
|
1684
1701
|
#
|
1685
|
-
# # The following example creates a bucket.
|
1702
|
+
# # The following example creates a bucket. The request specifies an AWS region where to create the bucket.
|
1686
1703
|
#
|
1687
1704
|
# resp = client.create_bucket({
|
1688
1705
|
# bucket: "examplebucket",
|
1706
|
+
# create_bucket_configuration: {
|
1707
|
+
# location_constraint: "eu-west-1",
|
1708
|
+
# },
|
1689
1709
|
# })
|
1690
1710
|
#
|
1691
1711
|
# resp.to_h outputs the following:
|
1692
1712
|
# {
|
1693
|
-
# location: "/
|
1713
|
+
# location: "http://examplebucket.<Region>.s3.amazonaws.com/",
|
1694
1714
|
# }
|
1695
1715
|
#
|
1696
|
-
# @example Example: To create a bucket
|
1716
|
+
# @example Example: To create a bucket
|
1697
1717
|
#
|
1698
|
-
# # The following example creates a bucket.
|
1718
|
+
# # The following example creates a bucket.
|
1699
1719
|
#
|
1700
1720
|
# resp = client.create_bucket({
|
1701
1721
|
# bucket: "examplebucket",
|
1702
|
-
# create_bucket_configuration: {
|
1703
|
-
# location_constraint: "eu-west-1",
|
1704
|
-
# },
|
1705
1722
|
# })
|
1706
1723
|
#
|
1707
1724
|
# resp.to_h outputs the following:
|
1708
1725
|
# {
|
1709
|
-
# location: "
|
1726
|
+
# location: "/examplebucket",
|
1710
1727
|
# }
|
1711
1728
|
#
|
1712
1729
|
# @example Request syntax with placeholder values
|
@@ -1715,7 +1732,7 @@ module Aws::S3
|
|
1715
1732
|
# acl: "private", # accepts private, public-read, public-read-write, authenticated-read
|
1716
1733
|
# bucket: "BucketName", # required
|
1717
1734
|
# create_bucket_configuration: {
|
1718
|
-
# location_constraint: "af-south-1", # accepts af-south-1, ap-east-1, ap-northeast-1, ap-northeast-2, ap-northeast-3, ap-south-1, ap-southeast-1, ap-southeast-2, ap-southeast-3, ca-central-1, cn-north-1, cn-northwest-1, EU, eu-central-1, eu-north-1, eu-south-1, eu-west-1, eu-west-2, eu-west-3, me-south-1, sa-east-1, us-east-2, us-gov-east-1, us-gov-west-1, us-west-1, us-west-2
|
1735
|
+
# location_constraint: "af-south-1", # accepts af-south-1, ap-east-1, ap-northeast-1, ap-northeast-2, ap-northeast-3, ap-south-1, ap-southeast-1, ap-southeast-2, ap-southeast-3, ca-central-1, cn-north-1, cn-northwest-1, EU, eu-central-1, eu-north-1, eu-south-1, eu-west-1, eu-west-2, eu-west-3, me-south-1, sa-east-1, us-east-2, us-gov-east-1, us-gov-west-1, us-west-1, us-west-2, ap-south-2, eu-south-2
|
1719
1736
|
# },
|
1720
1737
|
# grant_full_control: "GrantFullControl",
|
1721
1738
|
# grant_read: "GrantRead",
|
@@ -3158,6 +3175,15 @@ module Aws::S3
|
|
3158
3175
|
# * {Types::DeleteObjectOutput#request_charged #request_charged} => String
|
3159
3176
|
#
|
3160
3177
|
#
|
3178
|
+
# @example Example: To delete an object (from a non-versioned bucket)
|
3179
|
+
#
|
3180
|
+
# # The following example deletes an object from a non-versioned bucket.
|
3181
|
+
#
|
3182
|
+
# resp = client.delete_object({
|
3183
|
+
# bucket: "ExampleBucket",
|
3184
|
+
# key: "HappyFace.jpg",
|
3185
|
+
# })
|
3186
|
+
#
|
3161
3187
|
# @example Example: To delete an object
|
3162
3188
|
#
|
3163
3189
|
# # The following example deletes an object from an S3 bucket.
|
@@ -3171,15 +3197,6 @@ module Aws::S3
|
|
3171
3197
|
# {
|
3172
3198
|
# }
|
3173
3199
|
#
|
3174
|
-
# @example Example: To delete an object (from a non-versioned bucket)
|
3175
|
-
#
|
3176
|
-
# # The following example deletes an object from a non-versioned bucket.
|
3177
|
-
#
|
3178
|
-
# resp = client.delete_object({
|
3179
|
-
# bucket: "ExampleBucket",
|
3180
|
-
# key: "HappyFace.jpg",
|
3181
|
-
# })
|
3182
|
-
#
|
3183
3200
|
# @example Request syntax with placeholder values
|
3184
3201
|
#
|
3185
3202
|
# resp = client.delete_object({
|
@@ -3271,35 +3288,35 @@ module Aws::S3
|
|
3271
3288
|
# * {Types::DeleteObjectTaggingOutput#version_id #version_id} => String
|
3272
3289
|
#
|
3273
3290
|
#
|
3274
|
-
# @example Example: To remove tag set from an object
|
3291
|
+
# @example Example: To remove tag set from an object
|
3275
3292
|
#
|
3276
|
-
# # The following example removes tag set associated with the specified object
|
3277
|
-
# #
|
3293
|
+
# # The following example removes tag set associated with the specified object. If the bucket is versioning enabled, the
|
3294
|
+
# # operation removes tag set from the latest object version.
|
3278
3295
|
#
|
3279
3296
|
# resp = client.delete_object_tagging({
|
3280
3297
|
# bucket: "examplebucket",
|
3281
3298
|
# key: "HappyFace.jpg",
|
3282
|
-
# version_id: "ydlaNkwWm0SfKJR.T1b1fIdPRbldTYRI",
|
3283
3299
|
# })
|
3284
3300
|
#
|
3285
3301
|
# resp.to_h outputs the following:
|
3286
3302
|
# {
|
3287
|
-
# version_id: "
|
3303
|
+
# version_id: "null",
|
3288
3304
|
# }
|
3289
3305
|
#
|
3290
|
-
# @example Example: To remove tag set from an object
|
3306
|
+
# @example Example: To remove tag set from an object version
|
3291
3307
|
#
|
3292
|
-
# # The following example removes tag set associated with the specified object.
|
3293
|
-
# #
|
3308
|
+
# # The following example removes tag set associated with the specified object version. The request specifies both the
|
3309
|
+
# # object key and object version.
|
3294
3310
|
#
|
3295
3311
|
# resp = client.delete_object_tagging({
|
3296
3312
|
# bucket: "examplebucket",
|
3297
3313
|
# key: "HappyFace.jpg",
|
3314
|
+
# version_id: "ydlaNkwWm0SfKJR.T1b1fIdPRbldTYRI",
|
3298
3315
|
# })
|
3299
3316
|
#
|
3300
3317
|
# resp.to_h outputs the following:
|
3301
3318
|
# {
|
3302
|
-
# version_id: "
|
3319
|
+
# version_id: "ydlaNkwWm0SfKJR.T1b1fIdPRbldTYRI",
|
3303
3320
|
# }
|
3304
3321
|
#
|
3305
3322
|
# @example Request syntax with placeholder values
|
@@ -4212,7 +4229,7 @@ module Aws::S3
|
|
4212
4229
|
# resp.inventory_configuration.id #=> String
|
4213
4230
|
# resp.inventory_configuration.included_object_versions #=> String, one of "All", "Current"
|
4214
4231
|
# resp.inventory_configuration.optional_fields #=> Array
|
4215
|
-
# resp.inventory_configuration.optional_fields[0] #=> String, one of "Size", "LastModifiedDate", "StorageClass", "ETag", "IsMultipartUploaded", "ReplicationStatus", "EncryptionStatus", "ObjectLockRetainUntilDate", "ObjectLockMode", "ObjectLockLegalHoldStatus", "IntelligentTieringAccessTier", "BucketKeyStatus", "ChecksumAlgorithm"
|
4232
|
+
# resp.inventory_configuration.optional_fields[0] #=> String, one of "Size", "LastModifiedDate", "StorageClass", "ETag", "IsMultipartUploaded", "ReplicationStatus", "EncryptionStatus", "ObjectLockRetainUntilDate", "ObjectLockMode", "ObjectLockLegalHoldStatus", "IntelligentTieringAccessTier", "BucketKeyStatus", "ChecksumAlgorithm", "ObjectAccessControlList", "ObjectOwner"
|
4216
4233
|
# resp.inventory_configuration.schedule.frequency #=> String, one of "Daily", "Weekly"
|
4217
4234
|
#
|
4218
4235
|
# @see http://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketInventoryConfiguration AWS API Documentation
|
@@ -4556,7 +4573,7 @@ module Aws::S3
|
|
4556
4573
|
#
|
4557
4574
|
# @example Response structure
|
4558
4575
|
#
|
4559
|
-
# resp.location_constraint #=> String, one of "af-south-1", "ap-east-1", "ap-northeast-1", "ap-northeast-2", "ap-northeast-3", "ap-south-1", "ap-southeast-1", "ap-southeast-2", "ap-southeast-3", "ca-central-1", "cn-north-1", "cn-northwest-1", "EU", "eu-central-1", "eu-north-1", "eu-south-1", "eu-west-1", "eu-west-2", "eu-west-3", "me-south-1", "sa-east-1", "us-east-2", "us-gov-east-1", "us-gov-west-1", "us-west-1", "us-west-2"
|
4576
|
+
# resp.location_constraint #=> String, one of "af-south-1", "ap-east-1", "ap-northeast-1", "ap-northeast-2", "ap-northeast-3", "ap-south-1", "ap-southeast-1", "ap-southeast-2", "ap-southeast-3", "ca-central-1", "cn-north-1", "cn-northwest-1", "EU", "eu-central-1", "eu-north-1", "eu-south-1", "eu-west-1", "eu-west-2", "eu-west-3", "me-south-1", "sa-east-1", "us-east-2", "us-gov-east-1", "us-gov-west-1", "us-west-1", "us-west-2", "ap-south-2", "eu-south-2"
|
4560
4577
|
#
|
4561
4578
|
# @see http://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketLocation AWS API Documentation
|
4562
4579
|
#
|
@@ -7730,7 +7747,7 @@ module Aws::S3
|
|
7730
7747
|
# resp.inventory_configuration_list[0].id #=> String
|
7731
7748
|
# resp.inventory_configuration_list[0].included_object_versions #=> String, one of "All", "Current"
|
7732
7749
|
# resp.inventory_configuration_list[0].optional_fields #=> Array
|
7733
|
-
# resp.inventory_configuration_list[0].optional_fields[0] #=> String, one of "Size", "LastModifiedDate", "StorageClass", "ETag", "IsMultipartUploaded", "ReplicationStatus", "EncryptionStatus", "ObjectLockRetainUntilDate", "ObjectLockMode", "ObjectLockLegalHoldStatus", "IntelligentTieringAccessTier", "BucketKeyStatus", "ChecksumAlgorithm"
|
7750
|
+
# resp.inventory_configuration_list[0].optional_fields[0] #=> String, one of "Size", "LastModifiedDate", "StorageClass", "ETag", "IsMultipartUploaded", "ReplicationStatus", "EncryptionStatus", "ObjectLockRetainUntilDate", "ObjectLockMode", "ObjectLockLegalHoldStatus", "IntelligentTieringAccessTier", "BucketKeyStatus", "ChecksumAlgorithm", "ObjectAccessControlList", "ObjectOwner"
|
7734
7751
|
# resp.inventory_configuration_list[0].schedule.frequency #=> String, one of "Daily", "Weekly"
|
7735
7752
|
# resp.is_truncated #=> Boolean
|
7736
7753
|
# resp.next_continuation_token #=> String
|
@@ -10154,7 +10171,7 @@ module Aws::S3
|
|
10154
10171
|
# },
|
10155
10172
|
# id: "InventoryId", # required
|
10156
10173
|
# included_object_versions: "All", # required, accepts All, Current
|
10157
|
-
# optional_fields: ["Size"], # accepts Size, LastModifiedDate, StorageClass, ETag, IsMultipartUploaded, ReplicationStatus, EncryptionStatus, ObjectLockRetainUntilDate, ObjectLockMode, ObjectLockLegalHoldStatus, IntelligentTieringAccessTier, BucketKeyStatus, ChecksumAlgorithm
|
10174
|
+
# optional_fields: ["Size"], # accepts Size, LastModifiedDate, StorageClass, ETag, IsMultipartUploaded, ReplicationStatus, EncryptionStatus, ObjectLockRetainUntilDate, ObjectLockMode, ObjectLockLegalHoldStatus, IntelligentTieringAccessTier, BucketKeyStatus, ChecksumAlgorithm, ObjectAccessControlList, ObjectOwner
|
10158
10175
|
# schedule: { # required
|
10159
10176
|
# frequency: "Daily", # required, accepts Daily, Weekly
|
10160
10177
|
# },
|
@@ -12478,6 +12495,23 @@ module Aws::S3
|
|
12478
12495
|
# * {Types::PutObjectOutput#request_charged #request_charged} => String
|
12479
12496
|
#
|
12480
12497
|
#
|
12498
|
+
# @example Example: To upload an object
|
12499
|
+
#
|
12500
|
+
# # The following example uploads an object to a versioning-enabled bucket. The source file is specified using Windows file
|
12501
|
+
# # syntax. S3 returns VersionId of the newly created object.
|
12502
|
+
#
|
12503
|
+
# resp = client.put_object({
|
12504
|
+
# body: "HappyFace.jpg",
|
12505
|
+
# bucket: "examplebucket",
|
12506
|
+
# key: "HappyFace.jpg",
|
12507
|
+
# })
|
12508
|
+
#
|
12509
|
+
# resp.to_h outputs the following:
|
12510
|
+
# {
|
12511
|
+
# etag: "\"6805f2cfc46c0f04559748bb039d69ae\"",
|
12512
|
+
# version_id: "tpf3zF08nBplQK1XLOefGskR7mGDwcDk",
|
12513
|
+
# }
|
12514
|
+
#
|
12481
12515
|
# @example Example: To upload object and specify user-defined metadata
|
12482
12516
|
#
|
12483
12517
|
# # The following example creates an object. The request also specifies optional metadata. If the bucket is versioning
|
@@ -12535,41 +12569,6 @@ module Aws::S3
|
|
12535
12569
|
# version_id: "Bvq0EDKxOcXLJXNo_Lkz37eM3R4pfzyQ",
|
12536
12570
|
# }
|
12537
12571
|
#
|
12538
|
-
# @example Example: To upload an object and specify canned ACL.
|
12539
|
-
#
|
12540
|
-
# # The following example uploads and object. The request specifies optional canned ACL (access control list) to all READ
|
12541
|
-
# # access to authenticated users. If the bucket is versioning enabled, S3 returns version ID in response.
|
12542
|
-
#
|
12543
|
-
# resp = client.put_object({
|
12544
|
-
# acl: "authenticated-read",
|
12545
|
-
# body: "filetoupload",
|
12546
|
-
# bucket: "examplebucket",
|
12547
|
-
# key: "exampleobject",
|
12548
|
-
# })
|
12549
|
-
#
|
12550
|
-
# resp.to_h outputs the following:
|
12551
|
-
# {
|
12552
|
-
# etag: "\"6805f2cfc46c0f04559748bb039d69ae\"",
|
12553
|
-
# version_id: "Kirh.unyZwjQ69YxcQLA8z4F5j3kJJKr",
|
12554
|
-
# }
|
12555
|
-
#
|
12556
|
-
# @example Example: To upload an object
|
12557
|
-
#
|
12558
|
-
# # The following example uploads an object to a versioning-enabled bucket. The source file is specified using Windows file
|
12559
|
-
# # syntax. S3 returns VersionId of the newly created object.
|
12560
|
-
#
|
12561
|
-
# resp = client.put_object({
|
12562
|
-
# body: "HappyFace.jpg",
|
12563
|
-
# bucket: "examplebucket",
|
12564
|
-
# key: "HappyFace.jpg",
|
12565
|
-
# })
|
12566
|
-
#
|
12567
|
-
# resp.to_h outputs the following:
|
12568
|
-
# {
|
12569
|
-
# etag: "\"6805f2cfc46c0f04559748bb039d69ae\"",
|
12570
|
-
# version_id: "tpf3zF08nBplQK1XLOefGskR7mGDwcDk",
|
12571
|
-
# }
|
12572
|
-
#
|
12573
12572
|
# @example Example: To upload an object and specify server-side encryption and object tags
|
12574
12573
|
#
|
12575
12574
|
# # The following example uploads an object. The request specifies the optional server-side encryption option. The request
|
@@ -12608,6 +12607,24 @@ module Aws::S3
|
|
12608
12607
|
# version_id: "psM2sYY4.o1501dSx8wMvnkOzSBB.V4a",
|
12609
12608
|
# }
|
12610
12609
|
#
|
12610
|
+
# @example Example: To upload an object and specify canned ACL.
|
12611
|
+
#
|
12612
|
+
# # The following example uploads and object. The request specifies optional canned ACL (access control list) to all READ
|
12613
|
+
# # access to authenticated users. If the bucket is versioning enabled, S3 returns version ID in response.
|
12614
|
+
#
|
12615
|
+
# resp = client.put_object({
|
12616
|
+
# acl: "authenticated-read",
|
12617
|
+
# body: "filetoupload",
|
12618
|
+
# bucket: "examplebucket",
|
12619
|
+
# key: "exampleobject",
|
12620
|
+
# })
|
12621
|
+
#
|
12622
|
+
# resp.to_h outputs the following:
|
12623
|
+
# {
|
12624
|
+
# etag: "\"6805f2cfc46c0f04559748bb039d69ae\"",
|
12625
|
+
# version_id: "Kirh.unyZwjQ69YxcQLA8z4F5j3kJJKr",
|
12626
|
+
# }
|
12627
|
+
#
|
12611
12628
|
# @example Streaming a file from disk
|
12612
12629
|
# # upload file from disk in a single request, may not exceed 5GB
|
12613
12630
|
# File.open('/source/file/path', 'rb') do |file|
|
@@ -15150,45 +15167,45 @@ module Aws::S3
|
|
15150
15167
|
# * {Types::UploadPartCopyOutput#request_charged #request_charged} => String
|
15151
15168
|
#
|
15152
15169
|
#
|
15153
|
-
# @example Example: To upload a part by copying
|
15170
|
+
# @example Example: To upload a part by copying byte range from an existing object as data source
|
15154
15171
|
#
|
15155
|
-
# # The following example uploads a part of a multipart upload by copying
|
15172
|
+
# # The following example uploads a part of a multipart upload by copying a specified byte range from an existing object as
|
15173
|
+
# # data source.
|
15156
15174
|
#
|
15157
15175
|
# resp = client.upload_part_copy({
|
15158
15176
|
# bucket: "examplebucket",
|
15159
15177
|
# copy_source: "/bucketname/sourceobjectkey",
|
15178
|
+
# copy_source_range: "bytes=1-100000",
|
15160
15179
|
# key: "examplelargeobject",
|
15161
|
-
# part_number:
|
15180
|
+
# part_number: 2,
|
15162
15181
|
# upload_id: "exampleuoh_10OhKhT7YukE9bjzTPRiuaCotmZM_pFngJFir9OZNrSr5cWa3cq3LZSUsfjI4FI7PkP91We7Nrw--",
|
15163
15182
|
# })
|
15164
15183
|
#
|
15165
15184
|
# resp.to_h outputs the following:
|
15166
15185
|
# {
|
15167
15186
|
# copy_part_result: {
|
15168
|
-
# etag: "\"
|
15169
|
-
# last_modified: Time.parse("2016-12-29T21:
|
15187
|
+
# etag: "\"65d16d19e65a7508a51f043180edcc36\"",
|
15188
|
+
# last_modified: Time.parse("2016-12-29T21:44:28.000Z"),
|
15170
15189
|
# },
|
15171
15190
|
# }
|
15172
15191
|
#
|
15173
|
-
# @example Example: To upload a part by copying
|
15192
|
+
# @example Example: To upload a part by copying data from an existing object as data source
|
15174
15193
|
#
|
15175
|
-
# # The following example uploads a part of a multipart upload by copying
|
15176
|
-
# # data source.
|
15194
|
+
# # The following example uploads a part of a multipart upload by copying data from an existing object as data source.
|
15177
15195
|
#
|
15178
15196
|
# resp = client.upload_part_copy({
|
15179
15197
|
# bucket: "examplebucket",
|
15180
15198
|
# copy_source: "/bucketname/sourceobjectkey",
|
15181
|
-
# copy_source_range: "bytes=1-100000",
|
15182
15199
|
# key: "examplelargeobject",
|
15183
|
-
# part_number:
|
15200
|
+
# part_number: 1,
|
15184
15201
|
# upload_id: "exampleuoh_10OhKhT7YukE9bjzTPRiuaCotmZM_pFngJFir9OZNrSr5cWa3cq3LZSUsfjI4FI7PkP91We7Nrw--",
|
15185
15202
|
# })
|
15186
15203
|
#
|
15187
15204
|
# resp.to_h outputs the following:
|
15188
15205
|
# {
|
15189
15206
|
# copy_part_result: {
|
15190
|
-
# etag: "\"
|
15191
|
-
# last_modified: Time.parse("2016-12-29T21:
|
15207
|
+
# etag: "\"b0c6f0e7e054ab8fa2536a2677f8734d\"",
|
15208
|
+
# last_modified: Time.parse("2016-12-29T21:24:43.000Z"),
|
15192
15209
|
# },
|
15193
15210
|
# }
|
15194
15211
|
#
|
@@ -15636,7 +15653,7 @@ module Aws::S3
|
|
15636
15653
|
params: params,
|
15637
15654
|
config: config)
|
15638
15655
|
context[:gem_name] = 'aws-sdk-s3'
|
15639
|
-
context[:gem_version] = '1.
|
15656
|
+
context[:gem_version] = '1.132.0'
|
15640
15657
|
Seahorse::Client::Request.new(handlers, context)
|
15641
15658
|
end
|
15642
15659
|
|
@@ -8,7 +8,7 @@ module Aws
|
|
8
8
|
class PermanentRedirect < ServiceError
|
9
9
|
# @param [Seahorse::Client::RequestContext] context
|
10
10
|
# @param [String] message
|
11
|
-
# @param [Aws::S3::Types::PermanentRedirect]
|
11
|
+
# @param [Aws::S3::Types::PermanentRedirect] _data
|
12
12
|
def initialize(context, message, _data = Aws::EmptyStructure.new)
|
13
13
|
data = Aws::S3::Types::PermanentRedirect.new(message: message)
|
14
14
|
body = context.http_response.body_contents
|
@@ -46,6 +46,14 @@ module Aws
|
|
46
46
|
# different region. You do not need to specify this option
|
47
47
|
# if you have provided a `:source_client` or a `:content_length`.
|
48
48
|
#
|
49
|
+
# @option options [Boolean] :use_source_parts (false) Only used when
|
50
|
+
# `:multipart_copy` is `true`. Use part sizes defined on the source
|
51
|
+
# object if any exist. If copying or moving an object that
|
52
|
+
# is already multipart, this does not re-part the object, instead
|
53
|
+
# re-using the part definitions on the original. That means the etag
|
54
|
+
# and any checksums will not change. This is especially useful if the
|
55
|
+
# source object has parts with varied sizes.
|
56
|
+
#
|
49
57
|
# @example Basic object copy
|
50
58
|
#
|
51
59
|
# bucket = Aws::S3::Bucket.new('target-bucket')
|
@@ -484,6 +492,18 @@ module Aws
|
|
484
492
|
# retrieve the object. For more about object versioning, see:
|
485
493
|
# https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectVersioning.html
|
486
494
|
#
|
495
|
+
# @option options [String] checksum_mode (ENABLED) When `ENABLED` and
|
496
|
+
# the object has a stored checksum, it will be used to validate the
|
497
|
+
# download and will raise an `Aws::Errors::ChecksumError` if
|
498
|
+
# checksum validation fails. You may provide a `on_checksum_validated`
|
499
|
+
# callback if you need to verify that validation occured and which
|
500
|
+
# algorithm was used.
|
501
|
+
#
|
502
|
+
# @option options [Callable] on_checksum_validated Called each time a
|
503
|
+
# request's checksum is validated with the checksum algorithm and the
|
504
|
+
# response. For multipart downloads, this will be called for each
|
505
|
+
# part that is downloaded and validated.
|
506
|
+
#
|
487
507
|
# @return [Boolean] Returns `true` when the file is downloaded without
|
488
508
|
# any errors.
|
489
509
|
def download_file(destination, options = {})
|
@@ -119,6 +119,10 @@ module Aws::S3
|
|
119
119
|
end
|
120
120
|
self[:endpoint] = options[:endpoint]
|
121
121
|
self[:force_path_style] = options[:force_path_style]
|
122
|
+
self[:force_path_style] = false if self[:force_path_style].nil?
|
123
|
+
if self[:force_path_style].nil?
|
124
|
+
raise ArgumentError, "Missing required EndpointParameter: :force_path_style"
|
125
|
+
end
|
122
126
|
self[:accelerate] = options[:accelerate]
|
123
127
|
self[:accelerate] = false if self[:accelerate].nil?
|
124
128
|
if self[:accelerate].nil?
|