gcore 0.8.0__py3-none-any.whl → 0.10.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of gcore might be problematic. Click here for more details.

Files changed (164) hide show
  1. gcore/_base_client.py +4 -1
  2. gcore/_client.py +9 -0
  3. gcore/_files.py +4 -4
  4. gcore/_version.py +1 -1
  5. gcore/resources/__init__.py +14 -0
  6. gcore/resources/cloud/cost_reports.py +24 -0
  7. gcore/resources/cloud/load_balancers/pools/health_monitors.py +8 -4
  8. gcore/resources/cloud/load_balancers/pools/members.py +2 -2
  9. gcore/resources/cloud/quotas/requests.py +7 -15
  10. gcore/resources/fastedge/binaries.py +81 -1
  11. gcore/resources/security/__init__.py +75 -0
  12. gcore/resources/security/bgp_announces.py +308 -0
  13. gcore/resources/security/events.py +234 -0
  14. gcore/resources/security/profile_templates.py +143 -0
  15. gcore/resources/security/profiles.py +661 -0
  16. gcore/resources/security/security.py +198 -0
  17. gcore/resources/waap/__init__.py +14 -0
  18. gcore/resources/waap/custom_page_sets.py +40 -34
  19. gcore/resources/waap/domains/__init__.py +14 -28
  20. gcore/resources/waap/domains/advanced_rules.py +5 -8
  21. gcore/resources/waap/domains/{api_discovery/api_discovery.py → api_discovery.py} +292 -59
  22. gcore/resources/waap/domains/api_path_groups.py +5 -5
  23. gcore/resources/waap/domains/api_paths.py +15 -17
  24. gcore/resources/waap/domains/custom_rules.py +5 -8
  25. gcore/resources/waap/domains/domains.py +120 -64
  26. gcore/resources/waap/domains/firewall_rules.py +3 -5
  27. gcore/resources/waap/domains/insight_silences.py +28 -5
  28. gcore/resources/waap/domains/insights.py +36 -10
  29. gcore/resources/waap/domains/{analytics/analytics.py → statistics.py} +514 -213
  30. gcore/resources/waap/insights.py +233 -0
  31. gcore/resources/waap/ip_info/__init__.py +33 -0
  32. gcore/resources/waap/{ip_info.py → ip_info/ip_info.py} +149 -235
  33. gcore/resources/waap/ip_info/metrics.py +203 -0
  34. gcore/resources/waap/waap.py +40 -8
  35. gcore/types/cloud/cost_report_get_aggregated_monthly_params.py +3 -0
  36. gcore/types/cloud/cost_report_get_aggregated_params.py +3 -0
  37. gcore/types/cloud/cost_report_get_detailed_params.py +3 -0
  38. gcore/types/cloud/gpu_baremetal_flavor.py +16 -0
  39. gcore/types/cloud/health_monitor.py +6 -0
  40. gcore/types/cloud/load_balancer_create_params.py +8 -3
  41. gcore/types/cloud/load_balancers/pool_create_params.py +8 -3
  42. gcore/types/cloud/load_balancers/pool_update_params.py +8 -3
  43. gcore/types/cloud/load_balancers/pools/health_monitor_create_params.py +7 -2
  44. gcore/types/cloud/load_balancers/pools/member_add_params.py +1 -1
  45. gcore/types/cloud/quotas/request_list_params.py +2 -2
  46. gcore/types/cloud/region.py +6 -6
  47. gcore/types/fastedge/__init__.py +1 -0
  48. gcore/types/fastedge/binary_create_params.py +11 -0
  49. gcore/types/security/__init__.py +18 -0
  50. gcore/types/security/bgp_announce_list_params.py +18 -0
  51. gcore/types/security/bgp_announce_list_response.py +10 -0
  52. gcore/types/security/bgp_announce_toggle_params.py +16 -0
  53. gcore/types/security/client_announce.py +15 -0
  54. gcore/types/security/client_profile.py +56 -0
  55. gcore/types/security/client_profile_template.py +43 -0
  56. gcore/types/security/client_view.py +29 -0
  57. gcore/types/security/event_list_params.py +38 -0
  58. gcore/types/security/profile_create_params.py +24 -0
  59. gcore/types/security/profile_list_params.py +17 -0
  60. gcore/types/security/profile_list_response.py +10 -0
  61. gcore/types/security/profile_recreate_params.py +24 -0
  62. gcore/types/security/profile_replace_params.py +24 -0
  63. gcore/types/security/profile_template_list_response.py +10 -0
  64. gcore/types/waap/__init__.py +6 -54
  65. gcore/types/waap/custom_page_set_create_params.py +121 -14
  66. gcore/types/waap/custom_page_set_preview_params.py +11 -4
  67. gcore/types/waap/custom_page_set_update_params.py +122 -15
  68. gcore/types/waap/domain_list_params.py +1 -3
  69. gcore/types/waap/domains/__init__.py +28 -18
  70. gcore/types/waap/domains/advanced_rule_list_params.py +1 -3
  71. gcore/types/waap/domains/{api_discovery/scan_result_list_params.py → api_discovery_list_scan_results_params.py} +2 -2
  72. gcore/types/waap/domains/{api_path_group_list_response.py → api_path_group_list.py} +2 -2
  73. gcore/types/waap/domains/custom_rule_list_params.py +1 -3
  74. gcore/types/waap/domains/insight_list_params.py +16 -6
  75. gcore/types/waap/domains/insight_replace_params.py +2 -4
  76. gcore/types/waap/domains/insight_silence_list_params.py +13 -4
  77. gcore/types/waap/domains/{analytics_list_ddos_attacks_params.py → statistic_get_ddos_attacks_params.py} +2 -2
  78. gcore/types/waap/domains/{analytics_list_ddos_info_params.py → statistic_get_ddos_info_params.py} +2 -2
  79. gcore/types/waap/domains/{analytics_get_event_statistics_params.py → statistic_get_events_aggregated_params.py} +2 -2
  80. gcore/types/waap/domains/{analytics/request_list_params.py → statistic_get_requests_series_params.py} +27 -5
  81. gcore/types/waap/domains/{analytics_list_event_traffic_params.py → statistic_get_traffic_series_params.py} +4 -5
  82. gcore/types/waap/domains/statistic_get_traffic_series_response.py +10 -0
  83. gcore/types/waap/{waap_advanced_rule.py → domains/waap_advanced_rule.py} +1 -1
  84. gcore/types/waap/domains/{api_discovery_get_settings_response.py → waap_api_discovery_settings.py} +2 -2
  85. gcore/types/waap/domains/{api_path_get_response.py → waap_api_path.py} +2 -2
  86. gcore/types/waap/domains/{api_discovery/scan_result_get_response.py → waap_api_scan_result.py} +3 -3
  87. gcore/types/waap/{waap_blocked_statistics.py → domains/waap_blocked_statistics.py} +1 -1
  88. gcore/types/waap/{waap_count_statistics.py → domains/waap_count_statistics.py} +1 -1
  89. gcore/types/waap/{waap_custom_rule.py → domains/waap_custom_rule.py} +1 -1
  90. gcore/types/waap/{waap_ddos_attack.py → domains/waap_ddos_attack.py} +1 -1
  91. gcore/types/waap/{waap_ddos_info.py → domains/waap_ddos_info.py} +1 -1
  92. gcore/types/waap/{waap_event_statistics.py → domains/waap_event_statistics.py} +1 -1
  93. gcore/types/waap/{waap_firewall_rule.py → domains/waap_firewall_rule.py} +1 -1
  94. gcore/types/waap/{waap_insight.py → domains/waap_insight.py} +3 -3
  95. gcore/types/waap/{waap_insight_silence.py → domains/waap_insight_silence.py} +1 -1
  96. gcore/types/waap/domains/waap_request_details.py +185 -0
  97. gcore/types/waap/{waap_request_summary.py → domains/waap_request_summary.py} +1 -1
  98. gcore/types/waap/domains/{api_discovery_scan_openapi_response.py → waap_task_id.py} +2 -2
  99. gcore/types/waap/{waap_traffic_metrics.py → domains/waap_traffic_metrics.py} +1 -1
  100. gcore/types/waap/insight_list_types_params.py +28 -0
  101. gcore/types/waap/ip_info/__init__.py +6 -0
  102. gcore/types/waap/{ip_info_get_counts_params.py → ip_info/metric_list_params.py} +2 -2
  103. gcore/types/waap/{waap_ip_info_counts.py → ip_info/waap_ip_info_counts.py} +1 -1
  104. gcore/types/waap/{ip_info_get_params.py → ip_info_get_ip_info_params.py} +2 -2
  105. gcore/types/waap/{waap_ip_info.py → ip_info_get_ip_info_response.py} +2 -2
  106. gcore/types/waap/ip_info_get_top_urls_response.py +12 -3
  107. gcore/types/waap/{ip_info_get_top_sessions_params.py → ip_info_get_top_user_sessions_params.py} +2 -2
  108. gcore/types/waap/{ip_info_get_top_sessions_response.py → ip_info_get_top_user_sessions_response.py} +2 -2
  109. gcore/types/waap/waap_custom_page_set.py +113 -13
  110. gcore/types/waap/waap_detailed_domain.py +2 -2
  111. gcore/types/waap/waap_insight_type.py +33 -0
  112. gcore/types/waap/waap_rule_set.py +26 -3
  113. gcore/types/waap/waap_summary_domain.py +2 -2
  114. {gcore-0.8.0.dist-info → gcore-0.10.0.dist-info}/METADATA +1 -1
  115. {gcore-0.8.0.dist-info → gcore-0.10.0.dist-info}/RECORD +117 -134
  116. gcore/resources/waap/domains/analytics/__init__.py +0 -33
  117. gcore/resources/waap/domains/analytics/requests.py +0 -378
  118. gcore/resources/waap/domains/api_discovery/__init__.py +0 -33
  119. gcore/resources/waap/domains/api_discovery/scan_results.py +0 -352
  120. gcore/resources/waap/domains/policies.py +0 -173
  121. gcore/types/waap/domains/analytics/__init__.py +0 -5
  122. gcore/types/waap/domains/analytics_list_event_traffic_response.py +0 -10
  123. gcore/types/waap/domains/api_discovery/__init__.py +0 -7
  124. gcore/types/waap/domains/api_discovery/scan_result_list_response.py +0 -29
  125. gcore/types/waap/domains/api_discovery_update_settings_response.py +0 -36
  126. gcore/types/waap/domains/api_discovery_upload_openapi_response.py +0 -10
  127. gcore/types/waap/domains/api_path_create_response.py +0 -50
  128. gcore/types/waap/domains/api_path_list_response.py +0 -50
  129. gcore/types/waap/waap_block_csrf_page_data.py +0 -28
  130. gcore/types/waap/waap_block_csrf_page_data_param.py +0 -28
  131. gcore/types/waap/waap_block_page_data.py +0 -28
  132. gcore/types/waap/waap_block_page_data_param.py +0 -28
  133. gcore/types/waap/waap_captcha_page_data.py +0 -31
  134. gcore/types/waap/waap_captcha_page_data_param.py +0 -31
  135. gcore/types/waap/waap_common_tag.py +0 -16
  136. gcore/types/waap/waap_cookie_disabled_page_data.py +0 -18
  137. gcore/types/waap/waap_cookie_disabled_page_data_param.py +0 -18
  138. gcore/types/waap/waap_customer_rule_state.py +0 -7
  139. gcore/types/waap/waap_domain_policy.py +0 -29
  140. gcore/types/waap/waap_domain_status.py +0 -7
  141. gcore/types/waap/waap_handshake_page_data.py +0 -25
  142. gcore/types/waap/waap_handshake_page_data_param.py +0 -25
  143. gcore/types/waap/waap_insight_silence_sort_by.py +0 -9
  144. gcore/types/waap/waap_insight_sort_by.py +0 -20
  145. gcore/types/waap/waap_insight_status.py +0 -7
  146. gcore/types/waap/waap_javascript_disabled_page_data.py +0 -18
  147. gcore/types/waap/waap_javascript_disabled_page_data_param.py +0 -18
  148. gcore/types/waap/waap_network_details.py +0 -17
  149. gcore/types/waap/waap_page_type.py +0 -9
  150. gcore/types/waap/waap_paginated_custom_page_set.py +0 -22
  151. gcore/types/waap/waap_paginated_ddos_attack.py +0 -22
  152. gcore/types/waap/waap_paginated_ddos_info.py +0 -22
  153. gcore/types/waap/waap_paginated_request_summary.py +0 -22
  154. gcore/types/waap/waap_pattern_matched_tag.py +0 -37
  155. gcore/types/waap/waap_policy_action.py +0 -7
  156. gcore/types/waap/waap_request_details.py +0 -92
  157. gcore/types/waap/waap_request_organization.py +0 -13
  158. gcore/types/waap/waap_resolution.py +0 -7
  159. gcore/types/waap/waap_rule_action_type.py +0 -7
  160. gcore/types/waap/waap_top_url.py +0 -13
  161. gcore/types/waap/waap_traffic_type.py +0 -28
  162. gcore/types/waap/waap_user_agent_details.py +0 -40
  163. {gcore-0.8.0.dist-info → gcore-0.10.0.dist-info}/WHEEL +0 -0
  164. {gcore-0.8.0.dist-info → gcore-0.10.0.dist-info}/licenses/LICENSE +0 -0
