2222
2323if TYPE_CHECKING :
2424 from datetime import timedelta
25+ from decimal import Decimal
2526
2627 from apify_client ._literals import ActorJobStatus , RunOrigin
2728 from apify_client ._resource_clients import (
@@ -217,6 +218,7 @@ def start(
217218 task_input : TaskInputDict | TaskInput | None = None ,
218219 build : str | None = None ,
219220 max_items : int | None = None ,
221+ max_total_charge_usd : Decimal | None = None ,
220222 memory_mbytes : int | None = None ,
221223 run_timeout : timedelta | None = None ,
222224 restart_on_error : bool | None = None ,
@@ -235,6 +237,7 @@ def start(
235237 the run uses the build specified in the task settings (typically latest).
236238 max_items: Maximum number of results that will be returned by this run. If the Actor is charged
237239 per result, you will not be charged for more results than the given limit.
240+ max_total_charge_usd: A limit on the total charged amount for pay-per-event Actors.
238241 memory_mbytes: Memory limit for the run, in megabytes. By default, the run uses a memory limit specified
239242 in the task settings.
240243 run_timeout: Optional timeout for the run. By default, the run uses timeout specified
@@ -268,6 +271,7 @@ def start(
268271 request_params = self ._build_params (
269272 build = build ,
270273 maxItems = max_items ,
274+ maxTotalChargeUsd = max_total_charge_usd ,
271275 memory = memory_mbytes ,
272276 timeout = to_seconds (run_timeout , as_int = True ),
273277 restartOnError = restart_on_error ,
@@ -296,6 +300,7 @@ def call(
296300 task_input : TaskInputDict | TaskInput | None = None ,
297301 build : str | None = None ,
298302 max_items : int | None = None ,
303+ max_total_charge_usd : Decimal | None = None ,
299304 memory_mbytes : int | None = None ,
300305 run_timeout : timedelta | None = None ,
301306 restart_on_error : bool | None = None ,
@@ -316,6 +321,7 @@ def call(
316321 the run uses the build specified in the task settings (typically latest).
317322 max_items: Maximum number of results that will be returned by this run. If the Actor is charged per result,
318323 you will not be charged for more results than the given limit.
324+ max_total_charge_usd: A limit on the total charged amount for pay-per-event Actors.
319325 memory_mbytes: Memory limit for the run, in megabytes. By default, the run uses a memory limit specified
320326 in the task settings.
321327 run_timeout: Optional timeout for the run. By default, the run uses timeout specified
@@ -344,6 +350,7 @@ def call(
344350 task_input = task_input ,
345351 build = build ,
346352 max_items = max_items ,
353+ max_total_charge_usd = max_total_charge_usd ,
347354 memory_mbytes = memory_mbytes ,
348355 run_timeout = run_timeout ,
349356 restart_on_error = restart_on_error ,
@@ -619,6 +626,7 @@ async def start(
619626 task_input : TaskInputDict | TaskInput | None = None ,
620627 build : str | None = None ,
621628 max_items : int | None = None ,
629+ max_total_charge_usd : Decimal | None = None ,
622630 memory_mbytes : int | None = None ,
623631 run_timeout : timedelta | None = None ,
624632 restart_on_error : bool | None = None ,
@@ -637,6 +645,7 @@ async def start(
637645 the run uses the build specified in the task settings (typically latest).
638646 max_items: Maximum number of results that will be returned by this run. If the Actor is charged
639647 per result, you will not be charged for more results than the given limit.
648+ max_total_charge_usd: A limit on the total charged amount for pay-per-event Actors.
640649 memory_mbytes: Memory limit for the run, in megabytes. By default, the run uses a memory limit specified
641650 in the task settings.
642651 run_timeout: Optional timeout for the run. By default, the run uses timeout specified
@@ -670,6 +679,7 @@ async def start(
670679 request_params = self ._build_params (
671680 build = build ,
672681 maxItems = max_items ,
682+ maxTotalChargeUsd = max_total_charge_usd ,
673683 memory = memory_mbytes ,
674684 timeout = to_seconds (run_timeout , as_int = True ),
675685 restartOnError = restart_on_error ,
@@ -698,6 +708,7 @@ async def call(
698708 task_input : TaskInputDict | TaskInput | None = None ,
699709 build : str | None = None ,
700710 max_items : int | None = None ,
711+ max_total_charge_usd : Decimal | None = None ,
701712 memory_mbytes : int | None = None ,
702713 run_timeout : timedelta | None = None ,
703714 restart_on_error : bool | None = None ,
@@ -718,6 +729,7 @@ async def call(
718729 the run uses the build specified in the task settings (typically latest).
719730 max_items: Maximum number of results that will be returned by this run. If the Actor is charged per result,
720731 you will not be charged for more results than the given limit.
732+ max_total_charge_usd: A limit on the total charged amount for pay-per-event Actors.
721733 memory_mbytes: Memory limit for the run, in megabytes. By default, the run uses a memory limit specified
722734 in the task settings.
723735 run_timeout: Optional timeout for the run. By default, the run uses timeout specified
@@ -746,6 +758,7 @@ async def call(
746758 task_input = task_input ,
747759 build = build ,
748760 max_items = max_items ,
761+ max_total_charge_usd = max_total_charge_usd ,
749762 memory_mbytes = memory_mbytes ,
750763 run_timeout = run_timeout ,
751764 restart_on_error = restart_on_error ,
0 commit comments