2626)
2727from ..pagination import SyncOffsetPagination , AsyncOffsetPagination
2828from .._base_client import AsyncPaginator , make_request_options
29+ from ..types .tags_param import TagsParam
2930from ..types .browser_pool import BrowserPool
3031from ..types .browser_pool_acquire_response import BrowserPoolAcquireResponse
3132from ..types .shared_params .browser_profile import BrowserProfile
@@ -417,6 +418,8 @@ def acquire(
417418 id_or_name : str ,
418419 * ,
419420 acquire_timeout_seconds : int | Omit = omit ,
421+ name : str | Omit = omit ,
422+ tags : TagsParam | Omit = omit ,
420423 # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
421424 # The extra values given here take precedence over values defined on the client or passed to this method.
422425 extra_headers : Headers | None = None ,
@@ -436,6 +439,15 @@ def acquire(
436439 calculated time it would take to fill the pool at the currently configured fill
437440 rate.
438441
442+ name: Optional human-readable name for the acquired browser session, used to find it
443+ later in the dashboard. Must be unique among active sessions within the pool's
444+ project. Applies to this lease only and is cleared when the browser is released
445+ back to the pool.
446+
447+ tags: Optional user-defined key-value tags for the acquired browser session, used to
448+ find and group sessions later. Applies to this lease only and are cleared when
449+ the browser is released back to the pool. Up to 50 pairs.
450+
439451 extra_headers: Send extra headers
440452
441453 extra_query: Add additional query parameters to the request
@@ -449,7 +461,11 @@ def acquire(
449461 return self ._post (
450462 path_template ("/browser_pools/{id_or_name}/acquire" , id_or_name = id_or_name ),
451463 body = maybe_transform (
452- {"acquire_timeout_seconds" : acquire_timeout_seconds },
464+ {
465+ "acquire_timeout_seconds" : acquire_timeout_seconds ,
466+ "name" : name ,
467+ "tags" : tags ,
468+ },
453469 browser_pool_acquire_params .BrowserPoolAcquireParams ,
454470 ),
455471 options = make_request_options (
@@ -923,6 +939,8 @@ async def acquire(
923939 id_or_name : str ,
924940 * ,
925941 acquire_timeout_seconds : int | Omit = omit ,
942+ name : str | Omit = omit ,
943+ tags : TagsParam | Omit = omit ,
926944 # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
927945 # The extra values given here take precedence over values defined on the client or passed to this method.
928946 extra_headers : Headers | None = None ,
@@ -942,6 +960,15 @@ async def acquire(
942960 calculated time it would take to fill the pool at the currently configured fill
943961 rate.
944962
963+ name: Optional human-readable name for the acquired browser session, used to find it
964+ later in the dashboard. Must be unique among active sessions within the pool's
965+ project. Applies to this lease only and is cleared when the browser is released
966+ back to the pool.
967+
968+ tags: Optional user-defined key-value tags for the acquired browser session, used to
969+ find and group sessions later. Applies to this lease only and are cleared when
970+ the browser is released back to the pool. Up to 50 pairs.
971+
945972 extra_headers: Send extra headers
946973
947974 extra_query: Add additional query parameters to the request
@@ -955,7 +982,11 @@ async def acquire(
955982 return await self ._post (
956983 path_template ("/browser_pools/{id_or_name}/acquire" , id_or_name = id_or_name ),
957984 body = await async_maybe_transform (
958- {"acquire_timeout_seconds" : acquire_timeout_seconds },
985+ {
986+ "acquire_timeout_seconds" : acquire_timeout_seconds ,
987+ "name" : name ,
988+ "tags" : tags ,
989+ },
959990 browser_pool_acquire_params .BrowserPoolAcquireParams ,
960991 ),
961992 options = make_request_options (
0 commit comments