aws-sdk-s3 1.114.0 → 1.136.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
 - data/CHANGELOG.md +163 -0
 - data/VERSION +1 -1
 - data/lib/aws-sdk-s3/bucket.rb +123 -61
 - data/lib/aws-sdk-s3/bucket_acl.rb +9 -3
 - data/lib/aws-sdk-s3/bucket_cors.rb +12 -4
 - data/lib/aws-sdk-s3/bucket_lifecycle.rb +12 -4
 - data/lib/aws-sdk-s3/bucket_lifecycle_configuration.rb +12 -4
 - data/lib/aws-sdk-s3/bucket_logging.rb +9 -3
 - data/lib/aws-sdk-s3/bucket_notification.rb +9 -3
 - data/lib/aws-sdk-s3/bucket_policy.rb +12 -4
 - data/lib/aws-sdk-s3/bucket_request_payment.rb +9 -3
 - data/lib/aws-sdk-s3/bucket_tagging.rb +12 -4
 - data/lib/aws-sdk-s3/bucket_versioning.rb +15 -5
 - data/lib/aws-sdk-s3/bucket_website.rb +12 -4
 - data/lib/aws-sdk-s3/client.rb +2084 -1724
 - data/lib/aws-sdk-s3/client_api.rb +213 -189
 - data/lib/aws-sdk-s3/customizations/bucket.rb +23 -47
 - data/lib/aws-sdk-s3/customizations/errors.rb +27 -0
 - data/lib/aws-sdk-s3/customizations/object.rb +95 -19
 - data/lib/aws-sdk-s3/customizations/types/permanent_redirect.rb +26 -0
 - data/lib/aws-sdk-s3/customizations.rb +2 -0
 - data/lib/aws-sdk-s3/encryption/client.rb +6 -2
 - data/lib/aws-sdk-s3/encryption/kms_cipher_provider.rb +13 -9
 - data/lib/aws-sdk-s3/encryptionV2/client.rb +6 -2
 - data/lib/aws-sdk-s3/encryptionV2/decrypt_handler.rb +1 -0
 - data/lib/aws-sdk-s3/encryptionV2/kms_cipher_provider.rb +10 -6
 - data/lib/aws-sdk-s3/endpoint_parameters.rb +146 -0
 - data/lib/aws-sdk-s3/endpoint_provider.rb +509 -0
 - data/lib/aws-sdk-s3/endpoints.rb +2150 -0
 - data/lib/aws-sdk-s3/file_downloader.rb +170 -44
 - data/lib/aws-sdk-s3/file_uploader.rb +8 -6
 - data/lib/aws-sdk-s3/multipart_stream_uploader.rb +41 -13
 - data/lib/aws-sdk-s3/multipart_upload.rb +27 -13
 - data/lib/aws-sdk-s3/multipart_upload_part.rb +20 -10
 - data/lib/aws-sdk-s3/object.rb +156 -110
 - data/lib/aws-sdk-s3/object_acl.rb +14 -6
 - data/lib/aws-sdk-s3/object_copier.rb +7 -5
 - data/lib/aws-sdk-s3/object_multipart_copier.rb +41 -19
 - data/lib/aws-sdk-s3/object_summary.rb +149 -94
 - data/lib/aws-sdk-s3/object_version.rb +55 -21
 - data/lib/aws-sdk-s3/plugins/accelerate.rb +3 -50
 - data/lib/aws-sdk-s3/plugins/arn.rb +0 -184
 - data/lib/aws-sdk-s3/plugins/bucket_dns.rb +3 -39
 - data/lib/aws-sdk-s3/plugins/bucket_name_restrictions.rb +1 -6
 - data/lib/aws-sdk-s3/plugins/dualstack.rb +1 -49
 - data/lib/aws-sdk-s3/plugins/endpoints.rb +262 -0
 - data/lib/aws-sdk-s3/plugins/expect_100_continue.rb +2 -1
 - data/lib/aws-sdk-s3/plugins/iad_regional_endpoint.rb +0 -29
 - data/lib/aws-sdk-s3/plugins/s3_signer.rb +32 -126
 - data/lib/aws-sdk-s3/presigned_post.rb +61 -59
 - data/lib/aws-sdk-s3/presigner.rb +24 -35
 - data/lib/aws-sdk-s3/resource.rb +7 -3
 - data/lib/aws-sdk-s3/types.rb +858 -4125
 - data/lib/aws-sdk-s3.rb +5 -1
 - metadata +12 -11
 - data/lib/aws-sdk-s3/arn/access_point_arn.rb +0 -69
 - data/lib/aws-sdk-s3/arn/multi_region_access_point_arn.rb +0 -68
 - data/lib/aws-sdk-s3/arn/object_lambda_arn.rb +0 -69
 - data/lib/aws-sdk-s3/arn/outpost_access_point_arn.rb +0 -74
 - data/lib/aws-sdk-s3/plugins/object_lambda_endpoint.rb +0 -25
 
    
        data/lib/aws-sdk-s3.rb
    CHANGED
    
    | 
         @@ -14,10 +14,14 @@ require 'aws-sdk-core' 
     | 
|
| 
       14 
14 
     | 
    
         | 
| 
       15 
15 
     | 
    
         
             
            require_relative 'aws-sdk-s3/types'
         
     | 
| 
       16 
16 
     | 
    
         
             
            require_relative 'aws-sdk-s3/client_api'
         
     | 
| 
      
 17 
     | 
    
         
            +
            require_relative 'aws-sdk-s3/plugins/endpoints.rb'
         
     | 
