22
22
from ...._wrappers import ResultWrapper
23
23
from ....pagination import SyncSinglePage , AsyncSinglePage
24
24
from ...._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
+ )
26
30
from ....types .zero_trust .access .service_token import ServiceToken
27
31
from ....types .zero_trust .access .service_token_create_response import ServiceTokenCreateResponse
28
32
from ....types .zero_trust .access .service_token_rotate_response import ServiceTokenRotateResponse
@@ -197,6 +201,8 @@ def list(
197
201
* ,
198
202
account_id : str | NotGiven = NOT_GIVEN ,
199
203
zone_id : str | NotGiven = NOT_GIVEN ,
204
+ name : str | NotGiven = NOT_GIVEN ,
205
+ search : str | NotGiven = NOT_GIVEN ,
200
206
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
201
207
# The extra values given here take precedence over values defined on the client or passed to this method.
202
208
extra_headers : Headers | None = None ,
@@ -212,6 +218,10 @@ def list(
212
218
213
219
zone_id: The Zone ID to use for this endpoint. Mutually exclusive with the Account ID.
214
220
221
+ name: The name of the service token.
222
+
223
+ search: Search for service tokens by other listed query parameters.
224
+
215
225
extra_headers: Send extra headers
216
226
217
227
extra_query: Add additional query parameters to the request
@@ -236,7 +246,17 @@ def list(
236
246
f"/{ account_or_zone } /{ account_or_zone_id } /access/service_tokens" ,
237
247
page = SyncSinglePage [ServiceToken ],
238
248
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
+ ),
240
260
),
241
261
model = ServiceToken ,
242
262
)
@@ -611,6 +631,8 @@ def list(
611
631
* ,
612
632
account_id : str | NotGiven = NOT_GIVEN ,
613
633
zone_id : str | NotGiven = NOT_GIVEN ,
634
+ name : str | NotGiven = NOT_GIVEN ,
635
+ search : str | NotGiven = NOT_GIVEN ,
614
636
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
615
637
# The extra values given here take precedence over values defined on the client or passed to this method.
616
638
extra_headers : Headers | None = None ,
@@ -626,6 +648,10 @@ def list(
626
648
627
649
zone_id: The Zone ID to use for this endpoint. Mutually exclusive with the Account ID.
628
650
651
+ name: The name of the service token.
652
+
653
+ search: Search for service tokens by other listed query parameters.
654
+
629
655
extra_headers: Send extra headers
630
656
631
657
extra_query: Add additional query parameters to the request
@@ -650,7 +676,17 @@ def list(
650
676
f"/{ account_or_zone } /{ account_or_zone_id } /access/service_tokens" ,
651
677
page = AsyncSinglePage [ServiceToken ],
652
678
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
+ ),
654
690
),
655
691
model = ServiceToken ,
656
692
)
0 commit comments