modifyDBSubnetGroup method
Modifies an existing subnet group. subnet groups must contain at least one subnet in at least two Availability Zones 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 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 Amazon EC2 subnet IDs for the subnet group.
Parameter dBSubnetGroupDescription
:
The description for the 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);
}