registerDBProxyTargets method

Future<RegisterDBProxyTargetsResponse> registerDBProxyTargets({
  1. required String dBProxyName,
  2. List<String>? dBClusterIdentifiers,
  3. List<String>? dBInstanceIdentifiers,
  4. String? targetGroupName,
})

Associate one or more DBProxyTarget data structures with a DBProxyTargetGroup.

May throw DBProxyNotFoundFault. May throw DBProxyTargetGroupNotFoundFault. May throw DBClusterNotFoundFault. May throw DBInstanceNotFoundFault. May throw DBProxyTargetAlreadyRegisteredFault. May throw InvalidDBInstanceStateFault. May throw InvalidDBClusterStateFault. May throw InvalidDBProxyStateFault. May throw InsufficientAvailableIPsInSubnetFault.

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 {
  ArgumentError.checkNotNull(dBProxyName, 'dBProxyName');
  final $request = <String, dynamic>{};
  $request['DBProxyName'] = dBProxyName;
  dBClusterIdentifiers?.also((arg) => $request['DBClusterIdentifiers'] = arg);
  dBInstanceIdentifiers
      ?.also((arg) => $request['DBInstanceIdentifiers'] = arg);
  targetGroupName?.also((arg) => $request['TargetGroupName'] = arg);
  final $result = await _protocol.send(
    $request,
    action: 'RegisterDBProxyTargets',
    version: '2014-10-31',
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    shape: shapes['RegisterDBProxyTargetsRequest'],
    shapes: shapes,
    resultWrapper: 'RegisterDBProxyTargetsResult',
  );
  return RegisterDBProxyTargetsResponse.fromXml($result);
}