Skip to content

Commit

Permalink
Updates to ECS, Lambda, and S3 models.
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremeamia committed Apr 9, 2015
1 parent 21ddd3d commit 2df81c5
Show file tree
Hide file tree
Showing 12 changed files with 2,264 additions and 12 deletions.
18 changes: 18 additions & 0 deletions CHANGELOG.md
@@ -1,5 +1,23 @@
# CHANGELOG

## Next Release

See the [Upgrading Guide](https://github.com/aws/aws-sdk-php/blob/master/UPGRADING.md)
for details about any changes you may need to make to your code for this upgrade.

* `Aws\Ecs` - Added support for the ECS service scheduler operations.
* `Aws\S3` - Added support for the `getBucketNotificationConfiguration` and
`putBucketNotificationConfiguration` operations to the `S3Client` to replace
the, now deprecated, `getBucketNotification` and `putBucketNotification`
operations.
* [BC] `Aws\Lambda` - Added support for the new AWS Lambda API, which has been
changed based on customer feedback during Lambda's preview period.
* `Aws\Common` - Deprecated "facades". They will not be present in Version 3 of
the SDK.
* `Aws\Common` - Added `getAwsErrorCode`, `getAwsErrorType` and `getAwsRequestId`
methods to the `ServiceResponseException` to be forward compatible with
Version 3 of the SDK.

## 2.7.27 - 2015-04-07

* `Aws\DataPipeline` - Added support for `DeactivatePipeline`
Expand Down
38 changes: 38 additions & 0 deletions UPGRADING.md
@@ -1,6 +1,44 @@
Upgrading Guide
===============

Upgrade from 2.7 to 2.8
-----------------------

### AWS Lambda

Version 2.8 is backward-compatible with version 2.7, except in the case of the
AWS Lambda service. The Lambda service has changed their API significantly based
on customer feedback during their preview period. The `invokeAsync()` operation
has not changed, but many aspects of the API has.

If you would like to continue using the old 2014-11-11 previewAPI, you can
configure this when you instantiate the `LambdaClient`:

```php
use Aws\Lambda\LambdaClient;

$client = LambdaClient::factory(array(
'version' => '2014-11-11',
// ...
));
```

### Preparations for Version 3 of the SDK

In preparation for Version 3 of the AWS SDK for PHP:

* We marked all of the "facade" classes and methods as deprecated, since they
will be removed.
* We added the `getAwsErrorCode()`, `getAwsErrorType()` and `getAwsRequestId()`
methods to the `ServiceResponseException` to be forward-compatible with
Version 3's `AwsException` interface.
* We advise against the use of any `Enum` class, since these will be removed.
Instead, use the literal value to which the enum corresponds.
* We advise against the use of any granular service classes, since these will be
removed. Instead, catch the top-level service exception (e.g.,
`Aws\S3\Exception\S3Exception`) and use the `getAwsErrorCode()` method if you
need to know the granular error code.

Upgrade from 2.6 to 2.7
-----------------------

Expand Down
1 change: 1 addition & 0 deletions src/Aws/Common/Aws.php
Expand Up @@ -95,6 +95,7 @@ public function getConfig()
* @param string|null $namespace The namespace that the facades should be mounted to. Defaults to global namespace
*
* @return Aws
* @deprecated "Facades" are being removed in version 3.0 of the SDK.
*/
public function enableFacades($namespace = null)
{
Expand Down
38 changes: 38 additions & 0 deletions src/Aws/Common/Exception/ServiceResponseException.php
Expand Up @@ -180,4 +180,42 @@ public function __toString()

return $message;
}

/**
* Get the request ID of the error. This value is only present if a
* response was received, and is not present in the event of a networking
* error.
*
* Same as `getRequestId()` method, but matches the interface for SDKv3.
*
* @return string|null Returns null if no response was received
*/
public function getAwsRequestId()
{
return $this->requestId;
}

/**
* Get the AWS error type.
*
* Same as `getExceptionType()` method, but matches the interface for SDKv3.
*
* @return string|null Returns null if no response was received
*/
public function getAwsErrorType()
{
return $this->exceptionType;
}

/**
* Get the AWS error code.
*
* Same as `getExceptionCode()` method, but matches the interface for SDKv3.
*
* @return string|null Returns null if no response was received
*/
public function getAwsErrorCode()
{
return $this->exceptionCode;
}
}
2 changes: 2 additions & 0 deletions src/Aws/Common/Facade/Facade.php
Expand Up @@ -20,6 +20,8 @@

