Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions src/apify_client/clients/resource_clients/actor.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ def get_actor_representation(
actor_standby_memory_mbytes: int | None = None,
pricing_infos: list[dict] | None = None,
actor_permission_level: ActorPermissionLevel | None = None,
tagged_builds: dict[str, None | dict[str, str]] | None = None,
) -> dict:
"""Get dictionary representation of the Actor."""
actor_dict = {
Expand Down Expand Up @@ -87,6 +88,7 @@ def get_actor_representation(
},
'pricingInfos': pricing_infos,
'actorPermissionLevel': actor_permission_level,
'taggedBuilds': tagged_builds,
}

# Only include actorStandby if at least one field is provided
Expand Down Expand Up @@ -157,6 +159,7 @@ def update(
actor_standby_memory_mbytes: int | None = None,
pricing_infos: list[dict] | None = None,
actor_permission_level: ActorPermissionLevel | None = None,
tagged_builds: dict[str, None | dict[str, str]] | None = None,
) -> dict:
"""Update the Actor with the specified fields.

Expand Down Expand Up @@ -193,6 +196,9 @@ def update(
actor_standby_memory_mbytes: The memory in megabytes to use when the Actor is in Standby mode.
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,
or remove build tags. To assign a tag, provide a dict with 'buildId' key. To remove a tag,
set its value to None. Example: {'latest': {'buildId': 'abc'}, 'beta': None}.

Returns:
The updated Actor.
Expand Down Expand Up @@ -223,6 +229,7 @@ def update(
actor_standby_memory_mbytes=actor_standby_memory_mbytes,
pricing_infos=pricing_infos,
actor_permission_level=actor_permission_level,
tagged_builds=tagged_builds,
)

return self._update(filter_out_none_values_recursively(actor_representation))
Expand Down Expand Up @@ -580,6 +587,7 @@ async def update(
actor_standby_memory_mbytes: int | None = None,
pricing_infos: list[dict] | None = None,
actor_permission_level: ActorPermissionLevel | None = None,
tagged_builds: dict[str, None | dict[str, str]] | None = None,
) -> dict:
"""Update the Actor with the specified fields.

Expand Down Expand Up @@ -616,6 +624,9 @@ async def update(
actor_standby_memory_mbytes: The memory in megabytes to use when the Actor is in Standby mode.
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,
or remove build tags. To assign a tag, provide a dict with 'buildId' key. To remove a tag,
set its value to None. Example: {'latest': {'buildId': 'abc'}, 'beta': None}.

Returns:
The updated Actor.
Expand Down Expand Up @@ -646,6 +657,7 @@ async def update(
actor_standby_memory_mbytes=actor_standby_memory_mbytes,
pricing_infos=pricing_infos,
actor_permission_level=actor_permission_level,
tagged_builds=tagged_builds,
)

return await self._update(filter_out_none_values_recursively(actor_representation))
Expand Down