Returns an instance of the appropriate client class for the given
        region. If there is no endpoint for that region, a NoEndpointForRegion
        exception is raised.
175985
def get_client(self, region):
        
        ep = self._ep_for_region(region)
        if not ep:
            raise exc.NoEndpointForRegion("There is no endpoint defined for the "
                    "region '%s' for the '%s' service." % (region,
                    self.service_type))
        return ep.client
350461
function hasCustomEndpoint(client) {
  //if set endpoint is set for specific client, enable endpoint discovery will raise an error.
  if (client._originalConfig && client._originalConfig.endpoint && client._originalConfig.endpointDiscoveryEnabled === true) {
    throw util.error(new Error(), {
      code: 'ConfigurationException',
      message: 'Custom endpoint is supplied; endpointDiscoveryEnabled must not be true.'
    });
  };
  var svcConfig = AWS.config[client.serviceIdentifier] || {};
  return Boolean(AWS.config.endpoint || svcConfig.endpoint || (client._originalConfig && client._originalConfig.endpoint));
}
1003760
def region(self, bounds):
        
        if not isinstance(bounds, Bounds):
            raise TypeError("region param bounds must be isinstance of Bounds")
        _d = copy.copy(self)
        _d._bounds = bounds
        return _d
933885
public static SPIProvider getInstance()
   {
      if (me == null)
      {
         final ClassLoader cl = ClassLoaderProvider.getDefaultProvider().getServerIntegrationClassLoader();
         me = SPIProviderResolver.getInstance(cl).getProvider();
      }
      return me;
   }
1045100
public static synchronized PortRange getTcpSourceInstance() {
        if (tcpSourcePortRange == null) {
            tcpSourcePortRange = new PortRange();
            tcpSourcePortRange.init(
                  CoGProperties.getDefault().getTcpSourcePortRange());
        }
        return tcpSourcePortRange;
    }
383415
@Override
    public Client getClientInstance()
    {
        // if threadsafe recycle the same single instance; if not create a new
        // instance

        if (isThreadSafe())
        {
            logger.info("Returning threadsafe used client instance for persistence unit : " + persistenceUnit);
            if (client == null)
            {
                client = instantiateClient(persistenceUnit);
            }
        }
        else
        {
            logger.debug("Returning fresh client instance for persistence unit : " + persistenceUnit);
            // no need to hold a client reference.
            return instantiateClient(persistenceUnit);
        }

        return client;
    }
1242525
public static Region getInstance(int code) {

        loadRegionData();

        Region r = numericCodeMap.get(code);

        if ( r == null ) { // Just in case there's an alias that's numeric, try to find it.
            String pad = "";
            if ( code < 10 ) {
                pad = "00";
            } else if ( code < 100 ) {
                pad = "0";
            }
            String id = pad + Integer.toString(code);
            r = regionAliases.get(id);
        }

        if ( r == null ) {
            throw new IllegalArgumentException("Unknown region code: " + code);
        }

        if ( r.type == RegionType.DEPRECATED && r.preferredValues.size() == 1) {
            r = r.preferredValues.get(0);
        }

        return r;
    }
1227922
public function getEndpoint($serviceType, $region, $endpointType = 'public')
	{
		$serviceEndpoints = $this->getEndpoints($serviceType);
		foreach ($serviceEndpoints as $endpointsRegion => $endpoints) {
			if ($endpointsRegion == $region) {
				return $endpoints[$endpointType . 'URL'];
			}
		}
	}
331218
@SuppressWarnings("unchecked")
  public Class<? extends Mapper<?,?,?,?>> getMapperClass() 
     throws ClassNotFoundException {
    return (Class<? extends Mapper<?,?,?,?>>) 
      conf.getClass(MAP_CLASS_ATTR, Mapper.class);
  }
1226962
def get_region(cls, resource=None):
        
        if resource:
            resource_info = cls.parse_remote(resource)
            if resource_info.region:
                return resource_info.region

        return os.environ.get("AWS_DEFAULT_REGION", cls._DEFAULT_REGION)
1017040
def _register_client(self, client, region_name):
        
        for item in client.meta.method_to_api_mapping:
            method = getattr(client, item)
            wrapped_method = functools.partial(self._wrap_client, region_name, method)
            setattr(client, item, wrapped_method)
1126308
public ApiResponse<GetAnyLocationsResponse> getAnyLocationsWithHttpInfo(String region) throws ApiException {
        com.squareup.okhttp.Call call = getAnyLocationsValidateBeforeCall(region, null, null);
        Type localVarReturnType = new TypeToken<GetAnyLocationsResponse>(){}.getType();
        return apiClient.execute(call, localVarReturnType);
    }
1208768
def get instance_reference, keys = nil
    if keys
      uri = Openwsman.epr_uri_for "", instance_reference
      instance_reference = Openwsman::EndPointReference.new(uri, nil, keys)
    end
    puts "@client.get #{instance_reference.class}..." if Wbem.debug
    case instance_reference
    when Openwsman::EndPointReference
      get_by_epr instance_reference
    when String
      get_by_epr Openwsman::EndPointReference.new(instance_reference)
    else
      raise "Unsupported Wbem::get #{instance_reference.class}"
    end
  end
713922
public GetInstanceResponse getInstance(GetInstanceRequest request) {
        checkNotNull(request, "request should not be null.");
        checkNotNull(request.getInstanceId(), "request instanceId should not be null.");
        InternalRequest internalRequest = this.createRequest(
                request, HttpMethodName.GET, INSTANCE_PREFIX, request.getInstanceId());
        return this.invokeHttpClient(internalRequest, GetInstanceResponse.class);
    }
178906
public SibRaEndpointConfiguration getEndpointConfiguration()
                    throws InvalidPropertyException, ResourceAdapterInternalException {

        final String methodName = "getEndpointConfiguration";
        if (TraceComponent.isAnyTracingEnabled() && TRACE.isEntryEnabled()) {
            SibTr.entry(this, TRACE, methodName);
        }

        final SibRaEndpointConfiguration configuration = new SibRaEndpointConfigurationImpl();

        if (TraceComponent.isAnyTracingEnabled() && TRACE.isEntryEnabled()) {
            SibTr.exit(this, TRACE, methodName, configuration);
        }
        return configuration;

    }
731086
private String determineAnnotatedEndpointPath(Class<?> endpointClass) {
        if (endpointClass.isAnnotationPresent(ServerEndpoint.class)) {
            return endpointClass.getAnnotation(ServerEndpoint.class).value();
        } else {
            throw new IllegalArgumentException(String.format("@ServerEndpoint annotation not found on Websocket-class: '%s'. Either annotate the class or register it as a programmatic endpoint using ServerEndpointConfig.class", endpointClass));
        }
    }
59825
public ProviderEndPoint getEndPoint()
   {
      if (mode != PropertiesType.HOST_PORT)
      {
         throw new SIErrorException(
            nls.getFormattedMessage("INVALID_METHOD_FOR_OBJECT_TYPE_SICO0006", null, "INVALID_METHOD_FOR_OBJECT_TYPE_SICO0006")  // D270373
         );
      }
      
      return endPoint;
   }