@@ -443,6 +443,48 @@ async def reset_transform(
443443 )
444444
445445 @_rewrite_parameters ()
446+ async def schedule_now_transform (
447+ self ,
448+ * ,
449+ transform_id : str ,
450+ error_trace : t .Optional [bool ] = None ,
451+ filter_path : t .Optional [
452+ t .Union [str , t .Union [t .List [str ], t .Tuple [str , ...]]]
453+ ] = None ,
454+ human : t .Optional [bool ] = None ,
455+ pretty : t .Optional [bool ] = None ,
456+ timeout : t .Optional [t .Union ["t.Literal[-1]" , "t.Literal[0]" , str ]] = None ,
457+ ) -> ObjectApiResponse [t .Any ]:
458+ """
459+ Schedules now a transform.
460+
461+ `<https://www.elastic.co/guide/en/elasticsearch/reference/master/schedule-now-transform.html>`_
462+
463+ :param transform_id: Identifier for the transform.
464+ :param timeout: Controls the time to wait for the scheduling to take place
465+ """
466+ if transform_id in SKIP_IN_PATH :
467+ raise ValueError ("Empty value passed for parameter 'transform_id'" )
468+ __path = f"/_transform/{ _quote (transform_id )} /_schedule_now"
469+ __query : t .Dict [str , t .Any ] = {}
470+ if error_trace is not None :
471+ __query ["error_trace" ] = error_trace
472+ if filter_path is not None :
473+ __query ["filter_path" ] = filter_path
474+ if human is not None :
475+ __query ["human" ] = human
476+ if pretty is not None :
477+ __query ["pretty" ] = pretty
478+ if timeout is not None :
479+ __query ["timeout" ] = timeout
480+ __headers = {"accept" : "application/json" }
481+ return await self .perform_request ( # type: ignore[return-value]
482+ "POST" , __path , params = __query , headers = __headers
483+ )
484+
485+ @_rewrite_parameters (
486+ parameter_aliases = {"from" : "from_" },
487+ )
446488 async def start_transform (
447489 self ,
448490 * ,
@@ -451,6 +493,7 @@ async def start_transform(
451493 filter_path : t .Optional [
452494 t .Union [str , t .Union [t .List [str ], t .Tuple [str , ...]]]
453495 ] = None ,
496+ from_ : t .Optional [str ] = None ,
454497 human : t .Optional [bool ] = None ,
455498 pretty : t .Optional [bool ] = None ,
456499 timeout : t .Optional [t .Union ["t.Literal[-1]" , "t.Literal[0]" , str ]] = None ,
@@ -461,6 +504,9 @@ async def start_transform(
461504 `<https://www.elastic.co/guide/en/elasticsearch/reference/master/start-transform.html>`_
462505
463506 :param transform_id: Identifier for the transform.
507+ :param from_: Restricts the set of transformed entities to those changed after
508+ this time. Relative times like now-30d are supported. Only applicable for
509+ continuous transforms.
464510 :param timeout: Period to wait for a response. If no response is received before
465511 the timeout expires, the request fails and returns an error.
466512 """
@@ -472,6 +518,8 @@ async def start_transform(
472518 __query ["error_trace" ] = error_trace
473519 if filter_path is not None :
474520 __query ["filter_path" ] = filter_path
521+ if from_ is not None :
522+ __query ["from" ] = from_
475523 if human is not None :
476524 __query ["human" ] = human
477525 if pretty is not None :
0 commit comments