2222from ...._wrappers import ResultWrapper
2323from ....pagination import SyncSinglePage , AsyncSinglePage
2424from ...._base_client import AsyncPaginator , make_request_options
25- from ....types .zero_trust .access import service_token_create_params , service_token_update_params
25+ from ....types .zero_trust .access import (
26+ service_token_list_params ,
27+ service_token_create_params ,
28+ service_token_update_params ,
29+ )
2630from ....types .zero_trust .access .service_token import ServiceToken
2731from ....types .zero_trust .access .service_token_create_response import ServiceTokenCreateResponse
2832from ....types .zero_trust .access .service_token_rotate_response import ServiceTokenRotateResponse
@@ -197,6 +201,8 @@ def list(
197201 * ,
198202 account_id : str | NotGiven = NOT_GIVEN ,
199203 zone_id : str | NotGiven = NOT_GIVEN ,
204+ name : str | NotGiven = NOT_GIVEN ,
205+ search : str | NotGiven = NOT_GIVEN ,
200206 # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
201207 # The extra values given here take precedence over values defined on the client or passed to this method.
202208 extra_headers : Headers | None = None ,
@@ -212,6 +218,10 @@ def list(
212218
213219 zone_id: The Zone ID to use for this endpoint. Mutually exclusive with the Account ID.
214220
221+ name: The name of the service token.
222+
223+ search: Search for service tokens by other listed query parameters.
224+
215225 extra_headers: Send extra headers
216226
217227 extra_query: Add additional query parameters to the request
@@ -236,7 +246,17 @@ def list(
236246 f"/{ account_or_zone } /{ account_or_zone_id } /access/service_tokens" ,
237247 page = SyncSinglePage [ServiceToken ],
238248 options = make_request_options (
239- extra_headers = extra_headers , extra_query = extra_query , extra_body = extra_body , timeout = timeout
249+ extra_headers = extra_headers ,
250+ extra_query = extra_query ,
251+ extra_body = extra_body ,
252+ timeout = timeout ,
253+ query = maybe_transform (
254+ {
255+ "name" : name ,
256+ "search" : search ,
257+ },
258+ service_token_list_params .ServiceTokenListParams ,
259+ ),
240260 ),
241261 model = ServiceToken ,
242262 )
@@ -611,6 +631,8 @@ def list(
611631 * ,
612632 account_id : str | NotGiven = NOT_GIVEN ,
613633 zone_id : str | NotGiven = NOT_GIVEN ,
634+ name : str | NotGiven = NOT_GIVEN ,
635+ search : str | NotGiven = NOT_GIVEN ,
614636 # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
615637 # The extra values given here take precedence over values defined on the client or passed to this method.
616638 extra_headers : Headers | None = None ,
@@ -626,6 +648,10 @@ def list(
626648
627649 zone_id: The Zone ID to use for this endpoint. Mutually exclusive with the Account ID.
628650
651+ name: The name of the service token.
652+
653+ search: Search for service tokens by other listed query parameters.
654+
629655 extra_headers: Send extra headers
630656
631657 extra_query: Add additional query parameters to the request
@@ -650,7 +676,17 @@ def list(
650676 f"/{ account_or_zone } /{ account_or_zone_id } /access/service_tokens" ,
651677 page = AsyncSinglePage [ServiceToken ],
652678 options = make_request_options (
653- extra_headers = extra_headers , extra_query = extra_query , extra_body = extra_body , timeout = timeout
679+ extra_headers = extra_headers ,
680+ extra_query = extra_query ,
681+ extra_body = extra_body ,
682+ timeout = timeout ,
683+ query = maybe_transform (
684+ {
685+ "name" : name ,
686+ "search" : search ,
687+ },
688+ service_token_list_params .ServiceTokenListParams ,
689+ ),
654690 ),
655691 model = ServiceToken ,
656692 )
0 commit comments