Skip to content

Commit

Permalink
Documenting and making tweaks to support the CloudSearch API update. …
Browse files Browse the repository at this point in the history
…Added new CloudSearch regions as well.
  • Loading branch information
jeremeamia committed Mar 25, 2014
1 parent b69d023 commit 49ff2cd
Show file tree
Hide file tree
Showing 7 changed files with 67 additions and 0 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Expand Up @@ -4,8 +4,13 @@ CHANGELOG
Next Release Next Release
------------ ------------


* [BC] Updated the Amazon CloudSearch client to use the new 2013-01-01 API version (see [their release
notes](http://aws.amazon.com/releasenotes/6125075708216342)). This API version of CloudSearch is significantly
different than the previous one, and is not backwards compatible. See the
[Upgrading Guide](https://github.com/aws/aws-sdk-php/blob/master/UPGRADING.md) for more details.
* Added support for [resize progress data and the Cluster Revision Number * Added support for [resize progress data and the Cluster Revision Number
parameter](http://aws.amazon.com/releasenotes/0485739709714318) to the Amazon Redshift client. parameter](http://aws.amazon.com/releasenotes/0485739709714318) to the Amazon Redshift client.
* Added the `ap-northeast-1`, `ap-southeast-2`, and `sa-east-1` regions to the Amazon CloudSearch client.


2.5.4 (2014-03-20) 2.5.4 (2014-03-20)
------------------ ------------------
Expand Down
33 changes: 33 additions & 0 deletions UPGRADING.md
@@ -1,6 +1,39 @@
Upgrading Guide Upgrading Guide
=============== ===============


Upgrade from 2.5 to 2.6
-----------------------

**IMPORTANT:** Version 2.6 *is* backwards compatible with version 2.5, *unless* you are using the Amazon CloudSearch
client. If you are using CloudSearch, please read the next section carefully.

### Amazon CloudSearch

Version 2.6 of the AWS SDK for PHP has been updated to use the 2013-01-01 API version of Amazon CloudSearch by default.

The 2013-01-01 API marks a significant upgrade of Amazon CloudSearch, but includes numerous breaking changes to the API.
CloudSearch now supports 33 languages, highlighting, autocomplete suggestions, geospatial search, AWS IAM integration to
control access to domain configuration actions, and user configurable scaling and availability options. These new
features are reflected in the changes to the method and parameters of the CloudSearch client.

For details about the new API and how to update your usage of CloudSearch, please consult the [Configuration API
Reference for Amazon CloudSearch](http://docs.aws.amazon.com/cloudsearch/latest/developerguide/configuration-api.html)
and the guide for [Migrating to the Amazon CloudSearch 2013-01-01 API](http://docs.aws.amazon.com/cloudsearch/latest/developerguide/migrating.html).

If you would like to continue using the older 2011-02-01 API, you can configure this when you instantiate the
`CloudSearchClient`:

```php
use Aws\CloudSearch\CloudSearchClient;

$client = CloudSearchClient::factory(array(
'key' => '<aws access key>',
'secret' => '<aws secret key>',
'region' => '<region name>',
'version' => '2011-02-01',
));
```

Upgrade from 2.4 to 2.5 Upgrade from 2.4 to 2.5
----------------------- -----------------------


Expand Down
4 changes: 4 additions & 0 deletions docs/_ext/aws/templates/client_intro
Expand Up @@ -57,6 +57,10 @@ clients so that you only have to specify your settings once.
$aws = Aws::factory('/path/to/my_config.json'); $aws = Aws::factory('/path/to/my_config.json');


// Get the client from the builder by namespace // Get the client from the builder by namespace
{% if specifiedApiVersion -%}
$client = $aws->get('{{ namespace|lower() }}_{{ apiVersionSuffix|replace("_", "") }}');
{% else -%}
$client = $aws->get('{{ namespace }}'); $client = $aws->get('{{ namespace }}');
{% endif %}


.. _{{ namespace }}{{ apiVersionSuffix }}_operations: .. _{{ namespace }}{{ apiVersionSuffix }}_operations:
2 changes: 2 additions & 0 deletions docs/index.rst
Expand Up @@ -118,6 +118,8 @@ Service-Specific Guides


.. indexlinks:: CloudSearch .. indexlinks:: CloudSearch


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

* Amazon CloudWatch * Amazon CloudWatch


.. indexlinks:: CloudWatch .. indexlinks:: CloudWatch
Expand Down
1 change: 1 addition & 0 deletions docs/service-cloudsearch-20110201.rst
@@ -0,0 +1 @@
.. service:: CloudSearch 2011-02-01
15 changes: 15 additions & 0 deletions src/Aws/CloudSearch/Resources/cloudsearch-2013-01-01.php
Expand Up @@ -43,11 +43,26 @@
'https' => true, 'https' => true,
'hostname' => 'cloudsearch.eu-west-1.amazonaws.com', 'hostname' => 'cloudsearch.eu-west-1.amazonaws.com',
), ),
'ap-northeast-1' => array(
'http' => false,
'https' => true,
'hostname' => 'cloudsearch.ap-northeast-1.amazonaws.com',
),
'ap-southeast-1' => array( 'ap-southeast-1' => array(
'http' => false, 'http' => false,
'https' => true, 'https' => true,
'hostname' => 'cloudsearch.ap-southeast-1.amazonaws.com', 'hostname' => 'cloudsearch.ap-southeast-1.amazonaws.com',
), ),
'ap-southeast-2' => array(
'http' => false,
'https' => true,
'hostname' => 'cloudsearch.ap-southeast-2.amazonaws.com',
),
'sa-east-1' => array(
'http' => false,
'https' => true,
'hostname' => 'cloudsearch.sa-east-1.amazonaws.com',
),
), ),
'operations' => array( 'operations' => array(
'BuildSuggesters' => array( 'BuildSuggesters' => array(
Expand Down
7 changes: 7 additions & 0 deletions src/Aws/Common/Resources/aws-config.php
Expand Up @@ -53,6 +53,13 @@
'class' => 'Aws\CloudSearch\CloudSearchClient' 'class' => 'Aws\CloudSearch\CloudSearchClient'
), ),


'cloudsearch_20110201' => array(
'extends' => 'cloudsearch',
'params' => array(
'version' => '2011-02-01'
)
),

'cloudtrail' => array( 'cloudtrail' => array(
'alias' => 'CloudTrail', 'alias' => 'CloudTrail',
'extends' => 'default_settings', 'extends' => 'default_settings',
Expand Down

0 comments on commit 49ff2cd

Please sign in to comment.