| 
       17 
18 
     | 
    
         
             
            require_relative 'aws-sdk-s3/client'
         
     | 
| 
       18 
19 
     | 
    
         
             
            require_relative 'aws-sdk-s3/errors'
         
     | 
| 
       19 
20 
     | 
    
         
             
            require_relative 'aws-sdk-s3/waiters'
         
     | 
| 
       20 
21 
     | 
    
         
             
            require_relative 'aws-sdk-s3/resource'
         
     | 
| 
      
 22 
     | 
    
         
            +
            require_relative 'aws-sdk-s3/endpoint_parameters'
         
     | 
| 
      
 23 
     | 
    
         
            +
            require_relative 'aws-sdk-s3/endpoint_provider'
         
     | 
| 
      
 24 
     | 
    
         
            +
            require_relative 'aws-sdk-s3/endpoints'
         
     | 
| 
       21 
25 
     | 
    
         
             
            require_relative 'aws-sdk-s3/bucket'
         
     | 
| 
       22 
26 
     | 
    
         
             
            require_relative 'aws-sdk-s3/bucket_acl'
         
     | 
| 
       23 
27 
     | 
    
         
             
            require_relative 'aws-sdk-s3/bucket_cors'
         
     | 
| 
         @@ -69,6 +73,6 @@ require_relative 'aws-sdk-s3/event_streams' 
     | 
|
| 
       69 
73 
     | 
    
         
             
            # @!group service
         
     | 
| 
       70 
74 
     | 
    
         
             
            module Aws::S3
         
     | 
| 
       71 
75 
     | 
    
         | 
| 
       72 
     | 
    
         
            -
              GEM_VERSION = '1. 
     | 
| 
      
 76 
     | 
    
         
            +
              GEM_VERSION = '1.136.0'
         
     | 
| 
       73 
77 
     | 
    
         | 
| 
       74 
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. 
     | 
| 
      
 4 
     | 
    
         
            +
              version: 1.136.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:  
     | 
| 
      
 11 
     | 
    
         
            +
            date: 2023-09-26 00:00:00.000000000 Z
         
     | 
| 
       12 
12 
     | 
    
         
             
            dependencies:
         
     | 
| 
       13 
13 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       14 
14 
     | 
    
         
             
              name: aws-sdk-kms
         
     | 
| 
         @@ -30,14 +30,14 @@ dependencies: 
     | 
|
| 
       30 
30 
     | 
    
         
             
                requirements:
         
     | 
| 
       31 
31 
     | 
    
         
             
                - - "~>"
         
     | 
| 
       32 
32 
     | 
    
         
             
                  - !ruby/object:Gem::Version
         
     | 
| 
       33 
     | 
    
         
            -
                    version: '1. 
     | 
| 
      
 33 
     | 
    
         
            +
                    version: '1.6'
         
     | 
| 
       34 
34 
     | 
    
         
             
              type: :runtime
         
     | 
| 
       35 
35 
     | 
    
         
             
              prerelease: false
         
     | 
| 
       36 
36 
     | 
    
         
             
              version_requirements: !ruby/object:Gem::Requirement
         
     | 
| 
       37 
37 
     | 
    
         
             
                requirements:
         
     | 
| 
       38 
38 
     | 
    
         
             
                - - "~>"
         
     | 
| 
       39 
39 
     | 
    
         
             
                  - !ruby/object:Gem::Version
         
     | 
| 
       40 
     | 
    
         
            -
                    version: '1. 
     | 
| 
      
 40 
     | 
    
         
            +
                    version: '1.6'
         
     | 
| 
       41 
41 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       42 
42 
     | 
    
         
             
              name: aws-sdk-core
         
     | 
| 
       43 
43 
     | 
    
         
             
              requirement: !ruby/object:Gem::Requirement
         
     | 
| 
         @@ -47,7 +47,7 @@ dependencies: 
     | 
|
| 
       47 
47 
     | 
    
         
             
                    version: '3'
         
     | 
| 
       48 
48 
     | 
    
         
             
                - - ">="
         
     | 
| 
       49 
49 
     | 
    
         
             
                  - !ruby/object:Gem::Version
         
     | 
| 
       50 
     | 
    
         
            -
                    version: 3. 
     | 
| 
      
 50 
     | 
    
         
            +
                    version: 3.181.0
         
     | 
| 
       51 
51 
     | 
    
         
             
              type: :runtime
         
     | 
| 
       52 
52 
     | 
    
         
             
              prerelease: false
         
     | 
| 
       53 
53 
     | 
    
         
             
              version_requirements: !ruby/object:Gem::Requirement
         
     | 
| 
         @@ -57,7 +57,7 @@ dependencies: 
     | 
|
| 
       57 
57 
     | 
    
         
             
                    version: '3'
         
     | 
| 
       58 
58 
     | 
    
         
             
                - - ">="
         
     | 
| 
       59 
59 
     | 
    
         
             
                  - !ruby/object:Gem::Version
         
     | 
| 
       60 
     | 
    
         
            -
                    version: 3. 
     | 
| 
      
 60 
     | 
    
         
            +
                    version: 3.181.0
         
     | 
| 
       61 
61 
     | 
    
         
             
            description: Official AWS Ruby gem for Amazon Simple Storage Service (Amazon S3).
         
     | 
| 
       62 
62 
     | 
    
         
             
              This gem is part of the AWS SDK for Ruby.
         
     | 
| 
       63 
63 
     | 
    
         
             
            email:
         
     | 
| 
         @@ -70,10 +70,6 @@ files: 
     | 
