aws-sdk-s3 1.129.0 → 1.131.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 578e27a27f5e9dbd010d0ebd8c5d0fb08a044ad00030fe0aa5bffdf06b3fefcb
4
- data.tar.gz: ba2d207e8dcde9882c68df896273de191c2f73f96474fdc15edd1f05340c7549
3
+ metadata.gz: 7b9bd9773bfe93b000fceed47270a7ae0e9460c17afe3ecf99962d93dee82422
4
+ data.tar.gz: 47154a5a396f315d9c55dcd7a7002e31ef75d0d6d0b6d8fa816c46e93fed358c
5
5
  SHA512:
6
- metadata.gz: 46454fc534e68df2f8c885243e622298b3a044d3102e9682055bf9cad711474ddf6a26676b8a1d1a94d8680efc590fb9f9fab36071e3e26cba126354209f3954
7
- data.tar.gz: ce7cbb366e60f0d68fd0fcaed9210a4e4ed2ae03c45c81fda0ae310a4cd12291480214c7478ab28257c7b9bd0c7981898f009c57aa7ae6a83e9e875479e41bc3
6
+ metadata.gz: 2434d460cfa4d4ea2fede1a4bb023f7c9c24c417bf4819c3647a04b22d0665da9d6c6d419399c7691688aeacb9bd6542e773c262a662d02eb9c08b058a049b8a
7
+ data.tar.gz: 9e3dce605906b1b6f3db06a68545e81eddda54eeea98ce369964408b45f54f054b5f4be3c668ab62e0ac83cbbf7ffb3cc828de7474fc06c6b21c095178546a52
data/CHANGELOG.md CHANGED
@@ -1,6 +1,19 @@
1
1
  Unreleased Changes
2
2
  ------------------
3
3
 
4
+ 1.131.0 (2023-07-20)
5
+ ------------------
6
+
7
+ * Feature - Improve performance of S3 clients by simplifying and optimizing endpoint resolution.
8
+
9
+ 1.130.0 (2023-07-13)
10
+ ------------------
11
+
12
+ * Feature - S3 Inventory now supports Object Access Control List and Object Owner as available object metadata fields in inventory reports.
13
+
14
+ * Feature - Allow Object multipart copy API to work when requiring a checksum algorithm.
15
+ * 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`.
16
+
4
17
  1.129.0 (2023-07-11)
5
18
  ------------------
6
19
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.129.0
1
+ 1.131.0
@@ -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",
@@ -968,8 +968,10 @@ module Aws::S3
968
968
  # </note>
969
969
  #
970
970
  # The copy request charge is based on the storage class and Region that
971
- # you specify for the destination object. For pricing information, see
972
- # [Amazon S3 pricing][3].
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].
973
975
  #
974
976
  # Amazon S3 transfer acceleration does not support cross-Region copies.
975
977
  # If you request a cross-Region copy using a transfer acceleration
@@ -1695,33 +1697,33 @@ module Aws::S3
1695
1697
  # * {Types::CreateBucketOutput#location #location} => String
1696
1698
  #
1697
1699
  #
1698
- # @example Example: To create a bucket
1700
+ # @example Example: To create a bucket in a specific region
1699
1701
  #
1700
- # # The following example creates a bucket.
1702
+ # # The following example creates a bucket. The request specifies an AWS region where to create the bucket.
1701
1703
  #
1702
1704
  # resp = client.create_bucket({
1703
1705
  # bucket: "examplebucket",
1706
+ # create_bucket_configuration: {
1707
+ # location_constraint: "eu-west-1",
1708
+ # },
1704
1709
  # })
1705
1710
  #
1706
1711
  # resp.to_h outputs the following:
1707
1712
  # {
1708
- # location: "/examplebucket",
1713
+ # location: "http://examplebucket.<Region>.s3.amazonaws.com/",
1709
1714
  # }
1710
1715
  #
1711
- # @example Example: To create a bucket in a specific region
1716
+ # @example Example: To create a bucket
1712
1717
  #
1713
- # # The following example creates a bucket. The request specifies an AWS region where to create the bucket.
1718
+ # # The following example creates a bucket.
1714
1719
  #
1715
1720
  # resp = client.create_bucket({
1716
1721
  # bucket: "examplebucket",
1717
- # create_bucket_configuration: {
1718
- # location_constraint: "eu-west-1",
1719
- # },
1720
1722
  # })
1721
1723
  #
1722
1724
  # resp.to_h outputs the following:
1723
1725
  # {
1724
- # location: "http://examplebucket.<Region>.s3.amazonaws.com/",
1726
+ # location: "/examplebucket",
1725
1727
  # }
1726
1728
  #
1727
1729
  # @example Request syntax with placeholder values
@@ -1730,7 +1732,7 @@ module Aws::S3
1730
1732
  # acl: "private", # accepts private, public-read, public-read-write, authenticated-read
1731
1733
  # bucket: "BucketName", # required
1732
1734
  # create_bucket_configuration: {
1733
- # 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
1734
1736
  # },
1735
1737
  # grant_full_control: "GrantFullControl",
1736
1738
  # grant_read: "GrantRead",
@@ -3173,6 +3175,15 @@ module Aws::S3
3173
3175
  # * {Types::DeleteObjectOutput#request_charged #request_charged} => String
3174
3176
  #
3175
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
+ #
3176
3187
  # @example Example: To delete an object
3177
3188
  #
3178
3189
  # # The following example deletes an object from an S3 bucket.
@@ -3186,15 +3197,6 @@ module Aws::S3
3186
3197
  # {
3187
3198
  # }
3188
3199
  #
3189
- # @example Example: To delete an object (from a non-versioned bucket)
3190
- #
3191
- # # The following example deletes an object from a non-versioned bucket.
3192
- #
3193
- # resp = client.delete_object({
3194
- # bucket: "ExampleBucket",
3195
- # key: "HappyFace.jpg",
3196
- # })
3197
- #
3198
3200
  # @example Request syntax with placeholder values
3199
3201
  #
3200
3202
  # resp = client.delete_object({
@@ -3286,35 +3288,35 @@ module Aws::S3
3286
3288
  # * {Types::DeleteObjectTaggingOutput#version_id #version_id} => String
3287
3289
  #
3288
3290
  #
3289
- # @example Example: To remove tag set from an object version
3291
+ # @example Example: To remove tag set from an object
3290
3292
  #
3291
- # # The following example removes tag set associated with the specified object version. The request specifies both the
3292
- # # object key and object version.
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.
3293
3295
  #
3294
3296
  # resp = client.delete_object_tagging({
3295
3297
  # bucket: "examplebucket",
3296
3298
  # key: "HappyFace.jpg",
3297
- # version_id: "ydlaNkwWm0SfKJR.T1b1fIdPRbldTYRI",
3298
3299
  # })
3299
3300
  #
3300
3301
  # resp.to_h outputs the following:
3301
3302
  # {
3302
- # version_id: "ydlaNkwWm0SfKJR.T1b1fIdPRbldTYRI",
3303
+ # version_id: "null",
3303
3304
  # }
3304
3305
  #
3305
- # @example Example: To remove tag set from an object
3306
+ # @example Example: To remove tag set from an object version
3306
3307
  #
3307
- # # The following example removes tag set associated with the specified object. If the bucket is versioning enabled, the
3308
- # # operation removes tag set from the latest object version.
3308
+ # # The following example removes tag set associated with the specified object version. The request specifies both the
3309
+ # # object key and object version.
3309
3310
  #
3310
3311
  # resp = client.delete_object_tagging({
3311
3312
  # bucket: "examplebucket",
3312
3313
  # key: "HappyFace.jpg",
3314
+ # version_id: "ydlaNkwWm0SfKJR.T1b1fIdPRbldTYRI",
3313
3315
  # })
3314
3316
  #
3315
3317
  # resp.to_h outputs the following:
3316
3318
  # {
3317
- # version_id: "null",
3319
+ # version_id: "ydlaNkwWm0SfKJR.T1b1fIdPRbldTYRI",
3318
3320
  # }
3319
3321
  #
3320
3322
  # @example Request syntax with placeholder values
@@ -4227,7 +4229,7 @@ module Aws::S3
4227
4229
  # resp.inventory_configuration.id #=> String
4228
4230
  # resp.inventory_configuration.included_object_versions #=> String, one of "All", "Current"
4229
4231
  # resp.inventory_configuration.optional_fields #=> Array
4230
- # 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"
4231
4233
  # resp.inventory_configuration.schedule.frequency #=> String, one of "Daily", "Weekly"
4232
4234
  #
4233
4235
  # @see http://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketInventoryConfiguration AWS API Documentation
@@ -4571,7 +4573,7 @@ module Aws::S3
4571
4573
  #
4572
4574
  # @example Response structure
4573
4575
  #
4574
- # 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"
4575
4577
  #
4576
4578
  # @see http://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketLocation AWS API Documentation
4577
4579
  #
@@ -7745,7 +7747,7 @@ module Aws::S3
7745
7747
  # resp.inventory_configuration_list[0].id #=> String
7746
7748
  # resp.inventory_configuration_list[0].included_object_versions #=> String, one of "All", "Current"
7747
7749
  # resp.inventory_configuration_list[0].optional_fields #=> Array
7748
- # 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"
7749
7751
  # resp.inventory_configuration_list[0].schedule.frequency #=> String, one of "Daily", "Weekly"
7750
7752
  # resp.is_truncated #=> Boolean
7751
7753
  # resp.next_continuation_token #=> String
@@ -10169,7 +10171,7 @@ module Aws::S3
10169
10171
  # },
10170
10172
  # id: "InventoryId", # required
10171
10173
  # included_object_versions: "All", # required, accepts All, Current
10172
- # 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
10173
10175
  # schedule: { # required
10174
10176
  # frequency: "Daily", # required, accepts Daily, Weekly
10175
10177
  # },
@@ -12493,6 +12495,23 @@ module Aws::S3
12493
12495
  # * {Types::PutObjectOutput#request_charged #request_charged} => String
12494
12496
  #
12495
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
+ #
12496
12515
  # @example Example: To upload object and specify user-defined metadata
12497
12516
  #
12498
12517
  # # The following example creates an object. The request also specifies optional metadata. If the bucket is versioning
@@ -12550,41 +12569,6 @@ module Aws::S3
12550
12569
  # version_id: "Bvq0EDKxOcXLJXNo_Lkz37eM3R4pfzyQ",
12551
12570
  # }
12552
12571
  #
12553
- # @example Example: To upload an object and specify canned ACL.
12554
- #
12555
- # # The following example uploads and object. The request specifies optional canned ACL (access control list) to all READ
12556
- # # access to authenticated users. If the bucket is versioning enabled, S3 returns version ID in response.
12557
- #
12558
- # resp = client.put_object({
12559
- # acl: "authenticated-read",
12560
- # body: "filetoupload",
12561
- # bucket: "examplebucket",
12562
- # key: "exampleobject",
12563
- # })
12564
- #
12565
- # resp.to_h outputs the following:
12566
- # {
12567
- # etag: "\"6805f2cfc46c0f04559748bb039d69ae\"",
12568
- # version_id: "Kirh.unyZwjQ69YxcQLA8z4F5j3kJJKr",
12569
- # }
12570
- #
12571
- # @example Example: To upload an object
12572
- #
12573
- # # The following example uploads an object to a versioning-enabled bucket. The source file is specified using Windows file
12574
- # # syntax. S3 returns VersionId of the newly created object.
12575
- #
12576
- # resp = client.put_object({
12577
- # body: "HappyFace.jpg",
12578
- # bucket: "examplebucket",
12579
- # key: "HappyFace.jpg",
12580
- # })
12581
- #
12582
- # resp.to_h outputs the following:
12583
- # {
12584
- # etag: "\"6805f2cfc46c0f04559748bb039d69ae\"",
12585
- # version_id: "tpf3zF08nBplQK1XLOefGskR7mGDwcDk",
12586
- # }
12587
- #
12588
12572
  # @example Example: To upload an object and specify server-side encryption and object tags
12589
12573
  #
12590
12574
  # # The following example uploads an object. The request specifies the optional server-side encryption option. The request
@@ -12623,6 +12607,24 @@ module Aws::S3
12623
12607
  # version_id: "psM2sYY4.o1501dSx8wMvnkOzSBB.V4a",
12624
12608
  # }
12625
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
+ #
12626
12628
  # @example Streaming a file from disk
12627
12629
  # # upload file from disk in a single request, may not exceed 5GB
12628
12630
  # File.open('/source/file/path', 'rb') do |file|
@@ -15165,45 +15167,45 @@ module Aws::S3
15165
15167
  # * {Types::UploadPartCopyOutput#request_charged #request_charged} => String
15166
15168
  #
15167
15169
  #
15168
- # @example Example: To upload a part by copying data from an existing object as data source
15170
+ # @example Example: To upload a part by copying byte range from an existing object as data source
15169
15171
  #
15170
- # # The following example uploads a part of a multipart upload by copying data from an existing object as data source.
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.
15171
15174
  #
15172
15175
  # resp = client.upload_part_copy({
15173
15176
  # bucket: "examplebucket",
15174
15177
  # copy_source: "/bucketname/sourceobjectkey",
15178
+ # copy_source_range: "bytes=1-100000",
15175
15179
  # key: "examplelargeobject",
15176
- # part_number: 1,
15180
+ # part_number: 2,
15177
15181
  # upload_id: "exampleuoh_10OhKhT7YukE9bjzTPRiuaCotmZM_pFngJFir9OZNrSr5cWa3cq3LZSUsfjI4FI7PkP91We7Nrw--",
15178
15182
  # })
15179
15183
  #
15180
15184
  # resp.to_h outputs the following:
15181
15185
  # {
15182
15186
  # copy_part_result: {
15183
- # etag: "\"b0c6f0e7e054ab8fa2536a2677f8734d\"",
15184
- # last_modified: Time.parse("2016-12-29T21:24:43.000Z"),
15187
+ # etag: "\"65d16d19e65a7508a51f043180edcc36\"",
15188
+ # last_modified: Time.parse("2016-12-29T21:44:28.000Z"),
15185
15189
  # },
15186
15190
  # }
15187
15191
  #
15188
- # @example Example: To upload a part by copying byte range from an existing object as data source
15192
+ # @example Example: To upload a part by copying data from an existing object as data source
15189
15193
  #
15190
- # # The following example uploads a part of a multipart upload by copying a specified byte range from an existing object as
15191
- # # data source.
15194
+ # # The following example uploads a part of a multipart upload by copying data from an existing object as data source.
15192
15195
  #
15193
15196
  # resp = client.upload_part_copy({
15194
15197
  # bucket: "examplebucket",
15195
15198
  # copy_source: "/bucketname/sourceobjectkey",
15196
- # copy_source_range: "bytes=1-100000",
15197
15199
  # key: "examplelargeobject",
15198
- # part_number: 2,
15200
+ # part_number: 1,
15199
15201
  # upload_id: "exampleuoh_10OhKhT7YukE9bjzTPRiuaCotmZM_pFngJFir9OZNrSr5cWa3cq3LZSUsfjI4FI7PkP91We7Nrw--",
15200
15202
  # })
15201
15203
  #
15202
15204
  # resp.to_h outputs the following:
15203
15205
  # {
15204
15206
  # copy_part_result: {
15205
- # etag: "\"65d16d19e65a7508a51f043180edcc36\"",
15206
- # last_modified: Time.parse("2016-12-29T21:44:28.000Z"),
15207
+ # etag: "\"b0c6f0e7e054ab8fa2536a2677f8734d\"",
15208
+ # last_modified: Time.parse("2016-12-29T21:24:43.000Z"),
15207
15209
  # },
15208
15210
  # }
15209
15211
  #
@@ -15651,7 +15653,7 @@ module Aws::S3
15651
15653
  params: params,
15652
15654
  config: config)
15653
15655
  context[:gem_name] = 'aws-sdk-s3'
15654
- context[:gem_version] = '1.129.0'
15656
+ context[:gem_version] = '1.131.0'
15655
15657
  Seahorse::Client::Request.new(handlers, context)
15656
15658
  end
15657
15659
 
@@ -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')
@@ -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?
@@ -23,7 +23,22 @@ module Aws::S3
23
23
  disable_multi_region_access_points = parameters.disable_multi_region_access_points
24
24
  use_arn_region = parameters.use_arn_region
25
25
  if Aws::Endpoints::Matchers.set?(region)
26
- if Aws::Endpoints::Matchers.set?(bucket) && (hardware_type = Aws::Endpoints::Matchers.substring(bucket, 49, 50, true)) && (region_prefix = Aws::Endpoints::Matchers.substring(bucket, 8, 12, true)) && (abba_suffix = Aws::Endpoints::Matchers.substring(bucket, 0, 7, true)) && (outpost_id = Aws::Endpoints::Matchers.substring(bucket, 32, 49, true)) && (region_partition = Aws::Endpoints::Matchers.aws_partition(region)) && Aws::Endpoints::Matchers.string_equals?(abba_suffix, "--op-s3")
26
+ if Aws::Endpoints::Matchers.boolean_equals?(accelerate, true) && Aws::Endpoints::Matchers.boolean_equals?(use_fips, true)
27
+ raise ArgumentError, "Accelerate cannot be used with FIPS"
28
+ end
29
+ if Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, true) && Aws::Endpoints::Matchers.set?(endpoint)
30
+ raise ArgumentError, "Cannot set dual-stack in combination with a custom endpoint."
31
+ end
32
+ if Aws::Endpoints::Matchers.set?(endpoint) && Aws::Endpoints::Matchers.boolean_equals?(use_fips, true)
33
+ raise ArgumentError, "A custom endpoint cannot be combined with FIPS"
34
+ end
35
+ if Aws::Endpoints::Matchers.set?(endpoint) && Aws::Endpoints::Matchers.boolean_equals?(accelerate, true)
36
+ raise ArgumentError, "A custom endpoint cannot be combined with S3 Accelerate"
37
+ end
38
+ if Aws::Endpoints::Matchers.boolean_equals?(use_fips, true) && (partition_result = Aws::Endpoints::Matchers.aws_partition(region)) && Aws::Endpoints::Matchers.string_equals?(Aws::Endpoints::Matchers.attr(partition_result, "name"), "aws-cn")
39
+ raise ArgumentError, "Partition does not support FIPS"
40
+ end
41
+ if Aws::Endpoints::Matchers.set?(bucket) && (hardware_type = Aws::Endpoints::Matchers.substring(bucket, 49, 50, true)) && (region_prefix = Aws::Endpoints::Matchers.substring(bucket, 8, 12, true)) && (bucket_alias_suffix = Aws::Endpoints::Matchers.substring(bucket, 0, 7, true)) && (outpost_id = Aws::Endpoints::Matchers.substring(bucket, 32, 49, true)) && (region_partition = Aws::Endpoints::Matchers.aws_partition(region)) && Aws::Endpoints::Matchers.string_equals?(bucket_alias_suffix, "--op-s3")
27
42
  if Aws::Endpoints::Matchers.valid_host_label?(outpost_id, false)
28
43
  if Aws::Endpoints::Matchers.string_equals?(hardware_type, "e")
29
44
  if Aws::Endpoints::Matchers.string_equals?(region_prefix, "beta")
@@ -55,124 +70,12 @@ module Aws::S3
55
70
  if Aws::Endpoints::Matchers.set?(endpoint) && Aws::Endpoints::Matchers.not(Aws::Endpoints::Matchers.set?(Aws::Endpoints::Matchers.parse_url(endpoint)))
56
71
  raise ArgumentError, "Custom endpoint `#{endpoint}` was not a valid URI"