@@ -2,46 +2,54 @@
2
2
 
3
3
  from __future__ import annotations
4
4
 
5
- from typing import Optional
6
-
7
5
  import httpx
8
6
 
9
- from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven
10
- from ..._utils import maybe_transform, async_maybe_transform
11
- from ..._compat import cached_property
12
- from ..._resource import SyncAPIResource, AsyncAPIResource
13
- from ..._response import (
7
+ from .metrics import (
8
+ MetricsResource,
9
+ AsyncMetricsResource,
10
+ MetricsResourceWithRawResponse,
11
+ AsyncMetricsResourceWithRawResponse,
12
+ MetricsResourceWithStreamingResponse,
13
+ AsyncMetricsResourceWithStreamingResponse,
14
+ )
15
+ from ...._types import NOT_GIVEN, Body, Query, Headers, NotGiven
16
+ from ...._utils import maybe_transform, async_maybe_transform
17
+ from ...._compat import cached_property
18
+ from ...._resource import SyncAPIResource, AsyncAPIResource
19
+ from ...._response import (
14
20
  to_raw_response_wrapper,
15
21
  to_streamed_response_wrapper,
16
22
  async_to_raw_response_wrapper,
17
23
  async_to_streamed_response_wrapper,
18
24
  )
19
- from ...types.waap import (
20
- ip_info_get_params,
21
- ip_info_get_counts_params,
25
+ from ....types.waap import (
26
+ ip_info_get_ip_info_params,
22
27
  ip_info_get_top_urls_params,
23
- ip_info_get_top_sessions_params,
24
28
  ip_info_get_top_user_agents_params,
25
29
  ip_info_get_blocked_requests_params,
30
+ ip_info_get_top_user_sessions_params,
26
31
  ip_info_get_attack_time_series_params,
27
32
  ip_info_get_ddos_attack_series_params,
28
33
  ip_info_list_attacked_countries_params,
29
34
  )
30
- from ..._base_client import make_request_options
31
- from ...types.waap.waap_ip_info import WaapIPInfo
32
- from ...types.waap.waap_ip_info_counts import WaapIPInfoCounts
33
- from ...types.waap.waap_ip_ddos_info_model import WaapIPDDOSInfoModel
34
- from ...types.waap.ip_info_get_top_urls_response import IPInfoGetTopURLsResponse
35
- from ...types.waap.ip_info_get_top_sessions_response import IPInfoGetTopSessionsResponse
36
- from ...types.waap.ip_info_get_top_user_agents_response import IPInfoGetTopUserAgentsResponse
37
- from ...types.waap.ip_info_get_blocked_requests_response import IPInfoGetBlockedRequestsResponse
38
- from ...types.waap.ip_info_get_attack_time_series_response import IPInfoGetAttackTimeSeriesResponse
39
- from ...types.waap.ip_info_list_attacked_countries_response import IPInfoListAttackedCountriesResponse
35
+ from ...._base_client import make_request_options
36
+ from ....types.waap.waap_ip_ddos_info_model import WaapIPDDOSInfoModel
37
+ from ....types.waap.ip_info_get_ip_info_response import IPInfoGetIPInfoResponse
38
+ from ....types.waap.ip_info_get_top_urls_response import IPInfoGetTopURLsResponse
39
+ from ....types.waap.ip_info_get_top_user_agents_response import IPInfoGetTopUserAgentsResponse
40
+ from ....types.waap.ip_info_get_blocked_requests_response import IPInfoGetBlockedRequestsResponse
41
+ from ....types.waap.ip_info_get_top_user_sessions_response import IPInfoGetTopUserSessionsResponse
42
+ from ....types.waap.ip_info_get_attack_time_series_response import IPInfoGetAttackTimeSeriesResponse
43
+ from ....types.waap.ip_info_list_attacked_countries_response import IPInfoListAttackedCountriesResponse
40
44
 
41
45
  __all__ = ["IPInfoResource", "AsyncIPInfoResource"]
42
46
 
43
47
 
44
48
  class IPInfoResource(SyncAPIResource):
49
+ @cached_property
50
+ def metrics(self) -> MetricsResource:
51
+ return MetricsResource(self._client)
52
+
45
53
  @cached_property
46
54
  def with_raw_response(self) -> IPInfoResourceWithRawResponse:
47
55
  """
@@ -61,44 +69,6 @@ class IPInfoResource(SyncAPIResource):
61
69
  """
62
70
  return IPInfoResourceWithStreamingResponse(self)
63
71
 
64
- def get(
65
- self,
66
- *,
67
- ip: str,
68
- # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
69
- # The extra values given here take precedence over values defined on the client or passed to this method.
70
- extra_headers: Headers | None = None,
71
- extra_query: Query | None = None,
72
- extra_body: Body | None = None,
73
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
74
- ) -> WaapIPInfo:
75
- """
76
- Fetch details about a particular IP address, including WHOIS data, risk score,
77
- and additional tags.
78
-
79
- Args:
80
- ip: The IP address to check
81
-
82
- extra_headers: Send extra headers
83
-
84
- extra_query: Add additional query parameters to the request
85
-
86
- extra_body: Add additional JSON properties to the request
87
-
88
- timeout: Override the client-level default timeout for this request, in seconds
89
- """
90
- return self._get(
91
- "/waap/v1/ip-info/ip-info",
92
- options=make_request_options(
93
- extra_headers=extra_headers,
94
- extra_query=extra_query,
95
- extra_body=extra_body,
96
- timeout=timeout,
97
- query=maybe_transform({"ip": ip}, ip_info_get_params.IPInfoGetParams),
98
- ),
99
- cast_to=WaapIPInfo,
100
- )
101
-
102
72
  def get_attack_time_series(
103
73
  self,
104
74
  *,
@@ -189,31 +159,27 @@ class IPInfoResource(SyncAPIResource):
189
159
  cast_to=IPInfoGetBlockedRequestsResponse,
190
160
  )
191
161
 
192
- def get_counts(
162
+ def get_ddos_attack_series(
193
163
  self,
194
164
  *,
195
165
  ip: str,
196
- domain_id: Optional[int] | NotGiven = NOT_GIVEN,
197
166
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
198
167
  # The extra values given here take precedence over values defined on the client or passed to this method.
199
168
  extra_headers: Headers | None = None,
200
169
  extra_query: Query | None = None,
201
170
  extra_body: Body | None = None,
202
171
  timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
203
- ) -> WaapIPInfoCounts:
172
+ ) -> WaapIPDDOSInfoModel:
204
173
  """
205
- Retrieve metrics encompassing the counts of total requests, blocked requests and
206
- unique sessions associated with a specified IP address. Metrics provide a
207
- statistical overview, aiding in analyzing the interaction and access patterns of
208
- the IP address in context.
174
+ Fetch and analyze DDoS (Distributed Denial of Service) attack metrics for a
175
+ specified IP address. The endpoint provides time-series data, enabling users to
176
+ evaluate the frequency and intensity of attacks across various time intervals,
177
+ and it returns metrics in Prometheus format to offer a systematic view of DDoS
178
+ attack patterns.
209
179
 
210
180
  Args:
211
181
  ip: The IP address to check
212
182
 
213
- domain_id: The identifier for a domain. When specified, the response will exclusively
214
- contain data pertinent to the indicated domain, filtering out information from
215
- other domains.
216
-
217
183
  extra_headers: Send extra headers
218
184
 
219
185
  extra_query: Add additional query parameters to the request
@@ -223,24 +189,20 @@ class IPInfoResource(SyncAPIResource):
223
189
  timeout: Override the client-level default timeout for this request, in seconds
224
190
  """
225
191
  return self._get(
226
- "/waap/v1/ip-info/counts",
192
+ "/waap/v1/ip-info/ddos",
227
193
  options=make_request_options(
228
194
  extra_headers=extra_headers,
229
195
  extra_query=extra_query,
230
196
  extra_body=extra_body,
231
197
  timeout=timeout,
232
198
  query=maybe_transform(
233
- {
234
- "ip": ip,
235
- "domain_id": domain_id,
236
- },
237
- ip_info_get_counts_params.IPInfoGetCountsParams,
199
+ {"ip": ip}, ip_info_get_ddos_attack_series_params.IPInfoGetDDOSAttackSeriesParams
238
200
  ),
239
201
  ),
240
- cast_to=WaapIPInfoCounts,
202
+ cast_to=WaapIPDDOSInfoModel,
241
203
  )
242
204
 
243
- def get_ddos_attack_series(
205
+ def get_ip_info(
244
206
  self,
245
207
  *,
246
208
  ip: str,
@@ -250,13 +212,10 @@ class IPInfoResource(SyncAPIResource):
250
212
  extra_query: Query | None = None,
251
213
  extra_body: Body | None = None,
252
214
  timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
253
- ) -> WaapIPDDOSInfoModel:
215
+ ) -> IPInfoGetIPInfoResponse:
254
216
  """
255
- Fetch and analyze DDoS (Distributed Denial of Service) attack metrics for a
256
- specified IP address. The endpoint provides time-series data, enabling users to
257
- evaluate the frequency and intensity of attacks across various time intervals,
258
- and it returns metrics in Prometheus format to offer a systematic view of DDoS
259
- attack patterns.
217
+ Fetch details about a particular IP address, including WHOIS data, risk score,
218
+ and additional tags.
260
219
 
261
220
  Args:
262
221
  ip: The IP address to check
@@ -270,20 +229,18 @@ class IPInfoResource(SyncAPIResource):
270
229
  timeout: Override the client-level default timeout for this request, in seconds
271
230
  """
272
231
  return self._get(
273
- "/waap/v1/ip-info/ddos",
232
+ "/waap/v1/ip-info/ip-info",
274
233
  options=make_request_options(
275
234
  extra_headers=extra_headers,
276
235
  extra_query=extra_query,
277
236
  extra_body=extra_body,
278
237
  timeout=timeout,
279
- query=maybe_transform(
280
- {"ip": ip}, ip_info_get_ddos_attack_series_params.IPInfoGetDDOSAttackSeriesParams
281
- ),
238
+ query=maybe_transform({"ip": ip}, ip_info_get_ip_info_params.IPInfoGetIPInfoParams),
282
239
  ),
283
- cast_to=WaapIPDDOSInfoModel,
240
+ cast_to=IPInfoGetIPInfoResponse,
284
241
  )
285
242
 
286
- def get_top_sessions(
243
+ def get_top_urls(
287
244
  self,
288
245
  *,
289
246
  domain_id: int,
@@ -294,10 +251,12 @@ class IPInfoResource(SyncAPIResource):
294
251
  extra_query: Query | None = None,
295
252
  extra_body: Body | None = None,
296
253
  timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
297
- ) -> IPInfoGetTopSessionsResponse:
254
+ ) -> IPInfoGetTopURLsResponse:
298
255
  """
299
- Obtain the top 10 user sessions interfacing with a particular domain, identified
300
- by IP.
256
+ Returns a list of the top 10 URLs accessed by a specified IP address within a
257
+ specific domain. This data is vital to understand user navigation patterns,
258
+ pinpoint high-traffic pages, and facilitate more targeted enhancements or
259
+ security monitoring based on URL popularity.
301
260
 
302
261
  Args:
303
262
  domain_id: The identifier for a domain. When specified, the response will exclusively
@@ -315,7 +274,7 @@ class IPInfoResource(SyncAPIResource):
315
274
  timeout: Override the client-level default timeout for this request, in seconds
316
275
  """
317
276
  return self._get(
318
- "/waap/v1/ip-info/top-sessions",
277
+ "/waap/v1/ip-info/top-urls",
319
278
  options=make_request_options(
320
279
  extra_headers=extra_headers,
321
280
  extra_query=extra_query,
@@ -326,13 +285,13 @@ class IPInfoResource(SyncAPIResource):
326
285
  "domain_id": domain_id,
327
286
  "ip": ip,
328
287
  },
329
- ip_info_get_top_sessions_params.IPInfoGetTopSessionsParams,
288
+ ip_info_get_top_urls_params.IPInfoGetTopURLsParams,
330
289
  ),
331
290
  ),
332
- cast_to=IPInfoGetTopSessionsResponse,
291
+ cast_to=IPInfoGetTopURLsResponse,
333
292
  )