|
| 
       70 
70 
     | 
    
         
             
            - LICENSE.txt
         
     | 
| 
       71 
71 
     | 
    
         
             
            - VERSION
         
     | 
| 
       72 
72 
     | 
    
         
             
            - lib/aws-sdk-s3.rb
         
     | 
| 
       73 
     | 
    
         
            -
            - lib/aws-sdk-s3/arn/access_point_arn.rb
         
     | 
| 
       74 
     | 
    
         
            -
            - lib/aws-sdk-s3/arn/multi_region_access_point_arn.rb
         
     | 
| 
       75 
     | 
    
         
            -
            - lib/aws-sdk-s3/arn/object_lambda_arn.rb
         
     | 
| 
       76 
     | 
    
         
            -
            - lib/aws-sdk-s3/arn/outpost_access_point_arn.rb
         
     | 
| 
       77 
73 
     | 
    
         
             
            - lib/aws-sdk-s3/bucket.rb
         
     | 
| 
       78 
74 
     | 
    
         
             
            - lib/aws-sdk-s3/bucket_acl.rb
         
     | 
| 
       79 
75 
     | 
    
         
             
            - lib/aws-sdk-s3/bucket_cors.rb
         
     | 
| 
         @@ -91,10 +87,12 @@ files: 
     | 
|
| 
       91 
87 
     | 
    
         
             
            - lib/aws-sdk-s3/client_api.rb
         
     | 
| 
       92 
88 
     | 
    
         
             
            - lib/aws-sdk-s3/customizations.rb
         
     | 
| 
       93 
89 
     | 
    
         
             
            - lib/aws-sdk-s3/customizations/bucket.rb
         
     | 
| 
      
 90 
     | 
    
         
            +
            - lib/aws-sdk-s3/customizations/errors.rb
         
     | 
| 
       94 
91 
     | 
    
         
             
            - lib/aws-sdk-s3/customizations/multipart_upload.rb
         
     | 
| 
       95 
92 
     | 
    
         
             
            - lib/aws-sdk-s3/customizations/object.rb
         
     | 
| 
       96 
93 
     | 
    
         
             
            - lib/aws-sdk-s3/customizations/object_summary.rb
         
     | 
| 
       97 
94 
     | 
    
         
             
            - lib/aws-sdk-s3/customizations/types/list_object_versions_output.rb
         
     | 
| 
      
 95 
     | 
    
         
            +
            - lib/aws-sdk-s3/customizations/types/permanent_redirect.rb
         
     | 
| 
       98 
96 
     | 
    
         
             
            - lib/aws-sdk-s3/encryption.rb
         
     | 
| 
       99 
97 
     | 
    
         
             
            - lib/aws-sdk-s3/encryption/client.rb
         
     | 
| 
       100 
98 
     | 
    
         
             
            - lib/aws-sdk-s3/encryption/decrypt_handler.rb
         
     | 
| 
         @@ -123,6 +121,9 @@ files: 
     | 
|
| 
       123 
121 
     | 
    
         
             
            - lib/aws-sdk-s3/encryptionV2/materials.rb
         
     | 
| 
       124 
122 
     | 
    
         
             
            - lib/aws-sdk-s3/encryptionV2/utils.rb
         
     | 
| 
       125 
123 
     | 
    
         
             
            - lib/aws-sdk-s3/encryption_v2.rb
         
     | 
| 
      
 124 
     | 
    
         
            +
            - lib/aws-sdk-s3/endpoint_parameters.rb
         
     | 
| 
      
 125 
     | 
    
         
            +
            - lib/aws-sdk-s3/endpoint_provider.rb
         
     | 
| 
      
 126 
     | 
    
         
            +
            - lib/aws-sdk-s3/endpoints.rb
         
     | 
| 
       126 
127 
     | 
    
         
             
            - lib/aws-sdk-s3/errors.rb
         
     | 
| 
       127 
128 
     | 
    
         
             
            - lib/aws-sdk-s3/event_streams.rb
         
     | 
| 
       128 
129 
     | 
    
         
             
            - lib/aws-sdk-s3/file_downloader.rb
         
     | 
| 
         @@ -145,13 +146,13 @@ files: 
     | 
|
| 
       145 
146 
     | 
    
         
             
            - lib/aws-sdk-s3/plugins/bucket_dns.rb
         
     | 
| 
       146 
147 
     | 
    
         
             
            - lib/aws-sdk-s3/plugins/bucket_name_restrictions.rb
         
     | 
| 
       147 
148 
     | 
    
         
             
            - lib/aws-sdk-s3/plugins/dualstack.rb
         
     | 
| 
      
 149 
     | 
    
         
            +
            - lib/aws-sdk-s3/plugins/endpoints.rb
         
     | 
| 
       148 
150 
     | 
    
         
             
            - lib/aws-sdk-s3/plugins/expect_100_continue.rb
         
     | 
| 
       149 
151 
     | 
    
         
             
            - lib/aws-sdk-s3/plugins/get_bucket_location_fix.rb
         
     | 
| 
       150 
152 
     | 
    
         
             
            - lib/aws-sdk-s3/plugins/http_200_errors.rb
         
     | 
| 
       151 
153 
     | 
    
         
             
            - lib/aws-sdk-s3/plugins/iad_regional_endpoint.rb
         
     | 
| 
       152 
154 
     | 
    
         
             
            - lib/aws-sdk-s3/plugins/location_constraint.rb
         
     | 
| 
       153 
155 
     | 
    
         
             
            - lib/aws-sdk-s3/plugins/md5s.rb
         
     | 
