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,217 @@
|
|
|
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
|
|
7
|
+
|
|
8
|
+
import httpx
|
|
9
|
+
|
|
10
|
+
from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven
|
|
11
|
+
from ..._utils import 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 ...types.waap import organization_list_params
|
|
22
|
+
from ..._base_client import AsyncPaginator, make_request_options
|
|
23
|
+
from ...types.waap.waap_organization import WaapOrganization
|
|
24
|
+
|
|
25
|
+
__all__ = ["OrganizationsResource", "AsyncOrganizationsResource"]
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
class OrganizationsResource(SyncAPIResource):
|
|
29
|
+
@cached_property
|
|
30
|
+
def with_raw_response(self) -> OrganizationsResourceWithRawResponse:
|
|
31
|
+
"""
|
|
32
|
+
This property can be used as a prefix for any HTTP method call to return
|
|
33
|
+
the raw response object instead of the parsed content.
|
|
34
|
+
|
|
35
|
+
For more information, see https://www.github.com/G-Core/gcore-python#accessing-raw-response-data-eg-headers
|
|
36
|
+
"""
|
|
37
|
+
return OrganizationsResourceWithRawResponse(self)
|
|
38
|
+
|
|
39
|
+
@cached_property
|
|
40
|
+
def with_streaming_response(self) -> OrganizationsResourceWithStreamingResponse:
|
|
41
|
+
"""
|
|
42
|
+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
|
43
|
+
|
|
44
|
+
For more information, see https://www.github.com/G-Core/gcore-python#with_streaming_response
|
|
45
|
+
"""
|
|
46
|
+
return OrganizationsResourceWithStreamingResponse(self)
|
|
47
|
+
|
|
48
|
+
def list(
|
|
49
|
+
self,
|
|
50
|
+
*,
|
|
51
|
+
limit: int | NotGiven = NOT_GIVEN,
|
|
52
|
+
name: str | NotGiven = NOT_GIVEN,
|
|
53
|
+
offset: int | NotGiven = NOT_GIVEN,
|
|
54
|
+
ordering: Optional[Literal["name", "id", "-name", "-id"]] | NotGiven = NOT_GIVEN,
|
|
55
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
56
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
57
|
+
extra_headers: Headers | None = None,
|
|
58
|
+
extra_query: Query | None = None,
|
|
59
|
+
extra_body: Body | None = None,
|
|
60
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
61
|
+
) -> SyncOffsetPage[WaapOrganization]:
|
|
62
|
+
"""
|
|
63
|
+
This endpoint retrieves a list of network organizations that own IP ranges as
|
|
64
|
+
identified by the Whois service.It supports pagination, filtering based on
|
|
65
|
+
various parameters, and ordering of results.
|
|
66
|
+
|
|
67
|
+
Args:
|
|
68
|
+
limit: Number of items to return
|
|
69
|
+
|
|
70
|
+
name: Filter organizations by their name. Supports '\\**' as a wildcard character.
|
|
71
|
+
|
|
72
|
+
offset: Number of items to skip
|
|
73
|
+
|
|
74
|
+
ordering: Determine the field to order results by
|
|
75
|
+
|
|
76
|
+
extra_headers: Send extra headers
|
|
77
|
+
|
|
78
|
+
extra_query: Add additional query parameters to the request
|
|
79
|
+
|
|
80
|
+
extra_body: Add additional JSON properties to the request
|
|
81
|
+
|
|
82
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
83
|
+
"""
|
|
84
|
+
return self._get_api_list(
|
|
85
|
+
"/waap/v1/organizations",
|
|
86
|
+
page=SyncOffsetPage[WaapOrganization],
|
|
87
|
+
options=make_request_options(
|
|
88
|
+
extra_headers=extra_headers,
|
|
89
|
+
extra_query=extra_query,
|
|
90
|
+
extra_body=extra_body,
|
|
91
|
+
timeout=timeout,
|
|
92
|
+
query=maybe_transform(
|
|
93
|
+
{
|
|
94
|
+
"limit": limit,
|
|
95
|
+
"name": name,
|
|
96
|
+
"offset": offset,
|
|
97
|
+
"ordering": ordering,
|
|
98
|
+
},
|
|
99
|
+
organization_list_params.OrganizationListParams,
|
|
100
|
+
),
|
|
101
|
+
),
|
|
102
|
+
model=WaapOrganization,
|
|
103
|
+
)
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
class AsyncOrganizationsResource(AsyncAPIResource):
|
|
107
|
+
@cached_property
|
|
108
|
+
def with_raw_response(self) -> AsyncOrganizationsResourceWithRawResponse:
|
|
109
|
+
"""
|
|
110
|
+
This property can be used as a prefix for any HTTP method call to return
|
|
111
|
+
the raw response object instead of the parsed content.
|
|
112
|
+
|
|
113
|
+
For more information, see https://www.github.com/G-Core/gcore-python#accessing-raw-response-data-eg-headers
|
|
114
|
+
"""
|
|
115
|
+
return AsyncOrganizationsResourceWithRawResponse(self)
|
|
116
|
+
|
|
117
|
+
@cached_property
|
|
118
|
+
def with_streaming_response(self) -> AsyncOrganizationsResourceWithStreamingResponse:
|
|
119
|
+
"""
|
|
120
|
+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
|
121
|
+
|
|
122
|
+
For more information, see https://www.github.com/G-Core/gcore-python#with_streaming_response
|
|
123
|
+
"""
|
|
124
|
+
return AsyncOrganizationsResourceWithStreamingResponse(self)
|
|
125
|
+
|
|
126
|
+
def list(
|
|
127
|
+
self,
|
|
128
|
+
*,
|
|
129
|
+
limit: int | NotGiven = NOT_GIVEN,
|
|
130
|
+
name: str | NotGiven = NOT_GIVEN,
|
|
131
|
+
offset: int | NotGiven = NOT_GIVEN,
|
|
132
|
+
ordering: Optional[Literal["name", "id", "-name", "-id"]] | NotGiven = NOT_GIVEN,
|
|
133
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
134
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
135
|
+
extra_headers: Headers | None = None,
|
|
136
|
+
extra_query: Query | None = None,
|
|
137
|
+
extra_body: Body | None = None,
|
|
138
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
139
|
+
) -> AsyncPaginator[WaapOrganization, AsyncOffsetPage[WaapOrganization]]:
|
|
140
|
+
"""
|
|
141
|
+
This endpoint retrieves a list of network organizations that own IP ranges as
|
|
142
|
+
identified by the Whois service.It supports pagination, filtering based on
|
|
143
|
+
various parameters, and ordering of results.
|
|
144
|
+
|
|
145
|
+
Args:
|
|
146
|
+
limit: Number of items to return
|
|
147
|
+
|
|
148
|
+
name: Filter organizations by their name. Supports '\\**' as a wildcard character.
|
|
149
|
+
|
|
150
|
+
offset: Number of items to skip
|
|
151
|
+
|
|
152
|
+
ordering: Determine the field to order results by
|
|
153
|
+
|
|
154
|
+
extra_headers: Send extra headers
|
|
155
|
+
|
|
156
|
+
extra_query: Add additional query parameters to the request
|
|
157
|
+
|
|
158
|
+
extra_body: Add additional JSON properties to the request
|
|
159
|
+
|
|
160
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
161
|
+
"""
|
|
162
|
+
return self._get_api_list(
|
|
163
|
+
"/waap/v1/organizations",
|
|
164
|
+
page=AsyncOffsetPage[WaapOrganization],
|
|
165
|
+
options=make_request_options(
|
|
166
|
+
extra_headers=extra_headers,
|
|
167
|
+
extra_query=extra_query,
|
|
168
|
+
extra_body=extra_body,
|
|
169
|
+
timeout=timeout,
|
|
170
|
+
query=maybe_transform(
|
|
171
|
+
{
|
|
172
|
+
"limit": limit,
|
|
173
|
+
"name": name,
|
|
174
|
+
"offset": offset,
|
|
175
|
+
"ordering": ordering,
|
|
176
|
+
},
|
|
177
|
+
organization_list_params.OrganizationListParams,
|
|
178
|
+
),
|
|
179
|
+
),
|
|
180
|
+
model=WaapOrganization,
|
|
181
|
+
)
|
|
182
|
+
|
|
183
|
+
|
|
184
|
+
class OrganizationsResourceWithRawResponse:
|
|
185
|
+
def __init__(self, organizations: OrganizationsResource) -> None:
|
|
186
|
+
self._organizations = organizations
|
|
187
|
+
|
|
188
|
+
self.list = to_raw_response_wrapper(
|
|
189
|
+
organizations.list,
|
|
190
|
+
)
|
|
191
|
+
|
|
192
|
+
|
|
193
|
+
class AsyncOrganizationsResourceWithRawResponse:
|
|
194
|
+
def __init__(self, organizations: AsyncOrganizationsResource) -> None:
|
|
195
|
+
self._organizations = organizations
|
|
196
|
+
|
|
197
|
+
self.list = async_to_raw_response_wrapper(
|
|
198
|
+
organizations.list,
|
|
199
|
+
)
|
|
200
|
+
|
|
201
|
+
|
|
202
|
+
class OrganizationsResourceWithStreamingResponse:
|
|
203
|
+
def __init__(self, organizations: OrganizationsResource) -> None:
|
|
204
|
+
self._organizations = organizations
|
|
205
|
+
|
|
206
|
+
self.list = to_streamed_response_wrapper(
|
|
207
|
+
organizations.list,
|
|
208
|
+
)
|
|
209
|
+
|
|
210
|
+
|
|
211
|
+
class AsyncOrganizationsResourceWithStreamingResponse:
|
|
212
|
+
def __init__(self, organizations: AsyncOrganizationsResource) -> None:
|
|
213
|
+
self._organizations = organizations
|
|
214
|
+
|
|
215
|
+
self.list = async_to_streamed_response_wrapper(
|
|
216
|
+
organizations.list,
|
|
217
|
+
)
|
|
@@ -0,0 +1,225 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from typing import List, Union
|
|
6
|
+
from datetime import datetime
|
|
7
|
+
from typing_extensions import Literal
|
|
8
|
+
|
|
9
|
+
import httpx
|
|
10
|
+
|
|
11
|
+
from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven
|
|
12
|
+
from ..._utils import maybe_transform, async_maybe_transform
|
|
13
|
+
from ..._compat import cached_property
|
|
14
|
+
from ..._resource import SyncAPIResource, AsyncAPIResource
|
|
15
|
+
from ..._response import (
|
|
16
|
+
to_raw_response_wrapper,
|
|
17
|
+
to_streamed_response_wrapper,
|
|
18
|
+
async_to_raw_response_wrapper,
|
|
19
|
+
async_to_streamed_response_wrapper,
|
|
20
|
+
)
|
|
21
|
+
from ...types.waap import statistic_get_usage_series_params
|
|
22
|
+
from ..._base_client import make_request_options
|
|
23
|
+
from ...types.waap.waap_statistics_series import WaapStatisticsSeries
|
|
24
|
+
|
|
25
|
+
__all__ = ["StatisticsResource", "AsyncStatisticsResource"]
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
class StatisticsResource(SyncAPIResource):
|
|
29
|
+
@cached_property
|
|
30
|
+
def with_raw_response(self) -> StatisticsResourceWithRawResponse:
|
|
31
|
+
"""
|
|
32
|
+
This property can be used as a prefix for any HTTP method call to return
|
|
33
|
+
the raw response object instead of the parsed content.
|
|
34
|
+
|
|
35
|
+
For more information, see https://www.github.com/G-Core/gcore-python#accessing-raw-response-data-eg-headers
|
|
36
|
+
"""
|
|
37
|
+
return StatisticsResourceWithRawResponse(self)
|
|
38
|
+
|
|
39
|
+
@cached_property
|
|
40
|
+
def with_streaming_response(self) -> StatisticsResourceWithStreamingResponse:
|
|
41
|
+
"""
|
|
42
|
+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
|
43
|
+
|
|
44
|
+
For more information, see https://www.github.com/G-Core/gcore-python#with_streaming_response
|
|
45
|
+
"""
|
|
46
|
+
return StatisticsResourceWithStreamingResponse(self)
|
|
47
|
+
|
|
48
|
+
def get_usage_series(
|
|
49
|
+
self,
|
|
50
|
+
*,
|
|
51
|
+
from_: Union[str, datetime],
|
|
52
|
+
granularity: Literal["1h", "1d"],
|
|
53
|
+
metrics: List[Literal["total_bytes", "total_requests"]],
|
|
54
|
+
to: Union[str, datetime],
|
|
55
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
56
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
57
|
+
extra_headers: Headers | None = None,
|
|
58
|
+
extra_query: Query | None = None,
|
|
59
|
+
extra_body: Body | None = None,
|
|
60
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
61
|
+
) -> WaapStatisticsSeries:
|
|
62
|
+
"""Retrieve statistics data as a time series.
|
|
63
|
+
|
|
64
|
+
The `from` and `to` parameters are
|
|
65
|
+
rounded down and up according to the `granularity`. This means that if the
|
|
66
|
+
`granularity` is set to `1h`, the `from` and `to` parameters will be rounded
|
|
67
|
+
down and up to the nearest hour, respectively. If the `granularity` is set to
|
|
68
|
+
`1d`, the `from` and `to` parameters will be rounded down and up to the nearest
|
|
69
|
+
day, respectively. The response will include explicit 0 values for any missing
|
|
70
|
+
data points.
|
|
71
|
+
|
|
72
|
+
Args:
|
|
73
|
+
from_: Beginning of the requested time period (ISO 8601 format, UTC)
|
|
74
|
+
|
|
75
|
+
granularity: Duration of the time blocks into which the data will be divided.
|
|
76
|
+
|
|
77
|
+
metrics: List of metric types to retrieve statistics for.
|
|
78
|
+
|
|
79
|
+
to: End of the requested time period (ISO 8601 format, UTC)
|
|
80
|
+
|
|
81
|
+
extra_headers: Send extra headers
|
|
82
|
+
|
|
83
|
+
extra_query: Add additional query parameters to the request
|
|
84
|
+
|
|
85
|
+
extra_body: Add additional JSON properties to the request
|
|
86
|
+
|
|
87
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
88
|
+
"""
|
|
89
|
+
return self._get(
|
|
90
|
+
"/waap/v1/statistics/series",
|
|
91
|
+
options=make_request_options(
|
|
92
|
+
extra_headers=extra_headers,
|
|
93
|
+
extra_query=extra_query,
|
|
94
|
+
extra_body=extra_body,
|
|
95
|
+
timeout=timeout,
|
|
96
|
+
query=maybe_transform(
|
|
97
|
+
{
|
|
98
|
+
"from_": from_,
|
|
99
|
+
"granularity": granularity,
|
|
100
|
+
"metrics": metrics,
|
|
101
|
+
"to": to,
|
|
102
|
+
},
|
|
103
|
+
statistic_get_usage_series_params.StatisticGetUsageSeriesParams,
|
|
104
|
+
),
|
|
105
|
+
),
|
|
106
|
+
cast_to=WaapStatisticsSeries,
|
|
107
|
+
)
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
class AsyncStatisticsResource(AsyncAPIResource):
|
|
111
|
+
@cached_property
|
|
112
|
+
def with_raw_response(self) -> AsyncStatisticsResourceWithRawResponse:
|
|
113
|
+
"""
|
|
114
|
+
This property can be used as a prefix for any HTTP method call to return
|
|
115
|
+
the raw response object instead of the parsed content.
|
|
116
|
+
|
|
117
|
+
For more information, see https://www.github.com/G-Core/gcore-python#accessing-raw-response-data-eg-headers
|
|
118
|
+
"""
|
|
119
|
+
return AsyncStatisticsResourceWithRawResponse(self)
|
|
120
|
+
|
|
121
|
+
@cached_property
|
|
122
|
+
def with_streaming_response(self) -> AsyncStatisticsResourceWithStreamingResponse:
|
|
123
|
+
"""
|
|
124
|
+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
|
125
|
+
|
|
126
|
+
For more information, see https://www.github.com/G-Core/gcore-python#with_streaming_response
|
|
127
|
+
"""
|
|
128
|
+
return AsyncStatisticsResourceWithStreamingResponse(self)
|
|
129
|
+
|
|
130
|
+
async def get_usage_series(
|
|
131
|
+
self,
|
|
132
|
+
*,
|
|
133
|
+
from_: Union[str, datetime],
|
|
134
|
+
granularity: Literal["1h", "1d"],
|
|
135
|
+
metrics: List[Literal["total_bytes", "total_requests"]],
|
|
136
|
+
to: Union[str, datetime],
|
|
137
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
138
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
139
|
+
extra_headers: Headers | None = None,
|
|
140
|
+
extra_query: Query | None = None,
|
|
141
|
+
extra_body: Body | None = None,
|
|
142
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
143
|
+
) -> WaapStatisticsSeries:
|
|
144
|
+
"""Retrieve statistics data as a time series.
|
|
145
|
+
|
|
146
|
+
The `from` and `to` parameters are
|
|
147
|
+
rounded down and up according to the `granularity`. This means that if the
|
|
148
|
+
`granularity` is set to `1h`, the `from` and `to` parameters will be rounded
|
|
149
|
+
down and up to the nearest hour, respectively. If the `granularity` is set to
|
|
150
|
+
`1d`, the `from` and `to` parameters will be rounded down and up to the nearest
|
|
151
|
+
day, respectively. The response will include explicit 0 values for any missing
|
|
152
|
+
data points.
|
|
153
|
+
|
|
154
|
+
Args:
|
|
155
|
+
from_: Beginning of the requested time period (ISO 8601 format, UTC)
|
|
156
|
+
|
|
157
|
+
granularity: Duration of the time blocks into which the data will be divided.
|
|
158
|
+
|
|
159
|
+
metrics: List of metric types to retrieve statistics for.
|
|
160
|
+
|
|
161
|
+
to: End of the requested time period (ISO 8601 format, UTC)
|
|
162
|
+
|
|
163
|
+
extra_headers: Send extra headers
|
|
164
|
+
|
|
165
|
+
extra_query: Add additional query parameters to the request
|
|
166
|
+
|
|
167
|
+
extra_body: Add additional JSON properties to the request
|
|
168
|
+
|
|
169
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
170
|
+
"""
|
|
171
|
+
return await self._get(
|
|
172
|
+
"/waap/v1/statistics/series",
|
|
173
|
+
options=make_request_options(
|
|
174
|
+
extra_headers=extra_headers,
|
|
175
|
+
extra_query=extra_query,
|
|
176
|
+
extra_body=extra_body,
|
|
177
|
+
timeout=timeout,
|
|
178
|
+
query=await async_maybe_transform(
|
|
179
|
+
{
|
|
180
|
+
"from_": from_,
|
|
181
|
+
"granularity": granularity,
|
|
182
|
+
"metrics": metrics,
|
|
183
|
+
"to": to,
|
|
184
|
+
},
|
|
185
|
+
statistic_get_usage_series_params.StatisticGetUsageSeriesParams,
|
|
186
|
+
),
|
|
187
|
+
),
|
|
188
|
+
cast_to=WaapStatisticsSeries,
|
|
189
|
+
)
|
|
190
|
+
|
|
191
|
+
|
|
192
|
+
class StatisticsResourceWithRawResponse:
|
|
193
|
+
def __init__(self, statistics: StatisticsResource) -> None:
|
|
194
|
+
self._statistics = statistics
|
|
195
|
+
|
|
196
|
+
self.get_usage_series = to_raw_response_wrapper(
|
|
197
|
+
statistics.get_usage_series,
|
|
198
|
+
)
|
|
199
|
+
|
|
200
|
+
|
|
201
|
+
class AsyncStatisticsResourceWithRawResponse:
|
|
202
|
+
def __init__(self, statistics: AsyncStatisticsResource) -> None:
|
|
203
|
+
self._statistics = statistics
|
|
204
|
+
|
|
205
|
+
self.get_usage_series = async_to_raw_response_wrapper(
|
|
206
|
+
statistics.get_usage_series,
|
|
207
|
+
)
|
|
208
|
+
|
|
209
|
+
|
|
210
|
+
class StatisticsResourceWithStreamingResponse:
|
|
211
|
+
def __init__(self, statistics: StatisticsResource) -> None:
|
|
212
|
+
self._statistics = statistics
|
|
213
|
+
|
|
214
|
+
self.get_usage_series = to_streamed_response_wrapper(
|
|
215
|
+
statistics.get_usage_series,
|
|
216
|
+
)
|
|
217
|
+
|
|
218
|
+
|
|
219
|
+
class AsyncStatisticsResourceWithStreamingResponse:
|
|
220
|
+
def __init__(self, statistics: AsyncStatisticsResource) -> None:
|
|
221
|
+
self._statistics = statistics
|
|
222
|
+
|
|
223
|
+
self.get_usage_series = async_to_streamed_response_wrapper(
|
|
224
|
+
statistics.get_usage_series,
|
|
225
|
+
)
|
|
@@ -0,0 +1,233 @@
|
|
|
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
|
|
7
|
+
|
|
8
|
+
import httpx
|
|
9
|
+
|
|
10
|
+
from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven
|
|
11
|
+
from ..._utils import 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 ...types.waap import tag_list_params
|
|
22
|
+
from ..._base_client import AsyncPaginator, make_request_options
|
|
23
|
+
from ...types.waap.waap_tag import WaapTag
|
|
24
|
+
|
|
25
|
+
__all__ = ["TagsResource", "AsyncTagsResource"]
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
class TagsResource(SyncAPIResource):
|
|
29
|
+
@cached_property
|
|
30
|
+
def with_raw_response(self) -> TagsResourceWithRawResponse:
|
|
31
|
+
"""
|
|
32
|
+
This property can be used as a prefix for any HTTP method call to return
|
|
33
|
+
the raw response object instead of the parsed content.
|
|
34
|
+
|
|
35
|
+
For more information, see https://www.github.com/G-Core/gcore-python#accessing-raw-response-data-eg-headers
|
|
36
|
+
"""
|
|
37
|
+
return TagsResourceWithRawResponse(self)
|
|
38
|
+
|
|
39
|
+
@cached_property
|
|
40
|
+
def with_streaming_response(self) -> TagsResourceWithStreamingResponse:
|
|
41
|
+
"""
|
|
42
|
+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
|
43
|
+
|
|
44
|
+
For more information, see https://www.github.com/G-Core/gcore-python#with_streaming_response
|
|
45
|
+
"""
|
|
46
|
+
return TagsResourceWithStreamingResponse(self)
|
|
47
|
+
|
|
48
|
+
def list(
|
|
49
|
+
self,
|
|
50
|
+
*,
|
|
51
|
+
limit: int | NotGiven = NOT_GIVEN,
|
|
52
|
+
name: str | NotGiven = NOT_GIVEN,
|
|
53
|
+
offset: int | NotGiven = NOT_GIVEN,
|
|
54
|
+
ordering: Optional[Literal["name", "readable_name", "reserved", "-name", "-readable_name", "-reserved"]]
|
|
55
|
+
| NotGiven = NOT_GIVEN,
|
|
56
|
+
readable_name: str | NotGiven = NOT_GIVEN,
|
|
57
|
+
reserved: bool | NotGiven = NOT_GIVEN,
|
|
58
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
59
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
60
|
+
extra_headers: Headers | None = None,
|
|
61
|
+
extra_query: Query | None = None,
|
|
62
|
+
extra_body: Body | None = None,
|
|
63
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
64
|
+
) -> SyncOffsetPage[WaapTag]:
|
|
65
|
+
"""
|
|
66
|
+
Tags are shortcuts for the rules used in WAAP policies for the creation of more
|
|
67
|
+
complex WAAP rules
|
|
68
|
+
|
|
69
|
+
Args:
|
|
70
|
+
limit: Number of items to return
|
|
71
|
+
|
|
72
|
+
name: Filter tags by their name. Supports '\\**' as a wildcard character.
|
|
73
|
+
|
|
74
|
+
offset: Number of items to skip
|
|
75
|
+
|
|
76
|
+
ordering: Determine the field to order results by
|
|
77
|
+
|
|
78
|
+
readable_name: Filter tags by their readable name. Supports '\\**' as a wildcard character.
|
|
79
|
+
|
|
80
|
+
reserved: Filter to include only reserved tags.
|
|
81
|
+
|
|
82
|
+
extra_headers: Send extra headers
|
|
83
|
+
|
|
84
|
+
extra_query: Add additional query parameters to the request
|
|
85
|
+
|
|
86
|
+
extra_body: Add additional JSON properties to the request
|
|
87
|
+
|
|
88
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
89
|
+
"""
|
|
90
|
+
return self._get_api_list(
|
|
91
|
+
"/waap/v1/tags",
|
|
92
|
+
page=SyncOffsetPage[WaapTag],
|
|
93
|
+
options=make_request_options(
|
|
94
|
+
extra_headers=extra_headers,
|
|
95
|
+
extra_query=extra_query,
|
|
96
|
+
extra_body=extra_body,
|
|
97
|
+
timeout=timeout,
|
|
98
|
+
query=maybe_transform(
|
|
99
|
+
{
|
|
100
|
+
"limit": limit,
|
|
101
|
+
"name": name,
|
|
102
|
+
"offset": offset,
|
|
103
|
+
"ordering": ordering,
|
|
104
|
+
"readable_name": readable_name,
|
|
105
|
+
"reserved": reserved,
|
|
106
|
+
},
|
|
107
|
+
tag_list_params.TagListParams,
|
|
108
|
+
),
|
|
109
|
+
),
|
|
110
|
+
model=WaapTag,
|
|
111
|
+
)
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
class AsyncTagsResource(AsyncAPIResource):
|
|
115
|
+
@cached_property
|
|
116
|
+
def with_raw_response(self) -> AsyncTagsResourceWithRawResponse:
|
|
117
|
+
"""
|
|
118
|
+
This property can be used as a prefix for any HTTP method call to return
|
|
119
|
+
the raw response object instead of the parsed content.
|
|
120
|
+
|
|
121
|
+
For more information, see https://www.github.com/G-Core/gcore-python#accessing-raw-response-data-eg-headers
|
|
122
|
+
"""
|
|
123
|
+
return AsyncTagsResourceWithRawResponse(self)
|
|
124
|
+
|
|
125
|
+
@cached_property
|
|
126
|
+
def with_streaming_response(self) -> AsyncTagsResourceWithStreamingResponse:
|
|
127
|
+
"""
|
|
128
|
+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
|
129
|
+
|
|
130
|
+
For more information, see https://www.github.com/G-Core/gcore-python#with_streaming_response
|
|
131
|
+
"""
|
|
132
|
+
return AsyncTagsResourceWithStreamingResponse(self)
|
|
133
|
+
|
|
134
|
+
def list(
|
|
135
|
+
self,
|
|
136
|
+
*,
|
|
137
|
+
limit: int | NotGiven = NOT_GIVEN,
|
|
138
|
+
name: str | NotGiven = NOT_GIVEN,
|
|
139
|
+
offset: int | NotGiven = NOT_GIVEN,
|
|
140
|
+
ordering: Optional[Literal["name", "readable_name", "reserved", "-name", "-readable_name", "-reserved"]]
|
|
141
|
+
| NotGiven = NOT_GIVEN,
|
|
142
|
+
readable_name: str | NotGiven = NOT_GIVEN,
|
|
143
|
+
reserved: bool | NotGiven = NOT_GIVEN,
|
|
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
|
+
) -> AsyncPaginator[WaapTag, AsyncOffsetPage[WaapTag]]:
|
|
151
|
+
"""
|
|
152
|
+
Tags are shortcuts for the rules used in WAAP policies for the creation of more
|
|
153
|
+
complex WAAP rules
|
|
154
|
+
|
|
155
|
+
Args:
|
|
156
|
+
limit: Number of items to return
|
|
157
|
+
|
|
158
|
+
name: Filter tags by their name. Supports '\\**' as a wildcard character.
|
|
159
|
+
|
|
160
|
+
offset: Number of items to skip
|
|
161
|
+
|
|
162
|
+
ordering: Determine the field to order results by
|
|
163
|
+
|
|
164
|
+
readable_name: Filter tags by their readable name. Supports '\\**' as a wildcard character.
|
|
165
|
+
|
|
166
|
+
reserved: Filter to include only reserved tags.
|
|
167
|
+
|
|
168
|
+
extra_headers: Send extra headers
|
|
169
|
+
|
|
170
|
+
extra_query: Add additional query parameters to the request
|
|
171
|
+
|
|
172
|
+
extra_body: Add additional JSON properties to the request
|
|
173
|
+
|
|
174
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
175
|
+
"""
|
|
176
|
+
return self._get_api_list(
|
|
177
|
+
"/waap/v1/tags",
|
|
178
|
+
page=AsyncOffsetPage[WaapTag],
|
|
179
|
+
options=make_request_options(
|
|
180
|
+
extra_headers=extra_headers,
|
|
181
|
+
extra_query=extra_query,
|
|
182
|
+
extra_body=extra_body,
|
|
183
|
+
timeout=timeout,
|
|
184
|
+
query=maybe_transform(
|
|
185
|
+
{
|
|
186
|
+
"limit": limit,
|
|
187
|
+
"name": name,
|
|
188
|
+
"offset": offset,
|
|
189
|
+
"ordering": ordering,
|
|
190
|
+
"readable_name": readable_name,
|
|
191
|
+
"reserved": reserved,
|
|
192
|
+
},
|
|
193
|
+
tag_list_params.TagListParams,
|
|
194
|
+
),
|
|
195
|
+
),
|
|
196
|
+
model=WaapTag,
|
|
197
|
+
)
|
|
198
|
+
|
|
199
|
+
|
|
200
|
+
class TagsResourceWithRawResponse:
|
|
201
|
+
def __init__(self, tags: TagsResource) -> None:
|
|
202
|
+
self._tags = tags
|
|
203
|
+
|
|
204
|
+
self.list = to_raw_response_wrapper(
|
|
205
|
+
tags.list,
|
|
206
|
+
)
|
|
207
|
+
|
|
208
|
+
|
|
209
|
+
class AsyncTagsResourceWithRawResponse:
|
|
210
|
+
def __init__(self, tags: AsyncTagsResource) -> None:
|
|
211
|
+
self._tags = tags
|
|
212
|
+
|
|
213
|
+
self.list = async_to_raw_response_wrapper(
|
|
214
|
+
tags.list,
|
|
215
|
+
)
|
|
216
|
+
|
|
217
|
+
|
|
218
|
+
class TagsResourceWithStreamingResponse:
|
|
219
|
+
def __init__(self, tags: TagsResource) -> None:
|
|
220
|
+
self._tags = tags
|
|
221
|
+
|
|
222
|
+
self.list = to_streamed_response_wrapper(
|
|
223
|
+
tags.list,
|
|
224
|
+
)
|
|
225
|
+
|
|
226
|
+
|
|
227
|
+
class AsyncTagsResourceWithStreamingResponse:
|
|
228
|
+
def __init__(self, tags: AsyncTagsResource) -> None:
|
|
229
|
+
self._tags = tags
|
|
230
|
+
|
|
231
|
+
self.list = async_to_streamed_response_wrapper(
|
|
232
|
+
tags.list,
|
|
233
|
+
)
|