An Amazon EC2 interface to create, describe, attach, detach and delete Elastic Block Storage Volumes and Snaphsots.
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
attachVolume(string $volumeId, string $instanceId, string $device) : array
string
The ID of the Amazon EBS volume
string
The ID of the instance to which the volume attaches
string
Specifies how the device is exposed to the instance (e.g., /dev/sdh).
array
createNewVolume(string $size, string $availabilityZone) : array
You must specify an availability zone when creating a volume. The volume and any instance to which it attaches must be in the same availability zone.
string
The size of the volume, in GiB.
string
The availability zone in which to create the new volume.
array
createSnapshot(string $volumeId) : array
string
The ID of the Amazon EBS volume to snapshot
array
createVolumeFromSnapshot(string $snapshotId, string $availabilityZone) : array
You must specify an availability zone when creating a volume. The volume and any instance to which it attaches must be in the same availability zone.
string
The snapshot from which to create the new volume.
string
The availability zone in which to create the new volume.
array
deleteSnapshot(string $snapshotId) : boolean
string
The ID of the Amazon EBS snapshot to delete
boolean
deleteVolume(string $volumeId) : boolean
string
The ID of the volume to delete
boolean
describeAttachedVolumes($instanceId)
describeSnapshot(string|array $snapshotId = null
) : array
string
array
The ID or arry of ID's of the Amazon EBS snapshot
array
describeVolume(string|array $volumeId = null
) : array
string
array
The ID or array of ID's of the volume(s) to list
array
detachVolume(string $volumeId, string $instanceId= null
, string $device= null
, boolean $force= false
) : array
string
The ID of the Amazon EBS volume
string
The ID of the instance from which the volume will detach
string
The device name
boolean
Forces detachment if the previous detachment attempt did not occur cleanly (logging into an instance, unmounting the volume, and detaching normally). This option can lead to data loss or a corrupted file system. Use this option only as a last resort to detach an instance from a failed instance. The instance will not have an opportunity to flush file system caches nor file system meta data.
array
getHttpClient() : \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
_getSecretKey() : string
string
addRequiredParameters(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')