Skip to content

describe_cluster_peers

describe_cluster_peers(
    *,
    config_overrides: Optional[FSxClientConfig] = None,
    cluster_peer_ids: Optional[ClusterPeerIds] = None,
    filters: Optional[ClusterPeerFilters] = None,
    max_results: Optional[MaxResults] = None,
    next_token: Optional[NextToken] = None,
) -> DescribeClusterPeersResponse

Returns the description of specific Amazon FSx for NetApp ONTAP cluster peers, if a ClusterPeerIds value is provided. Otherwise, this operation returns all cluster peers owned by your Amazon Web Services account in the Amazon Web Services Region of the endpoint that you're calling.

When retrieving all cluster peers, you can optionally specify the MaxResults parameter to limit the number of cluster peers in a response. If more cluster peers remain, Amazon FSx returns a NextToken value in the response. In this case, send a later request with the NextToken request parameter set to the value of NextToken from the last response.

Parameters:

  • cluster_peer_ids (Optional[ClusterPeerIds], default: None ) –

    The IDs of the cluster peers that you want to retrieve. If you also specify Filters, only cluster peers that match both the IDs and the filters are returned. If any IDs aren't found, or if a filter excludes any of them, a ClusterPeerNotFound error occurs.

  • filters (Optional[ClusterPeerFilters], default: None ) –

    The filters structure. The supported name is file-system-id.

Raises:

  • BadRequest –

    A generic error indicating a failure with a client request.

  • ClusterPeerNotFound –

    No Amazon FSx cluster peers were found based on the supplied parameters.

  • FileSystemNotFound –

    No Amazon FSx file systems were found based upon supplied parameters.

  • InternalServerError –

    A generic error indicating a server-side failure.

  • UnknownServiceError –

    The service returned an error code this client does not model.

Source code in docs_src/capo_fsx/_services/f_sx.py
def describe_cluster_peers(
    self,
    *,
    config_overrides: Optional[FSxClientConfig] = None,
    cluster_peer_ids: Optional[
        "capo_fsx.types.cluster_peer_ids.ClusterPeerIds"
    ] = None,
    filters: Optional[
        "capo_fsx.types.cluster_peer_filters.ClusterPeerFilters"
    ] = None,
    max_results: Optional["capo_fsx.types.max_results.MaxResults"] = None,
    next_token: Optional["capo_fsx.types.next_token.NextToken"] = None,
) -> "capo_fsx.types.describe_cluster_peers_response.DescribeClusterPeersResponse":
    """<p>Returns the description of specific Amazon FSx for NetApp ONTAP cluster peers, if a <code>ClusterPeerIds</code> value is provided. Otherwise, this operation returns all cluster peers owned by your Amazon Web Services account in the Amazon Web Services Region of the endpoint that you're calling.</p> <p>When retrieving all cluster peers, you can optionally specify the <code>MaxResults</code> parameter to limit the number of cluster peers in a response. If more cluster peers remain, Amazon FSx returns a <code>NextToken</code> value in the response. In this case, send a later request with the <code>NextToken</code> request parameter set to the value of <code>NextToken</code> from the last response.</p>

    Args:
        cluster_peer_ids: <p>The IDs of the cluster peers that you want to retrieve. If you also specify <code>Filters</code>, only cluster peers that match both the IDs and the filters are returned. If any IDs aren't found, or if a filter excludes any of them, a <code>ClusterPeerNotFound</code> error occurs.</p>
        filters: <p>The filters structure. The supported name is <code>file-system-id</code>.</p>

    Raises:
        capo_fsx.errors.bad_request.BadRequest: <p>A generic error indicating a failure with a client request.</p>
        capo_fsx.errors.cluster_peer_not_found.ClusterPeerNotFound: <p>No Amazon FSx cluster peers were found based on the supplied parameters.</p>
        capo_fsx.errors.file_system_not_found.FileSystemNotFound: <p>No Amazon FSx file systems were found based upon supplied parameters.</p>
        capo_fsx.errors.internal_server_error.InternalServerError: <p>A generic error indicating a server-side failure.</p>
        capo_fsx.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_fsx.types.describe_cluster_peers_request.DescribeClusterPeersRequest]",
    ) -> OperationResponse[
        "capo_fsx.types.describe_cluster_peers_response.DescribeClusterPeersResponse"
    ]:
        import capo_fsx._operations.aws_simba_api_service_v20180301.describe_cluster_peers

        output, http_response = (
            capo_fsx._operations.aws_simba_api_service_v20180301.describe_cluster_peers.describe_cluster_peers(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DescribeClusterPeers")
    )
    input_: capo_fsx.types.describe_cluster_peers_request.DescribeClusterPeersRequest = {}
    if cluster_peer_ids is not None:
        input_["cluster_peer_ids"] = cluster_peer_ids
    if filters is not None:
        input_["filters"] = filters
    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