334
293
 
335
- def get_top_urls(
294
+ def get_top_user_agents(
336
295
  self,
337
296
  *,
338
297
  domain_id: int,
@@ -343,12 +302,10 @@ class IPInfoResource(SyncAPIResource):
343
302
  extra_query: Query | None = None,
344
303
  extra_body: Body | None = None,
345
304
  timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
346
- ) -> IPInfoGetTopURLsResponse:
305
+ ) -> IPInfoGetTopUserAgentsResponse:
347
306
  """
348
- Returns a list of the top 10 URLs accessed by a specified IP address within a
349
- specific domain. This data is vital to understand user navigation patterns,
350
- pinpoint high-traffic pages, and facilitate more targeted enhancements or
351
- security monitoring based on URL popularity.
307
+ Retrieve the top 10 user agents interacting with a specified domain, filtered by
308
+ IP.
352
309
 
353
310
  Args:
354
311
  domain_id: The identifier for a domain. When specified, the response will exclusively
@@ -366,7 +323,7 @@ class IPInfoResource(SyncAPIResource):
366
323
  timeout: Override the client-level default timeout for this request, in seconds
367
324
  """
368
325
  return self._get(
369
- "/waap/v1/ip-info/top-urls",
326
+ "/waap/v1/ip-info/top-user-agents",
370
327
  options=make_request_options(
371
328
  extra_headers=extra_headers,
372
329
  extra_query=extra_query,
@@ -377,13 +334,13 @@ class IPInfoResource(SyncAPIResource):
377
334
  "domain_id": domain_id,
378
335
  "ip": ip,
379
336
  },
380
- ip_info_get_top_urls_params.IPInfoGetTopURLsParams,
337
+ ip_info_get_top_user_agents_params.IPInfoGetTopUserAgentsParams,
381
338
  ),
