Class DefaultClient
Generic client for interacting with an AWS service
- 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
- Aws\Common\Client\DefaultClient
Methods summary
-
public static
factory ( array|Collection $config = array() )
Factory method to create a default client using an array of configuration options.
Methods detail
public static
Aws\Common\Client\DefaultClient
factory( array|Guzzle\Common\Collection
$config = array() )
Factory method to create a default client using an array of configuration options.
The following array keys and values are available options:
Credential options ((key
, secret
, and optional
token
) OR credentials
is required):
- key: AWS Access Key ID
- secret: AWS secret access key
- credentials: You can optionally provide a custom
Aws\Common\Credentials\CredentialsInterface
object - token: Custom AWS security token to use with request authentication. Please note that not all services accept temporary credentials. See http://docs.aws.amazon.com/STS/latest/UsingSTS/UsingTokens.html
- token.ttd: UNIX timestamp for when the custom credentials expire
- credentials.cache.key: Optional custom cache key to use with the credentials
- credentials.client: Pass this option to specify a custom
Guzzle\Http\ClientInterface
to use if your credentials require a HTTP request (e.g. RefreshableInstanceProfileCredentials)
Region and endpoint options (Some services do not require a region while others do. Check the service specific user guide documentation for details):
- region: Region name (e.g. 'us-east-1', 'us-west-1', 'us-west-2', 'eu-west-1', etc...)
- scheme: URI Scheme of the base URL (e.g. 'https', 'http') used when endpoint is not supplied
- endpoint: Allows you to specify a custom endpoint instead of building one from the region and scheme
Generic client options:
- signature: Overrides the signature used by the client. Clients will always choose an appropriate default signature. However, it can be useful to override this with a custom setting. This can be set to "v4", "v3https", "v2" or an instance of Aws\Common\Signature\SignatureInterface.
- ssl.certificate_authority: Set to true to use the bundled CA cert or pass the full path to an SSL certificate bundle
- curl.options: Associative of CURLOPT_* cURL options to add to each request
- client.backoff.logger:
Guzzle\Log\LogAdapterInterface
object used to log backoff retries. Use 'debug' to emit PHP warnings when a retry is issued. - client.backoff.logger.template: Optional template to use for exponential
backoff log messages. See
Guzzle\Plugin\Backoff\BackoffLogger
for formatting information.
Parameters
- $config
array|
Guzzle\Common\Collection
$config Client configuration data
Returns
Overrides
Methods inherited from Aws\Common\Client\AbstractClient
__call()
,
__construct()
,
createRequest()
,
getAllEvents()
,
getApiVersion()
,
getCredentials()
,
getRegion()
,
getRegions()
,
getSignature()
,
getWaiter()
,
getWaiterFactory()
,
send()
,
setCredentials()
,
setRegion()
,
setWaiterFactory()
,
waitUntil()
Methods inherited from Guzzle\Service\Client
execute()
,
executeMultiple()
,
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
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
Properties summary
Properties inherited from Aws\Common\Client\AbstractClient
$aggregator
,
$credentials
,
$signature
,
$waiterFactory
Properties inherited from Guzzle\Service\Client
$commandFactory
,
$inflector
,
$resourceIteratorFactory
,
$serviceDescription
Properties inherited from Guzzle\Http\Client
$defaultHeaders
,
$requestFactory
,
$userAgent