updateOdbPeeringConnection method

Future<UpdateOdbPeeringConnectionOutput> updateOdbPeeringConnection({
  1. required String odbPeeringConnectionId,
  2. String? displayName,
  3. List<String>? peerNetworkCidrsToBeAdded,
  4. List<String>? peerNetworkCidrsToBeRemoved,
})

Modifies the settings of an Oracle Database@Amazon Web Services peering connection. You can update the display name and add or remove CIDR blocks from the peering connection.

May throw AccessDeniedException. May throw ConflictException. May throw InternalServerException. May throw ResourceNotFoundException. May throw ThrottlingException. May throw ValidationException.

Parameter odbPeeringConnectionId : The identifier of the Oracle Database@Amazon Web Services peering connection to update.

Parameter displayName : A new display name for the peering connection.

Parameter peerNetworkCidrsToBeAdded : A list of CIDR blocks to add to the peering connection. These CIDR blocks define the IP address ranges that can communicate through the peering connection. The CIDR blocks must not overlap with existing CIDR blocks in the Oracle Database@Amazon Web Services network.

Parameter peerNetworkCidrsToBeRemoved : A list of CIDR blocks to remove from the peering connection. The CIDR blocks must currently exist in the peering connection.

Implementation

Future<UpdateOdbPeeringConnectionOutput> updateOdbPeeringConnection({
  required String odbPeeringConnectionId,
  String? displayName,
  List<String>? peerNetworkCidrsToBeAdded,
  List<String>? peerNetworkCidrsToBeRemoved,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.0',
    'X-Amz-Target': 'Odb.UpdateOdbPeeringConnection'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'odbPeeringConnectionId': odbPeeringConnectionId,
      if (displayName != null) 'displayName': displayName,
      if (peerNetworkCidrsToBeAdded != null)
        'peerNetworkCidrsToBeAdded': peerNetworkCidrsToBeAdded,
      if (peerNetworkCidrsToBeRemoved != null)
        'peerNetworkCidrsToBeRemoved': peerNetworkCidrsToBeRemoved,
    },
  );

  return UpdateOdbPeeringConnectionOutput.fromJson(jsonResponse.body);
}