PhpRiot
Follow phpriot on Twitter
Sponsored Link
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
Free iPad/iPhone App
Available on the App Store

  • PHP manual
  • Zend Framework manual
  • Smarty manual
  • PHP articles
  • PHP training

Windows Instances Usage

Example 710. Bundles an Amazon EC2 instance running Windows

bundle() has three require paramters and one optional

  • instanceId The instance you want to bundle

  • s3Bucket Where you want the ami to live on S3

  • s3Prefix The prefix you want to assign to the AMI on S3

  • uploadExpiration The expiration of the upload policy. Amazon recommends 12 hours or longer. This is based in nubmer of minutes. Default is 1440 minutes (24 hours)

bundle() returns a multi-demential array that contains instanceId, bundleId, state, startTime, updateTime, progress s3Bucket and s3Prefix.

<?php
$ec2_instance 
= new Zend_Service_Amazon_Ec2_Instance_Windows('aws_key',
                                                     
'aws_secret_key');
$return $ec2_instance->bundle('instanceId''s3Bucket''s3Prefix');

Example 711. Describes current bundling tasks

describeBundle() Describes current bundling tasks

describeBundle() returns a multi-demential array that contains instanceId, bundleId, state, startTime, updateTime, progress s3Bucket and s3Prefix.

<?php
$ec2_instance 
= new Zend_Service_Amazon_Ec2_Instance_Windows('aws_key',
                                                     
'aws_secret_key');
$return $ec2_instance->describeBundle('bundleId');

Example 712. Cancels an Amazon EC2 bundling operation

cancelBundle() Cancels an Amazon EC2 bundling operation

cancelBundle() returns a multi-demential array that contains instanceId, bundleId, state, startTime, updateTime, progress s3Bucket and s3Prefix.

<?php
$ec2_instance 
= new Zend_Service_Amazon_Ec2_Instance_Windows('aws_key',
                                                     
'aws_secret_key');
$return $ec2_instance->cancelBundle('bundleId');

Zend Framework