gcore 0.10.0__py3-none-any.whl → 0.12.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/reserved_fixed_ips.py +608 -0
- 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 +1125 -223
- 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 +1046 -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.12.0.dist-info}/METADATA +7 -2
- {gcore-0.10.0.dist-info → gcore-0.12.0.dist-info}/RECORD +313 -193
- 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.12.0.dist-info}/WHEEL +0 -0
- {gcore-0.10.0.dist-info → gcore-0.12.0.dist-info}/licenses/LICENSE +0 -0
|
@@ -0,0 +1,1493 @@
|
|
|
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 Dict, Union, Iterable
|
|
6
|
+
from datetime import datetime
|
|
7
|
+
from typing_extensions import Literal
|
|
8
|
+
|
|
9
|
+
import httpx
|
|
10
|
+
|
|
11
|
+
from .dnssec import (
|
|
12
|
+
DnssecResource,
|
|
13
|
+
AsyncDnssecResource,
|
|
14
|
+
DnssecResourceWithRawResponse,
|
|
15
|
+
AsyncDnssecResourceWithRawResponse,
|
|
16
|
+
DnssecResourceWithStreamingResponse,
|
|
17
|
+
AsyncDnssecResourceWithStreamingResponse,
|
|
18
|
+
)
|
|
19
|
+
from .rrsets import (
|
|
20
|
+
RrsetsResource,
|
|
21
|
+
AsyncRrsetsResource,
|
|
22
|
+
RrsetsResourceWithRawResponse,
|
|
23
|
+
AsyncRrsetsResourceWithRawResponse,
|
|
24
|
+
RrsetsResourceWithStreamingResponse,
|
|
25
|
+
AsyncRrsetsResourceWithStreamingResponse,
|
|
26
|
+
)
|
|
27
|
+
from ...._types import NOT_GIVEN, Body, Query, Headers, NotGiven, SequenceNotStr
|
|
28
|
+
from ...._utils import maybe_transform, async_maybe_transform
|
|
29
|
+
from ...._compat import cached_property
|
|
30
|
+
from ...._resource import SyncAPIResource, AsyncAPIResource
|
|
31
|
+
from ...._response import (
|
|
32
|
+
to_raw_response_wrapper,
|
|
33
|
+
to_streamed_response_wrapper,
|
|
34
|
+
async_to_raw_response_wrapper,
|
|
35
|
+
async_to_streamed_response_wrapper,
|
|
36
|
+
)
|
|
37
|
+
from ....types.dns import (
|
|
38
|
+
zone_list_params,
|
|
39
|
+
zone_create_params,
|
|
40
|
+
zone_import_params,
|
|
41
|
+
zone_replace_params,
|
|
42
|
+
zone_get_statistics_params,
|
|
43
|
+
)
|
|
44
|
+
from ...._base_client import make_request_options
|
|
45
|
+
from ....types.dns.zone_get_response import ZoneGetResponse
|
|
46
|
+
from ....types.dns.zone_list_response import ZoneListResponse
|
|
47
|
+
from ....types.dns.zone_create_response import ZoneCreateResponse
|
|
48
|
+
from ....types.dns.zone_export_response import ZoneExportResponse
|
|
49
|
+
from ....types.dns.zone_import_response import ZoneImportResponse
|
|
50
|
+
from ....types.dns.zone_get_statistics_response import ZoneGetStatisticsResponse
|
|
51
|
+
from ....types.dns.zone_check_delegation_status_response import ZoneCheckDelegationStatusResponse
|
|
52
|
+
|
|
53
|
+
__all__ = ["ZonesResource", "AsyncZonesResource"]
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
class ZonesResource(SyncAPIResource):
|
|
57
|
+
@cached_property
|
|
58
|
+
def dnssec(self) -> DnssecResource:
|
|
59
|
+
return DnssecResource(self._client)
|
|
60
|
+
|
|
61
|
+
@cached_property
|
|
62
|
+
def rrsets(self) -> RrsetsResource:
|
|
63
|
+
return RrsetsResource(self._client)
|
|
64
|
+
|
|
65
|
+
@cached_property
|
|
66
|
+
def with_raw_response(self) -> ZonesResourceWithRawResponse:
|
|
67
|
+
"""
|
|
68
|
+
This property can be used as a prefix for any HTTP method call to return
|
|
69
|
+
the raw response object instead of the parsed content.
|
|
70
|
+
|
|
71
|
+
For more information, see https://www.github.com/G-Core/gcore-python#accessing-raw-response-data-eg-headers
|
|
72
|
+
"""
|
|
73
|
+
return ZonesResourceWithRawResponse(self)
|
|
74
|
+
|
|
75
|
+
@cached_property
|
|
76
|
+
def with_streaming_response(self) -> ZonesResourceWithStreamingResponse:
|
|
77
|
+
"""
|
|
78
|
+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
|
79
|
+
|
|
80
|
+
For more information, see https://www.github.com/G-Core/gcore-python#with_streaming_response
|
|
81
|
+
"""
|
|
82
|
+
return ZonesResourceWithStreamingResponse(self)
|
|
83
|
+
|
|
84
|
+
def create(
|
|
85
|
+
self,
|
|
86
|
+
*,
|
|
87
|
+
name: str,
|
|
88
|
+
contact: str | NotGiven = NOT_GIVEN,
|
|
89
|
+
enabled: bool | NotGiven = NOT_GIVEN,
|
|
90
|
+
expiry: int | NotGiven = NOT_GIVEN,
|
|
91
|
+
meta: Dict[str, object] | NotGiven = NOT_GIVEN,
|
|
92
|
+
nx_ttl: int | NotGiven = NOT_GIVEN,
|
|
93
|
+
primary_server: str | NotGiven = NOT_GIVEN,
|
|
94
|
+
refresh: int | NotGiven = NOT_GIVEN,
|
|
95
|
+
retry: int | NotGiven = NOT_GIVEN,
|
|
96
|
+
serial: int | NotGiven = NOT_GIVEN,
|
|
97
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
98
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
99
|
+
extra_headers: Headers | None = None,
|
|
100
|
+
extra_query: Query | None = None,
|
|
101
|
+
extra_body: Body | None = None,
|
|
102
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
103
|
+
) -> ZoneCreateResponse:
|
|
104
|
+
"""
|
|
105
|
+
Add DNS zone.
|
|
106
|
+
|
|
107
|
+
Args:
|
|
108
|
+
name: name of DNS zone
|
|
109
|
+
|
|
110
|
+
contact: email address of the administrator responsible for this zone
|
|
111
|
+
|
|
112
|
+
enabled: If a zone is disabled, then its records will not be resolved on dns servers
|
|
113
|
+
|
|
114
|
+
expiry: number of seconds after which secondary name servers should stop answering
|
|
115
|
+
request for this zone
|
|
116
|
+
|
|
117
|
+
meta: arbitrarily data of zone in json format you can specify `webhook` url and
|
|
118
|
+
`webhook_method` here webhook will get a map with three arrays: for created,
|
|
119
|
+
updated and deleted rrsets `webhook_method` can be omitted, POST will be used by
|
|
120
|
+
default
|
|
121
|
+
|
|
122
|
+
nx_ttl: Time To Live of cache
|
|
123
|
+
|
|
124
|
+
primary_server: primary master name server for zone
|
|
125
|
+
|
|
126
|
+
refresh: number of seconds after which secondary name servers should query the master for
|
|
127
|
+
the SOA record, to detect zone changes.
|
|
128
|
+
|
|
129
|
+
retry: number of seconds after which secondary name servers should retry to request the
|
|
130
|
+
serial number
|
|
131
|
+
|
|
132
|
+
serial: Serial number for this zone or Timestamp of zone modification moment. If a
|
|
133
|
+
secondary name server slaved to this one observes an increase in this number,
|
|
134
|
+
the slave will assume that the zone has been updated and initiate a zone
|
|
135
|
+
transfer.
|
|
136
|
+
|
|
137
|
+
extra_headers: Send extra headers
|
|
138
|
+
|
|
139
|
+
extra_query: Add additional query parameters to the request
|
|
140
|
+
|
|
141
|
+
extra_body: Add additional JSON properties to the request
|
|
142
|
+
|
|
143
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
144
|
+
"""
|
|
145
|
+
return self._post(
|
|
146
|
+
"/dns/v2/zones",
|
|
147
|
+
body=maybe_transform(
|
|
148
|
+
{
|
|
149
|
+
"name": name,
|
|
150
|
+
"contact": contact,
|
|
151
|
+
"enabled": enabled,
|
|
152
|
+
"expiry": expiry,
|
|
153
|
+
"meta": meta,
|
|
154
|
+
"nx_ttl": nx_ttl,
|
|
155
|
+
"primary_server": primary_server,
|
|
156
|
+
"refresh": refresh,
|
|
157
|
+
"retry": retry,
|
|
158
|
+
"serial": serial,
|
|
159
|
+
},
|
|
160
|
+
zone_create_params.ZoneCreateParams,
|
|
161
|
+
),
|
|
162
|
+
options=make_request_options(
|
|
163
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
164
|
+
),
|
|
165
|
+
cast_to=ZoneCreateResponse,
|
|
166
|
+
)
|
|
167
|
+
|
|
168
|
+
def list(
|
|
169
|
+
self,
|
|
170
|
+
*,
|
|
171
|
+
id: Iterable[int] | NotGiven = NOT_GIVEN,
|
|
172
|
+
case_sensitive: bool | NotGiven = NOT_GIVEN,
|
|
173
|
+
client_id: Iterable[int] | NotGiven = NOT_GIVEN,
|
|
174
|
+
dynamic: bool | NotGiven = NOT_GIVEN,
|
|
175
|
+
enabled: bool | NotGiven = NOT_GIVEN,
|
|
176
|
+
exact_match: bool | NotGiven = NOT_GIVEN,
|
|
177
|
+
healthcheck: bool | NotGiven = NOT_GIVEN,
|
|
178
|
+
iam_reseller_id: Iterable[int] | NotGiven = NOT_GIVEN,
|
|
179
|
+
limit: int | NotGiven = NOT_GIVEN,
|
|
180
|
+
name: SequenceNotStr[str] | NotGiven = NOT_GIVEN,
|
|
181
|
+
offset: int | NotGiven = NOT_GIVEN,
|
|
182
|
+
order_by: str | NotGiven = NOT_GIVEN,
|
|
183
|
+
order_direction: Literal["asc", "desc"] | NotGiven = NOT_GIVEN,
|
|
184
|
+
reseller_id: Iterable[int] | NotGiven = NOT_GIVEN,
|
|
185
|
+
status: str | NotGiven = NOT_GIVEN,
|
|
186
|
+
updated_at_from: Union[str, datetime] | NotGiven = NOT_GIVEN,
|
|
187
|
+
updated_at_to: Union[str, datetime] | NotGiven = NOT_GIVEN,
|
|
188
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
189
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
190
|
+
extra_headers: Headers | None = None,
|
|
191
|
+
extra_query: Query | None = None,
|
|
192
|
+
extra_body: Body | None = None,
|
|
193
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
194
|
+
) -> ZoneListResponse:
|
|
195
|
+
"""Show created zones with pagination managed by limit and offset params.
|
|
196
|
+
|
|
197
|
+
All query
|
|
198
|
+
params are optional.
|
|
199
|
+
|
|
200
|
+
Args:
|
|
201
|
+
id: to pass several ids `id=1&id=3&id=5...`
|
|
202
|
+
|
|
203
|
+
client_id: to pass several `client_ids` `client_id=1&`client_id`=3&`client_id`=5...`
|
|
204
|
+
|
|
205
|
+
dynamic: Zones with dynamic RRsets
|
|
206
|
+
|
|
207
|
+
healthcheck: Zones with RRsets that have healthchecks
|
|
208
|
+
|
|
209
|
+
limit: Max number of records in response
|
|
210
|
+
|
|
211
|
+
name: to pass several names `name=first&name=second...`
|
|
212
|
+
|
|
213
|
+
offset: Amount of records to skip before beginning to write in response.
|
|
214
|
+
|
|
215
|
+
order_by: Field name to sort by
|
|
216
|
+
|
|
217
|
+
order_direction: Ascending or descending order
|
|
218
|
+
|
|
219
|
+
extra_headers: Send extra headers
|
|
220
|
+
|
|
221
|
+
extra_query: Add additional query parameters to the request
|
|
222
|
+
|
|
223
|
+
extra_body: Add additional JSON properties to the request
|
|
224
|
+
|
|
225
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
226
|
+
"""
|
|
227
|
+
return self._get(
|
|
228
|
+
"/dns/v2/zones",
|
|
229
|
+
options=make_request_options(
|
|
230
|
+
extra_headers=extra_headers,
|
|
231
|
+
extra_query=extra_query,
|
|
232
|
+
extra_body=extra_body,
|
|
233
|
+
timeout=timeout,
|
|
234
|
+
query=maybe_transform(
|
|
235
|
+
{
|
|
236
|
+
"id": id,
|
|
237
|
+
"case_sensitive": case_sensitive,
|
|
238
|
+
"client_id": client_id,
|
|
239
|
+
"dynamic": dynamic,
|
|
240
|
+
"enabled": enabled,
|
|
241
|
+
"exact_match": exact_match,
|
|
242
|
+
"healthcheck": healthcheck,
|
|
243
|
+
"iam_reseller_id": iam_reseller_id,
|
|
244
|
+
"limit": limit,
|
|
245
|
+
"name": name,
|
|
246
|
+
"offset": offset,
|
|
247
|
+
"order_by": order_by,
|
|
248
|
+
"order_direction": order_direction,
|
|
249
|
+
"reseller_id": reseller_id,
|
|
250
|
+
"status": status,
|
|
251
|
+
"updated_at_from": updated_at_from,
|
|
252
|
+
"updated_at_to": updated_at_to,
|
|
253
|
+
},
|
|
254
|
+
zone_list_params.ZoneListParams,
|
|
255
|
+
),
|
|
256
|
+
),
|
|
257
|
+
cast_to=ZoneListResponse,
|
|
258
|
+
)
|
|
259
|
+
|
|
260
|
+
def delete(
|
|
261
|
+
self,
|
|
262
|
+
name: str,
|
|
263
|
+
*,
|
|
264
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
265
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
266
|
+
extra_headers: Headers | None = None,
|
|
267
|
+
extra_query: Query | None = None,
|
|
268
|
+
extra_body: Body | None = None,
|
|
269
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
270
|
+
) -> object:
|
|
271
|
+
"""
|
|
272
|
+
Delete DNS zone and its records and raws.
|
|
273
|
+
|
|
274
|
+
Args:
|
|
275
|
+
extra_headers: Send extra headers
|
|
276
|
+
|
|
277
|
+
extra_query: Add additional query parameters to the request
|
|
278
|
+
|
|
279
|
+
extra_body: Add additional JSON properties to the request
|
|
280
|
+
|
|
281
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
282
|
+
"""
|
|
283
|
+
if not name:
|
|
284
|
+
raise ValueError(f"Expected a non-empty value for `name` but received {name!r}")
|
|
285
|
+
return self._delete(
|
|
286
|
+
f"/dns/v2/zones/{name}",
|
|
287
|
+
options=make_request_options(
|
|
288
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
289
|
+
),
|
|
290
|
+
cast_to=object,
|
|
291
|
+
)
|
|
292
|
+
|
|
293
|
+
def check_delegation_status(
|
|
294
|
+
self,
|
|
295
|
+
name: str,
|
|
296
|
+
*,
|
|
297
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
298
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
299
|
+
extra_headers: Headers | None = None,
|
|
300
|
+
extra_query: Query | None = None,
|
|
301
|
+
extra_body: Body | None = None,
|
|
302
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
303
|
+
) -> ZoneCheckDelegationStatusResponse:
|
|
304
|
+
"""Returns delegation status for specified domain name.
|
|
305
|
+
|
|
306
|
+
This endpoint has rate
|
|
307
|
+
limit.
|
|
308
|
+
|
|
309
|
+
Args:
|
|
310
|
+
extra_headers: Send extra headers
|
|
311
|
+
|
|
312
|
+
extra_query: Add additional query parameters to the request
|
|
313
|
+
|
|
314
|
+
extra_body: Add additional JSON properties to the request
|
|
315
|
+
|
|
316
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
317
|
+
"""
|
|
318
|
+
if not name:
|
|
319
|
+
raise ValueError(f"Expected a non-empty value for `name` but received {name!r}")
|
|
320
|
+
return self._post(
|
|
321
|
+
f"/dns/v2/analyze/{name}/delegation-status",
|
|
322
|
+
options=make_request_options(
|
|
323
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
324
|
+
),
|
|
325
|
+
cast_to=ZoneCheckDelegationStatusResponse,
|
|
326
|
+
)
|
|
327
|
+
|
|
328
|
+
def disable(
|
|
329
|
+
self,
|
|
330
|
+
name: str,
|
|
331
|
+
*,
|
|
332
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
333
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
334
|
+
extra_headers: Headers | None = None,
|
|
335
|
+
extra_query: Query | None = None,
|
|
336
|
+
extra_body: Body | None = None,
|
|
337
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
338
|
+
) -> object:
|
|
339
|
+
"""
|
|
340
|
+
Disable DNS zone.
|
|
341
|
+
|
|
342
|
+
Args:
|
|
343
|
+
extra_headers: Send extra headers
|
|
344
|
+
|
|
345
|
+
extra_query: Add additional query parameters to the request
|
|
346
|
+
|
|
347
|
+
extra_body: Add additional JSON properties to the request
|
|
348
|
+
|
|
349
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
350
|
+
"""
|
|
351
|
+
if not name:
|
|
352
|
+
raise ValueError(f"Expected a non-empty value for `name` but received {name!r}")
|
|
353
|
+
return self._patch(
|
|
354
|
+
f"/dns/v2/zones/{name}/disable",
|
|
355
|
+
options=make_request_options(
|
|
356
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
357
|
+
),
|
|
358
|
+
cast_to=object,
|
|
359
|
+
)
|
|
360
|
+
|
|
361
|
+
def enable(
|
|
362
|
+
self,
|
|
363
|
+
name: str,
|
|
364
|
+
*,
|
|
365
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
366
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
367
|
+
extra_headers: Headers | None = None,
|
|
368
|
+
extra_query: Query | None = None,
|
|
369
|
+
extra_body: Body | None = None,
|
|
370
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
371
|
+
) -> object:
|
|
372
|
+
"""
|
|
373
|
+
Enable DNS zone.
|
|
374
|
+
|
|
375
|
+
Args:
|
|
376
|
+
extra_headers: Send extra headers
|
|
377
|
+
|
|
378
|
+
extra_query: Add additional query parameters to the request
|
|
379
|
+
|
|
380
|
+
extra_body: Add additional JSON properties to the request
|
|
381
|
+
|
|
382
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
383
|
+
"""
|
|
384
|
+
if not name:
|
|
385
|
+
raise ValueError(f"Expected a non-empty value for `name` but received {name!r}")
|
|
386
|
+
return self._patch(
|
|
387
|
+
f"/dns/v2/zones/{name}/enable",
|
|
388
|
+
options=make_request_options(
|
|
389
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
390
|
+
),
|
|
391
|
+
cast_to=object,
|
|
392
|
+
)
|
|
393
|
+
|
|
394
|
+
def export(
|
|
395
|
+
self,
|
|
396
|
+
zone_name: str,
|
|
397
|
+
*,
|
|
398
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
399
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
400
|
+
extra_headers: Headers | None = None,
|
|
401
|
+
extra_query: Query | None = None,
|
|
402
|
+
extra_body: Body | None = None,
|
|
403
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
404
|
+
) -> ZoneExportResponse:
|
|
405
|
+
"""
|
|
406
|
+
Export zone to bind9 format.
|
|
407
|
+
|
|
408
|
+
Args:
|
|
409
|
+
extra_headers: Send extra headers
|
|
410
|
+
|
|
411
|
+
extra_query: Add additional query parameters to the request
|
|
412
|
+
|
|
413
|
+
extra_body: Add additional JSON properties to the request
|
|
414
|
+
|
|
415
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
416
|
+
"""
|
|
417
|
+
if not zone_name:
|
|
418
|
+
raise ValueError(f"Expected a non-empty value for `zone_name` but received {zone_name!r}")
|
|
419
|
+
return self._get(
|
|
420
|
+
f"/dns/v2/zones/{zone_name}/export",
|
|
421
|
+
options=make_request_options(
|
|
422
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
423
|
+
),
|
|
424
|
+
cast_to=ZoneExportResponse,
|
|
425
|
+
)
|
|
426
|
+
|
|
427
|
+
def get(
|
|
428
|
+
self,
|
|
429
|
+
name: str,
|
|
430
|
+
*,
|
|
431
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
432
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
433
|
+
extra_headers: Headers | None = None,
|
|
434
|
+
extra_query: Query | None = None,
|
|
435
|
+
extra_body: Body | None = None,
|
|
436
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
437
|
+
) -> ZoneGetResponse:
|
|
438
|
+
"""
|
|
439
|
+
Zone info by zone name.
|
|
440
|
+
|
|
441
|
+
Args:
|
|
442
|
+
extra_headers: Send extra headers
|
|
443
|
+
|
|
444
|
+
extra_query: Add additional query parameters to the request
|
|
445
|
+
|
|
446
|
+
extra_body: Add additional JSON properties to the request
|
|
447
|
+
|
|
448
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
449
|
+
"""
|
|
450
|
+
if not name:
|
|
451
|
+
raise ValueError(f"Expected a non-empty value for `name` but received {name!r}")
|
|
452
|
+
return self._get(
|
|
453
|
+
f"/dns/v2/zones/{name}",
|
|
454
|
+
options=make_request_options(
|
|
455
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
456
|
+
),
|
|
457
|
+
cast_to=ZoneGetResponse,
|
|
458
|
+
)
|
|
459
|
+
|
|
460
|
+
def get_statistics(
|
|
461
|
+
self,
|
|
462
|
+
name: str,
|
|
463
|
+
*,
|
|
464
|
+
from_: int | NotGiven = NOT_GIVEN,
|
|
465
|
+
granularity: str | NotGiven = NOT_GIVEN,
|
|
466
|
+
record_type: str | NotGiven = NOT_GIVEN,
|
|
467
|
+
to: int | NotGiven = NOT_GIVEN,
|
|
468
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
469
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
470
|
+
extra_headers: Headers | None = None,
|
|
471
|
+
extra_query: Query | None = None,
|
|
472
|
+
extra_body: Body | None = None,
|
|
473
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
474
|
+
) -> ZoneGetStatisticsResponse:
|
|
475
|
+
"""Statistics of DNS zone in common and by record types.
|
|
476
|
+
|
|
477
|
+
To get summary statistics
|
|
478
|
+
for all zones use `all` instead of zone name in path. Note: Consumption
|
|
479
|
+
statistics is updated in near real-time as a standard practice. However, the
|
|
480
|
+
frequency of updates can vary, but they are typically available within a 30
|
|
481
|
+
minutes period. Exceptions, such as maintenance periods, may delay data beyond
|
|
482
|
+
30 minutes until servers resume and backfill missing statistics.
|
|
483
|
+
|
|
484
|
+
Args:
|
|
485
|
+
from_:
|
|
486
|
+
Beginning of the requested time period (Unix Timestamp, UTC.) In a query string:
|
|
487
|
+
&from=1709068637
|
|
488
|
+
|
|
489
|
+
granularity: Granularity parameter string is a sequence of decimal numbers, each with
|
|
490
|
+
optional fraction and a unit suffix, such as "300ms", "1.5h" or "2h45m". Valid
|
|
491
|
+
time units are "s", "m", "h".
|
|
492
|
+
|
|
493
|
+
record_type:
|
|
494
|
+
DNS record type. Possible values:
|
|
495
|
+
|
|
496
|
+
- A
|
|
497
|
+
- AAAA
|
|
498
|
+
- NS
|
|
499
|
+
- CNAME
|
|
500
|
+
- MX
|
|
501
|
+
- TXT
|
|
502
|
+
- SVCB
|
|
503
|
+
- HTTPS
|
|
504
|
+
|
|
505
|
+
to:
|
|
506
|
+
End of the requested time period (Unix Timestamp, UTC.) In a query string:
|
|
507
|
+
&to=1709673437
|
|
508
|
+
|
|
509
|
+
extra_headers: Send extra headers
|
|
510
|
+
|
|
511
|
+
extra_query: Add additional query parameters to the request
|
|
512
|
+
|
|
513
|
+
extra_body: Add additional JSON properties to the request
|
|
514
|
+
|
|
515
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
516
|
+
"""
|
|
517
|
+
if not name:
|
|
518
|
+
raise ValueError(f"Expected a non-empty value for `name` but received {name!r}")
|
|
519
|
+
return self._get(
|
|
520
|
+
f"/dns/v2/zones/{name}/statistics",
|
|
521
|
+
options=make_request_options(
|
|
522
|
+
extra_headers=extra_headers,
|
|
523
|
+
extra_query=extra_query,
|
|
524
|
+
extra_body=extra_body,
|
|
525
|
+
timeout=timeout,
|
|
526
|
+
query=maybe_transform(
|
|
527
|
+
{
|
|
528
|
+
"from_": from_,
|
|
529
|
+
"granularity": granularity,
|
|
530
|
+
"record_type": record_type,
|
|
531
|
+
"to": to,
|
|
532
|
+
},
|
|
533
|
+
zone_get_statistics_params.ZoneGetStatisticsParams,
|
|
534
|
+
),
|
|
535
|
+
),
|
|
536
|
+
cast_to=ZoneGetStatisticsResponse,
|
|
537
|
+
)
|
|
538
|
+
|
|
539
|
+
def import_(
|
|
540
|
+
self,
|
|
541
|
+
zone_name: str,
|
|
542
|
+
*,
|
|
543
|
+
body: object | NotGiven = NOT_GIVEN,
|
|
544
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
545
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
546
|
+
extra_headers: Headers | None = None,
|
|
547
|
+
extra_query: Query | None = None,
|
|
548
|
+
extra_body: Body | None = None,
|
|
549
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
550
|
+
) -> ZoneImportResponse:
|
|
551
|
+
"""Import zone in bind9 format.
|
|
552
|
+
|
|
553
|
+
Args:
|
|
554
|
+
body: Read reads up to len(p) bytes into p.
|
|
555
|
+
|
|
556
|
+
It returns the number of bytes read (0 <=
|
|
557
|
+
n <= len(p)) and any error encountered. Even if Read returns n < len(p), it may
|
|
558
|
+
use all of p as scratch space during the call. If some data is available but not
|
|
559
|
+
len(p) bytes, Read conventionally returns what is available instead of waiting
|
|
560
|
+
for more. When Read encounters an error or end-of-file condition after
|
|
561
|
+
successfully reading n > 0 bytes, it returns the number of bytes read. It may
|
|
562
|
+
return the (non-nil) error from the same call or return the error (and n == 0)
|
|
563
|
+
from a subsequent call. An instance of this general case is that a Reader
|
|
564
|
+
returning a non-zero number of bytes at the end of the input stream may return
|
|
565
|
+
either err == EOF or err == nil. The next Read should return 0, EOF. Callers
|
|
566
|
+
should always process the n > 0 bytes returned before considering the error err.
|
|
567
|
+
Doing so correctly handles I/O errors that happen after reading some bytes and
|
|
568
|
+
also both of the allowed EOF behaviors. If len(p) == 0, Read should always
|
|
569
|
+
return n == 0. It may return a non-nil error if some error condition is known,
|
|
570
|
+
such as EOF. Implementations of Read are discouraged from returning a zero byte
|
|
571
|
+
count with a nil error, except when len(p) == 0. Callers should treat a return
|
|
572
|
+
of 0 and nil as indicating that nothing happened; in particular it does not
|
|
573
|
+
indicate EOF. Implementations must not retain p.
|
|
574
|
+
|
|
575
|
+
extra_headers: Send extra headers
|
|
576
|
+
|
|
577
|
+
extra_query: Add additional query parameters to the request
|
|
578
|
+
|
|
579
|
+
extra_body: Add additional JSON properties to the request
|
|
580
|
+
|
|
581
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
582
|
+
"""
|
|
583
|
+
if not zone_name:
|
|
584
|
+
raise ValueError(f"Expected a non-empty value for `zone_name` but received {zone_name!r}")
|
|
585
|
+
return self._post(
|
|
586
|
+
f"/dns/v2/zones/{zone_name}/import",
|
|
587
|
+
body=maybe_transform(body, zone_import_params.ZoneImportParams),
|
|
588
|
+
options=make_request_options(
|
|
589
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
590
|
+
),
|
|
591
|
+
cast_to=ZoneImportResponse,
|
|
592
|
+
)
|
|
593
|
+
|
|
594
|
+
def replace(
|
|
595
|
+
self,
|
|
596
|
+
path_name: str,
|
|
597
|
+
*,
|
|
598
|
+
body_name: str,
|
|
599
|
+
contact: str | NotGiven = NOT_GIVEN,
|
|
600
|
+
enabled: bool | NotGiven = NOT_GIVEN,
|
|
601
|
+
expiry: int | NotGiven = NOT_GIVEN,
|
|
602
|
+
meta: Dict[str, object] | NotGiven = NOT_GIVEN,
|
|
603
|
+
nx_ttl: int | NotGiven = NOT_GIVEN,
|
|
604
|
+
primary_server: str | NotGiven = NOT_GIVEN,
|
|
605
|
+
refresh: int | NotGiven = NOT_GIVEN,
|
|
606
|
+
retry: int | NotGiven = NOT_GIVEN,
|
|
607
|
+
serial: int | NotGiven = NOT_GIVEN,
|
|
608
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
609
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
610
|
+
extra_headers: Headers | None = None,
|
|
611
|
+
extra_query: Query | None = None,
|
|
612
|
+
extra_body: Body | None = None,
|
|
613
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
614
|
+
) -> object:
|
|
615
|
+
"""
|
|
616
|
+
Update DNS zone and SOA record.
|
|
617
|
+
|
|
618
|
+
Args:
|
|
619
|
+
body_name: name of DNS zone
|
|
620
|
+
|
|
621
|
+
contact: email address of the administrator responsible for this zone
|
|
622
|
+
|
|
623
|
+
enabled: If a zone is disabled, then its records will not be resolved on dns servers
|
|
624
|
+
|
|
625
|
+
expiry: number of seconds after which secondary name servers should stop answering
|
|
626
|
+
request for this zone
|
|
627
|
+
|
|
628
|
+
meta: arbitrarily data of zone in json format you can specify `webhook` url and
|
|
629
|
+
`webhook_method` here webhook will get a map with three arrays: for created,
|
|
630
|
+
updated and deleted rrsets `webhook_method` can be omitted, POST will be used by
|
|
631
|
+
default
|
|
632
|
+
|
|
633
|
+
nx_ttl: Time To Live of cache
|
|
634
|
+
|
|
635
|
+
primary_server: primary master name server for zone
|
|
636
|
+
|
|
637
|
+
refresh: number of seconds after which secondary name servers should query the master for
|
|
638
|
+
the SOA record, to detect zone changes.
|
|
639
|
+
|
|
640
|
+
retry: number of seconds after which secondary name servers should retry to request the
|
|
641
|
+
serial number
|
|
642
|
+
|
|
643
|
+
serial: Serial number for this zone or Timestamp of zone modification moment. If a
|
|
644
|
+
secondary name server slaved to this one observes an increase in this number,
|
|
645
|
+
the slave will assume that the zone has been updated and initiate a zone
|
|
646
|
+
transfer.
|
|
647
|
+
|
|
648
|
+
extra_headers: Send extra headers
|
|
649
|
+
|
|
650
|
+
extra_query: Add additional query parameters to the request
|
|
651
|
+
|
|
652
|
+
extra_body: Add additional JSON properties to the request
|
|
653
|
+
|
|
654
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
655
|
+
"""
|
|
656
|
+
if not path_name:
|
|
657
|
+
raise ValueError(f"Expected a non-empty value for `path_name` but received {path_name!r}")
|
|
658
|
+
return self._put(
|
|
659
|
+
f"/dns/v2/zones/{path_name}",
|
|
660
|
+
body=maybe_transform(
|
|
661
|
+
{
|
|
662
|
+
"body_name": body_name,
|
|
663
|
+
"contact": contact,
|
|
664
|
+
"enabled": enabled,
|
|
665
|
+
"expiry": expiry,
|
|
666
|
+
"meta": meta,
|
|
667
|
+
"nx_ttl": nx_ttl,
|
|
668
|
+
"primary_server": primary_server,
|
|
669
|
+
"refresh": refresh,
|
|
670
|
+
"retry": retry,
|
|
671
|
+
"serial": serial,
|
|
672
|
+
},
|
|
673
|
+
zone_replace_params.ZoneReplaceParams,
|
|
674
|
+
),
|
|
675
|
+
options=make_request_options(
|
|
676
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
677
|
+
),
|
|
678
|
+
cast_to=object,
|
|
679
|
+
)
|
|
680
|
+
|
|
681
|
+
|
|
682
|
+
class AsyncZonesResource(AsyncAPIResource):
|
|
683
|
+
@cached_property
|
|
684
|
+
def dnssec(self) -> AsyncDnssecResource:
|
|
685
|
+
return AsyncDnssecResource(self._client)
|
|
686
|
+
|
|
687
|
+
@cached_property
|
|
688
|
+
def rrsets(self) -> AsyncRrsetsResource:
|
|
689
|
+
return AsyncRrsetsResource(self._client)
|
|
690
|
+
|
|
691
|
+
@cached_property
|
|
692
|
+
def with_raw_response(self) -> AsyncZonesResourceWithRawResponse:
|
|
693
|
+
"""
|
|
694
|
+
This property can be used as a prefix for any HTTP method call to return
|
|
695
|
+
the raw response object instead of the parsed content.
|
|
696
|
+
|
|
697
|
+
For more information, see https://www.github.com/G-Core/gcore-python#accessing-raw-response-data-eg-headers
|
|
698
|
+
"""
|
|
699
|
+
return AsyncZonesResourceWithRawResponse(self)
|
|
700
|
+
|
|
701
|
+
@cached_property
|
|
702
|
+
def with_streaming_response(self) -> AsyncZonesResourceWithStreamingResponse:
|
|
703
|
+
"""
|
|
704
|
+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
|
705
|
+
|
|
706
|
+
For more information, see https://www.github.com/G-Core/gcore-python#with_streaming_response
|
|
707
|
+
"""
|
|
708
|
+
return AsyncZonesResourceWithStreamingResponse(self)
|
|
709
|
+
|
|
710
|
+
async def create(
|
|
711
|
+
self,
|
|
712
|
+
*,
|
|
713
|
+
name: str,
|
|
714
|
+
contact: str | NotGiven = NOT_GIVEN,
|
|
715
|
+
enabled: bool | NotGiven = NOT_GIVEN,
|
|
716
|
+
expiry: int | NotGiven = NOT_GIVEN,
|
|
717
|
+
meta: Dict[str, object] | NotGiven = NOT_GIVEN,
|
|
718
|
+
nx_ttl: int | NotGiven = NOT_GIVEN,
|
|
719
|
+
primary_server: str | NotGiven = NOT_GIVEN,
|
|
720
|
+
refresh: int | NotGiven = NOT_GIVEN,
|
|
721
|
+
retry: int | NotGiven = NOT_GIVEN,
|
|
722
|
+
serial: int | NotGiven = NOT_GIVEN,
|
|
723
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
724
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
725
|
+
extra_headers: Headers | None = None,
|
|
726
|
+
extra_query: Query | None = None,
|
|
727
|
+
extra_body: Body | None = None,
|
|
728
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
729
|
+
) -> ZoneCreateResponse:
|
|
730
|
+
"""
|
|
731
|
+
Add DNS zone.
|
|
732
|
+
|
|
733
|
+
Args:
|
|
734
|
+
name: name of DNS zone
|
|
735
|
+
|
|
736
|
+
contact: email address of the administrator responsible for this zone
|
|
737
|
+
|
|
738
|
+
enabled: If a zone is disabled, then its records will not be resolved on dns servers
|
|
739
|
+
|
|
740
|
+
expiry: number of seconds after which secondary name servers should stop answering
|
|
741
|
+
request for this zone
|
|
742
|
+
|
|
743
|
+
meta: arbitrarily data of zone in json format you can specify `webhook` url and
|
|
744
|
+
`webhook_method` here webhook will get a map with three arrays: for created,
|
|
745
|
+
updated and deleted rrsets `webhook_method` can be omitted, POST will be used by
|
|
746
|
+
default
|
|
747
|
+
|
|
748
|
+
nx_ttl: Time To Live of cache
|
|
749
|
+
|
|
750
|
+
primary_server: primary master name server for zone
|
|
751
|
+
|
|
752
|
+
refresh: number of seconds after which secondary name servers should query the master for
|
|
753
|
+
the SOA record, to detect zone changes.
|
|
754
|
+
|
|
755
|
+
retry: number of seconds after which secondary name servers should retry to request the
|
|
756
|
+
serial number
|
|
757
|
+
|
|
758
|
+
serial: Serial number for this zone or Timestamp of zone modification moment. If a
|
|
759
|
+
secondary name server slaved to this one observes an increase in this number,
|
|
760
|
+
the slave will assume that the zone has been updated and initiate a zone
|
|
761
|
+
transfer.
|
|
762
|
+
|
|
763
|
+
extra_headers: Send extra headers
|
|
764
|
+
|
|
765
|
+
extra_query: Add additional query parameters to the request
|
|
766
|
+
|
|
767
|
+
extra_body: Add additional JSON properties to the request
|
|
768
|
+
|
|
769
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
770
|
+
"""
|
|
771
|
+
return await self._post(
|
|
772
|
+
"/dns/v2/zones",
|
|
773
|
+
body=await async_maybe_transform(
|
|
774
|
+
{
|
|
775
|
+
"name": name,
|
|
776
|
+
"contact": contact,
|
|
777
|
+
"enabled": enabled,
|
|
778
|
+
"expiry": expiry,
|
|
779
|
+
"meta": meta,
|
|
780
|
+
"nx_ttl": nx_ttl,
|
|
781
|
+
"primary_server": primary_server,
|
|
782
|
+
"refresh": refresh,
|
|
783
|
+
"retry": retry,
|
|
784
|
+
"serial": serial,
|
|
785
|
+
},
|
|
786
|
+
zone_create_params.ZoneCreateParams,
|
|
787
|
+
),
|
|
788
|
+
options=make_request_options(
|
|
789
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
790
|
+
),
|
|
791
|
+
cast_to=ZoneCreateResponse,
|
|
792
|
+
)
|
|
793
|
+
|
|
794
|
+
async def list(
|
|
795
|
+
self,
|
|
796
|
+
*,
|
|
797
|
+
id: Iterable[int] | NotGiven = NOT_GIVEN,
|
|
798
|
+
case_sensitive: bool | NotGiven = NOT_GIVEN,
|
|
799
|
+
client_id: Iterable[int] | NotGiven = NOT_GIVEN,
|
|
800
|
+
dynamic: bool | NotGiven = NOT_GIVEN,
|
|
801
|
+
enabled: bool | NotGiven = NOT_GIVEN,
|
|
802
|
+
exact_match: bool | NotGiven = NOT_GIVEN,
|
|
803
|
+
healthcheck: bool | NotGiven = NOT_GIVEN,
|
|
804
|
+
iam_reseller_id: Iterable[int] | NotGiven = NOT_GIVEN,
|
|
805
|
+
limit: int | NotGiven = NOT_GIVEN,
|
|
806
|
+
name: SequenceNotStr[str] | NotGiven = NOT_GIVEN,
|
|
807
|
+
offset: int | NotGiven = NOT_GIVEN,
|
|
808
|
+
order_by: str | NotGiven = NOT_GIVEN,
|
|
809
|
+
order_direction: Literal["asc", "desc"] | NotGiven = NOT_GIVEN,
|
|
810
|
+
reseller_id: Iterable[int] | NotGiven = NOT_GIVEN,
|
|
811
|
+
status: str | NotGiven = NOT_GIVEN,
|
|
812
|
+
updated_at_from: Union[str, datetime] | NotGiven = NOT_GIVEN,
|
|
813
|
+
updated_at_to: Union[str, datetime] | NotGiven = NOT_GIVEN,
|
|
814
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
815
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
816
|
+
extra_headers: Headers | None = None,
|
|
817
|
+
extra_query: Query | None = None,
|
|
818
|
+
extra_body: Body | None = None,
|
|
819
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
820
|
+
) -> ZoneListResponse:
|
|
821
|
+
"""Show created zones with pagination managed by limit and offset params.
|
|
822
|
+
|
|
823
|
+
All query
|
|
824
|
+
params are optional.
|
|
825
|
+
|
|
826
|
+
Args:
|
|
827
|
+
id: to pass several ids `id=1&id=3&id=5...`
|
|
828
|
+
|
|
829
|
+
client_id: to pass several `client_ids` `client_id=1&`client_id`=3&`client_id`=5...`
|
|
830
|
+
|
|
831
|
+
dynamic: Zones with dynamic RRsets
|
|
832
|
+
|
|
833
|
+
healthcheck: Zones with RRsets that have healthchecks
|
|
834
|
+
|
|
835
|
+
limit: Max number of records in response
|
|
836
|
+
|
|
837
|
+
name: to pass several names `name=first&name=second...`
|
|
838
|
+
|
|
839
|
+
offset: Amount of records to skip before beginning to write in response.
|
|
840
|
+
|
|
841
|
+
order_by: Field name to sort by
|
|
842
|
+
|
|
843
|
+
order_direction: Ascending or descending order
|
|
844
|
+
|
|
845
|
+
extra_headers: Send extra headers
|
|
846
|
+
|
|
847
|
+
extra_query: Add additional query parameters to the request
|
|
848
|
+
|
|
849
|
+
extra_body: Add additional JSON properties to the request
|
|
850
|
+
|
|
851
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
852
|
+
"""
|
|
853
|
+
return await self._get(
|
|
854
|
+
"/dns/v2/zones",
|
|
855
|
+
options=make_request_options(
|
|
856
|
+
extra_headers=extra_headers,
|
|
857
|
+
extra_query=extra_query,
|
|
858
|
+
extra_body=extra_body,
|
|
859
|
+
timeout=timeout,
|
|
860
|
+
query=await async_maybe_transform(
|
|
861
|
+
{
|
|
862
|
+
"id": id,
|
|
863
|
+
"case_sensitive": case_sensitive,
|
|
864
|
+
"client_id": client_id,
|
|
865
|
+
"dynamic": dynamic,
|
|
866
|
+
"enabled": enabled,
|
|
867
|
+
"exact_match": exact_match,
|
|
868
|
+
"healthcheck": healthcheck,
|
|
869
|
+
"iam_reseller_id": iam_reseller_id,
|
|
870
|
+
"limit": limit,
|
|
871
|
+
"name": name,
|
|
872
|
+
"offset": offset,
|
|
873
|
+
"order_by": order_by,
|
|
874
|
+
"order_direction": order_direction,
|
|
875
|
+
"reseller_id": reseller_id,
|
|
876
|
+
"status": status,
|
|
877
|
+
"updated_at_from": updated_at_from,
|
|
878
|
+
"updated_at_to": updated_at_to,
|
|
879
|
+
},
|
|
880
|
+
zone_list_params.ZoneListParams,
|
|
881
|
+
),
|
|
882
|
+
),
|
|
883
|
+
cast_to=ZoneListResponse,
|
|
884
|
+
)
|
|
885
|
+
|
|
886
|
+
async def delete(
|
|
887
|
+
self,
|
|
888
|
+
name: str,
|
|
889
|
+
*,
|
|
890
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
891
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
892
|
+
extra_headers: Headers | None = None,
|
|
893
|
+
extra_query: Query | None = None,
|
|
894
|
+
extra_body: Body | None = None,
|
|
895
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
896
|
+
) -> object:
|
|
897
|
+
"""
|
|
898
|
+
Delete DNS zone and its records and raws.
|
|
899
|
+
|
|
900
|
+
Args:
|
|
901
|
+
extra_headers: Send extra headers
|
|
902
|
+
|
|
903
|
+
extra_query: Add additional query parameters to the request
|
|
904
|
+
|
|
905
|
+
extra_body: Add additional JSON properties to the request
|
|
906
|
+
|
|
907
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
908
|
+
"""
|
|
909
|
+
if not name:
|
|
910
|
+
raise ValueError(f"Expected a non-empty value for `name` but received {name!r}")
|
|
911
|
+
return await self._delete(
|
|
912
|
+
f"/dns/v2/zones/{name}",
|
|
913
|
+
options=make_request_options(
|
|
914
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
915
|
+
),
|
|
916
|
+
cast_to=object,
|
|
917
|
+
)
|
|
918
|
+
|
|
919
|
+
async def check_delegation_status(
|
|
920
|
+
self,
|
|
921
|
+
name: str,
|
|
922
|
+
*,
|
|
923
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
924
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
925
|
+
extra_headers: Headers | None = None,
|
|
926
|
+
extra_query: Query | None = None,
|
|
927
|
+
extra_body: Body | None = None,
|
|
928
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
929
|
+
) -> ZoneCheckDelegationStatusResponse:
|
|
930
|
+
"""Returns delegation status for specified domain name.
|
|
931
|
+
|
|
932
|
+
This endpoint has rate
|
|
933
|
+
limit.
|
|
934
|
+
|
|
935
|
+
Args:
|
|
936
|
+
extra_headers: Send extra headers
|
|
937
|
+
|
|
938
|
+
extra_query: Add additional query parameters to the request
|
|
939
|
+
|
|
940
|
+
extra_body: Add additional JSON properties to the request
|
|
941
|
+
|
|
942
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
943
|
+
"""
|
|
944
|
+
if not name:
|
|
945
|
+
raise ValueError(f"Expected a non-empty value for `name` but received {name!r}")
|
|
946
|
+
return await self._post(
|
|
947
|
+
f"/dns/v2/analyze/{name}/delegation-status",
|
|
948
|
+
options=make_request_options(
|
|
949
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
950
|
+
),
|
|
951
|
+
cast_to=ZoneCheckDelegationStatusResponse,
|
|
952
|
+
)
|
|
953
|
+
|
|
954
|
+
async def disable(
|
|
955
|
+
self,
|
|
956
|
+
name: str,
|
|
957
|
+
*,
|
|
958
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
959
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
960
|
+
extra_headers: Headers | None = None,
|
|
961
|
+
extra_query: Query | None = None,
|
|
962
|
+
extra_body: Body | None = None,
|
|
963
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
964
|
+
) -> object:
|
|
965
|
+
"""
|
|
966
|
+
Disable DNS zone.
|
|
967
|
+
|
|
968
|
+
Args:
|
|
969
|
+
extra_headers: Send extra headers
|
|
970
|
+
|
|
971
|
+
extra_query: Add additional query parameters to the request
|
|
972
|
+
|
|
973
|
+
extra_body: Add additional JSON properties to the request
|
|
974
|
+
|
|
975
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
976
|
+
"""
|
|
977
|
+
if not name:
|
|
978
|
+
raise ValueError(f"Expected a non-empty value for `name` but received {name!r}")
|
|
979
|
+
return await self._patch(
|
|
980
|
+
f"/dns/v2/zones/{name}/disable",
|
|
981
|
+
options=make_request_options(
|
|
982
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
983
|
+
),
|
|
984
|
+
cast_to=object,
|
|
985
|
+
)
|
|
986
|
+
|
|
987
|
+
async def enable(
|
|
988
|
+
self,
|
|
989
|
+
name: str,
|
|
990
|
+
*,
|
|
991
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
992
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
993
|
+
extra_headers: Headers | None = None,
|
|
994
|
+
extra_query: Query | None = None,
|
|
995
|
+
extra_body: Body | None = None,
|
|
996
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
997
|
+
) -> object:
|
|
998
|
+
"""
|
|
999
|
+
Enable DNS zone.
|
|
1000
|
+
|
|
1001
|
+
Args:
|
|
1002
|
+
extra_headers: Send extra headers
|
|
1003
|
+
|
|
1004
|
+
extra_query: Add additional query parameters to the request
|
|
1005
|
+
|
|
1006
|
+
extra_body: Add additional JSON properties to the request
|
|
1007
|
+
|
|
1008
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
1009
|
+
"""
|
|
1010
|
+
if not name:
|
|
1011
|
+
raise ValueError(f"Expected a non-empty value for `name` but received {name!r}")
|
|
1012
|
+
return await self._patch(
|
|
1013
|
+
f"/dns/v2/zones/{name}/enable",
|
|
1014
|
+
options=make_request_options(
|
|
1015
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
1016
|
+
),
|
|
1017
|
+
cast_to=object,
|
|
1018
|
+
)
|
|
1019
|
+
|
|
1020
|
+
async def export(
|
|
1021
|
+
self,
|
|
1022
|
+
zone_name: str,
|
|
1023
|
+
*,
|
|
1024
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
1025
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
1026
|
+
extra_headers: Headers | None = None,
|
|
1027
|
+
extra_query: Query | None = None,
|
|
1028
|
+
extra_body: Body | None = None,
|
|
1029
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
1030
|
+
) -> ZoneExportResponse:
|
|
1031
|
+
"""
|
|
1032
|
+
Export zone to bind9 format.
|
|
1033
|
+
|
|
1034
|
+
Args:
|
|
1035
|
+
extra_headers: Send extra headers
|
|
1036
|
+
|
|
1037
|
+
extra_query: Add additional query parameters to the request
|
|
1038
|
+
|
|
1039
|
+
extra_body: Add additional JSON properties to the request
|
|
1040
|
+
|
|
1041
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
1042
|
+
"""
|
|
1043
|
+
if not zone_name:
|
|
1044
|
+
raise ValueError(f"Expected a non-empty value for `zone_name` but received {zone_name!r}")
|
|
1045
|
+
return await self._get(
|
|
1046
|
+
f"/dns/v2/zones/{zone_name}/export",
|
|
1047
|
+
options=make_request_options(
|
|
1048
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
1049
|
+
),
|
|
1050
|
+
cast_to=ZoneExportResponse,
|
|
1051
|
+
)
|
|
1052
|
+
|
|
1053
|
+
async def get(
|
|
1054
|
+
self,
|
|
1055
|
+
name: str,
|
|
1056
|
+
*,
|
|
1057
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
1058
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
1059
|
+
extra_headers: Headers | None = None,
|
|
1060
|
+
extra_query: Query | None = None,
|
|
1061
|
+
extra_body: Body | None = None,
|
|
1062
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
1063
|
+
) -> ZoneGetResponse:
|
|
1064
|
+
"""
|
|
1065
|
+
Zone info by zone name.
|
|
1066
|
+
|
|
1067
|
+
Args:
|
|
1068
|
+
extra_headers: Send extra headers
|
|
1069
|
+
|
|
1070
|
+
extra_query: Add additional query parameters to the request
|
|
1071
|
+
|
|
1072
|
+
extra_body: Add additional JSON properties to the request
|
|
1073
|
+
|
|
1074
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
1075
|
+
"""
|
|
1076
|
+
if not name:
|
|
1077
|
+
raise ValueError(f"Expected a non-empty value for `name` but received {name!r}")
|
|
1078
|
+
return await self._get(
|
|
1079
|
+
f"/dns/v2/zones/{name}",
|
|
1080
|
+
options=make_request_options(
|
|
1081
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
1082
|
+
),
|
|
1083
|
+
cast_to=ZoneGetResponse,
|
|
1084
|
+
)
|
|
1085
|
+
|
|
1086
|
+
async def get_statistics(
|
|
1087
|
+
self,
|
|
1088
|
+
name: str,
|
|
1089
|
+
*,
|
|
1090
|
+
from_: int | NotGiven = NOT_GIVEN,
|
|
1091
|
+
granularity: str | NotGiven = NOT_GIVEN,
|
|
1092
|
+
record_type: str | NotGiven = NOT_GIVEN,
|
|
1093
|
+
to: int | NotGiven = NOT_GIVEN,
|
|
1094
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
1095
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
1096
|
+
extra_headers: Headers | None = None,
|
|
1097
|
+
extra_query: Query | None = None,
|
|
1098
|
+
extra_body: Body | None = None,
|
|
1099
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
1100
|
+
) -> ZoneGetStatisticsResponse:
|
|
1101
|
+
"""Statistics of DNS zone in common and by record types.
|
|
1102
|
+
|
|
1103
|
+
To get summary statistics
|
|
1104
|
+
for all zones use `all` instead of zone name in path. Note: Consumption
|
|
1105
|
+
statistics is updated in near real-time as a standard practice. However, the
|
|
1106
|
+
frequency of updates can vary, but they are typically available within a 30
|
|
1107
|
+
minutes period. Exceptions, such as maintenance periods, may delay data beyond
|
|
1108
|
+
30 minutes until servers resume and backfill missing statistics.
|
|
1109
|
+
|
|
1110
|
+
Args:
|
|
1111
|
+
from_:
|
|
1112
|
+
Beginning of the requested time period (Unix Timestamp, UTC.) In a query string:
|
|
1113
|
+
&from=1709068637
|
|
1114
|
+
|
|
1115
|
+
granularity: Granularity parameter string is a sequence of decimal numbers, each with
|
|
1116
|
+
optional fraction and a unit suffix, such as "300ms", "1.5h" or "2h45m". Valid
|
|
1117
|
+
time units are "s", "m", "h".
|
|
1118
|
+
|
|
1119
|
+
record_type:
|
|
1120
|
+
DNS record type. Possible values:
|
|
1121
|
+
|
|
1122
|
+
- A
|
|
1123
|
+
- AAAA
|
|
1124
|
+
- NS
|
|
1125
|
+
- CNAME
|
|
1126
|
+
- MX
|
|
1127
|
+
- TXT
|
|
1128
|
+
- SVCB
|
|
1129
|
+
- HTTPS
|
|
1130
|
+
|
|
1131
|
+
to:
|
|
1132
|
+
End of the requested time period (Unix Timestamp, UTC.) In a query string:
|
|
1133
|
+
&to=1709673437
|
|
1134
|
+
|
|
1135
|
+
extra_headers: Send extra headers
|
|
1136
|
+
|
|
1137
|
+
extra_query: Add additional query parameters to the request
|
|
1138
|
+
|
|
1139
|
+
extra_body: Add additional JSON properties to the request
|
|
1140
|
+
|
|
1141
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
1142
|
+
"""
|
|
1143
|
+
if not name:
|
|
1144
|
+
raise ValueError(f"Expected a non-empty value for `name` but received {name!r}")
|
|
1145
|
+
return await self._get(
|
|
1146
|
+
f"/dns/v2/zones/{name}/statistics",
|
|
1147
|
+
options=make_request_options(
|
|
1148
|
+
extra_headers=extra_headers,
|
|
1149
|
+
extra_query=extra_query,
|
|
1150
|
+
extra_body=extra_body,
|
|
1151
|
+
timeout=timeout,
|
|
1152
|
+
query=await async_maybe_transform(
|
|
1153
|
+
{
|
|
1154
|
+
"from_": from_,
|
|
1155
|
+
"granularity": granularity,
|
|
1156
|
+
"record_type": record_type,
|
|
1157
|
+
"to": to,
|
|
1158
|
+
},
|
|
1159
|
+
zone_get_statistics_params.ZoneGetStatisticsParams,
|
|
1160
|
+
),
|
|
1161
|
+
),
|
|
1162
|
+
cast_to=ZoneGetStatisticsResponse,
|
|
1163
|
+
)
|
|
1164
|
+
|
|
1165
|
+
async def import_(
|
|
1166
|
+
self,
|
|
1167
|
+
zone_name: str,
|
|
1168
|
+
*,
|
|
1169
|
+
body: object | NotGiven = NOT_GIVEN,
|
|
1170
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
1171
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
1172
|
+
extra_headers: Headers | None = None,
|
|
1173
|
+
extra_query: Query | None = None,
|
|
1174
|
+
extra_body: Body | None = None,
|
|
1175
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
1176
|
+
) -> ZoneImportResponse:
|
|
1177
|
+
"""Import zone in bind9 format.
|
|
1178
|
+
|
|
1179
|
+
Args:
|
|
1180
|
+
body: Read reads up to len(p) bytes into p.
|
|
1181
|
+
|
|
1182
|
+
It returns the number of bytes read (0 <=
|
|
1183
|
+
n <= len(p)) and any error encountered. Even if Read returns n < len(p), it may
|
|
1184
|
+
use all of p as scratch space during the call. If some data is available but not
|
|
1185
|
+
len(p) bytes, Read conventionally returns what is available instead of waiting
|
|
1186
|
+
for more. When Read encounters an error or end-of-file condition after
|
|
1187
|
+
successfully reading n > 0 bytes, it returns the number of bytes read. It may
|
|
1188
|
+
return the (non-nil) error from the same call or return the error (and n == 0)
|
|
1189
|
+
from a subsequent call. An instance of this general case is that a Reader
|
|
1190
|
+
returning a non-zero number of bytes at the end of the input stream may return
|
|
1191
|
+
either err == EOF or err == nil. The next Read should return 0, EOF. Callers
|
|
1192
|
+
should always process the n > 0 bytes returned before considering the error err.
|
|
1193
|
+
Doing so correctly handles I/O errors that happen after reading some bytes and
|
|
1194
|
+
also both of the allowed EOF behaviors. If len(p) == 0, Read should always
|
|
1195
|
+
return n == 0. It may return a non-nil error if some error condition is known,
|
|
1196
|
+
such as EOF. Implementations of Read are discouraged from returning a zero byte
|
|
1197
|
+
count with a nil error, except when len(p) == 0. Callers should treat a return
|
|
1198
|
+
of 0 and nil as indicating that nothing happened; in particular it does not
|
|
1199
|
+
indicate EOF. Implementations must not retain p.
|
|
1200
|
+
|
|
1201
|
+
extra_headers: Send extra headers
|
|
1202
|
+
|
|
1203
|
+
extra_query: Add additional query parameters to the request
|
|
1204
|
+
|
|
1205
|
+
extra_body: Add additional JSON properties to the request
|
|
1206
|
+
|
|
1207
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
1208
|
+
"""
|
|
1209
|
+
if not zone_name:
|
|
1210
|
+
raise ValueError(f"Expected a non-empty value for `zone_name` but received {zone_name!r}")
|
|
1211
|
+
return await self._post(
|
|
1212
|
+
f"/dns/v2/zones/{zone_name}/import",
|
|
1213
|
+
body=await async_maybe_transform(body, zone_import_params.ZoneImportParams),
|
|
1214
|
+
options=make_request_options(
|
|
1215
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
1216
|
+
),
|
|
1217
|
+
cast_to=ZoneImportResponse,
|
|
1218
|
+
)
|
|
1219
|
+
|
|
1220
|
+
async def replace(
|
|
1221
|
+
self,
|
|
1222
|
+
path_name: str,
|
|
1223
|
+
*,
|
|
1224
|
+
body_name: str,
|
|
1225
|
+
contact: str | NotGiven = NOT_GIVEN,
|
|
1226
|
+
enabled: bool | NotGiven = NOT_GIVEN,
|
|
1227
|
+
expiry: int | NotGiven = NOT_GIVEN,
|
|
1228
|
+
meta: Dict[str, object] | NotGiven = NOT_GIVEN,
|
|
1229
|
+
nx_ttl: int | NotGiven = NOT_GIVEN,
|
|
1230
|
+
primary_server: str | NotGiven = NOT_GIVEN,
|
|
1231
|
+
refresh: int | NotGiven = NOT_GIVEN,
|
|
1232
|
+
retry: int | NotGiven = NOT_GIVEN,
|
|
1233
|
+
serial: int | NotGiven = NOT_GIVEN,
|
|
1234
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
1235
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
1236
|
+
extra_headers: Headers | None = None,
|
|
1237
|
+
extra_query: Query | None = None,
|
|
1238
|
+
extra_body: Body | None = None,
|
|
1239
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
1240
|
+
) -> object:
|
|
1241
|
+
"""
|
|
1242
|
+
Update DNS zone and SOA record.
|
|
1243
|
+
|
|
1244
|
+
Args:
|
|
1245
|
+
body_name: name of DNS zone
|
|
1246
|
+
|
|
1247
|
+
contact: email address of the administrator responsible for this zone
|
|
1248
|
+
|
|
1249
|
+
enabled: If a zone is disabled, then its records will not be resolved on dns servers
|
|
1250
|
+
|
|
1251
|
+
expiry: number of seconds after which secondary name servers should stop answering
|
|
1252
|
+
request for this zone
|
|
1253
|
+
|
|
1254
|
+
meta: arbitrarily data of zone in json format you can specify `webhook` url and
|
|
1255
|
+
`webhook_method` here webhook will get a map with three arrays: for created,
|
|
1256
|
+
updated and deleted rrsets `webhook_method` can be omitted, POST will be used by
|
|
1257
|
+
default
|
|
1258
|
+
|
|
1259
|
+
nx_ttl: Time To Live of cache
|
|
1260
|
+
|
|
1261
|
+
primary_server: primary master name server for zone
|
|
1262
|
+
|
|
1263
|
+
refresh: number of seconds after which secondary name servers should query the master for
|
|
1264
|
+
the SOA record, to detect zone changes.
|
|
1265
|
+
|
|
1266
|
+
retry: number of seconds after which secondary name servers should retry to request the
|
|
1267
|
+
serial number
|
|
1268
|
+
|
|
1269
|
+
serial: Serial number for this zone or Timestamp of zone modification moment. If a
|
|
1270
|
+
secondary name server slaved to this one observes an increase in this number,
|
|
1271
|
+
the slave will assume that the zone has been updated and initiate a zone
|
|
1272
|
+
transfer.
|
|
1273
|
+
|
|
1274
|
+
extra_headers: Send extra headers
|
|
1275
|
+
|
|
1276
|
+
extra_query: Add additional query parameters to the request
|
|
1277
|
+
|
|
1278
|
+
extra_body: Add additional JSON properties to the request
|
|
1279
|
+
|
|
1280
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
1281
|
+
"""
|
|
1282
|
+
if not path_name:
|
|
1283
|
+
raise ValueError(f"Expected a non-empty value for `path_name` but received {path_name!r}")
|
|
1284
|
+
return await self._put(
|
|
1285
|
+
f"/dns/v2/zones/{path_name}",
|
|
1286
|
+
body=await async_maybe_transform(
|
|
1287
|
+
{
|
|
1288
|
+
"body_name": body_name,
|
|
1289
|
+
"contact": contact,
|
|
1290
|
+
"enabled": enabled,
|
|
1291
|
+
"expiry": expiry,
|
|
1292
|
+
"meta": meta,
|
|
1293
|
+
"nx_ttl": nx_ttl,
|
|
1294
|
+
"primary_server": primary_server,
|
|
1295
|
+
"refresh": refresh,
|
|
1296
|
+
"retry": retry,
|
|
1297
|
+
"serial": serial,
|
|
1298
|
+
},
|
|
1299
|
+
zone_replace_params.ZoneReplaceParams,
|
|
1300
|
+
),
|
|
1301
|
+
options=make_request_options(
|
|
1302
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
1303
|
+
),
|
|
1304
|
+
cast_to=object,
|
|
1305
|
+
)
|
|
1306
|
+
|
|
1307
|
+
|
|
1308
|
+
class ZonesResourceWithRawResponse:
|
|
1309
|
+
def __init__(self, zones: ZonesResource) -> None:
|
|
1310
|
+
self._zones = zones
|
|
1311
|
+
|
|
1312
|
+
self.create = to_raw_response_wrapper(
|
|
1313
|
+
zones.create,
|
|
1314
|
+
)
|
|
1315
|
+
self.list = to_raw_response_wrapper(
|
|
1316
|
+
zones.list,
|
|
1317
|
+
)
|
|
1318
|
+
self.delete = to_raw_response_wrapper(
|
|
1319
|
+
zones.delete,
|
|
1320
|
+
)
|
|
1321
|
+
self.check_delegation_status = to_raw_response_wrapper(
|
|
1322
|
+
zones.check_delegation_status,
|
|
1323
|
+
)
|
|
1324
|
+
self.disable = to_raw_response_wrapper(
|
|
1325
|
+
zones.disable,
|
|
1326
|
+
)
|
|
1327
|
+
self.enable = to_raw_response_wrapper(
|
|
1328
|
+
zones.enable,
|
|
1329
|
+
)
|
|
1330
|
+
self.export = to_raw_response_wrapper(
|
|
1331
|
+
zones.export,
|
|
1332
|
+
)
|
|
1333
|
+
self.get = to_raw_response_wrapper(
|
|
1334
|
+
zones.get,
|
|
1335
|
+
)
|
|
1336
|
+
self.get_statistics = to_raw_response_wrapper(
|
|
1337
|
+
zones.get_statistics,
|
|
1338
|
+
)
|
|
1339
|
+
self.import_ = to_raw_response_wrapper(
|
|
1340
|
+
zones.import_,
|
|
1341
|
+
)
|
|
1342
|
+
self.replace = to_raw_response_wrapper(
|
|
1343
|
+
zones.replace,
|
|
1344
|
+
)
|
|
1345
|
+
|
|
1346
|
+
@cached_property
|
|
1347
|
+
def dnssec(self) -> DnssecResourceWithRawResponse:
|
|
1348
|
+
return DnssecResourceWithRawResponse(self._zones.dnssec)
|
|
1349
|
+
|
|
1350
|
+
@cached_property
|
|
1351
|
+
def rrsets(self) -> RrsetsResourceWithRawResponse:
|
|
1352
|
+
return RrsetsResourceWithRawResponse(self._zones.rrsets)
|
|
1353
|
+
|
|
1354
|
+
|
|
1355
|
+
class AsyncZonesResourceWithRawResponse:
|
|
1356
|
+
def __init__(self, zones: AsyncZonesResource) -> None:
|
|
1357
|
+
self._zones = zones
|
|
1358
|
+
|
|
1359
|
+
self.create = async_to_raw_response_wrapper(
|
|
1360
|
+
zones.create,
|
|
1361
|
+
)
|
|
1362
|
+
self.list = async_to_raw_response_wrapper(
|
|
1363
|
+
zones.list,
|
|
1364
|
+
)
|
|
1365
|
+
self.delete = async_to_raw_response_wrapper(
|
|
1366
|
+
zones.delete,
|
|
1367
|
+
)
|
|
1368
|
+
self.check_delegation_status = async_to_raw_response_wrapper(
|
|
1369
|
+
zones.check_delegation_status,
|
|
1370
|
+
)
|
|
1371
|
+
self.disable = async_to_raw_response_wrapper(
|
|
1372
|
+
zones.disable,
|
|
1373
|
+
)
|
|
1374
|
+
self.enable = async_to_raw_response_wrapper(
|
|
1375
|
+
zones.enable,
|
|
1376
|
+
)
|
|
1377
|
+
self.export = async_to_raw_response_wrapper(
|
|
1378
|
+
zones.export,
|
|
1379
|
+
)
|
|
1380
|
+
self.get = async_to_raw_response_wrapper(
|
|
1381
|
+
zones.get,
|
|
1382
|
+
)
|
|
1383
|
+
self.get_statistics = async_to_raw_response_wrapper(
|
|
1384
|
+
zones.get_statistics,
|
|
1385
|
+
)
|
|
1386
|
+
self.import_ = async_to_raw_response_wrapper(
|
|
1387
|
+
zones.import_,
|
|
1388
|
+
)
|
|
1389
|
+
self.replace = async_to_raw_response_wrapper(
|
|
1390
|
+
zones.replace,
|
|
1391
|
+
)
|
|
1392
|
+
|
|
1393
|
+
@cached_property
|
|
1394
|
+
def dnssec(self) -> AsyncDnssecResourceWithRawResponse:
|
|
1395
|
+
return AsyncDnssecResourceWithRawResponse(self._zones.dnssec)
|
|
1396
|
+
|
|
1397
|
+
@cached_property
|
|
1398
|
+
def rrsets(self) -> AsyncRrsetsResourceWithRawResponse:
|
|
1399
|
+
return AsyncRrsetsResourceWithRawResponse(self._zones.rrsets)
|
|
1400
|
+
|
|
1401
|
+
|
|
1402
|
+
class ZonesResourceWithStreamingResponse:
|
|
1403
|
+
def __init__(self, zones: ZonesResource) -> None:
|
|
1404
|
+
self._zones = zones
|
|
1405
|
+
|
|
1406
|
+
self.create = to_streamed_response_wrapper(
|
|
1407
|
+
zones.create,
|
|
1408
|
+
)
|
|
1409
|
+
self.list = to_streamed_response_wrapper(
|
|
1410
|
+
zones.list,
|
|
1411
|
+
)
|
|
1412
|
+
self.delete = to_streamed_response_wrapper(
|
|
1413
|
+
zones.delete,
|
|
1414
|
+
)
|
|
1415
|
+
self.check_delegation_status = to_streamed_response_wrapper(
|
|
1416
|
+
zones.check_delegation_status,
|
|
1417
|
+
)
|
|
1418
|
+
self.disable = to_streamed_response_wrapper(
|
|
1419
|
+
zones.disable,
|
|
1420
|
+
)
|
|
1421
|
+
self.enable = to_streamed_response_wrapper(
|
|
1422
|
+
zones.enable,
|
|
1423
|
+
)
|
|
1424
|
+
self.export = to_streamed_response_wrapper(
|
|
1425
|
+
zones.export,
|
|
1426
|
+
)
|
|
1427
|
+
self.get = to_streamed_response_wrapper(
|
|
1428
|
+
zones.get,
|
|
1429
|
+
)
|
|
1430
|
+
self.get_statistics = to_streamed_response_wrapper(
|
|
1431
|
+
zones.get_statistics,
|
|
1432
|
+
)
|
|
1433
|
+
self.import_ = to_streamed_response_wrapper(
|
|
1434
|
+
zones.import_,
|
|
1435
|
+
)
|
|
1436
|
+
self.replace = to_streamed_response_wrapper(
|
|
1437
|
+
zones.replace,
|
|
1438
|
+
)
|
|
1439
|
+
|
|
1440
|
+
@cached_property
|
|
1441
|
+
def dnssec(self) -> DnssecResourceWithStreamingResponse:
|
|
1442
|
+
return DnssecResourceWithStreamingResponse(self._zones.dnssec)
|
|
1443
|
+
|
|
1444
|
+
@cached_property
|
|
1445
|
+
def rrsets(self) -> RrsetsResourceWithStreamingResponse:
|
|
1446
|
+
return RrsetsResourceWithStreamingResponse(self._zones.rrsets)
|
|
1447
|
+
|
|
1448
|
+
|
|
1449
|
+
class AsyncZonesResourceWithStreamingResponse:
|
|
1450
|
+
def __init__(self, zones: AsyncZonesResource) -> None:
|
|
1451
|
+
self._zones = zones
|
|
1452
|
+
|
|
1453
|
+
self.create = async_to_streamed_response_wrapper(
|
|
1454
|
+
zones.create,
|
|
1455
|
+
)
|
|
1456
|
+
self.list = async_to_streamed_response_wrapper(
|
|
1457
|
+
zones.list,
|
|
1458
|
+
)
|
|
1459
|
+
self.delete = async_to_streamed_response_wrapper(
|
|
1460
|
+
zones.delete,
|
|
1461
|
+
)
|
|
1462
|
+
self.check_delegation_status = async_to_streamed_response_wrapper(
|
|
1463
|
+
zones.check_delegation_status,
|
|
1464
|
+
)
|
|
1465
|
+
self.disable = async_to_streamed_response_wrapper(
|
|
1466
|
+
zones.disable,
|
|
1467
|
+
)
|
|
1468
|
+
self.enable = async_to_streamed_response_wrapper(
|
|
1469
|
+
zones.enable,
|
|
1470
|
+
)
|
|
1471
|
+
self.export = async_to_streamed_response_wrapper(
|
|
1472
|
+
zones.export,
|
|
1473
|
+
)
|
|
1474
|
+
self.get = async_to_streamed_response_wrapper(
|
|
1475
|
+
zones.get,
|
|
1476
|
+
)
|
|
1477
|
+
self.get_statistics = async_to_streamed_response_wrapper(
|
|
1478
|
+
zones.get_statistics,
|
|
1479
|
+
)
|
|
1480
|
+
self.import_ = async_to_streamed_response_wrapper(
|
|
1481
|
+
zones.import_,
|
|
1482
|
+
)
|
|
1483
|
+
self.replace = async_to_streamed_response_wrapper(
|
|
1484
|
+
zones.replace,
|
|
1485
|
+
)
|
|
1486
|
+
|
|
1487
|
+
@cached_property
|
|
1488
|
+
def dnssec(self) -> AsyncDnssecResourceWithStreamingResponse:
|
|
1489
|
+
return AsyncDnssecResourceWithStreamingResponse(self._zones.dnssec)
|
|
1490
|
+
|
|
1491
|
+
@cached_property
|
|
1492
|
+
def rrsets(self) -> AsyncRrsetsResourceWithStreamingResponse:
|
|
1493
|
+
return AsyncRrsetsResourceWithStreamingResponse(self._zones.rrsets)
|