PhpRiot
Become Zend Certified

Prepare for the ZCE exam using our quizzes (web or iPad/iPhone). More info...


When you're ready get 7.5% off your exam voucher using voucher CJQNOV23 at the Zend Store

Reserved Instances Usage

Example 731. Describes Reserved Instances that you purchased

describeInstances() will return information about a reserved instance or instances that you purchased.

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

<?php
$ec2_instance 
= new Zend_Service_Amazon_Ec2_Instance_Reserved('aws_key',
                                                     
'aws_secret_key');
$return $ec2_instance->describeInstances('instanceId');

Example 732. Describe current Reserved Instance Offerings available

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

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

<?php
$ec2_instance 
= new Zend_Service_Amazon_Ec2_Instance_Reserved('aws_key',
                                                     
'aws_secret_key');
$return $ec2_instance->describeOfferings();

Example 733. Turn off CloudWatch Monitoring on an Instance(s)

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

purchaseOffering() returns the reservedInstanceId.

<?php
$ec2_instance 
= new Zend_Service_Amazon_Ec2_Instance_Reserved('aws_key',
                                                     
'aws_secret_key');
$return $ec2_instance->purchaseOffering('offeringId''instanceCount');

Zend Framework