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,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
|
|
8
8
|
|
|
@@ -22,7 +22,6 @@ from ....pagination import SyncOffsetPage, AsyncOffsetPage
|
|
|
22
22
|
from ...._base_client import AsyncPaginator, make_request_options
|
|
23
23
|
from ....types.cloud.baremetal import server_list_params, server_create_params, server_rebuild_params
|
|
24
24
|
from ....types.cloud.task_id_list import TaskIDList
|
|
25
|
-
from ....types.cloud.tag_update_map_param import TagUpdateMapParam
|
|
26
25
|
from ....types.cloud.baremetal.baremetal_server import BaremetalServer
|
|
27
26
|
|
|
28
27
|
__all__ = ["ServersResource", "AsyncServersResource"]
|
|
@@ -63,7 +62,7 @@ class ServersResource(SyncAPIResource):
|
|
|
63
62
|
name_template: str | NotGiven = NOT_GIVEN,
|
|
64
63
|
password: str | NotGiven = NOT_GIVEN,
|
|
65
64
|
ssh_key_name: Optional[str] | NotGiven = NOT_GIVEN,
|
|
66
|
-
tags:
|
|
65
|
+
tags: Dict[str, str] | NotGiven = NOT_GIVEN,
|
|
67
66
|
user_data: str | NotGiven = NOT_GIVEN,
|
|
68
67
|
username: str | NotGiven = NOT_GIVEN,
|
|
69
68
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
@@ -73,22 +72,21 @@ class ServersResource(SyncAPIResource):
|
|
|
73
72
|
extra_body: Body | None = None,
|
|
74
73
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
75
74
|
) -> TaskIDList:
|
|
76
|
-
"""
|
|
77
|
-
|
|
75
|
+
"""Create a new bare metal server with the specified configuration.
|
|
76
|
+
|
|
77
|
+
How to get
|
|
78
|
+
access: For Linux,
|
|
78
79
|
|
|
79
80
|
- Use the `user_data` field to provide a
|
|
80
|
-
|
|
81
|
-
|
|
81
|
+
[cloud-init script](https://cloudinit.readthedocs.io/en/latest/reference/examples.html)
|
|
82
|
+
in base64 to apply configurations to the instance.
|
|
82
83
|
- Specify the `username` and `password` to create a new user.
|
|
83
84
|
- When only `password` is provided, it is set as the password for the default
|
|
84
85
|
user of the image.
|
|
85
|
-
- The `user_data` is ignored when the `password` is specified.
|
|
86
|
-
|
|
87
|
-
For Windows,
|
|
88
|
-
|
|
86
|
+
- The `user_data` is ignored when the `password` is specified. For Windows,
|
|
89
87
|
- Use the `user_data` field to provide a
|
|
90
|
-
|
|
91
|
-
|
|
88
|
+
[cloudbase-init script](https://cloudbase-init.readthedocs.io/en/latest/userdata.html#cloud-config)
|
|
89
|
+
in base64 to create new users on Windows.
|
|
92
90
|
- Use the `password` field to set the password for the 'Admin' user on Windows.
|
|
93
91
|
- The password of the Admin user cannot be updated via `user_data`.
|
|
94
92
|
- The `username` cannot be specified in the request.
|
|
@@ -117,18 +115,18 @@ class ServersResource(SyncAPIResource):
|
|
|
117
115
|
name_template: If you want server names to be automatically generated based on IP addresses,
|
|
118
116
|
you can provide a name template instead of specifying the name manually. The
|
|
119
117
|
template should include a placeholder that will be replaced during provisioning.
|
|
120
|
-
Supported placeholders are: `{ip_octets}` (last 3 octets of the IP),
|
|
121
|
-
`{two_ip_octets}`, and `{one_ip_octet}`.
|
|
118
|
+
Supported placeholders are: `{`ip_octets`}` (last 3 octets of the IP),
|
|
119
|
+
`{`two_ip_octets`}`, and `{`one_ip_octet`}`.
|
|
122
120
|
|
|
123
121
|
password: For Linux instances, 'username' and 'password' are used to create a new user.
|
|
124
122
|
When only 'password' is provided, it is set as the password for the default user
|
|
125
123
|
of the image. For Windows instances, 'username' cannot be specified. Use the
|
|
126
124
|
'password' field to set the password for the 'Admin' user on Windows. Use the
|
|
127
|
-
'user_data' field to provide a script to create new users on Windows. The
|
|
128
|
-
password of the Admin user cannot be updated via 'user_data'.
|
|
125
|
+
'`user_data`' field to provide a script to create new users on Windows. The
|
|
126
|
+
password of the Admin user cannot be updated via '`user_data`'.
|
|
129
127
|
|
|
130
128
|
ssh_key_name: Specifies the name of the SSH keypair, created via the
|
|
131
|
-
|
|
129
|
+
[/v1/`ssh_keys` endpoint](/docs/api-reference/ssh-keys/add-or-generate-ssh-key).
|
|
132
130
|
|
|
133
131
|
tags: Key-value tags to associate with the resource. A tag is a key-value pair that
|
|
134
132
|
can be associated with a resource, enabling efficient filtering and grouping for
|
|
@@ -136,10 +134,10 @@ class ServersResource(SyncAPIResource):
|
|
|
136
134
|
modified by the user. Tags are also integrated with cost reports, allowing cost
|
|
137
135
|
data to be filtered based on tag keys or values.
|
|
138
136
|
|
|
139
|
-
user_data: String in base64 format. For Linux instances, 'user_data' is ignored when
|
|
137
|
+
user_data: String in base64 format. For Linux instances, '`user_data`' is ignored when
|
|
140
138
|
'password' field is provided. For Windows instances, Admin user password is set
|
|
141
|
-
by 'password' field and cannot be updated via 'user_data'. Examples of the
|
|
142
|
-
user_data
|
|
139
|
+
by 'password' field and cannot be updated via '`user_data`'. Examples of the
|
|
140
|
+
`user_data`: https://cloudinit.readthedocs.io/en/latest/topics/examples.html
|
|
143
141
|
|
|
144
142
|
username: For Linux instances, 'username' and 'password' are used to create a new user.
|
|
145
143
|
For Windows instances, 'username' cannot be specified. Use 'password' field to
|
|
@@ -220,8 +218,10 @@ class ServersResource(SyncAPIResource):
|
|
|
220
218
|
extra_body: Body | None = None,
|
|
221
219
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
222
220
|
) -> SyncOffsetPage[BaremetalServer]:
|
|
223
|
-
"""
|
|
224
|
-
|
|
221
|
+
"""List all bare metal servers in the specified project and region.
|
|
222
|
+
|
|
223
|
+
Results can be
|
|
224
|
+
filtered by various parameters like name, status, and IP address.
|
|
225
225
|
|
|
226
226
|
Args:
|
|
227
227
|
project_id: Project ID
|
|
@@ -233,9 +233,9 @@ class ServersResource(SyncAPIResource):
|
|
|
233
233
|
changes_since: Filters the instances by a date and time stamp when the instances last changed
|
|
234
234
|
status.
|
|
235
235
|
|
|
236
|
-
flavor_id: Filter out instances by flavor_id
|
|
236
|
+
flavor_id: Filter out instances by `flavor_id`. Flavor id must match exactly.
|
|
237
237
|
|
|
238
|
-
flavor_prefix: Filter out instances by flavor_prefix
|
|
238
|
+
flavor_prefix: Filter out instances by `flavor_prefix`.
|
|
239
239
|
|
|
240
240
|
include_k8s: Include managed k8s worker nodes
|
|
241
241
|
|
|
@@ -258,22 +258,20 @@ class ServersResource(SyncAPIResource):
|
|
|
258
258
|
|
|
259
259
|
order_by: Order by field and direction.
|
|
260
260
|
|
|
261
|
-
profile_name: Filter result by ddos protection profile name. Effective only with with_ddos
|
|
262
|
-
to true.
|
|
261
|
+
profile_name: Filter result by ddos protection profile name. Effective only with `with_ddos`
|
|
262
|
+
set to true.
|
|
263
263
|
|
|
264
|
-
protection_status: Filter result by DDoS protection_status
|
|
265
|
-
true. (Active, Queued or Error)
|
|
264
|
+
protection_status: Filter result by DDoS `protection_status`. Effective only with `with_ddos` set
|
|
265
|
+
to true. (Active, Queued or Error)
|
|
266
266
|
|
|
267
267
|
status: Filters instances by a server status, as a string.
|
|
268
268
|
|
|
269
|
-
tag_key_value: Optional. Filter by tag key-value pairs.
|
|
270
|
-
"tag_key_value={"key": "value"}" --url
|
|
271
|
-
"https://example.com/cloud/v1/resource/1/1"
|
|
269
|
+
tag_key_value: Optional. Filter by tag key-value pairs.
|
|
272
270
|
|
|
273
|
-
tag_value: Optional. Filter by tag values.
|
|
271
|
+
tag_value: Optional. Filter by tag values. ?`tag_value`=value1&`tag_value`=value2
|
|
274
272
|
|
|
275
273
|
type_ddos_profile: Return bare metals either only with advanced or only basic DDoS protection.
|
|
276
|
-
Effective only with with_ddos set to true. (advanced or basic)
|
|
274
|
+
Effective only with `with_ddos` set to true. (advanced or basic)
|
|
277
275
|
|
|
278
276
|
uuid: Filter the server list result by the UUID of the server. Allowed UUID part
|
|
279
277
|
|
|
@@ -349,13 +347,13 @@ class ServersResource(SyncAPIResource):
|
|
|
349
347
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
350
348
|
) -> TaskIDList:
|
|
351
349
|
"""
|
|
352
|
-
Rebuild bare metal server
|
|
350
|
+
Rebuild a bare metal server with a new image while preserving its configuration.
|
|
353
351
|
|
|
354
352
|
Args:
|
|
355
353
|
image_id: Image ID
|
|
356
354
|
|
|
357
355
|
user_data: String in base64 format. Must not be passed together with 'username' or
|
|
358
|
-
'password'. Examples of the user_data
|
|
356
|
+
'password'. Examples of the `user_data`:
|
|
359
357
|
https://cloudinit.readthedocs.io/en/latest/topics/examples.html
|
|
360
358
|
|
|
361
359
|
extra_headers: Send extra headers
|
|
@@ -402,7 +400,7 @@ class ServersResource(SyncAPIResource):
|
|
|
402
400
|
name_template: str | NotGiven = NOT_GIVEN,
|
|
403
401
|
password: str | NotGiven = NOT_GIVEN,
|
|
404
402
|
ssh_key_name: Optional[str] | NotGiven = NOT_GIVEN,
|
|
405
|
-
tags:
|
|
403
|
+
tags: Dict[str, str] | NotGiven = NOT_GIVEN,
|
|
406
404
|
user_data: str | NotGiven = NOT_GIVEN,
|
|
407
405
|
username: str | NotGiven = NOT_GIVEN,
|
|
408
406
|
polling_interval_seconds: int | NotGiven = NOT_GIVEN,
|
|
@@ -486,7 +484,7 @@ class ServersResource(SyncAPIResource):
|
|
|
486
484
|
extra_body=extra_body,
|
|
487
485
|
)
|
|
488
486
|
if not response.tasks:
|
|
489
|
-
raise ValueError("Expected at least one task to be created")
|
|
487
|
+
raise ValueError("Expected at least one task to be created")
|
|
490
488
|
self._client.cloud.tasks.poll(
|
|
491
489
|
response.tasks[0],
|
|
492
490
|
extra_headers=extra_headers,
|
|
@@ -504,7 +502,7 @@ class ServersResource(SyncAPIResource):
|
|
|
504
502
|
raise ValueError(f"Server {server_id} not found")
|
|
505
503
|
return servers.results[0]
|
|
506
504
|
|
|
507
|
-
|
|
505
|
+
|
|
508
506
|
class AsyncServersResource(AsyncAPIResource):
|
|
509
507
|
@cached_property
|
|
510
508
|
def with_raw_response(self) -> AsyncServersResourceWithRawResponse:
|
|
@@ -540,7 +538,7 @@ class AsyncServersResource(AsyncAPIResource):
|
|
|
540
538
|
name_template: str | NotGiven = NOT_GIVEN,
|
|
541
539
|
password: str | NotGiven = NOT_GIVEN,
|
|
542
540
|
ssh_key_name: Optional[str] | NotGiven = NOT_GIVEN,
|
|
543
|
-
tags:
|
|
541
|
+
tags: Dict[str, str] | NotGiven = NOT_GIVEN,
|
|
544
542
|
user_data: str | NotGiven = NOT_GIVEN,
|
|
545
543
|
username: str | NotGiven = NOT_GIVEN,
|
|
546
544
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
@@ -550,22 +548,21 @@ class AsyncServersResource(AsyncAPIResource):
|
|
|
550
548
|
extra_body: Body | None = None,
|
|
551
549
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
552
550
|
) -> TaskIDList:
|
|
553
|
-
"""
|
|
554
|
-
|
|
551
|
+
"""Create a new bare metal server with the specified configuration.
|
|
552
|
+
|
|
553
|
+
How to get
|
|
554
|
+
access: For Linux,
|
|
555
555
|
|
|
556
556
|
- Use the `user_data` field to provide a
|
|
557
|
-
|
|
558
|
-
|
|
557
|
+
[cloud-init script](https://cloudinit.readthedocs.io/en/latest/reference/examples.html)
|
|
558
|
+
in base64 to apply configurations to the instance.
|
|
559
559
|
- Specify the `username` and `password` to create a new user.
|
|
560
560
|
- When only `password` is provided, it is set as the password for the default
|
|
561
561
|
user of the image.
|
|
562
|
-
- The `user_data` is ignored when the `password` is specified.
|
|
563
|
-
|
|
564
|
-
For Windows,
|
|
565
|
-
|
|
562
|
+
- The `user_data` is ignored when the `password` is specified. For Windows,
|
|
566
563
|
- Use the `user_data` field to provide a
|
|
567
|
-
|
|
568
|
-
|
|
564
|
+
[cloudbase-init script](https://cloudbase-init.readthedocs.io/en/latest/userdata.html#cloud-config)
|
|
565
|
+
in base64 to create new users on Windows.
|
|
569
566
|
- Use the `password` field to set the password for the 'Admin' user on Windows.
|
|
570
567
|
- The password of the Admin user cannot be updated via `user_data`.
|
|
571
568
|
- The `username` cannot be specified in the request.
|
|
@@ -594,18 +591,18 @@ class AsyncServersResource(AsyncAPIResource):
|
|
|
594
591
|
name_template: If you want server names to be automatically generated based on IP addresses,
|
|
595
592
|
you can provide a name template instead of specifying the name manually. The
|
|
596
593
|
template should include a placeholder that will be replaced during provisioning.
|
|
597
|
-
Supported placeholders are: `{ip_octets}` (last 3 octets of the IP),
|
|
598
|
-
`{two_ip_octets}`, and `{one_ip_octet}`.
|
|
594
|
+
Supported placeholders are: `{`ip_octets`}` (last 3 octets of the IP),
|
|
595
|
+
`{`two_ip_octets`}`, and `{`one_ip_octet`}`.
|
|
599
596
|
|
|
600
597
|
password: For Linux instances, 'username' and 'password' are used to create a new user.
|
|
601
598
|
When only 'password' is provided, it is set as the password for the default user
|
|
602
599
|
of the image. For Windows instances, 'username' cannot be specified. Use the
|
|
603
600
|
'password' field to set the password for the 'Admin' user on Windows. Use the
|
|
604
|
-
'user_data' field to provide a script to create new users on Windows. The
|
|
605
|
-
password of the Admin user cannot be updated via 'user_data'.
|
|
601
|
+
'`user_data`' field to provide a script to create new users on Windows. The
|
|
602
|
+
password of the Admin user cannot be updated via '`user_data`'.
|
|
606
603
|
|
|
607
604
|
ssh_key_name: Specifies the name of the SSH keypair, created via the
|
|
608
|
-
|
|
605
|
+
[/v1/`ssh_keys` endpoint](/docs/api-reference/ssh-keys/add-or-generate-ssh-key).
|
|
609
606
|
|
|
610
607
|
tags: Key-value tags to associate with the resource. A tag is a key-value pair that
|
|
611
608
|
can be associated with a resource, enabling efficient filtering and grouping for
|
|
@@ -613,10 +610,10 @@ class AsyncServersResource(AsyncAPIResource):
|
|
|
613
610
|
modified by the user. Tags are also integrated with cost reports, allowing cost
|
|
614
611
|
data to be filtered based on tag keys or values.
|
|
615
612
|
|
|
616
|
-
user_data: String in base64 format. For Linux instances, 'user_data' is ignored when
|
|
613
|
+
user_data: String in base64 format. For Linux instances, '`user_data`' is ignored when
|
|
617
614
|
'password' field is provided. For Windows instances, Admin user password is set
|
|
618
|
-
by 'password' field and cannot be updated via 'user_data'. Examples of the
|
|
619
|
-
user_data
|
|
615
|
+
by 'password' field and cannot be updated via '`user_data`'. Examples of the
|
|
616
|
+
`user_data`: https://cloudinit.readthedocs.io/en/latest/topics/examples.html
|
|
620
617
|
|
|
621
618
|
username: For Linux instances, 'username' and 'password' are used to create a new user.
|
|
622
619
|
For Windows instances, 'username' cannot be specified. Use 'password' field to
|
|
@@ -697,8 +694,10 @@ class AsyncServersResource(AsyncAPIResource):
|
|
|
697
694
|
extra_body: Body | None = None,
|
|
698
695
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
699
696
|
) -> AsyncPaginator[BaremetalServer, AsyncOffsetPage[BaremetalServer]]:
|
|
700
|
-
"""
|
|
701
|
-
|
|
697
|
+
"""List all bare metal servers in the specified project and region.
|
|
698
|
+
|
|
699
|
+
Results can be
|
|
700
|
+
filtered by various parameters like name, status, and IP address.
|
|
702
701
|
|
|
703
702
|
Args:
|
|
704
703
|
project_id: Project ID
|
|
@@ -710,9 +709,9 @@ class AsyncServersResource(AsyncAPIResource):
|
|
|
710
709
|
changes_since: Filters the instances by a date and time stamp when the instances last changed
|
|
711
710
|
status.
|
|
712
711
|
|
|
713
|
-
flavor_id: Filter out instances by flavor_id
|
|
712
|
+
flavor_id: Filter out instances by `flavor_id`. Flavor id must match exactly.
|
|
714
713
|
|
|
715
|
-
flavor_prefix: Filter out instances by flavor_prefix
|
|
714
|
+
flavor_prefix: Filter out instances by `flavor_prefix`.
|
|
716
715
|
|
|
717
716
|
include_k8s: Include managed k8s worker nodes
|
|
718
717
|
|
|
@@ -735,22 +734,20 @@ class AsyncServersResource(AsyncAPIResource):
|
|
|
735
734
|
|
|
736
735
|
order_by: Order by field and direction.
|
|
737
736
|
|
|
738
|
-
profile_name: Filter result by ddos protection profile name. Effective only with with_ddos
|
|
739
|
-
to true.
|
|
737
|
+
profile_name: Filter result by ddos protection profile name. Effective only with `with_ddos`
|
|
738
|
+
set to true.
|
|
740
739
|
|
|
741
|
-
protection_status: Filter result by DDoS protection_status
|
|
742
|
-
true. (Active, Queued or Error)
|
|
740
|
+
protection_status: Filter result by DDoS `protection_status`. Effective only with `with_ddos` set
|
|
741
|
+
to true. (Active, Queued or Error)
|
|
743
742
|
|
|
744
743
|
status: Filters instances by a server status, as a string.
|
|
745
744
|
|
|
746
|
-
tag_key_value: Optional. Filter by tag key-value pairs.
|
|
747
|
-
"tag_key_value={"key": "value"}" --url
|
|
748
|
-
"https://example.com/cloud/v1/resource/1/1"
|
|
745
|
+
tag_key_value: Optional. Filter by tag key-value pairs.
|
|
749
746
|
|
|
750
|
-
tag_value: Optional. Filter by tag values.
|
|
747
|
+
tag_value: Optional. Filter by tag values. ?`tag_value`=value1&`tag_value`=value2
|
|
751
748
|
|
|
752
749
|
type_ddos_profile: Return bare metals either only with advanced or only basic DDoS protection.
|
|
753
|
-
Effective only with with_ddos set to true. (advanced or basic)
|
|
750
|
+
Effective only with `with_ddos` set to true. (advanced or basic)
|
|
754
751
|
|
|
755
752
|
uuid: Filter the server list result by the UUID of the server. Allowed UUID part
|
|
756
753
|
|
|
@@ -826,13 +823,13 @@ class AsyncServersResource(AsyncAPIResource):
|
|
|
826
823
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
827
824
|
) -> TaskIDList:
|
|
828
825
|
"""
|
|
829
|
-
Rebuild bare metal server
|
|
826
|
+
Rebuild a bare metal server with a new image while preserving its configuration.
|
|
830
827
|
|
|
831
828
|
Args:
|
|
832
829
|
image_id: Image ID
|
|
833
830
|
|
|
834
831
|
user_data: String in base64 format. Must not be passed together with 'username' or
|
|
835
|
-
'password'. Examples of the user_data
|
|
832
|
+
'password'. Examples of the `user_data`:
|
|
836
833
|
https://cloudinit.readthedocs.io/en/latest/topics/examples.html
|
|
837
834
|
|
|
838
835
|
extra_headers: Send extra headers
|
|
@@ -879,7 +876,7 @@ class AsyncServersResource(AsyncAPIResource):
|
|
|
879
876
|
name_template: str | NotGiven = NOT_GIVEN,
|
|
880
877
|
password: str | NotGiven = NOT_GIVEN,
|
|
881
878
|
ssh_key_name: Optional[str] | NotGiven = NOT_GIVEN,
|
|
882
|
-
tags:
|
|
879
|
+
tags: Dict[str, str] | NotGiven = NOT_GIVEN,
|
|
883
880
|
user_data: str | NotGiven = NOT_GIVEN,
|
|
884
881
|
username: str | NotGiven = NOT_GIVEN,
|
|
885
882
|
polling_interval_seconds: int | NotGiven = NOT_GIVEN,
|
|
@@ -913,8 +910,8 @@ class AsyncServersResource(AsyncAPIResource):
|
|
|
913
910
|
extra_body=extra_body,
|
|
914
911
|
)
|
|
915
912
|
if not response.tasks or len(response.tasks) != 1:
|
|
916
|
-
raise ValueError(f"Expected exactly one task to be created")
|
|
917
|
-
task =await self._client.cloud.tasks.poll(
|
|
913
|
+
raise ValueError(f"Expected exactly one task to be created")
|
|
914
|
+
task = await self._client.cloud.tasks.poll(
|
|
918
915
|
response.tasks[0],
|
|
919
916
|
extra_headers=extra_headers,
|
|
920
917
|
polling_interval_seconds=polling_interval_seconds,
|
|
@@ -963,7 +960,7 @@ class AsyncServersResource(AsyncAPIResource):
|
|
|
963
960
|
extra_body=extra_body,
|
|
964
961
|
)
|
|
965
962
|
if not response.tasks:
|
|
966
|
-
raise ValueError("Expected at least one task to be created")
|
|
963
|
+
raise ValueError("Expected at least one task to be created")
|
|
967
964
|
await self._client.cloud.tasks.poll(
|
|
968
965
|
response.tasks[0],
|
|
969
966
|
extra_headers=extra_headers,
|
|
@@ -979,7 +976,7 @@ class AsyncServersResource(AsyncAPIResource):
|
|
|
979
976
|
)
|
|
980
977
|
if len(servers.results) != 1:
|
|
981
978
|
raise ValueError(f"Server {server_id} not found")
|
|
982
|
-
return servers.results[0]
|
|
979
|
+
return servers.results[0]
|
|
983
980
|
|
|
984
981
|
|
|
985
982
|
class ServersResourceWithRawResponse:
|
|
@@ -160,7 +160,7 @@ class BillingReservationsResource(SyncAPIResource):
|
|
|
160
160
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
161
161
|
) -> BillingReservation:
|
|
162
162
|
"""
|
|
163
|
-
Get
|
|
163
|
+
Get reservation
|
|
164
164
|
|
|
165
165
|
Args:
|
|
166
166
|
reservation_id: ID of the reservation
|
|
@@ -316,7 +316,7 @@ class AsyncBillingReservationsResource(AsyncAPIResource):
|
|
|
316
316
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
317
317
|
) -> BillingReservation:
|
|
318
318
|
"""
|
|
319
|
-
Get
|
|
319
|
+
Get reservation
|
|
320
320
|
|
|
321
321
|
Args:
|
|
322
322
|
reservation_id: ID of the reservation
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
|
|
5
|
-
from typing import Iterable
|
|
5
|
+
from typing import Dict, Iterable
|
|
6
6
|
from typing_extensions import Literal, overload
|
|
7
7
|
|
|
8
8
|
import httpx
|
|
@@ -35,7 +35,6 @@ from ....types.cloud import (
|
|
|
35
35
|
from ...._base_client import AsyncPaginator, make_request_options
|
|
36
36
|
from ....types.cloud.file_share import FileShare
|
|
37
37
|
from ....types.cloud.task_id_list import TaskIDList
|
|
38
|
-
from ....types.cloud.tag_update_map_param import TagUpdateMapParam
|
|
39
38
|
|
|
40
39
|
__all__ = ["FileSharesResource", "AsyncFileSharesResource"]
|
|
41
40
|
|
|
@@ -75,7 +74,7 @@ class FileSharesResource(SyncAPIResource):
|
|
|
75
74
|
protocol: Literal["NFS"],
|
|
76
75
|
size: int,
|
|
77
76
|
access: Iterable[file_share_create_params.CreateStandardFileShareSerializerAccess] | NotGiven = NOT_GIVEN,
|
|
78
|
-
tags:
|
|
77
|
+
tags: Dict[str, str] | NotGiven = NOT_GIVEN,
|
|
79
78
|
volume_type: Literal["default_share_type"] | NotGiven = NOT_GIVEN,
|
|
80
79
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
81
80
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
@@ -130,7 +129,7 @@ class FileSharesResource(SyncAPIResource):
|
|
|
130
129
|
protocol: Literal["NFS"],
|
|
131
130
|
size: int,
|
|
132
131
|
volume_type: Literal["vast_share_type"],
|
|
133
|
-
tags:
|
|
132
|
+
tags: Dict[str, str] | NotGiven = NOT_GIVEN,
|
|
134
133
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
135
134
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
136
135
|
extra_headers: Headers | None = None,
|
|
@@ -181,7 +180,7 @@ class FileSharesResource(SyncAPIResource):
|
|
|
181
180
|
protocol: Literal["NFS"],
|
|
182
181
|
size: int,
|
|
183
182
|
access: Iterable[file_share_create_params.CreateStandardFileShareSerializerAccess] | NotGiven = NOT_GIVEN,
|
|
184
|
-
tags:
|
|
183
|
+
tags: Dict[str, str] | NotGiven = NOT_GIVEN,
|
|
185
184
|
volume_type: Literal["default_share_type"] | Literal["vast_share_type"] | NotGiven = NOT_GIVEN,
|
|
186
185
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
187
186
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
@@ -504,7 +503,7 @@ class AsyncFileSharesResource(AsyncAPIResource):
|
|
|
504
503
|
protocol: Literal["NFS"],
|
|
505
504
|
size: int,
|
|
506
505
|
access: Iterable[file_share_create_params.CreateStandardFileShareSerializerAccess] | NotGiven = NOT_GIVEN,
|
|
507
|
-
tags:
|
|
506
|
+
tags: Dict[str, str] | NotGiven = NOT_GIVEN,
|
|
508
507
|
volume_type: Literal["default_share_type"] | NotGiven = NOT_GIVEN,
|
|
509
508
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
510
509
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
@@ -559,7 +558,7 @@ class AsyncFileSharesResource(AsyncAPIResource):
|
|
|
559
558
|
protocol: Literal["NFS"],
|
|
560
559
|
size: int,
|
|
561
560
|
volume_type: Literal["vast_share_type"],
|
|
562
|
-
tags:
|
|
561
|
+
tags: Dict[str, str] | NotGiven = NOT_GIVEN,
|
|
563
562
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
564
563
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
565
564
|
extra_headers: Headers | None = None,
|
|
@@ -610,7 +609,7 @@ class AsyncFileSharesResource(AsyncAPIResource):
|
|
|
610
609
|
protocol: Literal["NFS"],
|
|
611
610
|
size: int,
|
|
612
611
|
access: Iterable[file_share_create_params.CreateStandardFileShareSerializerAccess] | NotGiven = NOT_GIVEN,
|
|
613
|
-
tags:
|
|
612
|
+
tags: Dict[str, str] | NotGiven = NOT_GIVEN,
|
|
614
613
|
volume_type: Literal["default_share_type"] | Literal["vast_share_type"] | NotGiven = NOT_GIVEN,
|
|
615
614
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
616
615
|
# 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, Optional
|
|
5
|
+
from typing import Dict, List, Optional
|
|
6
6
|
|
|
7
7
|
import httpx
|
|
8
8
|
|
|
@@ -22,7 +22,6 @@ from ..._base_client import AsyncPaginator, make_request_options
|
|
|
22
22
|
from ...types.cloud.floating_ip import FloatingIP
|
|
23
23
|
from ...types.cloud.task_id_list import TaskIDList
|
|
24
24
|
from ...types.cloud.floating_ip_detailed import FloatingIPDetailed
|
|
25
|
-
from ...types.cloud.tag_update_map_param import TagUpdateMapParam
|
|
26
25
|
|
|
27
26
|
__all__ = ["FloatingIPsResource", "AsyncFloatingIPsResource"]
|
|
28
27
|
|
|
@@ -54,7 +53,7 @@ class FloatingIPsResource(SyncAPIResource):
|
|
|
54
53
|
region_id: int | None = None,
|
|
55
54
|
fixed_ip_address: Optional[str] | NotGiven = NOT_GIVEN,
|
|
56
55
|
port_id: Optional[str] | NotGiven = NOT_GIVEN,
|
|
57
|
-
tags:
|
|
56
|
+
tags: Dict[str, str] | NotGiven = NOT_GIVEN,
|
|
58
57
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
59
58
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
60
59
|
extra_headers: Headers | None = None,
|
|
@@ -139,11 +138,9 @@ class FloatingIPsResource(SyncAPIResource):
|
|
|
139
138
|
offset: Optional. Offset value is used to exclude the first set of records from the
|
|
140
139
|
result
|
|
141
140
|
|
|
142
|
-
tag_key: Optional. Filter by tag keys.
|
|
141
|
+
tag_key: Optional. Filter by tag keys. ?`tag_key`=key1&`tag_key`=key2
|
|
143
142
|
|
|
144
|
-
tag_key_value: Optional. Filter by tag key-value pairs.
|
|
145
|
-
"tag_key_value={"key": "value"}" --url
|
|
146
|
-
"https://example.com/cloud/v1/resource/1/1"
|
|
143
|
+
tag_key_value: Optional. Filter by tag key-value pairs.
|
|
147
144
|
|
|
148
145
|
extra_headers: Send extra headers
|
|
149
146
|
|
|
@@ -322,7 +319,7 @@ class FloatingIPsResource(SyncAPIResource):
|
|
|
322
319
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
323
320
|
) -> FloatingIP:
|
|
324
321
|
"""
|
|
325
|
-
Unassign floating IP
|
|
322
|
+
Unassign floating IP
|
|
326
323
|
|
|
327
324
|
Args:
|
|
328
325
|
extra_headers: Send extra headers
|
|
@@ -375,7 +372,7 @@ class AsyncFloatingIPsResource(AsyncAPIResource):
|
|
|
375
372
|
region_id: int | None = None,
|
|
376
373
|
fixed_ip_address: Optional[str] | NotGiven = NOT_GIVEN,
|
|
377
374
|
port_id: Optional[str] | NotGiven = NOT_GIVEN,
|
|
378
|
-
tags:
|
|
375
|
+
tags: Dict[str, str] | NotGiven = NOT_GIVEN,
|
|
379
376
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
380
377
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
381
378
|
extra_headers: Headers | None = None,
|
|
@@ -460,11 +457,9 @@ class AsyncFloatingIPsResource(AsyncAPIResource):
|
|
|
460
457
|
offset: Optional. Offset value is used to exclude the first set of records from the
|
|
461
458
|
result
|
|
462
459
|
|
|
463
|
-
tag_key: Optional. Filter by tag keys.
|
|
460
|
+
tag_key: Optional. Filter by tag keys. ?`tag_key`=key1&`tag_key`=key2
|
|
464
461
|
|
|
465
|
-
tag_key_value: Optional. Filter by tag key-value pairs.
|
|
466
|
-
"tag_key_value={"key": "value"}" --url
|
|
467
|
-
"https://example.com/cloud/v1/resource/1/1"
|
|
462
|
+
tag_key_value: Optional. Filter by tag key-value pairs.
|
|
468
463
|
|
|
469
464
|
extra_headers: Send extra headers
|
|
470
465
|
|
|
@@ -643,7 +638,7 @@ class AsyncFloatingIPsResource(AsyncAPIResource):
|
|
|
643
638
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
644
639
|
) -> FloatingIP:
|
|
645
640
|
"""
|
|
646
|
-
Unassign floating IP
|
|
641
|
+
Unassign floating IP
|
|
647
642
|
|
|
648
643
|
Args:
|
|
649
644
|
extra_headers: Send extra headers
|