class Aws::S3Control::Plugins::Dualstack::DualstackHandler
@api private
Public Instance Methods
call(context)
click to toggle source
# File lib/aws-sdk-s3control/plugins/dualstack.rb, line 42 def call(context) if context.config.regional_endpoint && context[:use_dualstack_endpoint] apply_dualstack_endpoint(context) end @handler.call(context) end
Private Instance Methods
apply_dualstack_endpoint(context)
click to toggle source
# File lib/aws-sdk-s3control/plugins/dualstack.rb, line 50 def apply_dualstack_endpoint(context) region = context.config.region dns_suffix = Aws::Partitions::EndpointProvider.dns_suffix_for(region) host = "s3-control.dualstack.#{region}.#{dns_suffix}" endpoint = URI.parse(context.http_request.endpoint.to_s) endpoint.scheme = context.http_request.endpoint.scheme endpoint.port = context.http_request.endpoint.port endpoint.host = host context.http_request.endpoint = endpoint.to_s end