An Amazon EC2 interface that allows yout to run, terminate, reboot and describe Amazon Ec2 Instances.
category | Zend |
---|---|
package | Zend_Service_Amazon |
subpackage | Ec2 |
copyright | Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) |
license | New BSD License |
inherited_from | \Zend_Service_Amazon_Ec2_Abstract |
__construct($accessKey= null
, $secretKey= null
) : void
bundle(string $instanceId, string $s3Bucket, string $s3Prefix, integer $uploadExpiration = 1440
) : array
string
The instance you want to bundle
string
Where you want the ami to live on S3
string
The prefix you want to assign to the AMI on S3
integer
The expiration of the upload policy. Amazon recommends 12 hours or longer. This is based in nubmer of minutes. Default is 1440 minutes (24 hours)
array
containing the information on the new bundle operationcancelBundle(string $bundleId) : array
string
The ID of the bundle task to cancel
array
Information on the bundle taskdescribeBundle(string|array $bundleId = ''
) : array
string
array
A single or a list of bundle tasks that you want to find information for.
array
Information for the task that you requestedgetHttpClient() : \Zend_Http_Client
\Zend_Http_Client
setHttpClient(\Zend_Http_Client $httpClient)
\Zend_Http_Client
setKeys($accessKey, $secretKey) : void
setRegion(string $region)
string
_getAccessKey() : string
string
_getRegion() : string
string
_getS3UploadPolicy(string $bucketName, string $prefix, integer $expireInMinutes = 1440
) : string
string
Which bucket you want the ami to live in on S3
string
The prefix you want to assign to the AMI on S3
integer
The expiration of the upload policy. Amazon recommends 12 hours or longer. This is based in nubmer of minutes. Default is 1440 minutes (24 hours)
string
Base64 encoded string that is the upload policy_getSecretKey() : string
string
_signS3UploadPolicy(string $policy) : string
string
Base64 Encoded string that is the upload policy
string
SHA1 encoded S3 Upload PolicyaddRequiredParameters(array $parameters) : array
The required parameters are:
If a required parameter is already set in the $parameters array, it is overwritten.
array
the array to which to add the required parameters.
array
sendRequest(array $params = array()
) : \Zend_Service_Amazon_Ec2_Response
array
List of parameters to send with the request
\Zend_Service_Amazon_Ec2_Exception |
---|
\Zend_Service_Amazon_Ec2_Response
signParameters(array $paramaters) : string
This implements the Amazon Web Services signature, as per the following specification:
Sort all request parameters (including SignatureVersion and excluding Signature, the value of which is being created), ignoring case.
string
the signed data.checkForErrors(\Zend_Service_Amazon_Ec2_Response $response) : void
\Zend_Service_Amazon_Ec2_Response
the response object to check.
\Zend_Service_Amazon_Ec2_Exception |
if one or more errors are returned from Amazon. |
---|
$_accessKey : string
$_defaultAccessKey : string
null
$_defaultRegion : string
null
$_defaultSecretKey : string
null
$_ec2ApiVersion
'2009-04-04'
$_ec2Endpoint
'ec2.amazonaws.com'
$_ec2SignatureMethod
'HmacSHA256'
$_ec2SignatureVersion
'2'
$_httpClient : \Zend_Http_Client
null
$_httpTimeout
10
$_region : string
$_secretKey : string
$_validEc2Regions : array
array('eu-west-1', 'us-east-1')