Skip to content

create_private_virtual_interface async

create_private_virtual_interface(
    connection_id: ConnectionId,
    new_private_virtual_interface: NewPrivateVirtualInterface,
    *,
    config_overrides: Optional[AsyncDirectConnectClientConfig] = None,
) -> VirtualInterface

Creates a private virtual interface. A virtual interface is the VLAN that transports Direct Connect traffic. A private virtual interface can be connected to either a Direct Connect gateway or a Virtual Private Gateway (VGW). Connecting the private virtual interface to a Direct Connect gateway enables the possibility for connecting to multiple VPCs, including VPCs in different Amazon Web Services Regions. Connecting the private virtual interface to a VGW only provides access to a single VPC within the same Region.

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_private_virtual_interface(
    self,
    connection_id: "capo_direct_connect.types.connection_id.ConnectionId",
    new_private_virtual_interface: "capo_direct_connect.types.new_private_virtual_interface.NewPrivateVirtualInterface",
    *,
    config_overrides: Optional[AsyncDirectConnectClientConfig] = None,
) -> "capo_direct_connect.types.virtual_interface.VirtualInterface":
    """<p>Creates a private virtual interface. A virtual interface is the VLAN that transports Direct Connect traffic. A private virtual interface can be connected to either a Direct Connect gateway or a Virtual Private Gateway (VGW). Connecting the private virtual interface to a Direct Connect gateway enables the possibility for connecting to multiple VPCs, including VPCs in different Amazon Web Services Regions. Connecting the private virtual interface to a VGW only provides access to a single VPC within the same Region.</p> <p>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_private_virtual_interface: <p>Information about the private 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_private_virtual_interface_request.CreatePrivateVirtualInterfaceRequest]",
    ) -> AsyncOperationResponse[
        "capo_direct_connect.types.virtual_interface.VirtualInterface"
    ]:
        import capo_direct_connect._operations.overture_service.create_private_virtual_interface

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("CreatePrivateVirtualInterface")
    )
    input_: capo_direct_connect.types.create_private_virtual_interface_request.CreatePrivateVirtualInterfaceRequest = {
        "connection_id": connection_id,
        "new_private_virtual_interface": new_private_virtual_interface,
    }

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