in Storage/DynamoDb/SampleApplication/Controllers/LowLevel/TablesController.cs [69:95]
public async Task<IActionResult> GetTableStatus(string tableName)
{
Console.WriteLine("*** Retrieving table status information ***");
Console.WriteLine($"Searching for table status: {tableName}");
DescribeTableRequest req = new DescribeTableRequest();
req.TableName = tableName;
try
{
var res = await _dynamoClient.DescribeTableAsync(req);
var description = res.Table.TableStatus;
return Ok(description);
}
catch (AmazonDynamoDBException addbe)
{
return AmazonExceptionHandlers.HandleAmazonDynamoDBException(addbe);
}
catch (AmazonServiceException ase)
{
AmazonExceptionHandlers.HandleAmazonServiceExceptionException(ase);
}
catch (AmazonClientException ace)
{
AmazonExceptionHandlers.HandleAmazonClientExceptionException(ace);
}
return StatusCode(500);
}