gcore 0.9.0__py3-none-any.whl → 0.11.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 (420) hide show
  1. gcore/_base_client.py +3 -3
  2. gcore/_client.py +18 -0
  3. gcore/_compat.py +48 -48
  4. gcore/_models.py +41 -41
  5. gcore/_types.py +35 -1
  6. gcore/_utils/__init__.py +9 -2
  7. gcore/_utils/_compat.py +45 -0
  8. gcore/_utils/_datetime_parse.py +136 -0
  9. gcore/_utils/_transform.py +11 -1
  10. gcore/_utils/_typing.py +6 -1
  11. gcore/_utils/_utils.py +0 -1
  12. gcore/_version.py +1 -1
  13. gcore/resources/__init__.py +28 -0
  14. gcore/resources/cloud/__init__.py +14 -0
  15. gcore/resources/cloud/audit_logs.py +3 -3
  16. gcore/resources/cloud/baremetal/images.py +3 -4
  17. gcore/resources/cloud/baremetal/servers.py +16 -4
  18. gcore/resources/cloud/cloud.py +32 -0
  19. gcore/resources/cloud/cost_reports.py +24 -16
  20. gcore/resources/cloud/file_shares/access_rules.py +2 -2
  21. gcore/resources/cloud/file_shares/file_shares.py +30 -14
  22. gcore/resources/cloud/floating_ips.py +196 -4
  23. gcore/resources/cloud/gpu_baremetal_clusters/flavors.py +1 -1
  24. gcore/resources/cloud/gpu_baremetal_clusters/gpu_baremetal_clusters.py +166 -190
  25. gcore/resources/cloud/gpu_baremetal_clusters/servers.py +268 -12
  26. gcore/resources/cloud/inference/__init__.py +14 -14
  27. gcore/resources/cloud/inference/applications/__init__.py +47 -0
  28. gcore/resources/cloud/inference/applications/applications.py +134 -0
  29. gcore/resources/cloud/inference/applications/deployments.py +649 -0
  30. gcore/resources/cloud/inference/applications/templates.py +238 -0
  31. gcore/resources/cloud/inference/deployments/deployments.py +41 -22
  32. gcore/resources/cloud/inference/inference.py +32 -32
  33. gcore/resources/cloud/inference/registry_credentials.py +8 -9
  34. gcore/resources/cloud/instances/images.py +4 -4
  35. gcore/resources/cloud/instances/instances.py +254 -4
  36. gcore/resources/cloud/instances/interfaces.py +544 -0
  37. gcore/resources/cloud/k8s/__init__.py +47 -0
  38. gcore/resources/cloud/k8s/clusters/__init__.py +47 -0
  39. gcore/resources/cloud/k8s/clusters/clusters.py +1391 -0
  40. gcore/resources/cloud/k8s/clusters/nodes.py +291 -0
  41. gcore/resources/cloud/k8s/clusters/pools/__init__.py +33 -0
  42. gcore/resources/cloud/k8s/clusters/pools/nodes.py +303 -0
  43. gcore/resources/cloud/k8s/clusters/pools/pools.py +870 -0
  44. gcore/resources/cloud/k8s/flavors.py +209 -0
  45. gcore/resources/cloud/k8s/k8s.py +233 -0
  46. gcore/resources/cloud/load_balancers/l7_policies/l7_policies.py +11 -12
  47. gcore/resources/cloud/load_balancers/l7_policies/rules.py +9 -10
  48. gcore/resources/cloud/load_balancers/listeners.py +18 -18
  49. gcore/resources/cloud/load_balancers/load_balancers.py +4 -4
  50. gcore/resources/cloud/load_balancers/pools/health_monitors.py +26 -10
  51. gcore/resources/cloud/load_balancers/pools/members.py +34 -4
  52. gcore/resources/cloud/load_balancers/pools/pools.py +32 -8
  53. gcore/resources/cloud/networks/networks.py +192 -4
  54. gcore/resources/cloud/networks/subnets.py +140 -8
  55. gcore/resources/cloud/reserved_fixed_ips/vip.py +5 -7
  56. gcore/resources/cloud/security_groups/security_groups.py +6 -6
  57. gcore/resources/cloud/tasks.py +46 -46
  58. gcore/resources/cloud/users/role_assignments.py +5 -4
  59. gcore/resources/cloud/volumes.py +4 -4
  60. gcore/resources/dns/__init__.py +75 -0
  61. gcore/resources/dns/dns.py +374 -0
  62. gcore/resources/dns/locations.py +288 -0
  63. gcore/resources/dns/metrics.py +214 -0
  64. gcore/resources/dns/pickers/__init__.py +33 -0
  65. gcore/resources/dns/pickers/pickers.py +167 -0
  66. gcore/resources/dns/pickers/presets.py +135 -0
  67. gcore/resources/dns/zones/__init__.py +47 -0
  68. gcore/resources/{cloud/inference/models.py → dns/zones/dnssec.py} +80 -122
  69. gcore/resources/dns/zones/rrsets.py +1005 -0
  70. gcore/resources/dns/zones/zones.py +1493 -0
  71. gcore/resources/security/bgp_announces.py +15 -15
  72. gcore/resources/storage/__init__.py +75 -0
  73. gcore/resources/storage/buckets/__init__.py +61 -0
  74. gcore/resources/storage/buckets/buckets.py +470 -0
  75. gcore/resources/storage/buckets/cors.py +265 -0
  76. gcore/resources/storage/buckets/lifecycle.py +276 -0
  77. gcore/resources/storage/buckets/policy.py +345 -0
  78. gcore/resources/storage/credentials.py +221 -0
  79. gcore/resources/storage/locations.py +190 -0
  80. gcore/resources/storage/statistics.py +364 -0
  81. gcore/resources/storage/storage.py +1042 -0
  82. gcore/resources/streaming/ai_tasks.py +56 -70
  83. gcore/resources/streaming/playlists.py +18 -18
  84. gcore/resources/streaming/quality_sets.py +8 -8
  85. gcore/resources/streaming/statistics.py +4 -122
  86. gcore/resources/streaming/streams/overlays.py +6 -6
  87. gcore/resources/streaming/streams/streams.py +40 -64
  88. gcore/resources/streaming/videos/subtitles.py +32 -30
  89. gcore/resources/streaming/videos/videos.py +78 -72
  90. gcore/resources/waap/__init__.py +14 -0
  91. gcore/resources/waap/custom_page_sets.py +40 -34
  92. gcore/resources/waap/domains/__init__.py +14 -28
  93. gcore/resources/waap/domains/advanced_rules.py +7 -10
  94. gcore/resources/waap/domains/{api_discovery/api_discovery.py → api_discovery.py} +292 -59
  95. gcore/resources/waap/domains/api_path_groups.py +5 -5
  96. gcore/resources/waap/domains/api_paths.py +28 -30
  97. gcore/resources/waap/domains/custom_rules.py +7 -10
  98. gcore/resources/waap/domains/domains.py +124 -68
  99. gcore/resources/waap/domains/firewall_rules.py +5 -7
  100. gcore/resources/waap/domains/insight_silences.py +34 -11
  101. gcore/resources/waap/domains/insights.py +43 -17
  102. gcore/resources/waap/domains/statistics.py +977 -0
  103. gcore/resources/waap/insights.py +233 -0
  104. gcore/resources/waap/ip_info/__init__.py +33 -0
  105. gcore/resources/waap/{ip_info.py → ip_info/ip_info.py} +149 -235
  106. gcore/resources/waap/ip_info/metrics.py +203 -0
  107. gcore/resources/waap/waap.py +40 -8
  108. gcore/types/cloud/__init__.py +2 -4
  109. gcore/types/cloud/audit_log_list_params.py +2 -1
  110. gcore/types/cloud/baremetal/image_list_params.py +3 -2
  111. gcore/types/cloud/baremetal/server_create_params.py +8 -6
  112. gcore/types/cloud/baremetal/server_list_params.py +3 -2
  113. gcore/types/cloud/baremetal/server_rebuild_params.py +2 -0
  114. gcore/types/cloud/cost_report_get_aggregated_monthly_params.py +35 -31
  115. gcore/types/cloud/cost_report_get_aggregated_params.py +26 -25
  116. gcore/types/cloud/cost_report_get_detailed_params.py +26 -25
  117. gcore/types/cloud/ddos_profile.py +13 -7
  118. gcore/types/cloud/ddos_profile_field.py +21 -8
  119. gcore/types/cloud/ddos_profile_option_list.py +7 -6
  120. gcore/types/cloud/ddos_profile_status.py +2 -2
  121. gcore/types/cloud/ddos_profile_template.py +7 -3
  122. gcore/types/cloud/ddos_profile_template_field.py +12 -3
  123. gcore/types/cloud/file_share.py +2 -2
  124. gcore/types/cloud/file_share_create_params.py +12 -6
  125. gcore/types/cloud/floating_ip_list_params.py +3 -2
  126. gcore/types/cloud/gpu_baremetal_cluster.py +101 -74
  127. gcore/types/cloud/gpu_baremetal_cluster_create_params.py +76 -93
  128. gcore/types/cloud/gpu_baremetal_cluster_delete_params.py +17 -10
  129. gcore/types/cloud/gpu_baremetal_cluster_list_params.py +14 -3
  130. gcore/types/cloud/gpu_baremetal_cluster_rebuild_params.py +4 -2
  131. gcore/types/cloud/gpu_baremetal_clusters/__init__.py +6 -0
  132. gcore/types/cloud/gpu_baremetal_clusters/gpu_baremetal_cluster_server.py +74 -0
  133. gcore/types/cloud/{gpu_baremetal_cluster_server.py → gpu_baremetal_clusters/gpu_baremetal_cluster_server_v1.py} +10 -10
  134. gcore/types/cloud/gpu_baremetal_clusters/gpu_baremetal_cluster_server_v1_list.py +16 -0
  135. gcore/types/cloud/{gpu_baremetal_flavor.py → gpu_baremetal_clusters/gpu_baremetal_flavor.py} +1 -1
  136. gcore/types/cloud/{gpu_baremetal_flavor_list.py → gpu_baremetal_clusters/gpu_baremetal_flavor_list.py} +1 -1
  137. gcore/types/cloud/gpu_baremetal_clusters/server_list_params.py +75 -0
  138. gcore/types/cloud/health_monitor.py +6 -0
  139. gcore/types/cloud/inference/__init__.py +0 -5
  140. gcore/types/cloud/inference/applications/__init__.py +12 -0
  141. gcore/types/cloud/inference/applications/deployment_create_params.py +68 -0
  142. gcore/types/cloud/inference/applications/deployment_patch_params.py +62 -0
  143. gcore/types/cloud/inference/applications/inference_application_deployment.py +111 -0
  144. gcore/types/cloud/inference/applications/inference_application_deployment_list.py +16 -0
  145. gcore/types/cloud/inference/applications/inference_application_template.py +94 -0
  146. gcore/types/cloud/inference/applications/inference_application_template_list.py +16 -0
  147. gcore/types/cloud/inference/deployment_create_params.py +7 -6
  148. gcore/types/cloud/inference/deployment_update_params.py +7 -6
  149. gcore/types/cloud/instance_assign_security_group_params.py +4 -2
  150. gcore/types/cloud/instance_list_params.py +3 -2
  151. gcore/types/cloud/instance_unassign_security_group_params.py +4 -2
  152. gcore/types/cloud/instances/image_list_params.py +3 -2
  153. gcore/types/cloud/k8s/__init__.py +13 -0
  154. gcore/types/cloud/k8s/cluster_create_params.py +299 -0
  155. gcore/types/cloud/k8s/cluster_delete_params.py +16 -0
  156. gcore/types/cloud/k8s/cluster_update_params.py +203 -0
  157. gcore/types/cloud/k8s/cluster_upgrade_params.py +16 -0
  158. gcore/types/cloud/k8s/clusters/__init__.py +10 -0
  159. gcore/types/cloud/k8s/clusters/k8s_cluster_pool.py +66 -0
  160. gcore/types/cloud/k8s/clusters/k8s_cluster_pool_list.py +16 -0
  161. gcore/types/cloud/k8s/clusters/node_list_params.py +16 -0
  162. gcore/types/cloud/k8s/clusters/pool_create_params.py +53 -0
  163. gcore/types/cloud/k8s/clusters/pool_resize_params.py +18 -0
  164. gcore/types/cloud/k8s/clusters/pool_update_params.py +34 -0
  165. gcore/types/{waap/domains/analytics → cloud/k8s/clusters/pools}/__init__.py +1 -1
  166. gcore/types/cloud/k8s/clusters/pools/node_list_params.py +18 -0
  167. gcore/types/cloud/k8s/flavor_list_params.py +19 -0
  168. gcore/types/cloud/k8s/k8s_cluster.py +209 -0
  169. gcore/types/cloud/k8s/k8s_cluster_certificate.py +13 -0
  170. gcore/types/cloud/k8s/k8s_cluster_kubeconfig.py +19 -0
  171. gcore/types/cloud/k8s/k8s_cluster_list.py +16 -0
  172. gcore/types/cloud/k8s_cluster_version.py +10 -0
  173. gcore/types/cloud/{gpu_baremetal_cluster_server_list.py → k8s_cluster_version_list.py} +4 -4
  174. gcore/types/cloud/load_balancer_create_params.py +31 -7
  175. gcore/types/cloud/load_balancer_list_params.py +3 -2
  176. gcore/types/cloud/load_balancers/l7_policies/rule_create_params.py +3 -2
  177. gcore/types/cloud/load_balancers/l7_policies/rule_replace_params.py +3 -2
  178. gcore/types/cloud/load_balancers/l7_policy_create_params.py +3 -2
  179. gcore/types/cloud/load_balancers/l7_policy_replace_params.py +3 -2
  180. gcore/types/cloud/load_balancers/listener_create_params.py +4 -3
  181. gcore/types/cloud/load_balancers/listener_update_params.py +5 -3
  182. gcore/types/cloud/load_balancers/pool_create_params.py +27 -4
  183. gcore/types/cloud/load_balancers/pool_update_params.py +27 -4
  184. gcore/types/cloud/load_balancers/pools/health_monitor_create_params.py +7 -2
  185. gcore/types/cloud/load_balancers/pools/member_add_params.py +20 -2
  186. gcore/types/cloud/member.py +19 -1
  187. gcore/types/cloud/network_list_params.py +3 -2
  188. gcore/types/cloud/networks/subnet_create_params.py +3 -2
  189. gcore/types/cloud/networks/subnet_list_params.py +3 -2
  190. gcore/types/cloud/networks/subnet_update_params.py +3 -2
  191. gcore/types/cloud/project.py +9 -9
  192. gcore/types/cloud/region.py +0 -3
  193. gcore/types/cloud/reserved_fixed_ips/vip_replace_connected_ports_params.py +3 -2
  194. gcore/types/cloud/reserved_fixed_ips/vip_update_connected_ports_params.py +3 -2
  195. gcore/types/cloud/security_group_create_params.py +4 -2
  196. gcore/types/cloud/security_group_list_params.py +3 -2
  197. gcore/types/cloud/task_id_list.py +8 -1
  198. gcore/types/cloud/task_list_params.py +23 -23
  199. gcore/types/cloud/usage_report_get_params.py +26 -25
  200. gcore/types/cloud/users/role_assignment.py +2 -1
  201. gcore/types/cloud/users/role_assignment_create_params.py +4 -2
  202. gcore/types/cloud/users/role_assignment_update_params.py +4 -2
  203. gcore/types/cloud/volume_list_params.py +3 -2
  204. gcore/types/dns/__init__.py +31 -0
  205. gcore/types/dns/dns_get_account_overview_response.py +21 -0
  206. gcore/types/dns/dns_label_name.py +13 -0
  207. gcore/types/dns/dns_location_translations.py +11 -0
  208. gcore/types/dns/dns_lookup_params.py +15 -0
  209. gcore/types/dns/dns_lookup_response.py +21 -0
  210. gcore/types/dns/dns_name_server.py +17 -0
  211. gcore/types/dns/location_list_continents_response.py +10 -0
  212. gcore/types/dns/location_list_countries_response.py +10 -0
  213. gcore/types/dns/location_list_regions_response.py +10 -0
  214. gcore/types/dns/location_list_response.py +16 -0
  215. gcore/types/dns/metric_list_params.py +24 -0
  216. gcore/types/dns/metric_list_response.py +7 -0
  217. gcore/types/dns/picker_list_response.py +10 -0
  218. gcore/types/dns/pickers/__init__.py +5 -0
  219. gcore/types/dns/pickers/preset_list_response.py +10 -0
  220. gcore/types/dns/zone_check_delegation_status_response.py +20 -0
  221. gcore/types/dns/zone_create_params.py +59 -0
  222. gcore/types/dns/zone_create_response.py +13 -0
  223. gcore/types/dns/zone_export_response.py +11 -0
  224. gcore/types/dns/zone_get_response.py +106 -0
  225. gcore/types/dns/zone_get_statistics_params.py +43 -0
  226. gcore/types/dns/zone_get_statistics_response.py +19 -0
  227. gcore/types/dns/zone_import_params.py +32 -0
  228. gcore/types/dns/zone_import_response.py +26 -0
  229. gcore/types/dns/zone_list_params.py +57 -0
  230. gcore/types/dns/zone_list_response.py +105 -0
  231. gcore/types/dns/zone_replace_params.py +61 -0
  232. gcore/types/dns/zones/__init__.py +15 -0
  233. gcore/types/dns/zones/dns_failover_log.py +19 -0
  234. gcore/types/dns/zones/dns_output_rrset.py +123 -0
  235. gcore/types/dns/zones/dnssec_get_response.py +38 -0
  236. gcore/types/dns/zones/dnssec_update_params.py +11 -0
  237. gcore/types/dns/zones/dnssec_update_response.py +38 -0
  238. gcore/types/dns/zones/rrset_create_params.py +82 -0
  239. gcore/types/dns/zones/rrset_get_failover_logs_params.py +21 -0
  240. gcore/types/dns/zones/rrset_get_failover_logs_response.py +15 -0
  241. gcore/types/dns/zones/rrset_list_params.py +21 -0
  242. gcore/types/dns/zones/rrset_list_response.py +14 -0
  243. gcore/types/dns/zones/rrset_replace_params.py +82 -0
  244. gcore/types/security/__init__.py +1 -1
  245. gcore/types/security/{bgp_announce_change_params.py → bgp_announce_toggle_params.py} +2 -2
  246. gcore/types/security/client_profile.py +1 -1
  247. gcore/types/security/profile_create_params.py +2 -2
  248. gcore/types/security/profile_recreate_params.py +2 -2
  249. gcore/types/security/profile_replace_params.py +2 -2
  250. gcore/types/storage/__init__.py +21 -0
  251. gcore/types/storage/bucket.py +15 -0
  252. gcore/types/storage/bucket_list_params.py +15 -0
  253. gcore/types/storage/buckets/__init__.py +9 -0
  254. gcore/types/storage/buckets/bucket_cors.py +18 -0
  255. gcore/types/storage/buckets/bucket_policy.py +7 -0
  256. gcore/types/storage/buckets/cor_create_params.py +17 -0
  257. gcore/types/storage/buckets/lifecycle_create_params.py +18 -0
  258. gcore/types/storage/buckets/policy_get_response.py +7 -0
  259. gcore/types/storage/credential_recreate_params.py +36 -0
  260. gcore/types/storage/location.py +24 -0
  261. gcore/types/storage/location_list_params.py +13 -0
  262. gcore/types/storage/statistic_get_usage_aggregated_params.py +24 -0
  263. gcore/types/storage/statistic_get_usage_series_params.py +38 -0
  264. gcore/types/storage/statistic_get_usage_series_response.py +12 -0
  265. gcore/types/storage/storage.py +101 -0
  266. gcore/types/storage/storage_create_params.py +44 -0
  267. gcore/types/storage/storage_list_params.py +39 -0
  268. gcore/types/storage/storage_restore_params.py +11 -0
  269. gcore/types/storage/storage_update_params.py +18 -0
  270. gcore/types/storage/usage_series.py +201 -0
  271. gcore/types/storage/usage_total.py +54 -0
  272. gcore/types/streaming/__init__.py +0 -4
  273. gcore/types/streaming/ai_contentmoderation_hardnudity.py +1 -1
  274. gcore/types/streaming/ai_contentmoderation_nsfw.py +1 -1
  275. gcore/types/streaming/ai_contentmoderation_softnudity.py +1 -1
  276. gcore/types/streaming/ai_contentmoderation_sport.py +1 -1
  277. gcore/types/streaming/ai_task.py +1 -5
  278. gcore/types/streaming/ai_task_create_params.py +2 -2
  279. gcore/types/streaming/ai_task_get_response.py +0 -46
  280. gcore/types/streaming/clip.py +2 -1
  281. gcore/types/streaming/create_video_param.py +13 -12
  282. gcore/types/streaming/max_stream_series.py +5 -5
  283. gcore/types/streaming/playlist.py +1 -1
  284. gcore/types/streaming/playlist_create_params.py +1 -1
  285. gcore/types/streaming/playlist_update_params.py +1 -1
  286. gcore/types/streaming/playlist_video.py +13 -12
  287. gcore/types/streaming/storage_series.py +5 -5
  288. gcore/types/streaming/stream.py +86 -49
  289. gcore/types/streaming/stream_create_clip_params.py +2 -1
  290. gcore/types/streaming/stream_create_params.py +9 -23
  291. gcore/types/streaming/stream_series.py +5 -5
  292. gcore/types/streaming/stream_update_params.py +9 -23
  293. gcore/types/streaming/video.py +53 -42
  294. gcore/types/streaming/video_update_params.py +13 -12
  295. gcore/types/streaming/vod_statistics_series.py +5 -5
  296. gcore/types/streaming/vod_total_stream_duration_series.py +3 -3
  297. gcore/types/waap/__init__.py +6 -54
  298. gcore/types/waap/custom_page_set_create_params.py +121 -14
  299. gcore/types/waap/custom_page_set_preview_params.py +11 -4
  300. gcore/types/waap/custom_page_set_update_params.py +122 -15
  301. gcore/types/waap/domain_list_params.py +2 -4
  302. gcore/types/waap/domain_update_params.py +1 -1
  303. gcore/types/waap/domains/__init__.py +28 -18
  304. gcore/types/waap/domains/advanced_rule_create_params.py +7 -4
  305. gcore/types/waap/domains/advanced_rule_list_params.py +1 -3
  306. gcore/types/waap/domains/advanced_rule_update_params.py +6 -3
  307. gcore/types/waap/domains/{api_discovery/scan_result_list_params.py → api_discovery_list_scan_results_params.py} +2 -2
  308. gcore/types/waap/domains/api_path_create_params.py +4 -3
  309. gcore/types/waap/domains/{api_path_group_list_response.py → api_path_group_list.py} +2 -2
  310. gcore/types/waap/domains/api_path_list_params.py +3 -1
  311. gcore/types/waap/domains/api_path_update_params.py +5 -4
  312. gcore/types/waap/domains/custom_rule_create_params.py +13 -14
  313. gcore/types/waap/domains/custom_rule_list_params.py +1 -3
  314. gcore/types/waap/domains/custom_rule_update_params.py +12 -13
  315. gcore/types/waap/domains/firewall_rule_create_params.py +3 -2
  316. gcore/types/waap/domains/firewall_rule_update_params.py +2 -1
  317. gcore/types/waap/domains/insight_list_params.py +19 -7
  318. gcore/types/waap/domains/insight_replace_params.py +3 -5
  319. gcore/types/waap/domains/insight_silence_list_params.py +17 -6
  320. gcore/types/waap/domains/setting_update_params.py +3 -2
  321. gcore/types/waap/domains/{analytics_list_ddos_attacks_params.py → statistic_get_ddos_attacks_params.py} +2 -2
  322. gcore/types/waap/domains/statistic_get_ddos_info_params.py +28 -0
  323. gcore/types/waap/domains/statistic_get_events_aggregated_params.py +33 -0
  324. gcore/types/waap/domains/statistic_get_requests_series_params.py +74 -0
  325. gcore/types/waap/domains/statistic_get_traffic_series_params.py +22 -0
  326. gcore/types/waap/domains/statistic_get_traffic_series_response.py +10 -0
  327. gcore/types/waap/{waap_advanced_rule.py → domains/waap_advanced_rule.py} +4 -3
  328. gcore/types/waap/domains/{api_discovery_get_settings_response.py → waap_api_discovery_settings.py} +2 -2
  329. gcore/types/waap/domains/{api_path_get_response.py → waap_api_path.py} +6 -6
  330. gcore/types/waap/domains/{api_discovery/scan_result_get_response.py → waap_api_scan_result.py} +5 -5
  331. gcore/types/waap/{waap_blocked_statistics.py → domains/waap_blocked_statistics.py} +1 -1
  332. gcore/types/waap/{waap_count_statistics.py → domains/waap_count_statistics.py} +1 -1
  333. gcore/types/waap/{waap_custom_rule.py → domains/waap_custom_rule.py} +5 -8
  334. gcore/types/waap/{waap_ddos_attack.py → domains/waap_ddos_attack.py} +1 -1
  335. gcore/types/waap/{waap_ddos_info.py → domains/waap_ddos_info.py} +1 -1
  336. gcore/types/waap/{waap_event_statistics.py → domains/waap_event_statistics.py} +1 -1
  337. gcore/types/waap/{waap_firewall_rule.py → domains/waap_firewall_rule.py} +4 -3
  338. gcore/types/waap/{waap_insight.py → domains/waap_insight.py} +4 -4
  339. gcore/types/waap/{waap_insight_silence.py → domains/waap_insight_silence.py} +1 -1
  340. gcore/types/waap/domains/waap_request_details.py +186 -0
  341. gcore/types/waap/{waap_request_summary.py → domains/waap_request_summary.py} +1 -1
  342. gcore/types/waap/domains/{api_discovery_scan_openapi_response.py → waap_task_id.py} +2 -2
  343. gcore/types/waap/{waap_traffic_metrics.py → domains/waap_traffic_metrics.py} +1 -1
  344. gcore/types/waap/insight_list_types_params.py +28 -0
  345. gcore/types/waap/ip_info/__init__.py +6 -0
  346. gcore/types/waap/{ip_info_get_counts_params.py → ip_info/metric_list_params.py} +2 -2
  347. gcore/types/waap/{waap_ip_info_counts.py → ip_info/waap_ip_info_counts.py} +1 -1
  348. gcore/types/waap/{ip_info_get_params.py → ip_info_get_ip_info_params.py} +2 -2
  349. gcore/types/waap/{waap_ip_info.py → ip_info_get_ip_info_response.py} +2 -2
  350. gcore/types/waap/ip_info_get_top_urls_response.py +12 -3
  351. gcore/types/waap/{ip_info_get_top_sessions_params.py → ip_info_get_top_user_sessions_params.py} +2 -2
  352. gcore/types/waap/{ip_info_get_top_sessions_response.py → ip_info_get_top_user_sessions_response.py} +2 -2
  353. gcore/types/waap/waap_custom_page_set.py +113 -13
  354. gcore/types/waap/waap_detailed_domain.py +2 -2
  355. gcore/types/waap/waap_insight_type.py +33 -0
  356. gcore/types/waap/waap_ip_ddos_info_model.py +3 -3
  357. gcore/types/waap/waap_rule_set.py +26 -3
  358. gcore/types/waap/waap_summary_domain.py +2 -2
  359. {gcore-0.9.0.dist-info → gcore-0.11.0.dist-info}/METADATA +7 -2
  360. {gcore-0.9.0.dist-info → gcore-0.11.0.dist-info}/RECORD +362 -281
  361. gcore/resources/waap/domains/analytics/__init__.py +0 -33
  362. gcore/resources/waap/domains/analytics/analytics.py +0 -676
  363. gcore/resources/waap/domains/analytics/requests.py +0 -378
  364. gcore/resources/waap/domains/api_discovery/__init__.py +0 -33
  365. gcore/resources/waap/domains/api_discovery/scan_results.py +0 -352
  366. gcore/resources/waap/domains/policies.py +0 -173
  367. gcore/types/cloud/inference/inference_model.py +0 -65
  368. gcore/types/cloud/inference/inference_registry_credentials_create.py +0 -22
  369. gcore/types/cloud/inference/model_list_params.py +0 -21
  370. gcore/types/streaming/ai_contentmoderation_casm.py +0 -39
  371. gcore/types/streaming/ai_contentmoderation_weapon.py +0 -39
  372. gcore/types/streaming/meet_series.py +0 -23
  373. gcore/types/streaming/statistic_get_meet_series_params.py +0 -20
  374. gcore/types/waap/domains/analytics/request_list_params.py +0 -53
  375. gcore/types/waap/domains/analytics_get_event_statistics_params.py +0 -34
  376. gcore/types/waap/domains/analytics_list_ddos_info_params.py +0 -31
  377. gcore/types/waap/domains/analytics_list_event_traffic_params.py +0 -26
  378. gcore/types/waap/domains/analytics_list_event_traffic_response.py +0 -10
  379. gcore/types/waap/domains/api_discovery/__init__.py +0 -7
  380. gcore/types/waap/domains/api_discovery/scan_result_list_response.py +0 -29
  381. gcore/types/waap/domains/api_discovery_update_settings_response.py +0 -36
  382. gcore/types/waap/domains/api_discovery_upload_openapi_response.py +0 -10
  383. gcore/types/waap/domains/api_path_create_response.py +0 -50
  384. gcore/types/waap/domains/api_path_list_response.py +0 -50
  385. gcore/types/waap/waap_block_csrf_page_data.py +0 -28
  386. gcore/types/waap/waap_block_csrf_page_data_param.py +0 -28
  387. gcore/types/waap/waap_block_page_data.py +0 -28
  388. gcore/types/waap/waap_block_page_data_param.py +0 -28
  389. gcore/types/waap/waap_captcha_page_data.py +0 -31
  390. gcore/types/waap/waap_captcha_page_data_param.py +0 -31
  391. gcore/types/waap/waap_common_tag.py +0 -16
  392. gcore/types/waap/waap_cookie_disabled_page_data.py +0 -18
  393. gcore/types/waap/waap_cookie_disabled_page_data_param.py +0 -18
  394. gcore/types/waap/waap_customer_rule_state.py +0 -7
  395. gcore/types/waap/waap_domain_policy.py +0 -29
  396. gcore/types/waap/waap_domain_status.py +0 -7
  397. gcore/types/waap/waap_handshake_page_data.py +0 -25
  398. gcore/types/waap/waap_handshake_page_data_param.py +0 -25
  399. gcore/types/waap/waap_insight_silence_sort_by.py +0 -9
  400. gcore/types/waap/waap_insight_sort_by.py +0 -20
  401. gcore/types/waap/waap_insight_status.py +0 -7
  402. gcore/types/waap/waap_javascript_disabled_page_data.py +0 -18
  403. gcore/types/waap/waap_javascript_disabled_page_data_param.py +0 -18
  404. gcore/types/waap/waap_network_details.py +0 -17
  405. gcore/types/waap/waap_page_type.py +0 -9
  406. gcore/types/waap/waap_paginated_custom_page_set.py +0 -22
  407. gcore/types/waap/waap_paginated_ddos_attack.py +0 -22
  408. gcore/types/waap/waap_paginated_ddos_info.py +0 -22
  409. gcore/types/waap/waap_paginated_request_summary.py +0 -22
  410. gcore/types/waap/waap_pattern_matched_tag.py +0 -37
  411. gcore/types/waap/waap_policy_action.py +0 -7
  412. gcore/types/waap/waap_request_details.py +0 -92
  413. gcore/types/waap/waap_request_organization.py +0 -13
  414. gcore/types/waap/waap_resolution.py +0 -7
  415. gcore/types/waap/waap_rule_action_type.py +0 -7
  416. gcore/types/waap/waap_top_url.py +0 -13
  417. gcore/types/waap/waap_traffic_type.py +0 -28
  418. gcore/types/waap/waap_user_agent_details.py +0 -40
  419. {gcore-0.9.0.dist-info → gcore-0.11.0.dist-info}/WHEEL +0 -0
  420. {gcore-0.9.0.dist-info → gcore-0.11.0.dist-info}/licenses/LICENSE +0 -0
