for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Guillermoandrae\DynamoDb\Operation;
use Aws\DynamoDb\Exception\DynamoDbException;
use Guillermoandrae\DynamoDb\Contract\AbstractTableOperation;
use Guillermoandrae\DynamoDb\Factory\ExceptionFactory;
/**
* DescribeTable operation.
*
* @author Guillermo A. Fisher <[email protected]>
* @link https://docs.aws.amazon.com/aws-sdk-php/v3/api/api-dynamodb-2012-08-10.html#describetable
*/
final class DescribeTableOperation extends AbstractTableOperation
{
public function execute(): ?array
try {
$result = $this->client->describeTable($this->toArray());
return $result['Table'];
} catch (DynamoDbException $ex) {
throw ExceptionFactory::factory($ex);
}