Skip to content

Commit 61f91e5

Browse files
fix: Actor start and run options and doc (#785)
1 parent 35df5d6 commit 61f91e5

File tree

1 file changed

+14
-3
lines changed

1 file changed

+14
-3
lines changed

src/resource_clients/actor.ts

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -415,12 +415,22 @@ export interface ActorStartOptions {
415415
webhooks?: readonly WebhookUpdateData[];
416416

417417
/**
418-
* Specifies maximum number of items that the actor run should return.
419-
* This is used by pay per result actors to limit the maximum number of results that will be charged to customer.
420-
* Value can be accessed in actor run using `ACTOR_MAX_PAID_DATASET_ITEMS` environment variable.
418+
* Specifies the maximum number of dataset items that will be charged for pay-per-result Actors.
419+
* This does NOT guarantee that the Actor will return only this many items.
420+
* It only ensures you won't be charged for more than this number of items.
421+
* Only works for pay-per-result Actors.
422+
* Value can be accessed in the Actor run using `ACTOR_MAX_PAID_DATASET_ITEMS` environment variable.
421423
*/
422424
maxItems?: number;
423425

426+
/**
427+
* Specifies the maximum cost of the Actor run. This parameter is
428+
* used only for pay-per-event Actors. It allows you to limit the amount
429+
* charged to your subscription. You can access the maximum cost in your
430+
* Actor by using the `ACTOR_MAX_TOTAL_CHARGE_USD` environment variable.
431+
*/
432+
maxTotalChargeUsd?: number;
433+
424434
/**
425435
* Determines whether the run will be restarted if it fails.
426436
*/
@@ -524,6 +534,7 @@ export interface ActorRunOptions {
524534
timeoutSecs: number;
525535
memoryMbytes: number;
526536
diskMbytes: number;
537+
maxItems?: number;
527538
maxTotalChargeUsd?: number;
528539
restartOnError?: boolean;
529540
}

0 commit comments

Comments
 (0)