aws-sdk-ec2 1.341.0 → 1.343.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 +10 -0
 - data/VERSION +1 -1
 - data/lib/aws-sdk-ec2/client.rb +55 -8
 - data/lib/aws-sdk-ec2/client_api.rb +5 -0
 - data/lib/aws-sdk-ec2/endpoint_parameters.rb +66 -0
 - data/lib/aws-sdk-ec2/endpoint_provider.rb +116 -0
 - data/lib/aws-sdk-ec2/endpoints.rb +7603 -0
 - data/lib/aws-sdk-ec2/plugins/copy_encrypted_snapshot.rb +17 -12
 - data/lib/aws-sdk-ec2/plugins/endpoints.rb +1152 -0
 - data/lib/aws-sdk-ec2/types.rb +46 -4
 - data/lib/aws-sdk-ec2.rb +5 -1
 - metadata +8 -4
 
| 
         @@ -21,6 +21,10 @@ module Aws 
     | 
|
| 
       21 
21 
     | 
    
         | 
| 
       22 
22 
     | 
    
         
             
                      def call(context)
         
     | 
| 
       23 
23 
     | 
    
         
             
                        params = context.params
         
     | 
| 
      
 24 
     | 
    
         
            +
                        unless params[:source_region]
         
     | 
| 
      
 25 
     | 
    
         
            +
                          raise ArgumentError,
         
     | 
| 
      
 26 
     | 
    
         
            +
                                'Source region is required for copy_snapshot'
         
     | 
| 
      
 27 
     | 
    
         
            +
                        end
         
     | 
| 
       24 
28 
     | 
    
         
             
                        params[:destination_region] = context.config.region
         
     | 
| 
       25 
29 
     | 
    
         
             
                        params[:presigned_url] = presigned_url(context, params)
         
     | 
| 
       26 
30 
     | 
    
         
             
                        @handler.call(context)
         
     | 
| 
         @@ -33,25 +37,26 @@ module Aws 
     | 
|
| 
       33 
37 
     | 
    
         
             
                        param_list.set('Action', 'CopySnapshot')
         
     | 
| 
       34 
38 
     | 
    
         
             
                        param_list.set('DestinationRegion', context.config.region)
         
     | 
| 
       35 
39 
     | 
    
         
             
                        param_list.set('Version', context.config.api.version)
         
     | 
| 
       36 
     | 
    
         
            -
                        Aws::Query::EC2ParamBuilder.new(param_list).apply( 
     | 
| 
      
 40 
     | 
    
         
            +
                        Aws::Query::EC2ParamBuilder.new(param_list).apply(
         
     | 
| 
      
 41 
     | 
    
         
            +
                          context.operation.input, params
         
     | 
| 
      
 42 
     | 
    
         
            +
                        )
         
     | 
| 
       37 
43 
     | 
    
         | 
| 
       38 
     | 
    
         
            -
                         
     | 
| 
       39 
     | 
    
         
            -
                          service: 'ec2',
         
     | 
| 
      
 44 
     | 
    
         
            +
                        endpoint_params = Aws::EC2::EndpointParameters.new(
         
     | 
| 
       40 
45 
     | 
    
         
             
                          region: params[:source_region],
         
     | 
| 
       41 
     | 
    
         
            -
                           
     | 
| 
      
 46 
     | 
    
         
            +
                          use_dual_stack: context.config.use_dualstack_endpoint,
         
     | 
| 
      
 47 
     | 
    
         
            +
                          use_fips: context.config.use_fips_endpoint
         
     | 
| 
       42 
48 
     | 
    
         
             
                        )
         
     | 
| 
       43 
     | 
    
         
            -
                         
     | 
| 
       44 
     | 
    
         
            -
             
     | 
| 
       45 
     | 
    
         
            -
             
     | 
| 
       46 
     | 
    
         
            -
             
     | 
| 
       47 
     | 
    
         
            -
             
     | 
| 
       48 
     | 
    
         
            -
                           
     | 
| 
      
 49 
     | 
    
         
            +
                        endpoint = context.config.endpoint_provider
         
     | 
| 
      
 50 
     | 
    
         
            +
                                          .resolve_endpoint(endpoint_params)
         
     | 
| 
      
 51 
     | 
    
         
            +
                        auth_scheme = Aws::Endpoints.resolve_auth_scheme(context, endpoint)
         
     | 
| 
      
 52 
     | 
    
         
            +
             
     | 
| 
      
 53 
     | 
    
         
            +
                        signer = Aws::Plugins::Sign.signer_for(
         
     | 
| 
      
 54 
     | 
    
         
            +
                          auth_scheme, context.config, params[:source_region]
         
     | 
| 
       49 
55 
     | 
    
         
             
                        )
         
     | 
| 
       50 
     | 
    
         
            -
                        url += "?#{param_list.to_s}"
         
     | 
| 
       51 
56 
     | 
    
         | 
| 
       52 
57 
     | 
    
         
             
                        signer.presign_url(
         
     | 
| 
       53 
58 
     | 
    
         
             
                          http_method: 'GET',
         
     | 
| 
       54 
     | 
    
         
            -
                          url: url,
         
     | 
| 
      
 59 
     | 
    
         
            +
                          url: "#{endpoint.url}?#{param_list}",
         
     | 
| 
       55 
60 
     | 
    
         
             
                          body: '',
         
     | 
| 
       56 
61 
     | 
    
         
             
                          expires_in: 3600
         
     | 
| 
       57 
62 
     | 
    
         
             
                        ).to_s
         
     |