Skip to content

Commit

Permalink
Merge branch 'release-2.6.9'
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremeamia committed Jun 26, 2014
2 parents 8184c0c + ade45c3 commit 266a857
Show file tree
Hide file tree
Showing 19 changed files with 940 additions and 45 deletions.
9 changes: 7 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
CHANGELOG
=========

Next Release:
-------------
2.6.9 (2014-06-26)
------------------

* Added support for the CloudSearchDomain client, which allows you to search and
upload documents to your CloudSearch domains.
* Added support for delivery notifications to the Amazon SES client.
* Updated the CloudFront client to support the 2014-05-31 API.
* Merged PR #316 as a better solution for issue #309.


2.6.8 (2014-06-20)
------------------
Expand Down
6 changes: 5 additions & 1 deletion docs/_ext/aws/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,11 @@ def load_description(self, path):
:param path: Path to a service description to load
"""
return self.__load_php(path)
description = self.__load_php(path)
if 'regions' not in description:
description['regions'] = {}

return description

def __load_php(self, path):
"""Load a PHP script that returns an array using JSON
Expand Down
6 changes: 6 additions & 0 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ AWS SDK for PHP
service-cloudfront
service-cloudfront-20120505
service-cloudsearch
service-cloudsearch-20110201
service-cloudsearchdomain
service-cloudtrail
service-cloudwatch
service-datapipeline
Expand Down Expand Up @@ -119,6 +121,10 @@ Service-Specific Guides

* :doc:`Using the older 2011-02-01 API version <service-cloudsearch-20110201>`

* Amazon CloudSearchDomain

.. indexlinks:: CloudSearchDomain

* Amazon CloudWatch

.. indexlinks:: CloudWatch
Expand Down
56 changes: 56 additions & 0 deletions docs/service-cloudsearchdomain.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
====================================================================================
Amazon CloudSearch Domains
====================================================================================

This guide focuses on the AWS SDK for PHP client for Amazon CloudSearch domains. The ``CloudSearchDomainClient`` allows
you to search and upload documents to your CloudSearch domains. This guide assumes that you have already downloaded and
installed the AWS SDK for PHP. See :doc:`installation` for more information on getting started.

Creating a client
-----------------

First you need to create a client object using one of the following techniques.

Factory method
~~~~~~~~~~~~~~

Similar to the way other service clients are used, you can instantiate the ``CloudSearchDomainClient`` with the
``Aws\CloudSearchDomain\CloudSearchDomainClient::factory()`` method.

.. code-block:: php
use Aws\CloudSearchDomain\CloudSearchDomainClient;
$client = CloudSearchDomainClient::factory(array(
'base_url' => '<your cloudsearch domain endpoint>',
));
The ``CloudSearchDomainClient`` is unlike other clients, because it does not require you to provide AWS credentials.
The only thing you need to provide is the ``base_url`` option, which represents the domain's endpoint. Domain
endpoints are unique to each domain, and you can get it by describing your domain with the :doc:`Amazon CloudSearch
configuration client <service-cloudsearch>`.

Helper method
~~~~~~~~~~~~~

An easy way to instantiate the ``CloudSearchDomainClient`` is to use the ``CloudSearchClient::getDomainClient()``
helper method. This method use the CloudSearch configuration API to retrieve the domain endpoint, and instantiates the
domain client for you.

.. code-block:: php
use Aws\CloudSearch\CloudSearchClient;
$configClient = CloudSearchClient::factory(array(
'profile' => '<profile in your aws credentials file>',
'region' => '<region name>',
));
$domainClient = $configClient->getDomainClient('<domain name>');
// Use the search operation
$result = $domainClient->search(array('query' => 'foobar'));
$hitCount = $result->getPath('hits/found');
echo "Number of Hits: {$hitCount}\n";
.. apiref:: CloudSearchDomain
1 change: 1 addition & 0 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
<directory suffix="Exception.php">./src/Aws/CloudFormation/Exception</directory>
<directory suffix="Exception.php">./src/Aws/CloudFront/Exception</directory>
<directory suffix="Exception.php">./src/Aws/CloudSearch/Exception</directory>
<directory suffix="Exception.php">./src/Aws/CloudSearchDomain/Exception</directory>
<directory suffix="Exception.php">./src/Aws/CloudTrail/Exception</directory>
<directory suffix="Exception.php">./src/Aws/CloudWatch/Exception</directory>
<directory suffix="Exception.php">./src/Aws/DataPipeline/Exception</directory>
Expand Down
2 changes: 1 addition & 1 deletion src/Aws/CloudFront/CloudFrontClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
*/
class CloudFrontClient extends AbstractClient
{
const LATEST_API_VERSION = '2014-01-31';
const LATEST_API_VERSION = '2014-05-31';

/**
* Factory method to create a new Amazon CloudFront client using an array of configuration options.
Expand Down
Loading

0 comments on commit 266a857

Please sign in to comment.