1 <?xml version="1.0" encoding="UTF-8"?>
3 <sect1 id="zend.service.amazon.ec2.reserved.instance">
4 <title>Zend_Service_Amazon_Ec2: Reserved Instances</title>
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.
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.
18 <sect2 id="zend.service.amazon.ec2.reserved.instance.howitworks">
19 <title>How Reserved Instances are Applied</title>
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:
29 <para>(4) m1.small instances in Availability Zone us-east-1a</para>
33 <para>(4) c1.medium instances in Availability Zone us-east-1b</para>
37 <para>(2) c1.xlarge instances in Availability Zone us-east-1b</para>
42 The user then purchases the following Reserved Instances.
47 <para>(2) m1.small instances in Availability Zone us-east-1a</para>
51 <para>(2) c1.medium instances in Availability Zone us-east-1a</para>
55 <para>(2) m1.xlarge instances in Availability Zone us-east-1a</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.
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>
75 <methodname>describeInstances()</methodname> will return information about a
76 reserved instance or instances that you purchased.
80 <methodname>describeInstances()</methodname> returns a multi-demential array that
81 contains reservedInstancesId, instanceType, availabilityZone, duration, fixedPrice,
82 usagePrice, productDescription, instanceCount and state.
85 <programlisting language="php"><![CDATA[
86 $ec2_instance = new Zend_Service_Amazon_Ec2_Instance_Reserved('aws_key',
88 $return = $ec2_instance->describeInstances('instanceId');
92 <example id="zend.service.amazon.ec2.reserved.instance.offerings.describe">
93 <title>Describe current Reserved Instance Offerings available</title>
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.
104 <methodname>describeOfferings()</methodname> returns a multi-demential array that
105 contains reservedInstancesId, instanceType, availabilityZone, duration, fixedPrice,
106 usagePrice and productDescription.
109 <programlisting language="php"><![CDATA[
110 $ec2_instance = new Zend_Service_Amazon_Ec2_Instance_Reserved('aws_key',
112 $return = $ec2_instance->describeOfferings();
116 <example id="zend.service.amazon.ec2.reserved.instance.offerings.purchase">
117 <title>Turn off CloudWatch Monitoring on an Instance(s)</title>
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.
128 <methodname>purchaseOffering()</methodname> returns the reservedInstanceId.
131 <programlisting language="php"><![CDATA[
132 $ec2_instance = new Zend_Service_Amazon_Ec2_Instance_Reserved('aws_key',
134 $return = $ec2_instance->purchaseOffering('offeringId', 'instanceCount');