|
Moodle
2.2.1
http://www.collinsharper.com
|


Public Member Functions | |
| __construct ($accessKey=null, $secretKey=null, $region=null) | |
Static Public Member Functions | |
| static | setRegion ($region) |
Protected Member Functions | |
| _getRegion () | |
| sendRequest (array $params=array()) | |
| addRequiredParameters (array $parameters) | |
| signParameters (array $paramaters) | |
Protected Attributes | |
| $_ec2Endpoint = 'ec2.amazonaws.com' | |
| $_ec2ApiVersion = '2009-04-04' | |
| $_ec2SignatureVersion = '2' | |
| $_ec2SignatureMethod = 'HmacSHA256' | |
| $_httpTimeout = 10 | |
| $_region | |
Static Protected Attributes | |
| static | $_defaultRegion = null |
| static | $_validEc2Regions = array('eu-west-1', 'us-east-1') |
Definition at line 47 of file Abstract.php.
| __construct | ( | $ | accessKey = null, |
| $ | secretKey = null, |
||
| $ | region = null |
||
| ) |
Create Amazon client.
| string | $access_key | Override the default Access Key |
| string | $secret_key | Override the default Secret Key |
| string | $region | Sets the AWS Region |
Definition at line 99 of file Abstract.php.
| _getRegion | ( | ) | [protected] |
Method to fetch the AWS Region
Definition at line 137 of file Abstract.php.

| addRequiredParameters | ( | array $ | parameters | ) | [protected] |
Adds required authentication and version parameters to an array of parameters
The required parameters are:
If a required parameter is already set in the $parameters array, it is overwritten.
| array | $parameters | the array to which to add the required parameters. |
Definition at line 200 of file Abstract.php.


| sendRequest | ( | array $ | params = array() | ) | [protected] |
Sends a HTTP request to the queue service using Zend_Http_Client
| array | $params | List of parameters to send with the request |
| Zend_Service_Amazon_Ec2_Exception |
Definition at line 149 of file Abstract.php.


| static setRegion | ( | $ | region | ) | [static] |
Set which region you are working in. It will append the end point automaticly
| string | $region |
Definition at line 122 of file Abstract.php.
| 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.
| array | $parameters | the parameters for which to get the signature. |
| string | $secretKey | the secret key to use to sign the parameters. |
Definition at line 232 of file Abstract.php.


$_defaultRegion = null [static, protected] |
Definition at line 77 of file Abstract.php.
$_ec2ApiVersion = '2009-04-04' [protected] |
The API version to use
Reimplemented in Zend_Service_Amazon_Ec2_CloudWatch.
Definition at line 57 of file Abstract.php.
$_ec2Endpoint = 'ec2.amazonaws.com' [protected] |
The HTTP query server
Reimplemented in Zend_Service_Amazon_Ec2_CloudWatch.
Definition at line 52 of file Abstract.php.
$_ec2SignatureMethod = 'HmacSHA256' [protected] |
Signature Encoding Method
Definition at line 67 of file Abstract.php.
$_ec2SignatureVersion = '2' [protected] |
Signature Version
Definition at line 62 of file Abstract.php.
$_httpTimeout = 10 [protected] |
Period after which HTTP request will timeout in seconds
Definition at line 72 of file Abstract.php.
$_region [protected] |
Definition at line 82 of file Abstract.php.
$_validEc2Regions = array('eu-west-1', 'us-east-1') [static, protected] |
Definition at line 89 of file Abstract.php.