@@ -1,676 +0,0 @@
1
- # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
-
3
- from __future__ import annotations
4
-
5
- from typing import List, Union, Optional
6
- from datetime import datetime
7
- from typing_extensions import Literal
8
-
9
- import httpx
10
-
11
- from .requests import (
12
- RequestsResource,
13
- AsyncRequestsResource,
14
- RequestsResourceWithRawResponse,
15
- AsyncRequestsResourceWithRawResponse,
16
- RequestsResourceWithStreamingResponse,
17
- AsyncRequestsResourceWithStreamingResponse,
18
- )
19
- from ....._types import NOT_GIVEN, Body, Query, Headers, NotGiven
20
- from ....._utils import maybe_transform, async_maybe_transform
21
- from ....._compat import cached_property
22
- from ....._resource import SyncAPIResource, AsyncAPIResource
23
- from ....._response import (
24
- to_raw_response_wrapper,
25
- to_streamed_response_wrapper,
26
- async_to_raw_response_wrapper,
27
- async_to_streamed_response_wrapper,
28
- )
29
- from .....pagination import SyncOffsetPage, AsyncOffsetPage
30
- from .....types.waap import WaapResolution
31
- from ....._base_client import AsyncPaginator, make_request_options
32
- from .....types.waap.domains import (
33
- analytics_list_ddos_info_params,
34
- analytics_list_ddos_attacks_params,
35
- analytics_list_event_traffic_params,
36
- analytics_get_event_statistics_params,
37
- )
38
- from .....types.waap.waap_ddos_info import WaapDDOSInfo
39
- from .....types.waap.waap_resolution import WaapResolution
40
- from .....types.waap.waap_ddos_attack import WaapDDOSAttack
41
- from .....types.waap.waap_event_statistics import WaapEventStatistics
42
- from .....types.waap.domains.analytics_list_event_traffic_response import AnalyticsListEventTrafficResponse
43
-
44
- __all__ = ["AnalyticsResource", "AsyncAnalyticsResource"]
45
-
46
-
47
- class AnalyticsResource(SyncAPIResource):
48
- @cached_property
49
- def requests(self) -> RequestsResource:
50
- return RequestsResource(self._client)
51
-
52
- @cached_property
53
- def with_raw_response(self) -> AnalyticsResourceWithRawResponse:
54
- """
55
- This property can be used as a prefix for any HTTP method call to return
56
- the raw response object instead of the parsed content.
57
-
58
- For more information, see https://www.github.com/G-Core/gcore-python#accessing-raw-response-data-eg-headers
59
- """
60
- return AnalyticsResourceWithRawResponse(self)
61
-
62
- @cached_property
63
- def with_streaming_response(self) -> AnalyticsResourceWithStreamingResponse:
64
- """
65
- An alternative to `.with_raw_response` that doesn't eagerly read the response body.
66
-
67
- For more information, see https://www.github.com/G-Core/gcore-python#with_streaming_response
68
- """
69
- return AnalyticsResourceWithStreamingResponse(self)
70
-
71
- def get_event_statistics(
72
- self,
73
- domain_id: int,
74
- *,
75
- start: Union[str, datetime],
76
- action: Optional[List[Literal["block", "captcha", "handshake", "monitor"]]] | NotGiven = NOT_GIVEN,
77
- end: Union[str, datetime] | NotGiven = NOT_GIVEN,
78
- ip: Optional[List[str]] | NotGiven = NOT_GIVEN,
79
- reference_id: Optional[List[str]] | NotGiven = NOT_GIVEN,
80
- result: Optional[List[Literal["passed", "blocked", "monitored", "allowed"]]] | NotGiven = NOT_GIVEN,
81
- # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
82
- # The extra values given here take precedence over values defined on the client or passed to this method.
83
- extra_headers: Headers | None = None,
84
- extra_query: Query | None = None,
85
- extra_body: Body | None = None,
86
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
87
- ) -> WaapEventStatistics:
88
- """
89
- Retrieve an domain's event statistics
90
-
91
- Args:
92
- domain_id: The domain ID
93
-
94
- start: Filter traffic starting from a specified date in ISO 8601 format
95
-
96
- action: A list of action names to filter on.
97
-
98
- end: Filter traffic up to a specified end date in ISO 8601 format. If not provided,
99
- defaults to the current date and time.
100
-
101
- ip: A list of IPs to filter event statistics.
102
-
103
- reference_id: A list of reference IDs to filter event statistics.
104
-
105
- result: A list of results to filter event statistics.
106
-
107
- extra_headers: Send extra headers
108
-
109
- extra_query: Add additional query parameters to the request
110
-
111
- extra_body: Add additional JSON properties to the request
112
-
113
- timeout: Override the client-level default timeout for this request, in seconds
114
- """
115
- return self._get(
116
- f"/waap/v1/domains/{domain_id}/stats",
117
- options=make_request_options(
118
- extra_headers=extra_headers,
119
- extra_query=extra_query,
120
- extra_body=extra_body,
121
- timeout=timeout,
122
- query=maybe_transform(
123
- {
124
- "start": start,
125
- "action": action,
126
- "end": end,
127
- "ip": ip,
128
- "reference_id": reference_id,
129
- "result": result,
130
- },
131
- analytics_get_event_statistics_params.AnalyticsGetEventStatisticsParams,
132
- ),
133
- ),
134
- cast_to=WaapEventStatistics,
135
- )
136
-
137
- def list_ddos_attacks(
138
- self,
139
- domain_id: int,
140
- *,
141
- end_time: Union[str, datetime, None] | NotGiven = NOT_GIVEN,
142
- limit: int | NotGiven = NOT_GIVEN,
143
- offset: int | NotGiven = NOT_GIVEN,
144
- ordering: Literal["start_time", "-start_time", "end_time", "-end_time"] | NotGiven = NOT_GIVEN,
145
- start_time: Union[str, datetime, None] | NotGiven = NOT_GIVEN,
146
- # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
147
- # The extra values given here take precedence over values defined on the client or passed to this method.
148
- extra_headers: Headers | None = None,
149
- extra_query: Query | None = None,
150
- extra_body: Body | None = None,
151
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
152
- ) -> SyncOffsetPage[WaapDDOSAttack]:
153
- """
154
- Retrieve a domain's DDoS attacks
155
-
156
- Args:
157
- domain_id: The domain ID
158
-
159
- end_time: Filter attacks up to a specified end date in ISO 8601 format
160
-
161
- limit: Number of items to return
162
-
163
- offset: Number of items to skip
164
-
165
- ordering: Sort the response by given field.
166
-
167
- start_time: Filter attacks starting from a specified date in ISO 8601 format
168
-
169
- extra_headers: Send extra headers
170
-
171
- extra_query: Add additional query parameters to the request
172
-
173
- extra_body: Add additional JSON properties to the request
174
-
175
- timeout: Override the client-level default timeout for this request, in seconds
176
- """
177
- return self._get_api_list(
178
- f"/waap/v1/domains/{domain_id}/ddos-attacks",
179
- page=SyncOffsetPage[WaapDDOSAttack],
180
- options=make_request_options(
181
- extra_headers=extra_headers,
182
- extra_query=extra_query,
183
- extra_body=extra_body,
184
- timeout=timeout,
185
- query=maybe_transform(
186
- {
187
- "end_time": end_time,
188
- "limit": limit,
189
- "offset": offset,
190
- "ordering": ordering,
191
- "start_time": start_time,
192
- },
193
- analytics_list_ddos_attacks_params.AnalyticsListDDOSAttacksParams,
194
- ),
195
- ),
196
- model=WaapDDOSAttack,
197
- )
198
-
199
- def list_ddos_info(
200
- self,
201
- domain_id: int,
202
- *,
203
- group_by: Literal["URL", "User-Agent", "IP"],
204
- start: Union[str, datetime],
205
- end: Union[str, datetime] | NotGiven = NOT_GIVEN,
206
- limit: int | NotGiven = NOT_GIVEN,
207
- offset: int | NotGiven = NOT_GIVEN,
208
- # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
209
- # The extra values given here take precedence over values defined on the client or passed to this method.
210
- extra_headers: Headers | None = None,
211
- extra_query: Query | None = None,
212
- extra_body: Body | None = None,
213
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
214
- ) -> SyncOffsetPage[WaapDDOSInfo]:
215
- """
216
- Returns the top DDoS counts grouped by URL, User-Agent or IP
217
-
218
- Args:
219
- domain_id: The domain ID
220
-
221
- group_by: The identity of the requests to group by
222
-
223
- start: Filter traffic starting from a specified date in ISO 8601 format
224
-
225
- end: Filter traffic up to a specified end date in ISO 8601 format. If not provided,
226
- defaults to the current date and time.
227
-
228
- limit: Number of items to return
229
-
230
- offset: Number of items to skip
231
-
232
- extra_headers: Send extra headers
233
-
234
- extra_query: Add additional query parameters to the request
235
-
236
- extra_body: Add additional JSON properties to the request
237
-
238
- timeout: Override the client-level default timeout for this request, in seconds
239
- """
240
- return self._get_api_list(
241
- f"/waap/v1/domains/{domain_id}/ddos-info",
242
- page=SyncOffsetPage[WaapDDOSInfo],
243
- options=make_request_options(
244
- extra_headers=extra_headers,
245
- extra_query=extra_query,
246
- extra_body=extra_body,
247
- timeout=timeout,
248
- query=maybe_transform(
249
- {
250
- "group_by": group_by,
251
- "start": start,
252
- "end": end,
253
- "limit": limit,
254
- "offset": offset,
255
- },
256
- analytics_list_ddos_info_params.AnalyticsListDDOSInfoParams,
257
- ),
258
- ),
259
- model=WaapDDOSInfo,
260
- )
261
-
262
- def list_event_traffic(
263
- self,
264
- domain_id: int,
265
- *,
266
- resolution: WaapResolution,
267
- start: Union[str, datetime],
268
- end: Union[str, datetime] | NotGiven = NOT_GIVEN,
269
- # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
270
- # The extra values given here take precedence over values defined on the client or passed to this method.
271
- extra_headers: Headers | None = None,
272
- extra_query: Query | None = None,
273
- extra_body: Body | None = None,
274
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
275
- ) -> AnalyticsListEventTrafficResponse:
276
- """
277
- Retrieves a comprehensive report on a domain's traffic statistics based on
278
- Clickhouse. The report includes details such as API requests, blocked events,
279
- error counts, and many more traffic-related metrics.
280
-
281
- Args:
282
- domain_id: The domain ID
283
-
284
- resolution: Specifies the granularity of the result data.
285
-
286
- start: Filter traffic starting from a specified date in ISO 8601 format
287
-
288
- end: Filter traffic up to a specified end date in ISO 8601 format. If not provided,
289
- defaults to the current date and time.
290
-
291
- extra_headers: Send extra headers
292
-
293
- extra_query: Add additional query parameters to the request
294
-
295
- extra_body: Add additional JSON properties to the request
296
-
297
- timeout: Override the client-level default timeout for this request, in seconds
298
- """
299
- return self._get(
300
- f"/waap/v1/domains/{domain_id}/traffic",
301
- options=make_request_options(
302
- extra_headers=extra_headers,
303
- extra_query=extra_query,
304
- extra_body=extra_body,
305
- timeout=timeout,
306
- query=maybe_transform(
307
- {
308
- "resolution": resolution,
309
- "start": start,
310
- "end": end,
311
- },
312
- analytics_list_event_traffic_params.AnalyticsListEventTrafficParams,
313
- ),
314
- ),
315
- cast_to=AnalyticsListEventTrafficResponse,
316
- )
317
-
318
-
319
- class AsyncAnalyticsResource(AsyncAPIResource):
320
- @cached_property
321
- def requests(self) -> AsyncRequestsResource:
322
- return AsyncRequestsResource(self._client)
323
-
324
- @cached_property
325
- def with_raw_response(self) -> AsyncAnalyticsResourceWithRawResponse:
326
- """
327
- This property can be used as a prefix for any HTTP method call to return
328
- the raw response object instead of the parsed content.
329
-
330
- For more information, see https://www.github.com/G-Core/gcore-python#accessing-raw-response-data-eg-headers
331
- """
332
- return AsyncAnalyticsResourceWithRawResponse(self)
333
-
334
- @cached_property
335
- def with_streaming_response(self) -> AsyncAnalyticsResourceWithStreamingResponse:
336
- """
337
- An alternative to `.with_raw_response` that doesn't eagerly read the response body.
338
-
339
- For more information, see https://www.github.com/G-Core/gcore-python#with_streaming_response
340
- """
341
- return AsyncAnalyticsResourceWithStreamingResponse(self)
342
-
343
- async def get_event_statistics(
344
- self,
345
- domain_id: int,
346
- *,
347
- start: Union[str, datetime],
348
- action: Optional[List[Literal["block", "captcha", "handshake", "monitor"]]] | NotGiven = NOT_GIVEN,
349
- end: Union[str, datetime] | NotGiven = NOT_GIVEN,
350
- ip: Optional[List[str]] | NotGiven = NOT_GIVEN,
351
- reference_id: Optional[List[str]] | NotGiven = NOT_GIVEN,
352
- result: Optional[List[Literal["passed", "blocked", "monitored", "allowed"]]] | NotGiven = NOT_GIVEN,
353
- # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
354
- # The extra values given here take precedence over values defined on the client or passed to this method.
355
- extra_headers: Headers | None = None,
356
- extra_query: Query | None = None,
357
- extra_body: Body | None = None,
358
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
359
- ) -> WaapEventStatistics:
360
- """
361
- Retrieve an domain's event statistics
362
-
363
- Args:
364
- domain_id: The domain ID
365
-
366
- start: Filter traffic starting from a specified date in ISO 8601 format
367
-
368
- action: A list of action names to filter on.
369
-
370
- end: Filter traffic up to a specified end date in ISO 8601 format. If not provided,
371
- defaults to the current date and time.
372
-
373
- ip: A list of IPs to filter event statistics.
374
-
375
- reference_id: A list of reference IDs to filter event statistics.
376
-
377
- result: A list of results to filter event statistics.
378
-
379
- extra_headers: Send extra headers
380
-
381
- extra_query: Add additional query parameters to the request
382
-
383
- extra_body: Add additional JSON properties to the request
384
-
385
- timeout: Override the client-level default timeout for this request, in seconds
386
- """
387
- return await self._get(
388
- f"/waap/v1/domains/{domain_id}/stats",
389
- options=make_request_options(
390
- extra_headers=extra_headers,
391
- extra_query=extra_query,
392
- extra_body=extra_body,
393
- timeout=timeout,
394
- query=await async_maybe_transform(
395
- {
396
- "start": start,
397
- "action": action,
398
- "end": end,
399
- "ip": ip,
400
- "reference_id": reference_id,
401
- "result": result,
402
- },
403
- analytics_get_event_statistics_params.AnalyticsGetEventStatisticsParams,
404
- ),
405
- ),
406
- cast_to=WaapEventStatistics,
407
- )
408
-
409
- def list_ddos_attacks(
410
- self,
411
- domain_id: int,
412
- *,
413
- end_time: Union[str, datetime, None] | NotGiven = NOT_GIVEN,
414
- limit: int | NotGiven = NOT_GIVEN,
415
- offset: int | NotGiven = NOT_GIVEN,
416
- ordering: Literal["start_time", "-start_time", "end_time", "-end_time"] | NotGiven = NOT_GIVEN,
417
- start_time: Union[str, datetime, None] | NotGiven = NOT_GIVEN,
418
- # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
419
- # The extra values given here take precedence over values defined on the client or passed to this method.
420
- extra_headers: Headers | None = None,
421
- extra_query: Query | None = None,
422
- extra_body: Body | None = None,
423
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
424
- ) -> AsyncPaginator[WaapDDOSAttack, AsyncOffsetPage[WaapDDOSAttack]]:
425
- """
426
- Retrieve a domain's DDoS attacks
427
-
428
- Args:
429
- domain_id: The domain ID
430
-
431
- end_time: Filter attacks up to a specified end date in ISO 8601 format
432
-
433
- limit: Number of items to return
434
-
435
- offset: Number of items to skip
436
-
437
- ordering: Sort the response by given field.
438
-
439
- start_time: Filter attacks starting from a specified date in ISO 8601 format
440
-
441
- extra_headers: Send extra headers
442
-
443
- extra_query: Add additional query parameters to the request
444
-
445
- extra_body: Add additional JSON properties to the request
446
-
447
- timeout: Override the client-level default timeout for this request, in seconds
448
- """
449
- return self._get_api_list(
450
- f"/waap/v1/domains/{domain_id}/ddos-attacks",
451
- page=AsyncOffsetPage[WaapDDOSAttack],
452
- options=make_request_options(
453
- extra_headers=extra_headers,
454
- extra_query=extra_query,
455
- extra_body=extra_body,
456
- timeout=timeout,
457
- query=maybe_transform(
458
- {
459
- "end_time": end_time,
460
- "limit": limit,
461
- "offset": offset,
462
- "ordering": ordering,
463
- "start_time": start_time,
464
- },
465
- analytics_list_ddos_attacks_params.AnalyticsListDDOSAttacksParams,
466
- ),
467
- ),
468
- model=WaapDDOSAttack,
469
- )
470
-
471
- def list_ddos_info(
472
- self,
473
- domain_id: int,
474
- *,
475
- group_by: Literal["URL", "User-Agent", "IP"],
476
- start: Union[str, datetime],
477
- end: Union[str, datetime] | NotGiven = NOT_GIVEN,
478
- limit: int | NotGiven = NOT_GIVEN,
479
- offset: int | NotGiven = NOT_GIVEN,
480
- # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
481
- # The extra values given here take precedence over values defined on the client or passed to this method.
482
- extra_headers: Headers | None = None,
483
- extra_query: Query | None = None,
484
- extra_body: Body | None = None,
485
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
486
- ) -> AsyncPaginator[WaapDDOSInfo, AsyncOffsetPage[WaapDDOSInfo]]:
487
- """
488
- Returns the top DDoS counts grouped by URL, User-Agent or IP
489
-
490
- Args:
491
- domain_id: The domain ID
492
-
493
- group_by: The identity of the requests to group by
494
-
495
- start: Filter traffic starting from a specified date in ISO 8601 format
496
-
497
- end: Filter traffic up to a specified end date in ISO 8601 format. If not provided,
498
- defaults to the current date and time.
499
-
500
- limit: Number of items to return
501
-
502
- offset: Number of items to skip
503
-
504
- extra_headers: Send extra headers
505
-
506
- extra_query: Add additional query parameters to the request
507
-
508
- extra_body: Add additional JSON properties to the request
509
-
510
- timeout: Override the client-level default timeout for this request, in seconds
511
- """
512
- return self._get_api_list(
513
- f"/waap/v1/domains/{domain_id}/ddos-info",
514
- page=AsyncOffsetPage[WaapDDOSInfo],
515
- options=make_request_options(
516
- extra_headers=extra_headers,
517
- extra_query=extra_query,
518
- extra_body=extra_body,
519
- timeout=timeout,
520
- query=maybe_transform(
521
- {
522
- "group_by": group_by,
523
- "start": start,
524
- "end": end,
525
- "limit": limit,
526
- "offset": offset,
527
- },
528
- analytics_list_ddos_info_params.AnalyticsListDDOSInfoParams,
529
- ),
530
- ),
531
- model=WaapDDOSInfo,
532
- )
533
-
534
- async def list_event_traffic(
535
- self,
536
- domain_id: int,
537
- *,
538
- resolution: WaapResolution,
539
- start: Union[str, datetime],
540
- end: Union[str, datetime] | NotGiven = NOT_GIVEN,
541
- # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
542
- # The extra values given here take precedence over values defined on the client or passed to this method.
543
- extra_headers: Headers | None = None,
544
- extra_query: Query | None = None,
545
- extra_body: Body | None = None,
546
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
547
- ) -> AnalyticsListEventTrafficResponse:
548
- """
549
- Retrieves a comprehensive report on a domain's traffic statistics based on
550
- Clickhouse. The report includes details such as API requests, blocked events,
551
- error counts, and many more traffic-related metrics.
552
-
553
- Args:
554
- domain_id: The domain ID
555
-
556
- resolution: Specifies the granularity of the result data.
557
-
558
- start: Filter traffic starting from a specified date in ISO 8601 format
559
-
560
- end: Filter traffic up to a specified end date in ISO 8601 format. If not provided,
561
- defaults to the current date and time.
562
-
563
- extra_headers: Send extra headers
564
-
565
- extra_query: Add additional query parameters to the request
566
-
567
- extra_body: Add additional JSON properties to the request
568
-
569
- timeout: Override the client-level default timeout for this request, in seconds
570
- """
571
- return await self._get(
572
- f"/waap/v1/domains/{domain_id}/traffic",
573
- options=make_request_options(
574
- extra_headers=extra_headers,
575
- extra_query=extra_query,
576
- extra_body=extra_body,
577
- timeout=timeout,
578
- query=await async_maybe_transform(
579
- {
580
- "resolution": resolution,
581
- "start": start,
582
- "end": end,
583
- },
584
- analytics_list_event_traffic_params.AnalyticsListEventTrafficParams,
585
- ),
586
- ),
587
- cast_to=AnalyticsListEventTrafficResponse,
588
- )
589
-
590
-
591
- class AnalyticsResourceWithRawResponse:
592
- def __init__(self, analytics: AnalyticsResource) -> None:
593
- self._analytics = analytics
594
-
595
- self.get_event_statistics = to_raw_response_wrapper(
596
- analytics.get_event_statistics,
597
- )
598
- self.list_ddos_attacks = to_raw_response_wrapper(
599
- analytics.list_ddos_attacks,
600
- )
601
- self.list_ddos_info = to_raw_response_wrapper(
602
- analytics.list_ddos_info,
603
- )
604
- self.list_event_traffic = to_raw_response_wrapper(
605
- analytics.list_event_traffic,
606
- )
607
-
608
- @cached_property
609
- def requests(self) -> RequestsResourceWithRawResponse:
610
- return RequestsResourceWithRawResponse(self._analytics.requests)
611
-
612
-
613
- class AsyncAnalyticsResourceWithRawResponse:
614
- def __init__(self, analytics: AsyncAnalyticsResource) -> None:
615
- self._analytics = analytics
616
-
617
- self.get_event_statistics = async_to_raw_response_wrapper(
618
- analytics.get_event_statistics,
619
- )
620
- self.list_ddos_attacks = async_to_raw_response_wrapper(
621
- analytics.list_ddos_attacks,
622
- )
623
- self.list_ddos_info = async_to_raw_response_wrapper(
624
- analytics.list_ddos_info,
625
- )
626
- self.list_event_traffic = async_to_raw_response_wrapper(
627
- analytics.list_event_traffic,
628
- )
629
-
630
- @cached_property
631
- def requests(self) -> AsyncRequestsResourceWithRawResponse:
632
- return AsyncRequestsResourceWithRawResponse(self._analytics.requests)
633
-
634
-
635
- class AnalyticsResourceWithStreamingResponse:
636
- def __init__(self, analytics: AnalyticsResource) -> None:
637
- self._analytics = analytics
638
-
639
- self.get_event_statistics = to_streamed_response_wrapper(
640
- analytics.get_event_statistics,
641
- )
642
- self.list_ddos_attacks = to_streamed_response_wrapper(
643
- analytics.list_ddos_attacks,
644
- )
645
- self.list_ddos_info = to_streamed_response_wrapper(
646
- analytics.list_ddos_info,
647
- )
648
- self.list_event_traffic = to_streamed_response_wrapper(
649
- analytics.list_event_traffic,
650
- )
651
-
652
- @cached_property
653
- def requests(self) -> RequestsResourceWithStreamingResponse:
654
- return RequestsResourceWithStreamingResponse(self._analytics.requests)
655
-
656
-
657
- class AsyncAnalyticsResourceWithStreamingResponse:
658
- def __init__(self, analytics: AsyncAnalyticsResource) -> None:
659
- self._analytics = analytics
660
-
661
- self.get_event_statistics = async_to_streamed_response_wrapper(
662
- analytics.get_event_statistics,
663
- )
664
- self.list_ddos_attacks = async_to_streamed_response_wrapper(
665
- analytics.list_ddos_attacks,
666
- )
667
- self.list_ddos_info = async_to_streamed_response_wrapper(
668
- analytics.list_ddos_info,
669
- )
670
- self.list_event_traffic = async_to_streamed_response_wrapper(
671
- analytics.list_event_traffic,
672
- )
673
-
674
- @cached_property
675
- def requests(self) -> AsyncRequestsResourceWithStreamingResponse:
676
- return AsyncRequestsResourceWithStreamingResponse(self._analytics.requests)