382
339
  ),
383
- cast_to=IPInfoGetTopURLsResponse,
340
+ cast_to=IPInfoGetTopUserAgentsResponse,
384
341
  )
385
342
 
386
- def get_top_user_agents(
343
+ def get_top_user_sessions(
387
344
  self,
388
345
  *,
389
346
  domain_id: int,
@@ -394,10 +351,10 @@ class IPInfoResource(SyncAPIResource):
394
351
  extra_query: Query | None = None,
395
352
  extra_body: Body | None = None,
396
353
  timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
397
- ) -> IPInfoGetTopUserAgentsResponse:
354
+ ) -> IPInfoGetTopUserSessionsResponse:
398
355
  """
399
- Retrieve the top 10 user agents interacting with a specified domain, filtered by
400
- IP.
356
+ Obtain the top 10 user sessions interfacing with a particular domain, identified
357
+ by IP.
401
358
 
402
359
  Args:
403
360
  domain_id: The identifier for a domain. When specified, the response will exclusively
@@ -415,7 +372,7 @@ class IPInfoResource(SyncAPIResource):
415
372
  timeout: Override the client-level default timeout for this request, in seconds
416
373
  """
417
374
  return self._get(
418
- "/waap/v1/ip-info/top-user-agents",
375
+ "/waap/v1/ip-info/top-sessions",
419
376
  options=make_request_options(
420
377
  extra_headers=extra_headers,
421
378
  extra_query=extra_query,
@@ -426,10 +383,10 @@ class IPInfoResource(SyncAPIResource):
426
383
  "domain_id": domain_id,
427
384
  "ip": ip,
428
385
  },
429
- ip_info_get_top_user_agents_params.IPInfoGetTopUserAgentsParams,
386
+ ip_info_get_top_user_sessions_params.IPInfoGetTopUserSessionsParams,
430
387
  ),
