HPCloud-PHP
1.2.0
PHP bindings for HPCloud and OpenStack services.
|
Manage snapshots. More...
Public Member Functions | |
__construct ($token, $projectId, $endpoint) | |
listSnapshots ($instanceId=NULL) | |
Get a list of snapshot details. | |
create ($instanceId, $name) | |
Create a new snapshot of a given instance. | |
delete ($snapshotId) | |
Given a snapshot ID, delete the snapshot. | |
describe ($snapshotId) | |
Get the details for a particular snapshot. |
Protected Attributes | |
$token | |
$projectId | |
$url | |
$client | |
Protected Attributes inherited from Operations | |
$token | |
$projectId |
Additional Inherited Members | |
Protected Member Functions inherited from Operations | |
headers ($merge=array()) | |
Generate the base headers needed by DBaaS requests. |
Manage snapshots.
A snapshot is an image (a backup) of a particular database taken at a particular point in time. They can be used by HP Cloud Services to restore a database instance to a particular point in time.
Snapshotscan be created and deleted. Information about the snapshots can be retrieved either as lists of snapshots or as individual snapshot details.
Generally, Snapshot objects should be created through the HPCloud::Services::DBaaS::snapshot() factory, and not created directly.
Any operation that goes to the remote server may throw one of the HPCloud::Exception exceptions.
Definition at line 48 of file Snapshot.php.
__construct | ( | $token, | |
$projectId, | |||
$endpoint | |||
) |
Definition at line 55 of file Snapshot.php.
References $endpoint, DBaaS\$projectId, DBaaS\$token, DBaaS\instance(), DBaaS\projectId(), and DBaaS\url().
create | ( | $instanceId, | |
$name | |||
) |
Create a new snapshot of a given instance.
Given the ID of a database instance and a mnemonic name for the snapshot, take a snapshot of the given database.
Note that subsequent references to this snapshot must be made by snapshot ID, not by $name
.
string | $instanceId | The instance ID for the database to snapshot. |
string | $name | A human-readable name for the snapshot. Internally, a snapshot ID will be used to reference this snapshot. |
HPCloud::Services::DBaaS::SnapshotDetails |
Definition at line 111 of file Snapshot.php.
References $name, DBaaS\$url, Operations\headers(), and DBaaS\url().
delete | ( | $snapshotId | ) |
Given a snapshot ID, delete the snapshot.
string | $snapshotId | The snapshot ID for the snapshot that should be deleted. |
boolean |
HPCloud::Exception | One of the Transport class of exceptions. |
Definition at line 141 of file Snapshot.php.
References DBaaS\$url, Operations\headers(), and DBaaS\url().
describe | ( | $snapshotId | ) |
Get the details for a particular snapshot.
string | $snapshotId | The snapshot ID. |
HPCloud::Services::DBaaS::SnapshotDetails |
Definition at line 158 of file Snapshot.php.
References DBaaS\$url, Operations\headers(), and DBaaS\url().
listSnapshots | ( | $instanceId = NULL | ) |
Get a list of snapshot details.
string | $instanceId | An optional database instance ID. If set, only snapshots for the given instance will be returned. |
array |
Definition at line 73 of file Snapshot.php.
References DBaaS\$url, Operations\headers(), and DBaaS\url().
|
protected |
Definition at line 53 of file Snapshot.php.
|
protected |
Definition at line 51 of file Snapshot.php.
|
protected |
Definition at line 50 of file Snapshot.php.
|
protected |
Definition at line 52 of file Snapshot.php.