gcore 0.2.0__py3-none-any.whl → 0.3.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.
- gcore/_base_client.py +22 -2
- gcore/_models.py +2 -0
- gcore/_types.py +2 -0
- gcore/_version.py +1 -1
- gcore/resources/cloud/baremetal/flavors.py +2 -2
- gcore/resources/cloud/baremetal/images.py +2 -2
- gcore/resources/cloud/baremetal/servers.py +46 -52
- gcore/resources/cloud/floating_ips.py +4 -4
- gcore/resources/cloud/gpu_baremetal_clusters/gpu_baremetal_clusters.py +8 -8
- gcore/resources/cloud/gpu_baremetal_clusters/images.py +2 -2
- gcore/resources/cloud/gpu_baremetal_clusters/servers.py +4 -4
- gcore/resources/cloud/inference/deployments/deployments.py +6 -6
- gcore/resources/cloud/instances/flavors.py +2 -2
- gcore/resources/cloud/instances/images.py +2 -2
- gcore/resources/cloud/instances/instances.py +62 -70
- gcore/resources/cloud/instances/interfaces.py +4 -4
- gcore/resources/cloud/load_balancers/flavors.py +2 -2
- gcore/resources/cloud/load_balancers/l7_policies/l7_policies.py +20 -20
- gcore/resources/cloud/load_balancers/listeners.py +14 -14
- gcore/resources/cloud/load_balancers/load_balancers.py +28 -24
- gcore/resources/cloud/load_balancers/pools/members.py +6 -6
- gcore/resources/cloud/networks/networks.py +4 -4
- gcore/resources/cloud/networks/subnets.py +6 -6
- gcore/resources/cloud/registries/registries.py +6 -10
- gcore/resources/cloud/registries/users.py +4 -10
- gcore/resources/cloud/reserved_fixed_ips/reserved_fixed_ips.py +10 -10
- gcore/resources/cloud/security_groups/security_groups.py +2 -2
- gcore/resources/cloud/ssh_keys.py +2 -2
- gcore/resources/cloud/tasks.py +98 -90
- gcore/resources/cloud/users/role_assignments.py +4 -4
- gcore/resources/cloud/volumes.py +18 -18
- gcore/resources/waap/__init__.py +98 -0
- gcore/resources/waap/advanced_rules.py +135 -0
- gcore/resources/waap/clients.py +135 -0
- gcore/resources/waap/custom_page_sets.py +805 -0
- gcore/resources/waap/domains/__init__.py +140 -0
- gcore/resources/waap/domains/advanced_rules.py +876 -0
- gcore/resources/waap/domains/analytics/__init__.py +33 -0
- gcore/resources/waap/domains/analytics/analytics.py +676 -0
- gcore/resources/waap/domains/analytics/requests.py +378 -0
- gcore/resources/waap/domains/api_discovery/__init__.py +33 -0
- gcore/resources/waap/domains/api_discovery/api_discovery.py +530 -0
- gcore/resources/waap/domains/api_discovery/scan_results.py +352 -0
- gcore/resources/waap/domains/api_path_groups.py +163 -0
- gcore/resources/waap/domains/api_paths.py +771 -0
- gcore/resources/waap/domains/custom_rules.py +889 -0
- gcore/resources/waap/domains/domains.py +399 -0
- gcore/resources/waap/domains/firewall_rules.py +884 -0
- gcore/resources/waap/domains/insight_silences.py +689 -0
- gcore/resources/waap/domains/insights.py +425 -0
- gcore/resources/waap/domains/policies.py +173 -0
- gcore/resources/waap/domains/settings.py +5 -5
- gcore/resources/waap/ip_info.py +1017 -0
- gcore/resources/waap/organizations.py +217 -0
- gcore/resources/waap/statistics.py +225 -0
- gcore/resources/waap/tags.py +233 -0
- gcore/resources/waap/waap.py +289 -0
- gcore/types/cloud/allowed_address_pairs.py +2 -2
- gcore/types/cloud/baremetal/baremetal_server.py +1 -1
- gcore/types/cloud/baremetal/image_list_params.py +1 -1
- gcore/types/cloud/baremetal/server_create_params.py +9 -9
- gcore/types/cloud/baremetal/server_list_params.py +8 -8
- gcore/types/cloud/baremetal/server_rebuild_params.py +1 -1
- gcore/types/cloud/baremetal_flavor.py +3 -3
- gcore/types/cloud/container_probe_config.py +1 -1
- gcore/types/cloud/container_probe_config_create_param.py +1 -1
- gcore/types/cloud/container_scale_triggers.py +2 -2
- gcore/types/cloud/floating_ip_detailed.py +1 -1
- gcore/types/cloud/floating_ip_list_params.py +2 -2
- gcore/types/cloud/gpu_baremetal_cluster.py +1 -1
- gcore/types/cloud/gpu_baremetal_cluster_create_params.py +2 -2
- gcore/types/cloud/gpu_baremetal_cluster_delete_params.py +1 -1
- gcore/types/cloud/gpu_baremetal_cluster_rebuild_params.py +1 -1
- gcore/types/cloud/gpu_baremetal_cluster_server.py +1 -1
- gcore/types/cloud/gpu_baremetal_clusters/image_upload_params.py +1 -1
- gcore/types/cloud/gpu_baremetal_clusters/server_attach_interface_params.py +10 -10
- gcore/types/cloud/gpu_baremetal_flavor.py +3 -3
- gcore/types/cloud/image.py +1 -1
- gcore/types/cloud/inference/deployment_create_params.py +4 -4
- gcore/types/cloud/inference/deployment_update_params.py +6 -6
- gcore/types/cloud/inference/inference.py +2 -4
- gcore/types/cloud/instance.py +1 -1
- gcore/types/cloud/instance_create_params.py +8 -10
- gcore/types/cloud/instance_list_params.py +8 -8
- gcore/types/cloud/instances/flavor_list_suitable_params.py +4 -1
- gcore/types/cloud/instances/image_list_params.py +1 -1
- gcore/types/cloud/instances/instance_flavor.py +3 -3
- gcore/types/cloud/instances/interface_attach_params.py +10 -10
- gcore/types/cloud/load_balancer_create_params.py +17 -15
- gcore/types/cloud/load_balancer_flavor_detail.py +3 -3
- gcore/types/cloud/load_balancer_l7_policy.py +5 -5
- gcore/types/cloud/load_balancer_list_params.py +5 -5
- gcore/types/cloud/load_balancer_listener_detail.py +4 -4
- gcore/types/cloud/load_balancers/l7_policy_create_params.py +5 -5
- gcore/types/cloud/load_balancers/l7_policy_replace_params.py +5 -5
- gcore/types/cloud/load_balancers/listener_create_params.py +4 -4
- gcore/types/cloud/load_balancers/listener_update_params.py +3 -3
- gcore/types/cloud/load_balancers/pool_create_params.py +4 -4
- gcore/types/cloud/load_balancers/pool_update_params.py +4 -4
- gcore/types/cloud/load_balancers/pools/member_add_params.py +3 -3
- gcore/types/cloud/member.py +2 -2
- gcore/types/cloud/network.py +2 -2
- gcore/types/cloud/network_details.py +2 -2
- gcore/types/cloud/network_list_params.py +2 -2
- gcore/types/cloud/networks/subnet_create_params.py +1 -1
- gcore/types/cloud/networks/subnet_list_params.py +2 -2
- gcore/types/cloud/region.py +4 -4
- gcore/types/cloud/registries/user_create_multiple_params.py +3 -5
- gcore/types/cloud/registries/user_create_params.py +3 -5
- gcore/types/cloud/registry_create_params.py +3 -5
- gcore/types/cloud/reserved_fixed_ip_create_params.py +2 -2
- gcore/types/cloud/reserved_fixed_ip_list_params.py +3 -3
- gcore/types/cloud/security_group_list_params.py +1 -1
- gcore/types/cloud/session_persistence.py +1 -1
- gcore/types/cloud/ssh_key_created.py +3 -6
- gcore/types/cloud/task.py +1 -1
- gcore/types/cloud/task_list_params.py +49 -45
- gcore/types/cloud/users/role_assignment_create_params.py +1 -1
- gcore/types/cloud/users/role_assignment_update_params.py +1 -1
- gcore/types/cloud/volume_create_params.py +6 -6
- gcore/types/cloud/volume_list_params.py +3 -3
- gcore/types/waap/__init__.py +98 -2
- gcore/types/waap/client_me_response.py +34 -0
- gcore/types/waap/custom_page_set_create_params.py +35 -0
- gcore/types/waap/custom_page_set_list_params.py +25 -0
- gcore/types/waap/custom_page_set_preview_params.py +34 -0
- gcore/types/waap/custom_page_set_update_params.py +35 -0
- gcore/types/waap/domain_list_rule_sets_response.py +10 -0
- gcore/types/waap/domains/__init__.py +42 -0
- gcore/types/waap/domains/advanced_rule_create_params.py +80 -0
- gcore/types/waap/domains/advanced_rule_list_params.py +58 -0
- gcore/types/waap/domains/advanced_rule_update_params.py +83 -0
- gcore/types/waap/domains/analytics/__init__.py +5 -0
- gcore/types/waap/domains/analytics/request_list_params.py +53 -0
- gcore/types/waap/domains/analytics_get_event_statistics_params.py +34 -0
- gcore/types/waap/domains/analytics_list_ddos_attacks_params.py +28 -0
- gcore/types/waap/domains/analytics_list_ddos_info_params.py +31 -0
- gcore/types/waap/domains/analytics_list_event_traffic_params.py +26 -0
- gcore/types/waap/domains/analytics_list_event_traffic_response.py +10 -0
- gcore/types/waap/domains/api_discovery/__init__.py +7 -0
- gcore/types/waap/domains/api_discovery/scan_result_get_response.py +29 -0
- gcore/types/waap/domains/api_discovery/scan_result_list_params.py +41 -0
- gcore/types/waap/domains/api_discovery/scan_result_list_response.py +29 -0
- gcore/types/waap/domains/api_discovery_get_settings_response.py +36 -0
- gcore/types/waap/domains/api_discovery_scan_openapi_response.py +10 -0
- gcore/types/waap/domains/api_discovery_update_settings_params.py +34 -0
- gcore/types/waap/domains/api_discovery_update_settings_response.py +36 -0
- gcore/types/waap/domains/api_discovery_upload_openapi_params.py +19 -0
- gcore/types/waap/domains/api_discovery_upload_openapi_response.py +10 -0
- gcore/types/waap/domains/api_path_create_params.py +31 -0
- gcore/types/waap/domains/api_path_create_response.py +50 -0
- gcore/types/waap/domains/api_path_get_response.py +50 -0
- gcore/types/waap/domains/api_path_group_list_response.py +12 -0
- gcore/types/waap/domains/api_path_list_params.py +62 -0
- gcore/types/waap/domains/api_path_list_response.py +50 -0
- gcore/types/waap/domains/api_path_update_params.py +29 -0
- gcore/types/waap/domains/custom_rule_create_params.py +368 -0
- gcore/types/waap/domains/custom_rule_delete_multiple_params.py +13 -0
- gcore/types/waap/domains/custom_rule_list_params.py +35 -0
- gcore/types/waap/domains/custom_rule_update_params.py +371 -0
- gcore/types/waap/domains/firewall_rule_create_params.py +75 -0
- gcore/types/waap/domains/firewall_rule_delete_multiple_params.py +13 -0
- gcore/types/waap/domains/firewall_rule_list_params.py +33 -0
- gcore/types/waap/domains/firewall_rule_update_params.py +78 -0
- gcore/types/waap/domains/insight_list_params.py +34 -0
- gcore/types/waap/domains/insight_replace_params.py +17 -0
- gcore/types/waap/domains/insight_silence_create_params.py +28 -0
- gcore/types/waap/domains/insight_silence_list_params.py +33 -0
- gcore/types/waap/domains/insight_silence_update_params.py +28 -0
- gcore/types/waap/domains/setting_update_params.py +7 -0
- gcore/types/waap/ip_info_get_attack_time_series_params.py +12 -0
- gcore/types/waap/ip_info_get_attack_time_series_response.py +10 -0
- gcore/types/waap/ip_info_get_blocked_requests_params.py +15 -0
- gcore/types/waap/ip_info_get_blocked_requests_response.py +10 -0
- gcore/types/waap/ip_info_get_counts_params.py +19 -0
- gcore/types/waap/ip_info_get_ddos_attack_series_params.py +12 -0
- gcore/types/waap/ip_info_get_params.py +12 -0
- gcore/types/waap/ip_info_get_top_sessions_params.py +15 -0
- gcore/types/waap/ip_info_get_top_sessions_response.py +10 -0
- gcore/types/waap/ip_info_get_top_urls_params.py +15 -0
- gcore/types/waap/ip_info_get_top_urls_response.py +10 -0
- gcore/types/waap/ip_info_get_top_user_agents_params.py +15 -0
- gcore/types/waap/ip_info_get_top_user_agents_response.py +10 -0
- gcore/types/waap/ip_info_list_attacked_countries_params.py +12 -0
- gcore/types/waap/ip_info_list_attacked_countries_response.py +10 -0
- gcore/types/waap/organization_list_params.py +22 -0
- gcore/types/waap/statistic_get_usage_series_params.py +25 -0
- gcore/types/waap/tag_list_params.py +28 -0
- gcore/types/waap/waap_advanced_rule.py +83 -0
- gcore/types/waap/waap_advanced_rule_descriptor.py +49 -0
- gcore/types/waap/waap_advanced_rule_descriptor_list.py +15 -0
- gcore/types/waap/waap_block_csrf_page_data.py +28 -0
- gcore/types/waap/waap_block_csrf_page_data_param.py +28 -0
- gcore/types/waap/waap_block_page_data.py +28 -0
- gcore/types/waap/waap_block_page_data_param.py +28 -0
- gcore/types/waap/waap_blocked_statistics.py +36 -0
- gcore/types/waap/waap_captcha_page_data.py +31 -0
- gcore/types/waap/waap_captcha_page_data_param.py +31 -0
- gcore/types/waap/waap_common_tag.py +16 -0
- gcore/types/waap/waap_cookie_disabled_page_data.py +18 -0
- gcore/types/waap/waap_cookie_disabled_page_data_param.py +18 -0
- gcore/types/waap/waap_count_statistics.py +36 -0
- gcore/types/waap/waap_custom_page_preview.py +10 -0
- gcore/types/waap/waap_custom_page_set.py +36 -0
- gcore/types/waap/waap_custom_rule.py +373 -0
- gcore/types/waap/waap_customer_rule_state.py +7 -0
- gcore/types/waap/waap_ddos_attack.py +16 -0
- gcore/types/waap/waap_ddos_info.py +17 -0
- gcore/types/waap/{waap_api_urls.py → waap_domain_api_settings.py} +9 -2
- gcore/types/waap/waap_domain_policy.py +29 -0
- gcore/types/waap/{waap_domain_settings.py → waap_domain_settings_model.py} +4 -4
- gcore/types/waap/waap_event_statistics.py +15 -0
- gcore/types/waap/waap_firewall_rule.py +78 -0
- gcore/types/waap/waap_get_account_overview_response.py +34 -0
- gcore/types/waap/waap_handshake_page_data.py +25 -0
- gcore/types/waap/waap_handshake_page_data_param.py +25 -0
- gcore/types/waap/waap_insight.py +38 -0
- gcore/types/waap/waap_insight_silence.py +28 -0
- gcore/types/waap/waap_insight_silence_sort_by.py +9 -0
- gcore/types/waap/waap_insight_sort_by.py +20 -0
- gcore/types/waap/waap_insight_status.py +7 -0
- gcore/types/waap/waap_ip_country_attack.py +16 -0
- gcore/types/waap/waap_ip_ddos_info_model.py +23 -0
- gcore/types/waap/waap_ip_info.py +57 -0
- gcore/types/waap/waap_ip_info_counts.py +16 -0
- gcore/types/waap/waap_javascript_disabled_page_data.py +18 -0
- gcore/types/waap/waap_javascript_disabled_page_data_param.py +18 -0
- gcore/types/waap/waap_network_details.py +17 -0
- gcore/types/waap/waap_organization.py +13 -0
- gcore/types/waap/waap_page_type.py +9 -0
- gcore/types/waap/waap_paginated_custom_page_set.py +22 -0
- gcore/types/waap/waap_paginated_ddos_attack.py +22 -0
- gcore/types/waap/waap_paginated_ddos_info.py +22 -0
- gcore/types/waap/waap_paginated_request_summary.py +22 -0
- gcore/types/waap/waap_pattern_matched_tag.py +37 -0
- gcore/types/waap/waap_policy_action.py +7 -0
- gcore/types/waap/waap_policy_mode.py +10 -0
- gcore/types/waap/waap_request_details.py +92 -0
- gcore/types/waap/waap_request_organization.py +13 -0
- gcore/types/waap/waap_request_summary.py +59 -0
- gcore/types/waap/waap_resolution.py +7 -0
- gcore/types/waap/waap_rule_action_type.py +7 -0
- gcore/types/waap/waap_rule_blocked_requests.py +16 -0
- gcore/types/waap/waap_rule_set.py +41 -0
- gcore/types/waap/waap_statistic_item.py +18 -0
- gcore/types/waap/waap_statistics_series.py +16 -0
- gcore/types/waap/waap_tag.py +16 -0
- gcore/types/waap/waap_time_series_attack.py +23 -0
- gcore/types/waap/waap_top_session.py +24 -0
- gcore/types/waap/waap_top_url.py +13 -0
- gcore/types/waap/waap_top_user_agent.py +13 -0
- gcore/types/waap/waap_traffic_metrics.py +68 -0
- gcore/types/waap/waap_traffic_type.py +28 -0
- gcore/types/waap/waap_user_agent_details.py +40 -0
- {gcore-0.2.0.dist-info → gcore-0.3.0.dist-info}/METADATA +1 -1
- {gcore-0.2.0.dist-info → gcore-0.3.0.dist-info}/RECORD +258 -109
- {gcore-0.2.0.dist-info → gcore-0.3.0.dist-info}/WHEEL +0 -0
- {gcore-0.2.0.dist-info → gcore-0.3.0.dist-info}/licenses/LICENSE +0 -0
|
@@ -0,0 +1,1017 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
import httpx
|
|
6
|
+
|
|
7
|
+
from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven
|
|
8
|
+
from ..._utils import maybe_transform, async_maybe_transform
|
|
9
|
+
from ..._compat import cached_property
|
|
10
|
+
from ..._resource import SyncAPIResource, AsyncAPIResource
|
|
11
|
+
from ..._response import (
|
|
12
|
+
to_raw_response_wrapper,
|
|
13
|
+
to_streamed_response_wrapper,
|
|
14
|
+
async_to_raw_response_wrapper,
|
|
15
|
+
async_to_streamed_response_wrapper,
|
|
16
|
+
)
|
|
17
|
+
from ...types.waap import (
|
|
18
|
+
ip_info_get_params,
|
|
19
|
+
ip_info_get_counts_params,
|
|
20
|
+
ip_info_get_top_urls_params,
|
|
21
|
+
ip_info_get_top_sessions_params,
|
|
22
|
+
ip_info_get_top_user_agents_params,
|
|
23
|
+
ip_info_get_blocked_requests_params,
|
|
24
|
+
ip_info_get_attack_time_series_params,
|
|
25
|
+
ip_info_get_ddos_attack_series_params,
|
|
26
|
+
ip_info_list_attacked_countries_params,
|
|
27
|
+
)
|
|
28
|
+
from ..._base_client import make_request_options
|
|
29
|
+
from ...types.waap.waap_ip_info import WaapIPInfo
|
|
30
|
+
from ...types.waap.waap_ip_info_counts import WaapIPInfoCounts
|
|
31
|
+
from ...types.waap.waap_ip_ddos_info_model import WaapIPDDOSInfoModel
|
|
32
|
+
from ...types.waap.ip_info_get_top_urls_response import IPInfoGetTopURLsResponse
|
|
33
|
+
from ...types.waap.ip_info_get_top_sessions_response import IPInfoGetTopSessionsResponse
|
|
34
|
+
from ...types.waap.ip_info_get_top_user_agents_response import IPInfoGetTopUserAgentsResponse
|
|
35
|
+
from ...types.waap.ip_info_get_blocked_requests_response import IPInfoGetBlockedRequestsResponse
|
|
36
|
+
from ...types.waap.ip_info_get_attack_time_series_response import IPInfoGetAttackTimeSeriesResponse
|
|
37
|
+
from ...types.waap.ip_info_list_attacked_countries_response import IPInfoListAttackedCountriesResponse
|
|
38
|
+
|
|
39
|
+
__all__ = ["IPInfoResource", "AsyncIPInfoResource"]
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
class IPInfoResource(SyncAPIResource):
|
|
43
|
+
@cached_property
|
|
44
|
+
def with_raw_response(self) -> IPInfoResourceWithRawResponse:
|
|
45
|
+
"""
|
|
46
|
+
This property can be used as a prefix for any HTTP method call to return
|
|
47
|
+
the raw response object instead of the parsed content.
|
|
48
|
+
|
|
49
|
+
For more information, see https://www.github.com/G-Core/gcore-python#accessing-raw-response-data-eg-headers
|
|
50
|
+
"""
|
|
51
|
+
return IPInfoResourceWithRawResponse(self)
|
|
52
|
+
|
|
53
|
+
@cached_property
|
|
54
|
+
def with_streaming_response(self) -> IPInfoResourceWithStreamingResponse:
|
|
55
|
+
"""
|
|
56
|
+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
|
57
|
+
|
|
58
|
+
For more information, see https://www.github.com/G-Core/gcore-python#with_streaming_response
|
|
59
|
+
"""
|
|
60
|
+
return IPInfoResourceWithStreamingResponse(self)
|
|
61
|
+
|
|
62
|
+
def get(
|
|
63
|
+
self,
|
|
64
|
+
*,
|
|
65
|
+
ip: str,
|
|
66
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
67
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
68
|
+
extra_headers: Headers | None = None,
|
|
69
|
+
extra_query: Query | None = None,
|
|
70
|
+
extra_body: Body | None = None,
|
|
71
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
72
|
+
) -> WaapIPInfo:
|
|
73
|
+
"""
|
|
74
|
+
Fetch details about a particular IP address, including WHOIS data, risk score,
|
|
75
|
+
and additional tags.
|
|
76
|
+
|
|
77
|
+
Args:
|
|
78
|
+
ip: The IP address to check
|
|
79
|
+
|
|
80
|
+
extra_headers: Send extra headers
|
|
81
|
+
|
|
82
|
+
extra_query: Add additional query parameters to the request
|
|
83
|
+
|
|
84
|
+
extra_body: Add additional JSON properties to the request
|
|
85
|
+
|
|
86
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
87
|
+
"""
|
|
88
|
+
return self._get(
|
|
89
|
+
"/waap/v1/ip-info/ip-info",
|
|
90
|
+
options=make_request_options(
|
|
91
|
+
extra_headers=extra_headers,
|
|
92
|
+
extra_query=extra_query,
|
|
93
|
+
extra_body=extra_body,
|
|
94
|
+
timeout=timeout,
|
|
95
|
+
query=maybe_transform({"ip": ip}, ip_info_get_params.IPInfoGetParams),
|
|
96
|
+
),
|
|
97
|
+
cast_to=WaapIPInfo,
|
|
98
|
+
)
|
|
99
|
+
|
|
100
|
+
def get_attack_time_series(
|
|
101
|
+
self,
|
|
102
|
+
*,
|
|
103
|
+
ip: str,
|
|
104
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
105
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
106
|
+
extra_headers: Headers | None = None,
|
|
107
|
+
extra_query: Query | None = None,
|
|
108
|
+
extra_body: Body | None = None,
|
|
109
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
110
|
+
) -> IPInfoGetAttackTimeSeriesResponse:
|
|
111
|
+
"""
|
|
112
|
+
Retrieve a time-series of attacks originating from a specified IP address.
|
|
113
|
+
|
|
114
|
+
Args:
|
|
115
|
+
ip: The IP address to check
|
|
116
|
+
|
|
117
|
+
extra_headers: Send extra headers
|
|
118
|
+
|
|
119
|
+
extra_query: Add additional query parameters to the request
|
|
120
|
+
|
|
121
|
+
extra_body: Add additional JSON properties to the request
|
|
122
|
+
|
|
123
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
124
|
+
"""
|
|
125
|
+
return self._get(
|
|
126
|
+
"/waap/v1/ip-info/attack-time-series",
|
|
127
|
+
options=make_request_options(
|
|
128
|
+
extra_headers=extra_headers,
|
|
129
|
+
extra_query=extra_query,
|
|
130
|
+
extra_body=extra_body,
|
|
131
|
+
timeout=timeout,
|
|
132
|
+
query=maybe_transform(
|
|
133
|
+
{"ip": ip}, ip_info_get_attack_time_series_params.IPInfoGetAttackTimeSeriesParams
|
|
134
|
+
),
|
|
135
|
+
),
|
|
136
|
+
cast_to=IPInfoGetAttackTimeSeriesResponse,
|
|
137
|
+
)
|
|
138
|
+
|
|
139
|
+
def get_blocked_requests(
|
|
140
|
+
self,
|
|
141
|
+
*,
|
|
142
|
+
domain_id: int,
|
|
143
|
+
ip: str,
|
|
144
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
145
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
146
|
+
extra_headers: Headers | None = None,
|
|
147
|
+
extra_query: Query | None = None,
|
|
148
|
+
extra_body: Body | None = None,
|
|
149
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
150
|
+
) -> IPInfoGetBlockedRequestsResponse:
|
|
151
|
+
"""
|
|
152
|
+
Retrieve metrics, which enumerate blocked requests originating from a specific
|
|
153
|
+
IP to a domain, grouped by rule name and taken action. Each metric provides
|
|
154
|
+
insights into the request count blocked under a specific rule and the
|
|
155
|
+
corresponding action that was executed.
|
|
156
|
+
|
|
157
|
+
Args:
|
|
158
|
+
domain_id: The domain ID
|
|
159
|
+
|
|
160
|
+
ip: The IP address to check
|
|
161
|
+
|
|
162
|
+
extra_headers: Send extra headers
|
|
163
|
+
|
|
164
|
+
extra_query: Add additional query parameters to the request
|
|
165
|
+
|
|
166
|
+
extra_body: Add additional JSON properties to the request
|
|
167
|
+
|
|
168
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
169
|
+
"""
|
|
170
|
+
return self._get(
|
|
171
|
+
"/waap/v1/ip-info/blocked-requests",
|
|
172
|
+
options=make_request_options(
|
|
173
|
+
extra_headers=extra_headers,
|
|
174
|
+
extra_query=extra_query,
|
|
175
|
+
extra_body=extra_body,
|
|
176
|
+
timeout=timeout,
|
|
177
|
+
query=maybe_transform(
|
|
178
|
+
{
|
|
179
|
+
"domain_id": domain_id,
|
|
180
|
+
"ip": ip,
|
|
181
|
+
},
|
|
182
|
+
ip_info_get_blocked_requests_params.IPInfoGetBlockedRequestsParams,
|
|
183
|
+
),
|
|
184
|
+
),
|
|
185
|
+
cast_to=IPInfoGetBlockedRequestsResponse,
|
|
186
|
+
)
|
|
187
|
+
|
|
188
|
+
def get_counts(
|
|
189
|
+
self,
|
|
190
|
+
*,
|
|
191
|
+
ip: str,
|
|
192
|
+
domain_id: int | NotGiven = NOT_GIVEN,
|
|
193
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
194
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
195
|
+
extra_headers: Headers | None = None,
|
|
196
|
+
extra_query: Query | None = None,
|
|
197
|
+
extra_body: Body | None = None,
|
|
198
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
199
|
+
) -> WaapIPInfoCounts:
|
|
200
|
+
"""
|
|
201
|
+
Retrieve metrics encompassing the counts of total requests, blocked requests and
|
|
202
|
+
unique sessions associated with a specified IP address. Metrics provide a
|
|
203
|
+
statistical overview, aiding in analyzing the interaction and access patterns of
|
|
204
|
+
the IP address in context.
|
|
205
|
+
|
|
206
|
+
Args:
|
|
207
|
+
ip: The IP address to check
|
|
208
|
+
|
|
209
|
+
domain_id: The identifier for a domain. When specified, the response will exclusively
|
|
210
|
+
contain data pertinent to the indicated domain, filtering out information from
|
|
211
|
+
other domains.
|
|
212
|
+
|
|
213
|
+
extra_headers: Send extra headers
|
|
214
|
+
|
|
215
|
+
extra_query: Add additional query parameters to the request
|
|
216
|
+
|
|
217
|
+
extra_body: Add additional JSON properties to the request
|
|
218
|
+
|
|
219
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
220
|
+
"""
|
|
221
|
+
return self._get(
|
|
222
|
+
"/waap/v1/ip-info/counts",
|
|
223
|
+
options=make_request_options(
|
|
224
|
+
extra_headers=extra_headers,
|
|
225
|
+
extra_query=extra_query,
|
|
226
|
+
extra_body=extra_body,
|
|
227
|
+
timeout=timeout,
|
|
228
|
+
query=maybe_transform(
|
|
229
|
+
{
|
|
230
|
+
"ip": ip,
|
|
231
|
+
"domain_id": domain_id,
|
|
232
|
+
},
|
|
233
|
+
ip_info_get_counts_params.IPInfoGetCountsParams,
|
|
234
|
+
),
|
|
235
|
+
),
|
|
236
|
+
cast_to=WaapIPInfoCounts,
|
|
237
|
+
)
|
|
238
|
+
|
|
239
|
+
def get_ddos_attack_series(
|
|
240
|
+
self,
|
|
241
|
+
*,
|
|
242
|
+
ip: str,
|
|
243
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
244
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
245
|
+
extra_headers: Headers | None = None,
|
|
246
|
+
extra_query: Query | None = None,
|
|
247
|
+
extra_body: Body | None = None,
|
|
248
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
249
|
+
) -> WaapIPDDOSInfoModel:
|
|
250
|
+
"""
|
|
251
|
+
Fetch and analyze DDoS (Distributed Denial of Service) attack metrics for a
|
|
252
|
+
specified IP address. The endpoint provides time-series data, enabling users to
|
|
253
|
+
evaluate the frequency and intensity of attacks across various time intervals,
|
|
254
|
+
and it returns metrics in Prometheus format to offer a systematic view of DDoS
|
|
255
|
+
attack patterns.
|
|
256
|
+
|
|
257
|
+
Args:
|
|
258
|
+
ip: The IP address to check
|
|
259
|
+
|
|
260
|
+
extra_headers: Send extra headers
|
|
261
|
+
|
|
262
|
+
extra_query: Add additional query parameters to the request
|
|
263
|
+
|
|
264
|
+
extra_body: Add additional JSON properties to the request
|
|
265
|
+
|
|
266
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
267
|
+
"""
|
|
268
|
+
return self._get(
|
|
269
|
+
"/waap/v1/ip-info/ddos",
|
|
270
|
+
options=make_request_options(
|
|
271
|
+
extra_headers=extra_headers,
|
|
272
|
+
extra_query=extra_query,
|
|
273
|
+
extra_body=extra_body,
|
|
274
|
+
timeout=timeout,
|
|
275
|
+
query=maybe_transform(
|
|
276
|
+
{"ip": ip}, ip_info_get_ddos_attack_series_params.IPInfoGetDDOSAttackSeriesParams
|
|
277
|
+
),
|
|
278
|
+
),
|
|
279
|
+
cast_to=WaapIPDDOSInfoModel,
|
|
280
|
+
)
|
|
281
|
+
|
|
282
|
+
def get_top_sessions(
|
|
283
|
+
self,
|
|
284
|
+
*,
|
|
285
|
+
domain_id: int,
|
|
286
|
+
ip: str,
|
|
287
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
288
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
289
|
+
extra_headers: Headers | None = None,
|
|
290
|
+
extra_query: Query | None = None,
|
|
291
|
+
extra_body: Body | None = None,
|
|
292
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
293
|
+
) -> IPInfoGetTopSessionsResponse:
|
|
294
|
+
"""
|
|
295
|
+
Obtain the top 10 user sessions interfacing with a particular domain, identified
|
|
296
|
+
by IP.
|
|
297
|
+
|
|
298
|
+
Args:
|
|
299
|
+
domain_id: The domain ID
|
|
300
|
+
|
|
301
|
+
ip: The IP address to check
|
|
302
|
+
|
|
303
|
+
extra_headers: Send extra headers
|
|
304
|
+
|
|
305
|
+
extra_query: Add additional query parameters to the request
|
|
306
|
+
|
|
307
|
+
extra_body: Add additional JSON properties to the request
|
|
308
|
+
|
|
309
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
310
|
+
"""
|
|
311
|
+
return self._get(
|
|
312
|
+
"/waap/v1/ip-info/top-sessions",
|
|
313
|
+
options=make_request_options(
|
|
314
|
+
extra_headers=extra_headers,
|
|
315
|
+
extra_query=extra_query,
|
|
316
|
+
extra_body=extra_body,
|
|
317
|
+
timeout=timeout,
|
|
318
|
+
query=maybe_transform(
|
|
319
|
+
{
|
|
320
|
+
"domain_id": domain_id,
|
|
321
|
+
"ip": ip,
|
|
322
|
+
},
|
|
323
|
+
ip_info_get_top_sessions_params.IPInfoGetTopSessionsParams,
|
|
324
|
+
),
|
|
325
|
+
),
|
|
326
|
+
cast_to=IPInfoGetTopSessionsResponse,
|
|
327
|
+
)
|
|
328
|
+
|
|
329
|
+
def get_top_urls(
|
|
330
|
+
self,
|
|
331
|
+
*,
|
|
332
|
+
domain_id: int,
|
|
333
|
+
ip: str,
|
|
334
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
335
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
336
|
+
extra_headers: Headers | None = None,
|
|
337
|
+
extra_query: Query | None = None,
|
|
338
|
+
extra_body: Body | None = None,
|
|
339
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
340
|
+
) -> IPInfoGetTopURLsResponse:
|
|
341
|
+
"""
|
|
342
|
+
Returns a list of the top 10 URLs accessed by a specified IP address within a
|
|
343
|
+
specific domain. This data is vital to understand user navigation patterns,
|
|
344
|
+
pinpoint high-traffic pages, and facilitate more targeted enhancements or
|
|
345
|
+
security monitoring based on URL popularity.
|
|
346
|
+
|
|
347
|
+
Args:
|
|
348
|
+
domain_id: The domain ID
|
|
349
|
+
|
|
350
|
+
ip: The IP address to check
|
|
351
|
+
|
|
352
|
+
extra_headers: Send extra headers
|
|
353
|
+
|
|
354
|
+
extra_query: Add additional query parameters to the request
|
|
355
|
+
|
|
356
|
+
extra_body: Add additional JSON properties to the request
|
|
357
|
+
|
|
358
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
359
|
+
"""
|
|
360
|
+
return self._get(
|
|
361
|
+
"/waap/v1/ip-info/top-urls",
|
|
362
|
+
options=make_request_options(
|
|
363
|
+
extra_headers=extra_headers,
|
|
364
|
+
extra_query=extra_query,
|
|
365
|
+
extra_body=extra_body,
|
|
366
|
+
timeout=timeout,
|
|
367
|
+
query=maybe_transform(
|
|
368
|
+
{
|
|
369
|
+
"domain_id": domain_id,
|
|
370
|
+
"ip": ip,
|
|
371
|
+
},
|
|
372
|
+
ip_info_get_top_urls_params.IPInfoGetTopURLsParams,
|
|
373
|
+
),
|
|
374
|
+
),
|
|
375
|
+
cast_to=IPInfoGetTopURLsResponse,
|
|
376
|
+
)
|
|
377
|
+
|
|
378
|
+
def get_top_user_agents(
|
|
379
|
+
self,
|
|
380
|
+
*,
|
|
381
|
+
domain_id: int,
|
|
382
|
+
ip: str,
|
|
383
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
384
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
385
|
+
extra_headers: Headers | None = None,
|
|
386
|
+
extra_query: Query | None = None,
|
|
387
|
+
extra_body: Body | None = None,
|
|
388
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
389
|
+
) -> IPInfoGetTopUserAgentsResponse:
|
|
390
|
+
"""
|
|
391
|
+
Retrieve the top 10 user agents interacting with a specified domain, filtered by
|
|
392
|
+
IP.
|
|
393
|
+
|
|
394
|
+
Args:
|
|
395
|
+
domain_id: The domain ID
|
|
396
|
+
|
|
397
|
+
ip: The IP address to check
|
|
398
|
+
|
|
399
|
+
extra_headers: Send extra headers
|
|
400
|
+
|
|
401
|
+
extra_query: Add additional query parameters to the request
|
|
402
|
+
|
|
403
|
+
extra_body: Add additional JSON properties to the request
|
|
404
|
+
|
|
405
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
406
|
+
"""
|
|
407
|
+
return self._get(
|
|
408
|
+
"/waap/v1/ip-info/top-user-agents",
|
|
409
|
+
options=make_request_options(
|
|
410
|
+
extra_headers=extra_headers,
|
|
411
|
+
extra_query=extra_query,
|
|
412
|
+
extra_body=extra_body,
|
|
413
|
+
timeout=timeout,
|
|
414
|
+
query=maybe_transform(
|
|
415
|
+
{
|
|
416
|
+
"domain_id": domain_id,
|
|
417
|
+
"ip": ip,
|
|
418
|
+
},
|
|
419
|
+
ip_info_get_top_user_agents_params.IPInfoGetTopUserAgentsParams,
|
|
420
|
+
),
|
|
421
|
+
),
|
|
422
|
+
cast_to=IPInfoGetTopUserAgentsResponse,
|
|
423
|
+
)
|
|
424
|
+
|
|
425
|
+
def list_attacked_countries(
|
|
426
|
+
self,
|
|
427
|
+
*,
|
|
428
|
+
ip: str,
|
|
429
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
430
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
431
|
+
extra_headers: Headers | None = None,
|
|
432
|
+
extra_query: Query | None = None,
|
|
433
|
+
extra_body: Body | None = None,
|
|
434
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
435
|
+
) -> IPInfoListAttackedCountriesResponse:
|
|
436
|
+
"""
|
|
437
|
+
Retrieve a list of countries attacked by the specified IP address
|
|
438
|
+
|
|
439
|
+
Args:
|
|
440
|
+
ip: The IP address to check
|
|
441
|
+
|
|
442
|
+
extra_headers: Send extra headers
|
|
443
|
+
|
|
444
|
+
extra_query: Add additional query parameters to the request
|
|
445
|
+
|
|
446
|
+
extra_body: Add additional JSON properties to the request
|
|
447
|
+
|
|
448
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
449
|
+
"""
|
|
450
|
+
return self._get(
|
|
451
|
+
"/waap/v1/ip-info/attack-map",
|
|
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
|
+
{"ip": ip}, ip_info_list_attacked_countries_params.IPInfoListAttackedCountriesParams
|
|
459
|
+
),
|
|
460
|
+
),
|
|
461
|
+
cast_to=IPInfoListAttackedCountriesResponse,
|
|
462
|
+
)
|
|
463
|
+
|
|
464
|
+
|
|
465
|
+
class AsyncIPInfoResource(AsyncAPIResource):
|
|
466
|
+
@cached_property
|
|
467
|
+
def with_raw_response(self) -> AsyncIPInfoResourceWithRawResponse:
|
|
468
|
+
"""
|
|
469
|
+
This property can be used as a prefix for any HTTP method call to return
|
|
470
|
+
the raw response object instead of the parsed content.
|
|
471
|
+
|
|
472
|
+
For more information, see https://www.github.com/G-Core/gcore-python#accessing-raw-response-data-eg-headers
|
|
473
|
+
"""
|
|
474
|
+
return AsyncIPInfoResourceWithRawResponse(self)
|
|
475
|
+
|
|
476
|
+
@cached_property
|
|
477
|
+
def with_streaming_response(self) -> AsyncIPInfoResourceWithStreamingResponse:
|
|
478
|
+
"""
|
|
479
|
+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
|
480
|
+
|
|
481
|
+
For more information, see https://www.github.com/G-Core/gcore-python#with_streaming_response
|
|
482
|
+
"""
|
|
483
|
+
return AsyncIPInfoResourceWithStreamingResponse(self)
|
|
484
|
+
|
|
485
|
+
async def get(
|
|
486
|
+
self,
|
|
487
|
+
*,
|
|
488
|
+
ip: str,
|
|
489
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
490
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
491
|
+
extra_headers: Headers | None = None,
|
|
492
|
+
extra_query: Query | None = None,
|
|
493
|
+
extra_body: Body | None = None,
|
|
494
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
495
|
+
) -> WaapIPInfo:
|
|
496
|
+
"""
|
|
497
|
+
Fetch details about a particular IP address, including WHOIS data, risk score,
|
|
498
|
+
and additional tags.
|
|
499
|
+
|
|
500
|
+
Args:
|
|
501
|
+
ip: The IP address to check
|
|
502
|
+
|
|
503
|
+
extra_headers: Send extra headers
|
|
504
|
+
|
|
505
|
+
extra_query: Add additional query parameters to the request
|
|
506
|
+
|
|
507
|
+
extra_body: Add additional JSON properties to the request
|
|
508
|
+
|
|
509
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
510
|
+
"""
|
|
511
|
+
return await self._get(
|
|
512
|
+
"/waap/v1/ip-info/ip-info",
|
|
513
|
+
options=make_request_options(
|
|
514
|
+
extra_headers=extra_headers,
|
|
515
|
+
extra_query=extra_query,
|
|
516
|
+
extra_body=extra_body,
|
|
517
|
+
timeout=timeout,
|
|
518
|
+
query=await async_maybe_transform({"ip": ip}, ip_info_get_params.IPInfoGetParams),
|
|
519
|
+
),
|
|
520
|
+
cast_to=WaapIPInfo,
|
|
521
|
+
)
|
|
522
|
+
|
|
523
|
+
async def get_attack_time_series(
|
|
524
|
+
self,
|
|
525
|
+
*,
|
|
526
|
+
ip: str,
|
|
527
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
528
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
529
|
+
extra_headers: Headers | None = None,
|
|
530
|
+
extra_query: Query | None = None,
|
|
531
|
+
extra_body: Body | None = None,
|
|
532
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
533
|
+
) -> IPInfoGetAttackTimeSeriesResponse:
|
|
534
|
+
"""
|
|
535
|
+
Retrieve a time-series of attacks originating from a specified IP address.
|
|
536
|
+
|
|
537
|
+
Args:
|
|
538
|
+
ip: The IP address to check
|
|
539
|
+
|
|
540
|
+
extra_headers: Send extra headers
|
|
541
|
+
|
|
542
|
+
extra_query: Add additional query parameters to the request
|
|
543
|
+
|
|
544
|
+
extra_body: Add additional JSON properties to the request
|
|
545
|
+
|
|
546
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
547
|
+
"""
|
|
548
|
+
return await self._get(
|
|
549
|
+
"/waap/v1/ip-info/attack-time-series",
|
|
550
|
+
options=make_request_options(
|
|
551
|
+
extra_headers=extra_headers,
|
|
552
|
+
extra_query=extra_query,
|
|
553
|
+
extra_body=extra_body,
|
|
554
|
+
timeout=timeout,
|
|
555
|
+
query=await async_maybe_transform(
|
|
556
|
+
{"ip": ip}, ip_info_get_attack_time_series_params.IPInfoGetAttackTimeSeriesParams
|
|
557
|
+
),
|
|
558
|
+
),
|
|
559
|
+
cast_to=IPInfoGetAttackTimeSeriesResponse,
|
|
560
|
+
)
|
|
561
|
+
|
|
562
|
+
async def get_blocked_requests(
|
|
563
|
+
self,
|
|
564
|
+
*,
|
|
565
|
+
domain_id: int,
|
|
566
|
+
ip: str,
|
|
567
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
568
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
569
|
+
extra_headers: Headers | None = None,
|
|
570
|
+
extra_query: Query | None = None,
|
|
571
|
+
extra_body: Body | None = None,
|
|
572
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
573
|
+
) -> IPInfoGetBlockedRequestsResponse:
|
|
574
|
+
"""
|
|
575
|
+
Retrieve metrics, which enumerate blocked requests originating from a specific
|
|
576
|
+
IP to a domain, grouped by rule name and taken action. Each metric provides
|
|
577
|
+
insights into the request count blocked under a specific rule and the
|
|
578
|
+
corresponding action that was executed.
|
|
579
|
+
|
|
580
|
+
Args:
|
|
581
|
+
domain_id: The domain ID
|
|
582
|
+
|
|
583
|
+
ip: The IP address to check
|
|
584
|
+
|
|
585
|
+
extra_headers: Send extra headers
|
|
586
|
+
|
|
587
|
+
extra_query: Add additional query parameters to the request
|
|
588
|
+
|
|
589
|
+
extra_body: Add additional JSON properties to the request
|
|
590
|
+
|
|
591
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
592
|
+
"""
|
|
593
|
+
return await self._get(
|
|
594
|
+
"/waap/v1/ip-info/blocked-requests",
|
|
595
|
+
options=make_request_options(
|
|
596
|
+
extra_headers=extra_headers,
|
|
597
|
+
extra_query=extra_query,
|
|
598
|
+
extra_body=extra_body,
|
|
599
|
+
timeout=timeout,
|
|
600
|
+
query=await async_maybe_transform(
|
|
601
|
+
{
|
|
602
|
+
"domain_id": domain_id,
|
|
603
|
+
"ip": ip,
|
|
604
|
+
},
|
|
605
|
+
ip_info_get_blocked_requests_params.IPInfoGetBlockedRequestsParams,
|
|
606
|
+
),
|
|
607
|
+
),
|
|
608
|
+
cast_to=IPInfoGetBlockedRequestsResponse,
|
|
609
|
+
)
|
|
610
|
+
|
|
611
|
+
async def get_counts(
|
|
612
|
+
self,
|
|
613
|
+
*,
|
|
614
|
+
ip: str,
|
|
615
|
+
domain_id: int | NotGiven = NOT_GIVEN,
|
|
616
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
617
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
618
|
+
extra_headers: Headers | None = None,
|
|
619
|
+
extra_query: Query | None = None,
|
|
620
|
+
extra_body: Body | None = None,
|
|
621
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
622
|
+
) -> WaapIPInfoCounts:
|
|
623
|
+
"""
|
|
624
|
+
Retrieve metrics encompassing the counts of total requests, blocked requests and
|
|
625
|
+
unique sessions associated with a specified IP address. Metrics provide a
|
|
626
|
+
statistical overview, aiding in analyzing the interaction and access patterns of
|
|
627
|
+
the IP address in context.
|
|
628
|
+
|
|
629
|
+
Args:
|
|
630
|
+
ip: The IP address to check
|
|
631
|
+
|
|
632
|
+
domain_id: The identifier for a domain. When specified, the response will exclusively
|
|
633
|
+
contain data pertinent to the indicated domain, filtering out information from
|
|
634
|
+
other domains.
|
|
635
|
+
|
|
636
|
+
extra_headers: Send extra headers
|
|
637
|
+
|
|
638
|
+
extra_query: Add additional query parameters to the request
|
|
639
|
+
|
|
640
|
+
extra_body: Add additional JSON properties to the request
|
|
641
|
+
|
|
642
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
643
|
+
"""
|
|
644
|
+
return await self._get(
|
|
645
|
+
"/waap/v1/ip-info/counts",
|
|
646
|
+
options=make_request_options(
|
|
647
|
+
extra_headers=extra_headers,
|
|
648
|
+
extra_query=extra_query,
|
|
649
|
+
extra_body=extra_body,
|
|
650
|
+
timeout=timeout,
|
|
651
|
+
query=await async_maybe_transform(
|
|
652
|
+
{
|
|
653
|
+
"ip": ip,
|
|
654
|
+
"domain_id": domain_id,
|
|
655
|
+
},
|
|
656
|
+
ip_info_get_counts_params.IPInfoGetCountsParams,
|
|
657
|
+
),
|
|
658
|
+
),
|
|
659
|
+
cast_to=WaapIPInfoCounts,
|
|
660
|
+
)
|
|
661
|
+
|
|
662
|
+
async def get_ddos_attack_series(
|
|
663
|
+
self,
|
|
664
|
+
*,
|
|
665
|
+
ip: str,
|
|
666
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
667
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
668
|
+
extra_headers: Headers | None = None,
|
|
669
|
+
extra_query: Query | None = None,
|
|
670
|
+
extra_body: Body | None = None,
|
|
671
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
672
|
+
) -> WaapIPDDOSInfoModel:
|
|
673
|
+
"""
|
|
674
|
+
Fetch and analyze DDoS (Distributed Denial of Service) attack metrics for a
|
|
675
|
+
specified IP address. The endpoint provides time-series data, enabling users to
|
|
676
|
+
evaluate the frequency and intensity of attacks across various time intervals,
|
|
677
|
+
and it returns metrics in Prometheus format to offer a systematic view of DDoS
|
|
678
|
+
attack patterns.
|
|
679
|
+
|
|
680
|
+
Args:
|
|
681
|
+
ip: The IP address to check
|
|
682
|
+
|
|
683
|
+
extra_headers: Send extra headers
|
|
684
|
+
|
|
685
|
+
extra_query: Add additional query parameters to the request
|
|
686
|
+
|
|
687
|
+
extra_body: Add additional JSON properties to the request
|
|
688
|
+
|
|
689
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
690
|
+
"""
|
|
691
|
+
return await self._get(
|
|
692
|
+
"/waap/v1/ip-info/ddos",
|
|
693
|
+
options=make_request_options(
|
|
694
|
+
extra_headers=extra_headers,
|
|
695
|
+
extra_query=extra_query,
|
|
696
|
+
extra_body=extra_body,
|
|
697
|
+
timeout=timeout,
|
|
698
|
+
query=await async_maybe_transform(
|
|
699
|
+
{"ip": ip}, ip_info_get_ddos_attack_series_params.IPInfoGetDDOSAttackSeriesParams
|
|
700
|
+
),
|
|
701
|
+
),
|
|
702
|
+
cast_to=WaapIPDDOSInfoModel,
|
|
703
|
+
)
|
|
704
|
+
|
|
705
|
+
async def get_top_sessions(
|
|
706
|
+
self,
|
|
707
|
+
*,
|
|
708
|
+
domain_id: int,
|
|
709
|
+
ip: str,
|
|
710
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
711
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
712
|
+
extra_headers: Headers | None = None,
|
|
713
|
+
extra_query: Query | None = None,
|
|
714
|
+
extra_body: Body | None = None,
|
|
715
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
716
|
+
) -> IPInfoGetTopSessionsResponse:
|
|
717
|
+
"""
|
|
718
|
+
Obtain the top 10 user sessions interfacing with a particular domain, identified
|
|
719
|
+
by IP.
|
|
720
|
+
|
|
721
|
+
Args:
|
|
722
|
+
domain_id: The domain ID
|
|
723
|
+
|
|
724
|
+
ip: The IP address to check
|
|
725
|
+
|
|
726
|
+
extra_headers: Send extra headers
|
|
727
|
+
|
|
728
|
+
extra_query: Add additional query parameters to the request
|
|
729
|
+
|
|
730
|
+
extra_body: Add additional JSON properties to the request
|
|
731
|
+
|
|
732
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
733
|
+
"""
|
|
734
|
+
return await self._get(
|
|
735
|
+
"/waap/v1/ip-info/top-sessions",
|
|
736
|
+
options=make_request_options(
|
|
737
|
+
extra_headers=extra_headers,
|
|
738
|
+
extra_query=extra_query,
|
|
739
|
+
extra_body=extra_body,
|
|
740
|
+
timeout=timeout,
|
|
741
|
+
query=await async_maybe_transform(
|
|
742
|
+
{
|
|
743
|
+
"domain_id": domain_id,
|
|
744
|
+
"ip": ip,
|
|
745
|
+
},
|
|
746
|
+
ip_info_get_top_sessions_params.IPInfoGetTopSessionsParams,
|
|
747
|
+
),
|
|
748
|
+
),
|
|
749
|
+
cast_to=IPInfoGetTopSessionsResponse,
|
|
750
|
+
)
|
|
751
|
+
|
|
752
|
+
async def get_top_urls(
|
|
753
|
+
self,
|
|
754
|
+
*,
|
|
755
|
+
domain_id: int,
|
|
756
|
+
ip: str,
|
|
757
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
758
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
759
|
+
extra_headers: Headers | None = None,
|
|
760
|
+
extra_query: Query | None = None,
|
|
761
|
+
extra_body: Body | None = None,
|
|
762
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
763
|
+
) -> IPInfoGetTopURLsResponse:
|
|
764
|
+
"""
|
|
765
|
+
Returns a list of the top 10 URLs accessed by a specified IP address within a
|
|
766
|
+
specific domain. This data is vital to understand user navigation patterns,
|
|
767
|
+
pinpoint high-traffic pages, and facilitate more targeted enhancements or
|
|
768
|
+
security monitoring based on URL popularity.
|
|
769
|
+
|
|
770
|
+
Args:
|
|
771
|
+
domain_id: The domain ID
|
|
772
|
+
|
|
773
|
+
ip: The IP address to check
|
|
774
|
+
|
|
775
|
+
extra_headers: Send extra headers
|
|
776
|
+
|
|
777
|
+
extra_query: Add additional query parameters to the request
|
|
778
|
+
|
|
779
|
+
extra_body: Add additional JSON properties to the request
|
|
780
|
+
|
|
781
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
782
|
+
"""
|
|
783
|
+
return await self._get(
|
|
784
|
+
"/waap/v1/ip-info/top-urls",
|
|
785
|
+
options=make_request_options(
|
|
786
|
+
extra_headers=extra_headers,
|
|
787
|
+
extra_query=extra_query,
|
|
788
|
+
extra_body=extra_body,
|
|
789
|
+
timeout=timeout,
|
|
790
|
+
query=await async_maybe_transform(
|
|
791
|
+
{
|
|
792
|
+
"domain_id": domain_id,
|
|
793
|
+
"ip": ip,
|
|
794
|
+
},
|
|
795
|
+
ip_info_get_top_urls_params.IPInfoGetTopURLsParams,
|
|
796
|
+
),
|
|
797
|
+
),
|
|
798
|
+
cast_to=IPInfoGetTopURLsResponse,
|
|
799
|
+
)
|
|
800
|
+
|
|
801
|
+
async def get_top_user_agents(
|
|
802
|
+
self,
|
|
803
|
+
*,
|
|
804
|
+
domain_id: int,
|
|
805
|
+
ip: str,
|
|
806
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
807
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
808
|
+
extra_headers: Headers | None = None,
|
|
809
|
+
extra_query: Query | None = None,
|
|
810
|
+
extra_body: Body | None = None,
|
|
811
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
812
|
+
) -> IPInfoGetTopUserAgentsResponse:
|
|
813
|
+
"""
|
|
814
|
+
Retrieve the top 10 user agents interacting with a specified domain, filtered by
|
|
815
|
+
IP.
|
|
816
|
+
|
|
817
|
+
Args:
|
|
818
|
+
domain_id: The domain ID
|
|
819
|
+
|
|
820
|
+
ip: The IP address to check
|
|
821
|
+
|
|
822
|
+
extra_headers: Send extra headers
|
|
823
|
+
|
|
824
|
+
extra_query: Add additional query parameters to the request
|
|
825
|
+
|
|
826
|
+
extra_body: Add additional JSON properties to the request
|
|
827
|
+
|
|
828
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
829
|
+
"""
|
|
830
|
+
return await self._get(
|
|
831
|
+
"/waap/v1/ip-info/top-user-agents",
|
|
832
|
+
options=make_request_options(
|
|
833
|
+
extra_headers=extra_headers,
|
|
834
|
+
extra_query=extra_query,
|
|
835
|
+
extra_body=extra_body,
|
|
836
|
+
timeout=timeout,
|
|
837
|
+
query=await async_maybe_transform(
|
|
838
|
+
{
|
|
839
|
+
"domain_id": domain_id,
|
|
840
|
+
"ip": ip,
|
|
841
|
+
},
|
|
842
|
+
ip_info_get_top_user_agents_params.IPInfoGetTopUserAgentsParams,
|
|
843
|
+
),
|
|
844
|
+
),
|
|
845
|
+
cast_to=IPInfoGetTopUserAgentsResponse,
|
|
846
|
+
)
|
|
847
|
+
|
|
848
|
+
async def list_attacked_countries(
|
|
849
|
+
self,
|
|
850
|
+
*,
|
|
851
|
+
ip: str,
|
|
852
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
853
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
854
|
+
extra_headers: Headers | None = None,
|
|
855
|
+
extra_query: Query | None = None,
|
|
856
|
+
extra_body: Body | None = None,
|
|
857
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
858
|
+
) -> IPInfoListAttackedCountriesResponse:
|
|
859
|
+
"""
|
|
860
|
+
Retrieve a list of countries attacked by the specified IP address
|
|
861
|
+
|
|
862
|
+
Args:
|
|
863
|
+
ip: The IP address to check
|
|
864
|
+
|
|
865
|
+
extra_headers: Send extra headers
|
|
866
|
+
|
|
867
|
+
extra_query: Add additional query parameters to the request
|
|
868
|
+
|
|
869
|
+
extra_body: Add additional JSON properties to the request
|
|
870
|
+
|
|
871
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
872
|
+
"""
|
|
873
|
+
return await self._get(
|
|
874
|
+
"/waap/v1/ip-info/attack-map",
|
|
875
|
+
options=make_request_options(
|
|
876
|
+
extra_headers=extra_headers,
|
|
877
|
+
extra_query=extra_query,
|
|
878
|
+
extra_body=extra_body,
|
|
879
|
+
timeout=timeout,
|
|
880
|
+
query=await async_maybe_transform(
|
|
881
|
+
{"ip": ip}, ip_info_list_attacked_countries_params.IPInfoListAttackedCountriesParams
|
|
882
|
+
),
|
|
883
|
+
),
|
|
884
|
+
cast_to=IPInfoListAttackedCountriesResponse,
|
|
885
|
+
)
|
|
886
|
+
|
|
887
|
+
|
|
888
|
+
class IPInfoResourceWithRawResponse:
|
|
889
|
+
def __init__(self, ip_info: IPInfoResource) -> None:
|
|
890
|
+
self._ip_info = ip_info
|
|
891
|
+
|
|
892
|
+
self.get = to_raw_response_wrapper(
|
|
893
|
+
ip_info.get,
|
|
894
|
+
)
|
|
895
|
+
self.get_attack_time_series = to_raw_response_wrapper(
|
|
896
|
+
ip_info.get_attack_time_series,
|
|
897
|
+
)
|
|
898
|
+
self.get_blocked_requests = to_raw_response_wrapper(
|
|
899
|
+
ip_info.get_blocked_requests,
|
|
900
|
+
)
|
|
901
|
+
self.get_counts = to_raw_response_wrapper(
|
|
902
|
+
ip_info.get_counts,
|
|
903
|
+
)
|
|
904
|
+
self.get_ddos_attack_series = to_raw_response_wrapper(
|
|
905
|
+
ip_info.get_ddos_attack_series,
|
|
906
|
+
)
|
|
907
|
+
self.get_top_sessions = to_raw_response_wrapper(
|
|
908
|
+
ip_info.get_top_sessions,
|
|
909
|
+
)
|
|
910
|
+
self.get_top_urls = to_raw_response_wrapper(
|
|
911
|
+
ip_info.get_top_urls,
|
|
912
|
+
)
|
|
913
|
+
self.get_top_user_agents = to_raw_response_wrapper(
|
|
914
|
+
ip_info.get_top_user_agents,
|
|
915
|
+
)
|
|
916
|
+
self.list_attacked_countries = to_raw_response_wrapper(
|
|
917
|
+
ip_info.list_attacked_countries,
|
|
918
|
+
)
|
|
919
|
+
|
|
920
|
+
|
|
921
|
+
class AsyncIPInfoResourceWithRawResponse:
|
|
922
|
+
def __init__(self, ip_info: AsyncIPInfoResource) -> None:
|
|
923
|
+
self._ip_info = ip_info
|
|
924
|
+
|
|
925
|
+
self.get = async_to_raw_response_wrapper(
|
|
926
|
+
ip_info.get,
|
|
927
|
+
)
|
|
928
|
+
self.get_attack_time_series = async_to_raw_response_wrapper(
|
|
929
|
+
ip_info.get_attack_time_series,
|
|
930
|
+
)
|
|
931
|
+
self.get_blocked_requests = async_to_raw_response_wrapper(
|
|
932
|
+
ip_info.get_blocked_requests,
|
|
933
|
+
)
|
|
934
|
+
self.get_counts = async_to_raw_response_wrapper(
|
|
935
|
+
ip_info.get_counts,
|
|
936
|
+
)
|
|
937
|
+
self.get_ddos_attack_series = async_to_raw_response_wrapper(
|
|
938
|
+
ip_info.get_ddos_attack_series,
|
|
939
|
+
)
|
|
940
|
+
self.get_top_sessions = async_to_raw_response_wrapper(
|
|
941
|
+
ip_info.get_top_sessions,
|
|
942
|
+
)
|
|
943
|
+
self.get_top_urls = async_to_raw_response_wrapper(
|
|
944
|
+
ip_info.get_top_urls,
|
|
945
|
+
)
|
|
946
|
+
self.get_top_user_agents = async_to_raw_response_wrapper(
|
|
947
|
+
ip_info.get_top_user_agents,
|
|
948
|
+
)
|
|
949
|
+
self.list_attacked_countries = async_to_raw_response_wrapper(
|
|
950
|
+
ip_info.list_attacked_countries,
|
|
951
|
+
)
|
|
952
|
+
|
|
953
|
+
|
|
954
|
+
class IPInfoResourceWithStreamingResponse:
|
|
955
|
+
def __init__(self, ip_info: IPInfoResource) -> None:
|
|
956
|
+
self._ip_info = ip_info
|
|
957
|
+
|
|
958
|
+
self.get = to_streamed_response_wrapper(
|
|
959
|
+
ip_info.get,
|
|
960
|
+
)
|
|
961
|
+
self.get_attack_time_series = to_streamed_response_wrapper(
|
|
962
|
+
ip_info.get_attack_time_series,
|
|
963
|
+
)
|
|
964
|
+
self.get_blocked_requests = to_streamed_response_wrapper(
|
|
965
|
+
ip_info.get_blocked_requests,
|
|
966
|
+
)
|
|
967
|
+
self.get_counts = to_streamed_response_wrapper(
|
|
968
|
+
ip_info.get_counts,
|
|
969
|
+
)
|
|
970
|
+
self.get_ddos_attack_series = to_streamed_response_wrapper(
|
|
971
|
+
ip_info.get_ddos_attack_series,
|
|
972
|
+
)
|
|
973
|
+
self.get_top_sessions = to_streamed_response_wrapper(
|
|
974
|
+
ip_info.get_top_sessions,
|
|
975
|
+
)
|
|
976
|
+
self.get_top_urls = to_streamed_response_wrapper(
|
|
977
|
+
ip_info.get_top_urls,
|
|
978
|
+
)
|
|
979
|
+
self.get_top_user_agents = to_streamed_response_wrapper(
|
|
980
|
+
ip_info.get_top_user_agents,
|
|
981
|
+
)
|
|
982
|
+
self.list_attacked_countries = to_streamed_response_wrapper(
|
|
983
|
+
ip_info.list_attacked_countries,
|
|
984
|
+
)
|
|
985
|
+
|
|
986
|
+
|
|
987
|
+
class AsyncIPInfoResourceWithStreamingResponse:
|
|
988
|
+
def __init__(self, ip_info: AsyncIPInfoResource) -> None:
|
|
989
|
+
self._ip_info = ip_info
|
|
990
|
+
|
|
991
|
+
self.get = async_to_streamed_response_wrapper(
|
|
992
|
+
ip_info.get,
|
|
993
|
+
)
|
|
994
|
+
self.get_attack_time_series = async_to_streamed_response_wrapper(
|
|
995
|
+
ip_info.get_attack_time_series,
|
|
996
|
+
)
|
|
997
|
+
self.get_blocked_requests = async_to_streamed_response_wrapper(
|
|
998
|
+
ip_info.get_blocked_requests,
|
|
999
|
+
)
|
|
1000
|
+
self.get_counts = async_to_streamed_response_wrapper(
|
|
1001
|
+
ip_info.get_counts,
|
|
1002
|
+
)
|
|
1003
|
+
self.get_ddos_attack_series = async_to_streamed_response_wrapper(
|
|
1004
|
+
ip_info.get_ddos_attack_series,
|
|
1005
|
+
)
|
|
1006
|
+
self.get_top_sessions = async_to_streamed_response_wrapper(
|
|
1007
|
+
ip_info.get_top_sessions,
|
|
1008
|
+
)
|
|
1009
|
+
self.get_top_urls = async_to_streamed_response_wrapper(
|
|
1010
|
+
ip_info.get_top_urls,
|
|
1011
|
+
)
|
|
1012
|
+
self.get_top_user_agents = async_to_streamed_response_wrapper(
|
|
1013
|
+
ip_info.get_top_user_agents,
|
|
1014
|
+
)
|
|
1015
|
+
self.list_attacked_countries = async_to_streamed_response_wrapper(
|
|
1016
|
+
ip_info.list_attacked_countries,
|
|
1017
|
+
)
|