[GENERIC] Zend_Translate:
[zend.git] / documentation / manual / en / module_specs / Zend_Service_Amazon_Ec2-ReservedInstance.xml
blob79da0664e75f637b40a8c0ac8ae7fce37fde68e1
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!-- Reviewed: no -->
3 <sect1 id="zend.service.amazon.ec2.reserved.instance">
4     <title>Zend_Service_Amazon_Ec2: Reserved Instances</title>
6     <para>
7         With Amazon <acronym>EC2</acronym> Reserved Instances, you can make a low one-time payment
8         for each instance to reserve and receive a significant discount on the hourly
9         usage charge for that instance.
10     </para>
12     <para>
13         Amazon <acronym>EC2</acronym> Reserved Instances are based on instance type and location
14         (region and Availability Zone) for a specified period of time (e.g.,
15         1 year or 3 years) and are only available for Linux or UNIX instances.
16     </para>
18     <sect2 id="zend.service.amazon.ec2.reserved.instance.howitworks">
19         <title>How Reserved Instances are Applied</title>
21         <para>
22             Reserved Instances are applied to instances that meet the type/location
23             criteria during the specified period. In this example, a user is running
24             the following instances:
25         </para>
27         <itemizedlist>
28             <listitem>
29                 <para>(4) m1.small instances in Availability Zone us-east-1a</para>
30             </listitem>
32             <listitem>
33                 <para>(4) c1.medium instances in Availability Zone us-east-1b</para>
34             </listitem>
36             <listitem>
37                 <para>(2) c1.xlarge instances in Availability Zone us-east-1b</para>
38             </listitem>
39         </itemizedlist>
41         <para>
42             The user then purchases the following Reserved Instances.
43         </para>
45         <itemizedlist>
46             <listitem>
47                 <para>(2) m1.small instances in Availability Zone us-east-1a</para>
48             </listitem>
50             <listitem>
51                 <para>(2) c1.medium instances in Availability Zone us-east-1a</para>
52             </listitem>
54             <listitem>
55                 <para>(2) m1.xlarge instances in Availability Zone us-east-1a</para>
56             </listitem>
57         </itemizedlist>
59         <para>
60             Amazon <acronym>EC2</acronym> applies the two m1.small Reserved Instances to two of the
61             instances in Availability Zone us-east-1a. Amazon <acronym>EC2</acronym> doesn't apply
62             the two c1.medium Reserved Instances because the c1.medium instances are in a different
63             Availability Zone and does not apply the m1.xlarge Reserved Instances because there are
64             no running m1.xlarge instances.
65         </para>
66     </sect2>
68     <sect2 id="zend.service.amazon.ec2.reserved.instance.operations">
69         <title>Reserved Instances Usage</title>
71         <example id="zend.service.amazon.ec2.reserved.instance.operations.describe">
72             <title>Describes Reserved Instances that you purchased</title>
74             <para>
75                 <methodname>describeInstances()</methodname> will return information about a
76                 reserved instance or instances that you purchased.
77             </para>
79             <para>
80                 <methodname>describeInstances()</methodname> returns a multi-demential array that
81                 contains reservedInstancesId, instanceType, availabilityZone, duration, fixedPrice,
82                 usagePrice, productDescription, instanceCount and state.
83             </para>
85             <programlisting language="php"><![CDATA[
86 $ec2_instance = new Zend_Service_Amazon_Ec2_Instance_Reserved('aws_key',
87                                                      'aws_secret_key');
88 $return = $ec2_instance->describeInstances('instanceId');
89 ]]></programlisting>
90         </example>
92         <example id="zend.service.amazon.ec2.reserved.instance.offerings.describe">
93             <title>Describe current Reserved Instance Offerings available</title>
95             <para>
96                 <methodname>describeOfferings()</methodname> Describes Reserved Instance offerings
97                 that are available for purchase. With Amazon <acronym>EC2</acronym> Reserved
98                 Instances, you purchase the right to launch Amazon <acronym>EC2</acronym> instances
99                 for a period of time (without getting insufficient capacity errors) and pay a lower
100                 usage rate for the actual time used.
101             </para>
103             <para>
104                 <methodname>describeOfferings()</methodname> returns a multi-demential array that
105                 contains reservedInstancesId, instanceType, availabilityZone, duration, fixedPrice,
106                 usagePrice and productDescription.
107             </para>
109             <programlisting language="php"><![CDATA[
110 $ec2_instance = new Zend_Service_Amazon_Ec2_Instance_Reserved('aws_key',
111                                                      'aws_secret_key');
112 $return = $ec2_instance->describeOfferings();
113 ]]></programlisting>
114         </example>
116         <example id="zend.service.amazon.ec2.reserved.instance.offerings.purchase">
117             <title>Turn off CloudWatch Monitoring on an Instance(s)</title>
119             <para>
120                 <methodname>purchaseOffering()</methodname> Purchases a Reserved Instance for use
121                 with your account. With Amazon <acronym>EC2</acronym> Reserved Instances, you
122                 purchase the right to launch Amazon <acronym>EC2</acronym> instances for a period
123                 of time (without getting insufficient capacity errors) and pay a lower usage rate
124                 for the actual time used.
125             </para>
127             <para>
128                 <methodname>purchaseOffering()</methodname> returns the reservedInstanceId.
129             </para>
131             <programlisting language="php"><![CDATA[
132 $ec2_instance = new Zend_Service_Amazon_Ec2_Instance_Reserved('aws_key',
133                                                      'aws_secret_key');
134 $return = $ec2_instance->purchaseOffering('offeringId', 'instanceCount');
135 ]]></programlisting>
136         </example>
137     </sect2>
138 </sect1>