gcore 0.10.0__py3-none-any.whl → 0.11.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of gcore might be problematic. Click here for more details.
- gcore/_base_client.py +3 -3
- gcore/_client.py +18 -0
- gcore/_compat.py +48 -48
- gcore/_models.py +41 -41
- gcore/_types.py +35 -1
- gcore/_utils/__init__.py +9 -2
- gcore/_utils/_compat.py +45 -0
- gcore/_utils/_datetime_parse.py +136 -0
- gcore/_utils/_transform.py +11 -1
- gcore/_utils/_typing.py +6 -1
- gcore/_utils/_utils.py +0 -1
- gcore/_version.py +1 -1
- gcore/resources/__init__.py +28 -0
- gcore/resources/cloud/__init__.py +14 -0
- gcore/resources/cloud/audit_logs.py +3 -3
- gcore/resources/cloud/baremetal/images.py +3 -4
- gcore/resources/cloud/baremetal/servers.py +16 -4
- gcore/resources/cloud/cloud.py +32 -0
- gcore/resources/cloud/cost_reports.py +24 -16
- gcore/resources/cloud/file_shares/access_rules.py +2 -2
- gcore/resources/cloud/file_shares/file_shares.py +30 -14
- gcore/resources/cloud/floating_ips.py +196 -4
- gcore/resources/cloud/gpu_baremetal_clusters/flavors.py +1 -1
- gcore/resources/cloud/gpu_baremetal_clusters/gpu_baremetal_clusters.py +166 -190
- gcore/resources/cloud/gpu_baremetal_clusters/servers.py +268 -12
- gcore/resources/cloud/inference/__init__.py +14 -14
- gcore/resources/cloud/inference/applications/__init__.py +47 -0
- gcore/resources/cloud/inference/applications/applications.py +134 -0
- gcore/resources/cloud/inference/applications/deployments.py +649 -0
- gcore/resources/cloud/inference/applications/templates.py +238 -0
- gcore/resources/cloud/inference/deployments/deployments.py +41 -22
- gcore/resources/cloud/inference/inference.py +32 -32
- gcore/resources/cloud/inference/registry_credentials.py +8 -9
- gcore/resources/cloud/instances/images.py +4 -4
- gcore/resources/cloud/instances/instances.py +254 -4
- gcore/resources/cloud/instances/interfaces.py +544 -0
- gcore/resources/cloud/k8s/__init__.py +47 -0
- gcore/resources/cloud/k8s/clusters/__init__.py +47 -0
- gcore/resources/cloud/k8s/clusters/clusters.py +1391 -0
- gcore/resources/cloud/k8s/clusters/nodes.py +291 -0
- gcore/resources/cloud/k8s/clusters/pools/__init__.py +33 -0
- gcore/resources/cloud/k8s/clusters/pools/nodes.py +303 -0
- gcore/resources/cloud/k8s/clusters/pools/pools.py +870 -0
- gcore/resources/cloud/k8s/flavors.py +209 -0
- gcore/resources/cloud/k8s/k8s.py +233 -0
- gcore/resources/cloud/load_balancers/l7_policies/l7_policies.py +11 -12
- gcore/resources/cloud/load_balancers/l7_policies/rules.py +9 -10
- gcore/resources/cloud/load_balancers/listeners.py +18 -18
- gcore/resources/cloud/load_balancers/load_balancers.py +4 -4
- gcore/resources/cloud/load_balancers/pools/health_monitors.py +18 -6
- gcore/resources/cloud/load_balancers/pools/members.py +32 -2
- gcore/resources/cloud/load_balancers/pools/pools.py +32 -8
- gcore/resources/cloud/networks/networks.py +192 -4
- gcore/resources/cloud/networks/subnets.py +140 -8
- gcore/resources/cloud/reserved_fixed_ips/vip.py +5 -7
- gcore/resources/cloud/security_groups/security_groups.py +6 -6
- gcore/resources/cloud/tasks.py +46 -46
- gcore/resources/cloud/users/role_assignments.py +5 -4
- gcore/resources/cloud/volumes.py +4 -4
- gcore/resources/dns/__init__.py +75 -0
- gcore/resources/dns/dns.py +374 -0
- gcore/resources/dns/locations.py +288 -0
- gcore/resources/dns/metrics.py +214 -0
- gcore/resources/dns/pickers/__init__.py +33 -0
- gcore/resources/dns/pickers/pickers.py +167 -0
- gcore/resources/dns/pickers/presets.py +135 -0
- gcore/resources/dns/zones/__init__.py +47 -0
- gcore/resources/{cloud/inference/models.py → dns/zones/dnssec.py} +80 -122
- gcore/resources/dns/zones/rrsets.py +1005 -0
- gcore/resources/dns/zones/zones.py +1493 -0
- gcore/resources/storage/__init__.py +75 -0
- gcore/resources/storage/buckets/__init__.py +61 -0
- gcore/resources/storage/buckets/buckets.py +470 -0
- gcore/resources/storage/buckets/cors.py +265 -0
- gcore/resources/storage/buckets/lifecycle.py +276 -0
- gcore/resources/storage/buckets/policy.py +345 -0
- gcore/resources/storage/credentials.py +221 -0
- gcore/resources/storage/locations.py +190 -0
- gcore/resources/storage/statistics.py +364 -0
- gcore/resources/storage/storage.py +1042 -0
- gcore/resources/streaming/ai_tasks.py +56 -70
- gcore/resources/streaming/playlists.py +18 -18
- gcore/resources/streaming/quality_sets.py +8 -8
- gcore/resources/streaming/statistics.py +4 -122
- gcore/resources/streaming/streams/overlays.py +6 -6
- gcore/resources/streaming/streams/streams.py +40 -64
- gcore/resources/streaming/videos/subtitles.py +32 -30
- gcore/resources/streaming/videos/videos.py +78 -72
- gcore/resources/waap/domains/advanced_rules.py +2 -2
- gcore/resources/waap/domains/api_paths.py +13 -13
- gcore/resources/waap/domains/custom_rules.py +2 -2
- gcore/resources/waap/domains/domains.py +4 -4
- gcore/resources/waap/domains/firewall_rules.py +2 -2
- gcore/resources/waap/domains/insight_silences.py +6 -6
- gcore/resources/waap/domains/insights.py +7 -7
- gcore/resources/waap/domains/statistics.py +47 -47
- gcore/types/cloud/__init__.py +2 -4
- gcore/types/cloud/audit_log_list_params.py +2 -1
- gcore/types/cloud/baremetal/image_list_params.py +3 -2
- gcore/types/cloud/baremetal/server_create_params.py +8 -6
- gcore/types/cloud/baremetal/server_list_params.py +3 -2
- gcore/types/cloud/baremetal/server_rebuild_params.py +2 -0
- gcore/types/cloud/cost_report_get_aggregated_monthly_params.py +35 -31
- gcore/types/cloud/cost_report_get_aggregated_params.py +26 -25
- gcore/types/cloud/cost_report_get_detailed_params.py +26 -25
- gcore/types/cloud/ddos_profile.py +13 -7
- gcore/types/cloud/ddos_profile_field.py +21 -8
- gcore/types/cloud/ddos_profile_option_list.py +7 -6
- gcore/types/cloud/ddos_profile_status.py +2 -2
- gcore/types/cloud/ddos_profile_template.py +7 -3
- gcore/types/cloud/ddos_profile_template_field.py +12 -3
- gcore/types/cloud/file_share.py +2 -2
- gcore/types/cloud/file_share_create_params.py +12 -6
- gcore/types/cloud/floating_ip_list_params.py +3 -2
- gcore/types/cloud/gpu_baremetal_cluster.py +101 -74
- gcore/types/cloud/gpu_baremetal_cluster_create_params.py +76 -93
- gcore/types/cloud/gpu_baremetal_cluster_delete_params.py +17 -10
- gcore/types/cloud/gpu_baremetal_cluster_list_params.py +14 -3
- gcore/types/cloud/gpu_baremetal_cluster_rebuild_params.py +4 -2
- gcore/types/cloud/gpu_baremetal_clusters/__init__.py +6 -0
- gcore/types/cloud/gpu_baremetal_clusters/gpu_baremetal_cluster_server.py +74 -0
- gcore/types/cloud/{gpu_baremetal_cluster_server.py → gpu_baremetal_clusters/gpu_baremetal_cluster_server_v1.py} +10 -10
- gcore/types/cloud/gpu_baremetal_clusters/gpu_baremetal_cluster_server_v1_list.py +16 -0
- gcore/types/cloud/{gpu_baremetal_flavor.py → gpu_baremetal_clusters/gpu_baremetal_flavor.py} +1 -1
- gcore/types/cloud/{gpu_baremetal_flavor_list.py → gpu_baremetal_clusters/gpu_baremetal_flavor_list.py} +1 -1
- gcore/types/cloud/gpu_baremetal_clusters/server_list_params.py +75 -0
- gcore/types/cloud/inference/__init__.py +0 -5
- gcore/types/cloud/inference/applications/__init__.py +12 -0
- gcore/types/cloud/inference/applications/deployment_create_params.py +68 -0
- gcore/types/cloud/inference/applications/deployment_patch_params.py +62 -0
- gcore/types/cloud/inference/applications/inference_application_deployment.py +111 -0
- gcore/types/cloud/inference/applications/inference_application_deployment_list.py +16 -0
- gcore/types/cloud/inference/applications/inference_application_template.py +94 -0
- gcore/types/cloud/inference/applications/inference_application_template_list.py +16 -0
- gcore/types/cloud/inference/deployment_create_params.py +7 -6
- gcore/types/cloud/inference/deployment_update_params.py +7 -6
- gcore/types/cloud/instance_assign_security_group_params.py +4 -2
- gcore/types/cloud/instance_list_params.py +3 -2
- gcore/types/cloud/instance_unassign_security_group_params.py +4 -2
- gcore/types/cloud/instances/image_list_params.py +3 -2
- gcore/types/cloud/k8s/__init__.py +13 -0
- gcore/types/cloud/k8s/cluster_create_params.py +299 -0
- gcore/types/cloud/k8s/cluster_delete_params.py +16 -0
- gcore/types/cloud/k8s/cluster_update_params.py +203 -0
- gcore/types/cloud/k8s/cluster_upgrade_params.py +16 -0
- gcore/types/cloud/k8s/clusters/__init__.py +10 -0
- gcore/types/cloud/k8s/clusters/k8s_cluster_pool.py +66 -0
- gcore/types/cloud/k8s/clusters/k8s_cluster_pool_list.py +16 -0
- gcore/types/cloud/k8s/clusters/node_list_params.py +16 -0
- gcore/types/cloud/k8s/clusters/pool_create_params.py +53 -0
- gcore/types/cloud/k8s/clusters/pool_resize_params.py +18 -0
- gcore/types/cloud/k8s/clusters/pool_update_params.py +34 -0
- gcore/types/cloud/k8s/clusters/pools/__init__.py +5 -0
- gcore/types/cloud/k8s/clusters/pools/node_list_params.py +18 -0
- gcore/types/cloud/k8s/flavor_list_params.py +19 -0
- gcore/types/cloud/k8s/k8s_cluster.py +209 -0
- gcore/types/cloud/k8s/k8s_cluster_certificate.py +13 -0
- gcore/types/cloud/k8s/k8s_cluster_kubeconfig.py +19 -0
- gcore/types/cloud/k8s/k8s_cluster_list.py +16 -0
- gcore/types/cloud/k8s_cluster_version.py +10 -0
- gcore/types/cloud/{gpu_baremetal_cluster_server_list.py → k8s_cluster_version_list.py} +4 -4
- gcore/types/cloud/load_balancer_create_params.py +23 -4
- gcore/types/cloud/load_balancer_list_params.py +3 -2
- gcore/types/cloud/load_balancers/l7_policies/rule_create_params.py +3 -2
- gcore/types/cloud/load_balancers/l7_policies/rule_replace_params.py +3 -2
- gcore/types/cloud/load_balancers/l7_policy_create_params.py +3 -2
- gcore/types/cloud/load_balancers/l7_policy_replace_params.py +3 -2
- gcore/types/cloud/load_balancers/listener_create_params.py +4 -3
- gcore/types/cloud/load_balancers/listener_update_params.py +5 -3
- gcore/types/cloud/load_balancers/pool_create_params.py +19 -1
- gcore/types/cloud/load_balancers/pool_update_params.py +19 -1
- gcore/types/cloud/load_balancers/pools/member_add_params.py +19 -1
- gcore/types/cloud/member.py +19 -1
- gcore/types/cloud/network_list_params.py +3 -2
- gcore/types/cloud/networks/subnet_create_params.py +3 -2
- gcore/types/cloud/networks/subnet_list_params.py +3 -2
- gcore/types/cloud/networks/subnet_update_params.py +3 -2
- gcore/types/cloud/project.py +9 -9
- gcore/types/cloud/reserved_fixed_ips/vip_replace_connected_ports_params.py +3 -2
- gcore/types/cloud/reserved_fixed_ips/vip_update_connected_ports_params.py +3 -2
- gcore/types/cloud/security_group_create_params.py +4 -2
- gcore/types/cloud/security_group_list_params.py +3 -2
- gcore/types/cloud/task_id_list.py +8 -1
- gcore/types/cloud/task_list_params.py +23 -23
- gcore/types/cloud/usage_report_get_params.py +26 -25
- gcore/types/cloud/users/role_assignment.py +2 -1
- gcore/types/cloud/users/role_assignment_create_params.py +4 -2
- gcore/types/cloud/users/role_assignment_update_params.py +4 -2
- gcore/types/cloud/volume_list_params.py +3 -2
- gcore/types/dns/__init__.py +31 -0
- gcore/types/dns/dns_get_account_overview_response.py +21 -0
- gcore/types/dns/dns_label_name.py +13 -0
- gcore/types/dns/dns_location_translations.py +11 -0
- gcore/types/dns/dns_lookup_params.py +15 -0
- gcore/types/dns/dns_lookup_response.py +21 -0
- gcore/types/dns/dns_name_server.py +17 -0
- gcore/types/dns/location_list_continents_response.py +10 -0
- gcore/types/dns/location_list_countries_response.py +10 -0
- gcore/types/dns/location_list_regions_response.py +10 -0
- gcore/types/dns/location_list_response.py +16 -0
- gcore/types/dns/metric_list_params.py +24 -0
- gcore/types/dns/metric_list_response.py +7 -0
- gcore/types/dns/picker_list_response.py +10 -0
- gcore/types/dns/pickers/__init__.py +5 -0
- gcore/types/dns/pickers/preset_list_response.py +10 -0
- gcore/types/dns/zone_check_delegation_status_response.py +20 -0
- gcore/types/dns/zone_create_params.py +59 -0
- gcore/types/dns/zone_create_response.py +13 -0
- gcore/types/dns/zone_export_response.py +11 -0
- gcore/types/dns/zone_get_response.py +106 -0
- gcore/types/dns/zone_get_statistics_params.py +43 -0
- gcore/types/dns/zone_get_statistics_response.py +19 -0
- gcore/types/dns/zone_import_params.py +32 -0
- gcore/types/dns/zone_import_response.py +26 -0
- gcore/types/dns/zone_list_params.py +57 -0
- gcore/types/dns/zone_list_response.py +105 -0
- gcore/types/dns/zone_replace_params.py +61 -0
- gcore/types/dns/zones/__init__.py +15 -0
- gcore/types/dns/zones/dns_failover_log.py +19 -0
- gcore/types/dns/zones/dns_output_rrset.py +123 -0
- gcore/types/dns/zones/dnssec_get_response.py +38 -0
- gcore/types/dns/zones/dnssec_update_params.py +11 -0
- gcore/types/dns/zones/dnssec_update_response.py +38 -0
- gcore/types/dns/zones/rrset_create_params.py +82 -0
- gcore/types/dns/zones/rrset_get_failover_logs_params.py +21 -0
- gcore/types/dns/zones/rrset_get_failover_logs_response.py +15 -0
- gcore/types/dns/zones/rrset_list_params.py +21 -0
- gcore/types/dns/zones/rrset_list_response.py +14 -0
- gcore/types/dns/zones/rrset_replace_params.py +82 -0
- gcore/types/security/client_profile.py +1 -1
- gcore/types/security/profile_create_params.py +2 -2
- gcore/types/security/profile_recreate_params.py +2 -2
- gcore/types/security/profile_replace_params.py +2 -2
- gcore/types/storage/__init__.py +21 -0
- gcore/types/storage/bucket.py +15 -0
- gcore/types/storage/bucket_list_params.py +15 -0
- gcore/types/storage/buckets/__init__.py +9 -0
- gcore/types/storage/buckets/bucket_cors.py +18 -0
- gcore/types/storage/buckets/bucket_policy.py +7 -0
- gcore/types/storage/buckets/cor_create_params.py +17 -0
- gcore/types/storage/buckets/lifecycle_create_params.py +18 -0
- gcore/types/storage/buckets/policy_get_response.py +7 -0
- gcore/types/storage/credential_recreate_params.py +36 -0
- gcore/types/storage/location.py +24 -0
- gcore/types/storage/location_list_params.py +13 -0
- gcore/types/storage/statistic_get_usage_aggregated_params.py +24 -0
- gcore/types/storage/statistic_get_usage_series_params.py +38 -0
- gcore/types/storage/statistic_get_usage_series_response.py +12 -0
- gcore/types/storage/storage.py +101 -0
- gcore/types/storage/storage_create_params.py +44 -0
- gcore/types/storage/storage_list_params.py +39 -0
- gcore/types/storage/storage_restore_params.py +11 -0
- gcore/types/storage/storage_update_params.py +18 -0
- gcore/types/storage/usage_series.py +201 -0
- gcore/types/storage/usage_total.py +54 -0
- gcore/types/streaming/__init__.py +0 -4
- gcore/types/streaming/ai_contentmoderation_hardnudity.py +1 -1
- gcore/types/streaming/ai_contentmoderation_nsfw.py +1 -1
- gcore/types/streaming/ai_contentmoderation_softnudity.py +1 -1
- gcore/types/streaming/ai_contentmoderation_sport.py +1 -1
- gcore/types/streaming/ai_task.py +1 -5
- gcore/types/streaming/ai_task_create_params.py +2 -2
- gcore/types/streaming/ai_task_get_response.py +0 -46
- gcore/types/streaming/clip.py +2 -1
- gcore/types/streaming/create_video_param.py +13 -12
- gcore/types/streaming/max_stream_series.py +5 -5
- gcore/types/streaming/playlist.py +1 -1
- gcore/types/streaming/playlist_create_params.py +1 -1
- gcore/types/streaming/playlist_update_params.py +1 -1
- gcore/types/streaming/playlist_video.py +13 -12
- gcore/types/streaming/storage_series.py +5 -5
- gcore/types/streaming/stream.py +86 -49
- gcore/types/streaming/stream_create_clip_params.py +2 -1
- gcore/types/streaming/stream_create_params.py +9 -23
- gcore/types/streaming/stream_series.py +5 -5
- gcore/types/streaming/stream_update_params.py +9 -23
- gcore/types/streaming/video.py +53 -42
- gcore/types/streaming/video_update_params.py +13 -12
- gcore/types/streaming/vod_statistics_series.py +5 -5
- gcore/types/streaming/vod_total_stream_duration_series.py +3 -3
- gcore/types/waap/domain_list_params.py +1 -1
- gcore/types/waap/domain_update_params.py +1 -1
- gcore/types/waap/domains/advanced_rule_create_params.py +7 -4
- gcore/types/waap/domains/advanced_rule_update_params.py +6 -3
- gcore/types/waap/domains/api_path_create_params.py +4 -3
- gcore/types/waap/domains/api_path_list_params.py +3 -1
- gcore/types/waap/domains/api_path_update_params.py +5 -4
- gcore/types/waap/domains/custom_rule_create_params.py +13 -14
- gcore/types/waap/domains/custom_rule_update_params.py +12 -13
- gcore/types/waap/domains/firewall_rule_create_params.py +3 -2
- gcore/types/waap/domains/firewall_rule_update_params.py +2 -1
- gcore/types/waap/domains/insight_list_params.py +4 -2
- gcore/types/waap/domains/insight_replace_params.py +1 -1
- gcore/types/waap/domains/insight_silence_list_params.py +5 -3
- gcore/types/waap/domains/setting_update_params.py +3 -2
- gcore/types/waap/domains/statistic_get_ddos_info_params.py +6 -9
- gcore/types/waap/domains/statistic_get_events_aggregated_params.py +9 -10
- gcore/types/waap/domains/statistic_get_requests_series_params.py +8 -9
- gcore/types/waap/domains/statistic_get_traffic_series_params.py +6 -9
- gcore/types/waap/domains/waap_advanced_rule.py +3 -2
- gcore/types/waap/domains/waap_api_path.py +4 -4
- gcore/types/waap/domains/waap_api_scan_result.py +2 -2
- gcore/types/waap/domains/waap_custom_rule.py +4 -7
- gcore/types/waap/domains/waap_firewall_rule.py +3 -2
- gcore/types/waap/domains/waap_insight.py +1 -1
- gcore/types/waap/domains/waap_request_details.py +5 -4
- gcore/types/waap/waap_ip_ddos_info_model.py +3 -3
- gcore/types/waap/waap_rule_set.py +1 -1
- {gcore-0.10.0.dist-info → gcore-0.11.0.dist-info}/METADATA +7 -2
- {gcore-0.10.0.dist-info → gcore-0.11.0.dist-info}/RECORD +312 -192
- gcore/types/cloud/inference/inference_model.py +0 -65
- gcore/types/cloud/inference/inference_registry_credentials_create.py +0 -22
- gcore/types/cloud/inference/model_list_params.py +0 -21
- gcore/types/streaming/ai_contentmoderation_casm.py +0 -39
- gcore/types/streaming/ai_contentmoderation_weapon.py +0 -39
- gcore/types/streaming/meet_series.py +0 -23
- gcore/types/streaming/statistic_get_meet_series_params.py +0 -20
- {gcore-0.10.0.dist-info → gcore-0.11.0.dist-info}/WHEEL +0 -0
- {gcore-0.10.0.dist-info → gcore-0.11.0.dist-info}/licenses/LICENSE +0 -0
|
@@ -0,0 +1,374 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from typing_extensions import Literal
|
|
6
|
+
|
|
7
|
+
import httpx
|
|
8
|
+
|
|
9
|
+
from .metrics import (
|
|
10
|
+
MetricsResource,
|
|
11
|
+
AsyncMetricsResource,
|
|
12
|
+
MetricsResourceWithRawResponse,
|
|
13
|
+
AsyncMetricsResourceWithRawResponse,
|
|
14
|
+
MetricsResourceWithStreamingResponse,
|
|
15
|
+
AsyncMetricsResourceWithStreamingResponse,
|
|
16
|
+
)
|
|
17
|
+
from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven
|
|
18
|
+
from ..._utils import maybe_transform, async_maybe_transform
|
|
19
|
+
from ..._compat import cached_property
|
|
20
|
+
from .locations import (
|
|
21
|
+
LocationsResource,
|
|
22
|
+
AsyncLocationsResource,
|
|
23
|
+
LocationsResourceWithRawResponse,
|
|
24
|
+
AsyncLocationsResourceWithRawResponse,
|
|
25
|
+
LocationsResourceWithStreamingResponse,
|
|
26
|
+
AsyncLocationsResourceWithStreamingResponse,
|
|
27
|
+
)
|
|
28
|
+
from ..._resource import SyncAPIResource, AsyncAPIResource
|
|
29
|
+
from ..._response import (
|
|
30
|
+
to_raw_response_wrapper,
|
|
31
|
+
to_streamed_response_wrapper,
|
|
32
|
+
async_to_raw_response_wrapper,
|
|
33
|
+
async_to_streamed_response_wrapper,
|
|
34
|
+
)
|
|
35
|
+
from ...types.dns import dns_lookup_params
|
|
36
|
+
from .zones.zones import (
|
|
37
|
+
ZonesResource,
|
|
38
|
+
AsyncZonesResource,
|
|
39
|
+
ZonesResourceWithRawResponse,
|
|
40
|
+
AsyncZonesResourceWithRawResponse,
|
|
41
|
+
ZonesResourceWithStreamingResponse,
|
|
42
|
+
AsyncZonesResourceWithStreamingResponse,
|
|
43
|
+
)
|
|
44
|
+
from ..._base_client import make_request_options
|
|
45
|
+
from .pickers.pickers import (
|
|
46
|
+
PickersResource,
|
|
47
|
+
AsyncPickersResource,
|
|
48
|
+
PickersResourceWithRawResponse,
|
|
49
|
+
AsyncPickersResourceWithRawResponse,
|
|
50
|
+
PickersResourceWithStreamingResponse,
|
|
51
|
+
AsyncPickersResourceWithStreamingResponse,
|
|
52
|
+
)
|
|
53
|
+
from ...types.dns.dns_lookup_response import DNSLookupResponse
|
|
54
|
+
from ...types.dns.dns_get_account_overview_response import DNSGetAccountOverviewResponse
|
|
55
|
+
|
|
56
|
+
__all__ = ["DNSResource", "AsyncDNSResource"]
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
class DNSResource(SyncAPIResource):
|
|
60
|
+
@cached_property
|
|
61
|
+
def locations(self) -> LocationsResource:
|
|
62
|
+
return LocationsResource(self._client)
|
|
63
|
+
|
|
64
|
+
@cached_property
|
|
65
|
+
def metrics(self) -> MetricsResource:
|
|
66
|
+
return MetricsResource(self._client)
|
|
67
|
+
|
|
68
|
+
@cached_property
|
|
69
|
+
def pickers(self) -> PickersResource:
|
|
70
|
+
return PickersResource(self._client)
|
|
71
|
+
|
|
72
|
+
@cached_property
|
|
73
|
+
def zones(self) -> ZonesResource:
|
|
74
|
+
return ZonesResource(self._client)
|
|
75
|
+
|
|
76
|
+
@cached_property
|
|
77
|
+
def with_raw_response(self) -> DNSResourceWithRawResponse:
|
|
78
|
+
"""
|
|
79
|
+
This property can be used as a prefix for any HTTP method call to return
|
|
80
|
+
the raw response object instead of the parsed content.
|
|
81
|
+
|
|
82
|
+
For more information, see https://www.github.com/G-Core/gcore-python#accessing-raw-response-data-eg-headers
|
|
83
|
+
"""
|
|
84
|
+
return DNSResourceWithRawResponse(self)
|
|
85
|
+
|
|
86
|
+
@cached_property
|
|
87
|
+
def with_streaming_response(self) -> DNSResourceWithStreamingResponse:
|
|
88
|
+
"""
|
|
89
|
+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
|
90
|
+
|
|
91
|
+
For more information, see https://www.github.com/G-Core/gcore-python#with_streaming_response
|
|
92
|
+
"""
|
|
93
|
+
return DNSResourceWithStreamingResponse(self)
|
|
94
|
+
|
|
95
|
+
def get_account_overview(
|
|
96
|
+
self,
|
|
97
|
+
*,
|
|
98
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
99
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
100
|
+
extra_headers: Headers | None = None,
|
|
101
|
+
extra_query: Query | None = None,
|
|
102
|
+
extra_body: Body | None = None,
|
|
103
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
104
|
+
) -> DNSGetAccountOverviewResponse:
|
|
105
|
+
"""Get info about client"""
|
|
106
|
+
return self._get(
|
|
107
|
+
"/dns/v2/platform/info",
|
|
108
|
+
options=make_request_options(
|
|
109
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
110
|
+
),
|
|
111
|
+
cast_to=DNSGetAccountOverviewResponse,
|
|
112
|
+
)
|
|
113
|
+
|
|
114
|
+
def lookup(
|
|
115
|
+
self,
|
|
116
|
+
*,
|
|
117
|
+
name: str | NotGiven = NOT_GIVEN,
|
|
118
|
+
request_server: Literal["authoritative_dns", "google", "cloudflare", "open_dns", "quad9", "gcore"]
|
|
119
|
+
| NotGiven = NOT_GIVEN,
|
|
120
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
121
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
122
|
+
extra_headers: Headers | None = None,
|
|
123
|
+
extra_query: Query | None = None,
|
|
124
|
+
extra_body: Body | None = None,
|
|
125
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
126
|
+
) -> DNSLookupResponse:
|
|
127
|
+
"""
|
|
128
|
+
Get the dns records from a specific domain or ip.
|
|
129
|
+
|
|
130
|
+
Args:
|
|
131
|
+
name: Domain name
|
|
132
|
+
|
|
133
|
+
request_server: Server that will be used as resolver
|
|
134
|
+
|
|
135
|
+
extra_headers: Send extra headers
|
|
136
|
+
|
|
137
|
+
extra_query: Add additional query parameters to the request
|
|
138
|
+
|
|
139
|
+
extra_body: Add additional JSON properties to the request
|
|
140
|
+
|
|
141
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
142
|
+
"""
|
|
143
|
+
return self._get(
|
|
144
|
+
"/dns/v2/lookup",
|
|
145
|
+
options=make_request_options(
|
|
146
|
+
extra_headers=extra_headers,
|
|
147
|
+
extra_query=extra_query,
|
|
148
|
+
extra_body=extra_body,
|
|
149
|
+
timeout=timeout,
|
|
150
|
+
query=maybe_transform(
|
|
151
|
+
{
|
|
152
|
+
"name": name,
|
|
153
|
+
"request_server": request_server,
|
|
154
|
+
},
|
|
155
|
+
dns_lookup_params.DNSLookupParams,
|
|
156
|
+
),
|
|
157
|
+
),
|
|
158
|
+
cast_to=DNSLookupResponse,
|
|
159
|
+
)
|
|
160
|
+
|
|
161
|
+
|
|
162
|
+
class AsyncDNSResource(AsyncAPIResource):
|
|
163
|
+
@cached_property
|
|
164
|
+
def locations(self) -> AsyncLocationsResource:
|
|
165
|
+
return AsyncLocationsResource(self._client)
|
|
166
|
+
|
|
167
|
+
@cached_property
|
|
168
|
+
def metrics(self) -> AsyncMetricsResource:
|
|
169
|
+
return AsyncMetricsResource(self._client)
|
|
170
|
+
|
|
171
|
+
@cached_property
|
|
172
|
+
def pickers(self) -> AsyncPickersResource:
|
|
173
|
+
return AsyncPickersResource(self._client)
|
|
174
|
+
|
|
175
|
+
@cached_property
|
|
176
|
+
def zones(self) -> AsyncZonesResource:
|
|
177
|
+
return AsyncZonesResource(self._client)
|
|
178
|
+
|
|
179
|
+
@cached_property
|
|
180
|
+
def with_raw_response(self) -> AsyncDNSResourceWithRawResponse:
|
|
181
|
+
"""
|
|
182
|
+
This property can be used as a prefix for any HTTP method call to return
|
|
183
|
+
the raw response object instead of the parsed content.
|
|
184
|
+
|
|
185
|
+
For more information, see https://www.github.com/G-Core/gcore-python#accessing-raw-response-data-eg-headers
|
|
186
|
+
"""
|
|
187
|
+
return AsyncDNSResourceWithRawResponse(self)
|
|
188
|
+
|
|
189
|
+
@cached_property
|
|
190
|
+
def with_streaming_response(self) -> AsyncDNSResourceWithStreamingResponse:
|
|
191
|
+
"""
|
|
192
|
+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
|
193
|
+
|
|
194
|
+
For more information, see https://www.github.com/G-Core/gcore-python#with_streaming_response
|
|
195
|
+
"""
|
|
196
|
+
return AsyncDNSResourceWithStreamingResponse(self)
|
|
197
|
+
|
|
198
|
+
async def get_account_overview(
|
|
199
|
+
self,
|
|
200
|
+
*,
|
|
201
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
202
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
203
|
+
extra_headers: Headers | None = None,
|
|
204
|
+
extra_query: Query | None = None,
|
|
205
|
+
extra_body: Body | None = None,
|
|
206
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
207
|
+
) -> DNSGetAccountOverviewResponse:
|
|
208
|
+
"""Get info about client"""
|
|
209
|
+
return await self._get(
|
|
210
|
+
"/dns/v2/platform/info",
|
|
211
|
+
options=make_request_options(
|
|
212
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
213
|
+
),
|
|
214
|
+
cast_to=DNSGetAccountOverviewResponse,
|
|
215
|
+
)
|
|
216
|
+
|
|
217
|
+
async def lookup(
|
|
218
|
+
self,
|
|
219
|
+
*,
|
|
220
|
+
name: str | NotGiven = NOT_GIVEN,
|
|
221
|
+
request_server: Literal["authoritative_dns", "google", "cloudflare", "open_dns", "quad9", "gcore"]
|
|
222
|
+
| NotGiven = NOT_GIVEN,
|
|
223
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
224
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
225
|
+
extra_headers: Headers | None = None,
|
|
226
|
+
extra_query: Query | None = None,
|
|
227
|
+
extra_body: Body | None = None,
|
|
228
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
229
|
+
) -> DNSLookupResponse:
|
|
230
|
+
"""
|
|
231
|
+
Get the dns records from a specific domain or ip.
|
|
232
|
+
|
|
233
|
+
Args:
|
|
234
|
+
name: Domain name
|
|
235
|
+
|
|
236
|
+
request_server: Server that will be used as resolver
|
|
237
|
+
|
|
238
|
+
extra_headers: Send extra headers
|
|
239
|
+
|
|
240
|
+
extra_query: Add additional query parameters to the request
|
|
241
|
+
|
|
242
|
+
extra_body: Add additional JSON properties to the request
|
|
243
|
+
|
|
244
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
245
|
+
"""
|
|
246
|
+
return await self._get(
|
|
247
|
+
"/dns/v2/lookup",
|
|
248
|
+
options=make_request_options(
|
|
249
|
+
extra_headers=extra_headers,
|
|
250
|
+
extra_query=extra_query,
|
|
251
|
+
extra_body=extra_body,
|
|
252
|
+
timeout=timeout,
|
|
253
|
+
query=await async_maybe_transform(
|
|
254
|
+
{
|
|
255
|
+
"name": name,
|
|
256
|
+
"request_server": request_server,
|
|
257
|
+
},
|
|
258
|
+
dns_lookup_params.DNSLookupParams,
|
|
259
|
+
),
|
|
260
|
+
),
|
|
261
|
+
cast_to=DNSLookupResponse,
|
|
262
|
+
)
|
|
263
|
+
|
|
264
|
+
|
|
265
|
+
class DNSResourceWithRawResponse:
|
|
266
|
+
def __init__(self, dns: DNSResource) -> None:
|
|
267
|
+
self._dns = dns
|
|
268
|
+
|
|
269
|
+
self.get_account_overview = to_raw_response_wrapper(
|
|
270
|
+
dns.get_account_overview,
|
|
271
|
+
)
|
|
272
|
+
self.lookup = to_raw_response_wrapper(
|
|
273
|
+
dns.lookup,
|
|
274
|
+
)
|
|
275
|
+
|
|
276
|
+
@cached_property
|
|
277
|
+
def locations(self) -> LocationsResourceWithRawResponse:
|
|
278
|
+
return LocationsResourceWithRawResponse(self._dns.locations)
|
|
279
|
+
|
|
280
|
+
@cached_property
|
|
281
|
+
def metrics(self) -> MetricsResourceWithRawResponse:
|
|
282
|
+
return MetricsResourceWithRawResponse(self._dns.metrics)
|
|
283
|
+
|
|
284
|
+
@cached_property
|
|
285
|
+
def pickers(self) -> PickersResourceWithRawResponse:
|
|
286
|
+
return PickersResourceWithRawResponse(self._dns.pickers)
|
|
287
|
+
|
|
288
|
+
@cached_property
|
|
289
|
+
def zones(self) -> ZonesResourceWithRawResponse:
|
|
290
|
+
return ZonesResourceWithRawResponse(self._dns.zones)
|
|
291
|
+
|
|
292
|
+
|
|
293
|
+
class AsyncDNSResourceWithRawResponse:
|
|
294
|
+
def __init__(self, dns: AsyncDNSResource) -> None:
|
|
295
|
+
self._dns = dns
|
|
296
|
+
|
|
297
|
+
self.get_account_overview = async_to_raw_response_wrapper(
|
|
298
|
+
dns.get_account_overview,
|
|
299
|
+
)
|
|
300
|
+
self.lookup = async_to_raw_response_wrapper(
|
|
301
|
+
dns.lookup,
|
|
302
|
+
)
|
|
303
|
+
|
|
304
|
+
@cached_property
|
|
305
|
+
def locations(self) -> AsyncLocationsResourceWithRawResponse:
|
|
306
|
+
return AsyncLocationsResourceWithRawResponse(self._dns.locations)
|
|
307
|
+
|
|
308
|
+
@cached_property
|
|
309
|
+
def metrics(self) -> AsyncMetricsResourceWithRawResponse:
|
|
310
|
+
return AsyncMetricsResourceWithRawResponse(self._dns.metrics)
|
|
311
|
+
|
|
312
|
+
@cached_property
|
|
313
|
+
def pickers(self) -> AsyncPickersResourceWithRawResponse:
|
|
314
|
+
return AsyncPickersResourceWithRawResponse(self._dns.pickers)
|
|
315
|
+
|
|
316
|
+
@cached_property
|
|
317
|
+
def zones(self) -> AsyncZonesResourceWithRawResponse:
|
|
318
|
+
return AsyncZonesResourceWithRawResponse(self._dns.zones)
|
|
319
|
+
|
|
320
|
+
|
|
321
|
+
class DNSResourceWithStreamingResponse:
|
|
322
|
+
def __init__(self, dns: DNSResource) -> None:
|
|
323
|
+
self._dns = dns
|
|
324
|
+
|
|
325
|
+
self.get_account_overview = to_streamed_response_wrapper(
|
|
326
|
+
dns.get_account_overview,
|
|
327
|
+
)
|
|
328
|
+
self.lookup = to_streamed_response_wrapper(
|
|
329
|
+
dns.lookup,
|
|
330
|
+
)
|
|
331
|
+
|
|
332
|
+
@cached_property
|
|
333
|
+
def locations(self) -> LocationsResourceWithStreamingResponse:
|
|
334
|
+
return LocationsResourceWithStreamingResponse(self._dns.locations)
|
|
335
|
+
|
|
336
|
+
@cached_property
|
|
337
|
+
def metrics(self) -> MetricsResourceWithStreamingResponse:
|
|
338
|
+
return MetricsResourceWithStreamingResponse(self._dns.metrics)
|
|
339
|
+
|
|
340
|
+
@cached_property
|
|
341
|
+
def pickers(self) -> PickersResourceWithStreamingResponse:
|
|
342
|
+
return PickersResourceWithStreamingResponse(self._dns.pickers)
|
|
343
|
+
|
|
344
|
+
@cached_property
|
|
345
|
+
def zones(self) -> ZonesResourceWithStreamingResponse:
|
|
346
|
+
return ZonesResourceWithStreamingResponse(self._dns.zones)
|
|
347
|
+
|
|
348
|
+
|
|
349
|
+
class AsyncDNSResourceWithStreamingResponse:
|
|
350
|
+
def __init__(self, dns: AsyncDNSResource) -> None:
|
|
351
|
+
self._dns = dns
|
|
352
|
+
|
|
353
|
+
self.get_account_overview = async_to_streamed_response_wrapper(
|
|
354
|
+
dns.get_account_overview,
|
|
355
|
+
)
|
|
356
|
+
self.lookup = async_to_streamed_response_wrapper(
|
|
357
|
+
dns.lookup,
|
|
358
|
+
)
|
|
359
|
+
|
|
360
|
+
@cached_property
|
|
361
|
+
def locations(self) -> AsyncLocationsResourceWithStreamingResponse:
|
|
362
|
+
return AsyncLocationsResourceWithStreamingResponse(self._dns.locations)
|
|
363
|
+
|
|
364
|
+
@cached_property
|
|
365
|
+
def metrics(self) -> AsyncMetricsResourceWithStreamingResponse:
|
|
366
|
+
return AsyncMetricsResourceWithStreamingResponse(self._dns.metrics)
|
|
367
|
+
|
|
368
|
+
@cached_property
|
|
369
|
+
def pickers(self) -> AsyncPickersResourceWithStreamingResponse:
|
|
370
|
+
return AsyncPickersResourceWithStreamingResponse(self._dns.pickers)
|
|
371
|
+
|
|
372
|
+
@cached_property
|
|
373
|
+
def zones(self) -> AsyncZonesResourceWithStreamingResponse:
|
|
374
|
+
return AsyncZonesResourceWithStreamingResponse(self._dns.zones)
|
|
@@ -0,0 +1,288 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
import httpx
|
|
6
|
+
|
|
7
|
+
from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven
|
|
8
|
+
from ..._compat import cached_property
|
|
9
|
+
from ..._resource import SyncAPIResource, AsyncAPIResource
|
|
10
|
+
from ..._response import (
|
|
11
|
+
to_raw_response_wrapper,
|
|
12
|
+
to_streamed_response_wrapper,
|
|
13
|
+
async_to_raw_response_wrapper,
|
|
14
|
+
async_to_streamed_response_wrapper,
|
|
15
|
+
)
|
|
16
|
+
from ..._base_client import make_request_options
|
|
17
|
+
from ...types.dns.location_list_response import LocationListResponse
|
|
18
|
+
from ...types.dns.location_list_regions_response import LocationListRegionsResponse
|
|
19
|
+
from ...types.dns.location_list_countries_response import LocationListCountriesResponse
|
|
20
|
+
from ...types.dns.location_list_continents_response import LocationListContinentsResponse
|
|
21
|
+
|
|
22
|
+
__all__ = ["LocationsResource", "AsyncLocationsResource"]
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
class LocationsResource(SyncAPIResource):
|
|
26
|
+
@cached_property
|
|
27
|
+
def with_raw_response(self) -> LocationsResourceWithRawResponse:
|
|
28
|
+
"""
|
|
29
|
+
This property can be used as a prefix for any HTTP method call to return
|
|
30
|
+
the raw response object instead of the parsed content.
|
|
31
|
+
|
|
32
|
+
For more information, see https://www.github.com/G-Core/gcore-python#accessing-raw-response-data-eg-headers
|
|
33
|
+
"""
|
|
34
|
+
return LocationsResourceWithRawResponse(self)
|
|
35
|
+
|
|
36
|
+
@cached_property
|
|
37
|
+
def with_streaming_response(self) -> LocationsResourceWithStreamingResponse:
|
|
38
|
+
"""
|
|
39
|
+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
|
40
|
+
|
|
41
|
+
For more information, see https://www.github.com/G-Core/gcore-python#with_streaming_response
|
|
42
|
+
"""
|
|
43
|
+
return LocationsResourceWithStreamingResponse(self)
|
|
44
|
+
|
|
45
|
+
def list(
|
|
46
|
+
self,
|
|
47
|
+
*,
|
|
48
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
49
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
50
|
+
extra_headers: Headers | None = None,
|
|
51
|
+
extra_query: Query | None = None,
|
|
52
|
+
extra_body: Body | None = None,
|
|
53
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
54
|
+
) -> LocationListResponse:
|
|
55
|
+
"""List of All locations continents/countries/regions."""
|
|
56
|
+
return self._get(
|
|
57
|
+
"/dns/v2/locations",
|
|
58
|
+
options=make_request_options(
|
|
59
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
60
|
+
),
|
|
61
|
+
cast_to=LocationListResponse,
|
|
62
|
+
)
|
|
63
|
+
|
|
64
|
+
def list_continents(
|
|
65
|
+
self,
|
|
66
|
+
*,
|
|
67
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
68
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
69
|
+
extra_headers: Headers | None = None,
|
|
70
|
+
extra_query: Query | None = None,
|
|
71
|
+
extra_body: Body | None = None,
|
|
72
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
73
|
+
) -> LocationListContinentsResponse:
|
|
74
|
+
"""List of All locations continents."""
|
|
75
|
+
return self._get(
|
|
76
|
+
"/dns/v2/locations/continents",
|
|
77
|
+
options=make_request_options(
|
|
78
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
79
|
+
),
|
|
80
|
+
cast_to=LocationListContinentsResponse,
|
|
81
|
+
)
|
|
82
|
+
|
|
83
|
+
def list_countries(
|
|
84
|
+
self,
|
|
85
|
+
*,
|
|
86
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
87
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
88
|
+
extra_headers: Headers | None = None,
|
|
89
|
+
extra_query: Query | None = None,
|
|
90
|
+
extra_body: Body | None = None,
|
|
91
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
92
|
+
) -> LocationListCountriesResponse:
|
|
93
|
+
"""List of All locations countries."""
|
|
94
|
+
return self._get(
|
|
95
|
+
"/dns/v2/locations/countries",
|
|
96
|
+
options=make_request_options(
|
|
97
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
98
|
+
),
|
|
99
|
+
cast_to=LocationListCountriesResponse,
|
|
100
|
+
)
|
|
101
|
+
|
|
102
|
+
def list_regions(
|
|
103
|
+
self,
|
|
104
|
+
*,
|
|
105
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
106
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
107
|
+
extra_headers: Headers | None = None,
|
|
108
|
+
extra_query: Query | None = None,
|
|
109
|
+
extra_body: Body | None = None,
|
|
110
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
111
|
+
) -> LocationListRegionsResponse:
|
|
112
|
+
"""List of All locations regions."""
|
|
113
|
+
return self._get(
|
|
114
|
+
"/dns/v2/locations/regions",
|
|
115
|
+
options=make_request_options(
|
|
116
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
117
|
+
),
|
|
118
|
+
cast_to=LocationListRegionsResponse,
|
|
119
|
+
)
|
|
120
|
+
|
|
121
|
+
|
|
122
|
+
class AsyncLocationsResource(AsyncAPIResource):
|
|
123
|
+
@cached_property
|
|
124
|
+
def with_raw_response(self) -> AsyncLocationsResourceWithRawResponse:
|
|
125
|
+
"""
|
|
126
|
+
This property can be used as a prefix for any HTTP method call to return
|
|
127
|
+
the raw response object instead of the parsed content.
|
|
128
|
+
|
|
129
|
+
For more information, see https://www.github.com/G-Core/gcore-python#accessing-raw-response-data-eg-headers
|
|
130
|
+
"""
|
|
131
|
+
return AsyncLocationsResourceWithRawResponse(self)
|
|
132
|
+
|
|
133
|
+
@cached_property
|
|
134
|
+
def with_streaming_response(self) -> AsyncLocationsResourceWithStreamingResponse:
|
|
135
|
+
"""
|
|
136
|
+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
|
137
|
+
|
|
138
|
+
For more information, see https://www.github.com/G-Core/gcore-python#with_streaming_response
|
|
139
|
+
"""
|
|
140
|
+
return AsyncLocationsResourceWithStreamingResponse(self)
|
|
141
|
+
|
|
142
|
+
async def list(
|
|
143
|
+
self,
|
|
144
|
+
*,
|
|
145
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
146
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
147
|
+
extra_headers: Headers | None = None,
|
|
148
|
+
extra_query: Query | None = None,
|
|
149
|
+
extra_body: Body | None = None,
|
|
150
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
151
|
+
) -> LocationListResponse:
|
|
152
|
+
"""List of All locations continents/countries/regions."""
|
|
153
|
+
return await self._get(
|
|
154
|
+
"/dns/v2/locations",
|
|
155
|
+
options=make_request_options(
|
|
156
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
157
|
+
),
|
|
158
|
+
cast_to=LocationListResponse,
|
|
159
|
+
)
|
|
160
|
+
|
|
161
|
+
async def list_continents(
|
|
162
|
+
self,
|
|
163
|
+
*,
|
|
164
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
165
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
166
|
+
extra_headers: Headers | None = None,
|
|
167
|
+
extra_query: Query | None = None,
|
|
168
|
+
extra_body: Body | None = None,
|
|
169
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
170
|
+
) -> LocationListContinentsResponse:
|
|
171
|
+
"""List of All locations continents."""
|
|
172
|
+
return await self._get(
|
|
173
|
+
"/dns/v2/locations/continents",
|
|
174
|
+
options=make_request_options(
|
|
175
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
176
|
+
),
|
|
177
|
+
cast_to=LocationListContinentsResponse,
|
|
178
|
+
)
|
|
179
|
+
|
|
180
|
+
async def list_countries(
|
|
181
|
+
self,
|
|
182
|
+
*,
|
|
183
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
184
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
185
|
+
extra_headers: Headers | None = None,
|
|
186
|
+
extra_query: Query | None = None,
|
|
187
|
+
extra_body: Body | None = None,
|
|
188
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
189
|
+
) -> LocationListCountriesResponse:
|
|
190
|
+
"""List of All locations countries."""
|
|
191
|
+
return await self._get(
|
|
192
|
+
"/dns/v2/locations/countries",
|
|
193
|
+
options=make_request_options(
|
|
194
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
195
|
+
),
|
|
196
|
+
cast_to=LocationListCountriesResponse,
|
|
197
|
+
)
|
|
198
|
+
|
|
199
|
+
async def list_regions(
|
|
200
|
+
self,
|
|
201
|
+
*,
|
|
202
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
203
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
204
|
+
extra_headers: Headers | None = None,
|
|
205
|
+
extra_query: Query | None = None,
|
|
206
|
+
extra_body: Body | None = None,
|
|
207
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
208
|
+
) -> LocationListRegionsResponse:
|
|
209
|
+
"""List of All locations regions."""
|
|
210
|
+
return await self._get(
|
|
211
|
+
"/dns/v2/locations/regions",
|
|
212
|
+
options=make_request_options(
|
|
213
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
214
|
+
),
|
|
215
|
+
cast_to=LocationListRegionsResponse,
|
|
216
|
+
)
|
|
217
|
+
|
|
218
|
+
|
|
219
|
+
class LocationsResourceWithRawResponse:
|
|
220
|
+
def __init__(self, locations: LocationsResource) -> None:
|
|
221
|
+
self._locations = locations
|
|
222
|
+
|
|
223
|
+
self.list = to_raw_response_wrapper(
|
|
224
|
+
locations.list,
|
|
225
|
+
)
|
|
226
|
+
self.list_continents = to_raw_response_wrapper(
|
|
227
|
+
locations.list_continents,
|
|
228
|
+
)
|
|
229
|
+
self.list_countries = to_raw_response_wrapper(
|
|
230
|
+
locations.list_countries,
|
|
231
|
+
)
|
|
232
|
+
self.list_regions = to_raw_response_wrapper(
|
|
233
|
+
locations.list_regions,
|
|
234
|
+
)
|
|
235
|
+
|
|
236
|
+
|
|
237
|
+
class AsyncLocationsResourceWithRawResponse:
|
|
238
|
+
def __init__(self, locations: AsyncLocationsResource) -> None:
|
|
239
|
+
self._locations = locations
|
|
240
|
+
|
|
241
|
+
self.list = async_to_raw_response_wrapper(
|
|
242
|
+
locations.list,
|
|
243
|
+
)
|
|
244
|
+
self.list_continents = async_to_raw_response_wrapper(
|
|
245
|
+
locations.list_continents,
|
|
246
|
+
)
|
|
247
|
+
self.list_countries = async_to_raw_response_wrapper(
|
|
248
|
+
locations.list_countries,
|
|
249
|
+
)
|
|
250
|
+
self.list_regions = async_to_raw_response_wrapper(
|
|
251
|
+
locations.list_regions,
|
|
252
|
+
)
|
|
253
|
+
|
|
254
|
+
|
|
255
|
+
class LocationsResourceWithStreamingResponse:
|
|
256
|
+
def __init__(self, locations: LocationsResource) -> None:
|
|
257
|
+
self._locations = locations
|
|
258
|
+
|
|
259
|
+
self.list = to_streamed_response_wrapper(
|
|
260
|
+
locations.list,
|
|
261
|
+
)
|
|
262
|
+
self.list_continents = to_streamed_response_wrapper(
|
|
263
|
+
locations.list_continents,
|
|
264
|
+
)
|
|
265
|
+
self.list_countries = to_streamed_response_wrapper(
|
|
266
|
+
locations.list_countries,
|
|
267
|
+
)
|
|
268
|
+
self.list_regions = to_streamed_response_wrapper(
|
|
269
|
+
locations.list_regions,
|
|
270
|
+
)
|
|
271
|
+
|
|
272
|
+
|
|
273
|
+
class AsyncLocationsResourceWithStreamingResponse:
|
|
274
|
+
def __init__(self, locations: AsyncLocationsResource) -> None:
|
|
275
|
+
self._locations = locations
|
|
276
|
+
|
|
277
|
+
self.list = async_to_streamed_response_wrapper(
|
|
278
|
+
locations.list,
|
|
279
|
+
)
|
|
280
|
+
self.list_continents = async_to_streamed_response_wrapper(
|
|
281
|
+
locations.list_continents,
|
|
282
|
+
)
|
|
283
|
+
self.list_countries = async_to_streamed_response_wrapper(
|
|
284
|
+
locations.list_countries,
|
|
285
|
+
)
|
|
286
|
+
self.list_regions = async_to_streamed_response_wrapper(
|
|
287
|
+
locations.list_regions,
|
|
288
|
+
)
|