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

Windows Instances Usage

Example 728. 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 729. 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 730. 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