Skip to content

allocate_transit_virtual_interface async

allocate_transit_virtual_interface(
    connection_id: ConnectionId,
    owner_account: OwnerAccount,
    new_transit_virtual_interface_allocation: NewTransitVirtualInterfaceAllocation,
    *,
    config_overrides: Optional[AsyncDirectConnectClientConfig] = None,
) -> AllocateTransitVirtualInterfaceResult

Provisions a transit virtual interface to be owned by the specified Amazon Web Services account. Use this type of interface to connect a transit gateway to your Direct Connect gateway.

The owner of a connection provisions a transit virtual interface to be owned by the specified Amazon Web Services account.

After you create a transit virtual interface, it must be confirmed by the owner using ConfirmTransitVirtualInterface. Until this step has been completed, the transit virtual interface is in the requested state and is not available to handle traffic.

Parameters:

  • connection_id (ConnectionId) –

    The ID of the connection on which the transit virtual interface is provisioned.

  • owner_account (OwnerAccount) –

    The ID of the Amazon Web Services account that owns the transit virtual interface.

  • new_transit_virtual_interface_allocation (NewTransitVirtualInterfaceAllocation) –

    Information about the transit virtual interface.

Raises:

Source code in docs_src/capo_direct_connect/_services/async_direct_connect.py
async def allocate_transit_virtual_interface(
    self,
    connection_id: "capo_direct_connect.types.connection_id.ConnectionId",
    owner_account: "capo_direct_connect.types.owner_account.OwnerAccount",
    new_transit_virtual_interface_allocation: "capo_direct_connect.types.new_transit_virtual_interface_allocation.NewTransitVirtualInterfaceAllocation",
    *,
    config_overrides: Optional[AsyncDirectConnectClientConfig] = None,
) -> "capo_direct_connect.types.allocate_transit_virtual_interface_result.AllocateTransitVirtualInterfaceResult":
    """<p>Provisions a transit virtual interface to be owned by the specified Amazon Web Services account. Use this type of interface to connect a transit gateway to your Direct Connect gateway.</p> <p>The owner of a connection provisions a transit virtual interface to be owned by the specified Amazon Web Services account.</p> <p>After you create a transit virtual interface, it must be confirmed by the owner using <a>ConfirmTransitVirtualInterface</a>. Until this step has been completed, the transit virtual interface is in the <code>requested</code> state and is not available to handle traffic.</p>

    Args:
        connection_id: <p>The ID of the connection on which the transit virtual interface is provisioned.</p>
        owner_account: <p>The ID of the Amazon Web Services account that owns the transit virtual interface.</p>
        new_transit_virtual_interface_allocation: <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.allocate_transit_virtual_interface_request.AllocateTransitVirtualInterfaceRequest]",
    ) -> AsyncOperationResponse[
        "capo_direct_connect.types.allocate_transit_virtual_interface_result.AllocateTransitVirtualInterfaceResult"
    ]:
        import capo_direct_connect._operations.overture_service.allocate_transit_virtual_interface

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("AllocateTransitVirtualInterface")
    )
    input_: capo_direct_connect.types.allocate_transit_virtual_interface_request.AllocateTransitVirtualInterfaceRequest = {
        "connection_id": connection_id,
        "owner_account": owner_account,
        "new_transit_virtual_interface_allocation": new_transit_virtual_interface_allocation,
    }

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