| 
       154 
     | 
    
         
            -
            - lib/aws-sdk-s3/plugins/object_lambda_endpoint.rb
         
     | 
| 
       155 
156 
     | 
    
         
             
            - lib/aws-sdk-s3/plugins/redirects.rb
         
     | 
| 
       156 
157 
     | 
    
         
             
            - lib/aws-sdk-s3/plugins/s3_host_id.rb
         
     | 
| 
       157 
158 
     | 
    
         
             
            - lib/aws-sdk-s3/plugins/s3_signer.rb
         
     | 
| 
         @@ -1,69 +0,0 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            # frozen_string_literal: true
         
     | 
| 
       2 
     | 
    
         
            -
             
     | 
| 
       3 
     | 
    
         
            -
            module Aws
         
     | 
| 
       4 
     | 
    
         
            -
              module S3
         
     | 
| 
       5 
     | 
    
         
            -
                # @api private
         
     | 
| 
       6 
     | 
    
         
            -
                class AccessPointARN < Aws::ARN
         
     | 
| 
       7 
     | 
    
         
            -
                  def initialize(options)
         
     | 
| 
       8 
     | 
    
         
            -
                    super(options)
         
     | 
| 
       9 
     | 
    
         
            -
                    @type, @access_point_name, @extra = @resource.split(/[:,\/]/)
         
     | 
| 
       10 
     | 
    
         
            -
                  end
         
     | 
| 
       11 
     | 
    
         
            -
             
     | 
| 
       12 
     | 
    
         
            -
                  def support_dualstack?
         
     | 
| 
       13 
     | 
    
         
            -
                    true
         
     | 
| 
       14 
     | 
    
         
            -
                  end
         
     | 
| 
       15 
     | 
    
         
            -
             
     | 
| 
       16 
     | 
    
         
            -
                  def support_fips?
         
     | 
| 
       17 
     | 
    
         
            -
                    true
         
     | 
| 
       18 
     | 
    
         
            -
                  end
         
     | 
| 
       19 
     | 
    
         
            -
             
     | 
| 
       20 
     | 
    
         
            -
                  def validate_arn!
         
     | 
| 
       21 
     | 
    
         
            -
                    unless @service == 's3'
         
     | 
| 
       22 
     | 
    
         
            -
                      raise ArgumentError, 'Must provide a valid S3 Access Point ARN.'
         
     | 
| 
       23 
     | 
    
         
            -
                    end
         
     | 
| 
       24 
     | 
    
         
            -
             
     | 
| 
       25 
     | 
    
         
            -
                    if @region.empty? || @account_id.empty?
         
     | 
| 
       26 
     | 
    
         
            -
                      raise ArgumentError,
         
     | 
| 
       27 
     | 
    
         
            -
                            'S3 Access Point ARNs must contain both a region '\
         
     | 
| 
       28 
     | 
    
         
            -
                            'and an account ID.'
         
     | 
| 
       29 
     | 
    
         
            -
                    end
         
     | 
| 
       30 
     | 
    
         
            -
             
     | 
| 
       31 
     | 
    
         
            -
                    if @region.include?('-fips') || @region.include?('fips-')
         
     | 
| 
       32 
     | 
    
         
            -
                      raise ArgumentError,
         
     | 
| 
       33 
     | 
    
         
            -
                            'S3 Access Point ARNs cannot contain a FIPS region.'
         
     | 
| 
       34 
     | 
    
         
            -
                    end
         
     | 
| 
       35 
     | 
    
         
            -
             
     | 
| 
       36 
     | 
    
         
            -
                    if @type != 'accesspoint'
         
     | 
| 
       37 
     | 
    
         
            -
                      raise ArgumentError, 'Invalid ARN, resource format is not correct.'
         
     | 
| 
       38 
     | 
    
         
            -
                    end
         
     | 
| 
       39 
     | 
    
         
            -
             
     | 
| 
       40 
     | 
    
         
            -
                    if @access_point_name.nil? || @access_point_name.empty?
         
     | 
| 
       41 
     | 
    
         
            -
                      raise ArgumentError, 'Missing ARN Access Point name.'
         
     | 
| 
       42 
     | 
    
         
            -
                    end
         
     | 
| 
       43 
     | 
    
         
            -
             
     | 
| 
       44 
     | 
    
         
            -
                    if @extra
         
     | 
| 
       45 
     | 
    
         
            -
                      raise ArgumentError,
         
     | 
| 
       46 
     | 
    
         
            -
                            'ARN Access Point resource must be a single value.'
         
     | 
| 
       47 
     | 
    
         
            -
                    end
         
     | 
| 
       48 
     | 
    
         
            -
             
     | 
| 
       49 
     | 
    
         
            -
                    unless Seahorse::Util.host_label?(
         
     | 
| 
       50 
     | 
    
         
            -
                      "#{@access_point_name}-#{@account_id}"
         
     | 
| 
       51 
     | 
    
         
            -
                    )
         
     | 
| 
       52 
     | 
    
         
            -
                      raise ArgumentError,
         
     | 
| 
       53 
     | 
    
         
            -
                            "#{@access_point_name}-#{@account_id} is not a valid "\
         
     | 
| 
       54 
     | 
    
         
            -
                            'host label.'
         
     | 
| 
       55 
     | 
    
         
            -
                    end
         
     | 
| 
       56 
     | 
    
         
            -
                  end
         
     | 
| 
       57 
     | 
    
         
            -
             
     | 
