NOTE: For Version 3 of the AWS SDK for PHP, please see the V3 User Guide and V3 API Reference.

# Class AbstractClient

Abstract AWS client

  Guzzle\Common\AbstractHasDispatcher implements Guzzle\Common\HasDispatcherInterface
  Guzzle\Http\Client implements Guzzle\Http\ClientInterface
  Guzzle\Service\Client implements Guzzle\Service\ClientInterface
  Aws\Common\Client\AbstractClient implements Aws\Common\Client\AwsClientInterface

### Direct known subclasses

`Aws\AutoScaling\AutoScalingClient`, `Aws\CloudFormation\CloudFormationClient`, `Aws\CloudWatchLogs\CloudWatchLogsClient`, `Aws\CodeCommit\CodeCommitClient`, `Aws\CodeDeploy\CodeDeployClient`, `Aws\CodePipeline\CodePipelineClient`, `Aws\CognitoIdentity\CognitoIdentityClient`, `Aws\CognitoSync\CognitoSyncClient`, `Aws\Common\Client\DefaultClient`, `Aws\Common\InstanceMetadata\InstanceMetadataClient`, `Aws\ConfigService\ConfigServiceClient`, `Aws\DataPipeline\DataPipelineClient`, `Aws\CloudFront\CloudFrontClient`, `Aws\DeviceFarm\DeviceFarmClient`, `Aws\DirectConnect\DirectConnectClient`, `Aws\DirectoryService\DirectoryServiceClient`, `Aws\DynamoDb\DynamoDbClient`, `Aws\DynamoDb_2011_12_05\DynamoDbClient`, `Aws\DynamoDbStreams\DynamoDbStreamsClient`, `Aws\Ec2\Ec2Client`, `Aws\Ecs\EcsClient`, `Aws\Efs\EfsClient`, `Aws\ElastiCache\ElastiCacheClient`, `Aws\CloudFront_2012_05_05\CloudFrontClient`, `Aws\ElasticBeanstalk\ElasticBeanstalkClient`, `Aws\ElasticFileSystem\ElasticFileSystemClient`, `Aws\ElasticLoadBalancing\ElasticLoadBalancingClient`, `Aws\ElasticTranscoder\ElasticTranscoderClient`, `Aws\Emr\EmrClient`, `Aws\Glacier\GlacierClient`, `Aws\Iam\IamClient`, `Aws\ImportExport\ImportExportClient`, `Aws\Kinesis\KinesisClient`, `Aws\Kms\KmsClient`, `Aws\CloudHsm\CloudHsmClient`, `Aws\Lambda\LambdaClient`, `Aws\MachineLearning\MachineLearningClient`, `Aws\OpsWorks\OpsWorksClient`, `Aws\Rds\RdsClient`, `Aws\Redshift\RedshiftClient`, `Aws\Route53\Route53Client`, `Aws\Route53Domains\Route53DomainsClient`, `Aws\S3\S3Client`, `Aws\Ses\SesClient`, `Aws\SimpleDb\SimpleDbClient`, `Aws\CloudSearch\CloudSearchClient`, `Aws\Sns\SnsClient`, `Aws\Sqs\SqsClient`, `Aws\Ssm\SsmClient`, `Aws\StorageGateway\StorageGatewayClient`, `Aws\Sts\StsClient`, `Aws\Support\SupportClient`, `Aws\Swf\SwfClient`, `Aws\WorkSpaces\WorkSpacesClient`, `Aws\CloudSearch_2011_02_01\CloudSearchClient`, `Aws\CloudSearchDomain\CloudSearchDomainClient`, `Aws\CloudTrail\CloudTrailClient`, `Aws\CloudWatch\CloudWatchClient`

Abstract
Namespace: Aws\Common\Client
Located at Aws/Common/Client/AbstractClient.php

## Methods summary

- `public static` `getAllEvents ( )`

  Get a list of all of the events emitted from the class

- `public` `__construct ( Aws\Common\Credentials\CredentialsInterface $credentials, Aws\Common\Signature\SignatureInterface $signature, Guzzle\Common\Collection $config )`
- `public` `__call ( string $method, array $args )`

  Magic method used to retrieve a command

- `public` `getCredentials ( )`

  Returns the AWS credentials associated with the client

- `public` `setCredentials ( Aws\Common\Credentials\CredentialsInterface $credentials )`

  Sets the credentials object associated with the client

- `public` `getSignature ( )`

  Returns the signature implementation used with the client

- `public` `getRegions ( )`

  Get a list of available regions and region data

- `public` `getRegion ( )`

  Get the name of the region to which the client is configured to send requests

- `public` `setRegion ( string $region )`

  Change the region to which the client is configured to send requests

- `public` `waitUntil ( string $waiter, array $input = array() )`

  Wait until a resource is available or an associated waiter returns true

- `public` `getWaiter ( string $waiter, array $input = array() )`

  Get a named waiter object

- `public` `setWaiterFactory ( Aws\Common\Waiter\WaiterFactoryInterface $waiterFactory )`

  Set the waiter factory to use with the client

