public async Task <IActionResult> GetList(GetCloudResourceApiModel model) { var currentUser = await TryGetUser(User); var userIds = await _dataAccess.GetAllParentUsersIds(currentUser.Email); userIds.Add(currentUser.Id); var fetchRequest = new CloudResourceFetchRequest { PageSize = model.PageSize, CurrentPage = model.CurrentPage, ValidUsers = userIds, Options = new CloudResourceFilterOptions { CloudAccountId = model.CloudAccountId, ExcludeAutoScalingGroups = model.ExcludeAutoScalingGroups, ExcludeDatabases = model.ExcludeDatabases, ExcludeVirtualMachines = model.ExcludeVirtualMachines, IncludeAws = model.IncludeAws, IncludeAzure = model.IncludeAzure, IncludeCanStartOnly = model.IncludeCanStartOnly, IncludeCanStopOnly = model.IncludeCanStopOnly, IncludeGoogleCloud = model.IncludeGoogleCloud } }; var resources = _cloudStorageService.GetCloudResources(fetchRequest); var returnObject = new { current = resources.CurrentPage, rowCount = resources.PageSize, total = resources.RowCount, Items = resources.Items }; return(Ok(returnObject)); }