Scalr\Service\Aws\Ec2\V20150415\Ec2Api::createSnapshot PHP Метод

createSnapshot() публичный Метод

Creates a snapshot of an Amazon EBS volume and stores it in Amazon S3.You can use snapshots for backups, to make copies of instance store volumes, and to save data before shutting down an instance.
public createSnapshot ( string $volumeId, string $description = null ) : SnapshotData
$volumeId string The ID of the Amazon EBS volume.
$description string optional A description of the Amazon EBS snapshot. (Up to 255 characters)
Результат Scalr\Service\Aws\Ec2\DataType\SnapshotData Returns the SnapshotData on success
    public function createSnapshot($volumeId, $description = null)
    {
        $result = null;
        $options = ['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;
    }
Ec2Api