Skip to content

describe_direct_connect_gateway_attachments

describe_direct_connect_gateway_attachments(
    *,
    config_overrides: Optional[DirectConnectClientConfig] = None,
    direct_connect_gateway_id: Optional[DirectConnectGatewayId] = None,
    virtual_interface_id: Optional[VirtualInterfaceId] = None,
    max_results: Optional[MaxResultSetSize] = None,
    next_token: Optional[PaginationToken] = None,
) -> DescribeDirectConnectGatewayAttachmentsResult

Lists the attachments between your Direct Connect gateways and virtual interfaces. You must specify a Direct Connect gateway, a virtual interface, or both. If you specify a Direct Connect gateway, the response contains all virtual interfaces attached to the Direct Connect gateway. If you specify a virtual interface, the response contains all Direct Connect gateways attached to the virtual interface. If you specify both, the response contains the attachment between the Direct Connect gateway and the virtual interface.

Parameters:

  • direct_connect_gateway_id (Optional[DirectConnectGatewayId], default: None ) –

    The ID of the Direct Connect gateway.

  • 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 provided in the previous call to retrieve the next page.

Raises:

Source code in docs_src/capo_direct_connect/_services/direct_connect.py
def describe_direct_connect_gateway_attachments(
    self,
    *,
    config_overrides: Optional[DirectConnectClientConfig] = None,
    direct_connect_gateway_id: Optional[
        "capo_direct_connect.types.direct_connect_gateway_id.DirectConnectGatewayId"
    ] = 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.describe_direct_connect_gateway_attachments_result.DescribeDirectConnectGatewayAttachmentsResult":
    """<p>Lists the attachments between your Direct Connect gateways and virtual interfaces. You must specify a Direct Connect gateway, a virtual interface, or both. If you specify a Direct Connect gateway, the response contains all virtual interfaces attached to the Direct Connect gateway. If you specify a virtual interface, the response contains all Direct Connect gateways attached to the virtual interface. If you specify both, the response contains the attachment between the Direct Connect gateway and the virtual interface.</p>

    Args:
        direct_connect_gateway_id: <p>The ID of the Direct Connect gateway.</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 provided in the previous call to retrieve the next page.</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.
    """

    def _handler(
        req: "OperationRequest[capo_direct_connect.types.describe_direct_connect_gateway_attachments_request.DescribeDirectConnectGatewayAttachmentsRequest]",
    ) -> OperationResponse[
        "capo_direct_connect.types.describe_direct_connect_gateway_attachments_result.DescribeDirectConnectGatewayAttachmentsResult"
    ]:
        import capo_direct_connect._operations.overture_service.describe_direct_connect_gateway_attachments

        output, http_response = (
            capo_direct_connect._operations.overture_service.describe_direct_connect_gateway_attachments.describe_direct_connect_gateway_attachments(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging("DescribeDirectConnectGatewayAttachments"),
    )
    input_: capo_direct_connect.types.describe_direct_connect_gateway_attachments_request.DescribeDirectConnectGatewayAttachmentsRequest = {}
    if direct_connect_gateway_id is not None:
        input_["direct_connect_gateway_id"] = direct_connect_gateway_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 = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output