PHP Class Acquia\Cloud\Api\CloudApiClient

Inheritance: extends Guzzle\Service\Client, implements Acquia\Rest\ServiceManagerAware
ファイルを表示 Open project: acquia/acquia-sdk-php-cloud-api Class Usage Examples

Public Methods

Method Description
addDatabase ( string $site, string $db, array $cluster_map = NULL ) : Acquia\Cloud\Api\Response\Task
addDomain ( string $site, string $env, string $domain ) : Acquia\Cloud\Api\Response\Task
addSshKey ( string $site, string $publicKey, string $nickname, boolean $shellAccess = true, boolean $vcsAccess = true, array $blacklist = [] ) : Acquia\Cloud\Api\Response\Task
addSvnUser ( string $site, string $username, string $password ) : Acquia\Cloud\Api\Response\Task
codeDeploy ( $site, $source, $target )
copyDatabase ( string $site, string $db, string $sourceEnv, string $targetEnv ) : Acquia\Cloud\Api\Response\Task
copyFiles ( string $site, string $sourceEnv, string $targetEnv ) : Acquia\Cloud\Api\Response\Task
createDatabaseBackup ( string $site, string $env, string $db ) : Acquia\Cloud\Api\Response\Task
database ( string $site, string $db ) : Acquia\Cloud\Api\Response\DatabaseName
databaseBackup ( string $site, string $env, string $db, integer $backupId ) : Acquia\Cloud\Api\Response\Task
databaseBackups ( string $site, string $env, string $db ) : Acquia\Cloud\Api\Response\DatabaseBackups
databases ( string $site ) : Acquia\Cloud\Api\Response\DatabaseNames
deleteDatabase ( string $site, string $db, boolean $backup = TRUE ) : Acquia\Cloud\Api\Response\Task
deleteDatabaseBackup ( string $site, string $env, string $db, integer $backupId ) : Acquia\Cloud\Api\Response\Task
deleteDomain ( string $site, string $env, string $domain ) : Acquia\Cloud\Api\Response\Task
deleteSshKey ( string $site, integer $keyId ) : Acquia\Cloud\Api\Response\Task
deleteSvnUser ( string $site, integer $userId ) : Acquia\Cloud\Api\Response\Task
deployCode ( string $site, string $sourceEnv, string $targetEnv ) : Acquia\Cloud\Api\Response\Task Deploy code from on environment to another.
disableLiveDev ( string $site, string $env, boolean $discard = false ) : Acquia\Cloud\Api\Response\Task
domain ( string $site, string $env, string $domain ) : Acquia\Cloud\Api\Response\Domain
domains ( string $site, string $env ) : Acquia\Cloud\Api\Response\Domains
downloadDatabaseBackup ( string $site, string $env, string $db, integer $backupId, string $outfile ) : Guzzle\Http\Message\Response
enableLiveDev ( string $site, string $env, boolean $discard = false ) : Acquia\Cloud\Api\Response\Task
environment ( string $site, string $env ) : Acquia\Cloud\Api\Response\Environment
environmentDatabase ( string $site, string $env, string $db ) : Acquia\Cloud\Api\Response\Database
environmentDatabases ( string $site, string $env ) : Acquia\Cloud\Api\Response\Databases
environments ( string $site ) : Acquia\Cloud\Api\Response\Environments
factory ( $config = [] ) : CloudApiClient
getBuilderParams ( )
installDistro ( string $site, string $env, string $type, string $source ) : Acquia\Cloud\Api\Response\Task
installDistroByMakefile ( string $site, string $env, string $makefileUrl ) : Acquia\Cloud\Api\Response\Task Install a distro by passing a URL to a Drush makefile.
installDistroByName ( string $site, string $env, string $distro ) : Acquia\Cloud\Api\Response\Task Install one of Acquia Cloud’s built-in supported distros.
installDistroByProject ( string $site, string $env, string $projectName, string $version ) : Acquia\Cloud\Api\Response\Task Install any publicly accessible, standard Drupal distribution.
liveDev ( string $site, string $env, string $action, boolean $discard = false ) : Acquia\Cloud\Api\Response\Task
moveDomain ( string $site, string | array $domains, string $sourceEnv, string $targetEnv, boolean $skipSiteUpdate = FALSE ) : Acquia\Cloud\Api\Response\Task Moves domains atomically from one environment to another.
purgeVarnishCache ( string $site, string $env, string $domain ) : Acquia\Cloud\Api\Response\Task
pushCode ( string $site, string $env, string $vcsPath ) : Acquia\Cloud\Api\Response\Task Deploy a tag or branch to an environment.
restoreDatabaseBackup ( string $site, string $env, string $db, string $backupId ) : Acquia\Cloud\Api\Response\Task
server ( string $site, string $env, string $server ) : Acquia\Cloud\Api\Response\Server
servers ( string $site, string $env ) : Acquia\Cloud\Api\Response\Servers
site ( string $site ) : Acquia\Cloud\Api\Response\Site
siteDatabase ( $site, $db )
siteDatabases ( $site )
sites ( ) : Acquia\Cloud\Api\Response\SiteNames
sshKey ( string $site, integer $keyId ) : Acquia\Cloud\Api\Response\SshKey
sshKeys ( string $site ) : Acquia\Cloud\Api\Response\SshKeys
svnUser ( string $site, integer $userId ) : Acquia\Cloud\Api\Response\SvnUser
svnUsers ( string $site ) : Acquia\Cloud\Api\Response\SvnUsers
task ( string $site, integer $taskId ) : Acquia\Cloud\Api\Response\Task
taskInfo ( $site, $taskId )
tasks ( string $site ) : Acquia\Cloud\Api\Response\Tasks

