modifyDBShardGroup method

Future<DBShardGroup> modifyDBShardGroup({
  1. required String dBShardGroupIdentifier,
  2. int? computeRedundancy,
  3. double? maxACU,
  4. double? minACU,
})

Modifies the settings of an Aurora Limitless Database DB shard group. You can change one or more settings by specifying these parameters and the new values in the request.

May throw DBShardGroupAlreadyExistsFault. May throw DBShardGroupNotFoundFault. May throw InvalidDBClusterStateFault.

Parameter dBShardGroupIdentifier : The name of the DB shard group to modify.

Parameter computeRedundancy : Specifies whether to create standby DB shard groups for the DB shard group. Valid values are the following:

  • 0 - Creates a DB shard group without a standby DB shard group. This is the default value.
  • 1 - Creates a DB shard group with a standby DB shard group in a different Availability Zone (AZ).
  • 2 - Creates a DB shard group with two standby DB shard groups in two different AZs.

Parameter maxACU : The maximum capacity of the DB shard group in Aurora capacity units (ACUs).

Parameter minACU : The minimum capacity of the DB shard group in Aurora capacity units (ACUs).

Implementation

Future<DBShardGroup> modifyDBShardGroup({
  required String dBShardGroupIdentifier,
  int? computeRedundancy,
  double? maxACU,
  double? minACU,
}) async {
  final $request = <String, String>{
    'DBShardGroupIdentifier': dBShardGroupIdentifier,
    if (computeRedundancy != null)
      'ComputeRedundancy': computeRedundancy.toString(),
    if (maxACU != null) 'MaxACU': maxACU.toString(),
    if (minACU != null) 'MinACU': minACU.toString(),
  };
  final $result = await _protocol.send(
    $request,
    action: 'ModifyDBShardGroup',
    version: '2014-10-31',
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    resultWrapper: 'ModifyDBShardGroupResult',
  );
  return DBShardGroup.fromXml($result);
}