57
72
  end
58
- if Aws::Endpoints::Matchers.set?(force_path_style) && Aws::Endpoints::Matchers.boolean_equals?(force_path_style, true)
59
- if Aws::Endpoints::Matchers.aws_parse_arn(bucket)
60
- raise ArgumentError, "Path-style addressing cannot be used with ARN buckets"
61
- end
62
- if (uri_encoded_bucket = Aws::Endpoints::Matchers.uri_encode(bucket))
63
- if Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, true) && Aws::Endpoints::Matchers.set?(endpoint)
64
- raise ArgumentError, "Cannot set dual-stack in combination with a custom endpoint."
65
- end
66
- if (partition_result = Aws::Endpoints::Matchers.aws_partition(region))
67
- if Aws::Endpoints::Matchers.boolean_equals?(accelerate, false)
68
- if Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, true) && Aws::Endpoints::Matchers.not(Aws::Endpoints::Matchers.set?(endpoint)) && Aws::Endpoints::Matchers.boolean_equals?(use_fips, true) && Aws::Endpoints::Matchers.string_equals?(region, "aws-global")
69
- return Aws::Endpoints::Endpoint.new(url: "https://s3-fips.dualstack.us-east-1.#{partition_result['dnsSuffix']}/#{uri_encoded_bucket}", headers: {}, properties: {"authSchemes"=>[{"disableDoubleEncoding"=>true, "name"=>"sigv4", "signingName"=>"s3", "signingRegion"=>"us-east-1"}]})
70
- end
71
- if Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, true) && Aws::Endpoints::Matchers.not(Aws::Endpoints::Matchers.set?(endpoint)) && Aws::Endpoints::Matchers.boolean_equals?(use_fips, true) && Aws::Endpoints::Matchers.string_equals?(region, "aws-global")
72
- return Aws::Endpoints::Endpoint.new(url: "https://s3-fips.dualstack.us-east-1.#{partition_result['dnsSuffix']}/#{uri_encoded_bucket}", headers: {}, properties: {"authSchemes"=>[{"disableDoubleEncoding"=>true, "name"=>"sigv4", "signingName"=>"s3", "signingRegion"=>"us-east-1"}]})
73
- end
74
- if Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, true) && Aws::Endpoints::Matchers.not(Aws::Endpoints::Matchers.set?(endpoint)) && Aws::Endpoints::Matchers.boolean_equals?(use_fips, true) && Aws::Endpoints::Matchers.not(Aws::Endpoints::Matchers.string_equals?(region, "aws-global")) && Aws::Endpoints::Matchers.boolean_equals?(use_global_endpoint, true)
75
- return Aws::Endpoints::Endpoint.new(url: "https://s3-fips.dualstack.#{region}.#{partition_result['dnsSuffix']}/#{uri_encoded_bucket}", headers: {}, properties: {"authSchemes"=>[{"disableDoubleEncoding"=>true, "name"=>"sigv4", "signingName"=>"s3", "signingRegion"=>"#{region}"}]})
76
- end
77
- if Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, true) && Aws::Endpoints::Matchers.not(Aws::Endpoints::Matchers.set?(endpoint)) && Aws::Endpoints::Matchers.boolean_equals?(use_fips, true) && Aws::Endpoints::Matchers.not(Aws::Endpoints::Matchers.string_equals?(region, "aws-global")) && Aws::Endpoints::Matchers.boolean_equals?(use_global_endpoint, false)
78
- return Aws::Endpoints::Endpoint.new(url: "https://s3-fips.dualstack.#{region}.#{partition_result['dnsSuffix']}/#{uri_encoded_bucket}", headers: {}, properties: {"authSchemes"=>[{"disableDoubleEncoding"=>true, "name"=>"sigv4", "signingName"=>"s3", "signingRegion"=>"#{region}"}]})
79
- end
80
- if Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, false) && Aws::Endpoints::Matchers.set?(endpoint) && (url = Aws::Endpoints::Matchers.parse_url(endpoint)) && Aws::Endpoints::Matchers.boolean_equals?(use_fips, true) && Aws::Endpoints::Matchers.string_equals?(region, "aws-global")
81
- return Aws::Endpoints::Endpoint.new(url: "#{url['scheme']}://#{url['authority']}#{url['normalizedPath']}#{uri_encoded_bucket}", headers: {}, properties: {"authSchemes"=>[{"disableDoubleEncoding"=>true, "name"=>"sigv4", "signingName"=>"s3", "signingRegion"=>"us-east-1"}]})
82
- end
83
- if Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, false) && Aws::Endpoints::Matchers.set?(endpoint) && (url = Aws::Endpoints::Matchers.parse_url(endpoint)) && Aws::Endpoints::Matchers.boolean_equals?(use_fips, true) && Aws::Endpoints::Matchers.string_equals?(region, "aws-global")
84
- return Aws::Endpoints::Endpoint.new(url: "#{url['scheme']}://#{url['authority']}#{url['normalizedPath']}#{uri_encoded_bucket}", headers: {}, properties: {"authSchemes"=>[{"disableDoubleEncoding"=>true, "name"=>"sigv4", "signingName"=>"s3", "signingRegion"=>"us-east-1"}]})
85
- end
86
- if Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, false) && Aws::Endpoints::Matchers.set?(endpoint) && (url = Aws::Endpoints::Matchers.parse_url(endpoint)) && Aws::Endpoints::Matchers.boolean_equals?(use_fips, true) && Aws::Endpoints::Matchers.not(Aws::Endpoints::Matchers.string_equals?(region, "aws-global")) && Aws::Endpoints::Matchers.boolean_equals?(use_global_endpoint, true)
87
- return Aws::Endpoints::Endpoint.new(url: "#{url['scheme']}://#{url['authority']}#{url['normalizedPath']}#{uri_encoded_bucket}", headers: {}, properties: {"authSchemes"=>[{"disableDoubleEncoding"=>true, "name"=>"sigv4", "signingName"=>"s3", "signingRegion"=>"#{region}"}]})
88
- end
89
- if Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, false) && Aws::Endpoints::Matchers.set?(endpoint) && (url = Aws::Endpoints::Matchers.parse_url(endpoint)) && Aws::Endpoints::Matchers.boolean_equals?(use_fips, true) && Aws::Endpoints::Matchers.not(Aws::Endpoints::Matchers.string_equals?(region, "aws-global")) && Aws::Endpoints::Matchers.boolean_equals?(use_global_endpoint, false)
90
- return Aws::Endpoints::Endpoint.new(url: "#{url['scheme']}://#{url['authority']}#{url['normalizedPath']}#{uri_encoded_bucket}", headers: {}, properties: {"authSchemes"=>[{"disableDoubleEncoding"=>true, "name"=>"sigv4", "signingName"=>"s3", "signingRegion"=>"#{region}"}]})
91
- end
92
- if Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, false) && Aws::Endpoints::Matchers.not(Aws::Endpoints::Matchers.set?(endpoint)) && Aws::Endpoints::Matchers.boolean_equals?(use_fips, true) && Aws::Endpoints::Matchers.string_equals?(region, "aws-global")
93
- return Aws::Endpoints::Endpoint.new(url: "https://s3-fips.us-east-1.#{partition_result['dnsSuffix']}/#{uri_encoded_bucket}", headers: {}, properties: {"authSchemes"=>[{"disableDoubleEncoding"=>true, "name"=>"sigv4", "signingName"=>"s3", "signingRegion"=>"us-east-1"}]})
94
- end
95
- if Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, false) && Aws::Endpoints::Matchers.not(Aws::Endpoints::Matchers.set?(endpoint)) && Aws::Endpoints::Matchers.boolean_equals?(use_fips, true) && Aws::Endpoints::Matchers.string_equals?(region, "aws-global")
96
- return Aws::Endpoints::Endpoint.new(url: "https://s3-fips.us-east-1.#{partition_result['dnsSuffix']}/#{uri_encoded_bucket}", headers: {}, properties: {"authSchemes"=>[{"disableDoubleEncoding"=>true, "name"=>"sigv4", "signingName"=>"s3", "signingRegion"=>"us-east-1"}]})
97
- end
98
- if Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, false) && Aws::Endpoints::Matchers.not(Aws::Endpoints::Matchers.set?(endpoint)) && Aws::Endpoints::Matchers.boolean_equals?(use_fips, true) && Aws::Endpoints::Matchers.not(Aws::Endpoints::Matchers.string_equals?(region, "aws-global")) && Aws::Endpoints::Matchers.boolean_equals?(use_global_endpoint, true)
99
- return Aws::Endpoints::Endpoint.new(url: "https://s3-fips.#{region}.#{partition_result['dnsSuffix']}/#{uri_encoded_bucket}", headers: {}, properties: {"authSchemes"=>[{"disableDoubleEncoding"=>true, "name"=>"sigv4", "signingName"=>"s3", "signingRegion"=>"#{region}"}]})
100
- end
101
- if Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, false) && Aws::Endpoints::Matchers.not(Aws::Endpoints::Matchers.set?(endpoint)) && Aws::Endpoints::Matchers.boolean_equals?(use_fips, true) && Aws::Endpoints::Matchers.not(Aws::Endpoints::Matchers.string_equals?(region, "aws-global")) && Aws::Endpoints::Matchers.boolean_equals?(use_global_endpoint, false)
102
- return Aws::Endpoints::Endpoint.new(url: "https://s3-fips.#{region}.#{partition_result['dnsSuffix']}/#{uri_encoded_bucket}", headers: {}, properties: {"authSchemes"=>[{"disableDoubleEncoding"=>true, "name"=>"sigv4", "signingName"=>"s3", "signingRegion"=>"#{region}"}]})
103
- end
104
- if Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, true) && Aws::Endpoints::Matchers.not(Aws::Endpoints::Matchers.set?(endpoint)) && Aws::Endpoints::Matchers.boolean_equals?(use_fips, false) && Aws::Endpoints::Matchers.string_equals?(region, "aws-global")
105
- return Aws::Endpoints::Endpoint.new(url: "https://s3.dualstack.us-east-1.#{partition_result['dnsSuffix']}/#{uri_encoded_bucket}", headers: {}, properties: {"authSchemes"=>[{"disableDoubleEncoding"=>true, "name"=>"sigv4", "signingName"=>"s3", "signingRegion"=>"us-east-1"}]})
106
- end
107
- if Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, true) && Aws::Endpoints::Matchers.not(Aws::Endpoints::Matchers.set?(endpoint)) && Aws::Endpoints::Matchers.boolean_equals?(use_fips, false) && Aws::Endpoints::Matchers.string_equals?(region, "aws-global")
108
- return Aws::Endpoints::Endpoint.new(url: "https://s3.dualstack.us-east-1.#{partition_result['dnsSuffix']}/#{uri_encoded_bucket}", headers: {}, properties: {"authSchemes"=>[{"disableDoubleEncoding"=>true, "name"=>"sigv4", "signingName"=>"s3", "signingRegion"=>"us-east-1"}]})
109
- end
110
- if Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, true) && Aws::Endpoints::Matchers.not(Aws::Endpoints::Matchers.set?(endpoint)) && Aws::Endpoints::Matchers.boolean_equals?(use_fips, false) && Aws::Endpoints::Matchers.not(Aws::Endpoints::Matchers.string_equals?(region, "aws-global")) && Aws::Endpoints::Matchers.boolean_equals?(use_global_endpoint, true)
111
- return Aws::Endpoints::Endpoint.new(url: "https://s3.dualstack.#{region}.#{partition_result['dnsSuffix']}/#{uri_encoded_bucket}", headers: {}, properties: {"authSchemes"=>[{"disableDoubleEncoding"=>true, "name"=>"sigv4", "signingName"=>"s3", "signingRegion"=>"#{region}"}]})
112
- end
113
- if Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, true) && Aws::Endpoints::Matchers.not(Aws::Endpoints::Matchers.set?(endpoint)) && Aws::Endpoints::Matchers.boolean_equals?(use_fips, false) && Aws::Endpoints::Matchers.not(Aws::Endpoints::Matchers.string_equals?(region, "aws-global")) && Aws::Endpoints::Matchers.boolean_equals?(use_global_endpoint, false)
114
- return Aws::Endpoints::Endpoint.new(url: "https://s3.dualstack.#{region}.#{partition_result['dnsSuffix']}/#{uri_encoded_bucket}", headers: {}, properties: {"authSchemes"=>[{"disableDoubleEncoding"=>true, "name"=>"sigv4", "signingName"=>"s3", "signingRegion"=>"#{region}"}]})
115
- end
116
- if Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, false) && Aws::Endpoints::Matchers.set?(endpoint) && (url = Aws::Endpoints::Matchers.parse_url(endpoint)) && Aws::Endpoints::Matchers.boolean_equals?(use_fips, false) && Aws::Endpoints::Matchers.string_equals?(region, "aws-global")
117
- return Aws::Endpoints::Endpoint.new(url: "#{url['scheme']}://#{url['authority']}#{url['normalizedPath']}#{uri_encoded_bucket}", headers: {}, properties: {"authSchemes"=>[{"disableDoubleEncoding"=>true, "name"=>"sigv4", "signingName"=>"s3", "signingRegion"=>"us-east-1"}]})
118
- end
119
- if Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, false) && Aws::Endpoints::Matchers.set?(endpoint) && (url = Aws::Endpoints::Matchers.parse_url(endpoint)) && Aws::Endpoints::Matchers.boolean_equals?(use_fips, false) && Aws::Endpoints::Matchers.string_equals?(region, "aws-global")
120
- return Aws::Endpoints::Endpoint.new(url: "#{url['scheme']}://#{url['authority']}#{url['normalizedPath']}#{uri_encoded_bucket}", headers: {}, properties: {"authSchemes"=>[{"disableDoubleEncoding"=>true, "name"=>"sigv4", "signingName"=>"s3", "signingRegion"=>"us-east-1"}]})
121
- end
122
- if Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, false) && Aws::Endpoints::Matchers.set?(endpoint) && (url = Aws::Endpoints::Matchers.parse_url(endpoint)) && Aws::Endpoints::Matchers.boolean_equals?(use_fips, false) && Aws::Endpoints::Matchers.not(Aws::Endpoints::Matchers.string_equals?(region, "aws-global")) && Aws::Endpoints::Matchers.boolean_equals?(use_global_endpoint, true)
123
- if Aws::Endpoints::Matchers.string_equals?(region, "us-east-1")
124
- return Aws::Endpoints::Endpoint.new(url: "#{url['scheme']}://#{url['authority']}#{url['normalizedPath']}#{uri_encoded_bucket}", headers: {}, properties: {"authSchemes"=>[{"disableDoubleEncoding"=>true, "name"=>"sigv4", "signingName"=>"s3", "signingRegion"=>"#{region}"}]})
125
- end
126
- return Aws::Endpoints::Endpoint.new(url: "#{url['scheme']}://#{url['authority']}#{url['normalizedPath']}#{uri_encoded_bucket}", headers: {}, properties: {"authSchemes"=>[{"disableDoubleEncoding"=>true, "name"=>"sigv4", "signingName"=>"s3", "signingRegion"=>"#{region}"}]})
127
- end
128
- if Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, false) && Aws::Endpoints::Matchers.set?(endpoint) && (url = Aws::Endpoints::Matchers.parse_url(endpoint)) && Aws::Endpoints::Matchers.boolean_equals?(use_fips, false) && Aws::Endpoints::Matchers.not(Aws::Endpoints::Matchers.string_equals?(region, "aws-global")) && Aws::Endpoints::Matchers.boolean_equals?(use_global_endpoint, false)
129
- return Aws::Endpoints::Endpoint.new(url: "#{url['scheme']}://#{url['authority']}#{url['normalizedPath']}#{uri_encoded_bucket}", headers: {}, properties: {"authSchemes"=>[{"disableDoubleEncoding"=>true, "name"=>"sigv4", "signingName"=>"s3", "signingRegion"=>"#{region}"}]})
130
- end
131
- if Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, false) && Aws::Endpoints::Matchers.not(Aws::Endpoints::Matchers.set?(endpoint)) && Aws::Endpoints::Matchers.boolean_equals?(use_fips, false) && Aws::Endpoints::Matchers.string_equals?(region, "aws-global")
132
- return Aws::Endpoints::Endpoint.new(url: "https://s3.#{partition_result['dnsSuffix']}/#{uri_encoded_bucket}", headers: {}, properties: {"authSchemes"=>[{"disableDoubleEncoding"=>true, "name"=>"sigv4", "signingName"=>"s3", "signingRegion"=>"us-east-1"}]})
133
- end
134
- if Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, false) && Aws::Endpoints::Matchers.not(Aws::Endpoints::Matchers.set?(endpoint)) && Aws::Endpoints::Matchers.boolean_equals?(use_fips, false) && Aws::Endpoints::Matchers.string_equals?(region, "aws-global")
135
- return Aws::Endpoints::Endpoint.new(url: "https://s3.#{partition_result['dnsSuffix']}/#{uri_encoded_bucket}", headers: {}, properties: {"authSchemes"=>[{"disableDoubleEncoding"=>true, "name"=>"sigv4", "signingName"=>"s3", "signingRegion"=>"us-east-1"}]})
136
- end
137
- if Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, false) && Aws::Endpoints::Matchers.not(Aws::Endpoints::Matchers.set?(endpoint)) && Aws::Endpoints::Matchers.boolean_equals?(use_fips, false) && Aws::Endpoints::Matchers.not(Aws::Endpoints::Matchers.string_equals?(region, "aws-global")) && Aws::Endpoints::Matchers.boolean_equals?(use_global_endpoint, true)
138
- if Aws::Endpoints::Matchers.string_equals?(region, "us-east-1")
139
- return Aws::Endpoints::Endpoint.new(url: "https://s3.#{partition_result['dnsSuffix']}/#{uri_encoded_bucket}", headers: {}, properties: {"authSchemes"=>[{"disableDoubleEncoding"=>true, "name"=>"sigv4", "signingName"=>"s3", "signingRegion"=>"#{region}"}]})
140
- end
141
- return Aws::Endpoints::Endpoint.new(url: "https://s3.#{region}.#{partition_result['dnsSuffix']}/#{uri_encoded_bucket}", headers: {}, properties: {"authSchemes"=>[{"disableDoubleEncoding"=>true, "name"=>"sigv4", "signingName"=>"s3", "signingRegion"=>"#{region}"}]})
142
- end
143
- if Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, false) && Aws::Endpoints::Matchers.not(Aws::Endpoints::Matchers.set?(endpoint)) && Aws::Endpoints::Matchers.boolean_equals?(use_fips, false) && Aws::Endpoints::Matchers.not(Aws::Endpoints::Matchers.string_equals?(region, "aws-global")) && Aws::Endpoints::Matchers.boolean_equals?(use_global_endpoint, false)
144
- return Aws::Endpoints::Endpoint.new(url: "https://s3.#{region}.#{partition_result['dnsSuffix']}/#{uri_encoded_bucket}", headers: {}, properties: {"authSchemes"=>[{"disableDoubleEncoding"=>true, "name"=>"sigv4", "signingName"=>"s3", "signingRegion"=>"#{region}"}]})
145
- end
146
- end
147
- raise ArgumentError, "Path-style addressing cannot be used with S3 Accelerate"
148
- end
149
- raise ArgumentError, "A valid partition could not be determined"
150
- end
151
- end
152
- if Aws::Endpoints::Matchers.aws_virtual_hostable_s3_bucket?(bucket, false)
73
+ if Aws::Endpoints::Matchers.boolean_equals?(force_path_style, false) && Aws::Endpoints::Matchers.aws_virtual_hostable_s3_bucket?(bucket, false)
153
74
  if (partition_result = Aws::Endpoints::Matchers.aws_partition(region))
