Example #1
0
 /**
  * CreateVolume action
  *
  * Creates an Amazon EBS volume that can be attached to any Amazon EC2 instance in the same Availability Zone.
  * Any AWS Marketplace product codes from the snapshot are propagated to the volume
  *
  * @param   CreateVolumeRequestData  $request Request that specifies parameters of the volume.
  * @return  VolumeData       Returns the VolumeData on success
  * @throws  ClientException
  * @throws  Ec2Exception
  */
 public function createVolume(CreateVolumeRequestData $request)
 {
     $result = null;
     $options = $request->getQueryArrayBare();
     $response = $this->client->call(ucfirst(__FUNCTION__), $options);
     if ($response->getError() === false) {
         //Success
         $sxml = simplexml_load_string($response->getRawContent());
         $result = $this->_loadVolumeData($sxml);
     }
     return $result;
 }