- `public` `getWaiterFactory ( )`

  Get the waiter factory being used by the client

- `public` `getApiVersion ( )`

  Get the API version of the client (e.g. 2006-03-01)

- `public` `send ( array|RequestInterface $requests )`

  Sends a single request or an array of requests in parallel

- `public` `createRequest ( string $method = 'GET', string|array $uri = null, array|Collection $headers = null, string|resource|array|EntityBodyInterface $body = null, array $options = array() )`

  Ensures that the duplicate query string aggregator is used so that query string values are sent over the wire as foo=bar&foo=baz. Create and return a new RequestInterface configured for the client.

## Methods detail

# `public static array`
`getAllEvents( )`

Get a list of all of the events emitted from the class

#### Returns

`array`

#### Overrides

`Guzzle\Service\Client::getAllEvents`

#### Implementation of

`Guzzle\Common\HasDispatcherInterface::getAllEvents()`
# `public`
`__construct( Aws\Common\Aws\Common\Credentials\CredentialsInterface $credentials, Aws\Common\Aws\Common\Signature\SignatureInterface $signature, `Guzzle\Common\Collection` $config )`

#### Parameters

$credentials
  ``Aws\Common\Credentials\CredentialsInterface``
  $credentials AWS credentials
$signature
  ``Aws\Common\Signature\SignatureInterface``
  $signature Signature implementation
$config
  ``Guzzle\Common\Collection``
  $config Configuration options

#### Throws

``Aws\Common\Exception\InvalidArgumentException``
if an endpoint provider isn't provided

#### Overrides

`Guzzle\Http\Client::__construct`
# `public mixed`
`__call( string $method, array $args )`

Magic method used to retrieve a command

#### Parameters

$method
  `string`
  $method Name of the command object to instantiate
$args
  `array`
  $args Arguments to pass to the command

#### Returns

`mixed`
Returns the result of the command

#### Throws

``BadMethodCallException``
when a command is not found

#### Overrides

`Guzzle\Service\Client::__call`
# `public `Aws\Common\Credentials\CredentialsInterface``
`getCredentials( )`

Returns the AWS credentials associated with the client

#### Returns

``Aws\Common\Credentials\CredentialsInterface``

#### Implementation of

`Aws\Common\Client\AwsClientInterface::getCredentials()`
# `public `Aws\Common\Client\AbstractClient``
`setCredentials( Aws\Common\Aws\Common\Credentials\CredentialsInterface $credentials )`

Sets the credentials object associated with the client

#### Parameters

$credentials
  ``Aws\Common\Credentials\CredentialsInterface``
  $credentials Credentials object to use

#### Returns

``Aws\Common\Client\AbstractClient``

#### Implementation of

`Aws\Common\Client\AwsClientInterface::setCredentials()`
# `public `Aws\Common\Signature\SignatureInterface``
`getSignature( )`

Returns the signature implementation used with the client

#### Returns

``Aws\Common\Signature\SignatureInterface``

#### Implementation of

`Aws\Common\Client\AwsClientInterface::getSignature()`
# `public array`
`getRegions( )`

Get a list of available regions and region data

#### Returns

`array`

#### Implementation of

`Aws\Common\Client\AwsClientInterface::getRegions()`
# `public string`
`getRegion( )`

Get the name of the region to which the client is configured to send requests

#### Returns

`string`

#### Implementation of

`Aws\Common\Client\AwsClientInterface::getRegion()`
# `public `Aws\Common\Client\AbstractClient``
`setRegion( string $region )`

Change the region to which the client is configured to send requests

#### Parameters

$region
  `string`
  $region Name of the region

#### Returns

``Aws\Common\Client\AbstractClient``

#### Implementation of

`Aws\Common\Client\AwsClientInterface::setRegion()`
# `public `Aws\Common\Client\AbstractClient``
`waitUntil( string $waiter, array $input = array() )`

Wait until a resource is available or an associated waiter returns true

#### Parameters

$waiter
  `string`
  $waiter Name of the waiter
$input
  `array`
  $input Values used as input for the underlying operation and to control the waiter

#### Returns

``Aws\Common\Client\AbstractClient``

#### Implementation of

`Aws\Common\Client\AwsClientInterface::waitUntil()`
# `public WaiterInterface`
`getWaiter( string $waiter, array $input = array() )`

Get a named waiter object

#### Parameters

$waiter
  `string`
  $waiter Name of the waiter
$input
  `array`
  $input Values used as input for the underlying operation and to control the waiter

#### Returns

`WaiterInterface`

#### Implementation of

`Aws\Common\Client\AwsClientInterface::getWaiter()`
# `public `Aws\Common\Client\AbstractClient``
`setWaiterFactory( Aws\Common\Aws\Common\Waiter\WaiterFactoryInterface $waiterFactory )`

Set the waiter factory to use with the client

#### Parameters

$waiterFactory
  ``Aws\Common\Waiter\WaiterFactoryInterface``
  $waiterFactory Factory used to create waiters

