Skip to content

create_transit_virtual_interface async

create_transit_virtual_interface(
    connection_id: ConnectionId,
    new_transit_virtual_interface: NewTransitVirtualInterface,
    *,
    config_overrides: Optional[AsyncDirectConnectClientConfig] = None,
) -> CreateTransitVirtualInterfaceResult

Creates a transit virtual interface. A transit virtual interface should be used to access one or more transit gateways associated with Direct Connect gateways. A transit virtual interface enables the connection of multiple VPCs attached to a transit gateway to a Direct Connect gateway.

If you associate your transit gateway with one or more Direct Connect gateways, the Autonomous System Number (ASN) used by the transit gateway and the Direct Connect gateway must be different. For example, if you use the default ASN 64512 for both your the transit gateway and Direct Connect gateway, the association request fails.

A jumbo MTU value must be either 1500 or 8500. No other values will be accepted. Setting the MTU of a virtual interface to 8500 (jumbo frames) can cause an update to the underlying physical connection if it wasn't updated to support jumbo frames. Updating the connection disrupts network connectivity for all virtual interfaces associated with the connection for up to 30 seconds. To check whether your connection supports jumbo frames, call DescribeConnections. To check whether your virtual interface supports jumbo frames, call DescribeVirtualInterfaces.

Parameters:

Raises:

Source code in docs_src/capo_direct_connect/_services/async_direct_connect.py
async def create_transit_virtual_interface(
    self,
    connection_id: "capo_direct_connect.types.connection_id.ConnectionId",
    new_transit_virtual_interface: "capo_direct_connect.types.new_transit_virtual_interface.NewTransitVirtualInterface",
    *,
    config_overrides: Optional[AsyncDirectConnectClientConfig] = None,
) -> "capo_direct_connect.types.create_transit_virtual_interface_result.CreateTransitVirtualInterfaceResult":
    """<p>Creates a transit virtual interface. A transit virtual interface should be used to access one or more transit gateways associated with Direct Connect gateways. A transit virtual interface enables the connection of multiple VPCs attached to a transit gateway to a Direct Connect gateway.</p> <important> <p>If you associate your transit gateway with one or more Direct Connect gateways, the Autonomous System Number (ASN) used by the transit gateway and the Direct Connect gateway must be different. For example, if you use the default ASN 64512 for both your the transit gateway and Direct Connect gateway, the association request fails.</p> </important> <p>A jumbo MTU value must be either 1500 or 8500. No other values will be accepted. Setting the MTU of a virtual interface to 8500 (jumbo frames) can cause an update to the underlying physical connection if it wasn't updated to support jumbo frames. Updating the connection disrupts network connectivity for all virtual interfaces associated with the connection for up to 30 seconds. To check whether your connection supports jumbo frames, call <a>DescribeConnections</a>. To check whether your virtual interface supports jumbo frames, call <a>DescribeVirtualInterfaces</a>.</p>

    Args:
        connection_id: <p>The ID of the connection.</p>
        new_transit_virtual_interface: <p>Information about the transit virtual interface.</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.duplicate_tag_keys_exception.DuplicateTagKeysException: <p>A tag key was specified more than once.</p>
        capo_direct_connect.errors.limit_exceeded_exception.LimitExceededException: <p>The rate limiter limit has been exceeded for the connection. You cannot add more rate limiters to virtual interfaces on this connection.</p>
        capo_direct_connect.errors.too_many_tags_exception.TooManyTagsException: <p>You have reached the limit on the number of tags that can be assigned.</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.create_transit_virtual_interface_request.CreateTransitVirtualInterfaceRequest]",
    ) -> AsyncOperationResponse[
        "capo_direct_connect.types.create_transit_virtual_interface_result.CreateTransitVirtualInterfaceResult"
    ]:
        import capo_direct_connect._operations.overture_service.create_transit_virtual_interface

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("CreateTransitVirtualInterface")
    )
    input_: capo_direct_connect.types.create_transit_virtual_interface_request.CreateTransitVirtualInterfaceRequest = {
        "connection_id": connection_id,
        "new_transit_virtual_interface": new_transit_virtual_interface,
    }

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