Skip to content

describe_direct_connect_gateway_associations

describe_direct_connect_gateway_associations(
    *,
    config_overrides: Optional[DirectConnectClientConfig] = None,
    association_id: Optional[DirectConnectGatewayAssociationId] = None,
    associated_gateway_id: Optional[AssociatedGatewayId] = None,
    direct_connect_gateway_id: Optional[DirectConnectGatewayId] = None,
    max_results: Optional[MaxResultSetSize] = None,
    next_token: Optional[PaginationToken] = None,
    virtual_gateway_id: Optional[VirtualGatewayId] = None,
) -> DescribeDirectConnectGatewayAssociationsResult

Lists the associations between your Direct Connect gateways and virtual private gateways and transit gateways. You must specify one of the following:

  • A Direct Connect gateway

    The response contains all virtual private gateways and transit gateways associated with the Direct Connect gateway.

  • A virtual private gateway

    The response contains the Direct Connect gateway.

  • A transit gateway

    The response contains the Direct Connect gateway.

  • A Direct Connect gateway and a virtual private gateway

    The response contains the association between the Direct Connect gateway and virtual private gateway.

  • A Direct Connect gateway and a transit gateway

    The response contains the association between the Direct Connect gateway and transit gateway.

  • A Direct Connect gateway and a virtual private gateway

    The response contains the association between the Direct Connect gateway and virtual private gateway.

  • A Direct Connect gateway association to a Cloud WAN core network

    The response contains the Cloud WAN core network ID that the Direct Connect gateway is associated to.

Parameters:

  • association_id (Optional[DirectConnectGatewayAssociationId], default: None ) –

    The ID of the Direct Connect gateway association.

  • associated_gateway_id (Optional[AssociatedGatewayId], default: None ) –

    The ID of the associated gateway.

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

    The ID of the Direct Connect gateway.

  • 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.

  • virtual_gateway_id (Optional[VirtualGatewayId], default: None ) –

    The ID of the virtual private gateway or transit gateway.

Raises:

Source code in docs_src/capo_direct_connect/_services/direct_connect.py
def describe_direct_connect_gateway_associations(
    self,
    *,
    config_overrides: Optional[DirectConnectClientConfig] = None,
    association_id: Optional[
        "capo_direct_connect.types.direct_connect_gateway_association_id.DirectConnectGatewayAssociationId"
    ] = None,
    associated_gateway_id: Optional[
        "capo_direct_connect.types.associated_gateway_id.AssociatedGatewayId"
    ] = None,
    direct_connect_gateway_id: Optional[
        "capo_direct_connect.types.direct_connect_gateway_id.DirectConnectGatewayId"
    ] = 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,
    virtual_gateway_id: Optional[
        "capo_direct_connect.types.virtual_gateway_id.VirtualGatewayId"
    ] = None,
) -> "capo_direct_connect.types.describe_direct_connect_gateway_associations_result.DescribeDirectConnectGatewayAssociationsResult":
    """<p>Lists the associations between your Direct Connect gateways and virtual private gateways and transit gateways. You must specify one of the following:</p> <ul> <li> <p>A Direct Connect gateway</p> <p>The response contains all virtual private gateways and transit gateways associated with the Direct Connect gateway.</p> </li> <li> <p>A virtual private gateway</p> <p>The response contains the Direct Connect gateway.</p> </li> <li> <p>A transit gateway</p> <p>The response contains the Direct Connect gateway.</p> </li> <li> <p>A Direct Connect gateway and a virtual private gateway</p> <p>The response contains the association between the Direct Connect gateway and virtual private gateway.</p> </li> <li> <p>A Direct Connect gateway and a transit gateway</p> <p>The response contains the association between the Direct Connect gateway and transit gateway.</p> </li> <li> <p>A Direct Connect gateway and a virtual private gateway</p> <p>The response contains the association between the Direct Connect gateway and virtual private gateway.</p> </li> <li> <p>A Direct Connect gateway association to a Cloud WAN core network</p> <p>The response contains the Cloud WAN core network ID that the Direct Connect gateway is associated to.</p> </li> </ul>

    Args:
        association_id: <p>The ID of the Direct Connect gateway association.</p>
        associated_gateway_id: <p>The ID of the associated gateway.</p>
        direct_connect_gateway_id: <p>The ID of the Direct Connect gateway.</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>
        virtual_gateway_id: <p>The ID of the virtual private gateway or transit gateway.</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_associations_request.DescribeDirectConnectGatewayAssociationsRequest]",
    ) -> OperationResponse[
        "capo_direct_connect.types.describe_direct_connect_gateway_associations_result.DescribeDirectConnectGatewayAssociationsResult"
    ]:
        import capo_direct_connect._operations.overture_service.describe_direct_connect_gateway_associations

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

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging("DescribeDirectConnectGatewayAssociations"),
    )
    input_: capo_direct_connect.types.describe_direct_connect_gateway_associations_request.DescribeDirectConnectGatewayAssociationsRequest = {}
    if association_id is not None:
        input_["association_id"] = association_id
    if associated_gateway_id is not None:
        input_["associated_gateway_id"] = associated_gateway_id
    if direct_connect_gateway_id is not None:
        input_["direct_connect_gateway_id"] = direct_connect_gateway_id
    if max_results is not None:
        input_["max_results"] = max_results
    if next_token is not None:
        input_["next_token"] = next_token
    if virtual_gateway_id is not None:
        input_["virtual_gateway_id"] = virtual_gateway_id

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output