Method Details

addDatabase() public method

See also: http://cloudapi.acquia.com/#POST__sites__site_dbs-instance_route
public addDatabase ( string $site, string $db, array $cluster_map = NULL ) : Acquia\Cloud\Api\Response\Task
$site string
$db string
$cluster_map array Optional. A mapping containing all environments and the cluster to which the associated database should be created. Each entry consists of the environment name as the key and the database cluster ID as the value. Note that if more than one cluster is associated with a site group, this map is required.
return Acquia\Cloud\Api\Response\Task

addDomain() public method

See also: http://cloudapi.acquia.com/#POST__sites__site_envs__env_domains__domain-instance_route
public addDomain ( string $site, string $env, string $domain ) : Acquia\Cloud\Api\Response\Task
$site string
$env string
$domain string
return Acquia\Cloud\Api\Response\Task

addSshKey() public method

See also: http://cloudapi.acquia.com/#POST__sites__site_sshkeys-instance_route
public addSshKey ( string $site, string $publicKey, string $nickname, boolean $shellAccess = true, boolean $vcsAccess = true, array $blacklist = [] ) : Acquia\Cloud\Api\Response\Task
$site string
$publicKey string
$nickname string
$shellAccess boolean
$vcsAccess boolean
$blacklist array
return Acquia\Cloud\Api\Response\Task

addSvnUser() public method

See also: http://cloudapi.acquia.com/#POST__sites__site_svnusers__username-instance_route
public addSvnUser ( string $site, string $username, string $password ) : Acquia\Cloud\Api\Response\Task
$site string
$username string
$password string
return Acquia\Cloud\Api\Response\Task

codeDeploy() public method

Deprecation: since version 0.5.0
public codeDeploy ( $site, $source, $target )

copyDatabase() public method

See also: http://cloudapi.acquia.com/#POST__sites__site_dbs__db_db_copy__source__target-instance_route
public copyDatabase ( string $site, string $db, string $sourceEnv, string $targetEnv ) : Acquia\Cloud\Api\Response\Task
$site string
$db string
$sourceEnv string
$targetEnv string
return Acquia\Cloud\Api\Response\Task

copyFiles() public method

See also: http://cloudapi.acquia.com/#POST__sites__site_files_copy__source__target-instance_route
public copyFiles ( string $site, string $sourceEnv, string $targetEnv ) : Acquia\Cloud\Api\Response\Task
$site string
$sourceEnv string
$targetEnv string
return Acquia\Cloud\Api\Response\Task

createDatabaseBackup() public method

See also: http://cloudapi.acquia.com/#POST__sites__site_envs__env_dbs__db_backups-instance_route
public createDatabaseBackup ( string $site, string $env, string $db ) : Acquia\Cloud\Api\Response\Task
$site string
$env string
$db string
return Acquia\Cloud\Api\Response\Task

