def move_to_step(
        self,
        *,
        index: str,
        current_step: t.Optional[t.Mapping[str, t.Any]] = None,
        next_step: t.Optional[t.Mapping[str, t.Any]] = 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>Move to a lifecycle step.
          Manually move an index into a specific step in the lifecycle policy and run that step.</p>
          <p>WARNING: This operation can result in the loss of data. Manually moving an index into a specific step runs that step even if it has already been performed. This is a potentially destructive action and this should be considered an expert level API.</p>
          <p>You must specify both the current step and the step to be executed in the body of the request.
          The request will fail if the current step does not match the step currently running for the index
          This is to prevent the index from being moved from an unexpected step into the next step.</p>
          <p>When specifying the target (<code>next_step</code>) to which the index will be moved, either the name or both the action and name fields are optional.
          If only the phase is specified, the index will move to the first step of the first action in the target phase.
          If the phase and action are specified, the index will move to the first step of the specified action in the specified phase.
          Only actions specified in the ILM policy are considered valid.
          An index cannot move to a step that is not part of its policy.</p>


        `<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ilm-move-to-step>`_

        :param index: The name of the index whose lifecycle step is to change
        :param current_step: The step that the index is expected to be in.
        :param next_step: The step that you want to run.
        """
        if index in SKIP_IN_PATH:
            raise ValueError("Empty value passed for parameter 'index'")
        if current_step is None and body is None:
            raise ValueError("Empty value passed for parameter 'current_step'")
        if next_step is None and body is None:
            raise ValueError("Empty value passed for parameter 'next_step'")
        __path_parts: t.Dict[str, str] = {"index": _quote(index)}
        __path = f'/_ilm/move/{__path_parts["index"]}'
        __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 current_step is not None:
                __body["current_step"] = current_step
            if next_step is not None:
                __body["next_step"] = next_step
        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]
            "POST",
            __path,
            params=__query,
            headers=__headers,
            body=__body,
            endpoint_id="ilm.move_to_step",
            path_parts=__path_parts,
        )

        .. raw:: html

          <p>Move to a lifecycle step.
          Manually move an index into a specific step in the lifecycle policy and run that step.</p>
          <p>WARNING: This operation can result in the loss of data. Manually moving an index into a specific step runs that step even if it has already been performed. This is a potentially destructive action and this should be considered an expert level API.</p>
          <p>You must specify both the current step and the step to be executed in the body of the request.
          The request will fail if the current step does not match the step currently running for the index
          This is to prevent the index from being moved from an unexpected step into the next step.</p>
          <p>When specifying the target (<code>next_step</code>) to which the index will be moved, either the name or both the action and name fields are optional.
          If only the phase is specified, the index will move to the first step of the first action in the target phase.
          If the phase and action are specified, the index will move to the first step of the specified action in the specified phase.
          Only actions specified in the ILM policy are considered valid.
          An index cannot move to a step that is not part of its policy.</p>


        `<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ilm-move-to-step>`_

        :param index: The name of the index whose lifecycle step is to change
        :param current_step: The step that the index is expected to be in.
        :param next_step: The step that you want to run.
        
elasticsearch/_sync/client/ilm.py