protected function getRows(\Aws\Result $changeSetResult) { $rows = []; foreach ($changeSetResult->search('Changes[]') as $change) { $resourceChange = $change['ResourceChange']; $rows[] = [$this->decorateChangesetAction($resourceChange['Action']), $resourceChange['LogicalResourceId'], isset($resourceChange['PhysicalResourceId']) ? $resourceChange['PhysicalResourceId'] : '', $resourceChange['ResourceType'], isset($resourceChange['Replacement']) ? Decorator::decorateChangesetReplacement($resourceChange['Replacement']) : '']; } return $rows; }
private function determineNextToken(Result $result) { if (!$this->config['output_token']) { return null; } if ($this->config['more_results'] && !$result->search($this->config['more_results'])) { return null; } $nextToken = is_array($this->config['output_token']) ? array_filter($result->search(json_encode($this->config['output_token']))) : $result->search($this->config['output_token']); return $nextToken; }
private function determineNextToken(Result $result) { if (!$this->config['output_token']) { return null; } if ($this->config['more_results'] && !$result->search($this->config['more_results'])) { return null; } $nextToken = is_scalar($this->config['output_token']) ? [$this->config['input_token'] => $this->config['output_token']] : array_combine($this->config['input_token'], $this->config['output_token']); return array_filter(array_map(function ($outputToken) use($result) { return $result->search($outputToken); }, $nextToken)); }