public createSnapshot ( string $volumeId, string $description = null ) : |
||
$volumeId | string | The ID of the Amazon EBS volume. |
$description | string | optional A description of the Amazon EBS snapshot. (Up to 255 characters) |
return | Returns the SnapshotData on success |
public function createSnapshot($volumeId, $description = null)
{
$result = null;
$options = array('VolumeId' => (string) $volumeId);
if ($description !== null) {
$options['Description'] = (string) $description;
}
$response = $this->client->call(ucfirst(__FUNCTION__), $options);
if ($response->getError() === false) {
$sxml = simplexml_load_string($response->getRawContent());
$result = $this->_loadSnapshotData($sxml);
}
return $result;
}