431
388
  ),
432
- cast_to=IPInfoGetTopUserAgentsResponse,
389
+ cast_to=IPInfoGetTopUserSessionsResponse,
433
390
  )
434
391
 
435
392
  def list_attacked_countries(
@@ -473,6 +430,10 @@ class IPInfoResource(SyncAPIResource):
473
430
 
474
431
 
475
432
  class AsyncIPInfoResource(AsyncAPIResource):
433
+ @cached_property
434
+ def metrics(self) -> AsyncMetricsResource:
435
+ return AsyncMetricsResource(self._client)
436
+
476
437
  @cached_property
477
438
  def with_raw_response(self) -> AsyncIPInfoResourceWithRawResponse:
478
439
  """
@@ -492,44 +453,6 @@ class AsyncIPInfoResource(AsyncAPIResource):
492
453
  """
493
454
  return AsyncIPInfoResourceWithStreamingResponse(self)
494
455
 
495
- async def get(
496
- self,
497
- *,
498
- ip: str,
499
- # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
500
- # The extra values given here take precedence over values defined on the client or passed to this method.
501
- extra_headers: Headers | None = None,
502
- extra_query: Query | None = None,
503
- extra_body: Body | None = None,
504
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
505
- ) -> WaapIPInfo:
506
- """
507
- Fetch details about a particular IP address, including WHOIS data, risk score,
508
- and additional tags.
509
-
510
- Args:
511
- ip: The IP address to check
512
-
513
- extra_headers: Send extra headers
514
-
515
- extra_query: Add additional query parameters to the request
516
-
517
- extra_body: Add additional JSON properties to the request
518
-
519
- timeout: Override the client-level default timeout for this request, in seconds
520
- """
521
- return await self._get(
522
- "/waap/v1/ip-info/ip-info",
523
- options=make_request_options(
524
- extra_headers=extra_headers,
525
- extra_query=extra_query,
526
- extra_body=extra_body,
527
- timeout=timeout,
528
- query=await async_maybe_transform({"ip": ip}, ip_info_get_params.IPInfoGetParams),
529
- ),
530
- cast_to=WaapIPInfo,
531
- )
532
-
533
456
  async def get_attack_time_series(
534
457
  self,
535
458
  *,
@@ -620,31 +543,27 @@ class AsyncIPInfoResource(AsyncAPIResource):
620
543
  cast_to=IPInfoGetBlockedRequestsResponse,
621
544
  )
622
545
 
623
- async def get_counts(
546
+ async def get_ddos_attack_series(
624
547
  self,
625
548
  *,
626
549
  ip: str,
627
- domain_id: Optional[int] | NotGiven = NOT_GIVEN,
628
550
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
629
551
  # The extra values given here take precedence over values defined on the client or passed to this method.
630
552
  extra_headers: Headers | None = None,
631
553
  extra_query: Query | None = None,
632
554
  extra_body: Body | None = None,
633
555
  timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
634
- ) -> WaapIPInfoCounts:
556
+ ) -> WaapIPDDOSInfoModel:
635
557
  """
636
- Retrieve metrics encompassing the counts of total requests, blocked requests and
637
- unique sessions associated with a specified IP address. Metrics provide a
638
- statistical overview, aiding in analyzing the interaction and access patterns of
639
- the IP address in context.
558
+ Fetch and analyze DDoS (Distributed Denial of Service) attack metrics for a
559
+ specified IP address. The endpoint provides time-series data, enabling users to
560
+ evaluate the frequency and intensity of attacks across various time intervals,
561
+ and it returns metrics in Prometheus format to offer a systematic view of DDoS
562
+ attack patterns.
640
563
 
641
564
  Args:
642
565
  ip: The IP address to check
643
566
 
644
- domain_id: The identifier for a domain. When specified, the response will exclusively
645
- contain data pertinent to the indicated domain, filtering out information from
646
- other domains.
647
-
648
567
  extra_headers: Send extra headers
649
568
 
650
569
  extra_query: Add additional query parameters to the request
@@ -654,24 +573,20 @@ class AsyncIPInfoResource(AsyncAPIResource):
654
573
  timeout: Override the client-level default timeout for this request, in seconds
655
574
  """
656
575
  return await self._get(
657
- "/waap/v1/ip-info/counts",
576
+ "/waap/v1/ip-info/ddos",
658
577
  options=make_request_options(
659
578
  extra_headers=extra_headers,
660
579
  extra_query=extra_query,
661
580
  extra_body=extra_body,
662
581
  timeout=timeout,
663
582
  query=await async_maybe_transform(
664
- {
665
- "ip": ip,
666
- "domain_id": domain_id,
667
- },
668
- ip_info_get_counts_params.IPInfoGetCountsParams,
583
+ {"ip": ip}, ip_info_get_ddos_attack_series_params.IPInfoGetDDOSAttackSeriesParams
669
584
  ),
670
585
  ),
671
- cast_to=WaapIPInfoCounts,
586
+ cast_to=WaapIPDDOSInfoModel,
672
587
  )
673
588
 
674
- async def get_ddos_attack_series(
589
+ async def get_ip_info(
675
590
  self,
676
591
  *,
677
592
  ip: str,
@@ -681,13 +596,10 @@ class AsyncIPInfoResource(AsyncAPIResource):
681
596
  extra_query: Query | None = None,
682
597
  extra_body: Body | None = None,
683
598
  timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
684
- ) -> WaapIPDDOSInfoModel:
599
+ ) -> IPInfoGetIPInfoResponse:
685
600
  """
686
- Fetch and analyze DDoS (Distributed Denial of Service) attack metrics for a
687
- specified IP address. The endpoint provides time-series data, enabling users to
688
- evaluate the frequency and intensity of attacks across various time intervals,
689
- and it returns metrics in Prometheus format to offer a systematic view of DDoS
690
- attack patterns.
601
+ Fetch details about a particular IP address, including WHOIS data, risk score,
602
+ and additional tags.
691
603
 
692
604
  Args:
693
605
  ip: The IP address to check
@@ -701,20 +613,18 @@ class AsyncIPInfoResource(AsyncAPIResource):
701
613
  timeout: Override the client-level default timeout for this request, in seconds
702
614
  """
703
615
  return await self._get(
704
- "/waap/v1/ip-info/ddos",
616
+ "/waap/v1/ip-info/ip-info",
705
617
  options=make_request_options(
706
618
  extra_headers=extra_headers,
707
619
  extra_query=extra_query,
708
620
  extra_body=extra_body,
709
621
  timeout=timeout,
710
- query=await async_maybe_transform(
711
- {"ip": ip}, ip_info_get_ddos_attack_series_params.IPInfoGetDDOSAttackSeriesParams
712
- ),
622
+ query=await async_maybe_transform({"ip": ip}, ip_info_get_ip_info_params.IPInfoGetIPInfoParams),
713
623
  ),
714
- cast_to=WaapIPDDOSInfoModel,
624
+ cast_to=IPInfoGetIPInfoResponse,
715
625
  )
716
626
 
717
- async def get_top_sessions(
627
+ async def get_top_urls(
718
628
  self,
719
629
  *,
720
630
  domain_id: int,
@@ -725,10 +635,12 @@ class AsyncIPInfoResource(AsyncAPIResource):
725
635
  extra_query: Query | None = None,
726
636
  extra_body: Body | None = None,
727
637
  timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
728
- ) -> IPInfoGetTopSessionsResponse:
638
+ ) -> IPInfoGetTopURLsResponse:
729
639
  """
730
- Obtain the top 10 user sessions interfacing with a particular domain, identified
731
- by IP.
640
+ Returns a list of the top 10 URLs accessed by a specified IP address within a
641
+ specific domain. This data is vital to understand user navigation patterns,
642
+ pinpoint high-traffic pages, and facilitate more targeted enhancements or
643
+ security monitoring based on URL popularity.
732
644
 
733
645
  Args:
734
646
  domain_id: The identifier for a domain. When specified, the response will exclusively
@@ -746,7 +658,7 @@ class AsyncIPInfoResource(AsyncAPIResource):
746
658
  timeout: Override the client-level default timeout for this request, in seconds
747
659
  """
748
660
  return await self._get(
749
- "/waap/v1/ip-info/top-sessions",
661
+ "/waap/v1/ip-info/top-urls",
750
662
  options=make_request_options(
751
663
  extra_headers=extra_headers,
752
664
  extra_query=extra_query,
@@ -757,13 +669,13 @@ class AsyncIPInfoResource(AsyncAPIResource):
757
669
  "domain_id": domain_id,
758
670
  "ip": ip,
759
671
  },
760
- ip_info_get_top_sessions_params.IPInfoGetTopSessionsParams,
672
+ ip_info_get_top_urls_params.IPInfoGetTopURLsParams,
761
673
  ),
762
674
  ),
