gcore 0.2.0__py3-none-any.whl → 0.4.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 +44 -2
- gcore/_client.py +9 -0
- gcore/_models.py +2 -0
- gcore/_types.py +2 -0
- gcore/_version.py +1 -1
- gcore/pagination.py +61 -1
- gcore/resources/__init__.py +14 -0
- gcore/resources/cloud/baremetal/flavors.py +11 -137
- gcore/resources/cloud/baremetal/images.py +10 -12
- gcore/resources/cloud/baremetal/servers.py +75 -78
- gcore/resources/cloud/billing_reservations.py +2 -2
- gcore/resources/cloud/file_shares/file_shares.py +7 -8
- gcore/resources/cloud/floating_ips.py +9 -14
- gcore/resources/cloud/gpu_baremetal_clusters/gpu_baremetal_clusters.py +39 -28
- gcore/resources/cloud/gpu_baremetal_clusters/images.py +11 -12
- gcore/resources/cloud/gpu_baremetal_clusters/interfaces.py +2 -2
- gcore/resources/cloud/gpu_baremetal_clusters/servers.py +12 -8
- gcore/resources/cloud/inference/deployments/deployments.py +16 -8
- gcore/resources/cloud/inference/registry_credentials.py +2 -2
- gcore/resources/cloud/inference/secrets.py +8 -8
- gcore/resources/cloud/instances/flavors.py +9 -233
- gcore/resources/cloud/instances/images.py +47 -37
- gcore/resources/cloud/instances/instances.py +107 -100
- gcore/resources/cloud/instances/interfaces.py +6 -6
- gcore/resources/cloud/ip_ranges.py +34 -2
- gcore/resources/cloud/load_balancers/flavors.py +2 -2
- gcore/resources/cloud/load_balancers/l7_policies/l7_policies.py +30 -22
- gcore/resources/cloud/load_balancers/listeners.py +31 -22
- gcore/resources/cloud/load_balancers/load_balancers.py +99 -43
- 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 +12 -8
- gcore/resources/cloud/networks/networks.py +83 -19
- gcore/resources/cloud/networks/routers.py +18 -18
- gcore/resources/cloud/networks/subnets.py +55 -15
- 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 -20
- gcore/resources/cloud/registries/repositories.py +4 -4
- gcore/resources/cloud/registries/tags.py +2 -2
- gcore/resources/cloud/registries/users.py +25 -32
- gcore/resources/cloud/reserved_fixed_ips/reserved_fixed_ips.py +26 -26
- gcore/resources/cloud/reserved_fixed_ips/vip.py +10 -10
- gcore/resources/cloud/security_groups/rules.py +6 -6
- gcore/resources/cloud/security_groups/security_groups.py +70 -31
- gcore/resources/cloud/ssh_keys.py +2 -2
- gcore/resources/cloud/tasks.py +102 -94
- gcore/resources/cloud/users/role_assignments.py +16 -18
- gcore/resources/cloud/volumes.py +155 -65
- 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 +84 -0
- gcore/resources/waap/advanced_rules.py +135 -0
- gcore/resources/waap/custom_page_sets.py +805 -0
- gcore/resources/waap/domains/__init__.py +140 -0
- gcore/resources/waap/domains/advanced_rules.py +876 -0
- gcore/resources/waap/domains/analytics/__init__.py +33 -0
- gcore/resources/waap/domains/analytics/analytics.py +676 -0
- gcore/resources/waap/domains/analytics/requests.py +378 -0
- gcore/resources/waap/domains/api_discovery/__init__.py +33 -0
- gcore/resources/waap/domains/api_discovery/api_discovery.py +530 -0
- gcore/resources/waap/domains/api_discovery/scan_results.py +352 -0
- gcore/resources/waap/domains/api_path_groups.py +163 -0
- gcore/resources/waap/domains/api_paths.py +771 -0
- gcore/resources/waap/domains/custom_rules.py +889 -0
- gcore/resources/waap/domains/domains.py +399 -0
- gcore/resources/waap/domains/firewall_rules.py +884 -0
- gcore/resources/waap/domains/insight_silences.py +689 -0
- gcore/resources/waap/domains/insights.py +425 -0
- gcore/resources/waap/domains/policies.py +173 -0
- gcore/resources/waap/domains/settings.py +5 -5
- gcore/resources/waap/ip_info.py +1017 -0
- gcore/resources/waap/organizations.py +217 -0
- gcore/resources/waap/statistics.py +225 -0
- gcore/resources/waap/tags.py +233 -0
- gcore/resources/waap/waap.py +257 -0
- gcore/types/cloud/allowed_address_pairs.py +2 -2
- gcore/types/cloud/baremetal/__init__.py +0 -1
- gcore/types/cloud/baremetal/baremetal_server.py +1 -1
- gcore/types/cloud/baremetal/image_list_params.py +1 -5
- gcore/types/cloud/baremetal/server_create_params.py +13 -17
- gcore/types/cloud/baremetal/server_list_params.py +8 -12
- gcore/types/cloud/baremetal/server_rebuild_params.py +1 -1
- gcore/types/cloud/baremetal_flavor.py +3 -3
- gcore/types/cloud/container_probe_config.py +1 -1
- gcore/types/cloud/container_probe_config_create_param.py +1 -1
- gcore/types/cloud/container_scale_triggers.py +2 -2
- 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_detailed.py +1 -1
- gcore/types/cloud/floating_ip_list_params.py +2 -6
- gcore/types/cloud/gpu_baremetal_cluster.py +1 -1
- gcore/types/cloud/gpu_baremetal_cluster_create_params.py +4 -5
- gcore/types/cloud/gpu_baremetal_cluster_delete_params.py +1 -1
- gcore/types/cloud/gpu_baremetal_cluster_rebuild_params.py +1 -1
- gcore/types/cloud/gpu_baremetal_cluster_server.py +1 -1
- gcore/types/cloud/gpu_baremetal_clusters/image_upload_params.py +3 -5
- gcore/types/cloud/gpu_baremetal_clusters/server_attach_interface_params.py +10 -10
- gcore/types/cloud/gpu_baremetal_flavor.py +3 -3
- gcore/types/cloud/health_monitor.py +6 -1
- gcore/types/cloud/image.py +1 -1
- gcore/types/cloud/inference/deployment_create_params.py +4 -4
- gcore/types/cloud/inference/deployment_update_params.py +6 -6
- gcore/types/cloud/inference/inference.py +2 -4
- gcore/types/cloud/instance.py +1 -1
- gcore/types/cloud/instance_create_params.py +15 -18
- gcore/types/cloud/instance_list_params.py +8 -12
- 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/instances/instance_flavor.py +3 -3
- gcore/types/cloud/instances/interface_attach_params.py +10 -10
- gcore/types/cloud/load_balancer_create_params.py +25 -19
- gcore/types/cloud/load_balancer_flavor_detail.py +3 -3
- gcore/types/cloud/load_balancer_l7_policy.py +5 -5
- gcore/types/cloud/load_balancer_list_params.py +5 -9
- gcore/types/cloud/load_balancer_listener_detail.py +4 -4
- gcore/types/cloud/load_balancer_update_params.py +24 -0
- gcore/types/cloud/load_balancers/l7_policy_create_params.py +5 -5
- gcore/types/cloud/load_balancers/l7_policy_replace_params.py +5 -5
- gcore/types/cloud/load_balancers/listener_create_params.py +4 -4
- gcore/types/cloud/load_balancers/listener_update_params.py +3 -3
- gcore/types/cloud/load_balancers/pool_create_params.py +10 -5
- gcore/types/cloud/load_balancers/pool_update_params.py +10 -5
- gcore/types/cloud/load_balancers/pools/member_add_params.py +9 -4
- gcore/types/cloud/member.py +8 -3
- gcore/types/cloud/network.py +2 -2
- gcore/types/cloud/network_create_params.py +2 -3
- gcore/types/cloud/network_details.py +2 -2
- gcore/types/cloud/network_list_params.py +5 -6
- 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 +3 -4
- gcore/types/cloud/networks/subnet_list_params.py +2 -6
- gcore/types/cloud/networks/subnet_update_params.py +25 -0
- gcore/types/cloud/region.py +4 -4
- gcore/types/cloud/registries/__init__.py +1 -0
- gcore/types/cloud/registries/user_create_multiple_params.py +3 -5
- gcore/types/cloud/registries/user_create_params.py +3 -5
- gcore/types/cloud/registries/user_refresh_secret_response.py +31 -0
- gcore/types/cloud/registry_create_params.py +3 -5
- gcore/types/cloud/reserved_fixed_ip_create_params.py +2 -2
- gcore/types/cloud/reserved_fixed_ip_list_params.py +3 -3
- gcore/types/cloud/security_group_list_params.py +3 -7
- gcore/types/cloud/security_group_update_params.py +25 -0
- gcore/types/cloud/session_persistence.py +1 -1
- gcore/types/cloud/ssh_key_created.py +3 -6
- gcore/types/cloud/tag_update_map_param.py +2 -2
- gcore/types/cloud/task.py +1 -1
- gcore/types/cloud/task_list_params.py +49 -45
- gcore/types/cloud/users/role_assignment_create_params.py +1 -1
- gcore/types/cloud/users/role_assignment_update_params.py +1 -1
- gcore/types/cloud/volume_create_params.py +6 -6
- gcore/types/cloud/volume_list_params.py +3 -7
- gcore/types/cloud/volume_update_params.py +29 -3
- 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 +97 -2
- gcore/types/waap/custom_page_set_create_params.py +35 -0
- gcore/types/waap/custom_page_set_list_params.py +25 -0
- gcore/types/waap/custom_page_set_preview_params.py +34 -0
- gcore/types/waap/custom_page_set_update_params.py +35 -0
- gcore/types/waap/domain_list_rule_sets_response.py +10 -0
- gcore/types/waap/domains/__init__.py +42 -0
- gcore/types/waap/domains/advanced_rule_create_params.py +80 -0
- gcore/types/waap/domains/advanced_rule_list_params.py +58 -0
- gcore/types/waap/domains/advanced_rule_update_params.py +83 -0
- gcore/types/waap/domains/analytics/__init__.py +5 -0
- gcore/types/waap/domains/analytics/request_list_params.py +53 -0
- gcore/types/waap/domains/analytics_get_event_statistics_params.py +34 -0
- gcore/types/waap/domains/analytics_list_ddos_attacks_params.py +28 -0
- gcore/types/waap/domains/analytics_list_ddos_info_params.py +31 -0
- gcore/types/waap/domains/analytics_list_event_traffic_params.py +26 -0
- gcore/types/waap/domains/analytics_list_event_traffic_response.py +10 -0
- gcore/types/waap/domains/api_discovery/__init__.py +7 -0
- gcore/types/waap/domains/api_discovery/scan_result_get_response.py +29 -0
- gcore/types/waap/domains/api_discovery/scan_result_list_params.py +41 -0
- gcore/types/waap/domains/api_discovery/scan_result_list_response.py +29 -0
- gcore/types/waap/domains/api_discovery_get_settings_response.py +36 -0
- gcore/types/waap/domains/api_discovery_scan_openapi_response.py +10 -0
- gcore/types/waap/domains/api_discovery_update_settings_params.py +34 -0
- gcore/types/waap/domains/api_discovery_update_settings_response.py +36 -0
- gcore/types/waap/domains/api_discovery_upload_openapi_params.py +19 -0
- gcore/types/waap/domains/api_discovery_upload_openapi_response.py +10 -0
- gcore/types/waap/domains/api_path_create_params.py +31 -0
- gcore/types/waap/domains/api_path_create_response.py +50 -0
- gcore/types/waap/domains/api_path_get_response.py +50 -0
- gcore/types/waap/domains/api_path_group_list_response.py +12 -0
- gcore/types/waap/domains/api_path_list_params.py +62 -0
- gcore/types/waap/domains/api_path_list_response.py +50 -0
- gcore/types/waap/domains/api_path_update_params.py +29 -0
- gcore/types/waap/domains/custom_rule_create_params.py +372 -0
- gcore/types/waap/domains/custom_rule_delete_multiple_params.py +13 -0
- gcore/types/waap/domains/custom_rule_list_params.py +35 -0
- gcore/types/waap/domains/custom_rule_update_params.py +375 -0
- gcore/types/waap/domains/firewall_rule_create_params.py +75 -0
- gcore/types/waap/domains/firewall_rule_delete_multiple_params.py +13 -0
- gcore/types/waap/domains/firewall_rule_list_params.py +33 -0
- gcore/types/waap/domains/firewall_rule_update_params.py +78 -0
- gcore/types/waap/domains/insight_list_params.py +34 -0
- gcore/types/waap/domains/insight_replace_params.py +17 -0
- gcore/types/waap/domains/insight_silence_create_params.py +28 -0
- gcore/types/waap/domains/insight_silence_list_params.py +33 -0
- gcore/types/waap/domains/insight_silence_update_params.py +28 -0
- gcore/types/waap/domains/setting_update_params.py +7 -0
- gcore/types/waap/ip_info_get_attack_time_series_params.py +12 -0
- gcore/types/waap/ip_info_get_attack_time_series_response.py +10 -0
- gcore/types/waap/ip_info_get_blocked_requests_params.py +15 -0
- gcore/types/waap/ip_info_get_blocked_requests_response.py +10 -0
- gcore/types/waap/ip_info_get_counts_params.py +19 -0
- gcore/types/waap/ip_info_get_ddos_attack_series_params.py +12 -0
- gcore/types/waap/ip_info_get_params.py +12 -0
- gcore/types/waap/ip_info_get_top_sessions_params.py +15 -0
- gcore/types/waap/ip_info_get_top_sessions_response.py +10 -0
- gcore/types/waap/ip_info_get_top_urls_params.py +15 -0
- gcore/types/waap/ip_info_get_top_urls_response.py +10 -0
- gcore/types/waap/ip_info_get_top_user_agents_params.py +15 -0
- gcore/types/waap/ip_info_get_top_user_agents_response.py +10 -0
- gcore/types/waap/ip_info_list_attacked_countries_params.py +12 -0
- gcore/types/waap/ip_info_list_attacked_countries_response.py +10 -0
- gcore/types/waap/organization_list_params.py +22 -0
- gcore/types/waap/statistic_get_usage_series_params.py +25 -0
- gcore/types/waap/tag_list_params.py +28 -0
- gcore/types/waap/waap_advanced_rule.py +83 -0
- gcore/types/waap/waap_advanced_rule_descriptor.py +49 -0
- gcore/types/waap/waap_advanced_rule_descriptor_list.py +15 -0
- gcore/types/waap/waap_block_csrf_page_data.py +28 -0
- gcore/types/waap/waap_block_csrf_page_data_param.py +28 -0
- gcore/types/waap/waap_block_page_data.py +28 -0
- gcore/types/waap/waap_block_page_data_param.py +28 -0
- gcore/types/waap/waap_blocked_statistics.py +36 -0
- gcore/types/waap/waap_captcha_page_data.py +31 -0
- gcore/types/waap/waap_captcha_page_data_param.py +31 -0
- gcore/types/waap/waap_common_tag.py +16 -0
- gcore/types/waap/waap_cookie_disabled_page_data.py +18 -0
- gcore/types/waap/waap_cookie_disabled_page_data_param.py +18 -0
- gcore/types/waap/waap_count_statistics.py +36 -0
- gcore/types/waap/waap_custom_page_preview.py +10 -0
- gcore/types/waap/waap_custom_page_set.py +36 -0
- gcore/types/waap/waap_custom_rule.py +377 -0
- gcore/types/waap/waap_customer_rule_state.py +7 -0
- gcore/types/waap/waap_ddos_attack.py +16 -0
- gcore/types/waap/waap_ddos_info.py +17 -0
- gcore/types/waap/{waap_api_urls.py → waap_domain_api_settings.py} +9 -2
- gcore/types/waap/waap_domain_policy.py +29 -0
- gcore/types/waap/{waap_domain_settings.py → waap_domain_settings_model.py} +4 -4
- gcore/types/waap/waap_event_statistics.py +15 -0
- gcore/types/waap/waap_firewall_rule.py +78 -0
- gcore/types/waap/waap_get_account_overview_response.py +34 -0
- gcore/types/waap/waap_handshake_page_data.py +25 -0
- gcore/types/waap/waap_handshake_page_data_param.py +25 -0
- gcore/types/waap/waap_insight.py +38 -0
- gcore/types/waap/waap_insight_silence.py +28 -0
- gcore/types/waap/waap_insight_silence_sort_by.py +9 -0
- gcore/types/waap/waap_insight_sort_by.py +20 -0
- gcore/types/waap/waap_insight_status.py +7 -0
- gcore/types/waap/waap_ip_country_attack.py +16 -0
- gcore/types/waap/waap_ip_ddos_info_model.py +23 -0
- gcore/types/waap/waap_ip_info.py +57 -0
- gcore/types/waap/waap_ip_info_counts.py +16 -0
- gcore/types/waap/waap_javascript_disabled_page_data.py +18 -0
- gcore/types/waap/waap_javascript_disabled_page_data_param.py +18 -0
- gcore/types/waap/waap_network_details.py +17 -0
- gcore/types/waap/waap_organization.py +13 -0
- gcore/types/waap/waap_page_type.py +9 -0
- gcore/types/waap/waap_paginated_custom_page_set.py +22 -0
- gcore/types/waap/waap_paginated_ddos_attack.py +22 -0
- gcore/types/waap/waap_paginated_ddos_info.py +22 -0
- gcore/types/waap/waap_paginated_request_summary.py +22 -0
- gcore/types/waap/waap_pattern_matched_tag.py +37 -0
- gcore/types/waap/waap_policy_action.py +7 -0
- gcore/types/waap/waap_policy_mode.py +10 -0
- gcore/types/waap/waap_request_details.py +92 -0
- gcore/types/waap/waap_request_organization.py +13 -0
- gcore/types/waap/waap_request_summary.py +59 -0
- gcore/types/waap/waap_resolution.py +7 -0
- gcore/types/waap/waap_rule_action_type.py +7 -0
- gcore/types/waap/waap_rule_blocked_requests.py +16 -0
- gcore/types/waap/waap_rule_set.py +41 -0
- gcore/types/waap/waap_statistic_item.py +18 -0
- gcore/types/waap/waap_statistics_series.py +16 -0
- gcore/types/waap/waap_tag.py +16 -0
- gcore/types/waap/waap_time_series_attack.py +23 -0
- gcore/types/waap/waap_top_session.py +24 -0
- gcore/types/waap/waap_top_url.py +13 -0
- gcore/types/waap/waap_top_user_agent.py +13 -0
- gcore/types/waap/waap_traffic_metrics.py +68 -0
- gcore/types/waap/waap_traffic_type.py +28 -0
- gcore/types/waap/waap_user_agent_details.py +40 -0
- {gcore-0.2.0.dist-info → gcore-0.4.0.dist-info}/METADATA +40 -3
- {gcore-0.2.0.dist-info → gcore-0.4.0.dist-info}/RECORD +312 -149
- gcore/types/cloud/baremetal/flavor_list_suitable_params.py +0 -22
- gcore/types/cloud/instances/flavor_list_for_resize_params.py +0 -16
- gcore/types/cloud/instances/flavor_list_suitable_params.py +0 -56
- {gcore-0.2.0.dist-info → gcore-0.4.0.dist-info}/WHEEL +0 -0
- {gcore-0.2.0.dist-info → gcore-0.4.0.dist-info}/licenses/LICENSE +0 -0
|
@@ -2,8 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
|
|
5
|
-
from typing import Iterable
|
|
6
|
-
|
|
7
5
|
import httpx
|
|
8
6
|
|
|
9
7
|
from ...._types import NOT_GIVEN, Body, Query, Headers, NotGiven
|
|
@@ -17,7 +15,7 @@ from ...._response import (
|
|
|
17
15
|
async_to_streamed_response_wrapper,
|
|
18
16
|
)
|
|
19
17
|
from ...._base_client import make_request_options
|
|
20
|
-
from ....types.cloud.instances import flavor_list_params
|
|
18
|
+
from ....types.cloud.instances import flavor_list_params
|
|
21
19
|
from ....types.cloud.instances.instance_flavor_list import InstanceFlavorList
|
|
22
20
|
|
|
23
21
|
__all__ = ["FlavorsResource", "AsyncFlavorsResource"]
|
|
@@ -59,11 +57,11 @@ class FlavorsResource(SyncAPIResource):
|
|
|
59
57
|
extra_body: Body | None = None,
|
|
60
58
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
61
59
|
) -> InstanceFlavorList:
|
|
62
|
-
"""Retrieve a list of flavors.
|
|
60
|
+
"""Retrieve a list of available instance flavors in the project and region.
|
|
63
61
|
|
|
64
|
-
When
|
|
65
|
-
specified, the list
|
|
66
|
-
as 0.
|
|
62
|
+
When
|
|
63
|
+
`include_prices` is specified, the list includes pricing information. Trial mode
|
|
64
|
+
clients see all prices as 0. Contact support for pricing errors.
|
|
67
65
|
|
|
68
66
|
Args:
|
|
69
67
|
disabled: Flag for filtering disabled flavors in the region. Defaults to true
|
|
@@ -106,104 +104,6 @@ class FlavorsResource(SyncAPIResource):
|
|
|
106
104
|
cast_to=InstanceFlavorList,
|
|
107
105
|
)
|
|
108
106
|
|
|
109
|
-
def list_for_resize(
|
|
110
|
-
self,
|
|
111
|
-
instance_id: str,
|
|
112
|
-
*,
|
|
113
|
-
project_id: int | None = None,
|
|
114
|
-
region_id: int | None = None,
|
|
115
|
-
include_prices: bool | NotGiven = NOT_GIVEN,
|
|
116
|
-
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
117
|
-
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
118
|
-
extra_headers: Headers | None = None,
|
|
119
|
-
extra_query: Query | None = None,
|
|
120
|
-
extra_body: Body | None = None,
|
|
121
|
-
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
122
|
-
) -> InstanceFlavorList:
|
|
123
|
-
"""
|
|
124
|
-
List suitable flavors for instance resize
|
|
125
|
-
|
|
126
|
-
Args:
|
|
127
|
-
include_prices: Set to true if flavor listing should include flavor prices
|
|
128
|
-
|
|
129
|
-
extra_headers: Send extra headers
|
|
130
|
-
|
|
131
|
-
extra_query: Add additional query parameters to the request
|
|
132
|
-
|
|
133
|
-
extra_body: Add additional JSON properties to the request
|
|
134
|
-
|
|
135
|
-
timeout: Override the client-level default timeout for this request, in seconds
|
|
136
|
-
"""
|
|
137
|
-
if project_id is None:
|
|
138
|
-
project_id = self._client._get_cloud_project_id_path_param()
|
|
139
|
-
if region_id is None:
|
|
140
|
-
region_id = self._client._get_cloud_region_id_path_param()
|
|
141
|
-
if not instance_id:
|
|
142
|
-
raise ValueError(f"Expected a non-empty value for `instance_id` but received {instance_id!r}")
|
|
143
|
-
return self._get(
|
|
144
|
-
f"/cloud/v1/instances/{project_id}/{region_id}/{instance_id}/available_flavors",
|
|
145
|
-
options=make_request_options(
|
|
146
|
-
extra_headers=extra_headers,
|
|
147
|
-
extra_query=extra_query,
|
|
148
|
-
extra_body=extra_body,
|
|
149
|
-
timeout=timeout,
|
|
150
|
-
query=maybe_transform(
|
|
151
|
-
{"include_prices": include_prices}, flavor_list_for_resize_params.FlavorListForResizeParams
|
|
152
|
-
),
|
|
153
|
-
),
|
|
154
|
-
cast_to=InstanceFlavorList,
|
|
155
|
-
)
|
|
156
|
-
|
|
157
|
-
def list_suitable(
|
|
158
|
-
self,
|
|
159
|
-
*,
|
|
160
|
-
project_id: int | None = None,
|
|
161
|
-
region_id: int | None = None,
|
|
162
|
-
volumes: Iterable[flavor_list_suitable_params.Volume],
|
|
163
|
-
include_prices: bool | NotGiven = NOT_GIVEN,
|
|
164
|
-
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
165
|
-
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
166
|
-
extra_headers: Headers | None = None,
|
|
167
|
-
extra_query: Query | None = None,
|
|
168
|
-
extra_body: Body | None = None,
|
|
169
|
-
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
170
|
-
) -> InstanceFlavorList:
|
|
171
|
-
"""List suitable flavors for instance creation
|
|
172
|
-
|
|
173
|
-
Args:
|
|
174
|
-
volumes: Volumes details.
|
|
175
|
-
|
|
176
|
-
Non-important info such as names may be omitted.
|
|
177
|
-
|
|
178
|
-
include_prices: Set to true if flavor listing should include flavor prices
|
|
179
|
-
|
|
180
|
-
extra_headers: Send extra headers
|
|
181
|
-
|
|
182
|
-
extra_query: Add additional query parameters to the request
|
|
183
|
-
|
|
184
|
-
extra_body: Add additional JSON properties to the request
|
|
185
|
-
|
|
186
|
-
timeout: Override the client-level default timeout for this request, in seconds
|
|
187
|
-
"""
|
|
188
|
-
if project_id is None:
|
|
189
|
-
project_id = self._client._get_cloud_project_id_path_param()
|
|
190
|
-
if region_id is None:
|
|
191
|
-
region_id = self._client._get_cloud_region_id_path_param()
|
|
192
|
-
return self._post(
|
|
193
|
-
f"/cloud/v1/instances/{project_id}/{region_id}/available_flavors",
|
|
194
|
-
body=maybe_transform({"volumes": volumes}, flavor_list_suitable_params.FlavorListSuitableParams),
|
|
195
|
-
options=make_request_options(
|
|
196
|
-
extra_headers=extra_headers,
|
|
197
|
-
extra_query=extra_query,
|
|
198
|
-
extra_body=extra_body,
|
|
199
|
-
timeout=timeout,
|
|
200
|
-
query=maybe_transform(
|
|
201
|
-
{"include_prices": include_prices}, flavor_list_suitable_params.FlavorListSuitableParams
|
|
202
|
-
),
|
|
203
|
-
),
|
|
204
|
-
cast_to=InstanceFlavorList,
|
|
205
|
-
)
|
|
206
|
-
|
|
207
107
|
|
|
208
108
|
class AsyncFlavorsResource(AsyncAPIResource):
|
|
209
109
|
@cached_property
|
|
@@ -241,11 +141,11 @@ class AsyncFlavorsResource(AsyncAPIResource):
|
|
|
241
141
|
extra_body: Body | None = None,
|
|
242
142
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
243
143
|
) -> InstanceFlavorList:
|
|
244
|
-
"""Retrieve a list of flavors.
|
|
144
|
+
"""Retrieve a list of available instance flavors in the project and region.
|
|
245
145
|
|
|
246
|
-
When
|
|
247
|
-
specified, the list
|
|
248
|
-
as 0.
|
|
146
|
+
When
|
|
147
|
+
`include_prices` is specified, the list includes pricing information. Trial mode
|
|
148
|
+
clients see all prices as 0. Contact support for pricing errors.
|
|
249
149
|
|
|
250
150
|
Args:
|
|
251
151
|
disabled: Flag for filtering disabled flavors in the region. Defaults to true
|
|
@@ -288,106 +188,6 @@ class AsyncFlavorsResource(AsyncAPIResource):
|
|
|
288
188
|
cast_to=InstanceFlavorList,
|
|
289
189
|
)
|
|
290
190
|
|
|
291
|
-
async def list_for_resize(
|
|
292
|
-
self,
|
|
293
|
-
instance_id: str,
|
|
294
|
-
*,
|
|
295
|
-
project_id: int | None = None,
|
|
296
|
-
region_id: int | None = None,
|
|
297
|
-
include_prices: bool | NotGiven = NOT_GIVEN,
|
|
298
|
-
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
299
|
-
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
300
|
-
extra_headers: Headers | None = None,
|
|
301
|
-
extra_query: Query | None = None,
|
|
302
|
-
extra_body: Body | None = None,
|
|
303
|
-
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
304
|
-
) -> InstanceFlavorList:
|
|
305
|
-
"""
|
|
306
|
-
List suitable flavors for instance resize
|
|
307
|
-
|
|
308
|
-
Args:
|
|
309
|
-
include_prices: Set to true if flavor listing should include flavor prices
|
|
310
|
-
|
|
311
|
-
extra_headers: Send extra headers
|
|
312
|
-
|
|
313
|
-
extra_query: Add additional query parameters to the request
|
|
314
|
-
|
|
315
|
-
extra_body: Add additional JSON properties to the request
|
|
316
|
-
|
|
317
|
-
timeout: Override the client-level default timeout for this request, in seconds
|
|
318
|
-
"""
|
|
319
|
-
if project_id is None:
|
|
320
|
-
project_id = self._client._get_cloud_project_id_path_param()
|
|
321
|
-
if region_id is None:
|
|
322
|
-
region_id = self._client._get_cloud_region_id_path_param()
|
|
323
|
-
if not instance_id:
|
|
324
|
-
raise ValueError(f"Expected a non-empty value for `instance_id` but received {instance_id!r}")
|
|
325
|
-
return await self._get(
|
|
326
|
-
f"/cloud/v1/instances/{project_id}/{region_id}/{instance_id}/available_flavors",
|
|
327
|
-
options=make_request_options(
|
|
328
|
-
extra_headers=extra_headers,
|
|
329
|
-
extra_query=extra_query,
|
|
330
|
-
extra_body=extra_body,
|
|
331
|
-
timeout=timeout,
|
|
332
|
-
query=await async_maybe_transform(
|
|
333
|
-
{"include_prices": include_prices}, flavor_list_for_resize_params.FlavorListForResizeParams
|
|
334
|
-
),
|
|
335
|
-
),
|
|
336
|
-
cast_to=InstanceFlavorList,
|
|
337
|
-
)
|
|
338
|
-
|
|
339
|
-
async def list_suitable(
|
|
340
|
-
self,
|
|
341
|
-
*,
|
|
342
|
-
project_id: int | None = None,
|
|
343
|
-
region_id: int | None = None,
|
|
344
|
-
volumes: Iterable[flavor_list_suitable_params.Volume],
|
|
345
|
-
include_prices: bool | NotGiven = NOT_GIVEN,
|
|
346
|
-
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
347
|
-
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
348
|
-
extra_headers: Headers | None = None,
|
|
349
|
-
extra_query: Query | None = None,
|
|
350
|
-
extra_body: Body | None = None,
|
|
351
|
-
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
352
|
-
) -> InstanceFlavorList:
|
|
353
|
-
"""List suitable flavors for instance creation
|
|
354
|
-
|
|
355
|
-
Args:
|
|
356
|
-
volumes: Volumes details.
|
|
357
|
-
|
|
358
|
-
Non-important info such as names may be omitted.
|
|
359
|
-
|
|
360
|
-
include_prices: Set to true if flavor listing should include flavor prices
|
|
361
|
-
|
|
362
|
-
extra_headers: Send extra headers
|
|
363
|
-
|
|
364
|
-
extra_query: Add additional query parameters to the request
|
|
365
|
-
|
|
366
|
-
extra_body: Add additional JSON properties to the request
|
|
367
|
-
|
|
368
|
-
timeout: Override the client-level default timeout for this request, in seconds
|
|
369
|
-
"""
|
|
370
|
-
if project_id is None:
|
|
371
|
-
project_id = self._client._get_cloud_project_id_path_param()
|
|
372
|
-
if region_id is None:
|
|
373
|
-
region_id = self._client._get_cloud_region_id_path_param()
|
|
374
|
-
return await self._post(
|
|
375
|
-
f"/cloud/v1/instances/{project_id}/{region_id}/available_flavors",
|
|
376
|
-
body=await async_maybe_transform(
|
|
377
|
-
{"volumes": volumes}, flavor_list_suitable_params.FlavorListSuitableParams
|
|
378
|
-
),
|
|
379
|
-
options=make_request_options(
|
|
380
|
-
extra_headers=extra_headers,
|
|
381
|
-
extra_query=extra_query,
|
|
382
|
-
extra_body=extra_body,
|
|
383
|
-
timeout=timeout,
|
|
384
|
-
query=await async_maybe_transform(
|
|
385
|
-
{"include_prices": include_prices}, flavor_list_suitable_params.FlavorListSuitableParams
|
|
386
|
-
),
|
|
387
|
-
),
|
|
388
|
-
cast_to=InstanceFlavorList,
|
|
389
|
-
)
|
|
390
|
-
|
|
391
191
|
|
|
392
192
|
class FlavorsResourceWithRawResponse:
|
|
393
193
|
def __init__(self, flavors: FlavorsResource) -> None:
|
|
@@ -396,12 +196,6 @@ class FlavorsResourceWithRawResponse:
|
|
|
396
196
|
self.list = to_raw_response_wrapper(
|
|
397
197
|
flavors.list,
|
|
398
198
|
)
|
|
399
|
-
self.list_for_resize = to_raw_response_wrapper(
|
|
400
|
-
flavors.list_for_resize,
|
|
401
|
-
)
|
|
402
|
-
self.list_suitable = to_raw_response_wrapper(
|
|
403
|
-
flavors.list_suitable,
|
|
404
|
-
)
|
|
405
199
|
|
|
406
200
|
|
|
407
201
|
class AsyncFlavorsResourceWithRawResponse:
|
|
@@ -411,12 +205,6 @@ class AsyncFlavorsResourceWithRawResponse:
|
|
|
411
205
|
self.list = async_to_raw_response_wrapper(
|
|
412
206
|
flavors.list,
|
|
413
207
|
)
|
|
414
|
-
self.list_for_resize = async_to_raw_response_wrapper(
|
|
415
|
-
flavors.list_for_resize,
|
|
416
|
-
)
|
|
417
|
-
self.list_suitable = async_to_raw_response_wrapper(
|
|
418
|
-
flavors.list_suitable,
|
|
419
|
-
)
|
|
420
208
|
|
|
421
209
|
|
|
422
210
|
class FlavorsResourceWithStreamingResponse:
|
|
@@ -426,12 +214,6 @@ class FlavorsResourceWithStreamingResponse:
|
|
|
426
214
|
self.list = to_streamed_response_wrapper(
|
|
427
215
|
flavors.list,
|
|
428
216
|
)
|
|
429
|
-
self.list_for_resize = to_streamed_response_wrapper(
|
|
430
|
-
flavors.list_for_resize,
|
|
431
|
-
)
|
|
432
|
-
self.list_suitable = to_streamed_response_wrapper(
|
|
433
|
-
flavors.list_suitable,
|
|
434
|
-
)
|
|
435
217
|
|
|
436
218
|
|
|
437
219
|
class AsyncFlavorsResourceWithStreamingResponse:
|
|
@@ -441,9 +223,3 @@ class AsyncFlavorsResourceWithStreamingResponse:
|
|
|
441
223
|
self.list = async_to_streamed_response_wrapper(
|
|
442
224
|
flavors.list,
|
|
443
225
|
)
|
|
444
|
-
self.list_for_resize = async_to_streamed_response_wrapper(
|
|
445
|
-
flavors.list_for_resize,
|
|
446
|
-
)
|
|
447
|
-
self.list_suitable = async_to_streamed_response_wrapper(
|
|
448
|
-
flavors.list_suitable,
|
|
449
|
-
)
|
|
@@ -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.
|