Zend Framework  1.12
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Static Protected Attributes | List of all members
Zend_Service_Amazon_Ec2_Abstract Class Reference

Public Member Functions

 __construct ($accessKey=null, $secretKey=null, $region=null)
 Create Amazon client.
 
- Public Member Functions inherited from Zend_Service_Amazon_Abstract
 __construct ($accessKey=null, $secretKey=null)
 Create Amazon client.
 

Static Public Member Functions

static setRegion ($region)
 Set which region you are working in.
 
- Static Public Member Functions inherited from Zend_Service_Amazon_Abstract
static setKeys ($accessKey, $secretKey)
 Set the keys to use when accessing SQS.
 
- Static Public Member Functions inherited from Zend_Service_Abstract
static setHttpClient (Zend_Http_Client $httpClient)
 Sets the HTTP client object to use for retrieving the feeds.
 
static getHttpClient ()
 Gets the HTTP client object.
 

Protected Member Functions

 _getRegion ()
 Method to fetch the AWS Region.
 
 sendRequest (array $params=array())
 Sends a HTTP request to the queue service using Zend_Http_Client.
 
 addRequiredParameters (array $parameters)
 Adds required authentication and version parameters to an array of parameters.
 
 signParameters (array $paramaters)
 Computes the RFC 2104-compliant HMAC signature for request parameters.
 
- Protected Member Functions inherited from Zend_Service_Amazon_Abstract
 _getAccessKey ()
 Method to fetch the Access Key.
 
 _getSecretKey ()
 Method to fetch the Secret AWS Key.
 

Protected Attributes

 $_ec2Endpoint = 'ec2.amazonaws.com'
 The HTTP query server.
 
 $_ec2ApiVersion = '2009-04-04'
 The API version to use.
 
 $_ec2SignatureVersion = '2'
 Signature Version.
 
 $_ec2SignatureMethod = 'HmacSHA256'
 Signature Encoding Method.
 
 $_httpTimeout = 10
 Period after which HTTP request will timeout in seconds.
 
 $_region
 
- Protected Attributes inherited from Zend_Service_Amazon_Abstract
 $_secretKey
 
 $_accessKey
 

Static Protected Attributes

static $_defaultRegion = null
 
static $_validEc2Regions = array('eu-west-1', 'us-east-1')
 
- Static Protected Attributes inherited from Zend_Service_Amazon_Abstract
static $_defaultAccessKey = null
 
static $_defaultSecretKey = null
 
- Static Protected Attributes inherited from Zend_Service_Abstract
static $_httpClient = null
 

Constructor & Destructor Documentation

__construct (   $accessKey = null,
  $secretKey = null,
  $region = null 
)

Create Amazon client.

Parameters
string$access_keyOverride the default Access Key
string$secret_keyOverride the default Secret Key
string$regionSets the AWS Region
Returns
void

Member Function Documentation

_getRegion ( )
protected

Method to fetch the AWS Region.

Returns
string
addRequiredParameters ( array  $parameters)
protected

Adds required authentication and version parameters to an array of parameters.

The required parameters are:

  • AWSAccessKey
  • SignatureVersion
  • Timestamp
  • Version and
  • Signature

If a required parameter is already set in the $parameters array, it is overwritten.

Parameters
array$parametersthe array to which to add the required parameters.
Returns
array
sendRequest ( array  $params = array())
protected

Sends a HTTP request to the queue service using Zend_Http_Client.

Parameters
array$paramsList of parameters to send with the request
Returns
Zend_Service_Amazon_Ec2_Response
Exceptions
Zend_Service_Amazon_Ec2_Exception
static setRegion (   $region)
static

Set which region you are working in.

It will append the end point automaticly

Parameters
string$region
signParameters ( array  $paramaters)
protected

Computes the RFC 2104-compliant HMAC signature for request parameters.

This implements the Amazon Web Services signature, as per the following specification:

1. Sort all request parameters (including SignatureVersion and excluding Signature, the value of which is being created), ignoring case.

2. Iterate over the sorted list and append the parameter name (in its original case) and then its value. Do not URL-encode the parameter values before constructing this string. Do not use any separator characters when appending strings.

Parameters
array$parametersthe parameters for which to get the signature.
string$secretKeythe secret key to use to sign the parameters.
Returns
string the signed data.

Member Data Documentation

$_defaultRegion = null
staticprotected
$_ec2ApiVersion = '2009-04-04'
protected

The API version to use.

$_ec2Endpoint = 'ec2.amazonaws.com'
protected

The HTTP query server.

$_ec2SignatureMethod = 'HmacSHA256'
protected

Signature Encoding Method.

$_ec2SignatureVersion = '2'
protected

Signature Version.

$_httpTimeout = 10
protected

Period after which HTTP request will timeout in seconds.

$_region
protected
$_validEc2Regions = array('eu-west-1', 'us-east-1')
staticprotected