View Source

<ac:macro ac:name="unmigrated-inline-wiki-markup"><ac:plain-text-body><![CDATA[{composition-setup}{composition-setup}]]></ac:plain-text-body></ac:macro>
<ac:macro ac:name="unmigrated-inline-wiki-markup"><ac:plain-text-body><![CDATA[{zone-template-instance:ZFPROP:Proposal Zone Template}

{zone-data:component-name}
Zend_Service_Amazon_Ec2
{zone-data}

{zone-data:proposer-list}
[Jon Whitcraft|mailto:jon.zf@mac.com]
{zone-data}

{zone-data:liaison}
TBD
{zone-data}

{zone-data:revision}
1.0 - 10 March 2009: Initial Draft.
1.1 - 11 March 2009: Completed Use Cases and make ready for community review.
1.1.1 - 23 March 2009: Updated developer docs to version 2008-12-01.
{zone-data}

{zone-data:overview}
Zend Service Amamzon Ec2 will hook into the Amazon Elastic Compute Cloud Query API to provide access to the methods to manage Amazon EC2.
{zone-data}

{zone-data:references}
* [Developer API|http://docs.amazonwebservices.com/AWSEC2/2008-12-01/DeveloperGuide/]
{zone-data}

{zone-data:requirements}
* This component *will* make use of a factory method to load the parts that you need instead of loading everything
* This component *will* allow you to start, terminate, discribe instances.
* This component *will* allow you to create, describe, and delete keypairs.
* This component *will* allow you to make use of the Elastic IP methods.
* This component *will* allow you to make sue of the Elastic Block Storage devices (EBS).
* This component *will* allow you to create, modify and delete security groups.
* This component *will* allow you to maintain AMIs (Amazon Machine Instances).
* This component *will* allow you to statically set your access keys via static methods so you can set it once and forget it.
* This component *will* allow you to specify alternate access keys when you create the object by passing them in as variables to the construct functions.
{zone-data}

{zone-data:dependencies}
* [Zend_Service_Amazon_Abstract|http://framework.zend.com/issues/browse/ZF-5791]
* [Zend_Crypt|http://framework.zend.com/wiki/pages/viewpage.action?pageId=35309]
{zone-data}

{zone-data:operation}
Create an interface to allow easy execute of the EC2 Query URL API from with-in the Zend Framework. You will be able to start and terminate instances. You will also be able to maintain your AMIs, Elastic Ips, EBS Volumes, Key Pairs and Security Groups.
{zone-data}

{zone-data:milestones}
* *\[Done\]* Milestone 1: Classes Skeletons and Use Cases
* Milestone 2: Working prototype checked into the incubator supporting use cases #1, #2, #3 and #4
* Milestone 3: Working prototype checked into the incubator supporting use cases #5, #6 and #7.
* Milestone 4: Unit tests exist, work, and are checked into SVN.
* Milestone 5: Initial documentation exists.

{zone-data}

{zone-data:class-list}
* Zend_Service_Amazon_Ec2
* Zend_Service_Amazon_Ec2_Abstract
* Zend_Service_Amazon_Ec2_Availabilityzones
* Zend_Service_Amazon_Ec2_Ebs
* Zend_Service_Amazon_Ec2_Elasticip
* Zend_Service_Amazon_Ec2_Exception
* Zend_Service_Amazon_Ec2_Image
* Zend_Service_Amazon_Ec2_Instance
* Zend_Service_Amazon_Ec2_Keypair
* Zend_Service_Amazon_Ec2_Securitygroups
{zone-data}

{zone-data:use-cases}
{deck:id=Class Skeletions}

{card:label=UC1: Instance}
{code:php}
$instance = Zend_Service_Amazon_Ec2::factory('instance', 'access_key', 'secret_access_key');
$instance_id = $instance->run('amiId', 1, 1, 'mykey');
print $instance->describe($instance_id);
$instance->terminate($instance_id);
{code}
{card}

{card:label=UC2: KeyPair}
{code:php}
$keypair = Zend_Zend_Service_Amazon_Ec2::factory('keypair', 'access_key', 'secret_access_key');
$key = $keypair->create('mykey');
print $keypair->describe('mykey');
$keypair->delete('mykey');
{code}
{card}

{card:label=UC3: Image}
{code:php}
$aim = Zend_Zend_Service_Amazon_Ec2::factory('register', 'access_key', 'secret_access_key');

$ami_id = $aim->register('path to image');
print $ami->describe($ami_id);
$ami->modifyAttribute($ami_id, 'launchPermission', 'add', 'aws_serid', 'all');
$ami->describeAttribute($ami_id, 'launchPermission');
$ami->resetAttribute($ami_id, 'launchPermission');
$ami->deregister($ami_id);
{code}
{card}

{card:label=UC4: Availability Zones}
This will describe the zones which are aviable to your account. You can also pass in a zone to see the info on just that zone.
{code:php}
$azone = Zend_Zend_Service_Amazon_Ec2::factory('avaliabilityzones', 'access_key', 'secret_access_key');
print $azone->describe();
{code}
{card}

{card:label=UC5: Ebs Volumes}
{code:php}
$ebs = Zend_Zend_Service_Amazon_Ec2::factory('ebs', 'access_key', 'secret_access_key');
$volume_id = $ebs->createVolume(50); // create a 50 gig volume
$ebs->describeVolume($volume_id); // describe a specific volume or if you dont pass an id descrive all your volumes.
$ebs->attachVolume($volume_id, $instance_id, '/dev/sdh'); // attach a volume to an instance at the passed device.
$ebs->detachVolume($volume_id); // detach a volume from an instance. you can also pass the $instance_id, $device and force it.


$snapshotId = $ebs->createSnapshot($volume_id); // create a snapshot of the volumen
$ebs->describeShapshot($snapshotId); // describe the snapshot;
$ebs->deleteSnapshot($snapshotId); // remove a snapshot;

{code}
{card}

{card:label=UC6: Elastic IP}
{code:php}
$eip = Zend_Zend_Service_Amazon_Ec2::factory('elasticip', 'access_key', 'secret_access_key');
$ip = $eip->allocate(); // get a new elastic ip
print $eip->descirbe($ip); // describe a given elastic ip
$eip->release($ip); // release an ip from your account;

$eip->associate($instance_id, $ip); // assign an elastic ip to an instance
$eip->disassocate($ip); // unassign an elastic ip from an instance

{code}
{card}


{card:label=UC7: Security Groups}
{code:php}
$security = Zend_Zend_Service_Amazon_Ec2::factory('security', 'access_key', 'secret_access_key');
$security->create('newgroup', 'my new group');
$security->describe('newgroup');
$security->delete('newgroup');

$security->authorize('newgroup', null, null, 'tcp', '22', '22', '0.0.0.0/0'); // add ports to a group
$security->revoke('newgroup', null, null, 'tcp', '22', '22', '0.0.0.0/0'); // revoke ports from a group.
{code}
{card}

{deck}
{zone-data}

{zone-data:skeletons}
{deck:id=Class Skeletions}
{card:label=Zend_Service_Amazon_Ec2}
{code:php}
<?php

class Zend_Service_Amazon_Ec2
{
/**
* Factory method to fetch what you want to work with.
*
* @param string $section Create the method that you want to work with
* @param string $key Override the default aws key
* @param string $secret_key Override the default aws secretkey
*/
public static function factory($section, $key = '', $secret_key = ''){}
}
{code}
{card}

{card:label=Zend_Service_Amazon_Ec2_Abstract}
{code:php}
<?php

require_once '/Zend/Service/Amazon/Abstract.php';

abstract class Zend_Service_Amazon_Ec2_Abstract extends Zend_Service_Amazon_Abstract
{
/**
* The HTTP query server
*/
const EC2_ENDPOINT = 'ec2.amazonaws.com';

/**
* The API version to use
*/
const EC2_API_VERSION = '2008-05-05';

/**
* Legacy parameter required by Ec2
*/
const EC2_SIGNATURE_VERSION = '1';

/**
* Period after which HTTP request will timeout in seconds
*/
const HTTP_TIMEOUT = 10;

/**
* Sends a HTTP request to the queue service using Zend_Http_Client
*
*/
protected function sendRequest(array $params = array())
{
$url = 'http://' . self::EC2_ENDPOINT . '/';

$params = $this->addRequiredParameters($params);

try {
/* @var $request Zend_Http_Client */
$request = self::getHttpClient();

$request->setConfig(array(
'timeout' => self::HTTP_TIMEOUT
));

$request->setUri($url);
$request->setMethod(Zend_Http_Client::POST);
$request->setParameterPost($params);

$httpResponse = $request->request();


} catch (Zend_Http_Client_Exception $zhce) {
$message = 'Error in request to AWS service: ' . $zhce->getMessage();
throw new Zend_Service_Amazon_Ec2_Exception($message, $zhce->getCode());
}

//$response = new Zend_Service_Amazon_Sqs_Response($httpResponse);

//$this->checkForErrors($response);

return $httpResponse;
}

/**
* 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.
*
* @param array $parameters the array to which to add the required
* parameters.
*
* @return array
*/
protected function addRequiredParameters(array $parameters)
{
$parameters['AWSAccessKeyId'] = $this->getAccessKey();
$parameters['SignatureVersion'] = self::EC2_SIGNATURE_VERSION;
$parameters['Timestamp'] = gmdate('c');
$parameters['Version'] = self::EC2_API_VERSION;
$parameters['Signature'] = $this->signParameters($parameters);

return $parameters;
}

/**
* 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.
*
* @param array $parameters the parameters for which to get the signature.
* @param string $secretKey the secret key to use to sign the parameters.
*
* @return string the signed data.
*/
protected function signParameters(array $paramaters)
{
$data = '';

uksort($paramaters, 'strcasecmp');
unset($paramaters['Signature']);

foreach($paramaters as $key => $value) {
$data .= $key . $value;
}

require_once 'Zend/Crypt/Hmac.php';
$hmac = Zend_Crypt_Hmac::compute($this->getSecretKey(), 'SHA1', $data, Zend_Crypt_Hmac::BINARY);

return base64_encode($hmac);
}
}
{code}
{card}

{card:label=Zend_Service_Amazon_Ec2_Availabilityzones}
{code:php}
<?php

require_once 'Zend/Service/Amazon/Ec2/Abstract.php';

class Zend_Service_Amazon_Ec2_Availabilityzones extends Zend_Service_Amazon_Ec2_Abstract
{
/**
* Describes availability zones that are currently available to the account and their states.
*
* @param string|array $zoneName Name of an availability zone.
*/
public function describe($zoneName = null)
{

}
}
{code}
{card}

{card:label=Zend_Service_Amazon_Ec2_Ebs}
{code:php}
<?php

require_once '/Zend/Service/Amazon/Ec2/Abstract.php';

class Zend_Service_Amazon_Ec2_Ebs extends Zend_Service_Amazon_Ec2_Abstract
{
/**
* Creates a new Amazon EBS volume that you can mount from any Amazon EC2 instance.
*
* @param string $size The size of the volume, in GiB.
* @param string $snapshotId The snapshot from which to create the new volume.
* @param string $availabilityZone The availability zone in which to create the new volume.
*/
public function createVolume($size, $snapshotId = null, $availabilityZone = null){}

/**
* Lists one or more Amazon EBS volumes that you own, If you do not
* specify any volumes, Amazon EBS returns all volumes that you own.
*
* @param string|array $volumeId The ID or array of ID's of the volume(s) to list
*/
public function describeVolume($volumeId = null){}

/**
* Attaches an Amazon EBS volume to an instance
*
* @param string $volumeId The ID of the Amazon EBS volume
* @param string $instanceId The ID of the instance to which the volume attaches
* @param string $device Specifies how the device is exposed to the instance (e.g., /dev/sdh).
*/
public function attachVolume($volumeId, $instanceId, $device){}

/**
* Detaches an Amazon EBS volume from an instance
*
* @param string $volumeId The ID of the Amazon EBS volume
* @param string $instanceId The ID of the instance from which the volume will detach
* @param string $device The device name
* @param boolean $force 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.
*/
public function detachVolume($volumeId, $instanceId = null, $device = null, $force = false){}

/**
* Creates a snapshot of an Amazon EBS volume and stores it in Amazon S3. You can use snapshots for backups,
* to launch instances from identical snapshots, and to save data before shutting down an instance
*
* @param string $volumeId The ID of the Amazon EBS volume to snapshot
*/
public function createSnapshot($volumeId){}

/**
* Describes the status of Amazon EBS snapshots
*
* @param string|array $snapshotId The ID or arry of ID's of the Amazon EBS snapshot
*/
public function describeSnapshot($snapshotId = null){}

/**
* Deletes a snapshot of an Amazon EBS volume that is stored in Amazon S3
*
* @param string $snapshotId The ID of the Amazon EBS snapshot to delete
*/
public function deleteSnapshot($snapshotId){}
}

{code}
{card}

{card:label=Zend_Service_Amazon_Ec2_Elasticip}
{code:php}
<?php

require_once '/Zend/Service/Amazon/Ec2/Abstract.php';

class Zend_Service_Amazon_Ec2_Elasticip extends Zend_Service_Amazon_Ec2_Abstract
{
/**
* Acquires an elastic IP address for use with your account
*
*/
public function allocate(){}

/**
* Lists elastic IP addresses assigned to your account.
*
* @param string|array $publicIp Elastic IP or list of addresses to describe.
*/
public function describe($publicIp = null){}

/**
* Releases an elastic IP address associated with your account
*
* @param string $publicIp IP address that you are releasing from your account.
*/
public function release($publicIp){}

/**
* Associates an elastic IP address with an instance
*
* @param string $instanceId The instance to which the IP address is assigned
* @param string $publicIp IP address that you are assigning to the instance.
*/
public function associate($instanceId, $publicIp){}

/**
* Disassociates the specified elastic IP address from the instance to which it is assigned.
* This is an idempotent operation. If you enter it more than once, Amazon EC2 does not return an error.
*
* @param string $publicIp IP address that you are disassociating from the instance.
*/
public function disassocate($publicIp){}

}
{code}
{card}

{deck}
{deck:id=Class Skeletions}


{card:label=Zend_Service_Amazon_Ec2_Exception}
{code:php}
<?php

require_once 'Zend/Service/Amazon/Exception.php';

class Zend_Service_Amazon_Ec2_Exception extends Zend_Service_Amazon_Exception
{}

{code}
{card}


{card:label=Zend_Service_Amazon_Ec2_Image}
{code:php}
<?php

require_once '/Zend/Service/Amazon/Ec2/Abstract.php';

class Zend_Service_Amazon_Ec2_Image extends Zend_Service_Amazon_Ec2_Abstract
{
/**
* Registers an AMI with Amazon EC2. Images must be registered before
* they can be launched.
*
* Each AMI is associated with an unique ID which is provided by the Amazon
* EC2 service through the RegisterImage operation. During registration, Amazon
* EC2 retrieves the specified image manifest from Amazon S3 and verifies that
* the image is owned by the user registering the image.
*
* The image manifest is retrieved once and stored within the Amazon EC2.
* Any modifications to an image in Amazon S3 invalidates this registration.
* If you make changes to an image, deregister the previous image and register
* the new image. For more information, see DeregisterImage.
*
* @param string $imageLocation Full path to your AMI manifest in Amazon S3 storage.
*/
public function register($imageLocation){}

/**
* Returns information about AMIs, AKIs, and ARIs available to the user.
* Information returned includes image type, product codes, architecture,
* and kernel and RAM disk IDs. Images available to the user include public
* images available for any user to launch, private images owned by the user
* making the request, and private images owned by other users for which the
* user has explicit launch permissions.
*
* Launch permissions fall into three categories:
* public: The owner of the AMI granted launch permissions for the AMI
* to the all group. All users have launch permissions for these AMIs.
* explicit: The owner of the AMI granted launch permissions to a specific user.
* implicit: A user has implicit launch permissions for all AMIs he or she owns.
*
* The list of AMIs returned can be modified by specifying AMI IDs, AMI owners,
* or users with launch permissions. If no options are specified, Amazon EC2 returns
* all AMIs for which the user has launch permissions.
*
* If you specify one or more AMI IDs, only AMIs that have the specified IDs are returned.
* If you specify an invalid AMI ID, a fault is returned. If you specify an AMI ID for which
* you do not have access, it will not be included in the returned results.
*
* If you specify one or more AMI owners, only AMIs from the specified owners and for
* which you have access are returned. The results can include the account IDs of the
* specified owners, amazon for AMIs owned by Amazon or self for AMIs that you own.
*
* If you specify a list of executable users, only users that have launch permissions
* for the AMIs are returned. You can specify account IDs (if you own the AMI(s)), self
* for AMIs for which you own or have explicit permissions, or all for public AMIs.
*
* @param string|array $imageId A list of image descriptions
* @param string|array $owner Owners of AMIs to describe.
* @param string|array $executableBy AMIs for which specified users have access.
*/
public function describe($imageId = null, $owner = null, $executableBy = null){}

/**
* Deregisters an AMI. Once deregistered, instances of the AMI can no longer be launched.
*
* @param string $imageId Unique ID of a machine image, returned by a call
* to RegisterImage or DescribeImages.
*/
public function deregister($imageId){}

/**
* Modifies an attribute of an AMI.
*
* Valid Attributes:
* launchPermission: Controls who has permission to launch the AMI. Launch permissions
* can be granted to specific users by adding userIds.
* To make the AMI public, add the all group.
* productCodes: Associates a product code with AMIs. This allows developers to
* charge users for using AMIs. The user must be signed up for the
* product before they can launch the AMI. This is a write once attribute;
* after it is set, it cannot be changed or removed.
*
* @param string $imageId AMI ID to modify.
* @param string $attribute Specifies the attribute to modify. See the preceding
* attributes table for supported attributes.
* @param string $operationType Specifies the operation to perform on the attribute.
* See the preceding attributes table for supported operations for attributes.
* Valid Values: add | remove
* Required for launchPermssion Attribute
*
* @param string|array $userId User IDs to add to or remove from the launchPermission attribute.
* Required for launchPermssion Attribute
* @param string|array $userGroup User groups to add to or remove from the launchPermission attribute.
* Currently, the all group is available, which will make it a public AMI.
* Required for launchPermssion Attribute
* @param string $productCode Attaches a product code to the AMI. Currently only one product code
* can be associated with an AMI. Once set, the product code cannot be changed or reset.
* Required for productCodes Attribute
*/
public function modifyattribute($imageId, $attribute, $operationType, $userId = null, $userGroup = null, $productCode = null){}

/**
* Returns information about an attribute of an AMI. Only one attribute can be specified per call.
*
* @param string $imageId ID of the AMI for which an attribute will be described.
* @param string $attribute Specifies the attribute to describe
*/
public function describeattribute($imageId, $attribute){}

/**
* Resets an attribute of an AMI to its default value. The productCodes attribute cannot be reset
*
* @param string $imageId ID of the AMI for which an attribute will be reset.
* @param String $attribute Specifies the attribute to reset. Currently, only launchPermission is supported.
* In the case of launchPermission, all public and explicit launch permissions for
* the AMI are revoked.
*/
public function resetattribute($imageId, $attribute){}
}

{code}
{card}


{card:label=Zend_Service_Amazon_Ec2_Instance}
{code:php}
<?php

require_once 'Zend/Service/Amazon/Ec2/Abstract.php';

class Zend_Service_Amazon_Ec2_Instance extends Zend_Service_Amazon_Ec2_Abstract
{

/**
* Launches a specified number of Instances.
*
* If Amazon EC2 cannot launch the minimum number AMIs you request, no
* instances launch. If there is insufficient capacity to launch the
* maximum number of AMIs you request, Amazon EC2 launches as many
* as possible to satisfy the requested maximum values.
*
* Every instance is launched in a security group. If you do not specify
* a security group at launch, the instances start in your default security group.
* For more information on creating security groups, see CreateSecurityGroup.
*
* An optional instance type can be specified. For information
* about instance types, see Instance Types.
*
* You can provide an optional key pair ID for each image in the launch request
* (for more information, see CreateKeyPair). All instances that are created
* from images that use this key pair will have access to the associated public
* key at boot. You can use this key to provide secure access to an instance of an
* image on a per-instance basis. Amazon EC2 public images use this feature to
* provide secure access without passwords.
*
* Launching public images without a key pair ID will leave them inaccessible.
*
* @param string $imageId ID of the AMI with which to launch instances.
* @param integer $minCount Minimum number of instances to launch.
* @param integer $maxCount Maximum number of instances to launch.
* @param string $keyName Name of the key pair with which to launch instances.
* @param string|array $securityGroup Names of the security groups with which to associate the instances.
* @param string $userData The user data available to the launched instances. This should be
* Base64 encoded.
* @param string $instanceType Specifies the instance type.
* Options include m1.small, m1.large, m1.xlarge, c1.medium, and c1.xlarge.
* The default value is m1.small.
* @param string $placement Specifies the availability zone in which to launch the instance(s).
* By default, Amazon EC2 selects an availability zone for you.
* @param string $kernelId The ID of the kernel with which to launch the instance.
* @param string $ramdiskId The ID of the RAM disk with which to launch the instance.
* @param string $blockDeviceVirtualName Specifies the virtual name to map to the corresponding device name. For example: instancestore0
* @param string $blockDeviceName Specifies the device to which you are mapping a virtual name. For example: sdb
*/
public function run($imageId, $minCount = 1, $maxCount = 1, $keyName = null, $securityGroup = null, $userData = null, $instanceType = 'm1.small', $placement = null, $kernelId = null, $ramdiskId = null, $blockDeviceVirtualName = null, $blockDeviceName = null){}

/**
* Returns information about instances that you own.
*
* If you specify one or more instance IDs, Amazon EC2 returns information
* for those instances. If you do not specify instance IDs, Amazon EC2
* returns information for all relevant instances. If you specify an invalid
* instance ID, a fault is returned. If you specify an instance that you do
* not own, it will not be included in the returned results.
*
* Recently terminated instances might appear in the returned results.
* This interval is usually less than one hour.
*
* @param string|array $instaceId Set of instances IDs of which to get the status.
*/
public function describe($instaceId){}

/**
* Shuts down one or more instances. This operation is idempotent; if you terminate
* an instance more than once, each call will succeed.
*
* Terminated instances will remain visible after termination (approximately one hour).
*
* @param string|array $instanceId One or more instance IDs returned.
*/
public function terminate($instanceId){}

/**
* Returns true if the specified product code is attached to the specified instance.
* The operation returns false if the product code is not attached to the instance.
*
* The ConfirmProductInstance operation can only be executed by the owner of the AMI.
* This feature is useful when an AMI owner is providing support and wants to
* verify whether a user's instance is eligible.
*
* @param string $productCode The product code to confirm.
* @param string $instanceId The instance for which to confirm the product code.
*/
public function confirmproduct($productCode, $instanceId){}

}


{code}
{card}


{card:label=Zend_Service_Amazon_Ec2_Keypair}
{code:php}
<?php

require_once '/Zend/Service/Amazon/Ec2/Abstract.php';

class Zend_Service_Amazon_Ec2_Keypair extends Zend_Service_Amazon_Ec2_Abstract
{
/**
* Creates a new 2048 bit RSA key pair and returns a unique ID that can
* be used to reference this key pair when launching new instances.
*
* @param string $keyName A unique name for the key pair.
*/
public function create($keyName){}

/**
* Returns information about key pairs available to you. If you specify
* key pairs, information about those key pairs is returned. Otherwise,
* information for all registered key pairs is returned.
*
* @param string|rarray $keyName Key pair IDs to describe.
*/
public function describe($keyName = null){}

/**
* Deletes a key pair
*
* @param string $keyName Name of the key pair to delete.
*/
public function delete($keyName){}
}

{code}
{card}


{card:label=Zend_Service_Amazon_Ec2_Securitygroups}
{code:php}
<?php

require_once '/Zend/Service/Amazon/Ec2/Abstract.php';

class Zend_Service_Amazon_Ec2_Keypair extends Zend_Service_Amazon_Ec2_Abstract
{
/**
* Creates a new 2048 bit RSA key pair and returns a unique ID that can
* be used to reference this key pair when launching new instances.
*
* @param string $keyName A unique name for the key pair.
*/
public function create($keyName){}

/**
* Returns information about key pairs available to you. If you specify
* key pairs, information about those key pairs is returned. Otherwise,
* information for all registered key pairs is returned.
*
* @param string|rarray $keyName Key pair IDs to describe.
*/
public function describe($keyName = null){}

/**
* Deletes a key pair
*
* @param string $keyName Name of the key pair to delete.
*/
public function delete($keyName){}
}

{code}
{card}


{deck}
{zone-data}

{zone-template-instance}]]></ac:plain-text-body></ac:macro>