updateTableReplicaAutoScaling method
Updates auto scaling settings on your global tables at once.
May throw InternalServerError.
May throw LimitExceededException.
May throw ResourceInUseException.
May throw ResourceNotFoundException.
Parameter tableName :
The name of the global table to be updated. You can also provide the
Amazon Resource Name (ARN) of the table in this parameter.
Parameter globalSecondaryIndexUpdates :
Represents the auto scaling settings of the global secondary indexes of
the replica to be updated.
Parameter replicaUpdates :
Represents the auto scaling settings of replicas of the table that will be
modified.
Implementation
Future<UpdateTableReplicaAutoScalingOutput> updateTableReplicaAutoScaling({
required String tableName,
List<GlobalSecondaryIndexAutoScalingUpdate>? globalSecondaryIndexUpdates,
AutoScalingSettingsUpdate? provisionedWriteCapacityAutoScalingUpdate,
List<ReplicaAutoScalingUpdate>? replicaUpdates,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.0',
'X-Amz-Target': 'DynamoDB_20120810.UpdateTableReplicaAutoScaling'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'TableName': tableName,
if (globalSecondaryIndexUpdates != null)
'GlobalSecondaryIndexUpdates': globalSecondaryIndexUpdates,
if (provisionedWriteCapacityAutoScalingUpdate != null)
'ProvisionedWriteCapacityAutoScalingUpdate':
provisionedWriteCapacityAutoScalingUpdate,
if (replicaUpdates != null) 'ReplicaUpdates': replicaUpdates,
},
);
return UpdateTableReplicaAutoScalingOutput.fromJson(jsonResponse.body);
}