PHP Class Scalr\Api\Service\User\V1beta0\Controller\Farms

Author: N.V.
Inheritance: extends Scalr\Api\Rest\Controller\ApiController, use trait GlobalVariableTrait
Show file Open project: scalr/scalr Class Usage Examples

Public Methods

Method Description
cloneAction ( integer $farmId ) : Scalr\Api\DataType\ResultEnvelope Creates clone for the farm
createAction ( ) : Scalr\Api\DataType\ResultEnvelope Create a new Farm in this Environment
createVariableAction ( integer $farmId ) : Scalr\Api\DataType\ResultEnvelope Creates farm's global var
deleteAction ( string $farmId ) : Scalr\Api\DataType\ResultEnvelope Delete an Farm from this Environment
deleteVariableAction ( integer $farmId, string $name ) : Scalr\Api\DataType\ResultEnvelope Deletes farm's global variable
describeAction ( ) : Scalr\Api\DataType\ListResultEnvelope Retrieves the list of the farms
describeServersAction ( integer $farmId ) : Scalr\Api\DataType\ListResultEnvelope Gets list of farm's servers
describeVariablesAction ( integer $farmId ) : Scalr\Api\DataType\ListResultEnvelope Gets the list of the available Global Variables of the farm
fetchAction ( string $farmId ) : Scalr\Api\DataType\ResultEnvelope Fetches detailed info about one farm
fetchVariableAction ( integer $farmId, string $name ) : Scalr\Api\DataType\ResultEnvelope Gets specific global var of the farm
getFarm ( string $farmId, boolean | string $modify = false ) : Farm Gets specified Farm taking into account both scope and authentication token
getVariableInstance ( ) : Scalr_Scripting_GlobalVariables Gets global variable object
launchAction ( integer $farmId ) : Scalr\Api\DataType\ResultEnvelope Launch specified farm
modifyAction ( integer $farmId ) : Scalr\Api\DataType\ResultEnvelope Change farm attributes.
modifyVariableAction ( integer $farmId, string $name ) : Scalr\Api\DataType\ResultEnvelope Modifies farm's global variable
terminateAction ( integer $farmId ) : Scalr\Api\DataType\ResultEnvelope Terminates specified farm

Private Methods

Method Description
getDefaultCriteria ( ) : array Gets default search criteria according environment scope

Method Details

cloneAction() public method

Creates clone for the farm
public cloneAction ( integer $farmId ) : Scalr\Api\DataType\ResultEnvelope
$farmId integer Unique farm identifier
return Scalr\Api\DataType\ResultEnvelope

createAction() public method

Create a new Farm in this Environment
public createAction ( ) : Scalr\Api\DataType\ResultEnvelope
return Scalr\Api\DataType\ResultEnvelope

createVariableAction() public method

Creates farm's global var
public createVariableAction ( integer $farmId ) : Scalr\Api\DataType\ResultEnvelope
$farmId integer Numeric identifier of the Farm
return Scalr\Api\DataType\ResultEnvelope

deleteAction() public method

Delete an Farm from this Environment
public deleteAction ( string $farmId ) : Scalr\Api\DataType\ResultEnvelope
$farmId string Unique identifier of the script
return Scalr\Api\DataType\ResultEnvelope

deleteVariableAction() public method

Deletes farm's global variable
public deleteVariableAction ( integer $farmId, string $name ) : Scalr\Api\DataType\ResultEnvelope
$farmId integer Numeric identifier of the Farm
$name string Name of variable
return Scalr\Api\DataType\ResultEnvelope

describeAction() public method

Retrieves the list of the farms
public describeAction ( ) : Scalr\Api\DataType\ListResultEnvelope
return Scalr\Api\DataType\ListResultEnvelope Returns describe result

describeServersAction() public method

Gets list of farm's servers
public describeServersAction ( integer $farmId ) : Scalr\Api\DataType\ListResultEnvelope
$farmId integer Identifier of the Farm
return Scalr\Api\DataType\ListResultEnvelope

describeVariablesAction() public method

Gets the list of the available Global Variables of the farm
public describeVariablesAction ( integer $farmId ) : Scalr\Api\DataType\ListResultEnvelope
$farmId integer Numeric identifier of the Farm
return Scalr\Api\DataType\ListResultEnvelope

fetchAction() public method

Fetches detailed info about one farm
public fetchAction ( string $farmId ) : Scalr\Api\DataType\ResultEnvelope
$farmId string Numeric identifier of the farm
return Scalr\Api\DataType\ResultEnvelope

fetchVariableAction() public method

Gets specific global var of the farm
public fetchVariableAction ( integer $farmId, string $name ) : Scalr\Api\DataType\ResultEnvelope
$farmId integer Numeric identifier of the Farm
$name string Name of variable
return Scalr\Api\DataType\ResultEnvelope

getFarm() public method

Gets specified Farm taking into account both scope and authentication token
public getFarm ( string $farmId, boolean | string $modify = false ) : Farm
$farmId string Numeric identifier of the Farm
$modify boolean | string optional Permission identifier
return Scalr\Model\Entity\Farm Returns the Farm Entity on success

getVariableInstance() public method

Gets global variable object
public getVariableInstance ( ) : Scalr_Scripting_GlobalVariables
return Scalr_Scripting_GlobalVariables

launchAction() public method

Launch specified farm
public launchAction ( integer $farmId ) : Scalr\Api\DataType\ResultEnvelope
$farmId integer Unique farm identifier
return Scalr\Api\DataType\ResultEnvelope

modifyAction() public method

Change farm attributes.
public modifyAction ( integer $farmId ) : Scalr\Api\DataType\ResultEnvelope
$farmId integer Unique identifier of the script
return Scalr\Api\DataType\ResultEnvelope

modifyVariableAction() public method

Modifies farm's global variable
public modifyVariableAction ( integer $farmId, string $name ) : Scalr\Api\DataType\ResultEnvelope
$farmId integer Numeric identifier of the Farm
$name string Name of variable
return Scalr\Api\DataType\ResultEnvelope

terminateAction() public method

Terminates specified farm
public terminateAction ( integer $farmId ) : Scalr\Api\DataType\ResultEnvelope
$farmId integer Unique farm identifier
return Scalr\Api\DataType\ResultEnvelope