Skip to content

start_bgp_failover_test async

start_bgp_failover_test(
    virtual_interface_id: VirtualInterfaceId,
    *,
    config_overrides: Optional[AsyncDirectConnectClientConfig] = None,
    bgp_peers: Optional[BGPPeerIdList] = None,
    test_duration_in_minutes: Optional[TestDuration] = None,
) -> StartBgpFailoverTestResponse

Starts the virtual interface failover test that verifies your configuration meets your resiliency requirements by placing the BGP peering session in the DOWN state. You can then send traffic to verify that there are no outages.

You can run the test on public, private, transit, and hosted virtual interfaces.

You can use ListVirtualInterfaceTestHistory to view the virtual interface test history.

If you need to stop the test before the test interval completes, use StopBgpFailoverTest.

Parameters:

  • virtual_interface_id (VirtualInterfaceId) –

    The ID of the virtual interface you want to test.

  • bgp_peers (Optional[BGPPeerIdList], default: None ) –

    The BGP peers to place in the DOWN state.

  • test_duration_in_minutes (Optional[TestDuration], default: None ) –

    The time in minutes that the virtual interface failover test will last.

    Maximum value: 4,320 minutes (72 hours).

    Default: 180 minutes (3 hours).

Raises:

Source code in docs_src/capo_direct_connect/_services/async_direct_connect.py
async def start_bgp_failover_test(
    self,
    virtual_interface_id: "capo_direct_connect.types.virtual_interface_id.VirtualInterfaceId",
    *,
    config_overrides: Optional[AsyncDirectConnectClientConfig] = None,
    bgp_peers: Optional[
        "capo_direct_connect.types.bgp_peer_id_list.BGPPeerIdList"
    ] = None,
    test_duration_in_minutes: Optional[
        "capo_direct_connect.types.test_duration.TestDuration"
    ] = None,
) -> "capo_direct_connect.types.start_bgp_failover_test_response.StartBgpFailoverTestResponse":
    """<p>Starts the virtual interface failover test that verifies your configuration meets your resiliency requirements by placing the BGP peering session in the DOWN state. You can then send traffic to verify that there are no outages.</p> <p>You can run the test on public, private, transit, and hosted virtual interfaces.</p> <p>You can use <a href="https://docs.aws.amazon.com/directconnect/latest/APIReference/API_ListVirtualInterfaceTestHistory.html">ListVirtualInterfaceTestHistory</a> to view the virtual interface test history.</p> <p>If you need to stop the test before the test interval completes, use <a href="https://docs.aws.amazon.com/directconnect/latest/APIReference/API_StopBgpFailoverTest.html">StopBgpFailoverTest</a>.</p>

    Args:
        virtual_interface_id: <p>The ID of the virtual interface you want to test.</p>
        bgp_peers: <p>The BGP peers to place in the DOWN state.</p>
        test_duration_in_minutes: <p>The time in minutes that the virtual interface failover test will last.</p> <p>Maximum value: 4,320 minutes (72 hours).</p> <p>Default: 180 minutes (3 hours).</p>

    Raises:
        capo_direct_connect.errors.direct_connect_client_exception.DirectConnectClientException: <p>One or more parameters are not valid.</p>
        capo_direct_connect.errors.direct_connect_server_exception.DirectConnectServerException: <p>A server-side error occurred.</p>
        capo_direct_connect.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_direct_connect.types.start_bgp_failover_test_request.StartBgpFailoverTestRequest]",
    ) -> AsyncOperationResponse[
        "capo_direct_connect.types.start_bgp_failover_test_response.StartBgpFailoverTestResponse"
    ]:
        import capo_direct_connect._operations.overture_service.start_bgp_failover_test

        (
            output,
            http_response,
        ) = await capo_direct_connect._operations.overture_service.start_bgp_failover_test.async_start_bgp_failover_test(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("StartBgpFailoverTest")
    )
    input_: capo_direct_connect.types.start_bgp_failover_test_request.StartBgpFailoverTestRequest = {
        "virtual_interface_id": virtual_interface_id
    }
    if bgp_peers is not None:
        input_["bgp_peers"] = bgp_peers
    if test_duration_in_minutes is not None:
        input_["test_duration_in_minutes"] = test_duration_in_minutes

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