Skip to content

update_odb_peering_connection

update_odb_peering_connection(
    odb_peering_connection_id: ResourceIdOrArn,
    *,
    config_overrides: Optional[odbClientConfig] = None,
    display_name: Optional[ResourceDisplayName] = None,
    peer_network_cidrs_to_be_added: Optional[PeeredCidrList] = None,
    peer_network_cidrs_to_be_removed: Optional[PeeredCidrList] = None,
) -> UpdateOdbPeeringConnectionOutput

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.

Parameters:

  • odb_peering_connection_id (ResourceIdOrArn) –

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

  • display_name (Optional[ResourceDisplayName], default: None ) –

    A new display name for the peering connection.

  • peer_network_cidrs_to_be_added (Optional[PeeredCidrList], default: None ) –

    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.

  • peer_network_cidrs_to_be_removed (Optional[PeeredCidrList], default: None ) –

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

Raises:

  • AccessDeniedException –

    You don't have sufficient access to perform this action. Make sure you have the required permissions and try again.

  • ConflictException –

    Occurs when a conflict with the current status of your resource. Fix any inconsistencies with your resource and try again.

  • InternalServerException –

    Occurs when there is an internal failure in the Oracle Database@Amazon Web Services service. Wait and try again.

  • ResourceNotFoundException –

    The operation tried to access a resource that doesn't exist. Make sure you provided the correct resource and try again.

  • ThrottlingException –

    The request was denied due to request throttling.

  • ValidationException –

    The request has failed validation because it is missing required fields or has invalid inputs.

  • UnknownServiceError –

    The service returned an error code this client does not model.

Source code in docs_src/capo_odb/_services/odb.py
def update_odb_peering_connection(
    self,
    odb_peering_connection_id: "capo_odb.types.resource_id_or_arn.ResourceIdOrArn",
    *,
    config_overrides: Optional[odbClientConfig] = None,
    display_name: Optional[
        "capo_odb.types.resource_display_name.ResourceDisplayName"
    ] = None,
    peer_network_cidrs_to_be_added: Optional[
        "capo_odb.types.peered_cidr_list.PeeredCidrList"
    ] = None,
    peer_network_cidrs_to_be_removed: Optional[
        "capo_odb.types.peered_cidr_list.PeeredCidrList"
    ] = None,
) -> "capo_odb.types.update_odb_peering_connection_output.UpdateOdbPeeringConnectionOutput":
    """<p>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.</p>

    Args:
        odb_peering_connection_id: <p>The identifier of the Oracle Database@Amazon Web Services peering connection to update.</p>
        display_name: <p>A new display name for the peering connection.</p>
        peer_network_cidrs_to_be_added: <p>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.</p>
        peer_network_cidrs_to_be_removed: <p>A list of CIDR blocks to remove from the peering connection. The CIDR blocks must currently exist in the peering connection.</p>

    Raises:
        capo_odb.errors.access_denied_exception.AccessDeniedException: <p>You don't have sufficient access to perform this action. Make sure you have the required permissions and try again.</p>
        capo_odb.errors.conflict_exception.ConflictException: <p>Occurs when a conflict with the current status of your resource. Fix any inconsistencies with your resource and try again.</p>
        capo_odb.errors.internal_server_exception.InternalServerException: <p>Occurs when there is an internal failure in the Oracle Database@Amazon Web Services service. Wait and try again.</p>
        capo_odb.errors.resource_not_found_exception.ResourceNotFoundException: <p>The operation tried to access a resource that doesn't exist. Make sure you provided the correct resource and try again.</p>
        capo_odb.errors.throttling_exception.ThrottlingException: <p>The request was denied due to request throttling.</p>
        capo_odb.errors.validation_exception.ValidationException: <p>The request has failed validation because it is missing required fields or has invalid inputs.</p>
        capo_odb.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_odb.types.update_odb_peering_connection_input.UpdateOdbPeeringConnectionInput]",
    ) -> OperationResponse[
        "capo_odb.types.update_odb_peering_connection_output.UpdateOdbPeeringConnectionOutput"
    ]:
        import capo_odb._operations.odb.update_odb_peering_connection

        output, http_response = (
            capo_odb._operations.odb.update_odb_peering_connection.update_odb_peering_connection(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("UpdateOdbPeeringConnection")
    )
    input_: capo_odb.types.update_odb_peering_connection_input.UpdateOdbPeeringConnectionInput = {
        "odb_peering_connection_id": odb_peering_connection_id
    }
    if display_name is not None:
        input_["display_name"] = display_name
    if peer_network_cidrs_to_be_added is not None:
        input_["peer_network_cidrs_to_be_added"] = peer_network_cidrs_to_be_added
    if peer_network_cidrs_to_be_removed is not None:
        input_["peer_network_cidrs_to_be_removed"] = (
            peer_network_cidrs_to_be_removed
        )

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output