def _resolve()

in botocore/regions.py [0:0]


    def _resolve(self, partition, service_name, service_data, endpoint_name,
                 use_dualstack_endpoint, use_fips_endpoint):
        endpoint_data = service_data.get('endpoints', {}).get(endpoint_name, {})

        if endpoint_data.get('deprecated'):
            LOG.warning(
                'Client is configured with the deprecated endpoint: %s' % (
                    endpoint_name
                )
            )

        service_defaults = service_data.get('defaults', {})
        partition_defaults = partition.get('defaults', {})
        tags = self._create_tag_list(use_dualstack_endpoint,
                                     use_fips_endpoint)

        if tags:
            result = self._resolve_variant(tags, endpoint_data,
                                           service_defaults,
                                           partition_defaults)
            if result == {}:
                error_msg = ("Endpoint does not exist for %s in region %s" % (
                    service_name, endpoint_name
                ))
                raise EndpointVariantError(tags=tags, error_msg=error_msg)
        else:
            result = endpoint_data

        # If dnsSuffix has not already been consumed from a variant definition
        if 'dnsSuffix' not in result:
            result['dnsSuffix'] = partition['dnsSuffix']

        result['partition'] = partition['partition']
        result['endpointName'] = endpoint_name

        # Merge in the service defaults then the partition defaults.
        self._merge_keys(service_defaults, result)
        self._merge_keys(partition_defaults, result)

        result['hostname'] = self._expand_template(
            partition, result['hostname'], service_name, endpoint_name,
            result['dnsSuffix']
        )
        if 'sslCommonName' in result:
            result['sslCommonName'] = self._expand_template(
                partition, result['sslCommonName'], service_name,
                endpoint_name, result['dnsSuffix'])

        return result