registerDBProxyTargets method
Associate one or more DBProxyTarget data structures with a
DBProxyTargetGroup.
May throw DBClusterNotFoundFault.
May throw DBInstanceNotFoundFault.
May throw DBProxyNotFoundFault.
May throw DBProxyTargetAlreadyRegisteredFault.
May throw DBProxyTargetGroupNotFoundFault.
May throw InsufficientAvailableIPsInSubnetFault.
May throw InvalidDBClusterStateFault.
May throw InvalidDBInstanceStateFault.
May throw InvalidDBProxyStateFault.
Parameter dBProxyName :
The identifier of the DBProxy that is associated with the
DBProxyTargetGroup.
Parameter dBClusterIdentifiers :
One or more DB cluster identifiers.
Parameter dBInstanceIdentifiers :
One or more DB instance identifiers.
Parameter targetGroupName :
The identifier of the DBProxyTargetGroup.
Implementation
Future<RegisterDBProxyTargetsResponse> registerDBProxyTargets({
required String dBProxyName,
List<String>? dBClusterIdentifiers,
List<String>? dBInstanceIdentifiers,
String? targetGroupName,
}) async {
final $request = <String, String>{
'DBProxyName': dBProxyName,
if (dBClusterIdentifiers != null)
if (dBClusterIdentifiers.isEmpty)
'DBClusterIdentifiers': ''
else
for (var i1 = 0; i1 < dBClusterIdentifiers.length; i1++)
'DBClusterIdentifiers.member.${i1 + 1}': dBClusterIdentifiers[i1],
if (dBInstanceIdentifiers != null)
if (dBInstanceIdentifiers.isEmpty)
'DBInstanceIdentifiers': ''
else
for (var i1 = 0; i1 < dBInstanceIdentifiers.length; i1++)
'DBInstanceIdentifiers.member.${i1 + 1}': dBInstanceIdentifiers[i1],
if (targetGroupName != null) 'TargetGroupName': targetGroupName,
};
final $result = await _protocol.send(
$request,
action: 'RegisterDBProxyTargets',
version: '2014-10-31',
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
resultWrapper: 'RegisterDBProxyTargetsResult',
);
return RegisterDBProxyTargetsResponse.fromXml($result);
}