modifyDBProxyEndpoint method

Future<ModifyDBProxyEndpointResponse> modifyDBProxyEndpoint({
  1. required String dBProxyEndpointName,
  2. String? newDBProxyEndpointName,
  3. List<String>? vpcSecurityGroupIds,
})

Changes the settings for an existing DB proxy endpoint.

May throw DBProxyEndpointAlreadyExistsFault. May throw DBProxyEndpointNotFoundFault. May throw InvalidDBProxyEndpointStateFault. May throw InvalidDBProxyStateFault.

Parameter dBProxyEndpointName : The name of the DB proxy sociated with the DB proxy endpoint that you want to modify.

Parameter newDBProxyEndpointName : The new identifier for the DBProxyEndpoint. 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 vpcSecurityGroupIds : The VPC security group IDs for the DB proxy endpoint. When the DB proxy endpoint uses a different VPC than the original proxy, you also specify a different set of security group IDs than for the original proxy.

Implementation

Future<ModifyDBProxyEndpointResponse> modifyDBProxyEndpoint({
  required String dBProxyEndpointName,
  String? newDBProxyEndpointName,
  List<String>? vpcSecurityGroupIds,
}) async {
  final $request = <String, String>{
    'DBProxyEndpointName': dBProxyEndpointName,
    if (newDBProxyEndpointName != null)
      'NewDBProxyEndpointName': newDBProxyEndpointName,
    if (vpcSecurityGroupIds != null)
      if (vpcSecurityGroupIds.isEmpty)
        'VpcSecurityGroupIds': ''
      else
        for (var i1 = 0; i1 < vpcSecurityGroupIds.length; i1++)
          'VpcSecurityGroupIds.member.${i1 + 1}': vpcSecurityGroupIds[i1],
  };
  final $result = await _protocol.send(
    $request,
    action: 'ModifyDBProxyEndpoint',
    version: '2014-10-31',
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    resultWrapper: 'ModifyDBProxyEndpointResult',
  );
  return ModifyDBProxyEndpointResponse.fromXml($result);
}