gcore 0.13.0__py3-none-any.whl → 0.15.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of gcore might be problematic. Click here for more details.
- gcore/__init__.py +3 -1
- gcore/_base_client.py +9 -9
- gcore/_client.py +25 -10
- gcore/_models.py +10 -4
- gcore/_qs.py +7 -7
- gcore/_types.py +18 -11
- gcore/_utils/_transform.py +2 -2
- gcore/_utils/_utils.py +4 -4
- gcore/_version.py +1 -1
- gcore/pagination.py +137 -0
- gcore/resources/__init__.py +14 -0
- gcore/resources/cdn/__init__.py +201 -0
- gcore/resources/cdn/audit_log.py +406 -0
- gcore/resources/cdn/cdn.py +957 -0
- gcore/resources/cdn/certificates.py +1062 -0
- gcore/resources/cdn/ip_ranges.py +224 -0
- gcore/resources/cdn/logs/__init__.py +33 -0
- gcore/resources/cdn/logs/logs.py +1424 -0
- gcore/resources/cdn/logs/settings.py +1081 -0
- gcore/resources/cdn/logs_uploader/__init__.py +61 -0
- gcore/resources/cdn/logs_uploader/configs.py +868 -0
- gcore/resources/cdn/logs_uploader/logs_uploader.py +166 -0
- gcore/resources/cdn/logs_uploader/policies.py +1060 -0
- gcore/resources/cdn/logs_uploader/targets.py +811 -0
- gcore/resources/cdn/metrics.py +419 -0
- gcore/resources/cdn/network_capacity.py +139 -0
- gcore/resources/cdn/origin_groups.py +1496 -0
- gcore/resources/cdn/resources/__init__.py +47 -0
- gcore/resources/cdn/resources/resources.py +2060 -0
- gcore/resources/cdn/resources/rules.py +1027 -0
- gcore/resources/cdn/resources/shield.py +259 -0
- gcore/resources/cdn/rule_templates.py +883 -0
- gcore/resources/cdn/shields.py +139 -0
- gcore/resources/cdn/statistics.py +1408 -0
- gcore/resources/cdn/trusted_ca_certificates.py +592 -0
- gcore/resources/cloud/audit_logs.py +33 -29
- gcore/resources/cloud/baremetal/flavors.py +21 -17
- gcore/resources/cloud/baremetal/images.py +19 -15
- gcore/resources/cloud/baremetal/servers.py +141 -119
- gcore/resources/cloud/billing_reservations.py +41 -33
- gcore/resources/cloud/cloud.py +24 -0
- gcore/resources/cloud/cost_reports.py +149 -119
- gcore/resources/cloud/file_shares/access_rules.py +25 -13
- gcore/resources/cloud/file_shares/file_shares.py +107 -71
- gcore/resources/cloud/floating_ips.py +101 -59
- gcore/resources/cloud/gpu_baremetal_clusters/flavors.py +13 -9
- gcore/resources/cloud/gpu_baremetal_clusters/gpu_baremetal_clusters.py +275 -65
- gcore/resources/cloud/gpu_baremetal_clusters/images.py +69 -53
- gcore/resources/cloud/gpu_baremetal_clusters/interfaces.py +9 -5
- gcore/resources/cloud/gpu_baremetal_clusters/servers.py +151 -127
- gcore/resources/cloud/inference/api_keys.py +51 -31
- gcore/resources/cloud/inference/applications/deployments.py +49 -31
- gcore/resources/cloud/inference/applications/templates.py +17 -9
- gcore/resources/cloud/inference/deployments/deployments.py +171 -139
- gcore/resources/cloud/inference/deployments/logs.py +17 -13
- gcore/resources/cloud/inference/flavors.py +21 -13
- gcore/resources/cloud/inference/inference.py +9 -5
- gcore/resources/cloud/inference/registry_credentials.py +45 -25
- gcore/resources/cloud/inference/secrets.py +45 -25
- gcore/resources/cloud/instances/flavors.py +17 -13
- gcore/resources/cloud/instances/images.py +153 -129
- gcore/resources/cloud/instances/instances.py +287 -213
- gcore/resources/cloud/instances/interfaces.py +165 -161
- gcore/resources/cloud/instances/metrics.py +9 -5
- gcore/resources/cloud/ip_ranges.py +25 -15
- gcore/resources/cloud/k8s/clusters/clusters.py +151 -87
- gcore/resources/cloud/k8s/clusters/nodes.py +19 -11
- gcore/resources/cloud/k8s/clusters/pools/nodes.py +19 -11
- gcore/resources/cloud/k8s/clusters/pools/pools.py +83 -59
- gcore/resources/cloud/k8s/flavors.py +13 -9
- gcore/resources/cloud/k8s/k8s.py +9 -5
- gcore/resources/cloud/load_balancers/flavors.py +11 -7
- gcore/resources/cloud/load_balancers/l7_policies/l7_policies.py +103 -83
- gcore/resources/cloud/load_balancers/l7_policies/rules.py +77 -57
- gcore/resources/cloud/load_balancers/listeners.py +125 -105
- gcore/resources/cloud/load_balancers/load_balancers.py +155 -123
- gcore/resources/cloud/load_balancers/metrics.py +9 -5
- gcore/resources/cloud/load_balancers/pools/health_monitors.py +25 -17
- gcore/resources/cloud/load_balancers/pools/members.py +31 -23
- gcore/resources/cloud/load_balancers/pools/pools.py +155 -129
- gcore/resources/cloud/load_balancers/statuses.py +17 -9
- gcore/resources/cloud/networks/networks.py +79 -55
- gcore/resources/cloud/networks/routers.py +75 -47
- gcore/resources/cloud/networks/subnets.py +109 -87
- gcore/resources/cloud/placement_groups.py +33 -17
- gcore/resources/cloud/projects.py +53 -41
- gcore/resources/cloud/quotas/quotas.py +25 -13
- gcore/resources/cloud/quotas/requests.py +41 -25
- gcore/resources/cloud/regions.py +25 -23
- gcore/resources/cloud/registries/artifacts.py +17 -9
- gcore/resources/cloud/registries/registries.py +55 -29
- gcore/resources/cloud/registries/repositories.py +17 -9
- gcore/resources/cloud/registries/tags.py +9 -5
- gcore/resources/cloud/registries/users.py +65 -35
- gcore/resources/cloud/reserved_fixed_ips/reserved_fixed_ips.py +233 -108
- gcore/resources/cloud/reserved_fixed_ips/vip.py +45 -25
- gcore/resources/cloud/secrets.py +43 -27
- gcore/resources/cloud/security_groups/rules.py +55 -43
- gcore/resources/cloud/security_groups/security_groups.py +79 -47
- gcore/resources/cloud/ssh_keys.py +51 -31
- gcore/resources/cloud/tasks.py +57 -45
- gcore/resources/cloud/usage_reports.py +27 -23
- gcore/resources/cloud/users/role_assignments.py +49 -33
- gcore/resources/cloud/volumes.py +237 -201
- gcore/resources/dns/dns.py +17 -13
- gcore/resources/dns/locations.py +29 -17
- gcore/resources/dns/metrics.py +13 -9
- gcore/resources/dns/pickers/pickers.py +5 -5
- gcore/resources/dns/pickers/presets.py +9 -5
- gcore/resources/dns/zones/dnssec.py +19 -11
- gcore/resources/dns/zones/rrsets.py +149 -91
- gcore/resources/dns/zones/zones.py +245 -187
- gcore/resources/fastedge/apps/apps.py +105 -89
- gcore/resources/fastedge/apps/logs.py +25 -21
- gcore/resources/fastedge/binaries.py +33 -17
- gcore/resources/fastedge/fastedge.py +5 -5
- gcore/resources/fastedge/kv_stores.py +43 -31
- gcore/resources/fastedge/secrets.py +69 -45
- gcore/resources/fastedge/statistics.py +25 -17
- gcore/resources/fastedge/templates.py +59 -39
- gcore/resources/iam/api_tokens.py +47 -29
- gcore/resources/iam/iam.py +5 -5
- gcore/resources/iam/users.py +97 -65
- gcore/resources/security/bgp_announces.py +27 -19
- gcore/resources/security/events.py +23 -19
- gcore/resources/security/profile_templates.py +9 -5
- gcore/resources/security/profiles.py +69 -45
- gcore/resources/storage/buckets/buckets.py +37 -25
- gcore/resources/storage/buckets/cors.py +19 -11
- gcore/resources/storage/buckets/lifecycle.py +19 -11
- gcore/resources/storage/buckets/policy.py +25 -13
- gcore/resources/storage/credentials.py +19 -15
- gcore/resources/storage/locations.py +13 -9
- gcore/resources/storage/statistics.py +39 -31
- gcore/resources/storage/storage.py +105 -69
- gcore/resources/streaming/ai_tasks.py +307 -197
- gcore/resources/streaming/broadcasts.py +63 -35
- gcore/resources/streaming/directories.py +65 -39
- gcore/resources/streaming/players.py +47 -31
- gcore/resources/streaming/playlists.py +189 -123
- gcore/resources/streaming/quality_sets.py +69 -39
- gcore/resources/streaming/restreams.py +47 -27
- gcore/resources/streaming/statistics.py +613 -407
- gcore/resources/streaming/streams/overlays.py +107 -67
- gcore/resources/streaming/streams/streams.py +403 -263
- gcore/resources/streaming/videos/subtitles.py +131 -75
- gcore/resources/streaming/videos/videos.py +429 -279
- gcore/resources/waap/advanced_rules.py +9 -5
- gcore/resources/waap/custom_page_sets.py +99 -75
- gcore/resources/waap/domains/advanced_rules.py +157 -99
- gcore/resources/waap/domains/api_discovery.py +71 -47
- gcore/resources/waap/domains/api_path_groups.py +9 -5
- gcore/resources/waap/domains/api_paths.py +79 -83
- gcore/resources/waap/domains/custom_rules.py +89 -59
- gcore/resources/waap/domains/domains.py +59 -41
- gcore/resources/waap/domains/firewall_rules.py +83 -55
- gcore/resources/waap/domains/insight_silences.py +59 -39
- gcore/resources/waap/domains/insights.py +39 -27
- gcore/resources/waap/domains/settings.py +21 -13
- gcore/resources/waap/domains/statistics.py +99 -75
- gcore/resources/waap/insights.py +23 -21
- gcore/resources/waap/ip_info/ip_info.py +65 -33
- gcore/resources/waap/ip_info/metrics.py +11 -7
- gcore/resources/waap/organizations.py +17 -13
- gcore/resources/waap/statistics.py +9 -5
- gcore/resources/waap/tags.py +17 -17
- gcore/resources/waap/waap.py +5 -5
- gcore/types/cdn/__init__.py +80 -0
- gcore/types/cdn/audit_log_list_params.py +73 -0
- gcore/types/cdn/ca_certificate.py +53 -0
- gcore/types/cdn/ca_certificate_list.py +10 -0
- gcore/types/cdn/cdn_account.py +86 -0
- gcore/types/cdn/cdn_account_limits.py +27 -0
- gcore/types/cdn/cdn_audit_log_entry.py +66 -0
- gcore/types/cdn/cdn_available_features.py +46 -0
- gcore/types/cdn/cdn_list_purge_statuses_params.py +67 -0
- gcore/types/cdn/cdn_log_entry.py +70 -0
- gcore/types/cdn/cdn_metrics.py +22 -0
- gcore/types/cdn/cdn_metrics_groups.py +13 -0
- gcore/types/cdn/cdn_metrics_values.py +19 -0
- gcore/types/cdn/cdn_resource.py +1997 -0
- gcore/types/cdn/cdn_resource_list.py +10 -0
- gcore/types/cdn/cdn_update_account_params.py +15 -0
- gcore/types/cdn/certificate_create_params.py +51 -0
- gcore/types/cdn/certificate_get_status_params.py +14 -0
- gcore/types/cdn/certificate_list_params.py +29 -0
- gcore/types/cdn/certificate_replace_params.py +39 -0
- gcore/types/cdn/log_download_params.py +279 -0
- gcore/types/cdn/log_list_params.py +273 -0
- gcore/types/cdn/logs/__init__.py +7 -0
- gcore/types/cdn/logs/log_settings.py +172 -0
- gcore/types/cdn/logs/setting_create_params.py +200 -0
- gcore/types/cdn/logs/setting_update_params.py +200 -0
- gcore/types/cdn/logs_aggregated_stats.py +23 -0
- gcore/types/cdn/logs_uploader/__init__.py +23 -0
- gcore/types/cdn/logs_uploader/config_create_params.py +32 -0
- gcore/types/cdn/logs_uploader/config_list_params.py +16 -0
- gcore/types/cdn/logs_uploader/config_replace_params.py +32 -0
- gcore/types/cdn/logs_uploader/config_update_params.py +32 -0
- gcore/types/cdn/logs_uploader/logs_uploader_config.py +51 -0
- gcore/types/cdn/logs_uploader/logs_uploader_config_list.py +10 -0
- gcore/types/cdn/logs_uploader/logs_uploader_policy.py +73 -0
- gcore/types/cdn/logs_uploader/logs_uploader_policy_list.py +10 -0
- gcore/types/cdn/logs_uploader/logs_uploader_target.py +236 -0
- gcore/types/cdn/logs_uploader/logs_uploader_target_list.py +10 -0
- gcore/types/cdn/logs_uploader/policy_create_params.py +61 -0
- gcore/types/cdn/logs_uploader/policy_list_fields_response.py +8 -0
- gcore/types/cdn/logs_uploader/policy_list_params.py +16 -0
- gcore/types/cdn/logs_uploader/policy_replace_params.py +61 -0
- gcore/types/cdn/logs_uploader/policy_update_params.py +61 -0
- gcore/types/cdn/logs_uploader/target_create_params.py +249 -0
- gcore/types/cdn/logs_uploader/target_list_params.py +16 -0
- gcore/types/cdn/logs_uploader/target_replace_params.py +249 -0
- gcore/types/cdn/logs_uploader/target_update_params.py +249 -0
- gcore/types/cdn/logs_uploader_validation.py +23 -0
- gcore/types/cdn/metric_list_params.py +168 -0
- gcore/types/cdn/network_capacity.py +22 -0
- gcore/types/cdn/origin_group_create_params.py +184 -0
- gcore/types/cdn/origin_group_list_params.py +24 -0
- gcore/types/cdn/origin_group_replace_params.py +190 -0
- gcore/types/cdn/origin_group_update_params.py +190 -0
- gcore/types/cdn/origin_groups.py +212 -0
- gcore/types/cdn/origin_groups_list.py +10 -0
- gcore/types/cdn/public_ip_list.py +15 -0
- gcore/types/cdn/public_network_list.py +15 -0
- gcore/types/cdn/purge_status.py +55 -0
- gcore/types/cdn/resource_aggregated_stats.py +80 -0
- gcore/types/cdn/resource_create_params.py +1845 -0
- gcore/types/cdn/resource_list_params.py +107 -0
- gcore/types/cdn/resource_prefetch_params.py +17 -0
- gcore/types/cdn/resource_purge_params.py +71 -0
- gcore/types/cdn/resource_replace_params.py +1823 -0
- gcore/types/cdn/resource_update_params.py +1814 -0
- gcore/types/cdn/resource_usage_stats.py +111 -0
- gcore/types/cdn/resources/__init__.py +11 -0
- gcore/types/cdn/resources/cdn_resource_rule.py +1715 -0
- gcore/types/cdn/resources/origin_shielding.py +15 -0
- gcore/types/cdn/resources/rule_create_params.py +1672 -0
- gcore/types/cdn/resources/rule_list_response.py +10 -0
- gcore/types/cdn/resources/rule_replace_params.py +1674 -0
- gcore/types/cdn/resources/rule_update_params.py +1674 -0
- gcore/types/cdn/resources/shield_replace_params.py +16 -0
- gcore/types/cdn/rule_template.py +1686 -0
- gcore/types/cdn/rule_template_create_params.py +1656 -0
- gcore/types/cdn/rule_template_list.py +10 -0
- gcore/types/cdn/rule_template_replace_params.py +1656 -0
- gcore/types/cdn/rule_template_update_params.py +1656 -0
- gcore/types/cdn/shield_aggregated_stats.py +23 -0
- gcore/types/cdn/shield_list_response.py +25 -0
- gcore/types/cdn/ssl_detail.py +62 -0
- gcore/types/cdn/ssl_detail_list.py +10 -0
- gcore/types/cdn/ssl_request_status.py +135 -0
- gcore/types/cdn/statistic_get_logs_usage_aggregated_params.py +42 -0
- gcore/types/cdn/statistic_get_logs_usage_series_params.py +35 -0
- gcore/types/cdn/statistic_get_resource_usage_aggregated_params.py +151 -0
- gcore/types/cdn/statistic_get_resource_usage_series_params.py +131 -0
- gcore/types/cdn/statistic_get_shield_usage_aggregated_params.py +42 -0
- gcore/types/cdn/statistic_get_shield_usage_series_params.py +25 -0
- gcore/types/cdn/trusted_ca_certificate_create_params.py +23 -0
- gcore/types/cdn/trusted_ca_certificate_list_params.py +29 -0
- gcore/types/cdn/trusted_ca_certificate_replace_params.py +15 -0
- gcore/types/cdn/usage_series_stats.py +31 -0
- gcore/types/cloud/__init__.py +2 -0
- gcore/types/cloud/file_share.py +4 -0
- gcore/types/cloud/file_share_create_params.py +20 -0
- gcore/types/cloud/file_share_update_params.py +40 -3
- gcore/types/cloud/floating_ip_update_params.py +3 -1
- gcore/types/cloud/gpu_baremetal_cluster_action_params.py +46 -0
- gcore/types/cloud/gpu_baremetal_clusters/gpu_baremetal_flavor.py +12 -0
- gcore/types/cloud/inference/inference_deployment.py +3 -1
- gcore/types/cloud/instance_create_params.py +3 -1
- gcore/types/cloud/k8s/cluster_create_params.py +46 -4
- gcore/types/cloud/k8s/cluster_update_params.py +60 -6
- gcore/types/cloud/k8s/clusters/pool_update_params.py +1 -1
- gcore/types/cloud/k8s/k8s_cluster.py +40 -3
- gcore/types/cloud/load_balancer_update_params.py +3 -1
- gcore/types/cloud/network_update_params.py +3 -1
- gcore/types/cloud/networks/subnet_update_params.py +3 -1
- gcore/types/cloud/quota_get_all_response.py +8 -8
- gcore/types/cloud/quota_get_by_region_response.py +8 -8
- gcore/types/cloud/quotas/request_create_params.py +4 -4
- gcore/types/cloud/quotas/request_get_response.py +4 -4
- gcore/types/cloud/quotas/request_list_response.py +4 -4
- gcore/types/cloud/registries/user_create_multiple_params.py +5 -3
- gcore/types/cloud/registries/user_create_params.py +5 -3
- gcore/types/cloud/registry_create_params.py +5 -3
- gcore/types/cloud/reserved_fixed_ip_update_params.py +16 -0
- gcore/types/cloud/security_group_update_params.py +3 -1
- gcore/types/cloud/ssh_key_created.py +6 -3
- gcore/types/cloud/volume_update_params.py +3 -1
- gcore/types/dns/zone_get_statistics_params.py +12 -9
- gcore/types/dns/zone_get_statistics_response.py +3 -1
- gcore/types/dns/zone_import_params.py +21 -15
- gcore/types/dns/zones/dns_output_rrset.py +7 -3
- gcore/types/iam/account_overview.py +31 -28
- gcore/types/iam/api_token.py +24 -24
- gcore/types/iam/api_token_create_params.py +2 -1
- gcore/types/iam/api_token_list.py +24 -24
- gcore/types/iam/user.py +7 -2
- gcore/types/iam/user_detailed.py +22 -17
- gcore/types/iam/user_invite.py +2 -4
- gcore/types/iam/user_invite_params.py +4 -1
- gcore/types/iam/user_update.py +22 -17
- gcore/types/iam/user_update_params.py +7 -2
- gcore/types/streaming/ai_contentmoderation_hardnudity.py +6 -4
- gcore/types/streaming/ai_contentmoderation_nsfw.py +6 -4
- gcore/types/streaming/ai_contentmoderation_softnudity.py +6 -4
- gcore/types/streaming/ai_contentmoderation_sport.py +6 -4
- gcore/types/streaming/ai_task.py +20 -11
- gcore/types/streaming/ai_task_create_params.py +20 -11
- gcore/types/streaming/ai_task_get_response.py +5 -4
- gcore/types/streaming/ai_task_list_params.py +11 -5
- gcore/types/streaming/clip.py +33 -22
- gcore/types/streaming/create_video_param.py +75 -43
- gcore/types/streaming/playlist.py +7 -5
- gcore/types/streaming/playlist_create_params.py +7 -5
- gcore/types/streaming/playlist_update_params.py +7 -5
- gcore/types/streaming/playlist_video.py +75 -43
- gcore/types/streaming/statistic_get_unique_viewers_cdn_params.py +7 -4
- gcore/types/streaming/stream.py +207 -136
- gcore/types/streaming/stream_create_clip_params.py +33 -22
- gcore/types/streaming/stream_create_params.py +41 -24
- gcore/types/streaming/stream_update_params.py +41 -24
- gcore/types/streaming/video.py +138 -76
- gcore/types/streaming/video_list_params.py +4 -2
- gcore/types/streaming/video_update_params.py +75 -43
- gcore/types/waap/domain_update_params.py +2 -2
- gcore/types/waap/domains/advanced_rule_create_params.py +26 -18
- gcore/types/waap/domains/advanced_rule_list_params.py +10 -7
- gcore/types/waap/domains/advanced_rule_update_params.py +22 -17
- gcore/types/waap/domains/api_path_create_params.py +0 -3
- gcore/types/waap/domains/api_path_update_params.py +1 -3
- gcore/types/waap/domains/custom_rule_create_params.py +36 -35
- gcore/types/waap/domains/custom_rule_update_params.py +31 -33
- gcore/types/waap/domains/firewall_rule_create_params.py +6 -6
- gcore/types/waap/domains/firewall_rule_update_params.py +5 -5
- gcore/types/waap/domains/waap_advanced_rule.py +17 -9
- gcore/types/waap/domains/waap_custom_rule.py +5 -2
- gcore/types/waap/domains/waap_firewall_rule.py +1 -1
- gcore/types/waap/domains/waap_insight.py +1 -1
- gcore/types/waap/insight_list_types_params.py +1 -1
- {gcore-0.13.0.dist-info → gcore-0.15.0.dist-info}/METADATA +1 -1
- {gcore-0.13.0.dist-info → gcore-0.15.0.dist-info}/RECORD +345 -224
- {gcore-0.13.0.dist-info → gcore-0.15.0.dist-info}/WHEEL +0 -0
- {gcore-0.13.0.dist-info → gcore-0.15.0.dist-info}/licenses/LICENSE +0 -0
|
@@ -0,0 +1,1062 @@
|
|
|
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 overload
|
|
6
|
+
|
|
7
|
+
import httpx
|
|
8
|
+
|
|
9
|
+
from ..._types import Body, Omit, Query, Headers, NoneType, NotGiven, SequenceNotStr, omit, not_given
|
|
10
|
+
from ..._utils import required_args, maybe_transform, async_maybe_transform
|
|
11
|
+
from ..._compat import cached_property
|
|
12
|
+
from ..._resource import SyncAPIResource, AsyncAPIResource
|
|
13
|
+
from ..._response import (
|
|
14
|
+
to_raw_response_wrapper,
|
|
15
|
+
to_streamed_response_wrapper,
|
|
16
|
+
async_to_raw_response_wrapper,
|
|
17
|
+
async_to_streamed_response_wrapper,
|
|
18
|
+
)
|
|
19
|
+
from ...types.cdn import (
|
|
20
|
+
certificate_list_params,
|
|
21
|
+
certificate_create_params,
|
|
22
|
+
certificate_replace_params,
|
|
23
|
+
certificate_get_status_params,
|
|
24
|
+
)
|
|
25
|
+
from ..._base_client import make_request_options
|
|
26
|
+
from ...types.cdn.ssl_detail import SslDetail
|
|
27
|
+
from ...types.cdn.ssl_detail_list import SslDetailList
|
|
28
|
+
from ...types.cdn.ssl_request_status import SslRequestStatus
|
|
29
|
+
|
|
30
|
+
__all__ = ["CertificatesResource", "AsyncCertificatesResource"]
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
class CertificatesResource(SyncAPIResource):
|
|
34
|
+
@cached_property
|
|
35
|
+
def with_raw_response(self) -> CertificatesResourceWithRawResponse:
|
|
36
|
+
"""
|
|
37
|
+
This property can be used as a prefix for any HTTP method call to return
|
|
38
|
+
the raw response object instead of the parsed content.
|
|
39
|
+
|
|
40
|
+
For more information, see https://www.github.com/G-Core/gcore-python#accessing-raw-response-data-eg-headers
|
|
41
|
+
"""
|
|
42
|
+
return CertificatesResourceWithRawResponse(self)
|
|
43
|
+
|
|
44
|
+
@cached_property
|
|
45
|
+
def with_streaming_response(self) -> CertificatesResourceWithStreamingResponse:
|
|
46
|
+
"""
|
|
47
|
+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
|
48
|
+
|
|
49
|
+
For more information, see https://www.github.com/G-Core/gcore-python#with_streaming_response
|
|
50
|
+
"""
|
|
51
|
+
return CertificatesResourceWithStreamingResponse(self)
|
|
52
|
+
|
|
53
|
+
@overload
|
|
54
|
+
def create(
|
|
55
|
+
self,
|
|
56
|
+
*,
|
|
57
|
+
name: str,
|
|
58
|
+
ssl_certificate: str,
|
|
59
|
+
ssl_private_key: str,
|
|
60
|
+
validate_root_ca: bool | Omit = omit,
|
|
61
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
62
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
63
|
+
extra_headers: Headers | None = None,
|
|
64
|
+
extra_query: Query | None = None,
|
|
65
|
+
extra_body: Body | None = None,
|
|
66
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
67
|
+
) -> None:
|
|
68
|
+
"""
|
|
69
|
+
Add an SSL certificate for content delivery over HTTPS protocol.
|
|
70
|
+
|
|
71
|
+
Enter all strings of the certificate(s) and the private key into one string
|
|
72
|
+
parameter. Each certificate and the private key in chain should be separated by
|
|
73
|
+
the "\n" symbol, as shown in the example.
|
|
74
|
+
|
|
75
|
+
Additionally, you can add a Let's Encrypt certificate. In this case, certificate
|
|
76
|
+
and private key will be generated automatically after attaching this certificate
|
|
77
|
+
to your CDN resource.
|
|
78
|
+
|
|
79
|
+
Args:
|
|
80
|
+
name: SSL certificate name.
|
|
81
|
+
|
|
82
|
+
It must be unique.
|
|
83
|
+
|
|
84
|
+
ssl_certificate: Public part of the SSL certificate.
|
|
85
|
+
|
|
86
|
+
All chain of the SSL certificate should be added.
|
|
87
|
+
|
|
88
|
+
ssl_private_key: Private key of the SSL certificate.
|
|
89
|
+
|
|
90
|
+
validate_root_ca: Defines whether to check the SSL certificate for a signature from a trusted
|
|
91
|
+
certificate authority.
|
|
92
|
+
|
|
93
|
+
Possible values:
|
|
94
|
+
|
|
95
|
+
- **true** - SSL certificate must be verified to be signed by a trusted
|
|
96
|
+
certificate authority.
|
|
97
|
+
- **false** - SSL certificate will not be verified to be signed by a trusted
|
|
98
|
+
certificate authority.
|
|
99
|
+
|
|
100
|
+
extra_headers: Send extra headers
|
|
101
|
+
|
|
102
|
+
extra_query: Add additional query parameters to the request
|
|
103
|
+
|
|
104
|
+
extra_body: Add additional JSON properties to the request
|
|
105
|
+
|
|
106
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
107
|
+
"""
|
|
108
|
+
...
|
|
109
|
+
|
|
110
|
+
@overload
|
|
111
|
+
def create(
|
|
112
|
+
self,
|
|
113
|
+
*,
|
|
114
|
+
automated: bool,
|
|
115
|
+
name: str,
|
|
116
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
117
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
118
|
+
extra_headers: Headers | None = None,
|
|
119
|
+
extra_query: Query | None = None,
|
|
120
|
+
extra_body: Body | None = None,
|
|
121
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
122
|
+
) -> None:
|
|
123
|
+
"""
|
|
124
|
+
Add an SSL certificate for content delivery over HTTPS protocol.
|
|
125
|
+
|
|
126
|
+
Enter all strings of the certificate(s) and the private key into one string
|
|
127
|
+
parameter. Each certificate and the private key in chain should be separated by
|
|
128
|
+
the "\n" symbol, as shown in the example.
|
|
129
|
+
|
|
130
|
+
Additionally, you can add a Let's Encrypt certificate. In this case, certificate
|
|
131
|
+
and private key will be generated automatically after attaching this certificate
|
|
132
|
+
to your CDN resource.
|
|
133
|
+
|
|
134
|
+
Args:
|
|
135
|
+
automated: Must be **true** to issue certificate automatically.
|
|
136
|
+
|
|
137
|
+
name: SSL certificate name. It must be unique.
|
|
138
|
+
|
|
139
|
+
extra_headers: Send extra headers
|
|
140
|
+
|
|
141
|
+
extra_query: Add additional query parameters to the request
|
|
142
|
+
|
|
143
|
+
extra_body: Add additional JSON properties to the request
|
|
144
|
+
|
|
145
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
146
|
+
"""
|
|
147
|
+
...
|
|
148
|
+
|
|
149
|
+
@required_args(["name", "ssl_certificate", "ssl_private_key"], ["automated", "name"])
|
|
150
|
+
def create(
|
|
151
|
+
self,
|
|
152
|
+
*,
|
|
153
|
+
name: str,
|
|
154
|
+
ssl_certificate: str | Omit = omit,
|
|
155
|
+
ssl_private_key: str | Omit = omit,
|
|
156
|
+
validate_root_ca: bool | Omit = omit,
|
|
157
|
+
automated: bool | Omit = omit,
|
|
158
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
159
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
160
|
+
extra_headers: Headers | None = None,
|
|
161
|
+
extra_query: Query | None = None,
|
|
162
|
+
extra_body: Body | None = None,
|
|
163
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
164
|
+
) -> None:
|
|
165
|
+
extra_headers = {"Accept": "*/*", **(extra_headers or {})}
|
|
166
|
+
return self._post(
|
|
167
|
+
"/cdn/sslData" if self._client._base_url_overridden else "https://api.gcore.com//cdn/sslData",
|
|
168
|
+
body=maybe_transform(
|
|
169
|
+
{
|
|
170
|
+
"name": name,
|
|
171
|
+
"ssl_certificate": ssl_certificate,
|
|
172
|
+
"ssl_private_key": ssl_private_key,
|
|
173
|
+
"validate_root_ca": validate_root_ca,
|
|
174
|
+
"automated": automated,
|
|
175
|
+
},
|
|
176
|
+
certificate_create_params.CertificateCreateParams,
|
|
177
|
+
),
|
|
178
|
+
options=make_request_options(
|
|
179
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
180
|
+
),
|
|
181
|
+
cast_to=NoneType,
|
|
182
|
+
)
|
|
183
|
+
|
|
184
|
+
def list(
|
|
185
|
+
self,
|
|
186
|
+
*,
|
|
187
|
+
automated: bool | Omit = omit,
|
|
188
|
+
resource_id: int | Omit = omit,
|
|
189
|
+
validity_not_after_lte: str | Omit = omit,
|
|
190
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
191
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
192
|
+
extra_headers: Headers | None = None,
|
|
193
|
+
extra_query: Query | None = None,
|
|
194
|
+
extra_body: Body | None = None,
|
|
195
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
196
|
+
) -> SslDetailList:
|
|
197
|
+
"""
|
|
198
|
+
Get information about SSL certificates.
|
|
199
|
+
|
|
200
|
+
Args:
|
|
201
|
+
automated: How the SSL certificate was issued.
|
|
202
|
+
|
|
203
|
+
Possible values:
|
|
204
|
+
|
|
205
|
+
- **true** – Certificate was issued automatically.
|
|
206
|
+
- **false** – Certificate was added by a user.
|
|
207
|
+
|
|
208
|
+
resource_id: CDN resource ID for which certificates are requested.
|
|
209
|
+
|
|
210
|
+
validity_not_after_lte: Date and time when the certificate become untrusted (ISO 8601/RFC 3339 format,
|
|
211
|
+
UTC.)
|
|
212
|
+
|
|
213
|
+
Response will contain only certificates valid until the specified time.
|
|
214
|
+
|
|
215
|
+
extra_headers: Send extra headers
|
|
216
|
+
|
|
217
|
+
extra_query: Add additional query parameters to the request
|
|
218
|
+
|
|
219
|
+
extra_body: Add additional JSON properties to the request
|
|
220
|
+
|
|
221
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
222
|
+
"""
|
|
223
|
+
return self._get(
|
|
224
|
+
"/cdn/sslData" if self._client._base_url_overridden else "https://api.gcore.com//cdn/sslData",
|
|
225
|
+
options=make_request_options(
|
|
226
|
+
extra_headers=extra_headers,
|
|
227
|
+
extra_query=extra_query,
|
|
228
|
+
extra_body=extra_body,
|
|
229
|
+
timeout=timeout,
|
|
230
|
+
query=maybe_transform(
|
|
231
|
+
{
|
|
232
|
+
"automated": automated,
|
|
233
|
+
"resource_id": resource_id,
|
|
234
|
+
"validity_not_after_lte": validity_not_after_lte,
|
|
235
|
+
},
|
|
236
|
+
certificate_list_params.CertificateListParams,
|
|
237
|
+
),
|
|
238
|
+
),
|
|
239
|
+
cast_to=SslDetailList,
|
|
240
|
+
)
|
|
241
|
+
|
|
242
|
+
def delete(
|
|
243
|
+
self,
|
|
244
|
+
ssl_id: int,
|
|
245
|
+
*,
|
|
246
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
247
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
248
|
+
extra_headers: Headers | None = None,
|
|
249
|
+
extra_query: Query | None = None,
|
|
250
|
+
extra_body: Body | None = None,
|
|
251
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
252
|
+
) -> None:
|
|
253
|
+
"""
|
|
254
|
+
Delete SSL certificate
|
|
255
|
+
|
|
256
|
+
Args:
|
|
257
|
+
extra_headers: Send extra headers
|
|
258
|
+
|
|
259
|
+
extra_query: Add additional query parameters to the request
|
|
260
|
+
|
|
261
|
+
extra_body: Add additional JSON properties to the request
|
|
262
|
+
|
|
263
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
264
|
+
"""
|
|
265
|
+
extra_headers = {"Accept": "*/*", **(extra_headers or {})}
|
|
266
|
+
return self._delete(
|
|
267
|
+
f"/cdn/sslData/{ssl_id}"
|
|
268
|
+
if self._client._base_url_overridden
|
|
269
|
+
else f"https://api.gcore.com//cdn/sslData/{ssl_id}",
|
|
270
|
+
options=make_request_options(
|
|
271
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
272
|
+
),
|
|
273
|
+
cast_to=NoneType,
|
|
274
|
+
)
|
|
275
|
+
|
|
276
|
+
def force_retry(
|
|
277
|
+
self,
|
|
278
|
+
cert_id: int,
|
|
279
|
+
*,
|
|
280
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
281
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
282
|
+
extra_headers: Headers | None = None,
|
|
283
|
+
extra_query: Query | None = None,
|
|
284
|
+
extra_body: Body | None = None,
|
|
285
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
286
|
+
) -> None:
|
|
287
|
+
"""
|
|
288
|
+
Force retry issuance of Let's Encrypt certificate if the previous attempt was
|
|
289
|
+
failed.
|
|
290
|
+
|
|
291
|
+
Args:
|
|
292
|
+
extra_headers: Send extra headers
|
|
293
|
+
|
|
294
|
+
extra_query: Add additional query parameters to the request
|
|
295
|
+
|
|
296
|
+
extra_body: Add additional JSON properties to the request
|
|
297
|
+
|
|
298
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
299
|
+
"""
|
|
300
|
+
extra_headers = {"Accept": "*/*", **(extra_headers or {})}
|
|
301
|
+
return self._post(
|
|
302
|
+
f"/cdn/sslData/{cert_id}/force-retry"
|
|
303
|
+
if self._client._base_url_overridden
|
|
304
|
+
else f"https://api.gcore.com//cdn/sslData/{cert_id}/force-retry",
|
|
305
|
+
options=make_request_options(
|
|
306
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
307
|
+
),
|
|
308
|
+
cast_to=NoneType,
|
|
309
|
+
)
|
|
310
|
+
|
|
311
|
+
def get(
|
|
312
|
+
self,
|
|
313
|
+
ssl_id: int,
|
|
314
|
+
*,
|
|
315
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
316
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
317
|
+
extra_headers: Headers | None = None,
|
|
318
|
+
extra_query: Query | None = None,
|
|
319
|
+
extra_body: Body | None = None,
|
|
320
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
321
|
+
) -> SslDetail:
|
|
322
|
+
"""
|
|
323
|
+
Get SSL certificate details
|
|
324
|
+
|
|
325
|
+
Args:
|
|
326
|
+
extra_headers: Send extra headers
|
|
327
|
+
|
|
328
|
+
extra_query: Add additional query parameters to the request
|
|
329
|
+
|
|
330
|
+
extra_body: Add additional JSON properties to the request
|
|
331
|
+
|
|
332
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
333
|
+
"""
|
|
334
|
+
return self._get(
|
|
335
|
+
f"/cdn/sslData/{ssl_id}"
|
|
336
|
+
if self._client._base_url_overridden
|
|
337
|
+
else f"https://api.gcore.com//cdn/sslData/{ssl_id}",
|
|
338
|
+
options=make_request_options(
|
|
339
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
340
|
+
),
|
|
341
|
+
cast_to=SslDetail,
|
|
342
|
+
)
|
|
343
|
+
|
|
344
|
+
def get_status(
|
|
345
|
+
self,
|
|
346
|
+
cert_id: int,
|
|
347
|
+
*,
|
|
348
|
+
exclude: SequenceNotStr[str] | Omit = omit,
|
|
349
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
350
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
351
|
+
extra_headers: Headers | None = None,
|
|
352
|
+
extra_query: Query | None = None,
|
|
353
|
+
extra_body: Body | None = None,
|
|
354
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
355
|
+
) -> SslRequestStatus:
|
|
356
|
+
"""
|
|
357
|
+
Get details about the latest Let's Encrypt certificate issuing attempt for the
|
|
358
|
+
CDN resource. Returns attempts in all statuses.
|
|
359
|
+
|
|
360
|
+
Args:
|
|
361
|
+
exclude: Listed fields will be excluded from the response.
|
|
362
|
+
|
|
363
|
+
extra_headers: Send extra headers
|
|
364
|
+
|
|
365
|
+
extra_query: Add additional query parameters to the request
|
|
366
|
+
|
|
367
|
+
extra_body: Add additional JSON properties to the request
|
|
368
|
+
|
|
369
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
370
|
+
"""
|
|
371
|
+
return self._get(
|
|
372
|
+
f"/cdn/sslData/{cert_id}/status"
|
|
373
|
+
if self._client._base_url_overridden
|
|
374
|
+
else f"https://api.gcore.com//cdn/sslData/{cert_id}/status",
|
|
375
|
+
options=make_request_options(
|
|
376
|
+
extra_headers=extra_headers,
|
|
377
|
+
extra_query=extra_query,
|
|
378
|
+
extra_body=extra_body,
|
|
379
|
+
timeout=timeout,
|
|
380
|
+
query=maybe_transform({"exclude": exclude}, certificate_get_status_params.CertificateGetStatusParams),
|
|
381
|
+
),
|
|
382
|
+
cast_to=SslRequestStatus,
|
|
383
|
+
)
|
|
384
|
+
|
|
385
|
+
def renew(
|
|
386
|
+
self,
|
|
387
|
+
cert_id: int,
|
|
388
|
+
*,
|
|
389
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
390
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
391
|
+
extra_headers: Headers | None = None,
|
|
392
|
+
extra_query: Query | None = None,
|
|
393
|
+
extra_body: Body | None = None,
|
|
394
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
395
|
+
) -> None:
|
|
396
|
+
"""Renew free Let's Encrypt certificate for the CDN resource.
|
|
397
|
+
|
|
398
|
+
It can take up to
|
|
399
|
+
fifteen minutes.
|
|
400
|
+
|
|
401
|
+
Args:
|
|
402
|
+
extra_headers: Send extra headers
|
|
403
|
+
|
|
404
|
+
extra_query: Add additional query parameters to the request
|
|
405
|
+
|
|
406
|
+
extra_body: Add additional JSON properties to the request
|
|
407
|
+
|
|
408
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
409
|
+
"""
|
|
410
|
+
extra_headers = {"Accept": "*/*", **(extra_headers or {})}
|
|
411
|
+
return self._post(
|
|
412
|
+
f"/cdn/sslData/{cert_id}/renew"
|
|
413
|
+
if self._client._base_url_overridden
|
|
414
|
+
else f"https://api.gcore.com//cdn/sslData/{cert_id}/renew",
|
|
415
|
+
options=make_request_options(
|
|
416
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
417
|
+
),
|
|
418
|
+
cast_to=NoneType,
|
|
419
|
+
)
|
|
420
|
+
|
|
421
|
+
def replace(
|
|
422
|
+
self,
|
|
423
|
+
ssl_id: int,
|
|
424
|
+
*,
|
|
425
|
+
name: str,
|
|
426
|
+
ssl_certificate: str,
|
|
427
|
+
ssl_private_key: str,
|
|
428
|
+
validate_root_ca: bool | Omit = omit,
|
|
429
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
430
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
431
|
+
extra_headers: Headers | None = None,
|
|
432
|
+
extra_query: Query | None = None,
|
|
433
|
+
extra_body: Body | None = None,
|
|
434
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
435
|
+
) -> SslDetail:
|
|
436
|
+
"""
|
|
437
|
+
Change SSL certificate
|
|
438
|
+
|
|
439
|
+
Args:
|
|
440
|
+
name: SSL certificate name.
|
|
441
|
+
|
|
442
|
+
It must be unique.
|
|
443
|
+
|
|
444
|
+
ssl_certificate: Public part of the SSL certificate.
|
|
445
|
+
|
|
446
|
+
All chain of the SSL certificate should be added.
|
|
447
|
+
|
|
448
|
+
ssl_private_key: Private key of the SSL certificate.
|
|
449
|
+
|
|
450
|
+
validate_root_ca: Defines whether to check the SSL certificate for a signature from a trusted
|
|
451
|
+
certificate authority.
|
|
452
|
+
|
|
453
|
+
Possible values:
|
|
454
|
+
|
|
455
|
+
- **true** - SSL certificate must be verified to be signed by a trusted
|
|
456
|
+
certificate authority.
|
|
457
|
+
- **false** - SSL certificate will not be verified to be signed by a trusted
|
|
458
|
+
certificate authority.
|
|
459
|
+
|
|
460
|
+
extra_headers: Send extra headers
|
|
461
|
+
|
|
462
|
+
extra_query: Add additional query parameters to the request
|
|
463
|
+
|
|
464
|
+
extra_body: Add additional JSON properties to the request
|
|
465
|
+
|
|
466
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
467
|
+
"""
|
|
468
|
+
return self._put(
|
|
469
|
+
f"/cdn/sslData/{ssl_id}"
|
|
470
|
+
if self._client._base_url_overridden
|
|
471
|
+
else f"https://api.gcore.com//cdn/sslData/{ssl_id}",
|
|
472
|
+
body=maybe_transform(
|
|
473
|
+
{
|
|
474
|
+
"name": name,
|
|
475
|
+
"ssl_certificate": ssl_certificate,
|
|
476
|
+
"ssl_private_key": ssl_private_key,
|
|
477
|
+
"validate_root_ca": validate_root_ca,
|
|
478
|
+
},
|
|
479
|
+
certificate_replace_params.CertificateReplaceParams,
|
|
480
|
+
),
|
|
481
|
+
options=make_request_options(
|
|
482
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
483
|
+
),
|
|
484
|
+
cast_to=SslDetail,
|
|
485
|
+
)
|
|
486
|
+
|
|
487
|
+
|
|
488
|
+
class AsyncCertificatesResource(AsyncAPIResource):
|
|
489
|
+
@cached_property
|
|
490
|
+
def with_raw_response(self) -> AsyncCertificatesResourceWithRawResponse:
|
|
491
|
+
"""
|
|
492
|
+
This property can be used as a prefix for any HTTP method call to return
|
|
493
|
+
the raw response object instead of the parsed content.
|
|
494
|
+
|
|
495
|
+
For more information, see https://www.github.com/G-Core/gcore-python#accessing-raw-response-data-eg-headers
|
|
496
|
+
"""
|
|
497
|
+
return AsyncCertificatesResourceWithRawResponse(self)
|
|
498
|
+
|
|
499
|
+
@cached_property
|
|
500
|
+
def with_streaming_response(self) -> AsyncCertificatesResourceWithStreamingResponse:
|
|
501
|
+
"""
|
|
502
|
+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
|
503
|
+
|
|
504
|
+
For more information, see https://www.github.com/G-Core/gcore-python#with_streaming_response
|
|
505
|
+
"""
|
|
506
|
+
return AsyncCertificatesResourceWithStreamingResponse(self)
|
|
507
|
+
|
|
508
|
+
@overload
|
|
509
|
+
async def create(
|
|
510
|
+
self,
|
|
511
|
+
*,
|
|
512
|
+
name: str,
|
|
513
|
+
ssl_certificate: str,
|
|
514
|
+
ssl_private_key: str,
|
|
515
|
+
validate_root_ca: bool | Omit = omit,
|
|
516
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
517
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
518
|
+
extra_headers: Headers | None = None,
|
|
519
|
+
extra_query: Query | None = None,
|
|
520
|
+
extra_body: Body | None = None,
|
|
521
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
522
|
+
) -> None:
|
|
523
|
+
"""
|
|
524
|
+
Add an SSL certificate for content delivery over HTTPS protocol.
|
|
525
|
+
|
|
526
|
+
Enter all strings of the certificate(s) and the private key into one string
|
|
527
|
+
parameter. Each certificate and the private key in chain should be separated by
|
|
528
|
+
the "\n" symbol, as shown in the example.
|
|
529
|
+
|
|
530
|
+
Additionally, you can add a Let's Encrypt certificate. In this case, certificate
|
|
531
|
+
and private key will be generated automatically after attaching this certificate
|
|
532
|
+
to your CDN resource.
|
|
533
|
+
|
|
534
|
+
Args:
|
|
535
|
+
name: SSL certificate name.
|
|
536
|
+
|
|
537
|
+
It must be unique.
|
|
538
|
+
|
|
539
|
+
ssl_certificate: Public part of the SSL certificate.
|
|
540
|
+
|
|
541
|
+
All chain of the SSL certificate should be added.
|
|
542
|
+
|
|
543
|
+
ssl_private_key: Private key of the SSL certificate.
|
|
544
|
+
|
|
545
|
+
validate_root_ca: Defines whether to check the SSL certificate for a signature from a trusted
|
|
546
|
+
certificate authority.
|
|
547
|
+
|
|
548
|
+
Possible values:
|
|
549
|
+
|
|
550
|
+
- **true** - SSL certificate must be verified to be signed by a trusted
|
|
551
|
+
certificate authority.
|
|
552
|
+
- **false** - SSL certificate will not be verified to be signed by a trusted
|
|
553
|
+
certificate authority.
|
|
554
|
+
|
|
555
|
+
extra_headers: Send extra headers
|
|
556
|
+
|
|
557
|
+
extra_query: Add additional query parameters to the request
|
|
558
|
+
|
|
559
|
+
extra_body: Add additional JSON properties to the request
|
|
560
|
+
|
|
561
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
562
|
+
"""
|
|
563
|
+
...
|
|
564
|
+
|
|
565
|
+
@overload
|
|
566
|
+
async def create(
|
|
567
|
+
self,
|
|
568
|
+
*,
|
|
569
|
+
automated: bool,
|
|
570
|
+
name: str,
|
|
571
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
572
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
573
|
+
extra_headers: Headers | None = None,
|
|
574
|
+
extra_query: Query | None = None,
|
|
575
|
+
extra_body: Body | None = None,
|
|
576
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
577
|
+
) -> None:
|
|
578
|
+
"""
|
|
579
|
+
Add an SSL certificate for content delivery over HTTPS protocol.
|
|
580
|
+
|
|
581
|
+
Enter all strings of the certificate(s) and the private key into one string
|
|
582
|
+
parameter. Each certificate and the private key in chain should be separated by
|
|
583
|
+
the "\n" symbol, as shown in the example.
|
|
584
|
+
|
|
585
|
+
Additionally, you can add a Let's Encrypt certificate. In this case, certificate
|
|
586
|
+
and private key will be generated automatically after attaching this certificate
|
|
587
|
+
to your CDN resource.
|
|
588
|
+
|
|
589
|
+
Args:
|
|
590
|
+
automated: Must be **true** to issue certificate automatically.
|
|
591
|
+
|
|
592
|
+
name: SSL certificate name. It must be unique.
|
|
593
|
+
|
|
594
|
+
extra_headers: Send extra headers
|
|
595
|
+
|
|
596
|
+
extra_query: Add additional query parameters to the request
|
|
597
|
+
|
|
598
|
+
extra_body: Add additional JSON properties to the request
|
|
599
|
+
|
|
600
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
601
|
+
"""
|
|
602
|
+
...
|
|
603
|
+
|
|
604
|
+
@required_args(["name", "ssl_certificate", "ssl_private_key"], ["automated", "name"])
|
|
605
|
+
async def create(
|
|
606
|
+
self,
|
|
607
|
+
*,
|
|
608
|
+
name: str,
|
|
609
|
+
ssl_certificate: str | Omit = omit,
|
|
610
|
+
ssl_private_key: str | Omit = omit,
|
|
611
|
+
validate_root_ca: bool | Omit = omit,
|
|
612
|
+
automated: bool | Omit = omit,
|
|
613
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
614
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
615
|
+
extra_headers: Headers | None = None,
|
|
616
|
+
extra_query: Query | None = None,
|
|
617
|
+
extra_body: Body | None = None,
|
|
618
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
619
|
+
) -> None:
|
|
620
|
+
extra_headers = {"Accept": "*/*", **(extra_headers or {})}
|
|
621
|
+
return await self._post(
|
|
622
|
+
"/cdn/sslData" if self._client._base_url_overridden else "https://api.gcore.com//cdn/sslData",
|
|
623
|
+
body=await async_maybe_transform(
|
|
624
|
+
{
|
|
625
|
+
"name": name,
|
|
626
|
+
"ssl_certificate": ssl_certificate,
|
|
627
|
+
"ssl_private_key": ssl_private_key,
|
|
628
|
+
"validate_root_ca": validate_root_ca,
|
|
629
|
+
"automated": automated,
|
|
630
|
+
},
|
|
631
|
+
certificate_create_params.CertificateCreateParams,
|
|
632
|
+
),
|
|
633
|
+
options=make_request_options(
|
|
634
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
635
|
+
),
|
|
636
|
+
cast_to=NoneType,
|
|
637
|
+
)
|
|
638
|
+
|
|
639
|
+
async def list(
|
|
640
|
+
self,
|
|
641
|
+
*,
|
|
642
|
+
automated: bool | Omit = omit,
|
|
643
|
+
resource_id: int | Omit = omit,
|
|
644
|
+
validity_not_after_lte: str | Omit = omit,
|
|
645
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
646
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
647
|
+
extra_headers: Headers | None = None,
|
|
648
|
+
extra_query: Query | None = None,
|
|
649
|
+
extra_body: Body | None = None,
|
|
650
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
651
|
+
) -> SslDetailList:
|
|
652
|
+
"""
|
|
653
|
+
Get information about SSL certificates.
|
|
654
|
+
|
|
655
|
+
Args:
|
|
656
|
+
automated: How the SSL certificate was issued.
|
|
657
|
+
|
|
658
|
+
Possible values:
|
|
659
|
+
|
|
660
|
+
- **true** – Certificate was issued automatically.
|
|
661
|
+
- **false** – Certificate was added by a user.
|
|
662
|
+
|
|
663
|
+
resource_id: CDN resource ID for which certificates are requested.
|
|
664
|
+
|
|
665
|
+
validity_not_after_lte: Date and time when the certificate become untrusted (ISO 8601/RFC 3339 format,
|
|
666
|
+
UTC.)
|
|
667
|
+
|
|
668
|
+
Response will contain only certificates valid until the specified time.
|
|
669
|
+
|
|
670
|
+
extra_headers: Send extra headers
|
|
671
|
+
|
|
672
|
+
extra_query: Add additional query parameters to the request
|
|
673
|
+
|
|
674
|
+
extra_body: Add additional JSON properties to the request
|
|
675
|
+
|
|
676
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
677
|
+
"""
|
|
678
|
+
return await self._get(
|
|
679
|
+
"/cdn/sslData" if self._client._base_url_overridden else "https://api.gcore.com//cdn/sslData",
|
|
680
|
+
options=make_request_options(
|
|
681
|
+
extra_headers=extra_headers,
|
|
682
|
+
extra_query=extra_query,
|
|
683
|
+
extra_body=extra_body,
|
|
684
|
+
timeout=timeout,
|
|
685
|
+
query=await async_maybe_transform(
|
|
686
|
+
{
|
|
687
|
+
"automated": automated,
|
|
688
|
+
"resource_id": resource_id,
|
|
689
|
+
"validity_not_after_lte": validity_not_after_lte,
|
|
690
|
+
},
|
|
691
|
+
certificate_list_params.CertificateListParams,
|
|
692
|
+
),
|
|
693
|
+
),
|
|
694
|
+
cast_to=SslDetailList,
|
|
695
|
+
)
|
|
696
|
+
|
|
697
|
+
async def delete(
|
|
698
|
+
self,
|
|
699
|
+
ssl_id: int,
|
|
700
|
+
*,
|
|
701
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
702
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
703
|
+
extra_headers: Headers | None = None,
|
|
704
|
+
extra_query: Query | None = None,
|
|
705
|
+
extra_body: Body | None = None,
|
|
706
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
707
|
+
) -> None:
|
|
708
|
+
"""
|
|
709
|
+
Delete SSL certificate
|
|
710
|
+
|
|
711
|
+
Args:
|
|
712
|
+
extra_headers: Send extra headers
|
|
713
|
+
|
|
714
|
+
extra_query: Add additional query parameters to the request
|
|
715
|
+
|
|
716
|
+
extra_body: Add additional JSON properties to the request
|
|
717
|
+
|
|
718
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
719
|
+
"""
|
|
720
|
+
extra_headers = {"Accept": "*/*", **(extra_headers or {})}
|
|
721
|
+
return await self._delete(
|
|
722
|
+
f"/cdn/sslData/{ssl_id}"
|
|
723
|
+
if self._client._base_url_overridden
|
|
724
|
+
else f"https://api.gcore.com//cdn/sslData/{ssl_id}",
|
|
725
|
+
options=make_request_options(
|
|
726
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
727
|
+
),
|
|
728
|
+
cast_to=NoneType,
|
|
729
|
+
)
|
|
730
|
+
|
|
731
|
+
async def force_retry(
|
|
732
|
+
self,
|
|
733
|
+
cert_id: int,
|
|
734
|
+
*,
|
|
735
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
736
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
737
|
+
extra_headers: Headers | None = None,
|
|
738
|
+
extra_query: Query | None = None,
|
|
739
|
+
extra_body: Body | None = None,
|
|
740
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
741
|
+
) -> None:
|
|
742
|
+
"""
|
|
743
|
+
Force retry issuance of Let's Encrypt certificate if the previous attempt was
|
|
744
|
+
failed.
|
|
745
|
+
|
|
746
|
+
Args:
|
|
747
|
+
extra_headers: Send extra headers
|
|
748
|
+
|
|
749
|
+
extra_query: Add additional query parameters to the request
|
|
750
|
+
|
|
751
|
+
extra_body: Add additional JSON properties to the request
|
|
752
|
+
|
|
753
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
754
|
+
"""
|
|
755
|
+
extra_headers = {"Accept": "*/*", **(extra_headers or {})}
|
|
756
|
+
return await self._post(
|
|
757
|
+
f"/cdn/sslData/{cert_id}/force-retry"
|
|
758
|
+
if self._client._base_url_overridden
|
|
759
|
+
else f"https://api.gcore.com//cdn/sslData/{cert_id}/force-retry",
|
|
760
|
+
options=make_request_options(
|
|
761
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
762
|
+
),
|
|
763
|
+
cast_to=NoneType,
|
|
764
|
+
)
|
|
765
|
+
|
|
766
|
+
async def get(
|
|
767
|
+
self,
|
|
768
|
+
ssl_id: int,
|
|
769
|
+
*,
|
|
770
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
771
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
772
|
+
extra_headers: Headers | None = None,
|
|
773
|
+
extra_query: Query | None = None,
|
|
774
|
+
extra_body: Body | None = None,
|
|
775
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
776
|
+
) -> SslDetail:
|
|
777
|
+
"""
|
|
778
|
+
Get SSL certificate details
|
|
779
|
+
|
|
780
|
+
Args:
|
|
781
|
+
extra_headers: Send extra headers
|
|
782
|
+
|
|
783
|
+
extra_query: Add additional query parameters to the request
|
|
784
|
+
|
|
785
|
+
extra_body: Add additional JSON properties to the request
|
|
786
|
+
|
|
787
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
788
|
+
"""
|
|
789
|
+
return await self._get(
|
|
790
|
+
f"/cdn/sslData/{ssl_id}"
|
|
791
|
+
if self._client._base_url_overridden
|
|
792
|
+
else f"https://api.gcore.com//cdn/sslData/{ssl_id}",
|
|
793
|
+
options=make_request_options(
|
|
794
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
795
|
+
),
|
|
796
|
+
cast_to=SslDetail,
|
|
797
|
+
)
|
|
798
|
+
|
|
799
|
+
async def get_status(
|
|
800
|
+
self,
|
|
801
|
+
cert_id: int,
|
|
802
|
+
*,
|
|
803
|
+
exclude: SequenceNotStr[str] | Omit = omit,
|
|
804
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
805
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
806
|
+
extra_headers: Headers | None = None,
|
|
807
|
+
extra_query: Query | None = None,
|
|
808
|
+
extra_body: Body | None = None,
|
|
809
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
810
|
+
) -> SslRequestStatus:
|
|
811
|
+
"""
|
|
812
|
+
Get details about the latest Let's Encrypt certificate issuing attempt for the
|
|
813
|
+
CDN resource. Returns attempts in all statuses.
|
|
814
|
+
|
|
815
|
+
Args:
|
|
816
|
+
exclude: Listed fields will be excluded from the response.
|
|
817
|
+
|
|
818
|
+
extra_headers: Send extra headers
|
|
819
|
+
|
|
820
|
+
extra_query: Add additional query parameters to the request
|
|
821
|
+
|
|
822
|
+
extra_body: Add additional JSON properties to the request
|
|
823
|
+
|
|
824
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
825
|
+
"""
|
|
826
|
+
return await self._get(
|
|
827
|
+
f"/cdn/sslData/{cert_id}/status"
|
|
828
|
+
if self._client._base_url_overridden
|
|
829
|
+
else f"https://api.gcore.com//cdn/sslData/{cert_id}/status",
|
|
830
|
+
options=make_request_options(
|
|
831
|
+
extra_headers=extra_headers,
|
|
832
|
+
extra_query=extra_query,
|
|
833
|
+
extra_body=extra_body,
|
|
834
|
+
timeout=timeout,
|
|
835
|
+
query=await async_maybe_transform(
|
|
836
|
+
{"exclude": exclude}, certificate_get_status_params.CertificateGetStatusParams
|
|
837
|
+
),
|
|
838
|
+
),
|
|
839
|
+
cast_to=SslRequestStatus,
|
|
840
|
+
)
|
|
841
|
+
|
|
842
|
+
async def renew(
|
|
843
|
+
self,
|
|
844
|
+
cert_id: int,
|
|
845
|
+
*,
|
|
846
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
847
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
848
|
+
extra_headers: Headers | None = None,
|
|
849
|
+
extra_query: Query | None = None,
|
|
850
|
+
extra_body: Body | None = None,
|
|
851
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
852
|
+
) -> None:
|
|
853
|
+
"""Renew free Let's Encrypt certificate for the CDN resource.
|
|
854
|
+
|
|
855
|
+
It can take up to
|
|
856
|
+
fifteen minutes.
|
|
857
|
+
|
|
858
|
+
Args:
|
|
859
|
+
extra_headers: Send extra headers
|
|
860
|
+
|
|
861
|
+
extra_query: Add additional query parameters to the request
|
|
862
|
+
|
|
863
|
+
extra_body: Add additional JSON properties to the request
|
|
864
|
+
|
|
865
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
866
|
+
"""
|
|
867
|
+
extra_headers = {"Accept": "*/*", **(extra_headers or {})}
|
|
868
|
+
return await self._post(
|
|
869
|
+
f"/cdn/sslData/{cert_id}/renew"
|
|
870
|
+
if self._client._base_url_overridden
|
|
871
|
+
else f"https://api.gcore.com//cdn/sslData/{cert_id}/renew",
|
|
872
|
+
options=make_request_options(
|
|
873
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
874
|
+
),
|
|
875
|
+
cast_to=NoneType,
|
|
876
|
+
)
|
|
877
|
+
|
|
878
|
+
async def replace(
|
|
879
|
+
self,
|
|
880
|
+
ssl_id: int,
|
|
881
|
+
*,
|
|
882
|
+
name: str,
|
|
883
|
+
ssl_certificate: str,
|
|
884
|
+
ssl_private_key: str,
|
|
885
|
+
validate_root_ca: bool | Omit = omit,
|
|
886
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
887
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
888
|
+
extra_headers: Headers | None = None,
|
|
889
|
+
extra_query: Query | None = None,
|
|
890
|
+
extra_body: Body | None = None,
|
|
891
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
892
|
+
) -> SslDetail:
|
|
893
|
+
"""
|
|
894
|
+
Change SSL certificate
|
|
895
|
+
|
|
896
|
+
Args:
|
|
897
|
+
name: SSL certificate name.
|
|
898
|
+
|
|
899
|
+
It must be unique.
|
|
900
|
+
|
|
901
|
+
ssl_certificate: Public part of the SSL certificate.
|
|
902
|
+
|
|
903
|
+
All chain of the SSL certificate should be added.
|
|
904
|
+
|
|
905
|
+
ssl_private_key: Private key of the SSL certificate.
|
|
906
|
+
|
|
907
|
+
validate_root_ca: Defines whether to check the SSL certificate for a signature from a trusted
|
|
908
|
+
certificate authority.
|
|
909
|
+
|
|
910
|
+
Possible values:
|
|
911
|
+
|
|
912
|
+
- **true** - SSL certificate must be verified to be signed by a trusted
|
|
913
|
+
certificate authority.
|
|
914
|
+
- **false** - SSL certificate will not be verified to be signed by a trusted
|
|
915
|
+
certificate authority.
|
|
916
|
+
|
|
917
|
+
extra_headers: Send extra headers
|
|
918
|
+
|
|
919
|
+
extra_query: Add additional query parameters to the request
|
|
920
|
+
|
|
921
|
+
extra_body: Add additional JSON properties to the request
|
|
922
|
+
|
|
923
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
924
|
+
"""
|
|
925
|
+
return await self._put(
|
|
926
|
+
f"/cdn/sslData/{ssl_id}"
|
|
927
|
+
if self._client._base_url_overridden
|
|
928
|
+
else f"https://api.gcore.com//cdn/sslData/{ssl_id}",
|
|
929
|
+
body=await async_maybe_transform(
|
|
930
|
+
{
|
|
931
|
+
"name": name,
|
|
932
|
+
"ssl_certificate": ssl_certificate,
|
|
933
|
+
"ssl_private_key": ssl_private_key,
|
|
934
|
+
"validate_root_ca": validate_root_ca,
|
|
935
|
+
},
|
|
936
|
+
certificate_replace_params.CertificateReplaceParams,
|
|
937
|
+
),
|
|
938
|
+
options=make_request_options(
|
|
939
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
940
|
+
),
|
|
941
|
+
cast_to=SslDetail,
|
|
942
|
+
)
|
|
943
|
+
|
|
944
|
+
|
|
945
|
+
class CertificatesResourceWithRawResponse:
|
|
946
|
+
def __init__(self, certificates: CertificatesResource) -> None:
|
|
947
|
+
self._certificates = certificates
|
|
948
|
+
|
|
949
|
+
self.create = to_raw_response_wrapper(
|
|
950
|
+
certificates.create,
|
|
951
|
+
)
|
|
952
|
+
self.list = to_raw_response_wrapper(
|
|
953
|
+
certificates.list,
|
|
954
|
+
)
|
|
955
|
+
self.delete = to_raw_response_wrapper(
|
|
956
|
+
certificates.delete,
|
|
957
|
+
)
|
|
958
|
+
self.force_retry = to_raw_response_wrapper(
|
|
959
|
+
certificates.force_retry,
|
|
960
|
+
)
|
|
961
|
+
self.get = to_raw_response_wrapper(
|
|
962
|
+
certificates.get,
|
|
963
|
+
)
|
|
964
|
+
self.get_status = to_raw_response_wrapper(
|
|
965
|
+
certificates.get_status,
|
|
966
|
+
)
|
|
967
|
+
self.renew = to_raw_response_wrapper(
|
|
968
|
+
certificates.renew,
|
|
969
|
+
)
|
|
970
|
+
self.replace = to_raw_response_wrapper(
|
|
971
|
+
certificates.replace,
|
|
972
|
+
)
|
|
973
|
+
|
|
974
|
+
|
|
975
|
+
class AsyncCertificatesResourceWithRawResponse:
|
|
976
|
+
def __init__(self, certificates: AsyncCertificatesResource) -> None:
|
|
977
|
+
self._certificates = certificates
|
|
978
|
+
|
|
979
|
+
self.create = async_to_raw_response_wrapper(
|
|
980
|
+
certificates.create,
|
|
981
|
+
)
|
|
982
|
+
self.list = async_to_raw_response_wrapper(
|
|
983
|
+
certificates.list,
|
|
984
|
+
)
|
|
985
|
+
self.delete = async_to_raw_response_wrapper(
|
|
986
|
+
certificates.delete,
|
|
987
|
+
)
|
|
988
|
+
self.force_retry = async_to_raw_response_wrapper(
|
|
989
|
+
certificates.force_retry,
|
|
990
|
+
)
|
|
991
|
+
self.get = async_to_raw_response_wrapper(
|
|
992
|
+
certificates.get,
|
|
993
|
+
)
|
|
994
|
+
self.get_status = async_to_raw_response_wrapper(
|
|
995
|
+
certificates.get_status,
|
|
996
|
+
)
|
|
997
|
+
self.renew = async_to_raw_response_wrapper(
|
|
998
|
+
certificates.renew,
|
|
999
|
+
)
|
|
1000
|
+
self.replace = async_to_raw_response_wrapper(
|
|
1001
|
+
certificates.replace,
|
|
1002
|
+
)
|
|
1003
|
+
|
|
1004
|
+
|
|
1005
|
+
class CertificatesResourceWithStreamingResponse:
|
|
1006
|
+
def __init__(self, certificates: CertificatesResource) -> None:
|
|
1007
|
+
self._certificates = certificates
|
|
1008
|
+
|
|
1009
|
+
self.create = to_streamed_response_wrapper(
|
|
1010
|
+
certificates.create,
|
|
1011
|
+
)
|
|
1012
|
+
self.list = to_streamed_response_wrapper(
|
|
1013
|
+
certificates.list,
|
|
1014
|
+
)
|
|
1015
|
+
self.delete = to_streamed_response_wrapper(
|
|
1016
|
+
certificates.delete,
|
|
1017
|
+
)
|
|
1018
|
+
self.force_retry = to_streamed_response_wrapper(
|
|
1019
|
+
certificates.force_retry,
|
|
1020
|
+
)
|
|
1021
|
+
self.get = to_streamed_response_wrapper(
|
|
1022
|
+
certificates.get,
|
|
1023
|
+
)
|
|
1024
|
+
self.get_status = to_streamed_response_wrapper(
|
|
1025
|
+
certificates.get_status,
|
|
1026
|
+
)
|
|
1027
|
+
self.renew = to_streamed_response_wrapper(
|
|
1028
|
+
certificates.renew,
|
|
1029
|
+
)
|
|
1030
|
+
self.replace = to_streamed_response_wrapper(
|
|
1031
|
+
certificates.replace,
|
|
1032
|
+
)
|
|
1033
|
+
|
|
1034
|
+
|
|
1035
|
+
class AsyncCertificatesResourceWithStreamingResponse:
|
|
1036
|
+
def __init__(self, certificates: AsyncCertificatesResource) -> None:
|
|
1037
|
+
self._certificates = certificates
|
|
1038
|
+
|
|
1039
|
+
self.create = async_to_streamed_response_wrapper(
|
|
1040
|
+
certificates.create,
|
|
1041
|
+
)
|
|
1042
|
+
self.list = async_to_streamed_response_wrapper(
|
|
1043
|
+
certificates.list,
|
|
1044
|
+
)
|
|
1045
|
+
self.delete = async_to_streamed_response_wrapper(
|
|
1046
|
+
certificates.delete,
|
|
1047
|
+
)
|
|
1048
|
+
self.force_retry = async_to_streamed_response_wrapper(
|
|
1049
|
+
certificates.force_retry,
|
|
1050
|
+
)
|
|
1051
|
+
self.get = async_to_streamed_response_wrapper(
|
|
1052
|
+
certificates.get,
|
|
1053
|
+
)
|
|
1054
|
+
self.get_status = async_to_streamed_response_wrapper(
|
|
1055
|
+
certificates.get_status,
|
|
1056
|
+
)
|
|
1057
|
+
self.renew = async_to_streamed_response_wrapper(
|
|
1058
|
+
certificates.renew,
|
|
1059
|
+
)
|
|
1060
|
+
self.replace = async_to_streamed_response_wrapper(
|
|
1061
|
+
certificates.replace,
|
|
1062
|
+
)
|