modifyDBProxy method
Changes the settings for an existing DB proxy.
May throw DBProxyAlreadyExistsFault.
May throw DBProxyNotFoundFault.
May throw InvalidDBProxyStateFault.
Parameter dBProxyName :
The identifier for the DBProxy to modify.
Parameter auth :
The new authentication settings for the DBProxy.
Parameter debugLogging :
Specifies whether the proxy logs detailed connection and query
information. When you enable DebugLogging, the proxy captures
connection details and connection pool behavior from your queries. Debug
logging increases CloudWatch costs and can impact proxy performance.
Enable this option only when you need to troubleshoot connection or
performance issues.
Parameter defaultAuthScheme :
The default authentication scheme that the proxy uses for client
connections to the proxy and connections from the proxy to the underlying
database. Valid values are NONE and IAM_AUTH.
When set to IAM_AUTH, the proxy uses end-to-end IAM
authentication to connect to the database.
Parameter idleClientTimeout :
The number of seconds that a connection to the proxy can be inactive
before the proxy disconnects it. You can set this value higher or lower
than the connection timeout limit for the associated database.
Parameter newDBProxyName :
The new identifier for the DBProxy. 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.
Parameter requireTLS :
Whether Transport Layer Security (TLS) encryption is required for
connections to the proxy. By enabling this setting, you can enforce
encrypted TLS connections to the proxy, even if the associated database
doesn't use TLS.
Parameter roleArn :
The Amazon Resource Name (ARN) of the IAM role that the proxy uses to
access secrets in Amazon Web Services Secrets Manager.
Parameter securityGroups :
The new list of security groups for the DBProxy.
Implementation
Future<ModifyDBProxyResponse> modifyDBProxy({
required String dBProxyName,
List<UserAuthConfig>? auth,
bool? debugLogging,
DefaultAuthScheme? defaultAuthScheme,
int? idleClientTimeout,
String? newDBProxyName,
bool? requireTLS,
String? roleArn,
List<String>? securityGroups,
}) async {
final $request = <String, String>{
'DBProxyName': dBProxyName,
if (auth != null)
if (auth.isEmpty)
'Auth': ''
else
for (var i1 = 0; i1 < auth.length; i1++)
for (var e3 in auth[i1].toQueryMap().entries)
'Auth.member.${i1 + 1}.${e3.key}': e3.value,
if (debugLogging != null) 'DebugLogging': debugLogging.toString(),
if (defaultAuthScheme != null)
'DefaultAuthScheme': defaultAuthScheme.value,
if (idleClientTimeout != null)
'IdleClientTimeout': idleClientTimeout.toString(),
if (newDBProxyName != null) 'NewDBProxyName': newDBProxyName,
if (requireTLS != null) 'RequireTLS': requireTLS.toString(),
if (roleArn != null) 'RoleArn': roleArn,
if (securityGroups != null)
if (securityGroups.isEmpty)
'SecurityGroups': ''
else
for (var i1 = 0; i1 < securityGroups.length; i1++)
'SecurityGroups.member.${i1 + 1}': securityGroups[i1],
};
final $result = await _protocol.send(
$request,
action: 'ModifyDBProxy',
version: '2014-10-31',
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
resultWrapper: 'ModifyDBProxyResult',
);
return ModifyDBProxyResponse.fromXml($result);
}