154
75
  if Aws::Endpoints::Matchers.valid_host_label?(region, false)
155
- if Aws::Endpoints::Matchers.boolean_equals?(use_fips, true) && Aws::Endpoints::Matchers.string_equals?(Aws::Endpoints::Matchers.attr(partition_result, "name"), "aws-cn")
156
- raise ArgumentError, "Partition does not support FIPS"
157
- end
158
- if Aws::Endpoints::Matchers.boolean_equals?(accelerate, true) && Aws::Endpoints::Matchers.boolean_equals?(use_fips, true)
159
- raise ArgumentError, "Accelerate cannot be used with FIPS"
160
- end
161
76
  if Aws::Endpoints::Matchers.boolean_equals?(accelerate, true) && Aws::Endpoints::Matchers.string_equals?(Aws::Endpoints::Matchers.attr(partition_result, "name"), "aws-cn")
162
77
  raise ArgumentError, "S3 Accelerate cannot be used in this region"
163
78
  end
164
- if Aws::Endpoints::Matchers.set?(endpoint) && Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, true)
165
- raise ArgumentError, "Host override cannot be combined with Dualstack, FIPS, or S3 Accelerate"
166
- end
167
- if Aws::Endpoints::Matchers.set?(endpoint) && Aws::Endpoints::Matchers.boolean_equals?(use_fips, true)
168
- raise ArgumentError, "Host override cannot be combined with Dualstack, FIPS, or S3 Accelerate"
169
- end
170
- if Aws::Endpoints::Matchers.set?(endpoint) && Aws::Endpoints::Matchers.boolean_equals?(accelerate, true)
171
- raise ArgumentError, "Host override cannot be combined with Dualstack, FIPS, or S3 Accelerate"
172
- end
173
- if Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, true) && Aws::Endpoints::Matchers.boolean_equals?(use_fips, true) && Aws::Endpoints::Matchers.boolean_equals?(accelerate, false) && Aws::Endpoints::Matchers.not(Aws::Endpoints::Matchers.set?(endpoint)) && Aws::Endpoints::Matchers.string_equals?(region, "aws-global")
174
- return Aws::Endpoints::Endpoint.new(url: "https://#{bucket}.s3-fips.dualstack.us-east-1.#{partition_result['dnsSuffix']}", headers: {}, properties: {"authSchemes"=>[{"disableDoubleEncoding"=>true, "name"=>"sigv4", "signingName"=>"s3", "signingRegion"=>"us-east-1"}]})
175
- end
176
79
  if Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, true) && Aws::Endpoints::Matchers.boolean_equals?(use_fips, true) && Aws::Endpoints::Matchers.boolean_equals?(accelerate, false) && Aws::Endpoints::Matchers.not(Aws::Endpoints::Matchers.set?(endpoint)) && Aws::Endpoints::Matchers.string_equals?(region, "aws-global")
