modifyDBSubnetGroup method

Future<ModifyDBSubnetGroupResult> modifyDBSubnetGroup({
  1. required String dBSubnetGroupName,
  2. required List<String> subnetIds,
  3. String? dBSubnetGroupDescription,
})

Modifies an existing DB subnet group. DB subnet groups must contain at least one subnet in at least two AZs in the AWS Region.

May throw DBSubnetGroupNotFoundFault. May throw DBSubnetQuotaExceededFault. May throw SubnetAlreadyInUse. May throw DBSubnetGroupDoesNotCoverEnoughAZs. May throw InvalidSubnet.

Parameter dBSubnetGroupName : The name for the DB subnet group. This value is stored as a lowercase string. You can't modify the default subnet group.

Constraints: Must match the name of an existing DBSubnetGroup. Must not be default.

Example: mySubnetgroup

Parameter subnetIds : The EC2 subnet IDs for the DB subnet group.

Parameter dBSubnetGroupDescription : The description for the DB subnet group.

Implementation

Future<ModifyDBSubnetGroupResult> modifyDBSubnetGroup({
  required String dBSubnetGroupName,
  required List<String> subnetIds,
  String? dBSubnetGroupDescription,
}) async {
  ArgumentError.checkNotNull(dBSubnetGroupName, 'dBSubnetGroupName');
  ArgumentError.checkNotNull(subnetIds, 'subnetIds');
  final $request = <String, dynamic>{};
  $request['DBSubnetGroupName'] = dBSubnetGroupName;
  $request['SubnetIds'] = subnetIds;
  dBSubnetGroupDescription
      ?.also((arg) => $request['DBSubnetGroupDescription'] = arg);
  final $result = await _protocol.send(
    $request,
    action: 'ModifyDBSubnetGroup',
    version: '2014-10-31',
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    shape: shapes['ModifyDBSubnetGroupMessage'],
    shapes: shapes,
    resultWrapper: 'ModifyDBSubnetGroupResult',
  );
  return ModifyDBSubnetGroupResult.fromXml($result);
}