| 
       58 
     | 
    
         
            -
                  def host_url(region, fips = false, dualstack = false, custom_endpoint = nil)
         
     | 
| 
       59 
     | 
    
         
            -
                    pfx = "#{@access_point_name}-#{@account_id}"
         
     | 
| 
       60 
     | 
    
         
            -
                    if custom_endpoint
         
     | 
| 
       61 
     | 
    
         
            -
                      "#{pfx}.#{custom_endpoint}"
         
     | 
| 
       62 
     | 
    
         
            -
                    else
         
     | 
| 
       63 
     | 
    
         
            -
                      sfx = Aws::Partitions::EndpointProvider.dns_suffix_for(region, 's3')
         
     | 
| 
       64 
     | 
    
         
            -
                      "#{pfx}.s3-accesspoint#{'-fips' if fips}#{'.dualstack' if dualstack}.#{region}.#{sfx}"
         
     | 
| 
       65 
     | 
    
         
            -
                    end
         
     | 
| 
       66 
     | 
    
         
            -
                  end
         
     | 
| 
       67 
     | 
    
         
            -
                end
         
     | 
| 
       68 
     | 
    
         
            -
              end
         
     | 
| 
       69 
     | 
    
         
            -
            end
         
     | 
| 
         @@ -1,68 +0,0 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            # frozen_string_literal: true
         
     | 
| 
       2 
     | 
    
         
            -
             
     | 
| 
       3 
     | 
    
         
            -
            module Aws
         
     | 
| 
       4 
     | 
    
         
            -
              module S3
         
     | 
| 
       5 
     | 
    
         
            -
                # @api private
         
     | 
| 
       6 
     | 
    
         
            -
                class MultiRegionAccessPointARN < Aws::ARN
         
     | 
| 
       7 
     | 
    
         
            -
                  def initialize(options)
         
     | 
| 
       8 
     | 
    
         
            -
                    super(options)
         
     | 
| 
       9 
     | 
    
         
            -
                    @type, @mrap_alias, @extra = @resource.split(/[:,\/]/)
         
     | 
| 
       10 
     | 
    
         
            -
                  end
         
     | 
| 
       11 
     | 
    
         
            -
             
     | 
| 
       12 
     | 
    
         
            -
                  attr_reader :mrap_alias
         
     | 
| 
       13 
     | 
    
         
            -
             
     | 
| 
       14 
     | 
    
         
            -
                  def support_dualstack?
         
     | 
| 
       15 
     | 
    
         
            -
                    false
         
     | 
| 
       16 
     | 
    
         
            -
                  end
         
     | 
| 
       17 
     | 
    
         
            -
             
     | 
| 
       18 
     | 
    
         
            -
                  def support_fips?
         
     | 
| 
       19 
     | 
    
         
            -
                    false
         
     | 
| 
       20 
     | 
    
         
            -
                  end
         
     | 
| 
       21 
     | 
    
         
            -
             
     | 
| 
       22 
     | 
    
         
            -
                  def validate_arn!
         
     | 
| 
       23 
     | 
    
         
            -
                    unless @service == 's3'
         
     | 
| 
       24 
     | 
    
         
            -
                      raise ArgumentError,
         
     | 
| 
       25 
     | 
    
         
            -
                            'Must provide a valid S3 multi-region access point ARN.'
         
     | 
| 
       26 
     | 
    
         
            -
                    end
         
     | 
| 
       27 
     | 
    
         
            -
             
     | 
| 
       28 
     | 
    
         
            -
                    if @account_id.empty?
         
     | 
| 
       29 
     | 
    
         
            -
                      raise ArgumentError,
         
     | 
| 
       30 
     | 
    
         
            -
                            'S3 multi-region access point ARNs must contain '\
         
     | 
| 
       31 
     | 
    
         
            -
                            'an account id.'
         
     | 
| 
       32 
     | 
    
         
            -
                    end
         
     | 
| 
       33 
     | 
    
         
            -
             
     | 
| 
       34 
     | 
    
         
            -
                    unless @region.empty?
         
     | 
| 
       35 
     | 
    
         
            -
                      raise ArgumentError,
         
     | 
| 
       36 
     | 
    
         
            -
                            'Multi-region access points must have an empty region.'
         
     | 
| 
       37 
     | 
    
         
            -
                    end
         
     | 
| 
       38 
     | 
    
         
            -
             
     | 
| 
       39 
     | 
    
         
            -
                    if @type != 'accesspoint'
         
     | 
| 
       40 
     | 
    
         
            -
                      raise ArgumentError, 'Invalid ARN, resource format is not correct'
         
     | 
| 
       41 
     | 
    
         
            -
                    end
         
     | 
| 
       42 
     | 
    
         
            -
             
     | 
| 
       43 
     | 
    
         
            -
                    if @mrap_alias.nil? || @mrap_alias.empty?
         
     | 
| 
       44 
     | 
    
         
            -
                      raise ArgumentError, 'Missing ARN multi-region access points alias.'
         
     | 
| 
       45 
     | 
    
         
            -
                    end
         
     | 
| 
       46 
     | 
    
         
            -
             
     | 
| 
       47 
     | 
    
         
            -
                    unless @mrap_alias.split('.').all? { |s| Seahorse::Util.host_label?(s) }
         
     | 
| 
       48 
     | 
    
         
            -
                      raise ArgumentError, "#{@mrap_alias} is not a valid "\
         
     | 
| 
       49 
     | 
    
         
            -
                            'multi region access point alias.'
         
     | 
| 
       50 
     | 
    
         
            -
                    end
         
     | 