763
- cast_to=IPInfoGetTopSessionsResponse,
675
+ cast_to=IPInfoGetTopURLsResponse,
764
676
  )
765
677
 
766
- async def get_top_urls(
678
+ async def get_top_user_agents(
767
679
  self,
768
680
  *,
769
681
  domain_id: int,
@@ -774,12 +686,10 @@ class AsyncIPInfoResource(AsyncAPIResource):
774
686
  extra_query: Query | None = None,
775
687
  extra_body: Body | None = None,
776
688
  timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
777
- ) -> IPInfoGetTopURLsResponse:
689
+ ) -> IPInfoGetTopUserAgentsResponse:
778
690
  """
779
- Returns a list of the top 10 URLs accessed by a specified IP address within a
780
- specific domain. This data is vital to understand user navigation patterns,
781
- pinpoint high-traffic pages, and facilitate more targeted enhancements or
782
- security monitoring based on URL popularity.
691
+ Retrieve the top 10 user agents interacting with a specified domain, filtered by
692
+ IP.
783
693
 
784
694
  Args:
785
695
  domain_id: The identifier for a domain. When specified, the response will exclusively
@@ -797,7 +707,7 @@ class AsyncIPInfoResource(AsyncAPIResource):
797
707
  timeout: Override the client-level default timeout for this request, in seconds
798
708
  """
