setConfig($config) ->setConfigDefaults(array( Options::VERSION => self::LATEST_API_VERSION, Options::SERVICE_DESCRIPTION => __DIR__ . '/Resources/cloudsearch-%s.php' )) ->build(); } /** * Create a CloudSearchDomainClient for a particular domain to do searching * and document uploads. * * @param string $domainName Name of the domain for which to create a domain client. * @param array $config Config options for the CloudSearchDomainClient * * @return CloudSearchDomainClient * @link http://docs.aws.amazon.com/aws-sdk-php/v2/guide/configuration.html#client-configuration-options * @deprecated Use CloudSearchDomainClient::factory directly */ public function getDomainClient($domainName, array $config = array()) { // Determine the Domain client's endpoint $config['endpoint'] = $this->describeDomains(array( 'DomainNames' => array($domainName) ))->getPath('DomainStatusList/0/SearchService/Endpoint'); return CloudSearchDomainClient::factory($config); } }