database() public method

See also: http://cloudapi.acquia.com/#GET__sites__site_dbs__db-instance_route
public database ( string $site, string $db ) : Acquia\Cloud\Api\Response\DatabaseName
$site string
$db string
return Acquia\Cloud\Api\Response\DatabaseName

databaseBackup() public method

See also: http://cloudapi.acquia.com/#GET__sites__site_envs__env_dbs__db_backups__backup-instance_route
public databaseBackup ( string $site, string $env, string $db, integer $backupId ) : Acquia\Cloud\Api\Response\Task
$site string
$env string
$db string
$backupId integer
return Acquia\Cloud\Api\Response\Task

databaseBackups() public method

See also: http://cloudapi.acquia.com/#GET__sites__site_envs__env_dbs__db_backups-instance_route
public databaseBackups ( string $site, string $env, string $db ) : Acquia\Cloud\Api\Response\DatabaseBackups
$site string
$env string
$db string
return Acquia\Cloud\Api\Response\DatabaseBackups

databases() public method

See also: http://cloudapi.acquia.com/#GET__sites__site_dbs-instance_route
public databases ( string $site ) : Acquia\Cloud\Api\Response\DatabaseNames
$site string
return Acquia\Cloud\Api\Response\DatabaseNames

deleteDatabase() public method

See also: http://cloudapi.acquia.com/#DELETE__sites__site_dbs__db-instance_route
public deleteDatabase ( string $site, string $db, boolean $backup = TRUE ) : Acquia\Cloud\Api\Response\Task
$site string
$db string
$backup boolean Optional. If TRUE, a final backup of the database instance in each environment is made before deletion.
return Acquia\Cloud\Api\Response\Task

deleteDatabaseBackup() public method

See also: http://cloudapi.acquia.com/#DELETE__sites__site_envs__env_dbs__db_backups__backup-instance_route
public deleteDatabaseBackup ( string $site, string $env, string $db, integer $backupId ) : Acquia\Cloud\Api\Response\Task
$site string
$env string
$db string
$backupId integer
return Acquia\Cloud\Api\Response\Task

deleteDomain() public method

See also: http://cloudapi.acquia.com/#DELETE__sites__site_envs__env_domains__domain-instance_route
public deleteDomain ( string $site, string $env, string $domain ) : Acquia\Cloud\Api\Response\Task
$site string
$env string
$domain string
return Acquia\Cloud\Api\Response\Task

deleteSshKey() public method

See also: http://cloudapi.acquia.com/#DELETE__sites__site_sshkeys__sshkeyid-instance_route
public deleteSshKey ( string $site, integer $keyId ) : Acquia\Cloud\Api\Response\Task
$site string
$keyId integer
return Acquia\Cloud\Api\Response\Task

deleteSvnUser() public method

See also: http://cloudapi.acquia.com/#DELETE__sites__site_svnusers__svnuserid-instance_route
public deleteSvnUser ( string $site, integer $userId ) : Acquia\Cloud\Api\Response\Task
$site string
$userId integer
return Acquia\Cloud\Api\Response\Task

deployCode() public method

Deploy code from on environment to another.
See also: http://cloudapi.acquia.com/#POST__sites__site_code_deploy__source__target-instance_route
public deployCode ( string $site, string $sourceEnv, string $targetEnv ) : Acquia\Cloud\Api\Response\Task
$site string
$sourceEnv string
$targetEnv string
return Acquia\Cloud\Api\Response\Task

disableLiveDev() public method

public disableLiveDev ( string $site, string $env, boolean $discard = false ) : Acquia\Cloud\Api\Response\Task
$site string
$env string
$discard boolean
return Acquia\Cloud\Api\Response\Task

domain() public method

See also: http://cloudapi.acquia.com/#GET__sites__site_envs__env_domains__domain-instance_route
public domain ( string $site, string $env, string $domain ) : Acquia\Cloud\Api\Response\Domain
$site string
$env string
$domain string
return Acquia\Cloud\Api\Response\Domain

domains() public method

See also: http://cloudapi.acquia.com/#GET__sites__site_envs__env_domains-instance_route
public domains ( string $site, string $env ) : Acquia\Cloud\Api\Response\Domains
$site string
$env string
return Acquia\Cloud\Api\Response\Domains

