updateTable method
Future<UpdateTableOutput>
updateTable({
- required ProvisionedThroughput provisionedThroughput,
- required String tableName,
Updates the provisioned throughput for the given table.
Setting the throughput for a table helps you manage performance and is part of the Provisioned Throughput feature of Amazon DynamoDB.
May throw ResourceInUseException. May throw ResourceNotFoundException. May throw LimitExceededException. May throw InternalServerError.
Parameter tableName
:
The name of the table you want to update. Allowed characters are
a-z
, A-Z
, 0-9
, _
(underscore), -
(hyphen) and .
(period).
Implementation
Future<UpdateTableOutput> updateTable({
required ProvisionedThroughput provisionedThroughput,
required String tableName,
}) async {
ArgumentError.checkNotNull(provisionedThroughput, 'provisionedThroughput');
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.UpdateTable'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'ProvisionedThroughput': provisionedThroughput,
'TableName': tableName,
},
);
return UpdateTableOutput.fromJson(jsonResponse.body);
}