src/Acquia/Cloud/Api/CloudApiClient.php
public function moveDomain($site, $domains, $sourceEnv, $targetEnv, $skipSiteUpdate = FALSE)
    {
        $paths = '{+base_path}/sites/{site}/domain-move/{source}/{target}.json';
        $update_site = '';
        if ($skipSiteUpdate) {
            $update_site = '1';
            $paths .= '?skip_site_update={update_site}';
        }
        $variables = array(
          'site' => $site,
          'source' => $sourceEnv,
          'target' => $targetEnv,
          'update_site' => $update_site,
        );
        $body = Json::encode(array('domains' => (array) $domains));
        $request = $this->post(array($paths, $variables), null, $body);
        return new Response\Task($request);
    }
public function moveDomain($site, $domains, $sourceEnv, $targetEnv, $skipSiteUpdate = FALSE)
    {
        $paths = '{+base_path}/sites/{site}/domain-move/{source}/{target}.json';
        $update_site = '';
        if ($skipSiteUpdate) {
            $update_site = '1';
            $paths .= '?skip_site_update={update_site}';
        }
        $variables = array(
          'site' => $site,
          'source' => $sourceEnv,
          'target' => $targetEnv,
          'update_site' => $update_site,
        );
        $body = Json::encode(array('domains' => (array) $domains));
        $request = $this->post(array($paths, $variables), null, $body);
        return new Response\Task($request);
    }
public function moveDomain ( $ site , $ domains , $ sourceEnv , $ targetEnv , $ skipSiteUpdate = FALSE ) { $ paths = '{+base_path}/sites/{site}/domain-move/{source}/{target}.json' ; $ update_site = '' ; if ( $ skipSiteUpdate ) { $ update_site = '1' ; $ paths .= '?skip_site_update={update_site}' ; } $ variables = array ( 'site' => $ site , 'source' => $ sourceEnv , 'target' => $ targetEnv , 'update_site' => $ update_site , ) ; $ body = Json :: encode ( array ( 'domains' => ( array ) $ domains ) ) ; $ request = $ this -> post ( array ( $ paths , $ variables ) , null , $ body ) ; return new Response \ Task ( $ request ) ; }
Moves domains atomically from one environment to another.

@param string $site
The site.
@param string|array $domains
The domain name(s) as an array of strings, or the string '*' to move all
domains.
@param string $sourceEnv
The environment which currently has this domain.
@param string $targetEnv
The destination environment for the domain.
@param bool $skipSiteUpdate
Optional. If set to TRUE this will inhibit running
fields-config-web.php for this domain move.

@return \Acquia\Cloud\Api\Response\Task

@throws \Guzzle\Http\Exception\ClientErrorResponseException

@see http://cloudapi.acquia.com/#POST__sites__site_domain_move__source__target-instance_route
Moves domains atomically from one environment to another .