API Documentation

Service/Amazon/Ec2/Abstract.php

Includes Classes 
category
Zend
copyright
Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
license
http://framework.zend.com/license/new-bsd New BSD License
package
Zend_Service_Amazon
subpackage
Ec2
version
$Id: Abstract.php 20096 2010-01-06 02:05:09Z bkarwin $
Classes
Zend_Service_Amazon_Ec2_Abstract

Description

Zend Framework

LICENSE

This source file is subject to the new BSD license that is bundled with this package in the file LICENSE.txt. It is also available through the world-wide-web at this URL: http://framework.zend.com/license/new-bsd If you did not receive a copy of the license and are unable to obtain it through the world-wide-web, please send an email to license@zend.com so we can send you a copy immediately.

Zend_Service_Amazon_Ec2_Abstract

Extends from
Zend_Service_Amazon_Abstract
category
Zend
copyright
Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
license
http://framework.zend.com/license/new-bsd New BSD License
package
Zend_Service_Amazon
subpackage
Ec2
Properties
$_ec2Endpoint
$_ec2ApiVersion
$_ec2SignatureVersion
$_ec2SignatureMethod
$_httpTimeout
$_defaultRegion
$_region
$_validEc2Regions
Methods
__construct
setRegion
_getRegion
sendRequest
addRequiredParameters
signParameters
checkForErrors

Description

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

Properties

$_defaultRegion

string $_defaultRegion = 'null'

Details

$_defaultRegion
string
Amazon Region
visibility
protected
default
null
final
false
static
true

$_ec2ApiVersion

 $_ec2ApiVersion = '2009-04-04'

The API version to use

Details

visibility
protected
default
2009-04-04
final
false
static
false

$_ec2Endpoint

 $_ec2Endpoint = 'ec2.amazonaws.com'

The HTTP query server

Details

visibility
protected
default
ec2.amazonaws.com
final
false
static
false

$_ec2SignatureMethod

 $_ec2SignatureMethod = 'HmacSHA256'

Signature Encoding Method

Details

visibility
protected
default
HmacSHA256
final
false
static
false

$_ec2SignatureVersion

 $_ec2SignatureVersion = '2'

Signature Version

Details

visibility
protected
default
2
final
false
static
false

$_httpTimeout

 $_httpTimeout = '10'

Period after which HTTP request will timeout in seconds

Details

visibility
protected
default
10
final
false
static
false

$_region

string $_region = ''

Details

$_region
string
Amazon Region
visibility
protected
default
final
false
static
false

$_validEc2Regions

array $_validEc2Regions = 'array'

An array that contains all the valid Amazon Ec2 Regions.

Details

$_validEc2Regions
array
visibility
protected
default
array
final
false
static
true

Methods

__construct

__construct(  $accessKey = null,  $secretKey = null, string $region = null ) : void

Create Amazon client.

Arguments
$accessKey
$secretKey
$region
string
Sets the AWS Region
Details
visibility
public
final
false
static
false

_getRegion

_getRegion( ) : string

Method to fetch the AWS Region

Output
string
Details
visibility
protected
final
false
static
false

addRequiredParameters

addRequiredParameters( array $parameters ) : array

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.

Arguments
$parameters
array
the array to which to add the required parameters.
Output
array
Details
visibility
protected
final
false
static
false

checkForErrors

checkForErrors( Zend_Service_Amazon_Ec2_Response $response ) : void

Checks for errors responses from Amazon

Arguments
$response
Zend_Service_Amazon_Ec2_Response
the response object to check.
Details
visibility
private
final
false
static
false
throws
if one or more errors are returned from Amazon.

sendRequest

sendRequest( array $params = array ) : Zend_Service_Amazon_Ec2_Response

Sends a HTTP request to the queue service using Zend_Http_Client

Arguments
$params
array
List of parameters to send with the request
Details
visibility
protected
final
false
static
false
throws

setRegion

setRegion( string $region ) :

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

Arguments
$region
string
Details
visibility
public
final
false
static
true

signParameters

signParameters(  $paramaters ) : string

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.

Arguments
$paramaters
Output
string
the signed data.
Details
visibility
protected
final
false
static
false
Documentation was generated by DocBlox.