177
80
  return Aws::Endpoints::Endpoint.new(url: "https://#{bucket}.s3-fips.dualstack.us-east-1.#{partition_result['dnsSuffix']}", headers: {}, properties: {"authSchemes"=>[{"disableDoubleEncoding"=>true, "name"=>"sigv4", "signingName"=>"s3", "signingRegion"=>"us-east-1"}]})
178
81
  end
@@ -185,9 +88,6 @@ module Aws::S3
185
88
  if Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, false) && Aws::Endpoints::Matchers.boolean_equals?(use_fips, true) && Aws::Endpoints::Matchers.boolean_equals?(accelerate, false) && Aws::Endpoints::Matchers.not(Aws::Endpoints::Matchers.set?(endpoint)) && Aws::Endpoints::Matchers.string_equals?(region, "aws-global")
186
89
  return Aws::Endpoints::Endpoint.new(url: "https://#{bucket}.s3-fips.us-east-1.#{partition_result['dnsSuffix']}", headers: {}, properties: {"authSchemes"=>[{"disableDoubleEncoding"=>true, "name"=>"sigv4", "signingName"=>"s3", "signingRegion"=>"us-east-1"}]})
187
90
  end
188
- if Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, false) && Aws::Endpoints::Matchers.boolean_equals?(use_fips, true) && Aws::Endpoints::Matchers.boolean_equals?(accelerate, false) && Aws::Endpoints::Matchers.not(Aws::Endpoints::Matchers.set?(endpoint)) && Aws::Endpoints::Matchers.string_equals?(region, "aws-global")
189
- return Aws::Endpoints::Endpoint.new(url: "https://#{bucket}.s3-fips.us-east-1.#{partition_result['dnsSuffix']}", headers: {}, properties: {"authSchemes"=>[{"disableDoubleEncoding"=>true, "name"=>"sigv4", "signingName"=>"s3", "signingRegion"=>"us-east-1"}]})
190
- end
191
91
  if Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, false) && Aws::Endpoints::Matchers.boolean_equals?(use_fips, true) && Aws::Endpoints::Matchers.boolean_equals?(accelerate, false) && Aws::Endpoints::Matchers.not(Aws::Endpoints::Matchers.set?(endpoint)) && Aws::Endpoints::Matchers.not(Aws::Endpoints::Matchers.string_equals?(region, "aws-global")) && Aws::Endpoints::Matchers.boolean_equals?(use_global_endpoint, true)
192
92
  return Aws::Endpoints::Endpoint.new(url: "https://#{bucket}.s3-fips.#{region}.#{partition_result['dnsSuffix']}", headers: {}, properties: {"authSchemes"=>[{"disableDoubleEncoding"=>true, "name"=>"sigv4", "signingName"=>"s3", "signingRegion"=>"#{region}"}]})
193
93
  end
@@ -197,9 +97,6 @@ module Aws::S3
197
97
  if Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, true) && Aws::Endpoints::Matchers.boolean_equals?(use_fips, false) && Aws::Endpoints::Matchers.boolean_equals?(accelerate, true) && Aws::Endpoints::Matchers.not(Aws::Endpoints::Matchers.set?(endpoint)) && Aws::Endpoints::Matchers.string_equals?(region, "aws-global")
198
98
  return Aws::Endpoints::Endpoint.new(url: "https://#{bucket}.s3-accelerate.dualstack.us-east-1.#{partition_result['dnsSuffix']}", headers: {}, properties: {"authSchemes"=>[{"disableDoubleEncoding"=>true, "name"=>"sigv4", "signingName"=>"s3", "signingRegion"=>"us-east-1"}]})
199
99
  end
200
- if Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, true) && Aws::Endpoints::Matchers.boolean_equals?(use_fips, false) && Aws::Endpoints::Matchers.boolean_equals?(accelerate, true) && Aws::Endpoints::Matchers.not(Aws::Endpoints::Matchers.set?(endpoint)) && Aws::Endpoints::Matchers.string_equals?(region, "aws-global")
201
- return Aws::Endpoints::Endpoint.new(url: "https://#{bucket}.s3-accelerate.dualstack.us-east-1.#{partition_result['dnsSuffix']}", headers: {}, properties: {"authSchemes"=>[{"disableDoubleEncoding"=>true, "name"=>"sigv4", "signingName"=>"s3", "signingRegion"=>"us-east-1"}]})
202
- end
203
100
  if Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, true) && Aws::Endpoints::Matchers.boolean_equals?(use_fips, false) && Aws::Endpoints::Matchers.boolean_equals?(accelerate, true) && Aws::Endpoints::Matchers.not(Aws::Endpoints::Matchers.set?(endpoint)) && Aws::Endpoints::Matchers.not(Aws::Endpoints::Matchers.string_equals?(region, "aws-global")) && Aws::Endpoints::Matchers.boolean_equals?(use_global_endpoint, true)
204
101
  return Aws::Endpoints::Endpoint.new(url: "https://#{bucket}.s3-accelerate.dualstack.#{partition_result['dnsSuffix']}", headers: {}, properties: {"authSchemes"=>[{"disableDoubleEncoding"=>true, "name"=>"sigv4", "signingName"=>"s3", "signingRegion"=>"#{region}"}]})
205
102
  end
@@ -209,9 +106,6 @@ module Aws::S3
209
106
  if Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, true) && Aws::Endpoints::Matchers.boolean_equals?(use_fips, false) && Aws::Endpoints::Matchers.boolean_equals?(accelerate, false) && Aws::Endpoints::Matchers.not(Aws::Endpoints::Matchers.set?(endpoint)) && Aws::Endpoints::Matchers.string_equals?(region, "aws-global")
210
107
  return Aws::Endpoints::Endpoint.new(url: "https://#{bucket}.s3.dualstack.us-east-1.#{partition_result['dnsSuffix']}", headers: {}, properties: {"authSchemes"=>[{"disableDoubleEncoding"=>true, "name"=>"sigv4", "signingName"=>"s3", "signingRegion"=>"us-east-1"}]})
211
108
  end
212
- if Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, true) && Aws::Endpoints::Matchers.boolean_equals?(use_fips, false) && Aws::Endpoints::Matchers.boolean_equals?(accelerate, false) && Aws::Endpoints::Matchers.not(Aws::Endpoints::Matchers.set?(endpoint)) && Aws::Endpoints::Matchers.string_equals?(region, "aws-global")
213
- return Aws::Endpoints::Endpoint.new(url: "https://#{bucket}.s3.dualstack.us-east-1.#{partition_result['dnsSuffix']}", headers: {}, properties: {"authSchemes"=>[{"disableDoubleEncoding"=>true, "name"=>"sigv4", "signingName"=>"s3", "signingRegion"=>"us-east-1"}]})
214
- end
215
109
  if Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, true) && Aws::Endpoints::Matchers.boolean_equals?(use_fips, false) && Aws::Endpoints::Matchers.boolean_equals?(accelerate, false) && Aws::Endpoints::Matchers.not(Aws::Endpoints::Matchers.set?(endpoint)) && Aws::Endpoints::Matchers.not(Aws::Endpoints::Matchers.string_equals?(region, "aws-global")) && Aws::Endpoints::Matchers.boolean_equals?(use_global_endpoint, true)
216
110
  return Aws::Endpoints::Endpoint.new(url: "https://#{bucket}.s3.dualstack.#{region}.#{partition_result['dnsSuffix']}", headers: {}, properties: {"authSchemes"=>[{"disableDoubleEncoding"=>true, "name"=>"sigv4", "signingName"=>"s3", "signingRegion"=>"#{region}"}]})
217
111
  end
@@ -224,12 +118,6 @@ module Aws::S3
224
118
  if Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, false) && Aws::Endpoints::Matchers.boolean_equals?(use_fips, false) && Aws::Endpoints::Matchers.boolean_equals?(accelerate, false) && Aws::Endpoints::Matchers.set?(endpoint) && (url = Aws::Endpoints::Matchers.parse_url(endpoint)) && Aws::Endpoints::Matchers.boolean_equals?(Aws::Endpoints::Matchers.attr(url, "isIp"), false) && Aws::Endpoints::Matchers.string_equals?(region, "aws-global")
225
119
  return Aws::Endpoints::Endpoint.new(url: "#{url['scheme']}://#{bucket}.#{url['authority']}#{url['path']}", headers: {}, properties: {"authSchemes"=>[{"disableDoubleEncoding"=>true, "name"=>"sigv4", "signingName"=>"s3", "signingRegion"=>"us-east-1"}]})
226
120
  end
227
- if Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, false) && Aws::Endpoints::Matchers.boolean_equals?(use_fips, false) && Aws::Endpoints::Matchers.boolean_equals?(accelerate, false) && Aws::Endpoints::Matchers.set?(endpoint) && (url = Aws::Endpoints::Matchers.parse_url(endpoint)) && Aws::Endpoints::Matchers.boolean_equals?(Aws::Endpoints::Matchers.attr(url, "isIp"), true) && Aws::Endpoints::Matchers.string_equals?(region, "aws-global")
228
- return Aws::Endpoints::Endpoint.new(url: "#{url['scheme']}://#{url['authority']}#{url['normalizedPath']}#{bucket}", headers: {}, properties: {"authSchemes"=>[{"disableDoubleEncoding"=>true, "name"=>"sigv4", "signingName"=>"s3", "signingRegion"=>"us-east-1"}]})
229
- end
230
- if Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, false) && Aws::Endpoints::Matchers.boolean_equals?(use_fips, false) && Aws::Endpoints::Matchers.boolean_equals?(accelerate, false) && Aws::Endpoints::Matchers.set?(endpoint) && (url = Aws::Endpoints::Matchers.parse_url(endpoint)) && Aws::Endpoints::Matchers.boolean_equals?(Aws::Endpoints::Matchers.attr(url, "isIp"), false) && Aws::Endpoints::Matchers.string_equals?(region, "aws-global")
231
- return Aws::Endpoints::Endpoint.new(url: "#{url['scheme']}://#{bucket}.#{url['authority']}#{url['path']}", headers: {}, properties: {"authSchemes"=>[{"disableDoubleEncoding"=>true, "name"=>"sigv4", "signingName"=>"s3", "signingRegion"=>"us-east-1"}]})
232
- end
233
121
  if Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, false) && Aws::Endpoints::Matchers.boolean_equals?(use_fips, false) && Aws::Endpoints::Matchers.boolean_equals?(accelerate, false) && Aws::Endpoints::Matchers.set?(endpoint) && (url = Aws::Endpoints::Matchers.parse_url(endpoint)) && Aws::Endpoints::Matchers.boolean_equals?(Aws::Endpoints::Matchers.attr(url, "isIp"), true) && Aws::Endpoints::Matchers.not(Aws::Endpoints::Matchers.string_equals?(region, "aws-global")) && Aws::Endpoints::Matchers.boolean_equals?(use_global_endpoint, true)
234
122
  if Aws::Endpoints::Matchers.string_equals?(region, "us-east-1")
