-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathexamples.php
42 lines (29 loc) · 1.07 KB
/
examples.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
<?php
/**
* @file
* Example usage of the Acquia Cloud SDK for PHP.
*/
require_once 'vendor/autoload.php';
require_once 'config.php';
use Acquia\Cloud\Api\CloudApiClient;
$cloudapi = CloudApiClient::factory(array(
'username' => getenv('ACQUIA_CLOUD_USERNAME'),
'password' => getenv('ACQUIA_CLOUD_PASSWORD'),
));
// Get all available sites.
// $sites = $cloudapi->sites();
// Get information about a site.
// $site = $cloudapi->site($site);
// Get all available environments.
// $environments = $cloudapi->environments($site);
// Get information about an environment.
// $environment = $cloudapi->environment($site, 'test');
// Get information about all databases.
// $databases = $cloudapi->databases($site);
// Get information about an environment's database.
// $database = $cloudapi->database($site, $database);
// Back up an environment's database.
// $backup = $cloudapi->createDatabaseBackup($site, 'test', $database, '12345');
// Get a list of all an environment's database backups.
$backups = $cloudapi->databaseBackups($site, 'test', $database);
print_r($backups);