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