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,29 @@
|
|
|
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
|
|
6
|
+
from typing_extensions import Literal, Required, TypedDict
|
|
7
|
+
|
|
8
|
+
__all__ = ["APIPathUpdateParams"]
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class APIPathUpdateParams(TypedDict, total=False):
|
|
12
|
+
domain_id: Required[int]
|
|
13
|
+
"""The domain ID"""
|
|
14
|
+
|
|
15
|
+
api_groups: List[str]
|
|
16
|
+
"""An array of api groups associated with the API path"""
|
|
17
|
+
|
|
18
|
+
path: str
|
|
19
|
+
"""The updated API path.
|
|
20
|
+
|
|
21
|
+
When updating the path, variables can be renamed, path parts can be converted to
|
|
22
|
+
variables and vice versa.
|
|
23
|
+
"""
|
|
24
|
+
|
|
25
|
+
status: Literal["CONFIRMED_API", "POTENTIAL_API", "NOT_API", "DELISTED_API"]
|
|
26
|
+
"""The different statuses an API path can have"""
|
|
27
|
+
|
|
28
|
+
tags: List[str]
|
|
29
|
+
"""An array of tags associated with the API path"""
|
|
@@ -0,0 +1,368 @@
|
|
|
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, Iterable, Optional
|
|
6
|
+
from typing_extensions import Literal, Required, TypedDict
|
|
7
|
+
|
|
8
|
+
__all__ = [
|
|
9
|
+
"CustomRuleCreateParams",
|
|
10
|
+
"Action",
|
|
11
|
+
"ActionBlock",
|
|
12
|
+
"ActionTag",
|
|
13
|
+
"Condition",
|
|
14
|
+
"ConditionContentType",
|
|
15
|
+
"ConditionCountry",
|
|
16
|
+
"ConditionFileExtension",
|
|
17
|
+
"ConditionHeader",
|
|
18
|
+
"ConditionHeaderExists",
|
|
19
|
+
"ConditionHTTPMethod",
|
|
20
|
+
"ConditionIP",
|
|
21
|
+
"ConditionIPRange",
|
|
22
|
+
"ConditionOrganization",
|
|
23
|
+
"ConditionOwnerTypes",
|
|
24
|
+
"ConditionRequestRate",
|
|
25
|
+
"ConditionResponseHeader",
|
|
26
|
+
"ConditionResponseHeaderExists",
|
|
27
|
+
"ConditionSessionRequestCount",
|
|
28
|
+
"ConditionTags",
|
|
29
|
+
"ConditionURL",
|
|
30
|
+
"ConditionUserAgent",
|
|
31
|
+
"ConditionUserDefinedTags",
|
|
32
|
+
]
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
class CustomRuleCreateParams(TypedDict, total=False):
|
|
36
|
+
action: Required[Action]
|
|
37
|
+
"""The action that a WAAP rule takes when triggered"""
|
|
38
|
+
|
|
39
|
+
conditions: Required[Iterable[Condition]]
|
|
40
|
+
"""The conditions required for the WAAP engine to trigger the rule.
|
|
41
|
+
|
|
42
|
+
Rules may have between 1 and 5 conditions. All conditions must pass for the rule
|
|
43
|
+
to trigger
|
|
44
|
+
"""
|
|
45
|
+
|
|
46
|
+
enabled: Required[bool]
|
|
47
|
+
"""Whether or not the rule is enabled"""
|
|
48
|
+
|
|
49
|
+
name: Required[str]
|
|
50
|
+
"""The name assigned to the rule"""
|
|
51
|
+
|
|
52
|
+
description: Optional[str]
|
|
53
|
+
"""The description assigned to the rule"""
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
class ActionBlock(TypedDict, total=False):
|
|
57
|
+
action_duration: Optional[str]
|
|
58
|
+
"""How long a rule's block action will apply to subsequent requests.
|
|
59
|
+
|
|
60
|
+
Can be specified in seconds or by using a numeral followed by 's', 'm', 'h', or
|
|
61
|
+
'd' to represent time format (seconds, minutes, hours, or days)
|
|
62
|
+
"""
|
|
63
|
+
|
|
64
|
+
status_code: Optional[Literal[403, 405, 418, 429]]
|
|
65
|
+
"""Designates the HTTP status code to deliver when a request is blocked."""
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
class ActionTag(TypedDict, total=False):
|
|
69
|
+
tags: Required[List[str]]
|
|
70
|
+
"""The list of user defined tags to tag the request with"""
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
class Action(TypedDict, total=False):
|
|
74
|
+
allow: Optional[object]
|
|
75
|
+
"""The WAAP allowed the request"""
|
|
76
|
+
|
|
77
|
+
block: Optional[ActionBlock]
|
|
78
|
+
"""
|
|
79
|
+
WAAP block action behavior could be configured with response status code and
|
|
80
|
+
action duration.
|
|
81
|
+
"""
|
|
82
|
+
|
|
83
|
+
captcha: Optional[object]
|
|
84
|
+
"""The WAAP presented the user with a captcha"""
|
|
85
|
+
|
|
86
|
+
handshake: Optional[object]
|
|
87
|
+
"""The WAAP performed automatic browser validation"""
|
|
88
|
+
|
|
89
|
+
monitor: Optional[object]
|
|
90
|
+
"""The WAAP monitored the request but took no action"""
|
|
91
|
+
|
|
92
|
+
tag: Optional[ActionTag]
|
|
93
|
+
"""WAAP tag action gets a list of tags to tag the request scope with"""
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
class ConditionContentType(TypedDict, total=False):
|
|
97
|
+
content_type: Required[List[str]]
|
|
98
|
+
"""The list of content types to match against"""
|
|
99
|
+
|
|
100
|
+
negation: bool
|
|
101
|
+
"""Whether or not to apply a boolean NOT operation to the rule's condition"""
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
class ConditionCountry(TypedDict, total=False):
|
|
105
|
+
country_code: Required[List[str]]
|
|
106
|
+
"""
|
|
107
|
+
A list of ISO 3166-1 alpha-2 formatted strings representing the countries to
|
|
108
|
+
match against
|
|
109
|
+
"""
|
|
110
|
+
|
|
111
|
+
negation: bool
|
|
112
|
+
"""Whether or not to apply a boolean NOT operation to the rule's condition"""
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
class ConditionFileExtension(TypedDict, total=False):
|
|
116
|
+
file_extension: Required[List[str]]
|
|
117
|
+
"""The list of file extensions to match against"""
|
|
118
|
+
|
|
119
|
+
negation: bool
|
|
120
|
+
"""Whether or not to apply a boolean NOT operation to the rule's condition"""
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
class ConditionHeader(TypedDict, total=False):
|
|
124
|
+
header: Required[str]
|
|
125
|
+
"""The request header name"""
|
|
126
|
+
|
|
127
|
+
value: Required[str]
|
|
128
|
+
"""The request header value"""
|
|
129
|
+
|
|
130
|
+
match_type: Literal["Exact", "Contains"]
|
|
131
|
+
"""The type of matching condition for header and value."""
|
|
132
|
+
|
|
133
|
+
negation: bool
|
|
134
|
+
"""Whether or not to apply a boolean NOT operation to the rule's condition"""
|
|
135
|
+
|
|
136
|
+
|
|
137
|
+
class ConditionHeaderExists(TypedDict, total=False):
|
|
138
|
+
header: Required[str]
|
|
139
|
+
"""The request header name"""
|
|
140
|
+
|
|
141
|
+
negation: bool
|
|
142
|
+
"""Whether or not to apply a boolean NOT operation to the rule's condition"""
|
|
143
|
+
|
|
144
|
+
|
|
145
|
+
class ConditionHTTPMethod(TypedDict, total=False):
|
|
146
|
+
http_method: Required[Literal["CONNECT", "DELETE", "GET", "HEAD", "OPTIONS", "PATCH", "POST", "PUT", "TRACE"]]
|
|
147
|
+
"""HTTP methods and descriptions Methods from the following RFCs are all observed:
|
|
148
|
+
|
|
149
|
+
- RFC 7231: Hypertext Transfer Protocol (HTTP/1.1), obsoletes 2616
|
|
150
|
+
- RFC 5789: PATCH Method for HTTP
|
|
151
|
+
"""
|
|
152
|
+
|
|
153
|
+
negation: bool
|
|
154
|
+
"""Whether or not to apply a boolean NOT operation to the rule's condition"""
|
|
155
|
+
|
|
156
|
+
|
|
157
|
+
class ConditionIP(TypedDict, total=False):
|
|
158
|
+
ip_address: Required[str]
|
|
159
|
+
"""A single IPv4 or IPv6 address"""
|
|
160
|
+
|
|
161
|
+
negation: bool
|
|
162
|
+
"""Whether or not to apply a boolean NOT operation to the rule's condition"""
|
|
163
|
+
|
|
164
|
+
|
|
165
|
+
class ConditionIPRange(TypedDict, total=False):
|
|
166
|
+
lower_bound: Required[str]
|
|
167
|
+
"""The lower bound IPv4 or IPv6 address to match against"""
|
|
168
|
+
|
|
169
|
+
upper_bound: Required[str]
|
|
170
|
+
"""The upper bound IPv4 or IPv6 address to match against"""
|
|
171
|
+
|
|
172
|
+
negation: bool
|
|
173
|
+
"""Whether or not to apply a boolean NOT operation to the rule's condition"""
|
|
174
|
+
|
|
175
|
+
|
|
176
|
+
class ConditionOrganization(TypedDict, total=False):
|
|
177
|
+
organization: Required[str]
|
|
178
|
+
"""The organization to match against"""
|
|
179
|
+
|
|
180
|
+
negation: bool
|
|
181
|
+
"""Whether or not to apply a boolean NOT operation to the rule's condition"""
|
|
182
|
+
|
|
183
|
+
|
|
184
|
+
class ConditionOwnerTypes(TypedDict, total=False):
|
|
185
|
+
negation: bool
|
|
186
|
+
"""Whether or not to apply a boolean NOT operation to the rule's condition"""
|
|
187
|
+
|
|
188
|
+
owner_types: List[
|
|
189
|
+
Literal[
|
|
190
|
+
"COMMERCIAL",
|
|
191
|
+
"EDUCATIONAL",
|
|
192
|
+
"GOVERNMENT",
|
|
193
|
+
"HOSTING_SERVICES",
|
|
194
|
+
"ISP",
|
|
195
|
+
"MOBILE_NETWORK",
|
|
196
|
+
"NETWORK",
|
|
197
|
+
"RESERVED",
|
|
198
|
+
]
|
|
199
|
+
]
|
|
200
|
+
"""
|
|
201
|
+
Match the type of organization that owns the IP address making an incoming
|
|
202
|
+
request
|
|
203
|
+
"""
|
|
204
|
+
|
|
205
|
+
|
|
206
|
+
class ConditionRequestRate(TypedDict, total=False):
|
|
207
|
+
path_pattern: Required[str]
|
|
208
|
+
"""A regular expression matching the URL path of the incoming request"""
|
|
209
|
+
|
|
210
|
+
requests: Required[int]
|
|
211
|
+
"""
|
|
212
|
+
The number of incoming requests over the given time that can trigger a request
|
|
213
|
+
rate condition
|
|
214
|
+
"""
|
|
215
|
+
|
|
216
|
+
time: Required[int]
|
|
217
|
+
"""
|
|
218
|
+
The number of seconds that the WAAP measures incoming requests over before
|
|
219
|
+
triggering a request rate condition
|
|
220
|
+
"""
|
|
221
|
+
|
|
222
|
+
http_methods: Optional[
|
|
223
|
+
List[Literal["CONNECT", "DELETE", "GET", "HEAD", "OPTIONS", "PATCH", "POST", "PUT", "TRACE"]]
|
|
224
|
+
]
|
|
225
|
+
"""Possible HTTP request methods that can trigger a request rate condition"""
|
|
226
|
+
|
|
227
|
+
ips: Optional[List[str]]
|
|
228
|
+
"""A list of source IPs that can trigger a request rate condition"""
|
|
229
|
+
|
|
230
|
+
user_defined_tag: Optional[str]
|
|
231
|
+
"""
|
|
232
|
+
A user-defined tag that can be included in incoming requests and used to trigger
|
|
233
|
+
a request rate condition
|
|
234
|
+
"""
|
|
235
|
+
|
|
236
|
+
|
|
237
|
+
class ConditionResponseHeader(TypedDict, total=False):
|
|
238
|
+
header: Required[str]
|
|
239
|
+
"""The response header name"""
|
|
240
|
+
|
|
241
|
+
value: Required[str]
|
|
242
|
+
"""The response header value"""
|
|
243
|
+
|
|
244
|
+
match_type: Literal["Exact", "Contains"]
|
|
245
|
+
"""The type of matching condition for header and value."""
|
|
246
|
+
|
|
247
|
+
negation: bool
|
|
248
|
+
"""Whether or not to apply a boolean NOT operation to the rule's condition"""
|
|
249
|
+
|
|
250
|
+
|
|
251
|
+
class ConditionResponseHeaderExists(TypedDict, total=False):
|
|
252
|
+
header: Required[str]
|
|
253
|
+
"""The response header name"""
|
|
254
|
+
|
|
255
|
+
negation: bool
|
|
256
|
+
"""Whether or not to apply a boolean NOT operation to the rule's condition"""
|
|
257
|
+
|
|
258
|
+
|
|
259
|
+
class ConditionSessionRequestCount(TypedDict, total=False):
|
|
260
|
+
request_count: Required[int]
|
|
261
|
+
"""The number of dynamic requests in the session"""
|
|
262
|
+
|
|
263
|
+
negation: bool
|
|
264
|
+
"""Whether or not to apply a boolean NOT operation to the rule's condition"""
|
|
265
|
+
|
|
266
|
+
|
|
267
|
+
class ConditionTags(TypedDict, total=False):
|
|
268
|
+
tags: Required[List[str]]
|
|
269
|
+
"""A list of tags to match against the request tags"""
|
|
270
|
+
|
|
271
|
+
negation: bool
|
|
272
|
+
"""Whether or not to apply a boolean NOT operation to the rule's condition"""
|
|
273
|
+
|
|
274
|
+
|
|
275
|
+
class ConditionURL(TypedDict, total=False):
|
|
276
|
+
url: Required[str]
|
|
277
|
+
"""The pattern to match against the request URL.
|
|
278
|
+
|
|
279
|
+
If `match_type` is `Regex` the value must be a valid regular expression that
|
|
280
|
+
does not use lookahead or lookbehind constructs
|
|
281
|
+
"""
|
|
282
|
+
|
|
283
|
+
match_type: Literal["Exact", "Contains", "Regex"]
|
|
284
|
+
"""The type of matching condition."""
|
|
285
|
+
|
|
286
|
+
negation: bool
|
|
287
|
+
"""Whether or not to apply a boolean NOT operation to the rule's condition"""
|
|
288
|
+
|
|
289
|
+
|
|
290
|
+
class ConditionUserAgent(TypedDict, total=False):
|
|
291
|
+
user_agent: Required[str]
|
|
292
|
+
"""The user agent value to match"""
|
|
293
|
+
|
|
294
|
+
match_type: Literal["Exact", "Contains"]
|
|
295
|
+
"""The type of matching condition."""
|
|
296
|
+
|
|
297
|
+
negation: bool
|
|
298
|
+
"""Whether or not to apply a boolean NOT operation to the rule's condition"""
|
|
299
|
+
|
|
300
|
+
|
|
301
|
+
class ConditionUserDefinedTags(TypedDict, total=False):
|
|
302
|
+
tags: Required[List[str]]
|
|
303
|
+
"""A list of user-defined tags to match against the request tags"""
|
|
304
|
+
|
|
305
|
+
negation: bool
|
|
306
|
+
"""Whether or not to apply a boolean NOT operation to the rule's condition"""
|
|
307
|
+
|
|
308
|
+
|
|
309
|
+
class Condition(TypedDict, total=False):
|
|
310
|
+
content_type: Optional[ConditionContentType]
|
|
311
|
+
"""Match the requested Content-Type"""
|
|
312
|
+
|
|
313
|
+
country: Optional[ConditionCountry]
|
|
314
|
+
"""Match the country that the request originated from"""
|
|
315
|
+
|
|
316
|
+
file_extension: Optional[ConditionFileExtension]
|
|
317
|
+
"""Match the incoming file extension"""
|
|
318
|
+
|
|
319
|
+
header: Optional[ConditionHeader]
|
|
320
|
+
"""Match an incoming request header"""
|
|
321
|
+
|
|
322
|
+
header_exists: Optional[ConditionHeaderExists]
|
|
323
|
+
"""Match when an incoming request header is present"""
|
|
324
|
+
|
|
325
|
+
http_method: Optional[ConditionHTTPMethod]
|
|
326
|
+
"""Match the incoming HTTP method"""
|
|
327
|
+
|
|
328
|
+
ip: Optional[ConditionIP]
|
|
329
|
+
"""Match the incoming request against a single IP address"""
|
|
330
|
+
|
|
331
|
+
ip_range: Optional[ConditionIPRange]
|
|
332
|
+
"""Match the incoming request against an IP range"""
|
|
333
|
+
|
|
334
|
+
organization: Optional[ConditionOrganization]
|
|
335
|
+
"""
|
|
336
|
+
Match the organization the request originated from, as determined by a WHOIS
|
|
337
|
+
lookup of the requesting IP
|
|
338
|
+
"""
|
|
339
|
+
|
|
340
|
+
owner_types: Optional[ConditionOwnerTypes]
|
|
341
|
+
"""
|
|
342
|
+
Match the type of organization that owns the IP address making an incoming
|
|
343
|
+
request
|
|
344
|
+
"""
|
|
345
|
+
|
|
346
|
+
request_rate: Optional[ConditionRequestRate]
|
|
347
|
+
"""Match the rate at which requests come in that match certain conditions"""
|
|
348
|
+
|
|
349
|
+
response_header: Optional[ConditionResponseHeader]
|
|
350
|
+
"""Match a response header"""
|
|
351
|
+
|
|
352
|
+
response_header_exists: Optional[ConditionResponseHeaderExists]
|
|
353
|
+
"""Match when a response header is present"""
|
|
354
|
+
|
|
355
|
+
session_request_count: Optional[ConditionSessionRequestCount]
|
|
356
|
+
"""Match the number of dynamic page requests made in a WAAP session"""
|
|
357
|
+
|
|
358
|
+
tags: Optional[ConditionTags]
|
|
359
|
+
"""Matches requests based on specified tags"""
|
|
360
|
+
|
|
361
|
+
url: Optional[ConditionURL]
|
|
362
|
+
"""Match the incoming request URL"""
|
|
363
|
+
|
|
364
|
+
user_agent: Optional[ConditionUserAgent]
|
|
365
|
+
"""Match the user agent making the request"""
|
|
366
|
+
|
|
367
|
+
user_defined_tags: Optional[ConditionUserDefinedTags]
|
|
368
|
+
"""Matches requests based on user-defined tags"""
|
|
@@ -0,0 +1,13 @@
|
|
|
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 Iterable
|
|
6
|
+
from typing_extensions import Required, TypedDict
|
|
7
|
+
|
|
8
|
+
__all__ = ["CustomRuleDeleteMultipleParams"]
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class CustomRuleDeleteMultipleParams(TypedDict, total=False):
|
|
12
|
+
rule_ids: Required[Iterable[int]]
|
|
13
|
+
"""The IDs of the rules to delete"""
|
|
@@ -0,0 +1,35 @@
|
|
|
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 Optional
|
|
6
|
+
from typing_extensions import Literal, TypedDict
|
|
7
|
+
|
|
8
|
+
from ..waap_rule_action_type import WaapRuleActionType
|
|
9
|
+
|
|
10
|
+
__all__ = ["CustomRuleListParams"]
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class CustomRuleListParams(TypedDict, total=False):
|
|
14
|
+
action: WaapRuleActionType
|
|
15
|
+
"""Filter to refine results by specific actions"""
|
|
16
|
+
|
|
17
|
+
description: str
|
|
18
|
+
"""Filter rules based on their description. Supports '\\**' as a wildcard character."""
|
|
19
|
+
|
|
20
|
+
enabled: bool
|
|
21
|
+
"""Filter rules based on their active status"""
|
|
22
|
+
|
|
23
|
+
limit: int
|
|
24
|
+
"""Number of items to return"""
|
|
25
|
+
|
|
26
|
+
name: str
|
|
27
|
+
"""Filter rules based on their name. Supports '\\**' as a wildcard character."""
|
|
28
|
+
|
|
29
|
+
offset: int
|
|
30
|
+
"""Number of items to skip"""
|
|
31
|
+
|
|
32
|
+
ordering: Optional[
|
|
33
|
+
Literal["id", "name", "description", "enabled", "action", "-id", "-name", "-description", "-enabled", "-action"]
|
|
34
|
+
]
|
|
35
|
+
"""Determine the field to order results by"""
|