Ejemplo n.º 1
0
 /**
  * Return new instance of AmazonRDS object
  *
  * @return AmazonRDS
  */
 private function GetAmazonRDSClientObject($region)
 {
     // Get ClientID from database;
     $clientid = $this->DB->GetOne("SELECT clientid FROM farms WHERE id=?", array($this->FarmID));
     // Get Client Object
     $Client = Client::Load($clientid);
     $RDSClient = AmazonRDS::GetInstance($Client->AWSAccessKeyID, $Client->AWSAccessKey);
     $RDSClient->SetRegion($region);
     return $RDSClient;
 }
Ejemplo n.º 2
0
 /**
  * 
  * Enter description here ...
  * @param unknown_type $access_key
  * @param unknown_type $secret_key
  * @param unknown_type $region
  * @return AmazonRDS
  */
 public static function newRds($access_key, $secret_key, $region)
 {
     $rds = AmazonRDS::GetInstance($access_key, $secret_key);
     $rds->SetRegion($region);
     return $rds;
 }