2929from ..types .tags_param import TagsParam
3030from ..types .browser_pool import BrowserPool
3131from ..types .browser_pool_acquire_response import BrowserPoolAcquireResponse
32- from ..types .shared_params .browser_profile import BrowserProfile
3332from ..types .shared_params .browser_viewport import BrowserViewport
3433from ..types .shared_params .browser_extension import BrowserExtension
3534
@@ -68,7 +67,7 @@ def create(
6867 headless : bool | Omit = omit ,
6968 kiosk_mode : bool | Omit = omit ,
7069 name : str | Omit = omit ,
71- profile : BrowserProfile | Omit = omit ,
70+ profile : browser_pool_create_params . Profile | Omit = omit ,
7271 proxy_id : str | Omit = omit ,
7372 start_url : str | Omit = omit ,
7473 stealth : bool | Omit = omit ,
@@ -81,8 +80,12 @@ def create(
8180 extra_body : Body | None = None ,
8281 timeout : float | httpx .Timeout | None | NotGiven = not_given ,
8382 ) -> BrowserPool :
84- """
85- Create a new browser pool with the specified configuration and size.
83+ """Create a new browser pool with the specified configuration and size.
84+
85+ Pooled
86+ browsers load their profile read-only: any save_changes on the profile is
87+ ignored (not rejected), so pooled browsers never persist changes back to the
88+ profile.
8689
8790 Args:
8891 size: Number of browsers to maintain in the pool. The maximum size is determined by
@@ -107,9 +110,12 @@ def create(
107110
108111 name: Optional name for the browser pool. Must be unique within the project.
109112
110- profile: Profile selection for the browser session. Provide either id or name. If
111- specified, the matching profile will be loaded into the browser session.
112- Profiles must be created beforehand.
113+ profile: Profile selection for browsers in a pool. Provide either id or name. The
114+ matching profile is loaded into every browser in the pool. Profiles must be
115+ created beforehand. Unlike single browser sessions, pools load the profile
116+ read-only and never persist changes back to it, so save_changes is omitted here.
117+ Any save_changes value sent on a pool profile is silently ignored rather than
118+ rejected, so callers reusing a single-session profile object will not error.
113119
114120 proxy_id: Optional proxy to associate to the browser session. Must reference a proxy in
115121 the same project as the browser session.
@@ -217,7 +223,7 @@ def update(
217223 headless : bool | Omit = omit ,
218224 kiosk_mode : bool | Omit = omit ,
219225 name : str | Omit = omit ,
220- profile : BrowserProfile | Omit = omit ,
226+ profile : browser_pool_update_params . Profile | Omit = omit ,
221227 proxy_id : str | Omit = omit ,
222228 size : int | Omit = omit ,
223229 start_url : str | Omit = omit ,
@@ -231,8 +237,11 @@ def update(
231237 extra_body : Body | None = None ,
232238 timeout : float | httpx .Timeout | None | NotGiven = not_given ,
233239 ) -> BrowserPool :
234- """
235- Updates the configuration used to create browsers in the pool.
240+ """Updates the configuration used to create browsers in the pool.
241+
242+ As with creation,
243+ save_changes on the pool profile is ignored (not rejected); pooled browsers
244+ never persist changes back to the profile.
236245
237246 Args:
238247 chrome_policy: Custom Chrome enterprise policy overrides applied to all browsers in this pool.
@@ -256,9 +265,12 @@ def update(
256265
257266 name: Optional name for the browser pool. Must be unique within the project.
258267
259- profile: Profile selection for the browser session. Provide either id or name. If
260- specified, the matching profile will be loaded into the browser session.
261- Profiles must be created beforehand.
268+ profile: Profile selection for browsers in a pool. Provide either id or name. The
269+ matching profile is loaded into every browser in the pool. Profiles must be
270+ created beforehand. Unlike single browser sessions, pools load the profile
271+ read-only and never persist changes back to it, so save_changes is omitted here.
272+ Any save_changes value sent on a pool profile is silently ignored rather than
273+ rejected, so callers reusing a single-session profile object will not error.
262274
263275 proxy_id: Optional proxy to associate to the browser session. Must reference a proxy in
264276 the same project as the browser session.
@@ -603,7 +615,7 @@ async def create(
603615 headless : bool | Omit = omit ,
604616 kiosk_mode : bool | Omit = omit ,
605617 name : str | Omit = omit ,
606- profile : BrowserProfile | Omit = omit ,
618+ profile : browser_pool_create_params . Profile | Omit = omit ,
607619 proxy_id : str | Omit = omit ,
608620 start_url : str | Omit = omit ,
609621 stealth : bool | Omit = omit ,
@@ -616,8 +628,12 @@ async def create(
616628 extra_body : Body | None = None ,
617629 timeout : float | httpx .Timeout | None | NotGiven = not_given ,
618630 ) -> BrowserPool :
619- """
620- Create a new browser pool with the specified configuration and size.
631+ """Create a new browser pool with the specified configuration and size.
632+
633+ Pooled
634+ browsers load their profile read-only: any save_changes on the profile is
635+ ignored (not rejected), so pooled browsers never persist changes back to the
636+ profile.
621637
622638 Args:
623639 size: Number of browsers to maintain in the pool. The maximum size is determined by
@@ -642,9 +658,12 @@ async def create(
642658
643659 name: Optional name for the browser pool. Must be unique within the project.
644660
645- profile: Profile selection for the browser session. Provide either id or name. If
646- specified, the matching profile will be loaded into the browser session.
647- Profiles must be created beforehand.
661+ profile: Profile selection for browsers in a pool. Provide either id or name. The
662+ matching profile is loaded into every browser in the pool. Profiles must be
663+ created beforehand. Unlike single browser sessions, pools load the profile
664+ read-only and never persist changes back to it, so save_changes is omitted here.
665+ Any save_changes value sent on a pool profile is silently ignored rather than
666+ rejected, so callers reusing a single-session profile object will not error.
648667
649668 proxy_id: Optional proxy to associate to the browser session. Must reference a proxy in
650669 the same project as the browser session.
@@ -752,7 +771,7 @@ async def update(
752771 headless : bool | Omit = omit ,
753772 kiosk_mode : bool | Omit = omit ,
754773 name : str | Omit = omit ,
755- profile : BrowserProfile | Omit = omit ,
774+ profile : browser_pool_update_params . Profile | Omit = omit ,
756775 proxy_id : str | Omit = omit ,
757776 size : int | Omit = omit ,
758777 start_url : str | Omit = omit ,
@@ -766,8 +785,11 @@ async def update(
766785 extra_body : Body | None = None ,
767786 timeout : float | httpx .Timeout | None | NotGiven = not_given ,
768787 ) -> BrowserPool :
769- """
770- Updates the configuration used to create browsers in the pool.
788+ """Updates the configuration used to create browsers in the pool.
789+
790+ As with creation,
791+ save_changes on the pool profile is ignored (not rejected); pooled browsers
792+ never persist changes back to the profile.
771793
772794 Args:
773795 chrome_policy: Custom Chrome enterprise policy overrides applied to all browsers in this pool.
@@ -791,9 +813,12 @@ async def update(
791813
792814 name: Optional name for the browser pool. Must be unique within the project.
793815
794- profile: Profile selection for the browser session. Provide either id or name. If
795- specified, the matching profile will be loaded into the browser session.
796- Profiles must be created beforehand.
816+ profile: Profile selection for browsers in a pool. Provide either id or name. The
817+ matching profile is loaded into every browser in the pool. Profiles must be
818+ created beforehand. Unlike single browser sessions, pools load the profile
819+ read-only and never persist changes back to it, so save_changes is omitted here.
820+ Any save_changes value sent on a pool profile is silently ignored rather than
821+ rejected, so callers reusing a single-session profile object will not error.
797822
798823 proxy_id: Optional proxy to associate to the browser session. Must reference a proxy in
799824 the same project as the browser session.
0 commit comments