24
24
from ...._base_client import (
25
25
make_request_options ,
26
26
)
27
- from ....types .radar .bgp import route_moas_params , route_stats_params , route_pfx2as_params
27
+ from ....types .radar .bgp import route_ases_params , route_moas_params , route_stats_params , route_pfx2as_params
28
+ from ....types .radar .bgp .route_ases_response import RouteAsesResponse
28
29
from ....types .radar .bgp .route_moas_response import RouteMoasResponse
29
30
from ....types .radar .bgp .route_stats_response import RouteStatsResponse
30
31
from ....types .radar .bgp .route_pfx2as_response import RoutePfx2asResponse
@@ -41,6 +42,66 @@ def with_raw_response(self) -> RoutesResourceWithRawResponse:
41
42
def with_streaming_response (self ) -> RoutesResourceWithStreamingResponse :
42
43
return RoutesResourceWithStreamingResponse (self )
43
44
45
+ def ases (
46
+ self ,
47
+ * ,
48
+ format : Literal ["JSON" , "CSV" ] | NotGiven = NOT_GIVEN ,
49
+ limit : int | NotGiven = NOT_GIVEN ,
50
+ location : str | NotGiven = NOT_GIVEN ,
51
+ sort_by : Literal ["cone" , "pfxs" , "ipv4" , "ipv6" , "rpki_valid" , "rpki_invalid" , "rpki_unknown" ]
52
+ | NotGiven = NOT_GIVEN ,
53
+ sort_order : Literal ["asc" , "desc" ] | NotGiven = NOT_GIVEN ,
54
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
55
+ # The extra values given here take precedence over values defined on the client or passed to this method.
56
+ extra_headers : Headers | None = None ,
57
+ extra_query : Query | None = None ,
58
+ extra_body : Body | None = None ,
59
+ timeout : float | httpx .Timeout | None | NotGiven = NOT_GIVEN ,
60
+ ) -> RouteAsesResponse :
61
+ """
62
+ List all ASes on current global routing tables with routing statistics
63
+
64
+ Args:
65
+ format: Format results are returned in.
66
+
67
+ limit: Limit the number of objects in the response.
68
+
69
+ location: Location Alpha2 code.
70
+
71
+ sort_by: Return order results by given type
72
+
73
+ sort_order: Sort by value ascending or descending
74
+
75
+ extra_headers: Send extra headers
76
+
77
+ extra_query: Add additional query parameters to the request
78
+
79
+ extra_body: Add additional JSON properties to the request
80
+
81
+ timeout: Override the client-level default timeout for this request, in seconds
82
+ """
83
+ return self ._get (
84
+ "/radar/bgp/routes/ases" ,
85
+ options = make_request_options (
86
+ extra_headers = extra_headers ,
87
+ extra_query = extra_query ,
88
+ extra_body = extra_body ,
89
+ timeout = timeout ,
90
+ query = maybe_transform (
91
+ {
92
+ "format" : format ,
93
+ "limit" : limit ,
94
+ "location" : location ,
95
+ "sort_by" : sort_by ,
96
+ "sort_order" : sort_order ,
97
+ },
98
+ route_ases_params .RouteAsesParams ,
99
+ ),
100
+ post_parser = ResultWrapper [RouteAsesResponse ]._unwrapper ,
101
+ ),
102
+ cast_to = cast (Type [RouteAsesResponse ], ResultWrapper [RouteAsesResponse ]),
103
+ )
104
+
44
105
def moas (
45
106
self ,
46
107
* ,
@@ -217,6 +278,66 @@ def with_raw_response(self) -> AsyncRoutesResourceWithRawResponse:
217
278
def with_streaming_response (self ) -> AsyncRoutesResourceWithStreamingResponse :
218
279
return AsyncRoutesResourceWithStreamingResponse (self )
219
280
281
+ async def ases (
282
+ self ,
283
+ * ,
284
+ format : Literal ["JSON" , "CSV" ] | NotGiven = NOT_GIVEN ,
285
+ limit : int | NotGiven = NOT_GIVEN ,
286
+ location : str | NotGiven = NOT_GIVEN ,
287
+ sort_by : Literal ["cone" , "pfxs" , "ipv4" , "ipv6" , "rpki_valid" , "rpki_invalid" , "rpki_unknown" ]
288
+ | NotGiven = NOT_GIVEN ,
289
+ sort_order : Literal ["asc" , "desc" ] | NotGiven = NOT_GIVEN ,
290
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
291
+ # The extra values given here take precedence over values defined on the client or passed to this method.
292
+ extra_headers : Headers | None = None ,
293
+ extra_query : Query | None = None ,
294
+ extra_body : Body | None = None ,
295
+ timeout : float | httpx .Timeout | None | NotGiven = NOT_GIVEN ,
296
+ ) -> RouteAsesResponse :
297
+ """
298
+ List all ASes on current global routing tables with routing statistics
299
+
300
+ Args:
301
+ format: Format results are returned in.
302
+
303
+ limit: Limit the number of objects in the response.
304
+
305
+ location: Location Alpha2 code.
306
+
307
+ sort_by: Return order results by given type
308
+
309
+ sort_order: Sort by value ascending or descending
310
+
311
+ extra_headers: Send extra headers
312
+
313
+ extra_query: Add additional query parameters to the request
314
+
315
+ extra_body: Add additional JSON properties to the request
316
+
317
+ timeout: Override the client-level default timeout for this request, in seconds
318
+ """
319
+ return await self ._get (
320
+ "/radar/bgp/routes/ases" ,
321
+ options = make_request_options (
322
+ extra_headers = extra_headers ,
323
+ extra_query = extra_query ,
324
+ extra_body = extra_body ,
325
+ timeout = timeout ,
326
+ query = await async_maybe_transform (
327
+ {
328
+ "format" : format ,
329
+ "limit" : limit ,
330
+ "location" : location ,
331
+ "sort_by" : sort_by ,
332
+ "sort_order" : sort_order ,
333
+ },
334
+ route_ases_params .RouteAsesParams ,
335
+ ),
336
+ post_parser = ResultWrapper [RouteAsesResponse ]._unwrapper ,
337
+ ),
338
+ cast_to = cast (Type [RouteAsesResponse ], ResultWrapper [RouteAsesResponse ]),
339
+ )
340
+
220
341
async def moas (
221
342
self ,
222
343
* ,
@@ -388,6 +509,9 @@ class RoutesResourceWithRawResponse:
388
509
def __init__ (self , routes : RoutesResource ) -> None :
389
510
self ._routes = routes
390
511
512
+ self .ases = to_raw_response_wrapper (
513
+ routes .ases ,
514
+ )
391
515
self .moas = to_raw_response_wrapper (
392
516
routes .moas ,
393
517
)
@@ -403,6 +527,9 @@ class AsyncRoutesResourceWithRawResponse:
403
527
def __init__ (self , routes : AsyncRoutesResource ) -> None :
404
528
self ._routes = routes
405
529
530
+ self .ases = async_to_raw_response_wrapper (
531
+ routes .ases ,
532
+ )
406
533
self .moas = async_to_raw_response_wrapper (
407
534
routes .moas ,
408
535
)
@@ -418,6 +545,9 @@ class RoutesResourceWithStreamingResponse:
418
545
def __init__ (self , routes : RoutesResource ) -> None :
419
546
self ._routes = routes
420
547
548
+ self .ases = to_streamed_response_wrapper (
549
+ routes .ases ,
550
+ )
421
551
self .moas = to_streamed_response_wrapper (
422
552
routes .moas ,
423
553
)
@@ -433,6 +563,9 @@ class AsyncRoutesResourceWithStreamingResponse:
433
563
def __init__ (self , routes : AsyncRoutesResource ) -> None :
434
564
self ._routes = routes
435
565
566
+ self .ases = async_to_streamed_response_wrapper (
567
+ routes .ases ,
568
+ )
436
569
self .moas = async_to_streamed_response_wrapper (
437
570
routes .moas ,
438
571
)
0 commit comments