modifyDBProxyTargetGroup method

Future<ModifyDBProxyTargetGroupResponse> modifyDBProxyTargetGroup({
  1. required String dBProxyName,
  2. required String targetGroupName,
  3. ConnectionPoolConfiguration? connectionPoolConfig,
  4. String? newName,
})

Modifies the properties of a DBProxyTargetGroup.

May throw DBProxyNotFoundFault. May throw DBProxyTargetGroupNotFoundFault. May throw InvalidDBProxyStateFault.

Parameter dBProxyName : The name of the new proxy to which to assign the target group.

Parameter targetGroupName : The name of the new target group to assign to the proxy.

Parameter connectionPoolConfig : The settings that determine the size and behavior of the connection pool for the target group.

Parameter newName : The new name for the modified DBProxyTarget. An identifier must begin with a letter and must contain only ASCII letters, digits, and hyphens; it can't end with a hyphen or contain two consecutive hyphens.

Implementation

Future<ModifyDBProxyTargetGroupResponse> modifyDBProxyTargetGroup({
  required String dBProxyName,
  required String targetGroupName,
  ConnectionPoolConfiguration? connectionPoolConfig,
  String? newName,
}) async {
  ArgumentError.checkNotNull(dBProxyName, 'dBProxyName');
  ArgumentError.checkNotNull(targetGroupName, 'targetGroupName');
  final $request = <String, dynamic>{};
  $request['DBProxyName'] = dBProxyName;
  $request['TargetGroupName'] = targetGroupName;
  connectionPoolConfig?.also((arg) => $request['ConnectionPoolConfig'] = arg);
  newName?.also((arg) => $request['NewName'] = arg);
  final $result = await _protocol.send(
    $request,
    action: 'ModifyDBProxyTargetGroup',
    version: '2014-10-31',
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    shape: shapes['ModifyDBProxyTargetGroupRequest'],
    shapes: shapes,
    resultWrapper: 'ModifyDBProxyTargetGroupResult',
  );
  return ModifyDBProxyTargetGroupResponse.fromXml($result);
}