/**
  * AutoScalingGroupの設定を更新する
  *
  * @return void
  */
 private function _updateAutoScalingGroup()
 {
     // 使用するLaunchConfigurationの取得
     $config_name = $this->_getLaunchConfiguration();
     // 使用するAutoScalingGroupの更新
     try {
         $options = array('AutoScalingGroupName' => 'ModernAdultMidnightCrawlerGroup', 'LaunchConfigurationName' => $config_name, 'MinSize' => 0, 'MaxSize' => 0, 'AvailabilityZones' => array(Aws\Common\Enum\Region::AP_NORTHEAST_1 . 'a'), 'VPCZoneIdentifier' => 'subnet-b2ed03c5');
         $this->as->updateAutoScalingGroup($options);
     } catch (\Exception $e) {
         $this->as->createAutoScalingGroup($options);
     }
 }
Example #2
0
 /**
  * コマンドの実行
  *
  * @param  array $params  パラメータ配列
  * @return void
  **/
 public function execute(array $params)
 {
     try {
         $options = array('AutoScalingGroupName' => 'ModernAdultMidnightCrawlerGroup', 'MinSize' => 0, 'MaxSize' => 0, 'DesiredCapacity' => 0);
         $as = new AutoScaling();
         $as->updateAutoScalingGroup($options);
     } catch (\Exception $e) {
         $this->errorLog($e->getMessage());
     }
 }