def stop(
        self,
        *,
        error_trace: t.Optional[bool] = None,
        filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
        human: t.Optional[bool] = None,
        master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
        pretty: t.Optional[bool] = None,
        timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
    ) -> ObjectApiResponse[t.Any]:
        """
        .. raw:: html

          <p>Stop snapshot lifecycle management.
          Stop all snapshot lifecycle management (SLM) operations and the SLM plugin.
          This API is useful when you are performing maintenance on a cluster and need to prevent SLM from performing any actions on your data streams or indices.
          Stopping SLM does not stop any snapshots that are in progress.
          You can manually trigger snapshots with the run snapshot lifecycle policy API even if SLM is stopped.</p>
          <p>The API returns a response as soon as the request is acknowledged, but the plugin might continue to run until in-progress operations complete and it can be safely stopped.
          Use the get snapshot lifecycle management status API to see if SLM is running.</p>


        `<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-slm-stop>`_

        :param master_timeout: The period to wait for a connection to the master node.
            If no response is received before the timeout expires, the request fails
            and returns an error. To indicate that the request should never timeout,
            set it to `-1`.
        :param timeout: The period to wait for a response. If no response is received
            before the timeout expires, the request fails and returns an error. To indicate
            that the request should never timeout, set it to `-1`.
        """
        __path_parts: t.Dict[str, str] = {}
        __path = "/_slm/stop"
        __query: t.Dict[str, t.Any] = {}
        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 master_timeout is not None:
            __query["master_timeout"] = master_timeout
        if pretty is not None:
            __query["pretty"] = pretty
        if timeout is not None:
            __query["timeout"] = timeout
        __headers = {"accept": "application/json"}
        return self.perform_request(  # type: ignore[return-value]
            "POST",
            __path,
            params=__query,
            headers=__headers,
            endpoint_id="slm.stop",
            path_parts=__path_parts,
        )

        .. raw:: html

          <p>Stop snapshot lifecycle management.
          Stop all snapshot lifecycle management (SLM) operations and the SLM plugin.
          This API is useful when you are performing maintenance on a cluster and need to prevent SLM from performing any actions on your data streams or indices.
          Stopping SLM does not stop any snapshots that are in progress.
          You can manually trigger snapshots with the run snapshot lifecycle policy API even if SLM is stopped.</p>
          <p>The API returns a response as soon as the request is acknowledged, but the plugin might continue to run until in-progress operations complete and it can be safely stopped.
          Use the get snapshot lifecycle management status API to see if SLM is running.</p>


        `<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-slm-stop>`_

        :param master_timeout: The period to wait for a connection to the master node.
            If no response is received before the timeout expires, the request fails
            and returns an error. To indicate that the request should never timeout,
            set it to `-1`.
        :param timeout: The period to wait for a response. If no response is received
            before the timeout expires, the request fails and returns an error. To indicate
            that the request should never timeout, set it to `-1`.
        
elasticsearch/_sync/client/slm.py