235
123
  return Aws::Endpoints::Endpoint.new(url: "#{url['scheme']}://#{url['authority']}#{url['normalizedPath']}#{bucket}", headers: {}, properties: {"authSchemes"=>[{"disableDoubleEncoding"=>true, "name"=>"sigv4", "signingName"=>"s3", "signingRegion"=>"#{region}"}]})
@@ -251,9 +139,6 @@ module Aws::S3
251
139
  if Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, false) && Aws::Endpoints::Matchers.boolean_equals?(use_fips, false) && Aws::Endpoints::Matchers.boolean_equals?(accelerate, true) && Aws::Endpoints::Matchers.not(Aws::Endpoints::Matchers.set?(endpoint)) && Aws::Endpoints::Matchers.string_equals?(region, "aws-global")
252
140
  return Aws::Endpoints::Endpoint.new(url: "https://#{bucket}.s3-accelerate.#{partition_result['dnsSuffix']}", headers: {}, properties: {"authSchemes"=>[{"disableDoubleEncoding"=>true, "name"=>"sigv4", "signingName"=>"s3", "signingRegion"=>"us-east-1"}]})
253
141
  end
254
- if Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, false) && Aws::Endpoints::Matchers.boolean_equals?(use_fips, false) && Aws::Endpoints::Matchers.boolean_equals?(accelerate, true) && Aws::Endpoints::Matchers.not(Aws::Endpoints::Matchers.set?(endpoint)) && Aws::Endpoints::Matchers.string_equals?(region, "aws-global")
255
- return Aws::Endpoints::Endpoint.new(url: "https://#{bucket}.s3-accelerate.#{partition_result['dnsSuffix']}", headers: {}, properties: {"authSchemes"=>[{"disableDoubleEncoding"=>true, "name"=>"sigv4", "signingName"=>"s3", "signingRegion"=>"us-east-1"}]})
256
- end
257
142
  if Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, false) && Aws::Endpoints::Matchers.boolean_equals?(use_fips, false) && Aws::Endpoints::Matchers.boolean_equals?(accelerate, true) && Aws::Endpoints::Matchers.not(Aws::Endpoints::Matchers.set?(endpoint)) && Aws::Endpoints::Matchers.not(Aws::Endpoints::Matchers.string_equals?(region, "aws-global")) && Aws::Endpoints::Matchers.boolean_equals?(use_global_endpoint, true)
258
143
  if Aws::Endpoints::Matchers.string_equals?(region, "us-east-1")
259
144
  return Aws::Endpoints::Endpoint.new(url: "https://#{bucket}.s3-accelerate.#{partition_result['dnsSuffix']}", headers: {}, properties: {"authSchemes"=>[{"disableDoubleEncoding"=>true, "name"=>"sigv4", "signingName"=>"s3", "signingRegion"=>"#{region}"}]})
@@ -266,9 +151,6 @@ module Aws::S3
266
151
  if Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, false) && Aws::Endpoints::Matchers.boolean_equals?(use_fips, false) && Aws::Endpoints::Matchers.boolean_equals?(accelerate, false) && Aws::Endpoints::Matchers.not(Aws::Endpoints::Matchers.set?(endpoint)) && Aws::Endpoints::Matchers.string_equals?(region, "aws-global")
267
152
  return Aws::Endpoints::Endpoint.new(url: "https://#{bucket}.s3.#{partition_result['dnsSuffix']}", headers: {}, properties: {"authSchemes"=>[{"disableDoubleEncoding"=>true, "name"=>"sigv4", "signingName"=>"s3", "signingRegion"=>"us-east-1"}]})
268
153
  end
269
- if Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, false) && Aws::Endpoints::Matchers.boolean_equals?(use_fips, false) && Aws::Endpoints::Matchers.boolean_equals?(accelerate, false) && Aws::Endpoints::Matchers.not(Aws::Endpoints::Matchers.set?(endpoint)) && Aws::Endpoints::Matchers.string_equals?(region, "aws-global")
270
- return Aws::Endpoints::Endpoint.new(url: "https://#{bucket}.s3.#{partition_result['dnsSuffix']}", headers: {}, properties: {"authSchemes"=>[{"disableDoubleEncoding"=>true, "name"=>"sigv4", "signingName"=>"s3", "signingRegion"=>"us-east-1"}]})
271
- end
272
154
  if Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, false) && Aws::Endpoints::Matchers.boolean_equals?(use_fips, false) && Aws::Endpoints::Matchers.boolean_equals?(accelerate, false) && Aws::Endpoints::Matchers.not(Aws::Endpoints::Matchers.set?(endpoint)) && Aws::Endpoints::Matchers.not(Aws::Endpoints::Matchers.string_equals?(region, "aws-global")) && Aws::Endpoints::Matchers.boolean_equals?(use_global_endpoint, true)
273
155
  if Aws::Endpoints::Matchers.string_equals?(region, "us-east-1")
274
156
  return Aws::Endpoints::Endpoint.new(url: "https://#{bucket}.s3.#{partition_result['dnsSuffix']}", headers: {}, properties: {"authSchemes"=>[{"disableDoubleEncoding"=>true, "name"=>"sigv4", "signingName"=>"s3", "signingRegion"=>"#{region}"}]})
@@ -281,18 +163,16 @@ module Aws::S3
281
163
  end
282
164
  raise ArgumentError, "Invalid region: region was not a valid DNS name."
283
165
  end
284
- raise ArgumentError, "A valid partition could not be determined"
285
166
  end
286
- if Aws::Endpoints::Matchers.set?(endpoint) && (url = Aws::Endpoints::Matchers.parse_url(endpoint)) && Aws::Endpoints::Matchers.string_equals?(Aws::Endpoints::Matchers.attr(url, "scheme"), "http") && Aws::Endpoints::Matchers.aws_virtual_hostable_s3_bucket?(bucket, true) && Aws::Endpoints::Matchers.boolean_equals?(use_fips, false) && Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, false) && Aws::Endpoints::Matchers.boolean_equals?(accelerate, false)
167
+ if Aws::Endpoints::Matchers.set?(endpoint) && (url = Aws::Endpoints::Matchers.parse_url(endpoint)) && Aws::Endpoints::Matchers.string_equals?(Aws::Endpoints::Matchers.attr(url, "scheme"), "http") && Aws::Endpoints::Matchers.aws_virtual_hostable_s3_bucket?(bucket, true) && Aws::Endpoints::Matchers.boolean_equals?(force_path_style, false) && Aws::Endpoints::Matchers.boolean_equals?(use_fips, false) && Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, false) && Aws::Endpoints::Matchers.boolean_equals?(accelerate, false)
287
168
  if (partition_result = Aws::Endpoints::Matchers.aws_partition(region))
288
169
  if Aws::Endpoints::Matchers.valid_host_label?(region, false)
289
170
  return Aws::Endpoints::Endpoint.new(url: "#{url['scheme']}://#{bucket}.#{url['authority']}#{url['path']}", headers: {}, properties: {"authSchemes"=>[{"disableDoubleEncoding"=>true, "name"=>"sigv4", "signingName"=>"s3", "signingRegion"=>"#{region}"}]})
290
171
  end
291
172
  raise ArgumentError, "Invalid region: region was not a valid DNS name."
292
173
  end
293
- raise ArgumentError, "A valid partition could not be determined"
294
174
  end
295
- if (bucket_arn = Aws::Endpoints::Matchers.aws_parse_arn(bucket))
175
+ if Aws::Endpoints::Matchers.boolean_equals?(force_path_style, false) && (bucket_arn = Aws::Endpoints::Matchers.aws_parse_arn(bucket))
296
176
  if (arn_type = Aws::Endpoints::Matchers.attr(bucket_arn, "resourceId[0]")) && Aws::Endpoints::Matchers.not(Aws::Endpoints::Matchers.string_equals?(arn_type, ""))
297
177
  if Aws::Endpoints::Matchers.string_equals?(Aws::Endpoints::Matchers.attr(bucket_arn, "service"), "s3-object-lambda")
298
178
  if Aws::Endpoints::Matchers.string_equals?(arn_type, "accesspoint")
@@ -320,9 +200,6 @@ module Aws::S3
320
200
  end
321
201
  if Aws::Endpoints::Matchers.valid_host_label?(Aws::Endpoints::Matchers.attr(bucket_arn, "accountId"), false)
322
202
  if Aws::Endpoints::Matchers.valid_host_label?(access_point_name, false)
323
- if Aws::Endpoints::Matchers.boolean_equals?(use_fips, true) && Aws::Endpoints::Matchers.string_equals?(Aws::Endpoints::Matchers.attr(bucket_partition, "name"), "aws-cn")
324
- raise ArgumentError, "Partition does not support FIPS"
325
- end
326
203
  if Aws::Endpoints::Matchers.set?(endpoint) && (url = Aws::Endpoints::Matchers.parse_url(endpoint))
327
204
  return Aws::Endpoints::Endpoint.new(url: "#{url['scheme']}://#{access_point_name}-#{bucket_arn['accountId']}.#{url['authority']}#{url['path']}", headers: {}, properties: {"authSchemes"=>[{"disableDoubleEncoding"=>true, "name"=>"sigv4", "signingName"=>"s3-object-lambda", "signingRegion"=>"#{bucket_arn['region']}"}]})
328
205
  end
@@ -339,9 +216,7 @@ module Aws::S3
339
216
  end
340
217
  raise ArgumentError, "Client was configured for partition `#{partition_result['name']}` but ARN (`#{bucket}`) has `#{bucket_partition['name']}`"
341
218
  end
342
- raise ArgumentError, "A valid partition could not be determined"
343
219
  end
344
- raise ArgumentError, "Could not load partition for ARN region `#{bucket_arn['region']}`"
345
220
  end
346
221
  raise ArgumentError, "Invalid ARN: The ARN may only contain a single resource component after `accesspoint`."
347
222
  end
@@ -373,12 +248,6 @@ module Aws::S3
373
248
  if Aws::Endpoints::Matchers.boolean_equals?(accelerate, true)
374
249
  raise ArgumentError, "Access Points do not support S3 Accelerate"
375
250
  end
376
- if Aws::Endpoints::Matchers.boolean_equals?(use_fips, true) && Aws::Endpoints::Matchers.string_equals?(Aws::Endpoints::Matchers.attr(bucket_partition, "name"), "aws-cn")
377
- raise ArgumentError, "Partition does not support FIPS"
378
- end
379
- if Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, true) && Aws::Endpoints::Matchers.set?(endpoint)
380
- raise ArgumentError, "DualStack cannot be combined with a Host override (PrivateLink)"
381
- end
382
251
  if Aws::Endpoints::Matchers.boolean_equals?(use_fips, true) && Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, true)
383
252
  return Aws::Endpoints::Endpoint.new(url: "https://#{access_point_name}-#{bucket_arn['accountId']}.s3-accesspoint-fips.dualstack.#{bucket_arn['region']}.#{bucket_partition['dnsSuffix']}", headers: {}, properties: {"authSchemes"=>[{"disableDoubleEncoding"=>true, "name"=>"sigv4", "signingName"=>"s3", "signingRegion"=>"#{bucket_arn['region']}"}]})
384
253
  end
@@ -405,13 +274,10 @@ module Aws::S3
405
274
  end
406
275
  raise ArgumentError, "Client was configured for partition `#{partition_result['name']}` but ARN (`#{bucket}`) has `#{bucket_partition['name']}`"
407
276
  end
408
- raise ArgumentError, "A valid partition could not be determined"
409
277
  end
410
- raise ArgumentError, "Could not load partition for ARN region `#{bucket_arn['region']}`"
411
278
  end
412
279
  raise ArgumentError, "Invalid ARN: The ARN may only contain a single resource component after `accesspoint`."
413
280
  end
414
- raise ArgumentError, "Invalid ARN: bucket ARN is missing a region"
415
281
  end
416
282
  end
417
283
  if Aws::Endpoints::Matchers.valid_host_label?(access_point_name, true)
@@ -433,7 +299,6 @@ module Aws::S3
433
299
  end
434
300
  raise ArgumentError, "Client was configured for partition `#{mrap_partition['name']}` but bucket referred to partition `#{bucket_arn['partition']}`"
435
301
  end
436
- raise ArgumentError, "#{region} was not a valid region"
437
302
  end
438
303
  raise ArgumentError, "Invalid Access Point Name"
439
304
  end
@@ -482,9 +347,7 @@ module Aws::S3
482
347
  end
483
348
  raise ArgumentError, "Client was configured for partition `#{partition_result['name']}` but ARN (`#{bucket}`) has `#{bucket_partition['name']}`"
484
349
  end
485
- raise ArgumentError, "A valid partition could not be determined"
486
350
  end
487
- raise ArgumentError, "Could not load partition for ARN region #{bucket_arn['region']}"
488
351
  end
489
352
  raise ArgumentError, "Invalid ARN: The outpost Id may only contain a-z, A-Z, 0-9 and `-`. Found: `#{outpost_id}`"
490
353
  end
@@ -497,15 +360,12 @@ module Aws::S3
497
360
  if (arn_prefix = Aws::Endpoints::Matchers.substring(bucket, 0, 4, false)) && Aws::Endpoints::Matchers.string_equals?(arn_prefix, "arn:") && Aws::Endpoints::Matchers.not(Aws::Endpoints::Matchers.set?(Aws::Endpoints::Matchers.aws_parse_arn(bucket)))
