1 <?xml version="1.0" encoding="UTF-8"?>
3 <sect1 id="zend.service.amazon.ec2" xmlns:xi="http://www.w3.org/2001/XInclude">
4 <title>Zend_Service_Amazon_Ec2</title>
6 <sect2 id="zend.service.amazon.ec2.introduction">
7 <title>Introduction</title>
10 <classname>Zend_Service_Amazon_Ec2</classname> provides an interface to Amazon Elastic
11 Clound Computing (EC2).
15 <sect2 id="zend.service.amazon.ec2.whatis">
16 <title>What is Amazon Ec2?</title>
19 Amazon EC2 is a web service that enables you to launch and manage server instances in
20 Amazon's data centers using <acronym>API</acronym>s or available tools and utilities.
21 You can use Amazon EC2 server instances at any time, for as long as you need, and for
26 <sect2 id="zend.service.amazon.ec2.staticmethods">
27 <title>Static Methods</title>
30 To make using the Ec2 class easier to use there are two static methods that can be
31 invoked from any of the Ec2 Elements. The first static method is <code>setKeys</code>
32 which will defind you <acronym>AWS</acronym> Access Keys as default keys. When you then
33 create any new object you don't need to pass in any keys to the constructor.
36 <example id="zend.service.amazon.ec2.staticmethods.setkeys">
37 <title>setKeys() Example</title>
39 <programlisting language="php"><![CDATA[
40 Zend_Service_Amazon_Ec2_Ebs::setKeys('aws_key','aws_secret_key');
45 To set the region that you are working in you can call the <code>setRegion</code> to set
46 which Amazon Ec2 Region you are working in. Currently there is only two region available
47 us-east-1 and eu-west-1. If an invalid value is passed it will throw an exception
51 <example id="zend.service.amazon.ec2.staticmethods.setregion">
52 <title>setRegion() Example</title>
54 <programlisting language="php"><![CDATA[
55 Zend_Service_Amazon_Ec2_Ebs::setRegion('us-east-1');
59 <note id="zend.service.amazon.ec2.staticmethods.setregion.note">
60 <title>Set Amazon Ec2 Region</title>
63 Alternativly you can set the region when you create each class as the third
64 parameter in the constructor method.