Skip to content

delete_vpn_connection_route async

delete_vpn_connection_route(
    *,
    config_overrides: Optional[AsyncEC2ClientConfig] = None,
    destination_cidr_block: Optional[String] = None,
    vpn_connection_id: Optional[VpnConnectionId] = None,
) -> None

Deletes the specified static route associated with a VPN connection between an existing virtual private gateway and a VPN customer gateway. The static route allows traffic to be routed from the virtual private gateway to the VPN customer gateway.

Parameters:

  • destination_cidr_block (Optional[String], default: None ) –

    The CIDR block associated with the local subnet of the customer network.

  • vpn_connection_id (Optional[VpnConnectionId], default: None ) –

    The ID of the VPN connection.

Raises:

Source code in docs_src/capo_ec2/_services/async_ec2.py
async def delete_vpn_connection_route(
    self,
    *,
    config_overrides: Optional[AsyncEC2ClientConfig] = None,
    destination_cidr_block: Optional["capo_ec2.types.string.String"] = None,
    vpn_connection_id: Optional[
        "capo_ec2.types.vpn_connection_id.VpnConnectionId"
    ] = None,
) -> None:
    """<p>Deletes the specified static route associated with a VPN connection between an existing virtual private gateway and a VPN customer gateway. The static route allows traffic to be routed from the virtual private gateway to the VPN customer gateway.</p>

    Args:
        destination_cidr_block: <p>The CIDR block associated with the local subnet of the customer network.</p>
        vpn_connection_id: <p>The ID of the VPN connection.</p>

    Raises:
        capo_ec2.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_ec2.types.delete_vpn_connection_route_request.DeleteVpnConnectionRouteRequest]",
    ) -> AsyncOperationResponse[None]:
        import capo_ec2._operations.amazon_ec2.delete_vpn_connection_route

        (
            output,
            http_response,
        ) = await capo_ec2._operations.amazon_ec2.delete_vpn_connection_route.async_delete_vpn_connection_route(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DeleteVpnConnectionRoute")
    )
    input_: capo_ec2.types.delete_vpn_connection_route_request.DeleteVpnConnectionRouteRequest = {}
    if destination_cidr_block is not None:
        input_["destination_cidr_block"] = destination_cidr_block
    if vpn_connection_id is not None:
        input_["vpn_connection_id"] = vpn_connection_id

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