downloadDatabaseBackup() public method

See also: http://cloudapi.acquia.com/#GET__sites__site_envs__env_dbs__db_backups__backup_download-instance_route
public downloadDatabaseBackup ( string $site, string $env, string $db, integer $backupId, string $outfile ) : Guzzle\Http\Message\Response
$site string
$env string
$db string
$backupId integer
$outfile string
return Guzzle\Http\Message\Response

enableLiveDev() public method

public enableLiveDev ( string $site, string $env, boolean $discard = false ) : Acquia\Cloud\Api\Response\Task
$site string
$env string
$discard boolean
return Acquia\Cloud\Api\Response\Task

environment() public method

See also: http://cloudapi.acquia.com/#GET__sites__site_envs__env-instance_route
public environment ( string $site, string $env ) : Acquia\Cloud\Api\Response\Environment
$site string
$env string
return Acquia\Cloud\Api\Response\Environment

environmentDatabase() public method

See also: http://cloudapi.acquia.com/#GET__sites__site_envs__env_dbs__db-instance_route
public environmentDatabase ( string $site, string $env, string $db ) : Acquia\Cloud\Api\Response\Database
$site string
$env string
$db string
return Acquia\Cloud\Api\Response\Database

environmentDatabases() public method

See also: http://cloudapi.acquia.com/#GET__sites__site_envs__env_dbs-instance_route
public environmentDatabases ( string $site, string $env ) : Acquia\Cloud\Api\Response\Databases
$site string
$env string
return Acquia\Cloud\Api\Response\Databases

environments() public method

See also: http://cloudapi.acquia.com/#GET__sites__site_envs-instance_route
public environments ( string $site ) : Acquia\Cloud\Api\Response\Environments
$site string
return Acquia\Cloud\Api\Response\Environments

factory() public static method

public static factory ( $config = [] ) : CloudApiClient
return CloudApiClient

getBuilderParams() public method

public getBuilderParams ( )

installDistro() public method

See also: http://cloudapi.acquia.com/#POST__sites__site_envs__env_install__type-instance_route
public installDistro ( string $site, string $env, string $type, string $source ) : Acquia\Cloud\Api\Response\Task
$site string
$env string
$type string
$source string
return Acquia\Cloud\Api\Response\Task

installDistroByMakefile() public method

Install a distro by passing a URL to a Drush makefile.
public installDistroByMakefile ( string $site, string $env, string $makefileUrl ) : Acquia\Cloud\Api\Response\Task
$site string
$env string
$makefileUrl string
return Acquia\Cloud\Api\Response\Task

installDistroByName() public method

Install one of Acquia Cloud’s built-in supported distros.
public installDistroByName ( string $site, string $env, string $distro ) : Acquia\Cloud\Api\Response\Task
$site string
$env string
$distro string
return Acquia\Cloud\Api\Response\Task

installDistroByProject() public method

Install any publicly accessible, standard Drupal distribution.
public installDistroByProject ( string $site, string $env, string $projectName, string $version ) : Acquia\Cloud\Api\Response\Task
$site string
$env string
$projectName string
$version string
return Acquia\Cloud\Api\Response\Task

liveDev() public method

See also: http://cloudapi.acquia.com/#POST__sites__site_envs__env_livedev__action-instance_route
public liveDev ( string $site, string $env, string $action, boolean $discard = false ) : Acquia\Cloud\Api\Response\Task
$site string
$env string
$action string
$discard boolean
return Acquia\Cloud\Api\Response\Task

moveDomain() public method

Moves domains atomically from one environment to another.
See also: http://cloudapi.acquia.com/#POST__sites__site_domain_move__source__target-instance_route
public moveDomain ( string $site, string | array $domains, string $sourceEnv, string $targetEnv, boolean $skipSiteUpdate = FALSE ) : Acquia\Cloud\Api\Response\Task
$site string The site.
$domains string | array The domain name(s) as an array of strings, or the string '*' to move all domains.
$sourceEnv string The environment which currently has this domain.
$targetEnv string The destination environment for the domain.
$skipSiteUpdate boolean Optional. If set to TRUE this will inhibit running fields-config-web.php for this domain move.
return Acquia\Cloud\Api\Response\Task