| 
       51 
     | 
    
         
            -
             
     | 
| 
       52 
     | 
    
         
            -
                    if @extra
         
     | 
| 
       53 
     | 
    
         
            -
                      raise ArgumentError,
         
     | 
| 
       54 
     | 
    
         
            -
                            'ARN access point resource must be a single value.'
         
     | 
| 
       55 
     | 
    
         
            -
                    end
         
     | 
| 
       56 
     | 
    
         
            -
                  end
         
     | 
| 
       57 
     | 
    
         
            -
             
     | 
| 
       58 
     | 
    
         
            -
                  def host_url(_region, _fips = false, _dualstack = false, custom_endpoint = nil)
         
     | 
| 
       59 
     | 
    
         
            -
                    if custom_endpoint
         
     | 
| 
       60 
     | 
    
         
            -
                      "#{@mrap_alias}.#{custom_endpoint}"
         
     | 
| 
       61 
     | 
    
         
            -
                    else
         
     | 
| 
       62 
     | 
    
         
            -
                      sfx = Aws::Partitions::EndpointProvider.dns_suffix_for(@partition, 's3')
         
     | 
| 
       63 
     | 
    
         
            -
                      "#{@mrap_alias}.accesspoint.s3-global.#{sfx}"
         
     | 
| 
       64 
     | 
    
         
            -
                    end
         
     | 
| 
       65 
     | 
    
         
            -
                  end
         
     | 
| 
       66 
     | 
    
         
            -
                end
         
     | 
| 
       67 
     | 
    
         
            -
              end
         
     | 
| 
       68 
     | 
    
         
            -
            end
         
     | 
| 
         @@ -1,69 +0,0 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            # frozen_string_literal: true
         
     | 
| 
       2 
     | 
    
         
            -
             
     | 
| 
       3 
     | 
    
         
            -
            module Aws
         
     | 
| 
       4 
     | 
    
         
            -
              module S3
         
     | 
| 
       5 
     | 
    
         
            -
                # @api private
         
     | 
| 
       6 
     | 
    
         
            -
                class ObjectLambdaARN < Aws::ARN
         
     | 
| 
       7 
     | 
    
         
            -
                  def initialize(options)
         
     | 
| 
       8 
     | 
    
         
            -
                    super(options)
         
     | 
| 
       9 
     | 
    
         
            -
                    @type, @access_point_name, @extra = @resource.split(/[:,\/]/)
         
     | 
| 
       10 
     | 
    
         
            -
                  end
         
     | 
| 
       11 
     | 
    
         
            -
             
     | 
| 
       12 
     | 
    
         
            -
                  def support_dualstack?
         
     | 
| 
       13 
     | 
    
         
            -
                    false
         
     | 
| 
       14 
     | 
    
         
            -
                  end
         
     | 
| 
       15 
     | 
    
         
            -
             
     | 
| 
       16 
     | 
    
         
            -
                  def support_fips?
         
     | 
| 
       17 
     | 
    
         
            -
                    true
         
     | 
| 
       18 
     | 
    
         
            -
                  end
         
     | 
| 
       19 
     | 
    
         
            -
             
     | 
| 
       20 
     | 
    
         
            -
                  def validate_arn!
         
     | 
| 
       21 
     | 
    
         
            -
                    unless @service == 's3-object-lambda'
         
     | 
| 
       22 
     | 
    
         
            -
                      raise ArgumentError, 'Must provide a valid S3 Object Lambda ARN.'
         
     | 
| 
       23 
     | 
    
         
            -
                    end
         
     | 
| 
       24 
     | 
    
         
            -
             
     | 
| 
       25 
     | 
    
         
            -
                    if @region.empty? || @account_id.empty?
         
     | 
| 
       26 
     | 
    
         
            -
                      raise ArgumentError,
         
     | 
| 
       27 
     | 
    
         
            -
                            'S3 Object Lambdas ARNs must contain both a region '\
         
     | 
| 
       28 
     | 
    
         
            -
                            'and an account ID.'
         
     | 
| 
       29 
     | 
    
         
            -
                    end
         
     | 
| 
       30 
     | 
    
         
            -
             
     | 
| 
       31 
     | 
    
         
            -
                    if @region.include?('-fips') || @region.include?('fips-')
         
     | 
| 
       32 
     | 
    
         
            -
                      raise ArgumentError,
         
     | 
| 
       33 
     | 
    
         
            -
                            'S3 Object Lambda ARNs cannot contain a FIPS region'
         
     | 
| 
       34 
     | 
    
         
            -
                    end
         
     | 
| 
       35 
     | 
    
         
            -
             
     | 
| 
       36 
     | 
    
         
            -
                    if @type != 'accesspoint'
         
     | 
| 
       37 
     | 
    
         
            -
                      raise ArgumentError, 'Invalid ARN, resource format is not correct.'
         
     | 
| 
       38 
     | 
    
         
            -
                    end
         
     | 
| 
       39 
     | 
    
         
            -
             
     | 
| 
       40 
     | 
    
         
            -
                    if @access_point_name.nil? || @access_point_name.empty?
         
     | 
| 
       41 
     | 
    
         
            -
                      raise ArgumentError, 'Missing ARN Access Point name.'
         
     | 
| 
       42 
     | 
    
         
            -
                    end
         
     | 
| 
       43 
     | 
    
         
            -
             
     | 
| 
       44 
     | 
    
         
            -
                    if @extra
         
     | 
| 
       45 
     | 
    
         
            -
                      raise ArgumentError,
         
     | 
