Abstract Class Zend_Service_Amazon_Ec2_Abstract

Description

Provides the basic functionality to send a request to the Amazon Ec2 Query API

  • copyright: Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
  • abstract:
  • license: New BSD License

Located in /Service/Amazon/Ec2/Abstract.php (line 47)

Zend_Service_Abstract
   |
   --Zend_Service_Amazon_Abstract
      |
      --Zend_Service_Amazon_Ec2_Abstract
Direct descendents
Class Description
 class Zend_Service_Amazon_Ec2_Instance An Amazon EC2 interface that allows yout to run, terminate, reboot and describe Amazon Ec2 Instances.
 class Zend_Service_Amazon_Ec2_Ebs An Amazon EC2 interface to create, describe, attach, detach and delete Elastic Block Storage Volumes and Snaphsots.
 class Zend_Service_Amazon_Ec2_Availabilityzones An Amazon EC2 interface to query which Availibity Zones your account has access to.
 class Zend_Service_Amazon_Ec2_Region An Amazon EC2 interface to query which Regions your account has access to.
 class Zend_Service_Amazon_Ec2_Securitygroups An Amazon EC2 interface to create, delete, describe, grand and revoke sercurity permissions.
 class Zend_Service_Amazon_Ec2_Instance_Reserved Allows you to interface with the reserved instances on Amazon Ec2
 class Zend_Service_Amazon_Ec2_Instance_Windows An Amazon EC2 interface that allows yout to run, terminate, reboot and describe Amazon Ec2 Instances.
 class Zend_Service_Amazon_Ec2_CloudWatch An Amazon EC2 interface that allows yout to run, terminate, reboot and describe Amazon Ec2 Instances.
 class Zend_Service_Amazon_Ec2_Image An Amazon EC2 interface to register, describe and deregister Amamzon Machine Instances (AMI)
 class Zend_Service_Amazon_Ec2_Keypair An Amazon EC2 interface to create, delete and describe Ec2 KeyPairs.
 class Zend_Service_Amazon_Ec2_Elasticip An Amazon EC2 interface to allocate, associate, describe and release Elastic IP address from your account.
Variable Summary
Method Summary
 static void setRegion (string $region)
 void __construct ([ $accessKey = null], [ $secretKey = null], [string $region = null], string $access_key, string $secret_key)
 array addRequiredParameters ( $parameters)
 string signParameters ( $paramaters, array $parameters, string $secretKey)
 string _getRegion ()
Variables
static string $_defaultRegion = null (line 77)
  • var: Amazon Region
  • access: protected
static array $_validEc2Regions = array('eu-west-1', 'us-east-1') (line 89)

An array that contains all the valid Amazon Ec2 Regions.

  • access: protected
mixed $_ec2ApiVersion = '2009-04-04' (line 57)

The API version to use

  • access: protected

Redefined in descendants as:
mixed $_ec2Endpoint = 'ec2.amazonaws.com' (line 52)

The HTTP query server

  • access: protected

Redefined in descendants as:
mixed $_ec2SignatureMethod = 'HmacSHA256' (line 67)

Signature Encoding Method

  • access: protected
mixed $_ec2SignatureVersion = '2' (line 62)

Signature Version

  • access: protected
mixed $_httpTimeout = 10 (line 72)

Period after which HTTP request will timeout in seconds

  • access: protected
string $_region (line 82)
  • var: Amazon Region
  • access: protected

Inherited Variables

Inherited from Zend_Service_Amazon_Abstract

Zend_Service_Amazon_Abstract::$_accessKey
Zend_Service_Amazon_Abstract::$_defaultAccessKey
Zend_Service_Amazon_Abstract::$_defaultSecretKey
Zend_Service_Amazon_Abstract::$_secretKey

Inherited from Zend_Service_Abstract

Zend_Service_Abstract::$_httpClient
Methods
static setRegion (line 122)

Set which region you are working in. It will append the end point automaticly

  • access: public
static void setRegion (string $region)
  • string $region
Constructor __construct (line 99)

Create Amazon client.

  • access: public
void __construct ([ $accessKey = null], [ $secretKey = null], [string $region = null], string $access_key, string $secret_key)
  • string $access_key: Override the default Access Key
  • string $secret_key: Override the default Secret Key
  • string $region: Sets the AWS Region
  • $accessKey
  • $secretKey

Redefinition of:
Zend_Service_Amazon_Abstract::__construct()
Create Amazon client.
addRequiredParameters (line 200)

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 <tt>$parameters</tt> array, it is overwritten.

  • access: protected
array addRequiredParameters ( $parameters)
  • array $parameters: the array to which to add the required parameters.
sendRequest (line 149)

Sends a HTTP request to the queue service using Zend_Http_Client

  • throws: Zend_Service_Amazon_Ec2_Exception
  • access: protected
Zend_Service_Amazon_Ec2_Response sendRequest ([ $params = array()])
  • array $params: List of parameters to send with the request
signParameters (line 232)

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 <tt>SignatureVersion</tt> and excluding <tt>Signature</tt>, 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.

  • return: the signed data.
  • access: protected
string signParameters ( $paramaters, array $parameters, string $secretKey)
  • array $parameters: the parameters for which to get the signature.
  • string $secretKey: the secret key to use to sign the parameters.
  • array $paramaters
_getRegion (line 137)

Method to fetch the AWS Region

  • access: protected
string _getRegion ()

Inherited Methods

Inherited From Zend_Service_Amazon_Abstract

 Zend_Service_Amazon_Abstract::__construct()
 Zend_Service_Amazon_Abstract::setKeys()
 Zend_Service_Amazon_Abstract::_getAccessKey()
 Zend_Service_Amazon_Abstract::_getSecretKey()

Inherited From Zend_Service_Abstract

 Zend_Service_Abstract::getHttpClient()
 Zend_Service_Abstract::setHttpClient()

Documentation generated on Mon, 21 Jun 2010 15:04:57 -0400 by phpDocumentor 1.4.3