Skip to content

get_connect_peer_associations

get_connect_peer_associations(
    global_network_id: GlobalNetworkId,
    *,
    config_overrides: Optional[NetworkManagerClientConfig] = None,
    connect_peer_ids: Optional[ConnectPeerIdList] = None,
    max_results: Optional[MaxResults] = None,
    next_token: Optional[NextToken] = None,
) -> GetConnectPeerAssociationsResponse

Returns information about a core network Connect peer associations.

Parameters:

Raises:

Source code in docs_src/capo_networkmanager/_services/network_manager.py
def get_connect_peer_associations(
    self,
    global_network_id: "capo_networkmanager.types.global_network_id.GlobalNetworkId",
    *,
    config_overrides: Optional[NetworkManagerClientConfig] = None,
    connect_peer_ids: Optional[
        "capo_networkmanager.types.connect_peer_id_list.ConnectPeerIdList"
    ] = None,
    max_results: Optional[
        "capo_networkmanager.types.max_results.MaxResults"
    ] = None,
    next_token: Optional["capo_networkmanager.types.next_token.NextToken"] = None,
) -> "capo_networkmanager.types.get_connect_peer_associations_response.GetConnectPeerAssociationsResponse":
    """<p>Returns information about a core network Connect peer associations.</p>

    Args:
        global_network_id: <p>The ID of the global network.</p>
        connect_peer_ids: <p>The IDs of the Connect peers.</p>
        max_results: <p>The maximum number of results to return.</p>
        next_token: <p>The token for the next page of results.</p>

    Raises:
        capo_networkmanager.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient access to perform this action.</p>
        capo_networkmanager.errors.conflict_exception.ConflictException: <p>There was a conflict processing the request. Updating or deleting the resource can cause an inconsistent state.</p>
        capo_networkmanager.errors.internal_server_exception.InternalServerException: <p>The request has failed due to an internal error.</p>
        capo_networkmanager.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource could not be found.</p>
        capo_networkmanager.errors.throttling_exception.ThrottlingException: <p>The request was denied due to request throttling.</p>
        capo_networkmanager.errors.validation_exception.ValidationException: <p>The input fails to satisfy the constraints.</p>
        capo_networkmanager.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_networkmanager.types.get_connect_peer_associations_request.GetConnectPeerAssociationsRequest]",
    ) -> OperationResponse[
        "capo_networkmanager.types.get_connect_peer_associations_response.GetConnectPeerAssociationsResponse"
    ]:
        import capo_networkmanager._operations.network_manager.get_connect_peer_associations

        output, http_response = (
            capo_networkmanager._operations.network_manager.get_connect_peer_associations.get_connect_peer_associations(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("GetConnectPeerAssociations")
    )
    input_: capo_networkmanager.types.get_connect_peer_associations_request.GetConnectPeerAssociationsRequest = {
        "global_network_id": global_network_id
    }
    if connect_peer_ids is not None:
        input_["connect_peer_ids"] = connect_peer_ids
    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