File: Zend_Service_Amazon_Ec2-ReservedInstance.xml

package info (click to toggle)
zendframework 1.12.9%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: jessie-kfreebsd
  • size: 133,584 kB
  • sloc: xml: 1,311,829; php: 570,173; sh: 170; makefile: 125; sql: 121
file content (138 lines) | stat: -rw-r--r-- 5,964 bytes parent folder | download | duplicates (2)
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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
<?xml version="1.0" encoding="UTF-8"?>
<!-- Reviewed: no -->
<sect1 id="zend.service.amazon.ec2.reserved.instance">
    <title>Zend_Service_Amazon_Ec2: Reserved Instances</title>

    <para>
        With Amazon <acronym>EC2</acronym> Reserved Instances, you can make a low one-time payment
        for each instance to reserve and receive a significant discount on the hourly
        usage charge for that instance.
    </para>

    <para>
        Amazon <acronym>EC2</acronym> Reserved Instances are based on instance type and location
        (region and Availability Zone) for a specified period of time (e.g.,
        1 year or 3 years) and are only available for Linux or UNIX instances.
    </para>

    <sect2 id="zend.service.amazon.ec2.reserved.instance.howitworks">
        <title>How Reserved Instances are Applied</title>

        <para>
            Reserved Instances are applied to instances that meet the type/location
            criteria during the specified period. In this example, a user is running
            the following instances:
        </para>

        <itemizedlist>
            <listitem>
                <para>(4) m1.small instances in Availability Zone us-east-1a</para>
            </listitem>

            <listitem>
                <para>(4) c1.medium instances in Availability Zone us-east-1b</para>
            </listitem>

            <listitem>
                <para>(2) c1.xlarge instances in Availability Zone us-east-1b</para>
            </listitem>
        </itemizedlist>

        <para>
            The user then purchases the following Reserved Instances.
        </para>

        <itemizedlist>
            <listitem>
                <para>(2) m1.small instances in Availability Zone us-east-1a</para>
            </listitem>

            <listitem>
                <para>(2) c1.medium instances in Availability Zone us-east-1a</para>
            </listitem>

            <listitem>
                <para>(2) m1.xlarge instances in Availability Zone us-east-1a</para>
            </listitem>
        </itemizedlist>

        <para>
            Amazon <acronym>EC2</acronym> applies the two m1.small Reserved Instances to two of the
            instances in Availability Zone us-east-1a. Amazon <acronym>EC2</acronym> doesn't apply
            the two c1.medium Reserved Instances because the c1.medium instances are in a different
            Availability Zone and does not apply the m1.xlarge Reserved Instances because there are
            no running m1.xlarge instances.
        </para>
    </sect2>

    <sect2 id="zend.service.amazon.ec2.reserved.instance.operations">
        <title>Reserved Instances Usage</title>

        <example id="zend.service.amazon.ec2.reserved.instance.operations.describe">
            <title>Describes Reserved Instances that you purchased</title>

            <para>
                <methodname>describeInstances()</methodname> will return information about a
                reserved instance or instances that you purchased.
            </para>

            <para>
                <methodname>describeInstances()</methodname> returns a multi-demential array that
                contains reservedInstancesId, instanceType, availabilityZone, duration, fixedPrice,
                usagePrice, productDescription, instanceCount and state.
            </para>

            <programlisting language="php"><![CDATA[
$ec2_instance = new Zend_Service_Amazon_Ec2_Instance_Reserved('aws_key',
                                                     'aws_secret_key');
$return = $ec2_instance->describeInstances('instanceId');
]]></programlisting>
        </example>

        <example id="zend.service.amazon.ec2.reserved.instance.offerings.describe">
            <title>Describe current Reserved Instance Offerings available</title>

            <para>
                <methodname>describeOfferings()</methodname> Describes Reserved Instance offerings
                that are available for purchase. With Amazon <acronym>EC2</acronym> Reserved
                Instances, you purchase the right to launch Amazon <acronym>EC2</acronym> instances
                for a period of time (without getting insufficient capacity errors) and pay a lower
                usage rate for the actual time used.
            </para>

            <para>
                <methodname>describeOfferings()</methodname> returns a multi-demential array that
                contains reservedInstancesId, instanceType, availabilityZone, duration, fixedPrice,
                usagePrice and productDescription.
            </para>

            <programlisting language="php"><![CDATA[
$ec2_instance = new Zend_Service_Amazon_Ec2_Instance_Reserved('aws_key',
                                                     'aws_secret_key');
$return = $ec2_instance->describeOfferings();
]]></programlisting>
        </example>

        <example id="zend.service.amazon.ec2.reserved.instance.offerings.purchase">
            <title>Turn off CloudWatch Monitoring on an Instance(s)</title>

            <para>
                <methodname>purchaseOffering()</methodname> Purchases a Reserved Instance for use
                with your account. With Amazon <acronym>EC2</acronym> Reserved Instances, you
                purchase the right to launch Amazon <acronym>EC2</acronym> instances for a period
                of time (without getting insufficient capacity errors) and pay a lower usage rate
                for the actual time used.
            </para>

            <para>
                <methodname>purchaseOffering()</methodname> returns the reservedInstanceId.
            </para>

            <programlisting language="php"><![CDATA[
$ec2_instance = new Zend_Service_Amazon_Ec2_Instance_Reserved('aws_key',
                                                     'aws_secret_key');
$return = $ec2_instance->purchaseOffering('offeringId', 'instanceCount');
]]></programlisting>
        </example>
    </sect2>
</sect1>