/**
* Base facade class that handles the delegation logic
*
* @deprecated "Facades" are being removed in version 3.0 of the SDK.
*/
abstract class Facade implements FacadeInterface
{
Expand Down
2 changes: 2 additions & 0 deletions src/Aws/Common/Facade/FacadeInterface.php
Expand Up @@ -20,6 +20,8 @@
* Interface that defines a client facade. Facades are convenient static classes that allow you to run client methods
* statically on a default instance from the service builder. The facades themselves are aliased into the global
* namespace for ease of use.
*
* @deprecated "Facades" are being removed in version 3.0 of the SDK.
*/
interface FacadeInterface
{
Expand Down
5 changes: 5 additions & 0 deletions src/Aws/Ecs/EcsClient.php
Expand Up @@ -27,16 +27,20 @@
* Client to interact with Amazon EC2 Container Service
*
* @method Model createCluster(array $args = array()) {@command Ecs CreateCluster}
* @method Model createService(array $args = array()) {@command Ecs CreateService}
* @method Model deleteCluster(array $args = array()) {@command Ecs DeleteCluster}
* @method Model deleteService(array $args = array()) {@command Ecs DeleteService}
* @method Model deregisterContainerInstance(array $args = array()) {@command Ecs DeregisterContainerInstance}
* @method Model deregisterTaskDefinition(array $args = array()) {@command Ecs DeregisterTaskDefinition}
* @method Model describeClusters(array $args = array()) {@command Ecs DescribeClusters}
* @method Model describeContainerInstances(array $args = array()) {@command Ecs DescribeContainerInstances}
* @method Model describeServices(array $args = array()) {@command Ecs DescribeServices}
* @method Model describeTaskDefinition(array $args = array()) {@command Ecs DescribeTaskDefinition}
* @method Model describeTasks(array $args = array()) {@command Ecs DescribeTasks}
* @method Model discoverPollEndpoint(array $args = array()) {@command Ecs DiscoverPollEndpoint}
* @method Model listClusters(array $args = array()) {@command Ecs ListClusters}
* @method Model listContainerInstances(array $args = array()) {@command Ecs ListContainerInstances}
* @method Model listServices(array $args = array()) {@command Ecs ListServices}
* @method Model listTaskDefinitionFamilies(array $args = array()) {@command Ecs ListTaskDefinitionFamilies}
* @method Model listTaskDefinitions(array $args = array()) {@command Ecs ListTaskDefinitions}
* @method Model listTasks(array $args = array()) {@command Ecs ListTasks}
Expand All @@ -47,6 +51,7 @@
* @method Model stopTask(array $args = array()) {@command Ecs StopTask}
* @method Model submitContainerStateChange(array $args = array()) {@command Ecs SubmitContainerStateChange}
* @method Model submitTaskStateChange(array $args = array()) {@command Ecs SubmitTaskStateChange}
* @method Model updateService(array $args = array()) {@command Ecs UpdateService}
*
* @link http://docs.aws.amazon.com/aws-sdk-php/v2/guide/service-ecs.html User guide
* @link http://docs.aws.amazon.com/aws-sdk-php/v2/api/class-Aws.Ecs.EcsClient.html API docs
Expand Down

0 comments on commit 2df81c5

Please sign in to comment.