async def promote_data_stream(
        self,
        *,
        name: str,
        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,
    ) -> ObjectApiResponse[t.Any]:
        """
        .. raw:: html

          <p>Promote a data stream.
          Promote a data stream from a replicated data stream managed by cross-cluster replication (CCR) to a regular data stream.</p>
          <p>With CCR auto following, a data stream from a remote cluster can be replicated to the local cluster.
          These data streams can't be rolled over in the local cluster.
          These replicated data streams roll over only if the upstream data stream rolls over.
          In the event that the remote cluster is no longer available, the data stream in the local cluster can be promoted to a regular data stream, which allows these data streams to be rolled over in the local cluster.</p>
          <p>NOTE: When promoting a data stream, ensure the local cluster has a data stream enabled index template that matches the data stream.
          If this is missing, the data stream will not be able to roll over until a matching index template is created.
          This will affect the lifecycle management of the data stream and interfere with the data stream size and retention.</p>


        `<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-promote-data-stream>`_

        :param name: The name of the data stream
        :param master_timeout: 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.
        """
        if name in SKIP_IN_PATH:
            raise ValueError("Empty value passed for parameter 'name'")
        __path_parts: t.Dict[str, str] = {"name": _quote(name)}
        __path = f'/_data_stream/_promote/{__path_parts["name"]}'
        __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
        __headers = {"accept": "application/json"}
        return await self.perform_request(  # type: ignore[return-value]
            "POST",
            __path,
            params=__query,
            headers=__headers,
            endpoint_id="indices.promote_data_stream",
            path_parts=__path_parts,
        )

        .. raw:: html

          <p>Promote a data stream.
          Promote a data stream from a replicated data stream managed by cross-cluster replication (CCR) to a regular data stream.</p>
          <p>With CCR auto following, a data stream from a remote cluster can be replicated to the local cluster.
          These data streams can't be rolled over in the local cluster.
          These replicated data streams roll over only if the upstream data stream rolls over.
          In the event that the remote cluster is no longer available, the data stream in the local cluster can be promoted to a regular data stream, which allows these data streams to be rolled over in the local cluster.</p>
          <p>NOTE: When promoting a data stream, ensure the local cluster has a data stream enabled index template that matches the data stream.
          If this is missing, the data stream will not be able to roll over until a matching index template is created.
          This will affect the lifecycle management of the data stream and interfere with the data stream size and retention.</p>


        `<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-promote-data-stream>`_

        :param name: The name of the data stream
        :param master_timeout: 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.
        
elasticsearch/_async/client/indices.py