Skip to content

list_odb_peering_connections async

list_odb_peering_connections(
    *,
    config_overrides: Optional[AsyncodbClientConfig] = None,
    max_results: Optional[int] = None,
    next_token: Optional[str] = None,
    odb_network_id: Optional[ResourceIdOrArn] = None,
) -> ListOdbPeeringConnectionsOutput

Lists all ODB peering connections or those associated with a specific ODB network.

Parameters:

  • max_results (Optional[int], default: None ) –

    The maximum number of ODB peering connections to return in the response.

    Default: 20

    Constraints:

    • Must be between 1 and 100.

  • next_token (Optional[str], default: None ) –

    The pagination token for the next page of ODB peering connections.

  • odb_network_id (Optional[ResourceIdOrArn], default: None ) –

    The identifier of the ODB network to list peering connections for.

    If not specified, lists all ODB peering connections in the account.

Raises:

  • AccessDeniedException –

    You don't have sufficient access to perform this action. Make sure you have the required permissions 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/async_odb.py
async def list_odb_peering_connections(
    self,
    *,
    config_overrides: Optional[AsyncodbClientConfig] = None,
    max_results: Optional[int] = None,
    next_token: Optional[str] = None,
    odb_network_id: Optional[
        "capo_odb.types.resource_id_or_arn.ResourceIdOrArn"
    ] = None,
) -> "capo_odb.types.list_odb_peering_connections_output.ListOdbPeeringConnectionsOutput":
    """<p>Lists all ODB peering connections or those associated with a specific ODB network.</p>

    Args:
        max_results: <p>The maximum number of ODB peering connections to return in the response.</p> <p>Default: <code>20</code> </p> <p>Constraints:</p> <ul> <li> <p>Must be between 1 and 100.</p> </li> </ul>
        next_token: <p>The pagination token for the next page of ODB peering connections.</p>
        odb_network_id: <p>The identifier of the ODB network to list peering connections for.</p> <p>If not specified, lists all ODB peering connections in the account.</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.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.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_odb.types.list_odb_peering_connections_input.ListOdbPeeringConnectionsInput]",
    ) -> AsyncOperationResponse[
        "capo_odb.types.list_odb_peering_connections_output.ListOdbPeeringConnectionsOutput"
    ]:
        import capo_odb._operations.odb.list_odb_peering_connections

        (
            output,
            http_response,
        ) = await capo_odb._operations.odb.list_odb_peering_connections.async_list_odb_peering_connections(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListOdbPeeringConnections")
    )
    input_: capo_odb.types.list_odb_peering_connections_input.ListOdbPeeringConnectionsInput = {}
    if max_results is not None:
        input_["max_results"] = max_results
    if next_token is not None:
        input_["next_token"] = next_token
    if odb_network_id is not None:
        input_["odb_network_id"] = odb_network_id

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output