Class: Aws::PricingPlanManager::EndpointProvider

Inherits:
Object
  • Object
show all
Defined in:
lib/aws-sdk-pricingplanmanager/endpoint_provider.rb

Instance Method Summary collapse

Instance Method Details

#resolve_endpoint(parameters) ⇒ Object

Raises:

  • (ArgumentError)


12
13
14
15
16
17
18
19
# File 'lib/aws-sdk-pricingplanmanager/endpoint_provider.rb', line 12

def resolve_endpoint(parameters)
  if Aws::Endpoints::Matchers.set?(parameters.endpoint)
    return Aws::Endpoints::Endpoint.new(url: "#{parameters.endpoint}", properties: {"authSchemes" => [{"name" => "sigv4", "signingName" => "pricingplanmanager", "signingRegion" => "us-east-1"}]})
  end
  return Aws::Endpoints::Endpoint.new(url: "https://pricingplanmanager.us-east-1.api.aws", properties: {"authSchemes" => [{"name" => "sigv4", "signingName" => "pricingplanmanager", "signingRegion" => "us-east-1"}]})
  raise ArgumentError, 'No endpoint could be resolved'

end