gcore 0.12.0__py3-none-any.whl → 0.14.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 +270 -52
- 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 +105 -81
- 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 +123 -107
- 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 +247 -189
- 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 +43 -27
- 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 +70 -38
- 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 +1977 -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 +1825 -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 +1803 -0
- gcore/types/cdn/resource_update_params.py +1794 -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 +1695 -0
- gcore/types/cdn/resources/origin_shielding.py +15 -0
- gcore/types/cdn/resources/rule_create_params.py +1652 -0
- gcore/types/cdn/resources/rule_list_response.py +10 -0
- gcore/types/cdn/resources/rule_replace_params.py +1654 -0
- gcore/types/cdn/resources/rule_update_params.py +1654 -0
- gcore/types/cdn/resources/shield_replace_params.py +16 -0
- gcore/types/cdn/rule_template.py +1666 -0
- gcore/types/cdn/rule_template_create_params.py +1636 -0
- gcore/types/cdn/rule_template_list.py +10 -0
- gcore/types/cdn/rule_template_replace_params.py +1636 -0
- gcore/types/cdn/rule_template_update_params.py +1636 -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.py +1 -1
- gcore/types/cloud/floating_ip_detailed.py +1 -1
- gcore/types/cloud/floating_ip_update_params.py +43 -0
- gcore/types/cloud/gpu_baremetal_cluster_action_params.py +46 -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/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/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 +7 -2
- gcore/types/iam/user.py +7 -2
- gcore/types/iam/user_detailed.py +7 -2
- gcore/types/iam/user_invite_params.py +4 -1
- gcore/types/iam/user_update.py +7 -2
- 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/__init__.py +2 -1
- 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/types/waap/ip_info_get_top_urls_response.py +3 -12
- gcore/types/waap/{ip_info_get_ip_info_response.py → waap_ip_info.py} +2 -2
- gcore/types/waap/waap_top_url.py +13 -0
- {gcore-0.12.0.dist-info → gcore-0.14.0.dist-info}/METADATA +1 -1
- {gcore-0.12.0.dist-info → gcore-0.14.0.dist-info}/RECORD +340 -218
- {gcore-0.12.0.dist-info → gcore-0.14.0.dist-info}/WHEEL +0 -0
- {gcore-0.12.0.dist-info → gcore-0.14.0.dist-info}/licenses/LICENSE +0 -0
|
@@ -6,7 +6,7 @@ from typing import Dict, Optional
|
|
|
6
6
|
|
|
7
7
|
import httpx
|
|
8
8
|
|
|
9
|
-
from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven, SequenceNotStr
|
|
9
|
+
from ..._types import NOT_GIVEN, Body, Omit, Query, Headers, NotGiven, SequenceNotStr, omit, not_given
|
|
10
10
|
from ..._utils import maybe_transform, async_maybe_transform
|
|
11
11
|
from ..._compat import cached_property
|
|
12
12
|
from ..._resource import SyncAPIResource, AsyncAPIResource
|
|
@@ -17,16 +17,27 @@ from ..._response import (
|
|
|
17
17
|
async_to_streamed_response_wrapper,
|
|
18
18
|
)
|
|
19
19
|
from ...pagination import SyncOffsetPage, AsyncOffsetPage
|
|
20
|
-
from ...types.cloud import
|
|
20
|
+
from ...types.cloud import (
|
|
21
|
+
floating_ip_list_params,
|
|
22
|
+
floating_ip_assign_params,
|
|
23
|
+
floating_ip_create_params,
|
|
24
|
+
floating_ip_update_params,
|
|
25
|
+
)
|
|
21
26
|
from ..._base_client import AsyncPaginator, make_request_options
|
|
22
27
|
from ...types.cloud.floating_ip import FloatingIP
|
|
23
28
|
from ...types.cloud.task_id_list import TaskIDList
|
|
24
29
|
from ...types.cloud.floating_ip_detailed import FloatingIPDetailed
|
|
30
|
+
from ...types.cloud.tag_update_map_param import TagUpdateMapParam
|
|
25
31
|
|
|
26
32
|
__all__ = ["FloatingIPsResource", "AsyncFloatingIPsResource"]
|
|
27
33
|
|
|
28
34
|
|
|
29
35
|
class FloatingIPsResource(SyncAPIResource):
|
|
36
|
+
"""A floating IP is a static IP address that points to one of your Instances.
|
|
37
|
+
|
|
38
|
+
It allows you to redirect network traffic to any of your Instances in the same datacenter.
|
|
39
|
+
"""
|
|
40
|
+
|
|
30
41
|
@cached_property
|
|
31
42
|
def with_raw_response(self) -> FloatingIPsResourceWithRawResponse:
|
|
32
43
|
"""
|
|
@@ -51,15 +62,15 @@ class FloatingIPsResource(SyncAPIResource):
|
|
|
51
62
|
*,
|
|
52
63
|
project_id: int | None = None,
|
|
53
64
|
region_id: int | None = None,
|
|
54
|
-
fixed_ip_address: Optional[str] |
|
|
55
|
-
port_id: Optional[str] |
|
|
56
|
-
tags: Dict[str, str] |
|
|
65
|
+
fixed_ip_address: Optional[str] | Omit = omit,
|
|
66
|
+
port_id: Optional[str] | Omit = omit,
|
|
67
|
+
tags: Dict[str, str] | Omit = omit,
|
|
57
68
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
58
69
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
59
70
|
extra_headers: Headers | None = None,
|
|
60
71
|
extra_query: Query | None = None,
|
|
61
72
|
extra_body: Body | None = None,
|
|
62
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
73
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
63
74
|
) -> TaskIDList:
|
|
64
75
|
"""
|
|
65
76
|
Create floating IP
|
|
@@ -94,7 +105,9 @@ class FloatingIPsResource(SyncAPIResource):
|
|
|
94
105
|
if region_id is None:
|
|
95
106
|
region_id = self._client._get_cloud_region_id_path_param()
|
|
96
107
|
return self._post(
|
|
97
|
-
f"/cloud/v1/floatingips/{project_id}/{region_id}"
|
|
108
|
+
f"/cloud/v1/floatingips/{project_id}/{region_id}"
|
|
109
|
+
if self._client._base_url_overridden
|
|
110
|
+
else f"https://api.gcore.com//cloud/v1/floatingips/{project_id}/{region_id}",
|
|
98
111
|
body=maybe_transform(
|
|
99
112
|
{
|
|
100
113
|
"fixed_ip_address": fixed_ip_address,
|
|
@@ -109,21 +122,92 @@ class FloatingIPsResource(SyncAPIResource):
|
|
|
109
122
|
cast_to=TaskIDList,
|
|
110
123
|
)
|
|
111
124
|
|
|
125
|
+
def update(
|
|
126
|
+
self,
|
|
127
|
+
floating_ip_id: str,
|
|
128
|
+
*,
|
|
129
|
+
project_id: int | None = None,
|
|
130
|
+
region_id: int | None = None,
|
|
131
|
+
tags: Optional[TagUpdateMapParam] | Omit = omit,
|
|
132
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
133
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
134
|
+
extra_headers: Headers | None = None,
|
|
135
|
+
extra_query: Query | None = None,
|
|
136
|
+
extra_body: Body | None = None,
|
|
137
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
138
|
+
) -> FloatingIP:
|
|
139
|
+
"""
|
|
140
|
+
Update floating IP
|
|
141
|
+
|
|
142
|
+
Args:
|
|
143
|
+
project_id: Project ID
|
|
144
|
+
|
|
145
|
+
region_id: Region ID
|
|
146
|
+
|
|
147
|
+
floating_ip_id: Floating IP ID
|
|
148
|
+
|
|
149
|
+
tags: Update key-value tags using JSON Merge Patch semantics (RFC 7386). Provide
|
|
150
|
+
key-value pairs to add or update tags. Set tag values to `null` to remove tags.
|
|
151
|
+
Unspecified tags remain unchanged. Read-only tags are always preserved and
|
|
152
|
+
cannot be modified.
|
|
153
|
+
|
|
154
|
+
**Examples:**
|
|
155
|
+
|
|
156
|
+
- **Add/update tags:**
|
|
157
|
+
`{'tags': {'environment': 'production', 'team': 'backend'}}` adds new tags or
|
|
158
|
+
updates existing ones.
|
|
159
|
+
- **Delete tags:** `{'tags': {'`old_tag`': null}}` removes specific tags.
|
|
160
|
+
- **Remove all tags:** `{'tags': null}` removes all user-managed tags (read-only
|
|
161
|
+
tags are preserved).
|
|
162
|
+
- **Partial update:** `{'tags': {'environment': 'staging'}}` only updates
|
|
163
|
+
specified tags.
|
|
164
|
+
- **Mixed operations:**
|
|
165
|
+
`{'tags': {'environment': 'production', '`cost_center`': 'engineering', '`deprecated_tag`': null}}`
|
|
166
|
+
adds/updates 'environment' and '`cost_center`' while removing
|
|
167
|
+
'`deprecated_tag`', preserving other existing tags.
|
|
168
|
+
- **Replace all:** first delete existing tags with null values, then add new
|
|
169
|
+
ones in the same request.
|
|
170
|
+
|
|
171
|
+
extra_headers: Send extra headers
|
|
172
|
+
|
|
173
|
+
extra_query: Add additional query parameters to the request
|
|
174
|
+
|
|
175
|
+
extra_body: Add additional JSON properties to the request
|
|
176
|
+
|
|
177
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
178
|
+
"""
|
|
179
|
+
if project_id is None:
|
|
180
|
+
project_id = self._client._get_cloud_project_id_path_param()
|
|
181
|
+
if region_id is None:
|
|
182
|
+
region_id = self._client._get_cloud_region_id_path_param()
|
|
183
|
+
if not floating_ip_id:
|
|
184
|
+
raise ValueError(f"Expected a non-empty value for `floating_ip_id` but received {floating_ip_id!r}")
|
|
185
|
+
return self._patch(
|
|
186
|
+
f"/cloud/v1/floatingips/{project_id}/{region_id}/{floating_ip_id}"
|
|
187
|
+
if self._client._base_url_overridden
|
|
188
|
+
else f"https://api.gcore.com//cloud/v1/floatingips/{project_id}/{region_id}/{floating_ip_id}",
|
|
189
|
+
body=maybe_transform({"tags": tags}, floating_ip_update_params.FloatingIPUpdateParams),
|
|
190
|
+
options=make_request_options(
|
|
191
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
192
|
+
),
|
|
193
|
+
cast_to=FloatingIP,
|
|
194
|
+
)
|
|
195
|
+
|
|
112
196
|
def list(
|
|
113
197
|
self,
|
|
114
198
|
*,
|
|
115
199
|
project_id: int | None = None,
|
|
116
200
|
region_id: int | None = None,
|
|
117
|
-
limit: int |
|
|
118
|
-
offset: int |
|
|
119
|
-
tag_key: SequenceNotStr[str] |
|
|
120
|
-
tag_key_value: str |
|
|
201
|
+
limit: int | Omit = omit,
|
|
202
|
+
offset: int | Omit = omit,
|
|
203
|
+
tag_key: SequenceNotStr[str] | Omit = omit,
|
|
204
|
+
tag_key_value: str | Omit = omit,
|
|
121
205
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
122
206
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
123
207
|
extra_headers: Headers | None = None,
|
|
124
208
|
extra_query: Query | None = None,
|
|
125
209
|
extra_body: Body | None = None,
|
|
126
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
210
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
127
211
|
) -> SyncOffsetPage[FloatingIPDetailed]:
|
|
128
212
|
"""
|
|
129
213
|
List floating IPs
|
|
@@ -155,7 +239,9 @@ class FloatingIPsResource(SyncAPIResource):
|
|
|
155
239
|
if region_id is None:
|
|
156
240
|
region_id = self._client._get_cloud_region_id_path_param()
|
|
157
241
|
return self._get_api_list(
|
|
158
|
-
f"/cloud/v1/floatingips/{project_id}/{region_id}"
|
|
242
|
+
f"/cloud/v1/floatingips/{project_id}/{region_id}"
|
|
243
|
+
if self._client._base_url_overridden
|
|
244
|
+
else f"https://api.gcore.com//cloud/v1/floatingips/{project_id}/{region_id}",
|
|
159
245
|
page=SyncOffsetPage[FloatingIPDetailed],
|
|
160
246
|
options=make_request_options(
|
|
161
247
|
extra_headers=extra_headers,
|
|
@@ -186,12 +272,18 @@ class FloatingIPsResource(SyncAPIResource):
|
|
|
186
272
|
extra_headers: Headers | None = None,
|
|
187
273
|
extra_query: Query | None = None,
|
|
188
274
|
extra_body: Body | None = None,
|
|
189
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
275
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
190
276
|
) -> TaskIDList:
|
|
191
277
|
"""
|
|
192
278
|
Delete floating IP
|
|
193
279
|
|
|
194
280
|
Args:
|
|
281
|
+
project_id: Project ID
|
|
282
|
+
|
|
283
|
+
region_id: Region ID
|
|
284
|
+
|
|
285
|
+
floating_ip_id: Floating IP ID
|
|
286
|
+
|
|
195
287
|
extra_headers: Send extra headers
|
|
196
288
|
|
|
197
289
|
extra_query: Add additional query parameters to the request
|
|
@@ -207,7 +299,9 @@ class FloatingIPsResource(SyncAPIResource):
|
|
|
207
299
|
if not floating_ip_id:
|
|
208
300
|
raise ValueError(f"Expected a non-empty value for `floating_ip_id` but received {floating_ip_id!r}")
|
|
209
301
|
return self._delete(
|
|
210
|
-
f"/cloud/v1/floatingips/{project_id}/{region_id}/{floating_ip_id}"
|
|
302
|
+
f"/cloud/v1/floatingips/{project_id}/{region_id}/{floating_ip_id}"
|
|
303
|
+
if self._client._base_url_overridden
|
|
304
|
+
else f"https://api.gcore.com//cloud/v1/floatingips/{project_id}/{region_id}/{floating_ip_id}",
|
|
211
305
|
options=make_request_options(
|
|
212
306
|
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
213
307
|
),
|
|
@@ -221,13 +315,13 @@ class FloatingIPsResource(SyncAPIResource):
|
|
|
221
315
|
project_id: int | None = None,
|
|
222
316
|
region_id: int | None = None,
|
|
223
317
|
port_id: str,
|
|
224
|
-
fixed_ip_address: Optional[str] |
|
|
318
|
+
fixed_ip_address: Optional[str] | Omit = omit,
|
|
225
319
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
226
320
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
227
321
|
extra_headers: Headers | None = None,
|
|
228
322
|
extra_query: Query | None = None,
|
|
229
323
|
extra_body: Body | None = None,
|
|
230
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
324
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
231
325
|
) -> FloatingIP:
|
|
232
326
|
"""
|
|
233
327
|
Assign floating IP to instance or loadbalancer
|
|
@@ -252,7 +346,9 @@ class FloatingIPsResource(SyncAPIResource):
|
|
|
252
346
|
if not floating_ip_id:
|
|
253
347
|
raise ValueError(f"Expected a non-empty value for `floating_ip_id` but received {floating_ip_id!r}")
|
|
254
348
|
return self._post(
|
|
255
|
-
f"/cloud/v1/floatingips/{project_id}/{region_id}/{floating_ip_id}/assign"
|
|
349
|
+
f"/cloud/v1/floatingips/{project_id}/{region_id}/{floating_ip_id}/assign"
|
|
350
|
+
if self._client._base_url_overridden
|
|
351
|
+
else f"https://api.gcore.com//cloud/v1/floatingips/{project_id}/{region_id}/{floating_ip_id}/assign",
|
|
256
352
|
body=maybe_transform(
|
|
257
353
|
{
|
|
258
354
|
"port_id": port_id,
|
|
@@ -277,12 +373,18 @@ class FloatingIPsResource(SyncAPIResource):
|
|
|
277
373
|
extra_headers: Headers | None = None,
|
|
278
374
|
extra_query: Query | None = None,
|
|
279
375
|
extra_body: Body | None = None,
|
|
280
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
376
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
281
377
|
) -> FloatingIP:
|
|
282
378
|
"""
|
|
283
379
|
Get floating IP
|
|
284
380
|
|
|
285
381
|
Args:
|
|
382
|
+
project_id: Project ID
|
|
383
|
+
|
|
384
|
+
region_id: Region ID
|
|
385
|
+
|
|
386
|
+
floating_ip_id: Floating IP ID
|
|
387
|
+
|
|
286
388
|
extra_headers: Send extra headers
|
|
287
389
|
|
|
288
390
|
extra_query: Add additional query parameters to the request
|
|
@@ -298,7 +400,9 @@ class FloatingIPsResource(SyncAPIResource):
|
|
|
298
400
|
if not floating_ip_id:
|
|
299
401
|
raise ValueError(f"Expected a non-empty value for `floating_ip_id` but received {floating_ip_id!r}")
|
|
300
402
|
return self._get(
|
|
301
|
-
f"/cloud/v1/floatingips/{project_id}/{region_id}/{floating_ip_id}"
|
|
403
|
+
f"/cloud/v1/floatingips/{project_id}/{region_id}/{floating_ip_id}"
|
|
404
|
+
if self._client._base_url_overridden
|
|
405
|
+
else f"https://api.gcore.com//cloud/v1/floatingips/{project_id}/{region_id}/{floating_ip_id}",
|
|
302
406
|
options=make_request_options(
|
|
303
407
|
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
304
408
|
),
|
|
@@ -316,7 +420,7 @@ class FloatingIPsResource(SyncAPIResource):
|
|
|
316
420
|
extra_headers: Headers | None = None,
|
|
317
421
|
extra_query: Query | None = None,
|
|
318
422
|
extra_body: Body | None = None,
|
|
319
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
423
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
320
424
|
) -> FloatingIP:
|
|
321
425
|
"""
|
|
322
426
|
Unassign floating IP
|
|
@@ -337,7 +441,9 @@ class FloatingIPsResource(SyncAPIResource):
|
|
|
337
441
|
if not floating_ip_id:
|
|
338
442
|
raise ValueError(f"Expected a non-empty value for `floating_ip_id` but received {floating_ip_id!r}")
|
|
339
443
|
return self._post(
|
|
340
|
-
f"/cloud/v1/floatingips/{project_id}/{region_id}/{floating_ip_id}/unassign"
|
|
444
|
+
f"/cloud/v1/floatingips/{project_id}/{region_id}/{floating_ip_id}/unassign"
|
|
445
|
+
if self._client._base_url_overridden
|
|
446
|
+
else f"https://api.gcore.com//cloud/v1/floatingips/{project_id}/{region_id}/{floating_ip_id}/unassign",
|
|
341
447
|
options=make_request_options(
|
|
342
448
|
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
343
449
|
),
|
|
@@ -349,10 +455,10 @@ class FloatingIPsResource(SyncAPIResource):
|
|
|
349
455
|
*,
|
|
350
456
|
project_id: int | None = None,
|
|
351
457
|
region_id: int | None = None,
|
|
352
|
-
fixed_ip_address: Optional[str] |
|
|
353
|
-
port_id: Optional[str] |
|
|
354
|
-
tags: Dict[str, str] |
|
|
355
|
-
polling_interval_seconds: int |
|
|
458
|
+
fixed_ip_address: Optional[str] | Omit = omit,
|
|
459
|
+
port_id: Optional[str] | Omit = omit,
|
|
460
|
+
tags: Dict[str, str] | Omit = omit,
|
|
461
|
+
polling_interval_seconds: int | Omit = omit,
|
|
356
462
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
357
463
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
358
464
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
@@ -400,7 +506,7 @@ class FloatingIPsResource(SyncAPIResource):
|
|
|
400
506
|
*,
|
|
401
507
|
project_id: int | None = None,
|
|
402
508
|
region_id: int | None = None,
|
|
403
|
-
polling_interval_seconds: int |
|
|
509
|
+
polling_interval_seconds: int | Omit = omit,
|
|
404
510
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
405
511
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
406
512
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
@@ -430,6 +536,11 @@ class FloatingIPsResource(SyncAPIResource):
|
|
|
430
536
|
|
|
431
537
|
|
|
432
538
|
class AsyncFloatingIPsResource(AsyncAPIResource):
|
|
539
|
+
"""A floating IP is a static IP address that points to one of your Instances.
|
|
540
|
+
|
|
541
|
+
It allows you to redirect network traffic to any of your Instances in the same datacenter.
|
|
542
|
+
"""
|
|
543
|
+
|
|
433
544
|
@cached_property
|
|
434
545
|
def with_raw_response(self) -> AsyncFloatingIPsResourceWithRawResponse:
|
|
435
546
|
"""
|
|
@@ -454,15 +565,15 @@ class AsyncFloatingIPsResource(AsyncAPIResource):
|
|
|
454
565
|
*,
|
|
455
566
|
project_id: int | None = None,
|
|
456
567
|
region_id: int | None = None,
|
|
457
|
-
fixed_ip_address: Optional[str] |
|
|
458
|
-
port_id: Optional[str] |
|
|
459
|
-
tags: Dict[str, str] |
|
|
568
|
+
fixed_ip_address: Optional[str] | Omit = omit,
|
|
569
|
+
port_id: Optional[str] | Omit = omit,
|
|
570
|
+
tags: Dict[str, str] | Omit = omit,
|
|
460
571
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
461
572
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
462
573
|
extra_headers: Headers | None = None,
|
|
463
574
|
extra_query: Query | None = None,
|
|
464
575
|
extra_body: Body | None = None,
|
|
465
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
576
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
466
577
|
) -> TaskIDList:
|
|
467
578
|
"""
|
|
468
579
|
Create floating IP
|
|
@@ -497,7 +608,9 @@ class AsyncFloatingIPsResource(AsyncAPIResource):
|
|
|
497
608
|
if region_id is None:
|
|
498
609
|
region_id = self._client._get_cloud_region_id_path_param()
|
|
499
610
|
return await self._post(
|
|
500
|
-
f"/cloud/v1/floatingips/{project_id}/{region_id}"
|
|
611
|
+
f"/cloud/v1/floatingips/{project_id}/{region_id}"
|
|
612
|
+
if self._client._base_url_overridden
|
|
613
|
+
else f"https://api.gcore.com//cloud/v1/floatingips/{project_id}/{region_id}",
|
|
501
614
|
body=await async_maybe_transform(
|
|
502
615
|
{
|
|
503
616
|
"fixed_ip_address": fixed_ip_address,
|
|
@@ -512,21 +625,92 @@ class AsyncFloatingIPsResource(AsyncAPIResource):
|
|
|
512
625
|
cast_to=TaskIDList,
|
|
513
626
|
)
|
|
514
627
|
|
|
628
|
+
async def update(
|
|
629
|
+
self,
|
|
630
|
+
floating_ip_id: str,
|
|
631
|
+
*,
|
|
632
|
+
project_id: int | None = None,
|
|
633
|
+
region_id: int | None = None,
|
|
634
|
+
tags: Optional[TagUpdateMapParam] | Omit = omit,
|
|
635
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
636
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
637
|
+
extra_headers: Headers | None = None,
|
|
638
|
+
extra_query: Query | None = None,
|
|
639
|
+
extra_body: Body | None = None,
|
|
640
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
641
|
+
) -> FloatingIP:
|
|
642
|
+
"""
|
|
643
|
+
Update floating IP
|
|
644
|
+
|
|
645
|
+
Args:
|
|
646
|
+
project_id: Project ID
|
|
647
|
+
|
|
648
|
+
region_id: Region ID
|
|
649
|
+
|
|
650
|
+
floating_ip_id: Floating IP ID
|
|
651
|
+
|
|
652
|
+
tags: Update key-value tags using JSON Merge Patch semantics (RFC 7386). Provide
|
|
653
|
+
key-value pairs to add or update tags. Set tag values to `null` to remove tags.
|
|
654
|
+
Unspecified tags remain unchanged. Read-only tags are always preserved and
|
|
655
|
+
cannot be modified.
|
|
656
|
+
|
|
657
|
+
**Examples:**
|
|
658
|
+
|
|
659
|
+
- **Add/update tags:**
|
|
660
|
+
`{'tags': {'environment': 'production', 'team': 'backend'}}` adds new tags or
|
|
661
|
+
updates existing ones.
|
|
662
|
+
- **Delete tags:** `{'tags': {'`old_tag`': null}}` removes specific tags.
|
|
663
|
+
- **Remove all tags:** `{'tags': null}` removes all user-managed tags (read-only
|
|
664
|
+
tags are preserved).
|
|
665
|
+
- **Partial update:** `{'tags': {'environment': 'staging'}}` only updates
|
|
666
|
+
specified tags.
|
|
667
|
+
- **Mixed operations:**
|
|
668
|
+
`{'tags': {'environment': 'production', '`cost_center`': 'engineering', '`deprecated_tag`': null}}`
|
|
669
|
+
adds/updates 'environment' and '`cost_center`' while removing
|
|
670
|
+
'`deprecated_tag`', preserving other existing tags.
|
|
671
|
+
- **Replace all:** first delete existing tags with null values, then add new
|
|
672
|
+
ones in the same request.
|
|
673
|
+
|
|
674
|
+
extra_headers: Send extra headers
|
|
675
|
+
|
|
676
|
+
extra_query: Add additional query parameters to the request
|
|
677
|
+
|
|
678
|
+
extra_body: Add additional JSON properties to the request
|
|
679
|
+
|
|
680
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
681
|
+
"""
|
|
682
|
+
if project_id is None:
|
|
683
|
+
project_id = self._client._get_cloud_project_id_path_param()
|
|
684
|
+
if region_id is None:
|
|
685
|
+
region_id = self._client._get_cloud_region_id_path_param()
|
|
686
|
+
if not floating_ip_id:
|
|
687
|
+
raise ValueError(f"Expected a non-empty value for `floating_ip_id` but received {floating_ip_id!r}")
|
|
688
|
+
return await self._patch(
|
|
689
|
+
f"/cloud/v1/floatingips/{project_id}/{region_id}/{floating_ip_id}"
|
|
690
|
+
if self._client._base_url_overridden
|
|
691
|
+
else f"https://api.gcore.com//cloud/v1/floatingips/{project_id}/{region_id}/{floating_ip_id}",
|
|
692
|
+
body=await async_maybe_transform({"tags": tags}, floating_ip_update_params.FloatingIPUpdateParams),
|
|
693
|
+
options=make_request_options(
|
|
694
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
695
|
+
),
|
|
696
|
+
cast_to=FloatingIP,
|
|
697
|
+
)
|
|
698
|
+
|
|
515
699
|
def list(
|
|
516
700
|
self,
|
|
517
701
|
*,
|
|
518
702
|
project_id: int | None = None,
|
|
519
703
|
region_id: int | None = None,
|
|
520
|
-
limit: int |
|
|
521
|
-
offset: int |
|
|
522
|
-
tag_key: SequenceNotStr[str] |
|
|
523
|
-
tag_key_value: str |
|
|
704
|
+
limit: int | Omit = omit,
|
|
705
|
+
offset: int | Omit = omit,
|
|
706
|
+
tag_key: SequenceNotStr[str] | Omit = omit,
|
|
707
|
+
tag_key_value: str | Omit = omit,
|
|
524
708
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
525
709
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
526
710
|
extra_headers: Headers | None = None,
|
|
527
711
|
extra_query: Query | None = None,
|
|
528
712
|
extra_body: Body | None = None,
|
|
529
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
713
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
530
714
|
) -> AsyncPaginator[FloatingIPDetailed, AsyncOffsetPage[FloatingIPDetailed]]:
|
|
531
715
|
"""
|
|
532
716
|
List floating IPs
|
|
@@ -558,7 +742,9 @@ class AsyncFloatingIPsResource(AsyncAPIResource):
|
|
|
558
742
|
if region_id is None:
|
|
559
743
|
region_id = self._client._get_cloud_region_id_path_param()
|
|
560
744
|
return self._get_api_list(
|
|
561
|
-
f"/cloud/v1/floatingips/{project_id}/{region_id}"
|
|
745
|
+
f"/cloud/v1/floatingips/{project_id}/{region_id}"
|
|
746
|
+
if self._client._base_url_overridden
|
|
747
|
+
else f"https://api.gcore.com//cloud/v1/floatingips/{project_id}/{region_id}",
|
|
562
748
|
page=AsyncOffsetPage[FloatingIPDetailed],
|
|
563
749
|
options=make_request_options(
|
|
564
750
|
extra_headers=extra_headers,
|
|
@@ -589,12 +775,18 @@ class AsyncFloatingIPsResource(AsyncAPIResource):
|
|
|
589
775
|
extra_headers: Headers | None = None,
|
|
590
776
|
extra_query: Query | None = None,
|
|
591
777
|
extra_body: Body | None = None,
|
|
592
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
778
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
593
779
|
) -> TaskIDList:
|
|
594
780
|
"""
|
|
595
781
|
Delete floating IP
|
|
596
782
|
|
|
597
783
|
Args:
|
|
784
|
+
project_id: Project ID
|
|
785
|
+
|
|
786
|
+
region_id: Region ID
|
|
787
|
+
|
|
788
|
+
floating_ip_id: Floating IP ID
|
|
789
|
+
|
|
598
790
|
extra_headers: Send extra headers
|
|
599
791
|
|
|
600
792
|
extra_query: Add additional query parameters to the request
|
|
@@ -610,7 +802,9 @@ class AsyncFloatingIPsResource(AsyncAPIResource):
|
|
|
610
802
|
if not floating_ip_id:
|
|
611
803
|
raise ValueError(f"Expected a non-empty value for `floating_ip_id` but received {floating_ip_id!r}")
|
|
612
804
|
return await self._delete(
|
|
613
|
-
f"/cloud/v1/floatingips/{project_id}/{region_id}/{floating_ip_id}"
|
|
805
|
+
f"/cloud/v1/floatingips/{project_id}/{region_id}/{floating_ip_id}"
|
|
806
|
+
if self._client._base_url_overridden
|
|
807
|
+
else f"https://api.gcore.com//cloud/v1/floatingips/{project_id}/{region_id}/{floating_ip_id}",
|
|
614
808
|
options=make_request_options(
|
|
615
809
|
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
616
810
|
),
|
|
@@ -624,13 +818,13 @@ class AsyncFloatingIPsResource(AsyncAPIResource):
|
|
|
624
818
|
project_id: int | None = None,
|
|
625
819
|
region_id: int | None = None,
|
|
626
820
|
port_id: str,
|
|
627
|
-
fixed_ip_address: Optional[str] |
|
|
821
|
+
fixed_ip_address: Optional[str] | Omit = omit,
|
|
628
822
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
629
823
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
630
824
|
extra_headers: Headers | None = None,
|
|
631
825
|
extra_query: Query | None = None,
|
|
632
826
|
extra_body: Body | None = None,
|
|
633
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
827
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
634
828
|
) -> FloatingIP:
|
|
635
829
|
"""
|
|
636
830
|
Assign floating IP to instance or loadbalancer
|
|
@@ -655,7 +849,9 @@ class AsyncFloatingIPsResource(AsyncAPIResource):
|
|
|
655
849
|
if not floating_ip_id:
|
|
656
850
|
raise ValueError(f"Expected a non-empty value for `floating_ip_id` but received {floating_ip_id!r}")
|
|
657
851
|
return await self._post(
|
|
658
|
-
f"/cloud/v1/floatingips/{project_id}/{region_id}/{floating_ip_id}/assign"
|
|
852
|
+
f"/cloud/v1/floatingips/{project_id}/{region_id}/{floating_ip_id}/assign"
|
|
853
|
+
if self._client._base_url_overridden
|
|
854
|
+
else f"https://api.gcore.com//cloud/v1/floatingips/{project_id}/{region_id}/{floating_ip_id}/assign",
|
|
659
855
|
body=await async_maybe_transform(
|
|
660
856
|
{
|
|
661
857
|
"port_id": port_id,
|
|
@@ -680,12 +876,18 @@ class AsyncFloatingIPsResource(AsyncAPIResource):
|
|
|
680
876
|
extra_headers: Headers | None = None,
|
|
681
877
|
extra_query: Query | None = None,
|
|
682
878
|
extra_body: Body | None = None,
|
|
683
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
879
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
684
880
|
) -> FloatingIP:
|
|
685
881
|
"""
|
|
686
882
|
Get floating IP
|
|
687
883
|
|
|
688
884
|
Args:
|
|
885
|
+
project_id: Project ID
|
|
886
|
+
|
|
887
|
+
region_id: Region ID
|
|
888
|
+
|
|
889
|
+
floating_ip_id: Floating IP ID
|
|
890
|
+
|
|
689
891
|
extra_headers: Send extra headers
|
|
690
892
|
|
|
691
893
|
extra_query: Add additional query parameters to the request
|
|
@@ -701,7 +903,9 @@ class AsyncFloatingIPsResource(AsyncAPIResource):
|
|
|
701
903
|
if not floating_ip_id:
|
|
702
904
|
raise ValueError(f"Expected a non-empty value for `floating_ip_id` but received {floating_ip_id!r}")
|
|
703
905
|
return await self._get(
|
|
704
|
-
f"/cloud/v1/floatingips/{project_id}/{region_id}/{floating_ip_id}"
|
|
906
|
+
f"/cloud/v1/floatingips/{project_id}/{region_id}/{floating_ip_id}"
|
|
907
|
+
if self._client._base_url_overridden
|
|
908
|
+
else f"https://api.gcore.com//cloud/v1/floatingips/{project_id}/{region_id}/{floating_ip_id}",
|
|
705
909
|
options=make_request_options(
|
|
706
910
|
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
707
911
|
),
|
|
@@ -719,7 +923,7 @@ class AsyncFloatingIPsResource(AsyncAPIResource):
|
|
|
719
923
|
extra_headers: Headers | None = None,
|
|
720
924
|
extra_query: Query | None = None,
|
|
721
925
|
extra_body: Body | None = None,
|
|
722
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
926
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
723
927
|
) -> FloatingIP:
|
|
724
928
|
"""
|
|
725
929
|
Unassign floating IP
|
|
@@ -740,7 +944,9 @@ class AsyncFloatingIPsResource(AsyncAPIResource):
|
|
|
740
944
|
if not floating_ip_id:
|
|
741
945
|
raise ValueError(f"Expected a non-empty value for `floating_ip_id` but received {floating_ip_id!r}")
|
|
742
946
|
return await self._post(
|
|
743
|
-
f"/cloud/v1/floatingips/{project_id}/{region_id}/{floating_ip_id}/unassign"
|
|
947
|
+
f"/cloud/v1/floatingips/{project_id}/{region_id}/{floating_ip_id}/unassign"
|
|
948
|
+
if self._client._base_url_overridden
|
|
949
|
+
else f"https://api.gcore.com//cloud/v1/floatingips/{project_id}/{region_id}/{floating_ip_id}/unassign",
|
|
744
950
|
options=make_request_options(
|
|
745
951
|
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
746
952
|
),
|
|
@@ -752,10 +958,10 @@ class AsyncFloatingIPsResource(AsyncAPIResource):
|
|
|
752
958
|
*,
|
|
753
959
|
project_id: int | None = None,
|
|
754
960
|
region_id: int | None = None,
|
|
755
|
-
fixed_ip_address: Optional[str] |
|
|
756
|
-
port_id: Optional[str] |
|
|
757
|
-
tags: Dict[str, str] |
|
|
758
|
-
polling_interval_seconds: int |
|
|
961
|
+
fixed_ip_address: Optional[str] | Omit = omit,
|
|
962
|
+
port_id: Optional[str] | Omit = omit,
|
|
963
|
+
tags: Dict[str, str] | Omit = omit,
|
|
964
|
+
polling_interval_seconds: int | Omit = omit,
|
|
759
965
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
760
966
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
761
967
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
@@ -803,7 +1009,7 @@ class AsyncFloatingIPsResource(AsyncAPIResource):
|
|
|
803
1009
|
*,
|
|
804
1010
|
project_id: int | None = None,
|
|
805
1011
|
region_id: int | None = None,
|
|
806
|
-
polling_interval_seconds: int |
|
|
1012
|
+
polling_interval_seconds: int | Omit = omit,
|
|
807
1013
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
808
1014
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
809
1015
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
@@ -839,6 +1045,9 @@ class FloatingIPsResourceWithRawResponse:
|
|
|
839
1045
|
self.create = to_raw_response_wrapper(
|
|
840
1046
|
floating_ips.create,
|
|
841
1047
|
)
|
|
1048
|
+
self.update = to_raw_response_wrapper(
|
|
1049
|
+
floating_ips.update,
|
|
1050
|
+
)
|
|
842
1051
|
self.list = to_raw_response_wrapper(
|
|
843
1052
|
floating_ips.list,
|
|
844
1053
|
)
|
|
@@ -869,6 +1078,9 @@ class AsyncFloatingIPsResourceWithRawResponse:
|
|
|
869
1078
|
self.create = async_to_raw_response_wrapper(
|
|
870
1079
|
floating_ips.create,
|
|
871
1080
|
)
|
|
1081
|
+
self.update = async_to_raw_response_wrapper(
|
|
1082
|
+
floating_ips.update,
|
|
1083
|
+
)
|
|
872
1084
|
self.list = async_to_raw_response_wrapper(
|
|
873
1085
|
floating_ips.list,
|
|
874
1086
|
)
|
|
@@ -899,6 +1111,9 @@ class FloatingIPsResourceWithStreamingResponse:
|
|
|
899
1111
|
self.create = to_streamed_response_wrapper(
|
|
900
1112
|
floating_ips.create,
|
|
901
1113
|
)
|
|
1114
|
+
self.update = to_streamed_response_wrapper(
|
|
1115
|
+
floating_ips.update,
|
|
1116
|
+
)
|
|
902
1117
|
self.list = to_streamed_response_wrapper(
|
|
903
1118
|
floating_ips.list,
|
|
904
1119
|
)
|
|
@@ -929,6 +1144,9 @@ class AsyncFloatingIPsResourceWithStreamingResponse:
|
|
|
929
1144
|
self.create = async_to_streamed_response_wrapper(
|
|
930
1145
|
floating_ips.create,
|
|
931
1146
|
)
|
|
1147
|
+
self.update = async_to_streamed_response_wrapper(
|
|
1148
|
+
floating_ips.update,
|
|
1149
|
+
)
|
|
932
1150
|
self.list = async_to_streamed_response_wrapper(
|
|
933
1151
|
floating_ips.list,
|
|
934
1152
|
)
|