class Aws::Partitions::EndpointProvider

def endpoint_no_variants_for(region, service, is_global_fn)

def endpoint_no_variants_for(region, service, is_global_fn)
  partition = get_partition(region)
  service_cfg = partition.fetch('services', {}).fetch(service, {})
  # Find the default endpoint
  default_endpoint = service_cfg
             .fetch('defaults', {})
             .fetch('hostname', partition['defaults']['hostname'])
  endpoints = service_cfg.fetch('endpoints', {})
  # Check for global endpoint.
  if is_global_fn.call(service, region, endpoints, service_cfg)
    region = service_cfg.fetch('partitionEndpoint', region)
  end
  # Check for service/region level endpoint.
  region_cfg = endpoints
             .fetch(region, {})
  endpoint = region_cfg
             .fetch('hostname', default_endpoint)
  warn_deprecation(service, region) if region_cfg['deprecated']
  # Replace placeholders from the endpoints
  endpoint.sub('{region}', region)
          .sub('{service}', service)
          .sub('{dnsSuffix}', partition['dnsSuffix'])
end