Wprowadzenie do Zend Framework

     Nauka Zend Framework

    appendix

     Przewodnik po Zend Framework


  • Zend_Gdata
  • Zend_Http
  • Zend_InfoCard
  • Zend_Json
  • Zend_Layout
  • Zend_Ldap
  • Zend_Loader
  • Zend_Locale
  • Zend_Log
  • Zend_Mail
  • Zend_Markup
  • Zend_Measure
  • Zend_Memory
  • Zend_Mime
  • Zend_Navigation
  • Zend_Oauth
  • Zend_OpenId
  • Zend_Paginator
  • Zend_Pdf
  • Zend_ProgressBar
  • Zend_Queue
  • Zend_Reflection
  • Zend_Registry
  • Zend_Rest

  • Zend_Search_Lucene
  • Zend_Serializer
  • Zend_Server
  • Zend_Service
  • Zend_Session
  • Zend_Soap
  • Zend_Tag
  • Zend_Test
  • Zend_Text
  • Zend_TimeSync
  • Zend_Tool
  • Zend_Tool_Framework
  • Zend_Tool_Project
  • Zend_Translate
  • Zend_Uri
  • Zend_Validate
  • Zend_Version
  • Zend_View
  • Zend_Wildfire
  • Zend_XmlRpc
  • ZendX_Console_Process_Unix
  • ZendX_JQuery
  • Translation 21.3% Update 2011-11-16 - Revision 24356 - Version ZF 1.11.x

    61.4. Zend_Service_Amazon_Ec2

    61.4.1. Introduction

    Zend_Service_Amazon_Ec2 provides an interface to Amazon Elastic Clound Computing (EC2).

    61.4.2. What is Amazon Ec2?

    Amazon EC2 is a web service that enables you to launch and manage server instances in Amazon's data centers using APIs or available tools and utilities. You can use Amazon EC2 server instances at any time, for as long as you need, and for any legal purpose.

    61.4.3. Static Methods

    To make using the Ec2 class easier to use there are two static methods that can be invoked from any of the Ec2 Elements. The first static method is setKeys which will defind you AWS Access Keys as default keys. When you then create any new object you don't need to pass in any keys to the constructor.

    Przykład 61.11. setKeys() Example

    Zend_Service_Amazon_Ec2_Ebs::setKeys('aws_key','aws_secret_key');

    To set the region that you are working in you can call the setRegion to set which Amazon Ec2 Region you are working in. Currently there is only two region available us-east-1 and eu-west-1. If an invalid value is passed it will throw an exception stating that.

    Przykład 61.12. setRegion() Example

    Zend_Service_Amazon_Ec2_Ebs::setRegion('us-east-1');

    [Notatka] Set Amazon Ec2 Region

    Alternativly you can set the region when you create each class as the third parameter in the constructor method.

    digg delicious meneame google twitter technorati facebook

    Comments

    Loading...