22
33from __future__ import annotations
44
5- from typing import Iterable
5+ from typing import Dict , Iterable
66
77import httpx
88
@@ -60,6 +60,7 @@ def create(
6060 self ,
6161 * ,
6262 size : int ,
63+ chrome_policy : Dict [str , object ] | Omit = omit ,
6364 extensions : Iterable [BrowserExtension ] | Omit = omit ,
6465 fill_rate_per_minute : int | Omit = omit ,
6566 headless : bool | Omit = omit ,
@@ -85,6 +86,11 @@ def create(
8586 your organization's pooled sessions limit (the sum of all pool sizes cannot
8687 exceed your limit).
8788
89+ chrome_policy: Custom Chrome enterprise policy overrides applied to all browsers in this pool.
90+ Keys are Chrome enterprise policy names; values must match their expected types.
91+ Blocked: kernel-managed policies (extensions, proxy, CDP/automation). See
92+ https://chromeenterprise.google/policies/
93+
8894 extensions: List of browser extensions to load into the session. Provide each by id or name.
8995
9096 fill_rate_per_minute: Percentage of the pool to fill per minute. Defaults to 10%.
@@ -135,6 +141,7 @@ def create(
135141 body = maybe_transform (
136142 {
137143 "size" : size ,
144+ "chrome_policy" : chrome_policy ,
138145 "extensions" : extensions ,
139146 "fill_rate_per_minute" : fill_rate_per_minute ,
140147 "headless" : headless ,
@@ -192,6 +199,7 @@ def update(
192199 id_or_name : str ,
193200 * ,
194201 size : int ,
202+ chrome_policy : Dict [str , object ] | Omit = omit ,
195203 discard_all_idle : bool | Omit = omit ,
196204 extensions : Iterable [BrowserExtension ] | Omit = omit ,
197205 fill_rate_per_minute : int | Omit = omit ,
@@ -218,6 +226,11 @@ def update(
218226 your organization's pooled sessions limit (the sum of all pool sizes cannot
219227 exceed your limit).
220228
229+ chrome_policy: Custom Chrome enterprise policy overrides applied to all browsers in this pool.
230+ Keys are Chrome enterprise policy names; values must match their expected types.
231+ Blocked: kernel-managed policies (extensions, proxy, CDP/automation). See
232+ https://chromeenterprise.google/policies/
233+
221234 discard_all_idle: Whether to discard all idle browsers and rebuild the pool immediately. Defaults
222235 to false.
223236
@@ -273,6 +286,7 @@ def update(
273286 body = maybe_transform (
274287 {
275288 "size" : size ,
289+ "chrome_policy" : chrome_policy ,
276290 "discard_all_idle" : discard_all_idle ,
277291 "extensions" : extensions ,
278292 "fill_rate_per_minute" : fill_rate_per_minute ,
@@ -508,6 +522,7 @@ async def create(
508522 self ,
509523 * ,
510524 size : int ,
525+ chrome_policy : Dict [str , object ] | Omit = omit ,
511526 extensions : Iterable [BrowserExtension ] | Omit = omit ,
512527 fill_rate_per_minute : int | Omit = omit ,
513528 headless : bool | Omit = omit ,
@@ -533,6 +548,11 @@ async def create(
533548 your organization's pooled sessions limit (the sum of all pool sizes cannot
534549 exceed your limit).
535550
551+ chrome_policy: Custom Chrome enterprise policy overrides applied to all browsers in this pool.
552+ Keys are Chrome enterprise policy names; values must match their expected types.
553+ Blocked: kernel-managed policies (extensions, proxy, CDP/automation). See
554+ https://chromeenterprise.google/policies/
555+
536556 extensions: List of browser extensions to load into the session. Provide each by id or name.
537557
538558 fill_rate_per_minute: Percentage of the pool to fill per minute. Defaults to 10%.
@@ -583,6 +603,7 @@ async def create(
583603 body = await async_maybe_transform (
584604 {
585605 "size" : size ,
606+ "chrome_policy" : chrome_policy ,
586607 "extensions" : extensions ,
587608 "fill_rate_per_minute" : fill_rate_per_minute ,
588609 "headless" : headless ,
@@ -640,6 +661,7 @@ async def update(
640661 id_or_name : str ,
641662 * ,
642663 size : int ,
664+ chrome_policy : Dict [str , object ] | Omit = omit ,
643665 discard_all_idle : bool | Omit = omit ,
644666 extensions : Iterable [BrowserExtension ] | Omit = omit ,
645667 fill_rate_per_minute : int | Omit = omit ,
@@ -666,6 +688,11 @@ async def update(
666688 your organization's pooled sessions limit (the sum of all pool sizes cannot
667689 exceed your limit).
668690
691+ chrome_policy: Custom Chrome enterprise policy overrides applied to all browsers in this pool.
692+ Keys are Chrome enterprise policy names; values must match their expected types.
693+ Blocked: kernel-managed policies (extensions, proxy, CDP/automation). See
694+ https://chromeenterprise.google/policies/
695+
669696 discard_all_idle: Whether to discard all idle browsers and rebuild the pool immediately. Defaults
670697 to false.
671698
@@ -721,6 +748,7 @@ async def update(
721748 body = await async_maybe_transform (
722749 {
723750 "size" : size ,
751+ "chrome_policy" : chrome_policy ,
724752 "discard_all_idle" : discard_all_idle ,
725753 "extensions" : extensions ,
726754 "fill_rate_per_minute" : fill_rate_per_minute ,
0 commit comments