498
361
  raise ArgumentError, "Invalid ARN: `#{bucket}` was not a valid ARN"
499
362
  end
363
+ if Aws::Endpoints::Matchers.boolean_equals?(force_path_style, true) && Aws::Endpoints::Matchers.aws_parse_arn(bucket)
364
+ raise ArgumentError, "Path-style addressing cannot be used with ARN buckets"
365
+ end
500
366
  if (uri_encoded_bucket = Aws::Endpoints::Matchers.uri_encode(bucket))
501
- if Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, true) && Aws::Endpoints::Matchers.set?(endpoint)
502
- raise ArgumentError, "Cannot set dual-stack in combination with a custom endpoint."
503
- end
504
367
  if (partition_result = Aws::Endpoints::Matchers.aws_partition(region))
505
368
  if Aws::Endpoints::Matchers.boolean_equals?(accelerate, false)
506
- if Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, true) && Aws::Endpoints::Matchers.not(Aws::Endpoints::Matchers.set?(endpoint)) && Aws::Endpoints::Matchers.boolean_equals?(use_fips, true) && Aws::Endpoints::Matchers.string_equals?(region, "aws-global")
507
- return Aws::Endpoints::Endpoint.new(url: "https://s3-fips.dualstack.us-east-1.#{partition_result['dnsSuffix']}/#{uri_encoded_bucket}", headers: {}, properties: {"authSchemes"=>[{"disableDoubleEncoding"=>true, "name"=>"sigv4", "signingName"=>"s3", "signingRegion"=>"us-east-1"}]})
508
- end
509
369
  if Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, true) && Aws::Endpoints::Matchers.not(Aws::Endpoints::Matchers.set?(endpoint)) && Aws::Endpoints::Matchers.boolean_equals?(use_fips, true) && Aws::Endpoints::Matchers.string_equals?(region, "aws-global")
510
370
  return Aws::Endpoints::Endpoint.new(url: "https://s3-fips.dualstack.us-east-1.#{partition_result['dnsSuffix']}/#{uri_encoded_bucket}", headers: {}, properties: {"authSchemes"=>[{"disableDoubleEncoding"=>true, "name"=>"sigv4", "signingName"=>"s3", "signingRegion"=>"us-east-1"}]})
511
371
  end
@@ -515,21 +375,6 @@ module Aws::S3
515
375
  if Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, true) && Aws::Endpoints::Matchers.not(Aws::Endpoints::Matchers.set?(endpoint)) && Aws::Endpoints::Matchers.boolean_equals?(use_fips, true) && Aws::Endpoints::Matchers.not(Aws::Endpoints::Matchers.string_equals?(region, "aws-global")) && Aws::Endpoints::Matchers.boolean_equals?(use_global_endpoint, false)
516
376
  return Aws::Endpoints::Endpoint.new(url: "https://s3-fips.dualstack.#{region}.#{partition_result['dnsSuffix']}/#{uri_encoded_bucket}", headers: {}, properties: {"authSchemes"=>[{"disableDoubleEncoding"=>true, "name"=>"sigv4", "signingName"=>"s3", "signingRegion"=>"#{region}"}]})
517
377
  end
518
- if Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, false) && Aws::Endpoints::Matchers.set?(endpoint) && (url = Aws::Endpoints::Matchers.parse_url(endpoint)) && Aws::Endpoints::Matchers.boolean_equals?(use_fips, true) && Aws::Endpoints::Matchers.string_equals?(region, "aws-global")
519
- return Aws::Endpoints::Endpoint.new(url: "#{url['scheme']}://#{url['authority']}#{url['normalizedPath']}#{uri_encoded_bucket}", headers: {}, properties: {"authSchemes"=>[{"disableDoubleEncoding"=>true, "name"=>"sigv4", "signingName"=>"s3", "signingRegion"=>"us-east-1"}]})
520
- end
521
- if Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, false) && Aws::Endpoints::Matchers.set?(endpoint) && (url = Aws::Endpoints::Matchers.parse_url(endpoint)) && Aws::Endpoints::Matchers.boolean_equals?(use_fips, true) && Aws::Endpoints::Matchers.string_equals?(region, "aws-global")
522
- return Aws::Endpoints::Endpoint.new(url: "#{url['scheme']}://#{url['authority']}#{url['normalizedPath']}#{uri_encoded_bucket}", headers: {}, properties: {"authSchemes"=>[{"disableDoubleEncoding"=>true, "name"=>"sigv4", "signingName"=>"s3", "signingRegion"=>"us-east-1"}]})
523
- end
524
- if Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, false) && Aws::Endpoints::Matchers.set?(endpoint) && (url = Aws::Endpoints::Matchers.parse_url(endpoint)) && Aws::Endpoints::Matchers.boolean_equals?(use_fips, true) && Aws::Endpoints::Matchers.not(Aws::Endpoints::Matchers.string_equals?(region, "aws-global")) && Aws::Endpoints::Matchers.boolean_equals?(use_global_endpoint, true)
525
- return Aws::Endpoints::Endpoint.new(url: "#{url['scheme']}://#{url['authority']}#{url['normalizedPath']}#{uri_encoded_bucket}", headers: {}, properties: {"authSchemes"=>[{"disableDoubleEncoding"=>true, "name"=>"sigv4", "signingName"=>"s3", "signingRegion"=>"#{region}"}]})
526
- end
527
- if Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, false) && Aws::Endpoints::Matchers.set?(endpoint) && (url = Aws::Endpoints::Matchers.parse_url(endpoint)) && Aws::Endpoints::Matchers.boolean_equals?(use_fips, true) && Aws::Endpoints::Matchers.not(Aws::Endpoints::Matchers.string_equals?(region, "aws-global")) && Aws::Endpoints::Matchers.boolean_equals?(use_global_endpoint, false)
528
- return Aws::Endpoints::Endpoint.new(url: "#{url['scheme']}://#{url['authority']}#{url['normalizedPath']}#{uri_encoded_bucket}", headers: {}, properties: {"authSchemes"=>[{"disableDoubleEncoding"=>true, "name"=>"sigv4", "signingName"=>"s3", "signingRegion"=>"#{region}"}]})
529
- end
530
- if Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, false) && Aws::Endpoints::Matchers.not(Aws::Endpoints::Matchers.set?(endpoint)) && Aws::Endpoints::Matchers.boolean_equals?(use_fips, true) && Aws::Endpoints::Matchers.string_equals?(region, "aws-global")
531
- return Aws::Endpoints::Endpoint.new(url: "https://s3-fips.us-east-1.#{partition_result['dnsSuffix']}/#{uri_encoded_bucket}", headers: {}, properties: {"authSchemes"=>[{"disableDoubleEncoding"=>true, "name"=>"sigv4", "signingName"=>"s3", "signingRegion"=>"us-east-1"}]})
532
- end
533
378
  if Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, false) && Aws::Endpoints::Matchers.not(Aws::Endpoints::Matchers.set?(endpoint)) && Aws::Endpoints::Matchers.boolean_equals?(use_fips, true) && Aws::Endpoints::Matchers.string_equals?(region, "aws-global")
534
379
  return Aws::Endpoints::Endpoint.new(url: "https://s3-fips.us-east-1.#{partition_result['dnsSuffix']}/#{uri_encoded_bucket}", headers: {}, properties: {"authSchemes"=>[{"disableDoubleEncoding"=>true, "name"=>"sigv4", "signingName"=>"s3", "signingRegion"=>"us-east-1"}]})
535
380
  end
@@ -542,9 +387,6 @@ module Aws::S3
542
387
  if Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, true) && Aws::Endpoints::Matchers.not(Aws::Endpoints::Matchers.set?(endpoint)) && Aws::Endpoints::Matchers.boolean_equals?(use_fips, false) && Aws::Endpoints::Matchers.string_equals?(region, "aws-global")
543
388
  return Aws::Endpoints::Endpoint.new(url: "https://s3.dualstack.us-east-1.#{partition_result['dnsSuffix']}/#{uri_encoded_bucket}", headers: {}, properties: {"authSchemes"=>[{"disableDoubleEncoding"=>true, "name"=>"sigv4", "signingName"=>"s3", "signingRegion"=>"us-east-1"}]})
544
389
  end
545
- if Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, true) && Aws::Endpoints::Matchers.not(Aws::Endpoints::Matchers.set?(endpoint)) && Aws::Endpoints::Matchers.boolean_equals?(use_fips, false) && Aws::Endpoints::Matchers.string_equals?(region, "aws-global")
546
- return Aws::Endpoints::Endpoint.new(url: "https://s3.dualstack.us-east-1.#{partition_result['dnsSuffix']}/#{uri_encoded_bucket}", headers: {}, properties: {"authSchemes"=>[{"disableDoubleEncoding"=>true, "name"=>"sigv4", "signingName"=>"s3", "signingRegion"=>"us-east-1"}]})
547
- end
548
390
  if Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, true) && Aws::Endpoints::Matchers.not(Aws::Endpoints::Matchers.set?(endpoint)) && Aws::Endpoints::Matchers.boolean_equals?(use_fips, false) && Aws::Endpoints::Matchers.not(Aws::Endpoints::Matchers.string_equals?(region, "aws-global")) && Aws::Endpoints::Matchers.boolean_equals?(use_global_endpoint, true)
549
391
  return Aws::Endpoints::Endpoint.new(url: "https://s3.dualstack.#{region}.#{partition_result['dnsSuffix']}/#{uri_encoded_bucket}", headers: {}, properties: {"authSchemes"=>[{"disableDoubleEncoding"=>true, "name"=>"sigv4", "signingName"=>"s3", "signingRegion"=>"#{region}"}]})
550
392
  end
@@ -554,9 +396,6 @@ module Aws::S3
554
396
  if Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, false) && Aws::Endpoints::Matchers.set?(endpoint) && (url = Aws::Endpoints::Matchers.parse_url(endpoint)) && Aws::Endpoints::Matchers.boolean_equals?(use_fips, false) && Aws::Endpoints::Matchers.string_equals?(region, "aws-global")
555
397
  return Aws::Endpoints::Endpoint.new(url: "#{url['scheme']}://#{url['authority']}#{url['normalizedPath']}#{uri_encoded_bucket}", headers: {}, properties: {"authSchemes"=>[{"disableDoubleEncoding"=>true, "name"=>"sigv4", "signingName"=>"s3", "signingRegion"=>"us-east-1"}]})
556
398
  end
557
- if Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, false) && Aws::Endpoints::Matchers.set?(endpoint) && (url = Aws::Endpoints::Matchers.parse_url(endpoint)) && Aws::Endpoints::Matchers.boolean_equals?(use_fips, false) && Aws::Endpoints::Matchers.string_equals?(region, "aws-global")
558
- return Aws::Endpoints::Endpoint.new(url: "#{url['scheme']}://#{url['authority']}#{url['normalizedPath']}#{uri_encoded_bucket}", headers: {}, properties: {"authSchemes"=>[{"disableDoubleEncoding"=>true, "name"=>"sigv4", "signingName"=>"s3", "signingRegion"=>"us-east-1"}]})
559
- end
560
399
  if Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, false) && Aws::Endpoints::Matchers.set?(endpoint) && (url = Aws::Endpoints::Matchers.parse_url(endpoint)) && Aws::Endpoints::Matchers.boolean_equals?(use_fips, false) && Aws::Endpoints::Matchers.not(Aws::Endpoints::Matchers.string_equals?(region, "aws-global")) && Aws::Endpoints::Matchers.boolean_equals?(use_global_endpoint, true)
561
400
  if Aws::Endpoints::Matchers.string_equals?(region, "us-east-1")
562
401
  return Aws::Endpoints::Endpoint.new(url: "#{url['scheme']}://#{url['authority']}#{url['normalizedPath']}#{uri_encoded_bucket}", headers: {}, properties: {"authSchemes"=>[{"disableDoubleEncoding"=>true, "name"=>"sigv4", "signingName"=>"s3", "signingRegion"=>"#{region}"}]})
@@ -569,9 +408,6 @@ module Aws::S3
569
408
  if Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, false) && Aws::Endpoints::Matchers.not(Aws::Endpoints::Matchers.set?(endpoint)) && Aws::Endpoints::Matchers.boolean_equals?(use_fips, false) && Aws::Endpoints::Matchers.string_equals?(region, "aws-global")
570
409
  return Aws::Endpoints::Endpoint.new(url: "https://s3.#{partition_result['dnsSuffix']}/#{uri_encoded_bucket}", headers: {}, properties: {"authSchemes"=>[{"disableDoubleEncoding"=>true, "name"=>"sigv4", "signingName"=>"s3", "signingRegion"=>"us-east-1"}]})
571
410
  end
572
- if Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, false) && Aws::Endpoints::Matchers.not(Aws::Endpoints::Matchers.set?(endpoint)) && Aws::Endpoints::Matchers.boolean_equals?(use_fips, false) && Aws::Endpoints::Matchers.string_equals?(region, "aws-global")
573
- return Aws::Endpoints::Endpoint.new(url: "https://s3.#{partition_result['dnsSuffix']}/#{uri_encoded_bucket}", headers: {}, properties: {"authSchemes"=>[{"disableDoubleEncoding"=>true, "name"=>"sigv4", "signingName"=>"s3", "signingRegion"=>"us-east-1"}]})
574
- end
575
411
  if Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, false) && Aws::Endpoints::Matchers.not(Aws::Endpoints::Matchers.set?(endpoint)) && Aws::Endpoints::Matchers.boolean_equals?(use_fips, false) && Aws::Endpoints::Matchers.not(Aws::Endpoints::Matchers.string_equals?(region, "aws-global")) && Aws::Endpoints::Matchers.boolean_equals?(use_global_endpoint, true)
