gcore 0.3.0__py3-none-any.whl → 0.5.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 +2 -1
- gcore/_base_client.py +31 -2
- gcore/_client.py +18 -0
- gcore/_constants.py +2 -2
- gcore/_models.py +8 -5
- gcore/_version.py +1 -1
- gcore/pagination.py +252 -1
- gcore/resources/__init__.py +28 -0
- gcore/resources/cloud/baremetal/flavors.py +11 -137
- gcore/resources/cloud/baremetal/images.py +10 -12
- gcore/resources/cloud/baremetal/servers.py +33 -30
- gcore/resources/cloud/billing_reservations.py +2 -2
- gcore/resources/cloud/file_shares/file_shares.py +7 -8
- gcore/resources/cloud/floating_ips.py +7 -12
- gcore/resources/cloud/gpu_baremetal_clusters/gpu_baremetal_clusters.py +33 -22
- gcore/resources/cloud/gpu_baremetal_clusters/images.py +9 -10
- gcore/resources/cloud/gpu_baremetal_clusters/interfaces.py +2 -2
- gcore/resources/cloud/gpu_baremetal_clusters/servers.py +8 -4
- gcore/resources/cloud/inference/deployments/deployments.py +76 -35
- gcore/resources/cloud/inference/deployments/logs.py +7 -7
- gcore/resources/cloud/inference/inference.py +5 -5
- gcore/resources/cloud/inference/models.py +16 -15
- gcore/resources/cloud/inference/registry_credentials.py +18 -18
- gcore/resources/cloud/inference/secrets.py +12 -13
- gcore/resources/cloud/instances/flavors.py +9 -233
- gcore/resources/cloud/instances/images.py +47 -37
- gcore/resources/cloud/instances/instances.py +49 -34
- gcore/resources/cloud/instances/interfaces.py +2 -2
- gcore/resources/cloud/ip_ranges.py +34 -2
- gcore/resources/cloud/load_balancers/l7_policies/l7_policies.py +10 -2
- gcore/resources/cloud/load_balancers/listeners.py +17 -8
- gcore/resources/cloud/load_balancers/load_balancers.py +73 -21
- gcore/resources/cloud/load_balancers/metrics.py +2 -2
- gcore/resources/cloud/load_balancers/pools/health_monitors.py +2 -2
- gcore/resources/cloud/load_balancers/pools/members.py +6 -2
- gcore/resources/cloud/networks/networks.py +81 -17
- gcore/resources/cloud/networks/routers.py +18 -18
- gcore/resources/cloud/networks/subnets.py +51 -11
- gcore/resources/cloud/projects.py +38 -24
- gcore/resources/cloud/quotas/quotas.py +6 -6
- gcore/resources/cloud/quotas/requests.py +8 -8
- gcore/resources/cloud/registries/artifacts.py +4 -4
- gcore/resources/cloud/registries/registries.py +14 -16
- gcore/resources/cloud/registries/repositories.py +4 -4
- gcore/resources/cloud/registries/tags.py +2 -2
- gcore/resources/cloud/registries/users.py +21 -22
- gcore/resources/cloud/reserved_fixed_ips/reserved_fixed_ips.py +20 -20
- gcore/resources/cloud/reserved_fixed_ips/vip.py +10 -10
- gcore/resources/cloud/secrets.py +14 -224
- gcore/resources/cloud/security_groups/rules.py +6 -6
- gcore/resources/cloud/security_groups/security_groups.py +70 -31
- gcore/resources/cloud/tasks.py +34 -32
- gcore/resources/cloud/users/role_assignments.py +12 -14
- gcore/resources/cloud/volumes.py +139 -49
- gcore/resources/fastedge/__init__.py +103 -0
- gcore/resources/fastedge/apps/__init__.py +33 -0
- gcore/resources/fastedge/apps/apps.py +932 -0
- gcore/resources/fastedge/apps/logs.py +248 -0
- gcore/resources/fastedge/binaries.py +286 -0
- gcore/resources/fastedge/fastedge.py +327 -0
- gcore/resources/fastedge/kv_stores.py +523 -0
- gcore/resources/fastedge/secrets.py +687 -0
- gcore/resources/fastedge/statistics.py +347 -0
- gcore/resources/fastedge/templates.py +652 -0
- gcore/resources/iam/__init__.py +47 -0
- gcore/resources/iam/api_tokens.py +521 -0
- gcore/resources/iam/iam.py +199 -0
- gcore/resources/iam/users.py +642 -0
- gcore/resources/waap/__init__.py +0 -14
- gcore/resources/waap/waap.py +0 -32
- gcore/types/cloud/__init__.py +2 -28
- gcore/types/cloud/baremetal/__init__.py +0 -1
- gcore/types/cloud/baremetal/image_list_params.py +1 -5
- gcore/types/cloud/baremetal/server_create_params.py +5 -9
- gcore/types/cloud/baremetal/server_list_params.py +1 -5
- gcore/types/cloud/ddos_profile.py +9 -3
- gcore/types/cloud/file_share_create_params.py +3 -5
- gcore/types/cloud/floating_ip_create_params.py +2 -4
- gcore/types/cloud/floating_ip_list_params.py +1 -5
- gcore/types/cloud/gpu_baremetal_cluster_create_params.py +3 -4
- gcore/types/cloud/gpu_baremetal_clusters/image_upload_params.py +2 -4
- gcore/types/cloud/health_monitor.py +6 -1
- gcore/types/cloud/inference/__init__.py +12 -8
- gcore/types/cloud/inference/deployment_create_params.py +224 -7
- gcore/types/cloud/inference/deployment_update_params.py +24 -3
- gcore/types/cloud/inference/deployments/__init__.py +1 -0
- gcore/types/cloud/inference/{inference_log.py → deployments/inference_deployment_log.py} +3 -3
- gcore/types/cloud/inference/inference_deployment.py +266 -0
- gcore/types/cloud/inference/{inference_apikey_secret.py → inference_deployment_api_key.py} +2 -2
- gcore/types/cloud/inference/{mlcatalog_model_card.py → inference_model.py} +2 -2
- gcore/types/cloud/inference/{inference_registry_credential.py → inference_registry_credentials.py} +2 -2
- gcore/types/cloud/inference/{inference_registry_credential_full.py → inference_registry_credentials_create.py} +2 -2
- gcore/types/cloud/inference/inference_secret.py +10 -3
- gcore/types/cloud/inference/model_list_params.py +2 -4
- gcore/types/cloud/{container_probe.py → inference/probe.py} +9 -9
- gcore/types/cloud/{container_probe_config.py → inference/probe_config.py} +5 -5
- gcore/types/cloud/{container_probe_exec.py → inference/probe_exec.py} +3 -3
- gcore/types/cloud/{container_probe_http_get.py → inference/probe_http_get.py} +3 -3
- gcore/types/cloud/{container_probe_tcp_socket.py → inference/probe_tcp_socket.py} +3 -3
- gcore/types/cloud/inference/secret_create_params.py +10 -4
- gcore/types/cloud/inference/secret_replace_params.py +10 -4
- gcore/types/cloud/{region_capacity.py → inference_region_capacity.py} +10 -3
- gcore/types/cloud/{region_capacity_list.py → inference_region_capacity_list.py} +4 -4
- gcore/types/cloud/instance_create_params.py +8 -9
- gcore/types/cloud/instance_list_params.py +1 -5
- gcore/types/cloud/instances/__init__.py +0 -2
- gcore/types/cloud/instances/image_create_from_volume_params.py +2 -4
- gcore/types/cloud/instances/image_list_params.py +1 -5
- gcore/types/cloud/instances/image_upload_params.py +2 -4
- gcore/types/cloud/load_balancer_create_params.py +8 -4
- gcore/types/cloud/load_balancer_list_params.py +1 -5
- gcore/types/cloud/load_balancer_update_params.py +24 -0
- gcore/types/cloud/load_balancers/pool_create_params.py +6 -1
- gcore/types/cloud/load_balancers/pool_update_params.py +6 -1
- gcore/types/cloud/load_balancers/pools/member_add_params.py +6 -1
- gcore/types/cloud/member.py +6 -1
- gcore/types/cloud/network_create_params.py +2 -3
- gcore/types/cloud/network_list_params.py +4 -5
- gcore/types/cloud/network_update_params.py +28 -2
- gcore/types/cloud/networks/router_list_params.py +2 -2
- gcore/types/cloud/networks/subnet_create_params.py +2 -3
- gcore/types/cloud/networks/subnet_list_params.py +1 -5
- gcore/types/cloud/networks/subnet_update_params.py +25 -0
- gcore/types/cloud/registries/__init__.py +1 -0
- gcore/types/cloud/registries/user_refresh_secret_response.py +31 -0
- gcore/types/cloud/reserved_fixed_ip_list_params.py +2 -2
- gcore/types/cloud/security_group_list_params.py +3 -7
- gcore/types/cloud/security_group_update_params.py +25 -0
- gcore/types/cloud/tag_update_map_param.py +2 -2
- gcore/types/cloud/task_list_params.py +15 -14
- gcore/types/cloud/volume_list_params.py +1 -5
- gcore/types/cloud/volume_update_params.py +29 -3
- gcore/types/fastedge/__init__.py +48 -0
- gcore/types/fastedge/app.py +81 -0
- gcore/types/fastedge/app_create_params.py +56 -0
- gcore/types/fastedge/app_list_params.py +50 -0
- gcore/types/fastedge/app_param.py +56 -0
- gcore/types/fastedge/app_replace_params.py +17 -0
- gcore/types/fastedge/app_short.py +60 -0
- gcore/types/fastedge/app_update_params.py +56 -0
- gcore/types/fastedge/apps/__init__.py +6 -0
- gcore/types/fastedge/apps/log.py +28 -0
- gcore/types/fastedge/apps/log_list_params.py +37 -0
- gcore/types/fastedge/binary.py +40 -0
- gcore/types/fastedge/binary_list_response.py +12 -0
- gcore/types/fastedge/binary_short.py +32 -0
- gcore/types/fastedge/call_status.py +24 -0
- gcore/types/fastedge/client.py +57 -0
- gcore/types/fastedge/duration_stats.py +30 -0
- gcore/types/fastedge/kv_store.py +33 -0
- gcore/types/fastedge/kv_store_create_params.py +23 -0
- gcore/types/fastedge/kv_store_get_response.py +10 -0
- gcore/types/fastedge/kv_store_list_params.py +12 -0
- gcore/types/fastedge/kv_store_list_response.py +15 -0
- gcore/types/fastedge/kv_store_replace_params.py +23 -0
- gcore/types/fastedge/kv_store_short.py +19 -0
- gcore/types/fastedge/kv_store_stats.py +26 -0
- gcore/types/fastedge/secret.py +29 -0
- gcore/types/fastedge/secret_create_params.py +27 -0
- gcore/types/fastedge/secret_create_response.py +12 -0
- gcore/types/fastedge/secret_delete_params.py +12 -0
- gcore/types/fastedge/secret_list_params.py +15 -0
- gcore/types/{cloud → fastedge}/secret_list_response.py +2 -6
- gcore/types/fastedge/secret_replace_params.py +27 -0
- gcore/types/fastedge/secret_short.py +21 -0
- gcore/types/fastedge/secret_update_params.py +27 -0
- gcore/types/fastedge/statistic_get_call_series_params.py +28 -0
- gcore/types/fastedge/statistic_get_call_series_response.py +12 -0
- gcore/types/fastedge/statistic_get_duration_series_params.py +28 -0
- gcore/types/fastedge/statistic_get_duration_series_response.py +12 -0
- gcore/types/fastedge/template.py +31 -0
- gcore/types/fastedge/template_create_params.py +30 -0
- gcore/types/fastedge/template_delete_params.py +12 -0
- gcore/types/fastedge/template_list_params.py +25 -0
- gcore/types/fastedge/template_parameter.py +22 -0
- gcore/types/fastedge/template_parameter_param.py +21 -0
- gcore/types/fastedge/template_replace_params.py +30 -0
- gcore/types/fastedge/template_short.py +27 -0
- gcore/types/iam/__init__.py +17 -0
- gcore/types/iam/account_overview.py +488 -0
- gcore/types/iam/api_token.py +78 -0
- gcore/types/iam/api_token_create.py +15 -0
- gcore/types/iam/api_token_create_params.py +42 -0
- gcore/types/iam/api_token_list.py +81 -0
- gcore/types/iam/api_token_list_params.py +41 -0
- gcore/types/iam/user.py +86 -0
- gcore/types/iam/user_detailed.py +104 -0
- gcore/types/iam/user_invite.py +15 -0
- gcore/types/iam/user_invite_params.py +37 -0
- gcore/types/iam/user_list_params.py +15 -0
- gcore/types/iam/user_update.py +104 -0
- gcore/types/iam/user_update_params.py +52 -0
- gcore/types/waap/__init__.py +0 -1
- gcore/types/waap/domains/custom_rule_create_params.py +7 -3
- gcore/types/waap/domains/custom_rule_update_params.py +7 -3
- gcore/types/waap/waap_custom_rule.py +7 -3
- {gcore-0.3.0.dist-info → gcore-0.5.0.dist-info}/METADATA +44 -5
- {gcore-0.3.0.dist-info → gcore-0.5.0.dist-info}/RECORD +200 -151
- gcore/resources/waap/clients.py +0 -135
- gcore/types/cloud/aws_iam_data.py +0 -13
- gcore/types/cloud/aws_iam_data_param.py +0 -15
- gcore/types/cloud/baremetal/flavor_list_suitable_params.py +0 -22
- gcore/types/cloud/capacity.py +0 -13
- gcore/types/cloud/container_probe_config_create_param.py +0 -17
- gcore/types/cloud/container_probe_create_param.py +0 -38
- gcore/types/cloud/container_probe_exec_create_param.py +0 -13
- gcore/types/cloud/container_probe_http_get_create_param.py +0 -25
- gcore/types/cloud/container_probe_tcp_socket_create_param.py +0 -12
- gcore/types/cloud/container_scale.py +0 -25
- gcore/types/cloud/container_scale_trigger_rate.py +0 -13
- gcore/types/cloud/container_scale_trigger_sqs.py +0 -33
- gcore/types/cloud/container_scale_trigger_threshold.py +0 -10
- gcore/types/cloud/container_scale_triggers.py +0 -36
- gcore/types/cloud/deploy_status.py +0 -13
- gcore/types/cloud/inference/container.py +0 -26
- gcore/types/cloud/inference/inference.py +0 -95
- gcore/types/cloud/inference/mlcatalog_order_by_choices.py +0 -7
- gcore/types/cloud/inference_probes.py +0 -19
- gcore/types/cloud/ingress_opts_out.py +0 -16
- gcore/types/cloud/ingress_opts_param.py +0 -18
- gcore/types/cloud/instances/flavor_list_for_resize_params.py +0 -16
- gcore/types/cloud/instances/flavor_list_suitable_params.py +0 -59
- gcore/types/cloud/secret_create_params.py +0 -66
- gcore/types/waap/client_me_response.py +0 -34
- {gcore-0.3.0.dist-info → gcore-0.5.0.dist-info}/WHEEL +0 -0
- {gcore-0.3.0.dist-info → gcore-0.5.0.dist-info}/licenses/LICENSE +0 -0
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
|
|
5
|
-
from typing import List, Optional
|
|
5
|
+
from typing import Dict, List, Optional
|
|
6
6
|
from typing_extensions import Literal
|
|
7
7
|
|
|
8
8
|
import httpx
|
|
@@ -74,7 +74,7 @@ class ImagesResource(SyncAPIResource):
|
|
|
74
74
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
75
75
|
) -> Image:
|
|
76
76
|
"""
|
|
77
|
-
Update image
|
|
77
|
+
Update image properties and tags.
|
|
78
78
|
|
|
79
79
|
Args:
|
|
80
80
|
hw_firmware_type: Specifies the type of firmware with which to boot the guest.
|
|
@@ -146,10 +146,11 @@ class ImagesResource(SyncAPIResource):
|
|
|
146
146
|
extra_body: Body | None = None,
|
|
147
147
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
148
148
|
) -> ImageList:
|
|
149
|
-
"""Retrieve
|
|
149
|
+
"""Retrieve a list of available images in the project and region.
|
|
150
150
|
|
|
151
|
-
|
|
152
|
-
|
|
151
|
+
The list can be
|
|
152
|
+
filtered by visibility, tags, and other parameters. Returned entities are owned
|
|
153
|
+
by the project or are public/shared with the client.
|
|
153
154
|
|
|
154
155
|
Args:
|
|
155
156
|
include_prices: Show price
|
|
@@ -158,9 +159,7 @@ class ImagesResource(SyncAPIResource):
|
|
|
158
159
|
|
|
159
160
|
tag_key: Filter by tag keys.
|
|
160
161
|
|
|
161
|
-
tag_key_value: Filter by tag key-value pairs. Must be a valid JSON string.
|
|
162
|
-
--data-urlencode '`tag_key_value`={"key": "value"}' --url
|
|
163
|
-
'http://localhost:1111/v1/images/1/1'"
|
|
162
|
+
tag_key_value: Filter by tag key-value pairs. Must be a valid JSON string.
|
|
164
163
|
|
|
165
164
|
visibility: Image visibility. Globally visible images are public
|
|
166
165
|
|
|
@@ -210,8 +209,10 @@ class ImagesResource(SyncAPIResource):
|
|
|
210
209
|
extra_body: Body | None = None,
|
|
211
210
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
212
211
|
) -> TaskIDList:
|
|
213
|
-
"""
|
|
214
|
-
|
|
212
|
+
"""Delete a specific image.
|
|
213
|
+
|
|
214
|
+
The image cannot be deleted if it is used by protected
|
|
215
|
+
snapshots.
|
|
215
216
|
|
|
216
217
|
Args:
|
|
217
218
|
extra_headers: Send extra headers
|
|
@@ -284,7 +285,7 @@ class ImagesResource(SyncAPIResource):
|
|
|
284
285
|
os_type: Literal["linux", "windows"] | NotGiven = NOT_GIVEN,
|
|
285
286
|
source: Literal["volume"] | NotGiven = NOT_GIVEN,
|
|
286
287
|
ssh_key: Literal["allow", "deny", "required"] | NotGiven = NOT_GIVEN,
|
|
287
|
-
tags:
|
|
288
|
+
tags: Dict[str, str] | NotGiven = NOT_GIVEN,
|
|
288
289
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
289
290
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
290
291
|
extra_headers: Headers | None = None,
|
|
@@ -292,8 +293,10 @@ class ImagesResource(SyncAPIResource):
|
|
|
292
293
|
extra_body: Body | None = None,
|
|
293
294
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
294
295
|
) -> TaskIDList:
|
|
295
|
-
"""
|
|
296
|
-
|
|
296
|
+
"""Create a new image from a bootable volume.
|
|
297
|
+
|
|
298
|
+
The volume must be bootable to create
|
|
299
|
+
an image from it.
|
|
297
300
|
|
|
298
301
|
Args:
|
|
299
302
|
name: Image name
|
|
@@ -369,7 +372,7 @@ class ImagesResource(SyncAPIResource):
|
|
|
369
372
|
os_type: Literal["linux", "windows"] | NotGiven = NOT_GIVEN,
|
|
370
373
|
source: Literal["volume"] | NotGiven = NOT_GIVEN,
|
|
371
374
|
ssh_key: Literal["allow", "deny", "required"] | NotGiven = NOT_GIVEN,
|
|
372
|
-
tags:
|
|
375
|
+
tags: Dict[str, str] | NotGiven = NOT_GIVEN,
|
|
373
376
|
polling_interval_seconds: int | NotGiven = NOT_GIVEN,
|
|
374
377
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
375
378
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
@@ -430,7 +433,7 @@ class ImagesResource(SyncAPIResource):
|
|
|
430
433
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
431
434
|
) -> Image:
|
|
432
435
|
"""
|
|
433
|
-
|
|
436
|
+
Retrieve detailed information about a specific image.
|
|
434
437
|
|
|
435
438
|
Args:
|
|
436
439
|
include_prices: Show price
|
|
@@ -477,7 +480,7 @@ class ImagesResource(SyncAPIResource):
|
|
|
477
480
|
os_type: Literal["linux", "windows"] | NotGiven = NOT_GIVEN,
|
|
478
481
|
os_version: Optional[str] | NotGiven = NOT_GIVEN,
|
|
479
482
|
ssh_key: Literal["allow", "deny", "required"] | NotGiven = NOT_GIVEN,
|
|
480
|
-
tags:
|
|
483
|
+
tags: Dict[str, str] | NotGiven = NOT_GIVEN,
|
|
481
484
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
482
485
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
483
486
|
extra_headers: Headers | None = None,
|
|
@@ -485,8 +488,10 @@ class ImagesResource(SyncAPIResource):
|
|
|
485
488
|
extra_body: Body | None = None,
|
|
486
489
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
487
490
|
) -> TaskIDList:
|
|
488
|
-
"""
|
|
489
|
-
|
|
491
|
+
"""Upload an image from a URL.
|
|
492
|
+
|
|
493
|
+
The image can be configured with various properties
|
|
494
|
+
like OS type, architecture, and tags.
|
|
490
495
|
|
|
491
496
|
Args:
|
|
492
497
|
name: Image name
|
|
@@ -571,7 +576,7 @@ class ImagesResource(SyncAPIResource):
|
|
|
571
576
|
os_type: Literal["linux", "windows"] | NotGiven = NOT_GIVEN,
|
|
572
577
|
os_version: Optional[str] | NotGiven = NOT_GIVEN,
|
|
573
578
|
ssh_key: Literal["allow", "deny", "required"] | NotGiven = NOT_GIVEN,
|
|
574
|
-
tags:
|
|
579
|
+
tags: Dict[str, str] | NotGiven = NOT_GIVEN,
|
|
575
580
|
polling_interval_seconds: int | NotGiven = NOT_GIVEN,
|
|
576
581
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
577
582
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
@@ -661,7 +666,7 @@ class AsyncImagesResource(AsyncAPIResource):
|
|
|
661
666
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
662
667
|
) -> Image:
|
|
663
668
|
"""
|
|
664
|
-
Update image
|
|
669
|
+
Update image properties and tags.
|
|
665
670
|
|
|
666
671
|
Args:
|
|
667
672
|
hw_firmware_type: Specifies the type of firmware with which to boot the guest.
|
|
@@ -733,10 +738,11 @@ class AsyncImagesResource(AsyncAPIResource):
|
|
|
733
738
|
extra_body: Body | None = None,
|
|
734
739
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
735
740
|
) -> ImageList:
|
|
736
|
-
"""Retrieve
|
|
741
|
+
"""Retrieve a list of available images in the project and region.
|
|
737
742
|
|
|
738
|
-
|
|
739
|
-
|
|
743
|
+
The list can be
|
|
744
|
+
filtered by visibility, tags, and other parameters. Returned entities are owned
|
|
745
|
+
by the project or are public/shared with the client.
|
|
740
746
|
|
|
741
747
|
Args:
|
|
742
748
|
include_prices: Show price
|
|
@@ -745,9 +751,7 @@ class AsyncImagesResource(AsyncAPIResource):
|
|
|
745
751
|
|
|
746
752
|
tag_key: Filter by tag keys.
|
|
747
753
|
|
|
748
|
-
tag_key_value: Filter by tag key-value pairs. Must be a valid JSON string.
|
|
749
|
-
--data-urlencode '`tag_key_value`={"key": "value"}' --url
|
|
750
|
-
'http://localhost:1111/v1/images/1/1'"
|
|
754
|
+
tag_key_value: Filter by tag key-value pairs. Must be a valid JSON string.
|
|
751
755
|
|
|
752
756
|
visibility: Image visibility. Globally visible images are public
|
|
753
757
|
|
|
@@ -797,8 +801,10 @@ class AsyncImagesResource(AsyncAPIResource):
|
|
|
797
801
|
extra_body: Body | None = None,
|
|
798
802
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
799
803
|
) -> TaskIDList:
|
|
800
|
-
"""
|
|
801
|
-
|
|
804
|
+
"""Delete a specific image.
|
|
805
|
+
|
|
806
|
+
The image cannot be deleted if it is used by protected
|
|
807
|
+
snapshots.
|
|
802
808
|
|
|
803
809
|
Args:
|
|
804
810
|
extra_headers: Send extra headers
|
|
@@ -871,7 +877,7 @@ class AsyncImagesResource(AsyncAPIResource):
|
|
|
871
877
|
os_type: Literal["linux", "windows"] | NotGiven = NOT_GIVEN,
|
|
872
878
|
source: Literal["volume"] | NotGiven = NOT_GIVEN,
|
|
873
879
|
ssh_key: Literal["allow", "deny", "required"] | NotGiven = NOT_GIVEN,
|
|
874
|
-
tags:
|
|
880
|
+
tags: Dict[str, str] | NotGiven = NOT_GIVEN,
|
|
875
881
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
876
882
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
877
883
|
extra_headers: Headers | None = None,
|
|
@@ -879,8 +885,10 @@ class AsyncImagesResource(AsyncAPIResource):
|
|
|
879
885
|
extra_body: Body | None = None,
|
|
880
886
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
881
887
|
) -> TaskIDList:
|
|
882
|
-
"""
|
|
883
|
-
|
|
888
|
+
"""Create a new image from a bootable volume.
|
|
889
|
+
|
|
890
|
+
The volume must be bootable to create
|
|
891
|
+
an image from it.
|
|
884
892
|
|
|
885
893
|
Args:
|
|
886
894
|
name: Image name
|
|
@@ -956,7 +964,7 @@ class AsyncImagesResource(AsyncAPIResource):
|
|
|
956
964
|
os_type: Literal["linux", "windows"] | NotGiven = NOT_GIVEN,
|
|
957
965
|
source: Literal["volume"] | NotGiven = NOT_GIVEN,
|
|
958
966
|
ssh_key: Literal["allow", "deny", "required"] | NotGiven = NOT_GIVEN,
|
|
959
|
-
tags:
|
|
967
|
+
tags: Dict[str, str] | NotGiven = NOT_GIVEN,
|
|
960
968
|
polling_interval_seconds: int | NotGiven = NOT_GIVEN,
|
|
961
969
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
962
970
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
@@ -1017,7 +1025,7 @@ class AsyncImagesResource(AsyncAPIResource):
|
|
|
1017
1025
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
1018
1026
|
) -> Image:
|
|
1019
1027
|
"""
|
|
1020
|
-
|
|
1028
|
+
Retrieve detailed information about a specific image.
|
|
1021
1029
|
|
|
1022
1030
|
Args:
|
|
1023
1031
|
include_prices: Show price
|
|
@@ -1064,7 +1072,7 @@ class AsyncImagesResource(AsyncAPIResource):
|
|
|
1064
1072
|
os_type: Literal["linux", "windows"] | NotGiven = NOT_GIVEN,
|
|
1065
1073
|
os_version: Optional[str] | NotGiven = NOT_GIVEN,
|
|
1066
1074
|
ssh_key: Literal["allow", "deny", "required"] | NotGiven = NOT_GIVEN,
|
|
1067
|
-
tags:
|
|
1075
|
+
tags: Dict[str, str] | NotGiven = NOT_GIVEN,
|
|
1068
1076
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
1069
1077
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
1070
1078
|
extra_headers: Headers | None = None,
|
|
@@ -1072,8 +1080,10 @@ class AsyncImagesResource(AsyncAPIResource):
|
|
|
1072
1080
|
extra_body: Body | None = None,
|
|
1073
1081
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
1074
1082
|
) -> TaskIDList:
|
|
1075
|
-
"""
|
|
1076
|
-
|
|
1083
|
+
"""Upload an image from a URL.
|
|
1084
|
+
|
|
1085
|
+
The image can be configured with various properties
|
|
1086
|
+
like OS type, architecture, and tags.
|
|
1077
1087
|
|
|
1078
1088
|
Args:
|
|
1079
1089
|
name: Image name
|
|
@@ -1158,7 +1168,7 @@ class AsyncImagesResource(AsyncAPIResource):
|
|
|
1158
1168
|
os_type: Literal["linux", "windows"] | NotGiven = NOT_GIVEN,
|
|
1159
1169
|
os_version: Optional[str] | NotGiven = NOT_GIVEN,
|
|
1160
1170
|
ssh_key: Literal["allow", "deny", "required"] | NotGiven = NOT_GIVEN,
|
|
1161
|
-
tags:
|
|
1171
|
+
tags: Dict[str, str] | NotGiven = NOT_GIVEN,
|
|
1162
1172
|
polling_interval_seconds: int | NotGiven = NOT_GIVEN,
|
|
1163
1173
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
1164
1174
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
|
|
5
|
-
from typing import List, Union, Iterable, Optional
|
|
5
|
+
from typing import Dict, List, Union, Iterable, Optional
|
|
6
6
|
from datetime import datetime
|
|
7
7
|
from typing_extensions import Literal, overload
|
|
8
8
|
|
|
@@ -68,7 +68,6 @@ from ....types.cloud.console import Console
|
|
|
68
68
|
from ....types.cloud.instance import Instance
|
|
69
69
|
from ....types.cloud.task_id_list import TaskIDList
|
|
70
70
|
from ....types.cloud.instance_interface import InstanceInterface
|
|
71
|
-
from ....types.cloud.tag_update_map_param import TagUpdateMapParam
|
|
72
71
|
|
|
73
72
|
__all__ = ["InstancesResource", "AsyncInstancesResource"]
|
|
74
73
|
|
|
@@ -125,7 +124,7 @@ class InstancesResource(SyncAPIResource):
|
|
|
125
124
|
security_groups: Iterable[instance_create_params.SecurityGroup] | NotGiven = NOT_GIVEN,
|
|
126
125
|
servergroup_id: str | NotGiven = NOT_GIVEN,
|
|
127
126
|
ssh_key_name: Optional[str] | NotGiven = NOT_GIVEN,
|
|
128
|
-
tags:
|
|
127
|
+
tags: Dict[str, str] | NotGiven = NOT_GIVEN,
|
|
129
128
|
user_data: str | NotGiven = NOT_GIVEN,
|
|
130
129
|
username: str | NotGiven = NOT_GIVEN,
|
|
131
130
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
@@ -135,8 +134,9 @@ class InstancesResource(SyncAPIResource):
|
|
|
135
134
|
extra_body: Body | None = None,
|
|
136
135
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
137
136
|
) -> TaskIDList:
|
|
138
|
-
"""
|
|
139
|
-
|
|
137
|
+
"""Create an instance with specified configuration.
|
|
138
|
+
|
|
139
|
+
How to get access: For Linux,
|
|
140
140
|
|
|
141
141
|
- Use the `user_data` field to provide a
|
|
142
142
|
[cloud-init script](https://cloudinit.readthedocs.io/en/latest/reference/examples.html)
|
|
@@ -198,7 +198,7 @@ class InstancesResource(SyncAPIResource):
|
|
|
198
198
|
sharing if needed.
|
|
199
199
|
|
|
200
200
|
ssh_key_name: Specifies the name of the SSH keypair, created via the
|
|
201
|
-
[/v1/`ssh_keys` endpoint](/docs/api-reference/ssh-keys/add-or-generate-ssh-key).
|
|
201
|
+
[/v1/`ssh_keys` endpoint](/docs/api-reference/cloud/ssh-keys/add-or-generate-ssh-key).
|
|
202
202
|
|
|
203
203
|
tags: Key-value tags to associate with the resource. A tag is a key-value pair that
|
|
204
204
|
can be associated with a resource, enabling efficient filtering and grouping for
|
|
@@ -270,7 +270,7 @@ class InstancesResource(SyncAPIResource):
|
|
|
270
270
|
security_groups: Iterable[instance_create_params.SecurityGroup] | NotGiven = NOT_GIVEN,
|
|
271
271
|
servergroup_id: str | NotGiven = NOT_GIVEN,
|
|
272
272
|
ssh_key_name: Optional[str] | NotGiven = NOT_GIVEN,
|
|
273
|
-
tags:
|
|
273
|
+
tags: Dict[str, str] | NotGiven = NOT_GIVEN,
|
|
274
274
|
user_data: str | NotGiven = NOT_GIVEN,
|
|
275
275
|
username: str | NotGiven = NOT_GIVEN,
|
|
276
276
|
polling_interval_seconds: int | NotGiven = NOT_GIVEN,
|
|
@@ -429,8 +429,10 @@ class InstancesResource(SyncAPIResource):
|
|
|
429
429
|
extra_body: Body | None = None,
|
|
430
430
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
431
431
|
) -> SyncOffsetPage[Instance]:
|
|
432
|
-
"""
|
|
433
|
-
|
|
432
|
+
"""List all instances in the specified project and region.
|
|
433
|
+
|
|
434
|
+
Results can be filtered
|
|
435
|
+
by various parameters like name, status, and IP address.
|
|
434
436
|
|
|
435
437
|
Args:
|
|
436
438
|
project_id: Project ID
|
|
@@ -485,9 +487,7 @@ class InstancesResource(SyncAPIResource):
|
|
|
485
487
|
|
|
486
488
|
status: Filters instances by status.
|
|
487
489
|
|
|
488
|
-
tag_key_value: Optional. Filter by tag key-value pairs.
|
|
489
|
-
"`tag_key_value`={"key": "value"}" --url
|
|
490
|
-
"https://example.com/cloud/v1/resource/1/1"
|
|
490
|
+
tag_key_value: Optional. Filter by tag key-value pairs.
|
|
491
491
|
|
|
492
492
|
tag_value: Optional. Filter by tag values. ?`tag_value`=value1&`tag_value`=value2
|
|
493
493
|
|
|
@@ -787,8 +787,10 @@ class InstancesResource(SyncAPIResource):
|
|
|
787
787
|
extra_body: Body | None = None,
|
|
788
788
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
789
789
|
) -> TaskIDList:
|
|
790
|
-
"""
|
|
791
|
-
|
|
790
|
+
"""Add an instance to a server group.
|
|
791
|
+
|
|
792
|
+
The instance must not already be in a server
|
|
793
|
+
group. Bare metal servers do not support server groups.
|
|
792
794
|
|
|
793
795
|
Args:
|
|
794
796
|
servergroup_id: Anti-affinity or affinity or soft-anti-affinity server group ID.
|
|
@@ -1008,8 +1010,11 @@ class InstancesResource(SyncAPIResource):
|
|
|
1008
1010
|
extra_body: Body | None = None,
|
|
1009
1011
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
1010
1012
|
) -> Instance:
|
|
1011
|
-
"""
|
|
1012
|
-
|
|
1013
|
+
"""Retrieve detailed information about a specific instance.
|
|
1014
|
+
|
|
1015
|
+
The response content
|
|
1016
|
+
language for `ddos_profile` can be controlled via the 'language' cookie
|
|
1017
|
+
parameter. **Cookie Parameters**:
|
|
1013
1018
|
|
|
1014
1019
|
- `language` (str, optional): Language for the response content. Affects the
|
|
1015
1020
|
`ddos_profile` field. Supported values:
|
|
@@ -1107,8 +1112,10 @@ class InstancesResource(SyncAPIResource):
|
|
|
1107
1112
|
extra_body: Body | None = None,
|
|
1108
1113
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
1109
1114
|
) -> TaskIDList:
|
|
1110
|
-
"""
|
|
1111
|
-
|
|
1115
|
+
"""Remove an instance from its current server group.
|
|
1116
|
+
|
|
1117
|
+
The instance must be in a
|
|
1118
|
+
server group to be removed. Bare metal servers do not support server groups.
|
|
1112
1119
|
|
|
1113
1120
|
Args:
|
|
1114
1121
|
extra_headers: Send extra headers
|
|
@@ -1367,7 +1374,7 @@ class AsyncInstancesResource(AsyncAPIResource):
|
|
|
1367
1374
|
security_groups: Iterable[instance_create_params.SecurityGroup] | NotGiven = NOT_GIVEN,
|
|
1368
1375
|
servergroup_id: str | NotGiven = NOT_GIVEN,
|
|
1369
1376
|
ssh_key_name: Optional[str] | NotGiven = NOT_GIVEN,
|
|
1370
|
-
tags:
|
|
1377
|
+
tags: Dict[str, str] | NotGiven = NOT_GIVEN,
|
|
1371
1378
|
user_data: str | NotGiven = NOT_GIVEN,
|
|
1372
1379
|
username: str | NotGiven = NOT_GIVEN,
|
|
1373
1380
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
@@ -1377,8 +1384,9 @@ class AsyncInstancesResource(AsyncAPIResource):
|
|
|
1377
1384
|
extra_body: Body | None = None,
|
|
1378
1385
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
1379
1386
|
) -> TaskIDList:
|
|
1380
|
-
"""
|
|
1381
|
-
|
|
1387
|
+
"""Create an instance with specified configuration.
|
|
1388
|
+
|
|
1389
|
+
How to get access: For Linux,
|
|
1382
1390
|
|
|
1383
1391
|
- Use the `user_data` field to provide a
|
|
1384
1392
|
[cloud-init script](https://cloudinit.readthedocs.io/en/latest/reference/examples.html)
|
|
@@ -1440,7 +1448,7 @@ class AsyncInstancesResource(AsyncAPIResource):
|
|
|
1440
1448
|
sharing if needed.
|
|
1441
1449
|
|
|
1442
1450
|
ssh_key_name: Specifies the name of the SSH keypair, created via the
|
|
1443
|
-
[/v1/`ssh_keys` endpoint](/docs/api-reference/ssh-keys/add-or-generate-ssh-key).
|
|
1451
|
+
[/v1/`ssh_keys` endpoint](/docs/api-reference/cloud/ssh-keys/add-or-generate-ssh-key).
|
|
1444
1452
|
|
|
1445
1453
|
tags: Key-value tags to associate with the resource. A tag is a key-value pair that
|
|
1446
1454
|
can be associated with a resource, enabling efficient filtering and grouping for
|
|
@@ -1512,7 +1520,7 @@ class AsyncInstancesResource(AsyncAPIResource):
|
|
|
1512
1520
|
security_groups: Iterable[instance_create_params.SecurityGroup] | NotGiven = NOT_GIVEN,
|
|
1513
1521
|
servergroup_id: str | NotGiven = NOT_GIVEN,
|
|
1514
1522
|
ssh_key_name: Optional[str] | NotGiven = NOT_GIVEN,
|
|
1515
|
-
tags:
|
|
1523
|
+
tags: Dict[str, str] | NotGiven = NOT_GIVEN,
|
|
1516
1524
|
user_data: str | NotGiven = NOT_GIVEN,
|
|
1517
1525
|
username: str | NotGiven = NOT_GIVEN,
|
|
1518
1526
|
polling_interval_seconds: int | NotGiven = NOT_GIVEN,
|
|
@@ -1671,8 +1679,10 @@ class AsyncInstancesResource(AsyncAPIResource):
|
|
|
1671
1679
|
extra_body: Body | None = None,
|
|
1672
1680
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
1673
1681
|
) -> AsyncPaginator[Instance, AsyncOffsetPage[Instance]]:
|
|
1674
|
-
"""
|
|
1675
|
-
|
|
1682
|
+
"""List all instances in the specified project and region.
|
|
1683
|
+
|
|
1684
|
+
Results can be filtered
|
|
1685
|
+
by various parameters like name, status, and IP address.
|
|
1676
1686
|
|
|
1677
1687
|
Args:
|
|
1678
1688
|
project_id: Project ID
|
|
@@ -1727,9 +1737,7 @@ class AsyncInstancesResource(AsyncAPIResource):
|
|
|
1727
1737
|
|
|
1728
1738
|
status: Filters instances by status.
|
|
1729
1739
|
|
|
1730
|
-
tag_key_value: Optional. Filter by tag key-value pairs.
|
|
1731
|
-
"`tag_key_value`={"key": "value"}" --url
|
|
1732
|
-
"https://example.com/cloud/v1/resource/1/1"
|
|
1740
|
+
tag_key_value: Optional. Filter by tag key-value pairs.
|
|
1733
1741
|
|
|
1734
1742
|
tag_value: Optional. Filter by tag values. ?`tag_value`=value1&`tag_value`=value2
|
|
1735
1743
|
|
|
@@ -2029,8 +2037,10 @@ class AsyncInstancesResource(AsyncAPIResource):
|
|
|
2029
2037
|
extra_body: Body | None = None,
|
|
2030
2038
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
2031
2039
|
) -> TaskIDList:
|
|
2032
|
-
"""
|
|
2033
|
-
|
|
2040
|
+
"""Add an instance to a server group.
|
|
2041
|
+
|
|
2042
|
+
The instance must not already be in a server
|
|
2043
|
+
group. Bare metal servers do not support server groups.
|
|
2034
2044
|
|
|
2035
2045
|
Args:
|
|
2036
2046
|
servergroup_id: Anti-affinity or affinity or soft-anti-affinity server group ID.
|
|
@@ -2250,8 +2260,11 @@ class AsyncInstancesResource(AsyncAPIResource):
|
|
|
2250
2260
|
extra_body: Body | None = None,
|
|
2251
2261
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
2252
2262
|
) -> Instance:
|
|
2253
|
-
"""
|
|
2254
|
-
|
|
2263
|
+
"""Retrieve detailed information about a specific instance.
|
|
2264
|
+
|
|
2265
|
+
The response content
|
|
2266
|
+
language for `ddos_profile` can be controlled via the 'language' cookie
|
|
2267
|
+
parameter. **Cookie Parameters**:
|
|
2255
2268
|
|
|
2256
2269
|
- `language` (str, optional): Language for the response content. Affects the
|
|
2257
2270
|
`ddos_profile` field. Supported values:
|
|
@@ -2349,8 +2362,10 @@ class AsyncInstancesResource(AsyncAPIResource):
|
|
|
2349
2362
|
extra_body: Body | None = None,
|
|
2350
2363
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
2351
2364
|
) -> TaskIDList:
|
|
2352
|
-
"""
|
|
2353
|
-
|
|
2365
|
+
"""Remove an instance from its current server group.
|
|
2366
|
+
|
|
2367
|
+
The instance must be in a
|
|
2368
|
+
server group to be removed. Bare metal servers do not support server groups.
|
|
2354
2369
|
|
|
2355
2370
|
Args:
|
|
2356
2371
|
extra_headers: Send extra headers
|
|
@@ -59,7 +59,7 @@ class InterfacesResource(SyncAPIResource):
|
|
|
59
59
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
60
60
|
) -> NetworkInterfaceList:
|
|
61
61
|
"""
|
|
62
|
-
List network interfaces attached to the instance
|
|
62
|
+
List all network interfaces attached to the specified instance.
|
|
63
63
|
|
|
64
64
|
Args:
|
|
65
65
|
extra_headers: Send extra headers
|
|
@@ -415,7 +415,7 @@ class AsyncInterfacesResource(AsyncAPIResource):
|
|
|
415
415
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
416
416
|
) -> NetworkInterfaceList:
|
|
417
417
|
"""
|
|
418
|
-
List network interfaces attached to the instance
|
|
418
|
+
List all network interfaces attached to the specified instance.
|
|
419
419
|
|
|
420
420
|
Args:
|
|
421
421
|
extra_headers: Send extra headers
|
|
@@ -49,7 +49,23 @@ class IPRangesResource(SyncAPIResource):
|
|
|
49
49
|
extra_body: Body | None = None,
|
|
50
50
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
51
51
|
) -> IPRanges:
|
|
52
|
-
"""
|
|
52
|
+
"""
|
|
53
|
+
Returns the complete list of IPv4 and IPv6 address ranges that Cloud uses for
|
|
54
|
+
outbound (egress) traffic. Typical reasons to call this endpoint:
|
|
55
|
+
|
|
56
|
+
- Host-file delivery workflows – You upload images or other assets to the Cloud
|
|
57
|
+
and share a download link that points to your own infrastructure. Add these
|
|
58
|
+
egress prefixes to your firewall or object-storage allow-list so our clients
|
|
59
|
+
can fetch the files without being blocked.
|
|
60
|
+
- Push integrations / webhooks – You subscribe to the user-actions event log and
|
|
61
|
+
Cloud pushes events to your listener endpoint. Whitelisting the egress IP
|
|
62
|
+
ranges lets you accept only traffic that originates from us.
|
|
63
|
+
- General security controls, audit tooling, or SIEM rules that need to verify
|
|
64
|
+
that traffic truly comes from the Cloud. The list is global (covers all
|
|
65
|
+
regions) and refreshed automatically whenever Gcore allocates new egress IP
|
|
66
|
+
space. The response is an array of CIDR blocks; duplicate prefixes are not
|
|
67
|
+
returned.
|
|
68
|
+
"""
|
|
53
69
|
return self._get(
|
|
54
70
|
"/cloud/public/v1/ipranges/egress",
|
|
55
71
|
options=make_request_options(
|
|
@@ -89,7 +105,23 @@ class AsyncIPRangesResource(AsyncAPIResource):
|
|
|
89
105
|
extra_body: Body | None = None,
|
|
90
106
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
91
107
|
) -> IPRanges:
|
|
92
|
-
"""
|
|
108
|
+
"""
|
|
109
|
+
Returns the complete list of IPv4 and IPv6 address ranges that Cloud uses for
|
|
110
|
+
outbound (egress) traffic. Typical reasons to call this endpoint:
|
|
111
|
+
|
|
112
|
+
- Host-file delivery workflows – You upload images or other assets to the Cloud
|
|
113
|
+
and share a download link that points to your own infrastructure. Add these
|
|
114
|
+
egress prefixes to your firewall or object-storage allow-list so our clients
|
|
115
|
+
can fetch the files without being blocked.
|
|
116
|
+
- Push integrations / webhooks – You subscribe to the user-actions event log and
|
|
117
|
+
Cloud pushes events to your listener endpoint. Whitelisting the egress IP
|
|
118
|
+
ranges lets you accept only traffic that originates from us.
|
|
119
|
+
- General security controls, audit tooling, or SIEM rules that need to verify
|
|
120
|
+
that traffic truly comes from the Cloud. The list is global (covers all
|
|
121
|
+
regions) and refreshed automatically whenever Gcore allocates new egress IP
|
|
122
|
+
space. The response is an array of CIDR blocks; duplicate prefixes are not
|
|
123
|
+
returned.
|
|
124
|
+
"""
|
|
93
125
|
return await self._get(
|
|
94
126
|
"/cloud/public/v1/ipranges/egress",
|
|
95
127
|
options=make_request_options(
|
|
@@ -381,7 +381,11 @@ class L7PoliciesResource(SyncAPIResource):
|
|
|
381
381
|
extra_headers=extra_headers,
|
|
382
382
|
polling_interval_seconds=polling_interval_seconds,
|
|
383
383
|
)
|
|
384
|
-
if
|
|
384
|
+
if (
|
|
385
|
+
not task.created_resources
|
|
386
|
+
or not task.created_resources.l7polices
|
|
387
|
+
or len(task.created_resources.l7polices) != 1
|
|
388
|
+
):
|
|
385
389
|
raise ValueError(f"Expected exactly one resource to be created in a task")
|
|
386
390
|
return self.get(
|
|
387
391
|
l7policy_id=task.created_resources.l7polices[0],
|
|
@@ -824,7 +828,11 @@ class AsyncL7PoliciesResource(AsyncAPIResource):
|
|
|
824
828
|
extra_headers=extra_headers,
|
|
825
829
|
polling_interval_seconds=polling_interval_seconds,
|
|
826
830
|
)
|
|
827
|
-
if
|
|
831
|
+
if (
|
|
832
|
+
not task.created_resources
|
|
833
|
+
or not task.created_resources.l7polices
|
|
834
|
+
or len(task.created_resources.l7polices) != 1
|
|
835
|
+
):
|
|
828
836
|
raise ValueError(f"Expected exactly one resource to be created in a task")
|
|
829
837
|
return await self.get(
|
|
830
838
|
l7policy_id=task.created_resources.l7polices[0],
|
|
@@ -175,7 +175,7 @@ class ListenersResource(SyncAPIResource):
|
|
|
175
175
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
176
176
|
) -> TaskIDList:
|
|
177
177
|
"""
|
|
178
|
-
Update listener
|
|
178
|
+
Update load balancer listener
|
|
179
179
|
|
|
180
180
|
Args:
|
|
181
181
|
project_id: Project ID
|
|
@@ -356,7 +356,7 @@ class ListenersResource(SyncAPIResource):
|
|
|
356
356
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
357
357
|
) -> LoadBalancerListenerDetail:
|
|
358
358
|
"""
|
|
359
|
-
Get listener
|
|
359
|
+
Get load balancer listener
|
|
360
360
|
|
|
361
361
|
Args:
|
|
362
362
|
project_id: Project ID
|
|
@@ -447,7 +447,11 @@ class ListenersResource(SyncAPIResource):
|
|
|
447
447
|
extra_headers=extra_headers,
|
|
448
448
|
polling_interval_seconds=polling_interval_seconds,
|
|
449
449
|
)
|
|
450
|
-
if
|
|
450
|
+
if (
|
|
451
|
+
not task.created_resources
|
|
452
|
+
or not task.created_resources.listeners
|
|
453
|
+
or len(task.created_resources.listeners) != 1
|
|
454
|
+
):
|
|
451
455
|
raise ValueError(f"Expected exactly one resource to be created in a task")
|
|
452
456
|
return self.get(
|
|
453
457
|
listener_id=task.created_resources.listeners[0],
|
|
@@ -694,7 +698,7 @@ class AsyncListenersResource(AsyncAPIResource):
|
|
|
694
698
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
695
699
|
) -> TaskIDList:
|
|
696
700
|
"""
|
|
697
|
-
Update listener
|
|
701
|
+
Update load balancer listener
|
|
698
702
|
|
|
699
703
|
Args:
|
|
700
704
|
project_id: Project ID
|
|
@@ -875,7 +879,7 @@ class AsyncListenersResource(AsyncAPIResource):
|
|
|
875
879
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
876
880
|
) -> LoadBalancerListenerDetail:
|
|
877
881
|
"""
|
|
878
|
-
Get listener
|
|
882
|
+
Get load balancer listener
|
|
879
883
|
|
|
880
884
|
Args:
|
|
881
885
|
project_id: Project ID
|
|
@@ -966,7 +970,11 @@ class AsyncListenersResource(AsyncAPIResource):
|
|
|
966
970
|
extra_headers=extra_headers,
|
|
967
971
|
polling_interval_seconds=polling_interval_seconds,
|
|
968
972
|
)
|
|
969
|
-
if
|
|
973
|
+
if (
|
|
974
|
+
not task.created_resources
|
|
975
|
+
or not task.created_resources.listeners
|
|
976
|
+
or len(task.created_resources.listeners) != 1
|
|
977
|
+
):
|
|
970
978
|
raise ValueError(f"Expected exactly one resource to be created in a task")
|
|
971
979
|
return await self.get(
|
|
972
980
|
listener_id=task.created_resources.listeners[0],
|
|
@@ -975,7 +983,7 @@ class AsyncListenersResource(AsyncAPIResource):
|
|
|
975
983
|
extra_headers=extra_headers,
|
|
976
984
|
timeout=timeout,
|
|
977
985
|
)
|
|
978
|
-
|
|
986
|
+
|
|
979
987
|
async def delete_and_poll(
|
|
980
988
|
self,
|
|
981
989
|
listener_id: str,
|
|
@@ -1008,7 +1016,7 @@ class AsyncListenersResource(AsyncAPIResource):
|
|
|
1008
1016
|
task_id=response.tasks[0],
|
|
1009
1017
|
extra_headers=extra_headers,
|
|
1010
1018
|
polling_interval_seconds=polling_interval_seconds,
|
|
1011
|
-
)
|
|
1019
|
+
)
|
|
1012
1020
|
|
|
1013
1021
|
async def update_and_poll(
|
|
1014
1022
|
self,
|
|
@@ -1069,6 +1077,7 @@ class AsyncListenersResource(AsyncAPIResource):
|
|
|
1069
1077
|
timeout=timeout,
|
|
1070
1078
|
)
|
|
1071
1079
|
|
|
1080
|
+
|
|
1072
1081
|
class ListenersResourceWithRawResponse:
|
|
1073
1082
|
def __init__(self, listeners: ListenersResource) -> None:
|
|
1074
1083
|
self._listeners = listeners
|