modifyDBSubnetGroup method
Modifies an existing DB subnet group. DB subnet groups must contain at least one subnet in at least two AZs in the Amazon Web Services Region.
May throw DBSubnetGroupDoesNotCoverEnoughAZs.
May throw DBSubnetGroupNotFoundFault.
May throw DBSubnetQuotaExceededFault.
May throw InvalidDBSubnetGroupStateFault.
May throw InvalidSubnet.
May throw SubnetAlreadyInUse.
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: mydbsubnetgroup
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 {
final $request = <String, String>{
'DBSubnetGroupName': dBSubnetGroupName,
if (subnetIds.isEmpty)
'SubnetIds': ''
else
for (var i1 = 0; i1 < subnetIds.length; i1++)
'SubnetIds.SubnetIdentifier.${i1 + 1}': subnetIds[i1],
if (dBSubnetGroupDescription != null)
'DBSubnetGroupDescription': dBSubnetGroupDescription,
};
final $result = await _protocol.send(
$request,
action: 'ModifyDBSubnetGroup',
version: '2014-10-31',
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
resultWrapper: 'ModifyDBSubnetGroupResult',
);
return ModifyDBSubnetGroupResult.fromXml($result);
}