From ddd9fac7031757a440cc616884f862be84a7d68d Mon Sep 17 00:00:00 2001 From: Jan Buchar Date: Thu, 29 Oct 2026 17:27:25 +0100 Subject: [PATCH] feat: Add missing multi-tenant-related params to Actor update --- src/apify_client/_resource_clients/actor.py | 8 ++++++++ src/apify_client/_resource_clients/actor_collection.py | 8 ++++++++ tests/unit/test_actor_update_fields.py | 7 ++++++- 3 files changed, 22 insertions(+), 1 deletion(-) diff --git a/src/apify_client/_resource_clients/actor.py b/src/apify_client/_resource_clients/actor.py index 6bd06fbb..53d20558 100644 --- a/src/apify_client/_resource_clients/actor.py +++ b/src/apify_client/_resource_clients/actor.py @@ -131,6 +131,7 @@ def update( actor_standby_memory_mbytes: int | None = None, actor_standby_disable_standby_fields_override: bool | None = None, actor_standby_should_pass_actor_input: bool | None = None, + actor_standby_tenancy: str | None = None, pricing_infos: list[dict[str, Any]] | None = None, actor_permission_level: ActorPermissionLevel | None = None, tagged_builds: dict[str, dict[str, str] | None] | None = None, @@ -175,6 +176,8 @@ def update( overridden elsewhere. actor_standby_should_pass_actor_input: Whether to pass the Actor input to the Standby runs. If false, the Standby runs start with no input. + actor_standby_tenancy: Whether each user gets their own Standby runs (`SINGLE_TENANT`) or the runs are + shared across users (`MULTI_TENANT`). pricing_infos: A list of objects that describes the pricing of the Actor. actor_permission_level: The permission level of the Actor on Apify platform. tagged_builds: A dictionary mapping build tag names to their settings. Use it to create, update, @@ -214,6 +217,7 @@ def update( memory_mbytes=actor_standby_memory_mbytes, disable_standby_fields_override=actor_standby_disable_standby_fields_override, should_pass_actor_input=actor_standby_should_pass_actor_input, + tenancy=actor_standby_tenancy, ), example_run_input=ExampleRunInput( body=example_run_input_body, @@ -691,6 +695,7 @@ async def update( actor_standby_memory_mbytes: int | None = None, actor_standby_disable_standby_fields_override: bool | None = None, actor_standby_should_pass_actor_input: bool | None = None, + actor_standby_tenancy: str | None = None, pricing_infos: list[dict[str, Any]] | None = None, actor_permission_level: ActorPermissionLevel | None = None, tagged_builds: dict[str, dict[str, str] | None] | None = None, @@ -735,6 +740,8 @@ async def update( overridden elsewhere. actor_standby_should_pass_actor_input: Whether to pass the Actor input to the Standby runs. If false, the Standby runs start with no input. + actor_standby_tenancy: Whether each user gets their own Standby runs (`SINGLE_TENANT`) or the runs are + shared across users (`MULTI_TENANT`). pricing_infos: A list of objects that describes the pricing of the Actor. actor_permission_level: The permission level of the Actor on Apify platform. tagged_builds: A dictionary mapping build tag names to their settings. Use it to create, update, @@ -774,6 +781,7 @@ async def update( memory_mbytes=actor_standby_memory_mbytes, disable_standby_fields_override=actor_standby_disable_standby_fields_override, should_pass_actor_input=actor_standby_should_pass_actor_input, + tenancy=actor_standby_tenancy, ), example_run_input=ExampleRunInput( body=example_run_input_body, diff --git a/src/apify_client/_resource_clients/actor_collection.py b/src/apify_client/_resource_clients/actor_collection.py index 3d20423b..1081da73 100644 --- a/src/apify_client/_resource_clients/actor_collection.py +++ b/src/apify_client/_resource_clients/actor_collection.py @@ -137,6 +137,7 @@ def create( actor_standby_memory_mbytes: int | None = None, actor_standby_disable_standby_fields_override: bool | None = None, actor_standby_should_pass_actor_input: bool | None = None, + actor_standby_tenancy: str | None = None, actor_permission_level: ActorPermissionLevel | None = None, timeout: Timeout = 'medium', ) -> ActorResource: @@ -179,6 +180,8 @@ def create( overridden elsewhere. actor_standby_should_pass_actor_input: Whether to pass the Actor input to the Standby runs. If false, the Standby runs start with no input. + actor_standby_tenancy: Whether each user gets their own Standby runs (`SINGLE_TENANT`) or the runs are + shared across users (`MULTI_TENANT`). actor_permission_level: The permission level of the Actor on Apify platform. timeout: Timeout for the API HTTP request. @@ -213,6 +216,7 @@ def create( memory_mbytes=actor_standby_memory_mbytes, disable_standby_fields_override=actor_standby_disable_standby_fields_override, should_pass_actor_input=actor_standby_should_pass_actor_input, + tenancy=actor_standby_tenancy, ), example_run_input=ExampleRunInput( body=example_run_input_body, @@ -334,6 +338,7 @@ async def create( actor_standby_memory_mbytes: int | None = None, actor_standby_disable_standby_fields_override: bool | None = None, actor_standby_should_pass_actor_input: bool | None = None, + actor_standby_tenancy: str | None = None, actor_permission_level: ActorPermissionLevel | None = None, timeout: Timeout = 'medium', ) -> ActorResource: @@ -376,6 +381,8 @@ async def create( overridden elsewhere. actor_standby_should_pass_actor_input: Whether to pass the Actor input to the Standby runs. If false, the Standby runs start with no input. + actor_standby_tenancy: Whether each user gets their own Standby runs (`SINGLE_TENANT`) or the runs are + shared across users (`MULTI_TENANT`). actor_permission_level: The permission level of the Actor on Apify platform. timeout: Timeout for the API HTTP request. @@ -410,6 +417,7 @@ async def create( memory_mbytes=actor_standby_memory_mbytes, disable_standby_fields_override=actor_standby_disable_standby_fields_override, should_pass_actor_input=actor_standby_should_pass_actor_input, + tenancy=actor_standby_tenancy, ), example_run_input=ExampleRunInput( body=example_run_input_body, diff --git a/tests/unit/test_actor_update_fields.py b/tests/unit/test_actor_update_fields.py index d6060b0e..6910b2c2 100644 --- a/tests/unit/test_actor_update_fields.py +++ b/tests/unit/test_actor_update_fields.py @@ -37,10 +37,15 @@ _FIELDS: dict[str, Any] = { 'actor_standby_disable_standby_fields_override': True, 'actor_standby_should_pass_actor_input': False, + 'actor_standby_tenancy': 'MULTI_TENANT', } _EXPECTED_BODY = { - 'actorStandby': {'disableStandbyFieldsOverride': True, 'shouldPassActorInput': False}, + 'actorStandby': { + 'disableStandbyFieldsOverride': True, + 'shouldPassActorInput': False, + 'tenancy': 'MULTI_TENANT', + }, }