gems/aws-partitions/lib/aws-partitions/endpoint_provider.rb
def endpoint_for(region, service)
        partition = get_partition(region)
        endpoint = default_endpoint(partition, service, region)
        service_cfg = partition.fetch("services", {}).fetch(service, {})

        # Check for service-level default endpoint.
        endpoint = service_cfg.fetch("defaults", {}).fetch("hostname", endpoint)

        # Check for global endpoint.
        if service_cfg["isRegionalized"] == false
          region = service_cfg.fetch("partitionEndpoint", region)
        end

        # Check for service/region level endpoint.
        endpoint = service_cfg.fetch("endpoints", {}).
          fetch(region, {}).fetch("hostname", endpoint)

        endpoint
      end
# Intentionally marked private. The format of the endpoint rules
# is an implementation detail.
# @api private
Intentionally marked private. The format of the endpoint rules
is an implementation detail.
Intentionally marked private . The format of the endpoint rules is an implementation detail .
def endpoint_for(region, service)
        partition = get_partition(region)
        endpoint = default_endpoint(partition, service, region)
        service_cfg = partition.fetch("services", {}).fetch(service, {})
        endpoint = service_cfg.fetch("defaults", {}).fetch("hostname", endpoint)
        if service_cfg["isRegionalized"] == false
          region = service_cfg.fetch("partitionEndpoint", region)
        end
        endpoint = service_cfg.fetch("endpoints", {}).
          fetch(region, {}).fetch("hostname", endpoint)
        endpoint
      end
def endpoint_for ( region , service ) partition = get_partition ( region ) endpoint = default_endpoint ( partition , service , region ) service_cfg = partition . fetch ( "services" , { } ) . fetch ( service , { } ) endpoint = service_cfg . fetch ( "defaults" , { } ) . fetch ( "hostname" , endpoint ) if service_cfg [ "isRegionalized" ] == false region = service_cfg . fetch ( "partitionEndpoint" , region ) end endpoint = service_cfg . fetch ( "endpoints" , { } ) . fetch ( region , { } ) . fetch ( "hostname" , endpoint ) endpoint end
Intentionally marked private.
Intentionally marked private .
# Check for service-level default endpoint. # Check for global endpoint. # Check for service/region level endpoint.
region
service
api
None