lib/aws-sdk-costoptimizationhub/endpoints.rb in aws-sdk-costoptimizationhub-1.13.0 vs lib/aws-sdk-costoptimizationhub/endpoints.rb in aws-sdk-costoptimizationhub-1.14.0

- old
+ new

@@ -12,101 +12,80 @@ # @api private module Endpoints class GetPreferences def self.build(context) - unless context.config.regional_endpoint - endpoint = context.config.endpoint.to_s - end Aws::CostOptimizationHub::EndpointParameters.new( region: context.config.region, use_dual_stack: context.config.use_dualstack_endpoint, use_fips: context.config.use_fips_endpoint, - endpoint: endpoint, + endpoint: context.config.regional_endpoint ? nil : context.config.endpoint.to_s, ) end end class GetRecommendation def self.build(context) - unless context.config.regional_endpoint - endpoint = context.config.endpoint.to_s - end Aws::CostOptimizationHub::EndpointParameters.new( region: context.config.region, use_dual_stack: context.config.use_dualstack_endpoint, use_fips: context.config.use_fips_endpoint, - endpoint: endpoint, + endpoint: context.config.regional_endpoint ? nil : context.config.endpoint.to_s, ) end end class ListEnrollmentStatuses def self.build(context) - unless context.config.regional_endpoint - endpoint = context.config.endpoint.to_s - end Aws::CostOptimizationHub::EndpointParameters.new( region: context.config.region, use_dual_stack: context.config.use_dualstack_endpoint, use_fips: context.config.use_fips_endpoint, - endpoint: endpoint, + endpoint: context.config.regional_endpoint ? nil : context.config.endpoint.to_s, ) end end class ListRecommendationSummaries def self.build(context) - unless context.config.regional_endpoint - endpoint = context.config.endpoint.to_s - end Aws::CostOptimizationHub::EndpointParameters.new( region: context.config.region, use_dual_stack: context.config.use_dualstack_endpoint, use_fips: context.config.use_fips_endpoint, - endpoint: endpoint, + endpoint: context.config.regional_endpoint ? nil : context.config.endpoint.to_s, ) end end class ListRecommendations def self.build(context) - unless context.config.regional_endpoint - endpoint = context.config.endpoint.to_s - end Aws::CostOptimizationHub::EndpointParameters.new( region: context.config.region, use_dual_stack: context.config.use_dualstack_endpoint, use_fips: context.config.use_fips_endpoint, - endpoint: endpoint, + endpoint: context.config.regional_endpoint ? nil : context.config.endpoint.to_s, ) end end class UpdateEnrollmentStatus def self.build(context) - unless context.config.regional_endpoint - endpoint = context.config.endpoint.to_s - end Aws::CostOptimizationHub::EndpointParameters.new( region: context.config.region, use_dual_stack: context.config.use_dualstack_endpoint, use_fips: context.config.use_fips_endpoint, - endpoint: endpoint, + endpoint: context.config.regional_endpoint ? nil : context.config.endpoint.to_s, ) end end class UpdatePreferences def self.build(context) - unless context.config.regional_endpoint - endpoint = context.config.endpoint.to_s - end Aws::CostOptimizationHub::EndpointParameters.new( region: context.config.region, use_dual_stack: context.config.use_dualstack_endpoint, use_fips: context.config.use_fips_endpoint, - endpoint: endpoint, + endpoint: context.config.regional_endpoint ? nil : context.config.endpoint.to_s, ) end end end