Datastores

Listing datastores

You can list out all the datastores available as shown below:

$datastores = $service->datastoreList();
foreach ($datastores as $datastore) {
    /** @var $datastore OpenCloud\Database\Resource\Datastore **/
}

Get the executable PHP script for this example

Retrieving a datastore

You can retrieve a specific datastore’s information, using its ID, as shown below:

/** @var OpenCloud\Database\Resource\Datastore **/
$datastore = $service->datastore('{datastoreId}');

Get the executable PHP script for this example

Listing datastore versions

You can list out all the versions available for a specific datastore, as shown below:

$versions = $datastore->versionList();
foreach ($versions as $version) {
    /** @var $version OpenCloud\Database\Resource\DatastoreVersion **/
}

Get the executable PHP script for this example

Retrieving a datastore version

You a retrieve a specific datastore version, using its ID, as shown below:

$datastoreVersion = $datastore->version('{versionId}');

Get the executable PHP script for this example