describeTable method
Retrieves information about the table, including the current status of the table, the primary key schema and when the table was created.
If the table does not exist, Amazon DynamoDB returns a
ResourceNotFoundException
.
May throw ResourceNotFoundException. May throw InternalServerError.
Parameter tableName
:
The name of the table you want to describe. Allowed characters are
a-z
, A-Z
, 0-9
, _
(underscore), -
(hyphen) and .
(period).
Implementation
Future<DescribeTableOutput> describeTable({
required String tableName,
}) async {
ArgumentError.checkNotNull(tableName, 'tableName');
_s.validateStringLength(
'tableName',
tableName,
3,
255,
isRequired: true,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.0',
'X-Amz-Target': 'DynamoDB_20111205.DescribeTable'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'TableName': tableName,
},
);
return DescribeTableOutput.fromJson(jsonResponse.body);
}