lib/aws-sdk-pi/endpoints.rb in aws-sdk-pi-1.65.0 vs lib/aws-sdk-pi/endpoints.rb in aws-sdk-pi-1.66.0

- old
+ new

@@ -12,185 +12,146 @@ # @api private module Endpoints class CreatePerformanceAnalysisReport def self.build(context) - unless context.config.regional_endpoint - endpoint = context.config.endpoint.to_s - end Aws::PI::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 DeletePerformanceAnalysisReport def self.build(context) - unless context.config.regional_endpoint - endpoint = context.config.endpoint.to_s - end Aws::PI::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 DescribeDimensionKeys def self.build(context) - unless context.config.regional_endpoint - endpoint = context.config.endpoint.to_s - end Aws::PI::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 GetDimensionKeyDetails def self.build(context) - unless context.config.regional_endpoint - endpoint = context.config.endpoint.to_s - end Aws::PI::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 GetPerformanceAnalysisReport def self.build(context) - unless context.config.regional_endpoint - endpoint = context.config.endpoint.to_s - end Aws::PI::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 GetResourceMetadata def self.build(context) - unless context.config.regional_endpoint - endpoint = context.config.endpoint.to_s - end Aws::PI::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 GetResourceMetrics def self.build(context) - unless context.config.regional_endpoint - endpoint = context.config.endpoint.to_s - end Aws::PI::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 ListAvailableResourceDimensions def self.build(context) - unless context.config.regional_endpoint - endpoint = context.config.endpoint.to_s - end Aws::PI::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 ListAvailableResourceMetrics def self.build(context) - unless context.config.regional_endpoint - endpoint = context.config.endpoint.to_s - end Aws::PI::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 ListPerformanceAnalysisReports def self.build(context) - unless context.config.regional_endpoint - endpoint = context.config.endpoint.to_s - end Aws::PI::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 ListTagsForResource def self.build(context) - unless context.config.regional_endpoint - endpoint = context.config.endpoint.to_s - end Aws::PI::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 TagResource def self.build(context) - unless context.config.regional_endpoint - endpoint = context.config.endpoint.to_s - end Aws::PI::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 UntagResource def self.build(context) - unless context.config.regional_endpoint - endpoint = context.config.endpoint.to_s - end Aws::PI::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