| 
       46 
     | 
    
         
            -
                            'ARN Access Point resource must be a single value.'
         
     | 
| 
       47 
     | 
    
         
            -
                    end
         
     | 
| 
       48 
     | 
    
         
            -
             
     | 
| 
       49 
     | 
    
         
            -
                    unless Seahorse::Util.host_label?(
         
     | 
| 
       50 
     | 
    
         
            -
                      "#{@access_point_name}-#{@account_id}"
         
     | 
| 
       51 
     | 
    
         
            -
                    )
         
     | 
| 
       52 
     | 
    
         
            -
                      raise ArgumentError,
         
     | 
| 
       53 
     | 
    
         
            -
                            "#{@access_point_name}-#{@account_id} is not a valid "\
         
     | 
| 
       54 
     | 
    
         
            -
                            'host label.'
         
     | 
| 
       55 
     | 
    
         
            -
                    end
         
     | 
| 
       56 
     | 
    
         
            -
                  end
         
     | 
| 
       57 
     | 
    
         
            -
             
     | 
| 
       58 
     | 
    
         
            -
                  def host_url(region, fips = false, _dualstack = false, custom_endpoint = nil)
         
     | 
| 
       59 
     | 
    
         
            -
                    pfx = "#{@access_point_name}-#{@account_id}"
         
     | 
| 
       60 
     | 
    
         
            -
                    if custom_endpoint
         
     | 
| 
       61 
     | 
    
         
            -
                      "#{pfx}.#{custom_endpoint}"
         
     | 
| 
       62 
     | 
    
         
            -
                    else
         
     | 
| 
       63 
     | 
    
         
            -
                      sfx = Aws::Partitions::EndpointProvider.dns_suffix_for(region, 's3')
         
     | 
| 
       64 
     | 
    
         
            -
                      "#{pfx}.s3-object-lambda#{'-fips' if fips}.#{region}.#{sfx}"
         
     | 
| 
       65 
     | 
    
         
            -
                    end
         
     | 
| 
       66 
     | 
    
         
            -
                  end
         
     | 
| 
       67 
     | 
    
         
            -
                end
         
     | 
| 
       68 
     | 
    
         
            -
              end
         
     | 
| 
       69 
     | 
    
         
            -
            end
         
     | 
| 
         @@ -1,74 +0,0 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            # frozen_string_literal: true
         
     | 
| 
       2 
     | 
    
         
            -
             
     | 
| 
       3 
     | 
    
         
            -
            module Aws
         
     | 
| 
       4 
     | 
    
         
            -
              module S3
         
     | 
| 
       5 
     | 
    
         
            -
                # @api private
         
     | 
| 
       6 
     | 
    
         
            -
                class OutpostAccessPointARN < Aws::ARN
         
     | 
| 
       7 
     | 
    
         
            -
                  def initialize(options)
         
     | 
| 
       8 
     | 
    
         
            -
                    super(options)
         
     | 
| 
       9 
     | 
    
         
            -
                    @type, @outpost_id, @subtype, @access_point_name, @extra =
         
     | 
| 
       10 
     | 
    
         
            -
                      @resource.split(/[:,\/]/)
         
     | 
| 
       11 
     | 
    
         
            -
                  end
         
     | 
| 
       12 
     | 
    
         
            -
             
     | 
| 
       13 
     | 
    
         
            -
                  def support_dualstack?
         
     | 
| 
       14 
     | 
    
         
            -
                    false
         
     | 
| 
       15 
     | 
    
         
            -
                  end
         
     | 
| 
       16 
     | 
    
         
            -
             
     | 
| 
       17 
     | 
    
         
            -
                  def support_fips?
         
     | 
| 
       18 
     | 
    
         
            -
                    false
         
     | 
| 
       19 
     | 
    
         
            -
                  end
         
     | 
| 
       20 
     | 
    
         
            -
             
     | 
| 
       21 
     | 
    
         
            -
                  def validate_arn!
         
     | 
| 
       22 
     | 
    
         
            -
                    unless @service == 's3-outposts'
         
     | 
| 
       23 
     | 
    
         
            -
                      raise ArgumentError, 'Must provide a valid S3 Outpost Access '\
         
     | 
| 
       24 
     | 
    
         
            -
                                           'Point ARN.'
         
     | 
| 
       25 
     | 
    
         
            -
                    end
         
     | 
| 
       26 
     | 
    
         
            -
             
     | 
| 
       27 
     | 
    
         
            -
                    if @region.empty? || @account_id.empty?
         
     | 
| 
       28 
     | 
    
         
            -
                      raise ArgumentError,
         
     | 
| 
       29 
     | 
    
         
            -
                            'S3 Outpost Access Point ARNs must contain both a region '\
         
     | 
| 
       30 
     | 
    
         
            -
                            'and an account ID.'
         
     | 
| 
       31 
     | 
    
         
            -
                    end
         
     | 
| 
       32 
     | 
    
         
            -
             
     | 
| 
       33 
     | 
    
         
            -
                    if @type != 'outpost' && @subtype != 'accesspoint'
         
     | 
| 
       34 
     | 
    
         
            -
                      raise ArgumentError, 'Invalid ARN, resource format is not correct.'
         
     | 
| 
       35 
     | 
    
         
            -
                    end
         
     | 
| 
       36 
     | 
    
         
            -
             
     | 
| 
       37 
     | 
    
         
            -
                    if @outpost_id.nil? || @outpost_id.empty?
         
     | 
| 
       38 
     | 
    
         
            -
                      raise ArgumentError, 'Missing ARN Outpost ID.'
         
     | 
