Scalr\Api\Service\User\V1beta0\Controller\Roles::fetchVariableAction PHP Метод

fetchVariableAction() публичный Метод

Gets specific global var of the role
public fetchVariableAction ( integer $roleId, string $name ) : Scalr\Api\DataType\ResultEnvelope
$roleId integer
$name string
Результат Scalr\Api\DataType\ResultEnvelope
    public function fetchVariableAction($roleId, $name)
    {
        $this->checkScopedPermissions('ROLES', 'MANAGE');
        $this->getRole($roleId, true);
        $globalVar = $this->getVariableInstance();
        $fetch = $this->getGlobalVariable($name, $globalVar, $roleId);
        if (empty($fetch)) {
            throw new ApiErrorException(404, ErrorMessage::ERR_OBJECT_NOT_FOUND, "Requested Global Variable does not exist.");
        }
        return $this->result($this->adapter('globalVariable')->convertData($fetch));
    }