src/ServiceManagement/ServiceManagementRestProxy.php
public function changeDeploymentConfiguration(
        $name, $configuration, ChangeDeploymentConfigurationOptions $options)
    {
        Validate::isString($name, 'name');
        Validate::notNullOrEmpty($name, 'name');
        Validate::isString($configuration, 'configuration');
        Validate::notNullOrEmpty($configuration, 'configuration');
        Validate::notNullOrEmpty($options, 'options');

        $configuration = $this->_encodeConfiguration($configuration);
        $warningsTreatment = Utilities::booleanToString(
            $options->getTreatWarningsAsErrors()
        );
        $xmlElements = [
            Resources::XTAG_CONFIGURATION => $configuration,
            Resources::XTAG_TREAT_WARNINGS_AS_ERROR => $warningsTreatment,
            Resources::XTAG_MODE => $options->getMode(),
        ];
        $body = $this->_createRequestXml(
            $xmlElements,
            Resources::XTAG_CHANGE_CONFIGURATION
        );
        $context = new HttpCallContext();
        $context->setMethod(Resources::HTTP_POST);
        $context->setPath($this->_getDeploymentPath($name, $options).'/');
        $context->addStatusCode(Resources::STATUS_ACCEPTED);
        $context->addQueryParameter(
            Resources::QP_COMP,
            Resources::QPV_CONFIG
        );
        $context->setBody($body);
        $context->addHeader(
            Resources::CONTENT_TYPE,
            Resources::XML_CONTENT_TYPE
        );

        assert(Utilities::endsWith($context->getPath(), '/'));
        $response = $this->sendHttpContext($context);

        return AsynchronousOperationResult::create(HttpClient::getResponseHeaders($response));
    }
public function changeDeploymentConfiguration(
        $name, $configuration, ChangeDeploymentConfigurationOptions $options)
    {
        Validate::isString($name, 'name');
        Validate::notNullOrEmpty($name, 'name');
        Validate::isString($configuration, 'configuration');
        Validate::notNullOrEmpty($configuration, 'configuration');
        Validate::notNullOrEmpty($options, 'options');

        $configuration = $this->_encodeConfiguration($configuration);
        $warningsTreatment = Utilities::booleanToString(
            $options->getTreatWarningsAsErrors()
        );
        $xmlElements = [
            Resources::XTAG_CONFIGURATION => $configuration,
            Resources::XTAG_TREAT_WARNINGS_AS_ERROR => $warningsTreatment,
            Resources::XTAG_MODE => $options->getMode(),
        ];
        $body = $this->_createRequestXml(
            $xmlElements,
            Resources::XTAG_CHANGE_CONFIGURATION
        );
        $context = new HttpCallContext();
        $context->setMethod(Resources::HTTP_POST);
        $context->setPath($this->_getDeploymentPath($name, $options).'/');
        $context->addStatusCode(Resources::STATUS_ACCEPTED);
        $context->addQueryParameter(
            Resources::QP_COMP,
            Resources::QPV_CONFIG
        );
        $context->setBody($body);
        $context->addHeader(
            Resources::CONTENT_TYPE,
            Resources::XML_CONTENT_TYPE
        );

        assert(Utilities::endsWith($context->getPath(), '/'));
        $response = $this->sendHttpContext($context);

        return AsynchronousOperationResult::create(HttpClient::getResponseHeaders($response));
    }
public function changeDeploymentConfiguration ( $ name , $ configuration , ChangeDeploymentConfigurationOptions $ options ) { Validate :: isString ( $ name , 'name' ) ; Validate :: notNullOrEmpty ( $ name , 'name' ) ; Validate :: isString ( $ configuration , 'configuration' ) ; Validate :: notNullOrEmpty ( $ configuration , 'configuration' ) ; Validate :: notNullOrEmpty ( $ options , 'options' ) ; $ configuration = $ this -> _encodeConfiguration ( $ configuration ) ; $ warningsTreatment = Utilities :: booleanToString ( $ options -> getTreatWarningsAsErrors ( ) ) ; $ xmlElements = [ Resources :: XTAG_CONFIGURATION => $ configuration , Resources :: XTAG_TREAT_WARNINGS_AS_ERROR => $ warningsTreatment , Resources :: XTAG_MODE => $ options -> getMode ( ) , ] ; $ body = $ this -> _createRequestXml ( $ xmlElements , Resources :: XTAG_CHANGE_CONFIGURATION ) ; $ context = new HttpCallContext ( ) ; $ context -> setMethod ( Resources :: HTTP_POST ) ; $ context -> setPath ( $ this -> _getDeploymentPath ( $ name , $ options ) . '/' ) ; $ context -> addStatusCode ( Resources :: STATUS_ACCEPTED ) ; $ context -> addQueryParameter ( Resources :: QP_COMP , Resources :: QPV_CONFIG ) ; $ context -> setBody ( $ body ) ; $ context -> addHeader ( Resources :: CONTENT_TYPE , Resources :: XML_CONTENT_TYPE ) ; assert ( Utilities :: endsWith ( $ context -> getPath ( ) , '/' ) ) ; $ response = $ this -> sendHttpContext ( $ context ) ; return AsynchronousOperationResult :: create ( HttpClient :: getResponseHeaders ( $ response ) ) ; }
Initiates a change to the deployment configuration.

Note that you can change a deployment's configuration either by specifying the
deployment environment (staging or production), or by specifying the
deployment's unique name.

@param string                               $name          The hosted service
name
@param string|resource                      $configuration The configuration
file contents or file stream
@param ChangeDeploymentConfigurationOptions $options       The optional
parameters

@return AsynchronousOperationResult

@see http://msdn.microsoft.com/en-us/library/windowsazure/ee460809.aspx
Initiates a change to the deployment configuration .