| 
       39 
     | 
    
         
            -
                    end
         
     | 
| 
       40 
     | 
    
         
            -
             
     | 
| 
       41 
     | 
    
         
            -
                    if @access_point_name.nil? || @access_point_name.empty?
         
     | 
| 
       42 
     | 
    
         
            -
                      raise ArgumentError, 'Missing ARN Access Point name.'
         
     | 
| 
       43 
     | 
    
         
            -
                    end
         
     | 
| 
       44 
     | 
    
         
            -
             
     | 
| 
       45 
     | 
    
         
            -
                    if @extra
         
     | 
| 
       46 
     | 
    
         
            -
                      raise ArgumentError,
         
     | 
| 
       47 
     | 
    
         
            -
                            'ARN Access Point resource must be a single value.'
         
     | 
| 
       48 
     | 
    
         
            -
                    end
         
     | 
| 
       49 
     | 
    
         
            -
             
     | 
| 
       50 
     | 
    
         
            -
                    unless Seahorse::Util.host_label?(
         
     | 
| 
       51 
     | 
    
         
            -
                      "#{@access_point_name}-#{@account_id}"
         
     | 
| 
       52 
     | 
    
         
            -
                    )
         
     | 
| 
       53 
     | 
    
         
            -
                      raise ArgumentError,
         
     | 
| 
       54 
     | 
    
         
            -
                            "#{@access_point_name}-#{@account_id} is not a valid "\
         
     | 
| 
       55 
     | 
    
         
            -
                            'host label.'
         
     | 
| 
       56 
     | 
    
         
            -
                    end
         
     | 
| 
       57 
     | 
    
         
            -
             
     | 
| 
       58 
     | 
    
         
            -
                    unless Seahorse::Util.host_label?(@outpost_id)
         
     | 
| 
       59 
     | 
    
         
            -
                      raise ArgumentError, "#{@outpost_id} is not a valid host label."
         
     | 
| 
       60 
     | 
    
         
            -
                    end
         
     | 
| 
       61 
     | 
    
         
            -
                  end
         
     | 
| 
       62 
     | 
    
         
            -
             
     | 
| 
       63 
     | 
    
         
            -
                  # Outpost ARNs currently do not support dualstack
         
     | 
| 
       64 
     | 
    
         
            -
                  def host_url(region, _fips = false, _dualstack = false, custom_endpoint = nil)
         
     | 
| 
       65 
     | 
    
         
            -
                    pfx = "#{@access_point_name}-#{@account_id}.#{@outpost_id}"
         
     | 
| 
       66 
     | 
    
         
            -
                    if custom_endpoint
         
     | 
| 
       67 
     | 
    
         
            -
                      "#{pfx}.#{custom_endpoint}"
         
     | 
| 
       68 
     | 
    
         
            -
                    else
         
     | 
| 
       69 
     | 
    
         
            -
                      "#{pfx}.s3-outposts.#{region}.amazonaws.com"
         
     | 
| 
       70 
     | 
    
         
            -
                    end
         
     | 
| 
       71 
     | 
    
         
            -
                  end
         
     | 
| 
       72 
     | 
    
         
            -
                end
         
     | 
| 
       73 
     | 
    
         
            -
              end
         
     | 
| 
       74 
     | 
    
         
            -
            end
         
     | 
| 
         @@ -1,25 +0,0 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            # frozen_string_literal: true
         
     | 
| 
       2 
     | 
    
         
            -
             
     | 
| 
       3 
     | 
    
         
            -
            module Aws
         
     | 
| 
       4 
     | 
    
         
            -
              module S3
         
     | 
| 
       5 
     | 
    
         
            -
                module Plugins
         
     | 
| 
       6 
     | 
    
         
            -
                  # WriteGetObjectResponse is called from Lambda after a data transform.
         
     | 
| 
       7 
     | 
    
         
            -
                  # If there is no custom endpoint, we change the endpoint from s3 to
         
     | 
| 
       8 
     | 
    
         
            -
                  # s3-object-lambda just for this operation.
         
     | 
| 
       9 
     | 
    
         
            -
                  class ObjectLambdaEndpoint < Seahorse::Client::Plugin
         
     | 
| 
       10 
     | 
    
         
            -
                    class Handler < Seahorse::Client::Handler
         
     | 
| 
       11 
     | 
    
         
            -
                      def call(context)
         
     | 
| 
       12 
     | 
    
         
            -
                        if context.config.regional_endpoint
         
     | 
| 
       13 
     | 
    
         
            -
                          host = context.http_request.endpoint.host
         
     | 
| 
       14 
     | 
    
         
            -
                          host = host.sub('s3.', 's3-object-lambda.')
         
     | 
| 
       15 
     | 
    
         
            -
                          context.http_request.endpoint.host = host
         
     | 
| 
       16 
     | 
    
         
            -
                        end
         
     | 
| 
       17 
     | 
    
         
            -
                        @handler.call(context)
         
     | 
| 
       18 
     | 
    
         
            -
                      end
         
     | 
| 
       19 
     | 
    
         
            -
                    end
         
     | 
| 
       20 
     | 
    
         
            -
             
     | 
| 
       21 
     | 
    
         
            -
                    handler(Handler, operations: [:write_get_object_response])
         
     | 
| 
       22 
     | 
    
         
            -
                  end
         
     | 
| 
       23 
     | 
    
         
            -
                end
         
     | 
| 
       24 
     | 
    
         
            -
              end
         
     | 
| 
       25 
     | 
    
         
            -
            end
         
     |