public function copySnapshot($srcRegion, $srcSnapshotId, $description = null, $destRegion = null, $presignedUrl = null)
{
$result = null;
$options = array('SourceRegion' => (string) $srcRegion, 'SourceSnapshotId' => (string) $srcSnapshotId);
if ($description !== null) {
$options['Description'] = (string) $description;
}
if ($destRegion !== null) {
//It overrides region to copy
$options['_host'] = $this->ec2->getUrl($destRegion);
$options['_region'] = $destRegion;
$options['DestinationRegion'] = (string) $destRegion;
if ($presignedUrl !== null) {
$options['PresignedUrl'] = (string) $presignedUrl;
}
}
$response = $this->client->call(ucfirst(__FUNCTION__), $options);
if ($response->getError() === false) {
$sxml = simplexml_load_string($response->getRawContent());
$result = (string) $sxml->snapshotId;
}
return $result;
}