def close_point_in_time(
        self,
        *,
        id: t.Optional[str] = None,
        error_trace: t.Optional[bool] = None,
        filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
        human: t.Optional[bool] = None,
        pretty: t.Optional[bool] = None,
        body: t.Optional[t.Dict[str, t.Any]] = None,
    ) -> ObjectApiResponse[t.Any]:
        """
        .. raw:: html

          <p>Close a point in time.
          A point in time must be opened explicitly before being used in search requests.
          The <code>keep_alive</code> parameter tells Elasticsearch how long it should persist.
          A point in time is automatically closed when the <code>keep_alive</code> period has elapsed.
          However, keeping points in time has a cost; close them as soon as they are no longer required for search requests.</p>


        `<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-open-point-in-time>`_

        :param id: The ID of the point-in-time.
        """
        if id is None and body is None:
            raise ValueError("Empty value passed for parameter 'id'")
        __path_parts: t.Dict[str, str] = {}
        __path = "/_pit"
        __query: t.Dict[str, t.Any] = {}
        __body: t.Dict[str, t.Any] = body if body is not None else {}
        if error_trace is not None:
            __query["error_trace"] = error_trace
        if filter_path is not None:
            __query["filter_path"] = filter_path
        if human is not None:
            __query["human"] = human
        if pretty is not None:
            __query["pretty"] = pretty
        if not __body:
            if id is not None:
                __body["id"] = id
        if not __body:
            __body = None  # type: ignore[assignment]
        __headers = {"accept": "application/json"}
        if __body is not None:
            __headers["content-type"] = "application/json"
        return self.perform_request(  # type: ignore[return-value]
            "DELETE",
            __path,
            params=__query,
            headers=__headers,
            body=__body,
            endpoint_id="close_point_in_time",
            path_parts=__path_parts,
        )

        .. raw:: html

          <p>Close a point in time.
          A point in time must be opened explicitly before being used in search requests.
          The <code>keep_alive</code> parameter tells Elasticsearch how long it should persist.
          A point in time is automatically closed when the <code>keep_alive</code> period has elapsed.
          However, keeping points in time has a cost; close them as soon as they are no longer required for search requests.</p>


        `<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-open-point-in-time>`_

        :param id: The ID of the point-in-time.
        
elasticsearch/_sync/client/__init__.py