799
709
  return await self._get(
800
- "/waap/v1/ip-info/top-urls",
710
+ "/waap/v1/ip-info/top-user-agents",
801
711
  options=make_request_options(
802
712
  extra_headers=extra_headers,
803
713
  extra_query=extra_query,
@@ -808,13 +718,13 @@ class AsyncIPInfoResource(AsyncAPIResource):
808
718
  "domain_id": domain_id,
809
719
  "ip": ip,
810
720
  },
811
- ip_info_get_top_urls_params.IPInfoGetTopURLsParams,
721
+ ip_info_get_top_user_agents_params.IPInfoGetTopUserAgentsParams,
812
722
  ),
813
723
  ),
814
- cast_to=IPInfoGetTopURLsResponse,
724
+ cast_to=IPInfoGetTopUserAgentsResponse,
815
725
  )
816
726
 
817
- async def get_top_user_agents(
727
+ async def get_top_user_sessions(
818
728
  self,
819
729
  *,
820
730
  domain_id: int,
@@ -825,10 +735,10 @@ class AsyncIPInfoResource(AsyncAPIResource):
825
735
  extra_query: Query | None = None,
826
736
  extra_body: Body | None = None,
827
737
  timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
828
- ) -> IPInfoGetTopUserAgentsResponse:
738
+ ) -> IPInfoGetTopUserSessionsResponse:
829
739
  """
830
- Retrieve the top 10 user agents interacting with a specified domain, filtered by
831
- IP.
740
+ Obtain the top 10 user sessions interfacing with a particular domain, identified
741
+ by IP.
832
742
 
833
743
  Args:
834
744
  domain_id: The identifier for a domain. When specified, the response will exclusively
@@ -846,7 +756,7 @@ class AsyncIPInfoResource(AsyncAPIResource):
846
756
  timeout: Override the client-level default timeout for this request, in seconds
847
757
  """
848
758
  return await self._get(
849
- "/waap/v1/ip-info/top-user-agents",
759
+ "/waap/v1/ip-info/top-sessions",
850
760
  options=make_request_options(
851
761
  extra_headers=extra_headers,
852
762
  extra_query=extra_query,
@@ -857,10 +767,10 @@ class AsyncIPInfoResource(AsyncAPIResource):
857
767
  "domain_id": domain_id,
858
768
  "ip": ip,
859
769
  },
860
- ip_info_get_top_user_agents_params.IPInfoGetTopUserAgentsParams,
770
+ ip_info_get_top_user_sessions_params.IPInfoGetTopUserSessionsParams,
861
771
  ),
862
772
  ),
863
- cast_to=IPInfoGetTopUserAgentsResponse,
773
+ cast_to=IPInfoGetTopUserSessionsResponse,
864
774
  )
865
775
 
