Skip to content

describe_virtual_interfaces async

describe_virtual_interfaces(
    *,
    config_overrides: Optional[AsyncDirectConnectClientConfig] = None,
    connection_id: Optional[ConnectionId] = None,
    virtual_interface_id: Optional[VirtualInterfaceId] = None,
    max_results: Optional[MaxResultSetSize] = None,
    next_token: Optional[PaginationToken] = None,
) -> VirtualInterfaces

Displays all virtual interfaces for an Amazon Web Services account. Virtual interfaces deleted fewer than 15 minutes before you make the request are also returned. If you specify a connection ID, only the virtual interfaces associated with the connection are returned. If you specify a virtual interface ID, then only a single virtual interface is returned.

A virtual interface (VLAN) transmits the traffic between the Direct Connect location and the customer network.

  • If you're using an asn, the response includes the ASN value in both the asn and asnLong fields.

  • If you're using asnLong, the response returns a value of 0 (zero) for the asn attribute because it exceeds the highest ASN value of 2,147,483,647 that it can support

Parameters:

  • connection_id (Optional[ConnectionId], default: None ) –

    The ID of the connection.

  • virtual_interface_id (Optional[VirtualInterfaceId], default: None ) –

    The ID of the virtual interface.

  • max_results (Optional[MaxResultSetSize], default: None ) –

    The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.

    If MaxResults is given a value larger than 100, only 100 results are returned.

  • next_token (Optional[PaginationToken], default: None ) –

    The token for the next page of results.

Raises:

Source code in docs_src/capo_direct_connect/_services/async_direct_connect.py
async def describe_virtual_interfaces(
    self,
    *,
    config_overrides: Optional[AsyncDirectConnectClientConfig] = None,
    connection_id: Optional[
        "capo_direct_connect.types.connection_id.ConnectionId"
    ] = None,
    virtual_interface_id: Optional[
        "capo_direct_connect.types.virtual_interface_id.VirtualInterfaceId"
    ] = None,
    max_results: Optional[
        "capo_direct_connect.types.max_result_set_size.MaxResultSetSize"
    ] = None,
    next_token: Optional[
        "capo_direct_connect.types.pagination_token.PaginationToken"
    ] = None,
) -> "capo_direct_connect.types.virtual_interfaces.VirtualInterfaces":
    """<p>Displays all virtual interfaces for an Amazon Web Services account. Virtual interfaces deleted fewer than 15 minutes before you make the request are also returned. If you specify a connection ID, only the virtual interfaces associated with the connection are returned. If you specify a virtual interface ID, then only a single virtual interface is returned.</p> <p>A virtual interface (VLAN) transmits the traffic between the Direct Connect location and the customer network.</p> <ul> <li> <p>If you're using an <code>asn</code>, the response includes the ASN value in both the <code>asn</code> and <code>asnLong</code> fields.</p> </li> <li> <p>If you're using <code>asnLong</code>, the response returns a value of <code>0</code> (zero) for the <code>asn</code> attribute because it exceeds the highest ASN value of 2,147,483,647 that it can support</p> </li> </ul>

    Args:
        connection_id: <p>The ID of the connection.</p>
        virtual_interface_id: <p>The ID of the virtual interface.</p>
        max_results: <p>The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned <code>nextToken</code> value.</p> <p>If <code>MaxResults</code> is given a value larger than 100, only 100 results are returned.</p>
        next_token: <p>The token for the next page of results.</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.describe_virtual_interfaces_request.DescribeVirtualInterfacesRequest]",
    ) -> AsyncOperationResponse[
        "capo_direct_connect.types.virtual_interfaces.VirtualInterfaces"
    ]:
        import capo_direct_connect._operations.overture_service.describe_virtual_interfaces

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DescribeVirtualInterfaces")
    )
    input_: capo_direct_connect.types.describe_virtual_interfaces_request.DescribeVirtualInterfacesRequest = {}
    if connection_id is not None:
        input_["connection_id"] = connection_id
    if virtual_interface_id is not None:
        input_["virtual_interface_id"] = virtual_interface_id
    if max_results is not None:
        input_["max_results"] = max_results
    if next_token is not None:
        input_["next_token"] = next_token

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