#### Returns

``Aws\Common\Client\AbstractClient``

#### Implementation of

`Aws\Common\Client\AwsClientInterface::setWaiterFactory()`
# `public `Aws\Common\Waiter\WaiterFactoryInterface``
`getWaiterFactory( )`

Get the waiter factory being used by the client

#### Returns

``Aws\Common\Waiter\WaiterFactoryInterface``

#### Implementation of

`Aws\Common\Client\AwsClientInterface::getWaiterFactory()`
# `public string`
`getApiVersion( )`

Get the API version of the client (e.g. 2006-03-01)

#### Returns

`string`

#### Implementation of

`Aws\Common\Client\AwsClientInterface::getApiVersion()`
# `public `Guzzle\Http\Message\Response`|array`
`send( array|RequestInterface $requests )`

Sends a single request or an array of requests in parallel

#### Parameters

$requests
  `array|RequestInterface`
  $requests One or more RequestInterface objects to send

#### Returns

``Guzzle\Http\Message\Response`|array`
Returns a single Response or an array of Response objects

#### Throws

``Aws\Common\Exception\TransferException``

#### Overrides

`Guzzle\Http\Client::send`

#### Implementation of

`Guzzle\Http\ClientInterface::send()`
# `public RequestInterface`
`createRequest( string $method = 'GET', string|array $uri = null, array|`Guzzle\Common\Collection` $headers = null, string|resource|array|EntityBodyInterface $body = null, array $options = array() )`

Ensures that the duplicate query string aggregator is used so that query string values are sent over the wire as foo=bar&foo=baz. Create and return a new RequestInterface configured for the client.

#### Parameters

$method
  `string`
  $method HTTP method. Defaults to GET
$uri
  `string|array`
  $uri Resource URI.
$headers
  `array|`Guzzle\Common\Collection``
  $headers HTTP headers
$body
  `string|resource|array|EntityBodyInterface`
  $body Entity body of request (POST/PUT) or response (GET)
$options
  `array`
  $options Array of options to apply to the request

#### Returns

`RequestInterface`

#### Throws

``Aws\Common\Exception\InvalidArgumentException``
if a URI array is passed that does not contain exactly two elements: the URI followed by template variables

#### Overrides

`Guzzle\Http\Client::createRequest`

#### Implementation of

`Guzzle\Http\ClientInterface::createRequest()`

### Methods inherited from Guzzle\Service\Client

`execute()`, `executeMultiple()`, `factory()`, `getCommand()`, `getCommandFactory()`, `getDescription()`, `getInflector()`, `getIterator()`, `getResourceIteratorFactory()`, `prepareCommand()`, `setCommandFactory()`, `setDescription()`, `setInflector()`, `setResourceIteratorFactory()`

### Methods inherited from Guzzle\Http\Client

`delete()`, `expandTemplate()`, `extractPharCacert()`, `get()`, `getBaseUrl()`, `getConfig()`, `getCurlMulti()`, `getDefaultOption()`, `getDefaultUserAgent()`, `getUriTemplate()`, `head()`, `initSsl()`, `options()`, `patch()`, `post()`, `prepareRequest()`, `put()`, `sendMultiple()`, `setBaseUrl()`, `setConfig()`, `setCurlMulti()`, `setDefaultOption()`, `setRequestFactory()`, `setSslVerification()`, `setUriTemplate()`, `setUserAgent()`

### Methods inherited from Guzzle\Common\AbstractHasDispatcher

`addSubscriber()`, `dispatch()`, `getEventDispatcher()`, `setEventDispatcher()`

### Magic methods summary

## Constants summary

### Constants inherited from Guzzle\Service\Client

`COMMAND_PARAMS`

### Constants inherited from Guzzle\Http\Client

`CURL_OPTIONS`, `DEFAULT_SELECT_TIMEOUT`, `DISABLE_REDIRECTS`, `MAX_HANDLES`, `REQUEST_OPTIONS`, `SSL_CERT_AUTHORITY`

### Constants inherited from Guzzle\Http\ClientInterface

`CREATE_REQUEST`, `HTTP_DATE`

## Properties summary

`protected `Aws\Common\Credentials\CredentialsInterface`` | $credentials | # AWS credentials
`protected `Aws\Common\Signature\SignatureInterface`` | $signature | # Signature implementation of the service
`protected `Aws\Common\Waiter\WaiterFactoryInterface`` | $waiterFactory | # Factory used to create waiter classes
`protected `Guzzle\Http\QueryAggregator\DuplicateAggregator`` | $aggregator | # Cached query aggregator

### Properties inherited from Guzzle\Service\Client

`$commandFactory`, `$inflector`, `$resourceIteratorFactory`, `$serviceDescription`

### Properties inherited from Guzzle\Http\Client

`$defaultHeaders`, `$requestFactory`, `$userAgent`

### Properties inherited from Guzzle\Common\AbstractHasDispatcher

`$eventDispatcher`