purgeVarnishCache() public method

See also: http://cloudapi.acquia.com/#DELETE__sites__site_envs__env_domains__domain_cache-instance_route
public purgeVarnishCache ( string $site, string $env, string $domain ) : Acquia\Cloud\Api\Response\Task
$site string
$env string
$domain string
return Acquia\Cloud\Api\Response\Task

pushCode() public method

Deploy a tag or branch to an environment.
See also: http://cloudapi.acquia.com/#POST__sites__site_envs__env_code_deploy-instance_route
public pushCode ( string $site, string $env, string $vcsPath ) : Acquia\Cloud\Api\Response\Task
$site string
$env string
$vcsPath string
return Acquia\Cloud\Api\Response\Task

restoreDatabaseBackup() public method

See also: http://cloudapi.acquia.com/#POST__sites__site_envs__env_dbs__db_backups__backup_restore-instance_route
public restoreDatabaseBackup ( string $site, string $env, string $db, string $backupId ) : Acquia\Cloud\Api\Response\Task
$site string
$env string
$db string
$backupId string
return Acquia\Cloud\Api\Response\Task

server() public method

See also: http://cloudapi.acquia.com/#GET__sites__site_envs__env_servers__server-instance_route
public server ( string $site, string $env, string $server ) : Acquia\Cloud\Api\Response\Server
$site string
$env string
$server string
return Acquia\Cloud\Api\Response\Server

servers() public method

See also: http://cloudapi.acquia.com/#GET__sites__site_envs__env_servers-instance_route
public servers ( string $site, string $env ) : Acquia\Cloud\Api\Response\Servers
$site string
$env string
return Acquia\Cloud\Api\Response\Servers

site() public method

See also: http://cloudapi.acquia.com/#GET__sites__site-instance_route
public site ( string $site ) : Acquia\Cloud\Api\Response\Site
$site string
return Acquia\Cloud\Api\Response\Site

siteDatabase() public method

Deprecation: since version 0.5.0
public siteDatabase ( $site, $db )

siteDatabases() public method

Deprecation: since version 0.5.0
public siteDatabases ( $site )

sites() public method

See also: http://cloudapi.acquia.com/#GET___sites_-instance_route
public sites ( ) : Acquia\Cloud\Api\Response\SiteNames
return Acquia\Cloud\Api\Response\SiteNames

sshKey() public method

See also: http://cloudapi.acquia.com/#GET__sites__site_sshkeys__sshkeyid-instance_route
public sshKey ( string $site, integer $keyId ) : Acquia\Cloud\Api\Response\SshKey
$site string
$keyId integer
return Acquia\Cloud\Api\Response\SshKey

sshKeys() public method

See also: http://cloudapi.acquia.com/#GET__sites__site_sshkeys-instance_route
public sshKeys ( string $site ) : Acquia\Cloud\Api\Response\SshKeys
$site string
return Acquia\Cloud\Api\Response\SshKeys

svnUser() public method

See also: http://cloudapi.acquia.com/#GET__sites__site_svnusers__svnuserid-instance_route
public svnUser ( string $site, integer $userId ) : Acquia\Cloud\Api\Response\SvnUser
$site string
$userId integer
return Acquia\Cloud\Api\Response\SvnUser

svnUsers() public method

See also: http://cloudapi.acquia.com/#GET__sites__site_svnusers-instance_route
public svnUsers ( string $site ) : Acquia\Cloud\Api\Response\SvnUsers
$site string
return Acquia\Cloud\Api\Response\SvnUsers

task() public method

See also: http://cloudapi.acquia.com/#GET__sites__site_tasks__task-instance_route
public task ( string $site, integer $taskId ) : Acquia\Cloud\Api\Response\Task
$site string
$taskId integer
return Acquia\Cloud\Api\Response\Task

taskInfo() public method

Deprecation: since version 0.5.0
public taskInfo ( $site, $taskId )

tasks() public method

See also: http://cloudapi.acquia.com/#GET__sites__site_tasks-instance_route
public tasks ( string $site ) : Acquia\Cloud\Api\Response\Tasks
$site string
return Acquia\Cloud\Api\Response\Tasks