576
412
  if Aws::Endpoints::Matchers.string_equals?(region, "us-east-1")
577
413
  return Aws::Endpoints::Endpoint.new(url: "https://s3.#{partition_result['dnsSuffix']}/#{uri_encoded_bucket}", headers: {}, properties: {"authSchemes"=>[{"disableDoubleEncoding"=>true, "name"=>"sigv4", "signingName"=>"s3", "signingRegion"=>"#{region}"}]})
@@ -584,7 +420,6 @@ module Aws::S3
584
420
  end
585
421
  raise ArgumentError, "Path-style addressing cannot be used with S3 Accelerate"
586
422
  end
587
- raise ArgumentError, "A valid partition could not be determined"
588
423
  end
589
424
  end
590
425
  if Aws::Endpoints::Matchers.set?(use_object_lambda_endpoint) && Aws::Endpoints::Matchers.boolean_equals?(use_object_lambda_endpoint, true)
@@ -596,9 +431,6 @@ module Aws::S3
596
431
  if Aws::Endpoints::Matchers.boolean_equals?(accelerate, true)
597
432
  raise ArgumentError, "S3 Object Lambda does not support S3 Accelerate"
598
433
  end
599
- if Aws::Endpoints::Matchers.boolean_equals?(use_fips, true) && Aws::Endpoints::Matchers.string_equals?(Aws::Endpoints::Matchers.attr(partition_result, "name"), "aws-cn")
600
- raise ArgumentError, "Partition does not support FIPS"
601
- end
602
434
  if Aws::Endpoints::Matchers.set?(endpoint) && (url = Aws::Endpoints::Matchers.parse_url(endpoint))
603
435
  return Aws::Endpoints::Endpoint.new(url: "#{url['scheme']}://#{url['authority']}#{url['path']}", headers: {}, properties: {"authSchemes"=>[{"disableDoubleEncoding"=>true, "name"=>"sigv4", "signingName"=>"s3-object-lambda", "signingRegion"=>"#{region}"}]})
604
436
  end
@@ -609,29 +441,10 @@ module Aws::S3
609
441
  end
610
442
  raise ArgumentError, "Invalid region: region was not a valid DNS name."
611
443
  end
612
- raise ArgumentError, "A valid partition could not be determined"
613
444
  end
614
445
  if Aws::Endpoints::Matchers.not(Aws::Endpoints::Matchers.set?(bucket))
615
446
  if (partition_result = Aws::Endpoints::Matchers.aws_partition(region))
616
447
  if Aws::Endpoints::Matchers.valid_host_label?(region, true)
617
- if Aws::Endpoints::Matchers.boolean_equals?(use_fips, true) && Aws::Endpoints::Matchers.string_equals?(Aws::Endpoints::Matchers.attr(partition_result, "name"), "aws-cn")
618
- raise ArgumentError, "Partition does not support FIPS"
619
- end
620
- if Aws::Endpoints::Matchers.boolean_equals?(use_fips, true) && Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, true) && Aws::Endpoints::Matchers.set?(endpoint) && (url = Aws::Endpoints::Matchers.parse_url(endpoint)) && Aws::Endpoints::Matchers.string_equals?(region, "aws-global")
621
- return Aws::Endpoints::Endpoint.new(url: "#{url['scheme']}://#{url['authority']}#{url['path']}", headers: {}, properties: {"authSchemes"=>[{"disableDoubleEncoding"=>true, "name"=>"sigv4", "signingName"=>"s3", "signingRegion"=>"us-east-1"}]})
622
- end
623
- if Aws::Endpoints::Matchers.boolean_equals?(use_fips, true) && Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, true) && Aws::Endpoints::Matchers.set?(endpoint) && (url = Aws::Endpoints::Matchers.parse_url(endpoint)) && Aws::Endpoints::Matchers.string_equals?(region, "aws-global")
624
- return Aws::Endpoints::Endpoint.new(url: "#{url['scheme']}://#{url['authority']}#{url['path']}", headers: {}, properties: {"authSchemes"=>[{"disableDoubleEncoding"=>true, "name"=>"sigv4", "signingName"=>"s3", "signingRegion"=>"us-east-1"}]})
625
- end
626
- if Aws::Endpoints::Matchers.boolean_equals?(use_fips, true) && Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, true) && Aws::Endpoints::Matchers.set?(endpoint) && (url = Aws::Endpoints::Matchers.parse_url(endpoint)) && Aws::Endpoints::Matchers.not(Aws::Endpoints::Matchers.string_equals?(region, "aws-global")) && Aws::Endpoints::Matchers.boolean_equals?(use_global_endpoint, true)
627
- return Aws::Endpoints::Endpoint.new(url: "#{url['scheme']}://#{url['authority']}#{url['path']}", headers: {}, properties: {"authSchemes"=>[{"disableDoubleEncoding"=>true, "name"=>"sigv4", "signingName"=>"s3", "signingRegion"=>"#{region}"}]})
628
- end
629
- if Aws::Endpoints::Matchers.boolean_equals?(use_fips, true) && Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, true) && Aws::Endpoints::Matchers.set?(endpoint) && (url = Aws::Endpoints::Matchers.parse_url(endpoint)) && Aws::Endpoints::Matchers.not(Aws::Endpoints::Matchers.string_equals?(region, "aws-global")) && Aws::Endpoints::Matchers.boolean_equals?(use_global_endpoint, false)
630
- return Aws::Endpoints::Endpoint.new(url: "#{url['scheme']}://#{url['authority']}#{url['path']}", headers: {}, properties: {"authSchemes"=>[{"disableDoubleEncoding"=>true, "name"=>"sigv4", "signingName"=>"s3", "signingRegion"=>"#{region}"}]})
631
- end
632
- if Aws::Endpoints::Matchers.boolean_equals?(use_fips, true) && Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, true) && Aws::Endpoints::Matchers.not(Aws::Endpoints::Matchers.set?(endpoint)) && Aws::Endpoints::Matchers.string_equals?(region, "aws-global")
633
- return Aws::Endpoints::Endpoint.new(url: "https://s3-fips.dualstack.us-east-1.#{partition_result['dnsSuffix']}", headers: {}, properties: {"authSchemes"=>[{"disableDoubleEncoding"=>true, "name"=>"sigv4", "signingName"=>"s3", "signingRegion"=>"us-east-1"}]})
634
- end
635
448
  if Aws::Endpoints::Matchers.boolean_equals?(use_fips, true) && Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, true) && Aws::Endpoints::Matchers.not(Aws::Endpoints::Matchers.set?(endpoint)) && Aws::Endpoints::Matchers.string_equals?(region, "aws-global")
636
449
  return Aws::Endpoints::Endpoint.new(url: "https://s3-fips.dualstack.us-east-1.#{partition_result['dnsSuffix']}", headers: {}, properties: {"authSchemes"=>[{"disableDoubleEncoding"=>true, "name"=>"sigv4", "signingName"=>"s3", "signingRegion"=>"us-east-1"}]})
637
450
  end
@@ -641,21 +454,6 @@ module Aws::S3
641
454
  if Aws::Endpoints::Matchers.boolean_equals?(use_fips, true) && Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, true) && Aws::Endpoints::Matchers.not(Aws::Endpoints::Matchers.set?(endpoint)) && Aws::Endpoints::Matchers.not(Aws::Endpoints::Matchers.string_equals?(region, "aws-global")) && Aws::Endpoints::Matchers.boolean_equals?(use_global_endpoint, false)
642
455
  return Aws::Endpoints::Endpoint.new(url: "https://s3-fips.dualstack.#{region}.#{partition_result['dnsSuffix']}", headers: {}, properties: {"authSchemes"=>[{"disableDoubleEncoding"=>true, "name"=>"sigv4", "signingName"=>"s3", "signingRegion"=>"#{region}"}]})
643
456
  end
644
- if Aws::Endpoints::Matchers.boolean_equals?(use_fips, true) && Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, false) && Aws::Endpoints::Matchers.set?(endpoint) && (url = Aws::Endpoints::Matchers.parse_url(endpoint)) && Aws::Endpoints::Matchers.string_equals?(region, "aws-global")
645
- return Aws::Endpoints::Endpoint.new(url: "#{url['scheme']}://#{url['authority']}#{url['path']}", headers: {}, properties: {"authSchemes"=>[{"disableDoubleEncoding"=>true, "name"=>"sigv4", "signingName"=>"s3", "signingRegion"=>"us-east-1"}]})
646
- end
647
- if Aws::Endpoints::Matchers.boolean_equals?(use_fips, true) && Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, false) && Aws::Endpoints::Matchers.set?(endpoint) && (url = Aws::Endpoints::Matchers.parse_url(endpoint)) && Aws::Endpoints::Matchers.string_equals?(region, "aws-global")
648
- return Aws::Endpoints::Endpoint.new(url: "#{url['scheme']}://#{url['authority']}#{url['path']}", headers: {}, properties: {"authSchemes"=>[{"disableDoubleEncoding"=>true, "name"=>"sigv4", "signingName"=>"s3", "signingRegion"=>"us-east-1"}]})
649
- end
650
- if Aws::Endpoints::Matchers.boolean_equals?(use_fips, true) && Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, false) && Aws::Endpoints::Matchers.set?(endpoint) && (url = Aws::Endpoints::Matchers.parse_url(endpoint)) && Aws::Endpoints::Matchers.not(Aws::Endpoints::Matchers.string_equals?(region, "aws-global")) && Aws::Endpoints::Matchers.boolean_equals?(use_global_endpoint, true)
651
- return Aws::Endpoints::Endpoint.new(url: "#{url['scheme']}://#{url['authority']}#{url['path']}", headers: {}, properties: {"authSchemes"=>[{"disableDoubleEncoding"=>true, "name"=>"sigv4", "signingName"=>"s3", "signingRegion"=>"#{region}"}]})
652
- end
653
- if Aws::Endpoints::Matchers.boolean_equals?(use_fips, true) && Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, false) && Aws::Endpoints::Matchers.set?(endpoint) && (url = Aws::Endpoints::Matchers.parse_url(endpoint)) && Aws::Endpoints::Matchers.not(Aws::Endpoints::Matchers.string_equals?(region, "aws-global")) && Aws::Endpoints::Matchers.boolean_equals?(use_global_endpoint, false)
654
- return Aws::Endpoints::Endpoint.new(url: "#{url['scheme']}://#{url['authority']}#{url['path']}", headers: {}, properties: {"authSchemes"=>[{"disableDoubleEncoding"=>true, "name"=>"sigv4", "signingName"=>"s3", "signingRegion"=>"#{region}"}]})
655
- end
656
- if Aws::Endpoints::Matchers.boolean_equals?(use_fips, true) && Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, false) && Aws::Endpoints::Matchers.not(Aws::Endpoints::Matchers.set?(endpoint)) && Aws::Endpoints::Matchers.string_equals?(region, "aws-global")
657
- return Aws::Endpoints::Endpoint.new(url: "https://s3-fips.us-east-1.#{partition_result['dnsSuffix']}", headers: {}, properties: {"authSchemes"=>[{"disableDoubleEncoding"=>true, "name"=>"sigv4", "signingName"=>"s3", "signingRegion"=>"us-east-1"}]})
658
- end
659
457
  if Aws::Endpoints::Matchers.boolean_equals?(use_fips, true) && Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, false) && Aws::Endpoints::Matchers.not(Aws::Endpoints::Matchers.set?(endpoint)) && Aws::Endpoints::Matchers.string_equals?(region, "aws-global")
660
458
  return Aws::Endpoints::Endpoint.new(url: "https://s3-fips.us-east-1.#{partition_result['dnsSuffix']}", headers: {}, properties: {"authSchemes"=>[{"disableDoubleEncoding"=>true, "name"=>"sigv4", "signingName"=>"s3", "signingRegion"=>"us-east-1"}]})
661
459
  end
@@ -665,21 +463,6 @@ module Aws::S3
665
463
  if Aws::Endpoints::Matchers.boolean_equals?(use_fips, true) && Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, false) && Aws::Endpoints::Matchers.not(Aws::Endpoints::Matchers.set?(endpoint)) && Aws::Endpoints::Matchers.not(Aws::Endpoints::Matchers.string_equals?(region, "aws-global")) && Aws::Endpoints::Matchers.boolean_equals?(use_global_endpoint, false)
666
464
  return Aws::Endpoints::Endpoint.new(url: "https://s3-fips.#{region}.#{partition_result['dnsSuffix']}", headers: {}, properties: {"authSchemes"=>[{"disableDoubleEncoding"=>true, "name"=>"sigv4", "signingName"=>"s3", "signingRegion"=>"#{region}"}]})
667
465
  end
