def create_from(
        self,
        *,
        source: str,
        dest: str,
        create_from: t.Optional[t.Mapping[str, t.Any]] = None,
        body: 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,
    ) -> ObjectApiResponse[t.Any]:
        """
        .. raw:: html

          <p>Create an index from a source index.</p>
          <p>Copy the mappings and settings from the source index to a destination index while allowing request settings and mappings to override the source values.</p>


        `<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-create-from>`_

        :param source: The source index or data stream name
        :param dest: The destination index or data stream name
        :param create_from:
        """
        if source in SKIP_IN_PATH:
            raise ValueError("Empty value passed for parameter 'source'")
        if dest in SKIP_IN_PATH:
            raise ValueError("Empty value passed for parameter 'dest'")
        if create_from is None and body is None:
            raise ValueError(
                "Empty value passed for parameters 'create_from' and 'body', one of them should be set."
            )
        elif create_from is not None and body is not None:
            raise ValueError("Cannot set both 'create_from' and 'body'")
        __path_parts: t.Dict[str, str] = {
            "source": _quote(source),
            "dest": _quote(dest),
        }
        __path = f'/_create_from/{__path_parts["source"]}/{__path_parts["dest"]}'
        __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 pretty is not None:
            __query["pretty"] = pretty
        __body = create_from if create_from is not None else body
        __headers = {"accept": "application/json", "content-type": "application/json"}
        return self.perform_request(  # type: ignore[return-value]
            "PUT",
            __path,
            params=__query,
            headers=__headers,
            body=__body,
            endpoint_id="indices.create_from",
            path_parts=__path_parts,
        )

        .. raw:: html

          <p>Create an index from a source index.</p>
          <p>Copy the mappings and settings from the source index to a destination index while allowing request settings and mappings to override the source values.</p>


        `<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-create-from>`_

        :param source: The source index or data stream name
        :param dest: The destination index or data stream name
        :param create_from:
        
elasticsearch/_sync/client/indices.py