gcore 0.1.0a2__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/__init__.py +5 -0
- gcore/_base_client.py +22 -2
- gcore/_client.py +9 -0
- gcore/_models.py +2 -0
- gcore/_types.py +2 -0
- gcore/_utils/_proxy.py +4 -1
- gcore/_utils/_resources_proxy.py +24 -0
- gcore/_version.py +1 -1
- gcore/resources/__init__.py +14 -0
- gcore/resources/cloud/baremetal/flavors.py +2 -2
- gcore/resources/cloud/baremetal/images.py +2 -2
- gcore/resources/cloud/baremetal/servers.py +280 -52
- gcore/resources/cloud/billing_reservations.py +24 -0
- gcore/resources/cloud/file_shares/file_shares.py +16 -0
- gcore/resources/cloud/floating_ips.py +4 -4
- gcore/resources/cloud/gpu_baremetal_clusters/gpu_baremetal_clusters.py +358 -8
- gcore/resources/cloud/gpu_baremetal_clusters/images.py +206 -2
- gcore/resources/cloud/gpu_baremetal_clusters/servers.py +84 -4
- gcore/resources/cloud/inference/deployments/deployments.py +328 -10
- gcore/resources/cloud/instances/flavors.py +2 -2
- gcore/resources/cloud/instances/images.py +318 -2
- gcore/resources/cloud/instances/instances.py +534 -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 +302 -20
- gcore/resources/cloud/load_balancers/l7_policies/rules.py +326 -0
- gcore/resources/cloud/load_balancers/listeners.py +385 -20
- gcore/resources/cloud/load_balancers/load_balancers.py +392 -24
- gcore/resources/cloud/load_balancers/pools/health_monitors.py +24 -0
- gcore/resources/cloud/load_balancers/pools/members.py +34 -6
- gcore/resources/cloud/load_balancers/pools/pools.py +388 -8
- gcore/resources/cloud/networks/networks.py +72 -16
- 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/secrets.py +56 -11
- gcore/resources/cloud/security_groups/security_groups.py +2 -2
- gcore/resources/cloud/ssh_keys.py +2 -2
- gcore/resources/cloud/tasks.py +203 -184
- gcore/resources/cloud/users/role_assignments.py +4 -4
- gcore/resources/cloud/volumes.py +18 -18
- gcore/resources/waap/__init__.py +131 -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 +173 -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 +914 -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 +271 -0
- 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 +391 -0
- gcore/types/cloud/__init__.py +1 -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/billing_reservation_list_params.py +5 -0
- gcore/types/cloud/container_probe_config.py +1 -1
- gcore/types/cloud/container_probe_config_create_param.py +2 -3
- gcore/types/cloud/container_scale_triggers.py +2 -2
- gcore/types/cloud/file_share.py +3 -0
- gcore/types/cloud/file_share_list_params.py +7 -1
- 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 +21 -1
- 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 +206 -9
- gcore/types/cloud/inference/inference.py +5 -5
- 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 +17 -17
- gcore/types/cloud/load_balancer_pool.py +13 -13
- gcore/types/cloud/load_balancer_pool_list.py +99 -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 +6 -4
- gcore/types/cloud/load_balancers/listener_get_params.py +3 -1
- gcore/types/cloud/load_balancers/listener_list_params.py +4 -2
- gcore/types/cloud/load_balancers/listener_update_params.py +5 -3
- gcore/types/cloud/load_balancers/pool_create_params.py +6 -4
- gcore/types/cloud/load_balancers/pool_list_params.py +5 -6
- gcore/types/cloud/load_balancers/pool_update_params.py +6 -4
- gcore/types/cloud/load_balancers/pools/health_monitor_create_params.py +2 -0
- gcore/types/cloud/load_balancers/pools/member_add_params.py +5 -3
- gcore/types/cloud/member.py +2 -2
- gcore/types/cloud/network.py +22 -22
- gcore/types/cloud/network_create_params.py +2 -0
- gcore/types/cloud/network_details.py +25 -24
- gcore/types/cloud/network_list_params.py +15 -10
- gcore/types/cloud/network_update_params.py +2 -0
- gcore/types/cloud/networks/subnet_create_params.py +1 -1
- gcore/types/cloud/networks/subnet_list_params.py +2 -2
- gcore/types/cloud/quota_get_all_response.py +18 -0
- gcore/types/cloud/quota_get_by_region_response.py +18 -0
- gcore/types/cloud/quotas/request_create_params.py +9 -0
- gcore/types/cloud/quotas/request_get_response.py +9 -0
- gcore/types/cloud/quotas/request_list_response.py +9 -0
- 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/secret_list_params.py +24 -0
- 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 -4
- gcore/types/cloud/task_list_params.py +56 -46
- 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 +108 -0
- 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_params.py +30 -0
- gcore/types/waap/domain_list_rule_sets_response.py +10 -0
- gcore/types/waap/domain_update_params.py +12 -0
- gcore/types/waap/domains/__init__.py +47 -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 +48 -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_detailed_domain.py +37 -0
- gcore/types/waap/waap_domain_api_settings.py +22 -0
- gcore/types/waap/waap_domain_ddos_settings.py +31 -0
- gcore/types/waap/waap_domain_policy.py +29 -0
- gcore/types/waap/waap_domain_settings_model.py +15 -0
- gcore/types/waap/waap_domain_status.py +7 -0
- 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_summary_domain.py +26 -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.1.0a2.dist-info → gcore-0.3.0.dist-info}/METADATA +3 -3
- {gcore-0.1.0a2.dist-info → gcore-0.3.0.dist-info}/RECORD +293 -126
- {gcore-0.1.0a2.dist-info → gcore-0.3.0.dist-info}/WHEEL +0 -0
- {gcore-0.1.0a2.dist-info → gcore-0.3.0.dist-info}/licenses/LICENSE +0 -0
|
@@ -0,0 +1,771 @@
|
|
|
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, Optional
|
|
6
|
+
from typing_extensions import Literal
|
|
7
|
+
|
|
8
|
+
import httpx
|
|
9
|
+
|
|
10
|
+
from ...._types import NOT_GIVEN, Body, Query, Headers, NoneType, NotGiven
|
|
11
|
+
from ...._utils import maybe_transform, async_maybe_transform
|
|
12
|
+
from ...._compat import cached_property
|
|
13
|
+
from ...._resource import SyncAPIResource, AsyncAPIResource
|
|
14
|
+
from ...._response import (
|
|
15
|
+
to_raw_response_wrapper,
|
|
16
|
+
to_streamed_response_wrapper,
|
|
17
|
+
async_to_raw_response_wrapper,
|
|
18
|
+
async_to_streamed_response_wrapper,
|
|
19
|
+
)
|
|
20
|
+
from ....pagination import SyncOffsetPage, AsyncOffsetPage
|
|
21
|
+
from ...._base_client import AsyncPaginator, make_request_options
|
|
22
|
+
from ....types.waap.domains import api_path_list_params, api_path_create_params, api_path_update_params
|
|
23
|
+
from ....types.waap.domains.api_path_get_response import APIPathGetResponse
|
|
24
|
+
from ....types.waap.domains.api_path_list_response import APIPathListResponse
|
|
25
|
+
from ....types.waap.domains.api_path_create_response import APIPathCreateResponse
|
|
26
|
+
|
|
27
|
+
__all__ = ["APIPathsResource", "AsyncAPIPathsResource"]
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
class APIPathsResource(SyncAPIResource):
|
|
31
|
+
@cached_property
|
|
32
|
+
def with_raw_response(self) -> APIPathsResourceWithRawResponse:
|
|
33
|
+
"""
|
|
34
|
+
This property can be used as a prefix for any HTTP method call to return
|
|
35
|
+
the raw response object instead of the parsed content.
|
|
36
|
+
|
|
37
|
+
For more information, see https://www.github.com/G-Core/gcore-python#accessing-raw-response-data-eg-headers
|
|
38
|
+
"""
|
|
39
|
+
return APIPathsResourceWithRawResponse(self)
|
|
40
|
+
|
|
41
|
+
@cached_property
|
|
42
|
+
def with_streaming_response(self) -> APIPathsResourceWithStreamingResponse:
|
|
43
|
+
"""
|
|
44
|
+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
|
45
|
+
|
|
46
|
+
For more information, see https://www.github.com/G-Core/gcore-python#with_streaming_response
|
|
47
|
+
"""
|
|
48
|
+
return APIPathsResourceWithStreamingResponse(self)
|
|
49
|
+
|
|
50
|
+
def create(
|
|
51
|
+
self,
|
|
52
|
+
domain_id: int,
|
|
53
|
+
*,
|
|
54
|
+
http_scheme: Literal["HTTP", "HTTPS"],
|
|
55
|
+
method: Literal["GET", "POST", "PUT", "PATCH", "DELETE", "TRACE", "HEAD", "OPTIONS"],
|
|
56
|
+
path: str,
|
|
57
|
+
api_groups: List[str] | NotGiven = NOT_GIVEN,
|
|
58
|
+
api_version: str | NotGiven = NOT_GIVEN,
|
|
59
|
+
tags: List[str] | NotGiven = NOT_GIVEN,
|
|
60
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
61
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
62
|
+
extra_headers: Headers | None = None,
|
|
63
|
+
extra_query: Query | None = None,
|
|
64
|
+
extra_body: Body | None = None,
|
|
65
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
66
|
+
) -> APIPathCreateResponse:
|
|
67
|
+
"""
|
|
68
|
+
Create an API path for a domain
|
|
69
|
+
|
|
70
|
+
Args:
|
|
71
|
+
domain_id: The domain ID
|
|
72
|
+
|
|
73
|
+
http_scheme: The different HTTP schemes an API path can have
|
|
74
|
+
|
|
75
|
+
method: The different methods an API path can have
|
|
76
|
+
|
|
77
|
+
path: The API path, locations that are saved for resource IDs will be put in curly
|
|
78
|
+
brackets
|
|
79
|
+
|
|
80
|
+
api_groups: An array of api groups associated with the API path
|
|
81
|
+
|
|
82
|
+
api_version: The API version
|
|
83
|
+
|
|
84
|
+
tags: An array of tags associated with the API path
|
|
85
|
+
|
|
86
|
+
extra_headers: Send extra headers
|
|
87
|
+
|
|
88
|
+
extra_query: Add additional query parameters to the request
|
|
89
|
+
|
|
90
|
+
extra_body: Add additional JSON properties to the request
|
|
91
|
+
|
|
92
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
93
|
+
"""
|
|
94
|
+
return self._post(
|
|
95
|
+
f"/waap/v1/domains/{domain_id}/api-paths",
|
|
96
|
+
body=maybe_transform(
|
|
97
|
+
{
|
|
98
|
+
"http_scheme": http_scheme,
|
|
99
|
+
"method": method,
|
|
100
|
+
"path": path,
|
|
101
|
+
"api_groups": api_groups,
|
|
102
|
+
"api_version": api_version,
|
|
103
|
+
"tags": tags,
|
|
104
|
+
},
|
|
105
|
+
api_path_create_params.APIPathCreateParams,
|
|
106
|
+
),
|
|
107
|
+
options=make_request_options(
|
|
108
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
109
|
+
),
|
|
110
|
+
cast_to=APIPathCreateResponse,
|
|
111
|
+
)
|
|
112
|
+
|
|
113
|
+
def update(
|
|
114
|
+
self,
|
|
115
|
+
path_id: str,
|
|
116
|
+
*,
|
|
117
|
+
domain_id: int,
|
|
118
|
+
api_groups: List[str] | NotGiven = NOT_GIVEN,
|
|
119
|
+
path: str | NotGiven = NOT_GIVEN,
|
|
120
|
+
status: Literal["CONFIRMED_API", "POTENTIAL_API", "NOT_API", "DELISTED_API"] | NotGiven = NOT_GIVEN,
|
|
121
|
+
tags: List[str] | NotGiven = NOT_GIVEN,
|
|
122
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
123
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
124
|
+
extra_headers: Headers | None = None,
|
|
125
|
+
extra_query: Query | None = None,
|
|
126
|
+
extra_body: Body | None = None,
|
|
127
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
128
|
+
) -> None:
|
|
129
|
+
"""
|
|
130
|
+
Update a specific API path for a domain
|
|
131
|
+
|
|
132
|
+
Args:
|
|
133
|
+
domain_id: The domain ID
|
|
134
|
+
|
|
135
|
+
path_id: The path ID
|
|
136
|
+
|
|
137
|
+
api_groups: An array of api groups associated with the API path
|
|
138
|
+
|
|
139
|
+
path: The updated API path. When updating the path, variables can be renamed, path
|
|
140
|
+
parts can be converted to variables and vice versa.
|
|
141
|
+
|
|
142
|
+
status: The different statuses an API path can have
|
|
143
|
+
|
|
144
|
+
tags: An array of tags associated with the API path
|
|
145
|
+
|
|
146
|
+
extra_headers: Send extra headers
|
|
147
|
+
|
|
148
|
+
extra_query: Add additional query parameters to the request
|
|
149
|
+
|
|
150
|
+
extra_body: Add additional JSON properties to the request
|
|
151
|
+
|
|
152
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
153
|
+
"""
|
|
154
|
+
if not path_id:
|
|
155
|
+
raise ValueError(f"Expected a non-empty value for `path_id` but received {path_id!r}")
|
|
156
|
+
extra_headers = {"Accept": "*/*", **(extra_headers or {})}
|
|
157
|
+
return self._patch(
|
|
158
|
+
f"/waap/v1/domains/{domain_id}/api-paths/{path_id}",
|
|
159
|
+
body=maybe_transform(
|
|
160
|
+
{
|
|
161
|
+
"api_groups": api_groups,
|
|
162
|
+
"path": path,
|
|
163
|
+
"status": status,
|
|
164
|
+
"tags": tags,
|
|
165
|
+
},
|
|
166
|
+
api_path_update_params.APIPathUpdateParams,
|
|
167
|
+
),
|
|
168
|
+
options=make_request_options(
|
|
169
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
170
|
+
),
|
|
171
|
+
cast_to=NoneType,
|
|
172
|
+
)
|
|
173
|
+
|
|
174
|
+
def list(
|
|
175
|
+
self,
|
|
176
|
+
domain_id: int,
|
|
177
|
+
*,
|
|
178
|
+
api_group: Optional[str] | NotGiven = NOT_GIVEN,
|
|
179
|
+
api_version: Optional[str] | NotGiven = NOT_GIVEN,
|
|
180
|
+
http_scheme: Optional[Literal["HTTP", "HTTPS"]] | NotGiven = NOT_GIVEN,
|
|
181
|
+
ids: Optional[List[str]] | NotGiven = NOT_GIVEN,
|
|
182
|
+
limit: int | NotGiven = NOT_GIVEN,
|
|
183
|
+
method: Optional[Literal["GET", "POST", "PUT", "PATCH", "DELETE", "TRACE", "HEAD", "OPTIONS"]]
|
|
184
|
+
| NotGiven = NOT_GIVEN,
|
|
185
|
+
offset: int | NotGiven = NOT_GIVEN,
|
|
186
|
+
ordering: Literal[
|
|
187
|
+
"id",
|
|
188
|
+
"path",
|
|
189
|
+
"method",
|
|
190
|
+
"api_version",
|
|
191
|
+
"http_scheme",
|
|
192
|
+
"first_detected",
|
|
193
|
+
"last_detected",
|
|
194
|
+
"status",
|
|
195
|
+
"source",
|
|
196
|
+
"-id",
|
|
197
|
+
"-path",
|
|
198
|
+
"-method",
|
|
199
|
+
"-api_version",
|
|
200
|
+
"-http_scheme",
|
|
201
|
+
"-first_detected",
|
|
202
|
+
"-last_detected",
|
|
203
|
+
"-status",
|
|
204
|
+
"-source",
|
|
205
|
+
]
|
|
206
|
+
| NotGiven = NOT_GIVEN,
|
|
207
|
+
path: Optional[str] | NotGiven = NOT_GIVEN,
|
|
208
|
+
source: Optional[Literal["API_DESCRIPTION_FILE", "TRAFFIC_SCAN", "USER_DEFINED"]] | NotGiven = NOT_GIVEN,
|
|
209
|
+
status: Optional[List[Literal["CONFIRMED_API", "POTENTIAL_API", "NOT_API", "DELISTED_API"]]]
|
|
210
|
+
| NotGiven = NOT_GIVEN,
|
|
211
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
212
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
213
|
+
extra_headers: Headers | None = None,
|
|
214
|
+
extra_query: Query | None = None,
|
|
215
|
+
extra_body: Body | None = None,
|
|
216
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
217
|
+
) -> SyncOffsetPage[APIPathListResponse]:
|
|
218
|
+
"""
|
|
219
|
+
Retrieve a list of API paths for a specific domain
|
|
220
|
+
|
|
221
|
+
Args:
|
|
222
|
+
domain_id: The domain ID
|
|
223
|
+
|
|
224
|
+
api_group: Filter by the API group associated with the API path
|
|
225
|
+
|
|
226
|
+
api_version: Filter by the API version
|
|
227
|
+
|
|
228
|
+
http_scheme: The different HTTP schemes an API path can have
|
|
229
|
+
|
|
230
|
+
ids: Filter by the path ID
|
|
231
|
+
|
|
232
|
+
limit: Number of items to return
|
|
233
|
+
|
|
234
|
+
method: The different methods an API path can have
|
|
235
|
+
|
|
236
|
+
offset: Number of items to skip
|
|
237
|
+
|
|
238
|
+
ordering: Sort the response by given field.
|
|
239
|
+
|
|
240
|
+
path: Filter by the path. Supports '\\**' as a wildcard character
|
|
241
|
+
|
|
242
|
+
source: The different sources an API path can have
|
|
243
|
+
|
|
244
|
+
status: Filter by the status of the discovered API path
|
|
245
|
+
|
|
246
|
+
extra_headers: Send extra headers
|
|
247
|
+
|
|
248
|
+
extra_query: Add additional query parameters to the request
|
|
249
|
+
|
|
250
|
+
extra_body: Add additional JSON properties to the request
|
|
251
|
+
|
|
252
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
253
|
+
"""
|
|
254
|
+
return self._get_api_list(
|
|
255
|
+
f"/waap/v1/domains/{domain_id}/api-paths",
|
|
256
|
+
page=SyncOffsetPage[APIPathListResponse],
|
|
257
|
+
options=make_request_options(
|
|
258
|
+
extra_headers=extra_headers,
|
|
259
|
+
extra_query=extra_query,
|
|
260
|
+
extra_body=extra_body,
|
|
261
|
+
timeout=timeout,
|
|
262
|
+
query=maybe_transform(
|
|
263
|
+
{
|
|
264
|
+
"api_group": api_group,
|
|
265
|
+
"api_version": api_version,
|
|
266
|
+
"http_scheme": http_scheme,
|
|
267
|
+
"ids": ids,
|
|
268
|
+
"limit": limit,
|
|
269
|
+
"method": method,
|
|
270
|
+
"offset": offset,
|
|
271
|
+
"ordering": ordering,
|
|
272
|
+
"path": path,
|
|
273
|
+
"source": source,
|
|
274
|
+
"status": status,
|
|
275
|
+
},
|
|
276
|
+
api_path_list_params.APIPathListParams,
|
|
277
|
+
),
|
|
278
|
+
),
|
|
279
|
+
model=APIPathListResponse,
|
|
280
|
+
)
|
|
281
|
+
|
|
282
|
+
def delete(
|
|
283
|
+
self,
|
|
284
|
+
path_id: str,
|
|
285
|
+
*,
|
|
286
|
+
domain_id: int,
|
|
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
|
+
) -> None:
|
|
294
|
+
"""
|
|
295
|
+
Delete a specific API path for a domain
|
|
296
|
+
|
|
297
|
+
Args:
|
|
298
|
+
domain_id: The domain ID
|
|
299
|
+
|
|
300
|
+
path_id: The path ID
|
|
301
|
+
|
|
302
|
+
extra_headers: Send extra headers
|
|
303
|
+
|
|
304
|
+
extra_query: Add additional query parameters to the request
|
|
305
|
+
|
|
306
|
+
extra_body: Add additional JSON properties to the request
|
|
307
|
+
|
|
308
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
309
|
+
"""
|
|
310
|
+
if not path_id:
|
|
311
|
+
raise ValueError(f"Expected a non-empty value for `path_id` but received {path_id!r}")
|
|
312
|
+
extra_headers = {"Accept": "*/*", **(extra_headers or {})}
|
|
313
|
+
return self._delete(
|
|
314
|
+
f"/waap/v1/domains/{domain_id}/api-paths/{path_id}",
|
|
315
|
+
options=make_request_options(
|
|
316
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
317
|
+
),
|
|
318
|
+
cast_to=NoneType,
|
|
319
|
+
)
|
|
320
|
+
|
|
321
|
+
def get(
|
|
322
|
+
self,
|
|
323
|
+
path_id: str,
|
|
324
|
+
*,
|
|
325
|
+
domain_id: int,
|
|
326
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
327
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
328
|
+
extra_headers: Headers | None = None,
|
|
329
|
+
extra_query: Query | None = None,
|
|
330
|
+
extra_body: Body | None = None,
|
|
331
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
332
|
+
) -> APIPathGetResponse:
|
|
333
|
+
"""
|
|
334
|
+
Retrieve a specific API path for a domain
|
|
335
|
+
|
|
336
|
+
Args:
|
|
337
|
+
domain_id: The domain ID
|
|
338
|
+
|
|
339
|
+
path_id: The path ID
|
|
340
|
+
|
|
341
|
+
extra_headers: Send extra headers
|
|
342
|
+
|
|
343
|
+
extra_query: Add additional query parameters to the request
|
|
344
|
+
|
|
345
|
+
extra_body: Add additional JSON properties to the request
|
|
346
|
+
|
|
347
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
348
|
+
"""
|
|
349
|
+
if not path_id:
|
|
350
|
+
raise ValueError(f"Expected a non-empty value for `path_id` but received {path_id!r}")
|
|
351
|
+
return self._get(
|
|
352
|
+
f"/waap/v1/domains/{domain_id}/api-paths/{path_id}",
|
|
353
|
+
options=make_request_options(
|
|
354
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
355
|
+
),
|
|
356
|
+
cast_to=APIPathGetResponse,
|
|
357
|
+
)
|
|
358
|
+
|
|
359
|
+
|
|
360
|
+
class AsyncAPIPathsResource(AsyncAPIResource):
|
|
361
|
+
@cached_property
|
|
362
|
+
def with_raw_response(self) -> AsyncAPIPathsResourceWithRawResponse:
|
|
363
|
+
"""
|
|
364
|
+
This property can be used as a prefix for any HTTP method call to return
|
|
365
|
+
the raw response object instead of the parsed content.
|
|
366
|
+
|
|
367
|
+
For more information, see https://www.github.com/G-Core/gcore-python#accessing-raw-response-data-eg-headers
|
|
368
|
+
"""
|
|
369
|
+
return AsyncAPIPathsResourceWithRawResponse(self)
|
|
370
|
+
|
|
371
|
+
@cached_property
|
|
372
|
+
def with_streaming_response(self) -> AsyncAPIPathsResourceWithStreamingResponse:
|
|
373
|
+
"""
|
|
374
|
+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
|
375
|
+
|
|
376
|
+
For more information, see https://www.github.com/G-Core/gcore-python#with_streaming_response
|
|
377
|
+
"""
|
|
378
|
+
return AsyncAPIPathsResourceWithStreamingResponse(self)
|
|
379
|
+
|
|
380
|
+
async def create(
|
|
381
|
+
self,
|
|
382
|
+
domain_id: int,
|
|
383
|
+
*,
|
|
384
|
+
http_scheme: Literal["HTTP", "HTTPS"],
|
|
385
|
+
method: Literal["GET", "POST", "PUT", "PATCH", "DELETE", "TRACE", "HEAD", "OPTIONS"],
|
|
386
|
+
path: str,
|
|
387
|
+
api_groups: List[str] | NotGiven = NOT_GIVEN,
|
|
388
|
+
api_version: str | NotGiven = NOT_GIVEN,
|
|
389
|
+
tags: List[str] | NotGiven = NOT_GIVEN,
|
|
390
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
391
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
392
|
+
extra_headers: Headers | None = None,
|
|
393
|
+
extra_query: Query | None = None,
|
|
394
|
+
extra_body: Body | None = None,
|
|
395
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
396
|
+
) -> APIPathCreateResponse:
|
|
397
|
+
"""
|
|
398
|
+
Create an API path for a domain
|
|
399
|
+
|
|
400
|
+
Args:
|
|
401
|
+
domain_id: The domain ID
|
|
402
|
+
|
|
403
|
+
http_scheme: The different HTTP schemes an API path can have
|
|
404
|
+
|
|
405
|
+
method: The different methods an API path can have
|
|
406
|
+
|
|
407
|
+
path: The API path, locations that are saved for resource IDs will be put in curly
|
|
408
|
+
brackets
|
|
409
|
+
|
|
410
|
+
api_groups: An array of api groups associated with the API path
|
|
411
|
+
|
|
412
|
+
api_version: The API version
|
|
413
|
+
|
|
414
|
+
tags: An array of tags associated with the API path
|
|
415
|
+
|
|
416
|
+
extra_headers: Send extra headers
|
|
417
|
+
|
|
418
|
+
extra_query: Add additional query parameters to the request
|
|
419
|
+
|
|
420
|
+
extra_body: Add additional JSON properties to the request
|
|
421
|
+
|
|
422
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
423
|
+
"""
|
|
424
|
+
return await self._post(
|
|
425
|
+
f"/waap/v1/domains/{domain_id}/api-paths",
|
|
426
|
+
body=await async_maybe_transform(
|
|
427
|
+
{
|
|
428
|
+
"http_scheme": http_scheme,
|
|
429
|
+
"method": method,
|
|
430
|
+
"path": path,
|
|
431
|
+
"api_groups": api_groups,
|
|
432
|
+
"api_version": api_version,
|
|
433
|
+
"tags": tags,
|
|
434
|
+
},
|
|
435
|
+
api_path_create_params.APIPathCreateParams,
|
|
436
|
+
),
|
|
437
|
+
options=make_request_options(
|
|
438
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
439
|
+
),
|
|
440
|
+
cast_to=APIPathCreateResponse,
|
|
441
|
+
)
|
|
442
|
+
|
|
443
|
+
async def update(
|
|
444
|
+
self,
|
|
445
|
+
path_id: str,
|
|
446
|
+
*,
|
|
447
|
+
domain_id: int,
|
|
448
|
+
api_groups: List[str] | NotGiven = NOT_GIVEN,
|
|
449
|
+
path: str | NotGiven = NOT_GIVEN,
|
|
450
|
+
status: Literal["CONFIRMED_API", "POTENTIAL_API", "NOT_API", "DELISTED_API"] | NotGiven = NOT_GIVEN,
|
|
451
|
+
tags: List[str] | NotGiven = NOT_GIVEN,
|
|
452
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
453
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
454
|
+
extra_headers: Headers | None = None,
|
|
455
|
+
extra_query: Query | None = None,
|
|
456
|
+
extra_body: Body | None = None,
|
|
457
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
458
|
+
) -> None:
|
|
459
|
+
"""
|
|
460
|
+
Update a specific API path for a domain
|
|
461
|
+
|
|
462
|
+
Args:
|
|
463
|
+
domain_id: The domain ID
|
|
464
|
+
|
|
465
|
+
path_id: The path ID
|
|
466
|
+
|
|
467
|
+
api_groups: An array of api groups associated with the API path
|
|
468
|
+
|
|
469
|
+
path: The updated API path. When updating the path, variables can be renamed, path
|
|
470
|
+
parts can be converted to variables and vice versa.
|
|
471
|
+
|
|
472
|
+
status: The different statuses an API path can have
|
|
473
|
+
|
|
474
|
+
tags: An array of tags associated with the API path
|
|
475
|
+
|
|
476
|
+
extra_headers: Send extra headers
|
|
477
|
+
|
|
478
|
+
extra_query: Add additional query parameters to the request
|
|
479
|
+
|
|
480
|
+
extra_body: Add additional JSON properties to the request
|
|
481
|
+
|
|
482
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
483
|
+
"""
|
|
484
|
+
if not path_id:
|
|
485
|
+
raise ValueError(f"Expected a non-empty value for `path_id` but received {path_id!r}")
|
|
486
|
+
extra_headers = {"Accept": "*/*", **(extra_headers or {})}
|
|
487
|
+
return await self._patch(
|
|
488
|
+
f"/waap/v1/domains/{domain_id}/api-paths/{path_id}",
|
|
489
|
+
body=await async_maybe_transform(
|
|
490
|
+
{
|
|
491
|
+
"api_groups": api_groups,
|
|
492
|
+
"path": path,
|
|
493
|
+
"status": status,
|
|
494
|
+
"tags": tags,
|
|
495
|
+
},
|
|
496
|
+
api_path_update_params.APIPathUpdateParams,
|
|
497
|
+
),
|
|
498
|
+
options=make_request_options(
|
|
499
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
500
|
+
),
|
|
501
|
+
cast_to=NoneType,
|
|
502
|
+
)
|
|
503
|
+
|
|
504
|
+
def list(
|
|
505
|
+
self,
|
|
506
|
+
domain_id: int,
|
|
507
|
+
*,
|
|
508
|
+
api_group: Optional[str] | NotGiven = NOT_GIVEN,
|
|
509
|
+
api_version: Optional[str] | NotGiven = NOT_GIVEN,
|
|
510
|
+
http_scheme: Optional[Literal["HTTP", "HTTPS"]] | NotGiven = NOT_GIVEN,
|
|
511
|
+
ids: Optional[List[str]] | NotGiven = NOT_GIVEN,
|
|
512
|
+
limit: int | NotGiven = NOT_GIVEN,
|
|
513
|
+
method: Optional[Literal["GET", "POST", "PUT", "PATCH", "DELETE", "TRACE", "HEAD", "OPTIONS"]]
|
|
514
|
+
| NotGiven = NOT_GIVEN,
|
|
515
|
+
offset: int | NotGiven = NOT_GIVEN,
|
|
516
|
+
ordering: Literal[
|
|
517
|
+
"id",
|
|
518
|
+
"path",
|
|
519
|
+
"method",
|
|
520
|
+
"api_version",
|
|
521
|
+
"http_scheme",
|
|
522
|
+
"first_detected",
|
|
523
|
+
"last_detected",
|
|
524
|
+
"status",
|
|
525
|
+
"source",
|
|
526
|
+
"-id",
|
|
527
|
+
"-path",
|
|
528
|
+
"-method",
|
|
529
|
+
"-api_version",
|
|
530
|
+
"-http_scheme",
|
|
531
|
+
"-first_detected",
|
|
532
|
+
"-last_detected",
|
|
533
|
+
"-status",
|
|
534
|
+
"-source",
|
|
535
|
+
]
|
|
536
|
+
| NotGiven = NOT_GIVEN,
|
|
537
|
+
path: Optional[str] | NotGiven = NOT_GIVEN,
|
|
538
|
+
source: Optional[Literal["API_DESCRIPTION_FILE", "TRAFFIC_SCAN", "USER_DEFINED"]] | NotGiven = NOT_GIVEN,
|
|
539
|
+
status: Optional[List[Literal["CONFIRMED_API", "POTENTIAL_API", "NOT_API", "DELISTED_API"]]]
|
|
540
|
+
| 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
|
+
) -> AsyncPaginator[APIPathListResponse, AsyncOffsetPage[APIPathListResponse]]:
|
|
548
|
+
"""
|
|
549
|
+
Retrieve a list of API paths for a specific domain
|
|
550
|
+
|
|
551
|
+
Args:
|
|
552
|
+
domain_id: The domain ID
|
|
553
|
+
|
|
554
|
+
api_group: Filter by the API group associated with the API path
|
|
555
|
+
|
|
556
|
+
api_version: Filter by the API version
|
|
557
|
+
|
|
558
|
+
http_scheme: The different HTTP schemes an API path can have
|
|
559
|
+
|
|
560
|
+
ids: Filter by the path ID
|
|
561
|
+
|
|
562
|
+
limit: Number of items to return
|
|
563
|
+
|
|
564
|
+
method: The different methods an API path can have
|
|
565
|
+
|
|
566
|
+
offset: Number of items to skip
|
|
567
|
+
|
|
568
|
+
ordering: Sort the response by given field.
|
|
569
|
+
|
|
570
|
+
path: Filter by the path. Supports '\\**' as a wildcard character
|
|
571
|
+
|
|
572
|
+
source: The different sources an API path can have
|
|
573
|
+
|
|
574
|
+
status: Filter by the status of the discovered API path
|
|
575
|
+
|
|
576
|
+
extra_headers: Send extra headers
|
|
577
|
+
|
|
578
|
+
extra_query: Add additional query parameters to the request
|
|
579
|
+
|
|
580
|
+
extra_body: Add additional JSON properties to the request
|
|
581
|
+
|
|
582
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
583
|
+
"""
|
|
584
|
+
return self._get_api_list(
|
|
585
|
+
f"/waap/v1/domains/{domain_id}/api-paths",
|
|
586
|
+
page=AsyncOffsetPage[APIPathListResponse],
|
|
587
|
+
options=make_request_options(
|
|
588
|
+
extra_headers=extra_headers,
|
|
589
|
+
extra_query=extra_query,
|
|
590
|
+
extra_body=extra_body,
|
|
591
|
+
timeout=timeout,
|
|
592
|
+
query=maybe_transform(
|
|
593
|
+
{
|
|
594
|
+
"api_group": api_group,
|
|
595
|
+
"api_version": api_version,
|
|
596
|
+
"http_scheme": http_scheme,
|
|
597
|
+
"ids": ids,
|
|
598
|
+
"limit": limit,
|
|
599
|
+
"method": method,
|
|
600
|
+
"offset": offset,
|
|
601
|
+
"ordering": ordering,
|
|
602
|
+
"path": path,
|
|
603
|
+
"source": source,
|
|
604
|
+
"status": status,
|
|
605
|
+
},
|
|
606
|
+
api_path_list_params.APIPathListParams,
|
|
607
|
+
),
|
|
608
|
+
),
|
|
609
|
+
model=APIPathListResponse,
|
|
610
|
+
)
|
|
611
|
+
|
|
612
|
+
async def delete(
|
|
613
|
+
self,
|
|
614
|
+
path_id: str,
|
|
615
|
+
*,
|
|
616
|
+
domain_id: int,
|
|
617
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
618
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
619
|
+
extra_headers: Headers | None = None,
|
|
620
|
+
extra_query: Query | None = None,
|
|
621
|
+
extra_body: Body | None = None,
|
|
622
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
623
|
+
) -> None:
|
|
624
|
+
"""
|
|
625
|
+
Delete a specific API path for a domain
|
|
626
|
+
|
|
627
|
+
Args:
|
|
628
|
+
domain_id: The domain ID
|
|
629
|
+
|
|
630
|
+
path_id: The path ID
|
|
631
|
+
|
|
632
|
+
extra_headers: Send extra headers
|
|
633
|
+
|
|
634
|
+
extra_query: Add additional query parameters to the request
|
|
635
|
+
|
|
636
|
+
extra_body: Add additional JSON properties to the request
|
|
637
|
+
|
|
638
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
639
|
+
"""
|
|
640
|
+
if not path_id:
|
|
641
|
+
raise ValueError(f"Expected a non-empty value for `path_id` but received {path_id!r}")
|
|
642
|
+
extra_headers = {"Accept": "*/*", **(extra_headers or {})}
|
|
643
|
+
return await self._delete(
|
|
644
|
+
f"/waap/v1/domains/{domain_id}/api-paths/{path_id}",
|
|
645
|
+
options=make_request_options(
|
|
646
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
647
|
+
),
|
|
648
|
+
cast_to=NoneType,
|
|
649
|
+
)
|
|
650
|
+
|
|
651
|
+
async def get(
|
|
652
|
+
self,
|
|
653
|
+
path_id: str,
|
|
654
|
+
*,
|
|
655
|
+
domain_id: int,
|
|
656
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
657
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
658
|
+
extra_headers: Headers | None = None,
|
|
659
|
+
extra_query: Query | None = None,
|
|
660
|
+
extra_body: Body | None = None,
|
|
661
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
662
|
+
) -> APIPathGetResponse:
|
|
663
|
+
"""
|
|
664
|
+
Retrieve a specific API path for a domain
|
|
665
|
+
|
|
666
|
+
Args:
|
|
667
|
+
domain_id: The domain ID
|
|
668
|
+
|
|
669
|
+
path_id: The path ID
|
|
670
|
+
|
|
671
|
+
extra_headers: Send extra headers
|
|
672
|
+
|
|
673
|
+
extra_query: Add additional query parameters to the request
|
|
674
|
+
|
|
675
|
+
extra_body: Add additional JSON properties to the request
|
|
676
|
+
|
|
677
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
678
|
+
"""
|
|
679
|
+
if not path_id:
|
|
680
|
+
raise ValueError(f"Expected a non-empty value for `path_id` but received {path_id!r}")
|
|
681
|
+
return await self._get(
|
|
682
|
+
f"/waap/v1/domains/{domain_id}/api-paths/{path_id}",
|
|
683
|
+
options=make_request_options(
|
|
684
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
685
|
+
),
|
|
686
|
+
cast_to=APIPathGetResponse,
|
|
687
|
+
)
|
|
688
|
+
|
|
689
|
+
|
|
690
|
+
class APIPathsResourceWithRawResponse:
|
|
691
|
+
def __init__(self, api_paths: APIPathsResource) -> None:
|
|
692
|
+
self._api_paths = api_paths
|
|
693
|
+
|
|
694
|
+
self.create = to_raw_response_wrapper(
|
|
695
|
+
api_paths.create,
|
|
696
|
+
)
|
|
697
|
+
self.update = to_raw_response_wrapper(
|
|
698
|
+
api_paths.update,
|
|
699
|
+
)
|
|
700
|
+
self.list = to_raw_response_wrapper(
|
|
701
|
+
api_paths.list,
|
|
702
|
+
)
|
|
703
|
+
self.delete = to_raw_response_wrapper(
|
|
704
|
+
api_paths.delete,
|
|
705
|
+
)
|
|
706
|
+
self.get = to_raw_response_wrapper(
|
|
707
|
+
api_paths.get,
|
|
708
|
+
)
|
|
709
|
+
|
|
710
|
+
|
|
711
|
+
class AsyncAPIPathsResourceWithRawResponse:
|
|
712
|
+
def __init__(self, api_paths: AsyncAPIPathsResource) -> None:
|
|
713
|
+
self._api_paths = api_paths
|
|
714
|
+
|
|
715
|
+
self.create = async_to_raw_response_wrapper(
|
|
716
|
+
api_paths.create,
|
|
717
|
+
)
|
|
718
|
+
self.update = async_to_raw_response_wrapper(
|
|
719
|
+
api_paths.update,
|
|
720
|
+
)
|
|
721
|
+
self.list = async_to_raw_response_wrapper(
|
|
722
|
+
api_paths.list,
|
|
723
|
+
)
|
|
724
|
+
self.delete = async_to_raw_response_wrapper(
|
|
725
|
+
api_paths.delete,
|
|
726
|
+
)
|
|
727
|
+
self.get = async_to_raw_response_wrapper(
|
|
728
|
+
api_paths.get,
|
|
729
|
+
)
|
|
730
|
+
|
|
731
|
+
|
|
732
|
+
class APIPathsResourceWithStreamingResponse:
|
|
733
|
+
def __init__(self, api_paths: APIPathsResource) -> None:
|
|
734
|
+
self._api_paths = api_paths
|
|
735
|
+
|
|
736
|
+
self.create = to_streamed_response_wrapper(
|
|
737
|
+
api_paths.create,
|
|
738
|
+
)
|
|
739
|
+
self.update = to_streamed_response_wrapper(
|
|
740
|
+
api_paths.update,
|
|
741
|
+
)
|
|
742
|
+
self.list = to_streamed_response_wrapper(
|
|
743
|
+
api_paths.list,
|
|
744
|
+
)
|
|
745
|
+
self.delete = to_streamed_response_wrapper(
|
|
746
|
+
api_paths.delete,
|
|
747
|
+
)
|
|
748
|
+
self.get = to_streamed_response_wrapper(
|
|
749
|
+
api_paths.get,
|
|
750
|
+
)
|
|
751
|
+
|
|
752
|
+
|
|
753
|
+
class AsyncAPIPathsResourceWithStreamingResponse:
|
|
754
|
+
def __init__(self, api_paths: AsyncAPIPathsResource) -> None:
|
|
755
|
+
self._api_paths = api_paths
|
|
756
|
+
|
|
757
|
+
self.create = async_to_streamed_response_wrapper(
|
|
758
|
+
api_paths.create,
|
|
759
|
+
)
|
|
760
|
+
self.update = async_to_streamed_response_wrapper(
|
|
761
|
+
api_paths.update,
|
|
762
|
+
)
|
|
763
|
+
self.list = async_to_streamed_response_wrapper(
|
|
764
|
+
api_paths.list,
|
|
765
|
+
)
|
|
766
|
+
self.delete = async_to_streamed_response_wrapper(
|
|
767
|
+
api_paths.delete,
|
|
768
|
+
)
|
|
769
|
+
self.get = async_to_streamed_response_wrapper(
|
|
770
|
+
api_paths.get,
|
|
771
|
+
)
|