668
- if Aws::Endpoints::Matchers.boolean_equals?(use_fips, false) && Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, true) && Aws::Endpoints::Matchers.set?(endpoint) && (url = Aws::Endpoints::Matchers.parse_url(endpoint)) && Aws::Endpoints::Matchers.string_equals?(region, "aws-global")
669
- return Aws::Endpoints::Endpoint.new(url: "#{url['scheme']}://#{url['authority']}#{url['path']}", headers: {}, properties: {"authSchemes"=>[{"disableDoubleEncoding"=>true, "name"=>"sigv4", "signingName"=>"s3", "signingRegion"=>"us-east-1"}]})
670
- end
671
- if Aws::Endpoints::Matchers.boolean_equals?(use_fips, false) && Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, true) && Aws::Endpoints::Matchers.set?(endpoint) && (url = Aws::Endpoints::Matchers.parse_url(endpoint)) && Aws::Endpoints::Matchers.string_equals?(region, "aws-global")
672
- return Aws::Endpoints::Endpoint.new(url: "#{url['scheme']}://#{url['authority']}#{url['path']}", headers: {}, properties: {"authSchemes"=>[{"disableDoubleEncoding"=>true, "name"=>"sigv4", "signingName"=>"s3", "signingRegion"=>"us-east-1"}]})
673
- end
674
- if Aws::Endpoints::Matchers.boolean_equals?(use_fips, false) && Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, true) && Aws::Endpoints::Matchers.set?(endpoint) && (url = Aws::Endpoints::Matchers.parse_url(endpoint)) && Aws::Endpoints::Matchers.not(Aws::Endpoints::Matchers.string_equals?(region, "aws-global")) && Aws::Endpoints::Matchers.boolean_equals?(use_global_endpoint, true)
675
- return Aws::Endpoints::Endpoint.new(url: "#{url['scheme']}://#{url['authority']}#{url['path']}", headers: {}, properties: {"authSchemes"=>[{"disableDoubleEncoding"=>true, "name"=>"sigv4", "signingName"=>"s3", "signingRegion"=>"#{region}"}]})
676
- end
677
- if Aws::Endpoints::Matchers.boolean_equals?(use_fips, false) && Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, true) && Aws::Endpoints::Matchers.set?(endpoint) && (url = Aws::Endpoints::Matchers.parse_url(endpoint)) && Aws::Endpoints::Matchers.not(Aws::Endpoints::Matchers.string_equals?(region, "aws-global")) && Aws::Endpoints::Matchers.boolean_equals?(use_global_endpoint, false)
678
- return Aws::Endpoints::Endpoint.new(url: "#{url['scheme']}://#{url['authority']}#{url['path']}", headers: {}, properties: {"authSchemes"=>[{"disableDoubleEncoding"=>true, "name"=>"sigv4", "signingName"=>"s3", "signingRegion"=>"#{region}"}]})
679
- end
680
- if Aws::Endpoints::Matchers.boolean_equals?(use_fips, false) && Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, true) && Aws::Endpoints::Matchers.not(Aws::Endpoints::Matchers.set?(endpoint)) && Aws::Endpoints::Matchers.string_equals?(region, "aws-global")
681
- return Aws::Endpoints::Endpoint.new(url: "https://s3.dualstack.us-east-1.#{partition_result['dnsSuffix']}", headers: {}, properties: {"authSchemes"=>[{"disableDoubleEncoding"=>true, "name"=>"sigv4", "signingName"=>"s3", "signingRegion"=>"us-east-1"}]})
682
- end
683
466
  if Aws::Endpoints::Matchers.boolean_equals?(use_fips, false) && Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, true) && Aws::Endpoints::Matchers.not(Aws::Endpoints::Matchers.set?(endpoint)) && Aws::Endpoints::Matchers.string_equals?(region, "aws-global")
684
467
  return Aws::Endpoints::Endpoint.new(url: "https://s3.dualstack.us-east-1.#{partition_result['dnsSuffix']}", headers: {}, properties: {"authSchemes"=>[{"disableDoubleEncoding"=>true, "name"=>"sigv4", "signingName"=>"s3", "signingRegion"=>"us-east-1"}]})
685
468
  end
@@ -692,9 +475,6 @@ module Aws::S3
692
475
  if Aws::Endpoints::Matchers.boolean_equals?(use_fips, false) && Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, false) && Aws::Endpoints::Matchers.set?(endpoint) && (url = Aws::Endpoints::Matchers.parse_url(endpoint)) && Aws::Endpoints::Matchers.string_equals?(region, "aws-global")
693
476
  return Aws::Endpoints::Endpoint.new(url: "#{url['scheme']}://#{url['authority']}#{url['path']}", headers: {}, properties: {"authSchemes"=>[{"disableDoubleEncoding"=>true, "name"=>"sigv4", "signingName"=>"s3", "signingRegion"=>"us-east-1"}]})
694
477
  end
695
- if Aws::Endpoints::Matchers.boolean_equals?(use_fips, false) && Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, false) && Aws::Endpoints::Matchers.set?(endpoint) && (url = Aws::Endpoints::Matchers.parse_url(endpoint)) && Aws::Endpoints::Matchers.string_equals?(region, "aws-global")
696
- return Aws::Endpoints::Endpoint.new(url: "#{url['scheme']}://#{url['authority']}#{url['path']}", headers: {}, properties: {"authSchemes"=>[{"disableDoubleEncoding"=>true, "name"=>"sigv4", "signingName"=>"s3", "signingRegion"=>"us-east-1"}]})
697
- end
698
478
  if Aws::Endpoints::Matchers.boolean_equals?(use_fips, false) && Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, false) && Aws::Endpoints::Matchers.set?(endpoint) && (url = Aws::Endpoints::Matchers.parse_url(endpoint)) && Aws::Endpoints::Matchers.not(Aws::Endpoints::Matchers.string_equals?(region, "aws-global")) && Aws::Endpoints::Matchers.boolean_equals?(use_global_endpoint, true)
699
479
  if Aws::Endpoints::Matchers.string_equals?(region, "us-east-1")
700
480
  return Aws::Endpoints::Endpoint.new(url: "#{url['scheme']}://#{url['authority']}#{url['path']}", headers: {}, properties: {"authSchemes"=>[{"disableDoubleEncoding"=>true, "name"=>"sigv4", "signingName"=>"s3", "signingRegion"=>"#{region}"}]})
@@ -707,9 +487,6 @@ module Aws::S3
707
487
  if Aws::Endpoints::Matchers.boolean_equals?(use_fips, false) && Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, false) && Aws::Endpoints::Matchers.not(Aws::Endpoints::Matchers.set?(endpoint)) && Aws::Endpoints::Matchers.string_equals?(region, "aws-global")
708
488
  return Aws::Endpoints::Endpoint.new(url: "https://s3.#{partition_result['dnsSuffix']}", headers: {}, properties: {"authSchemes"=>[{"disableDoubleEncoding"=>true, "name"=>"sigv4", "signingName"=>"s3", "signingRegion"=>"us-east-1"}]})
709
489
  end
710
- if Aws::Endpoints::Matchers.boolean_equals?(use_fips, false) && Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, false) && Aws::Endpoints::Matchers.not(Aws::Endpoints::Matchers.set?(endpoint)) && Aws::Endpoints::Matchers.string_equals?(region, "aws-global")
711
- return Aws::Endpoints::Endpoint.new(url: "https://s3.#{partition_result['dnsSuffix']}", headers: {}, properties: {"authSchemes"=>[{"disableDoubleEncoding"=>true, "name"=>"sigv4", "signingName"=>"s3", "signingRegion"=>"us-east-1"}]})
712
- end
713
490
  if Aws::Endpoints::Matchers.boolean_equals?(use_fips, false) && Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, false) && Aws::Endpoints::Matchers.not(Aws::Endpoints::Matchers.set?(endpoint)) && Aws::Endpoints::Matchers.not(Aws::Endpoints::Matchers.string_equals?(region, "aws-global")) && Aws::Endpoints::Matchers.boolean_equals?(use_global_endpoint, true)
714
491
  if Aws::Endpoints::Matchers.string_equals?(region, "us-east-1")
715
492
  return Aws::Endpoints::Endpoint.new(url: "https://s3.#{partition_result['dnsSuffix']}", headers: {}, properties: {"authSchemes"=>[{"disableDoubleEncoding"=>true, "name"=>"sigv4", "signingName"=>"s3", "signingRegion"=>"#{region}"}]})
@@ -722,7 +499,6 @@ module Aws::S3
722
499
  end
723
500
  raise ArgumentError, "Invalid region: region was not a valid DNS name."
724
501
  end
725
- raise ArgumentError, "A valid partition could not be determined"
726
502
  end
727
503
  end
728
504
  raise ArgumentError, "A region must be set when sending requests to S3."
@@ -15,18 +15,21 @@ module Aws
15
15
  MAX_PARTS = 10_000
16
16
 
17
17
  # @option options [Client] :client
18
- # @option [Integer] :min_part_size (52428800) Size of copied parts.
19
- # Defaults to 50MB.
20
- # will be constructed from the given `options' hash.
21
- # @option [Integer] :thread_count (10) Number of concurrent threads to
22
- # use for copying parts.
18
+ # @option options [Integer] :min_part_size (52428800)
19
+ # Size of copied parts. Defaults to 50MB.
20
+ # @option options [Integer] :thread_count (10) Number of concurrent
21
+ # threads to use for copying parts.
22
+ # @option options [Boolean] :use_source_parts (false) Use part sizes
23
+ # defined on the source object if any exist. If copying or moving an
24
+ # object that is already multipart, this does not re-part the object,
25
+ # instead re-using the part definitions on the original. That means
26
+ # the etag and any checksums will not change. This is especially
27
+ # useful if the source object has parts with varied sizes.
23
28
  def initialize(options = {})
29
+ @use_source_parts = options.delete(:use_source_parts) || false
24
30
  @thread_count = options.delete(:thread_count) || 10
25
31
  @min_part_size = options.delete(:min_part_size) || (FIVE_MB * 10)
26
32
  @client = options[:client] || Client.new
27
- if options[:checksum_algorithm]
28
- raise ArgumentError, 'Multipart Copy does not support setting :checksum_algorithm'
29
- end
30
33
  end
31
34
 
32
35
  # @return [Client]
@@ -78,10 +81,9 @@ module Aws
78
81
  end
79
82
 
80
83
  def copy_part(part)
81
- {
82
- etag: @client.upload_part_copy(part).copy_part_result.etag,
83
- part_number: part[:part_number],
84
- }
84
+ @client.upload_part_copy(part).copy_part_result.to_h.merge({
85
+ part_number: part[:part_number]
86
+ }).tap { |result| result.delete(:last_modified) }
85
87
  end
86
88
 
87
89
  def complete_upload(parts, options)
@@ -104,24 +106,37 @@ module Aws
104
106
  parts = []
105
107
  options = options_for(:upload_part_copy, options)
106
108
  while offset < size
109
+ part_size = calculate_part_size(part_number, default_part_size, options)
107
110
  parts << options.merge({
108
111
  part_number: part_number,
109
- copy_source_range: byte_range(offset, default_part_size, size),
112
+ copy_source_range: byte_range(offset, part_size, size),
110
113
  })
111
114
  part_number += 1
112
- offset += default_part_size
115
+ offset += part_size
113
116
  end
114
117
  parts
115
118
  end
116
119
 
117
- def byte_range(offset, default_part_size, size)
118
- if offset + default_part_size < size
119
- "bytes=#{offset}-#{offset + default_part_size - 1}"
120
+ def byte_range(offset, part_size, size)
121
+ if offset + part_size < size
122
+ "bytes=#{offset}-#{offset + part_size - 1}"
120
123
  else
121
124
  "bytes=#{offset}-#{size - 1}"
122
125
  end
123
126
  end
124
127
 
128
+ def calculate_part_size(part_number, default_part_size, options)
129
+ if @use_source_parts && source_has_parts(options)
130
+ source_metadata(options.merge({ part_number: part_number }))[:content_length]
131
+ else
132
+ default_part_size
133
+ end
134
+ end
135
+
136
+ def source_has_parts(options)
137
+ @source_has_parts ||= source_metadata(options.merge({ part_number: 1 }))[:parts_count]
138
+ end
139
+
125
140
  def source_metadata(options)
126
141
  if options[:content_length]
127
142
  return { content_length: options.delete(:content_length) }
@@ -138,6 +153,7 @@ module Aws
138
153
  key = CGI.unescape(key)
139
154
  opts = { bucket: bucket, key: key }
140
155
  opts[:version_id] = version_id if version_id
156
+ opts[:part_number] = options[:part_number] if options[:part_number]
141
157
  client.head_object(opts).to_h
142
158
  end
143
159
 
@@ -41,7 +41,7 @@ module Aws::S3
41
41
  # acl: "private", # accepts private, public-read, public-read-write, authenticated-read
42
42
  # bucket: "BucketName", # required
43
43
  # create_bucket_configuration: {
44
- # 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
44
+ # 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
45
45
  # },
46
46
  # grant_full_control: "GrantFullControl",
47
47
  # grant_read: "GrantRead",
data/lib/aws-sdk-s3.rb CHANGED
@@ -73,6 +73,6 @@ require_relative 'aws-sdk-s3/event_streams'
73
73
  # @!group service
74
74
  module Aws::S3
75
75
 
76
- GEM_VERSION = '1.129.0'
76
+ GEM_VERSION = '1.131.0'
77
77
 
78
78
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aws-sdk-s3
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.129.0
4
+ version: 1.131.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Amazon Web Services
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-07-11 00:00:00.000000000 Z
11
+ date: 2023-07-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk-kms