866
776
  async def list_attacked_countries(
@@ -907,23 +817,17 @@ class IPInfoResourceWithRawResponse:
907
817
  def __init__(self, ip_info: IPInfoResource) -> None:
908
818
  self._ip_info = ip_info
909
819
 
910
- self.get = to_raw_response_wrapper(
911
- ip_info.get,
912
- )
913
820
  self.get_attack_time_series = to_raw_response_wrapper(
914
821
  ip_info.get_attack_time_series,
915
822
  )
916
823
  self.get_blocked_requests = to_raw_response_wrapper(
917
824
  ip_info.get_blocked_requests,
918
825
  )
919
- self.get_counts = to_raw_response_wrapper(
920
- ip_info.get_counts,
921
- )
922
826
  self.get_ddos_attack_series = to_raw_response_wrapper(
923
827
  ip_info.get_ddos_attack_series,
924
828
  )
925
- self.get_top_sessions = to_raw_response_wrapper(
926
- ip_info.get_top_sessions,
829
+ self.get_ip_info = to_raw_response_wrapper(
830
+ ip_info.get_ip_info,
927
831
  )
928
832
  self.get_top_urls = to_raw_response_wrapper(
929
833
  ip_info.get_top_urls,
@@ -931,32 +835,33 @@ class IPInfoResourceWithRawResponse:
931
835
  self.get_top_user_agents = to_raw_response_wrapper(
932
836
  ip_info.get_top_user_agents,
933
837
  )
838
+ self.get_top_user_sessions = to_raw_response_wrapper(
839
+ ip_info.get_top_user_sessions,
840
+ )
934
841
  self.list_attacked_countries = to_raw_response_wrapper(
935
842
  ip_info.list_attacked_countries,
936
843
  )
937
844
 
845
+ @cached_property
846
+ def metrics(self) -> MetricsResourceWithRawResponse:
847
+ return MetricsResourceWithRawResponse(self._ip_info.metrics)
848
+
938
849
 
939
850
  class AsyncIPInfoResourceWithRawResponse:
940
851
  def __init__(self, ip_info: AsyncIPInfoResource) -> None:
941
852
  self._ip_info = ip_info
942
853
 
943
- self.get = async_to_raw_response_wrapper(
944
- ip_info.get,
945
- )
946
854
  self.get_attack_time_series = async_to_raw_response_wrapper(
947
855
  ip_info.get_attack_time_series,
948
856
  )
949
857
  self.get_blocked_requests = async_to_raw_response_wrapper(
950
858
  ip_info.get_blocked_requests,
951
859
  )
952
- self.get_counts = async_to_raw_response_wrapper(
953
- ip_info.get_counts,
954
- )
955
860
  self.get_ddos_attack_series = async_to_raw_response_wrapper(
956
861
  ip_info.get_ddos_attack_series,
957
862
  )
958
- self.get_top_sessions = async_to_raw_response_wrapper(
959
- ip_info.get_top_sessions,
863
+ self.get_ip_info = async_to_raw_response_wrapper(
864
+ ip_info.get_ip_info,
960
865
  )
961
866
  self.get_top_urls = async_to_raw_response_wrapper(
962
867
  ip_info.get_top_urls,
@@ -964,32 +869,33 @@ class AsyncIPInfoResourceWithRawResponse:
964
869
  self.get_top_user_agents = async_to_raw_response_wrapper(
965
870
  ip_info.get_top_user_agents,
966
871
  )
872
+ self.get_top_user_sessions = async_to_raw_response_wrapper(
873
+ ip_info.get_top_user_sessions,
874
+ )
967
875
  self.list_attacked_countries = async_to_raw_response_wrapper(
968
876
  ip_info.list_attacked_countries,
969
877
  )
970
878
 
879
+ @cached_property
880
+ def metrics(self) -> AsyncMetricsResourceWithRawResponse:
881
+ return AsyncMetricsResourceWithRawResponse(self._ip_info.metrics)
882
+
971
883
 
972
884
  class IPInfoResourceWithStreamingResponse:
973
885
  def __init__(self, ip_info: IPInfoResource) -> None:
974
886
  self._ip_info = ip_info
975
887
 
976
- self.get = to_streamed_response_wrapper(
977
- ip_info.get,
978
- )
979
888
  self.get_attack_time_series = to_streamed_response_wrapper(
980
889
  ip_info.get_attack_time_series,
981
890
  )
982
891
  self.get_blocked_requests = to_streamed_response_wrapper(
983
892
  ip_info.get_blocked_requests,
984
893
  )
985
- self.get_counts = to_streamed_response_wrapper(
986
- ip_info.get_counts,
987
- )
988
894
  self.get_ddos_attack_series = to_streamed_response_wrapper(
989
895
  ip_info.get_ddos_attack_series,
990
896
  )
991
- self.get_top_sessions = to_streamed_response_wrapper(
992
- ip_info.get_top_sessions,
897
+ self.get_ip_info = to_streamed_response_wrapper(
898
+ ip_info.get_ip_info,
993
899
  )
994
900
  self.get_top_urls = to_streamed_response_wrapper(
995
901
  ip_info.get_top_urls,
@@ -997,32 +903,33 @@ class IPInfoResourceWithStreamingResponse:
997
903
  self.get_top_user_agents = to_streamed_response_wrapper(
998
904
  ip_info.get_top_user_agents,
999
905
  )
906
+ self.get_top_user_sessions = to_streamed_response_wrapper(
907
+ ip_info.get_top_user_sessions,
908
+ )
1000
909
  self.list_attacked_countries = to_streamed_response_wrapper(
1001
910
  ip_info.list_attacked_countries,
1002
911
  )
1003
912
 
913
+ @cached_property
914
+ def metrics(self) -> MetricsResourceWithStreamingResponse:
915
+ return MetricsResourceWithStreamingResponse(self._ip_info.metrics)
916
+
1004
917
 
1005
918
  class AsyncIPInfoResourceWithStreamingResponse:
1006
919
  def __init__(self, ip_info: AsyncIPInfoResource) -> None:
1007
920
  self._ip_info = ip_info
1008
921
 
1009
- self.get = async_to_streamed_response_wrapper(
1010
- ip_info.get,
1011
- )
1012
922
  self.get_attack_time_series = async_to_streamed_response_wrapper(
1013
923
  ip_info.get_attack_time_series,
1014
924
  )
1015
925
  self.get_blocked_requests = async_to_streamed_response_wrapper(
1016
926
  ip_info.get_blocked_requests,
1017
927
  )
1018
- self.get_counts = async_to_streamed_response_wrapper(
1019
- ip_info.get_counts,
1020
- )
1021
928
  self.get_ddos_attack_series = async_to_streamed_response_wrapper(
1022
929
  ip_info.get_ddos_attack_series,
1023
930
  )
1024
- self.get_top_sessions = async_to_streamed_response_wrapper(
1025
- ip_info.get_top_sessions,
931
+ self.get_ip_info = async_to_streamed_response_wrapper(
932
+ ip_info.get_ip_info,
1026
933
  )
1027
934
  self.get_top_urls = async_to_streamed_response_wrapper(
1028
935
  ip_info.get_top_urls,
@@ -1030,6 +937,13 @@ class AsyncIPInfoResourceWithStreamingResponse:
1030
937
  self.get_top_user_agents = async_to_streamed_response_wrapper(
1031
938
  ip_info.get_top_user_agents,
1032
939
  )
940
+ self.get_top_user_sessions = async_to_streamed_response_wrapper(
941
+ ip_info.get_top_user_sessions,
942
+ )
1033
943
  self.list_attacked_countries = async_to_streamed_response_wrapper(
1034
944
  ip_info.list_attacked_countries,
1035
945
  )
946
+
947
+ @cached_property
948
+ def metrics(self) -> AsyncMetricsResourceWithStreamingResponse:
949
+ return AsyncMetricsResourceWithStreamingResponse(self._ip_info.metrics)