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

Author: N.V.
Inheritance: extends Scalr\Api\Rest\Controller\ApiController
Show file Open project: scalr/scalr

Public Methods

Method Description
createAction ( integer $farmRoleId ) : Scalr\Api\DataType\ResultEnvelope Create a new Orchestration Rule for this Role
deleteAction ( integer $farmRoleId, integer $ruleId ) : Scalr\Api\DataType\ResultEnvelope Delete rule from specified role
describeAction ( integer $farmRoleId ) : array Retrieves the list of orchestration rules of the role
fetchAction ( integer $farmRoleId, integer $ruleId ) : Scalr\Api\DataType\ResultEnvelope Fetches detailed info about specified rule
getFarmRole ( integer $farmRoleId, boolean $modify = false ) : FarmRole | null Gets farm role from database using User's Environment
getRule ( integer $ruleId, boolean $modify = false ) : Scalr\Model\Entity\FarmRoleScript Gets specified orchestration rule
modifyAction ( integer $farmRoleId, integer $ruleId ) : Scalr\Api\DataType\ResultEnvelope Change rule attributes.

Method Details

createAction() public method

Create a new Orchestration Rule for this Role
public createAction ( integer $farmRoleId ) : Scalr\Api\DataType\ResultEnvelope
$farmRoleId integer Unique identifier of a Farm Role
return Scalr\Api\DataType\ResultEnvelope

deleteAction() public method

Delete rule from specified role
public deleteAction ( integer $farmRoleId, integer $ruleId ) : Scalr\Api\DataType\ResultEnvelope
$farmRoleId integer Unique identifier of a Farm Role
$ruleId integer Numeric identifier of the rule
return Scalr\Api\DataType\ResultEnvelope

describeAction() public method

Retrieves the list of orchestration rules of the role
public describeAction ( integer $farmRoleId ) : array
$farmRoleId integer Numeric role id
return array Returns describe result

fetchAction() public method

Fetches detailed info about specified rule
public fetchAction ( integer $farmRoleId, integer $ruleId ) : Scalr\Api\DataType\ResultEnvelope
$farmRoleId integer Unique identifier of a Farm Role
$ruleId integer Numeric identifier of the rule
return Scalr\Api\DataType\ResultEnvelope

getFarmRole() public method

Gets farm role from database using User's Environment
public getFarmRole ( integer $farmRoleId, boolean $modify = false ) : FarmRole | null
$farmRoleId integer The identifier of the Farm Role
$modify boolean optional Flag checking write permissions
return Scalr\Model\Entity\FarmRole | null

getRule() public method

Gets specified orchestration rule
public getRule ( integer $ruleId, boolean $modify = false ) : Scalr\Model\Entity\FarmRoleScript
$ruleId integer Numeric identifier of the rule
$modify boolean optional Modifying flag
return Scalr\Model\Entity\FarmRoleScript Returns the Script Entity on success

modifyAction() public method

Change rule attributes.
public modifyAction ( integer $farmRoleId, integer $ruleId ) : Scalr\Api\DataType\ResultEnvelope
$farmRoleId integer Unique identifier of a Farm Role
$ruleId integer Numeric identifier of the rule
return Scalr\Api\DataType\ResultEnvelope