hyperstack 1.25.0a0__py3-none-any.whl → 1.41.2a0__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.
- hyperstack/__init__.py +80 -131
- hyperstack/api/__init__.py +2 -0
- hyperstack/api/alive_api.py +240 -0
- hyperstack/api/api_key_api.py +16 -20
- hyperstack/api/assigning_member_role_api.py +15 -17
- hyperstack/api/auth_api.py +1050 -5
- hyperstack/api/beta_access_api.py +856 -0
- hyperstack/api/billing_api.py +6461 -673
- hyperstack/api/calculate_api.py +8 -9
- hyperstack/api/callbacks_api.py +120 -126
- hyperstack/api/cluster_events_api.py +1 -2
- hyperstack/api/clusters_api.py +2816 -199
- hyperstack/api/compliance_api.py +14 -18
- hyperstack/api/credit_api.py +17 -15
- hyperstack/api/customer_contract_api.py +30 -33
- hyperstack/api/dashboard_api.py +4 -5
- hyperstack/api/deployment_api.py +4 -8
- hyperstack/api/environment_api.py +285 -16
- hyperstack/api/firewall_attachment_api.py +11 -9
- hyperstack/api/firewalls_api.py +341 -347
- hyperstack/api/flavor_api.py +4 -5
- hyperstack/api/floating_ip_api.py +50 -49
- hyperstack/api/gpu_api.py +1 -2
- hyperstack/api/image_api.py +35 -39
- hyperstack/api/invite_api.py +288 -18
- hyperstack/api/keypair_api.py +22 -26
- hyperstack/api/organization_api.py +12 -15
- hyperstack/api/partner_config_api.py +564 -0
- hyperstack/api/payment_api.py +299 -18
- hyperstack/api/permission_api.py +4 -5
- hyperstack/api/policy_api.py +4 -5
- hyperstack/api/pricebook_api.py +14 -12
- hyperstack/api/profile_api.py +13 -17
- hyperstack/api/rbac_role_api.py +20 -25
- hyperstack/api/region_api.py +7 -8
- hyperstack/api/security_rules_api.py +1 -2
- hyperstack/api/snapshot_events_api.py +1 -2
- hyperstack/api/snapshots_api.py +166 -172
- hyperstack/api/stock_api.py +4 -5
- hyperstack/api/template_api.py +14 -19
- hyperstack/api/user_api.py +55 -49
- hyperstack/api/user_detail_choice_api.py +1 -2
- hyperstack/api/user_permission_api.py +8 -10
- hyperstack/api/virtual_machine_api.py +1529 -929
- hyperstack/api/virtual_machine_events_api.py +21 -22
- hyperstack/api/vnc_url_api.py +54 -50
- hyperstack/api/volume_api.py +340 -40
- hyperstack/api/volume_attachment_api.py +342 -42
- hyperstack/api_client.py +1 -1
- hyperstack/configuration.py +1 -11
- hyperstack/models/__init__.py +77 -130
- hyperstack/models/{environment_fieldsfor_volume.py → access_token_field.py} +7 -7
- hyperstack/models/attach_volume_fields.py +6 -2
- hyperstack/models/attach_volumes_payload.py +4 -2
- hyperstack/models/{virtual_machine_usage.py → attachments_fields_for_volume.py} +13 -11
- hyperstack/models/{flavor_vm_fields.py → attributes.py} +15 -18
- hyperstack/models/auth_get_token_response_model.py +4 -6
- hyperstack/models/{future_node_model.py → beta_access_request_fields.py} +27 -25
- hyperstack/models/{create_gpu.py → beta_access_request_payload.py} +9 -11
- hyperstack/models/{create_discount_response.py → beta_access_request_response_model.py} +11 -11
- hyperstack/models/{export_billing_data_request.py → beta_access_status_item.py} +20 -23
- hyperstack/models/{get_all_discount_for_all_organization_response.py → beta_access_status_response_model.py} +15 -15
- hyperstack/models/{exclude_billing_post_response.py → billing_history.py} +13 -11
- hyperstack/models/billing_history_data_synthesis_details.py +105 -0
- hyperstack/models/{vm_usage_response.py → billing_history_fine_tuning.py} +23 -19
- hyperstack/models/billing_history_model_evalutation_details.py +105 -0
- hyperstack/models/{get_all_discounts_fields.py → billing_history_serverless_inference.py} +23 -24
- hyperstack/models/billing_history_serverless_inference_details.py +105 -0
- hyperstack/models/{billingmetricesfields.py → billing_metrices_fields.py} +4 -4
- hyperstack/models/{billingmetricesresponse.py → billing_metrices_response.py} +7 -7
- hyperstack/models/cluster_fields.py +27 -9
- hyperstack/models/{add_update_flavor_organization_payload.py → cluster_flavor_fields.py} +28 -26
- hyperstack/models/{historical_instances_fields.py → cluster_node_fields.py} +24 -22
- hyperstack/models/{internal_instance_flavor_fields.py → cluster_node_group_fields.py} +17 -17
- hyperstack/models/{create_update_policy_response_model.py → cluster_node_groups_create_response.py} +21 -11
- hyperstack/models/{create_update_permission_response_model.py → cluster_node_groups_get_response.py} +11 -11
- hyperstack/models/{auth_request_login_response_model.py → cluster_node_groups_list_response.py} +15 -11
- hyperstack/models/{contract_eligible_instance_fields.py → cluster_node_instance_fields.py} +13 -11
- hyperstack/models/{image_logos.py → cluster_nodes_list_response.py} +14 -14
- hyperstack/models/{internal_environment_fields.py → cluster_version.py} +13 -9
- hyperstack/models/cluster_versions.py +10 -2
- hyperstack/models/{future_nodes_stock_model.py → colors.py} +17 -15
- hyperstack/models/contract_discount_plan_fields.py +3 -1
- hyperstack/models/contract_instance_fields.py +7 -1
- hyperstack/models/{future_node_response_model.py → create_cluster_node_fields.py} +23 -18
- hyperstack/models/{update_gpu.py → create_cluster_node_group_payload.py} +12 -11
- hyperstack/models/create_cluster_payload.py +31 -8
- hyperstack/models/create_environment.py +1 -1
- hyperstack/models/create_instances_payload.py +7 -7
- hyperstack/models/create_profile_payload.py +1 -1
- hyperstack/models/create_snapshot_payload.py +2 -4
- hyperstack/models/create_volume_payload.py +1 -1
- hyperstack/models/data_synthesis_billing_history_details_response_schema.py +95 -0
- hyperstack/models/{deployment_fieldsforstartdeployments.py → deployment_fields_for_start_deployments.py} +4 -4
- hyperstack/models/{editlabelofanexisting_vm_payload.py → edit_label_of_an_existing_vm_payload.py} +4 -4
- hyperstack/models/environment_features.py +14 -2
- hyperstack/models/{node_stocks_payload.py → environment_fields_for_volume.py} +10 -12
- hyperstack/models/flavor_fields.py +3 -1
- hyperstack/models/{customer_fields.py → flavor_label_fields.py} +7 -7
- hyperstack/models/{getcreditandthresholdinfo.py → get_credit_and_threshold_info.py} +4 -4
- hyperstack/models/{getcreditandthresholdinfoinresponse.py → get_credit_and_threshold_info_in_response.py} +7 -7
- hyperstack/models/{region_payload.py → get_instance_logs_response.py} +7 -9
- hyperstack/models/instance_fields.py +8 -4
- hyperstack/models/instance_flavor_fields.py +13 -1
- hyperstack/models/{flavor_response.py → keypair_environment_features.py} +20 -16
- hyperstack/models/{internal_instance_keypair_fields.py → keypair_environment_fields.py} +13 -11
- hyperstack/models/keypair_fields.py +6 -2
- hyperstack/models/{lastdaycostfields.py → last_day_cost_fields.py} +4 -4
- hyperstack/models/{lastdaycostresponse.py → last_day_cost_response.py} +7 -7
- hyperstack/models/{export_billing_data_response.py → logos.py} +13 -9
- hyperstack/models/{verify_api_key_response_model.py → manual_reconciliation_model.py} +13 -13
- hyperstack/models/{creditrequestresponse.py → master_flavors_response.py} +14 -14
- hyperstack/models/{customer_payload.py → mfa_status_fields.py} +8 -10
- hyperstack/models/{gpu.py → mfa_status_response.py} +11 -11
- hyperstack/models/model_evaluation_billing_history_details_response_schema.py +95 -0
- hyperstack/models/{organization_thresholdfields.py → organization_threshold_fields.py} +4 -4
- hyperstack/models/{organizationthresholdupdateresponse.py → organization_threshold_update_response.py} +7 -7
- hyperstack/models/{organizationthresholdsresponse.py → organization_thresholds_response.py} +7 -7
- hyperstack/models/{logo_get_response.py → pagination.py} +12 -12
- hyperstack/models/{billing_response.py → partner_config.py} +31 -20
- hyperstack/models/payment_details_fields.py +5 -1
- hyperstack/models/{logout_payload.py → primary_color.py} +10 -8
- hyperstack/models/region_fields.py +16 -2
- hyperstack/models/{vm_usage_request_payload.py → request_instance_logs_payload.py} +8 -8
- hyperstack/models/{stock_visibility_user_payload.py → request_instance_logs_response.py} +8 -8
- hyperstack/models/{contract_billing_history.py → resource_level_billing_bucket_details_resources.py} +10 -10
- hyperstack/models/{node_response_model.py → resource_level_billing_history_resources_cluster.py} +21 -11
- hyperstack/models/resource_level_billing_history_response_attributes.py +3 -1
- hyperstack/models/{get_all_contracts_response_model.py → resource_level_bucket_billing_details_response_model.py} +11 -15
- hyperstack/models/{contract_billing_history_response_model.py → resource_level_bucket_billing_history_response_model.py} +11 -11
- hyperstack/models/resource_level_cluster_billing_details_response_model.py +95 -0
- hyperstack/models/resource_level_cluster_billing_history_response_model.py +95 -0
- hyperstack/models/{get_discount_detail_response.py → resource_level_cluster_graph_billing_details_response_model.py} +11 -11
- hyperstack/models/{organization_object_response.py → resource_level_graph_billing_details_bucket.py} +18 -14
- hyperstack/models/{update_discounts_status_payload.py → secondary_color.py} +10 -8
- hyperstack/models/{security_rules_fieldsfor_instance.py → security_rules_fields_for_instance.py} +4 -4
- hyperstack/models/serverless_inferenced_billing_history_details_response_schema.py +95 -0
- hyperstack/models/snapshot_fields.py +6 -1
- hyperstack/models/snapshot_retrieve_fields.py +29 -2
- hyperstack/models/start_deployment.py +3 -3
- hyperstack/models/{subscribeorunsubscribeupdatepayload.py → subscribe_or_unsubscribe_update_payload.py} +4 -4
- hyperstack/models/token_based_billing_history_response.py +95 -0
- hyperstack/models/{update_keypairnameresponse.py → update_keypair_name_response.py} +4 -4
- hyperstack/models/update_volume_attachment_payload.py +87 -0
- hyperstack/models/{verify_api_key_payload.py → update_volume_payload.py} +7 -7
- hyperstack/models/{stock_visibility_user_list_response.py → update_volume_response.py} +14 -16
- hyperstack/models/{auth_request_login_fields.py → uris.py} +19 -9
- hyperstack/models/{userinfopostpayload.py → user_info_post_payload.py} +4 -4
- hyperstack/models/{node_stock_response_model.py → user_organizations_response.py} +14 -14
- hyperstack/models/users_info_fields.py +3 -1
- hyperstack/models/volume_attachment_fields.py +9 -5
- hyperstack/models/volume_fields.py +14 -4
- hyperstack/models/{volume_fieldsfor_instance.py → volume_fields_for_instance.py} +4 -4
- hyperstack/models/volumes.py +17 -11
- hyperstack/models/{instances_summary_fields.py → volumes_fields.py} +33 -29
- hyperstack/models/workload_billing_history_response.py +95 -0
- {hyperstack-1.25.0a0.dist-info → hyperstack-1.41.2a0.dist-info}/METADATA +2 -2
- hyperstack-1.41.2a0.dist-info/RECORD +350 -0
- {hyperstack-1.25.0a0.dist-info → hyperstack-1.41.2a0.dist-info}/WHEEL +1 -1
- hyperstack/models/api_key_verify_fields.py +0 -93
- hyperstack/models/billing_immune_resources_response.py +0 -95
- hyperstack/models/contract_billing_history_response_attributes.py +0 -99
- hyperstack/models/contract_change_payload.py +0 -101
- hyperstack/models/contract_eligible_instances_response.py +0 -101
- hyperstack/models/contract_event_create_model.py +0 -91
- hyperstack/models/contract_resource_payload.py +0 -95
- hyperstack/models/contractl_billing_history_response_metrics.py +0 -87
- hyperstack/models/create_contract_fields.py +0 -110
- hyperstack/models/create_contract_payload.py +0 -106
- hyperstack/models/create_discounts_payload.py +0 -112
- hyperstack/models/create_update_permission_payload.py +0 -93
- hyperstack/models/create_update_policy_payload.py +0 -93
- hyperstack/models/creditrechargelimitfield.py +0 -93
- hyperstack/models/creditrechargelimitresponse.py +0 -99
- hyperstack/models/creditrequests.py +0 -96
- hyperstack/models/data.py +0 -91
- hyperstack/models/discount_entity_model.py +0 -97
- hyperstack/models/discount_fields.py +0 -100
- hyperstack/models/discount_plan_fields.py +0 -108
- hyperstack/models/discount_resource_fields.py +0 -93
- hyperstack/models/discount_resource_payload.py +0 -93
- hyperstack/models/exclude_billing_post_payload.py +0 -91
- hyperstack/models/field_change.py +0 -91
- hyperstack/models/flavor_payload.py +0 -101
- hyperstack/models/flavor_vms_response.py +0 -99
- hyperstack/models/future_node_stock_model.py +0 -93
- hyperstack/models/future_node_update_model.py +0 -98
- hyperstack/models/get_all_contract_fields.py +0 -100
- hyperstack/models/get_discount_response.py +0 -99
- hyperstack/models/get_entity_discount_detail_response.py +0 -108
- hyperstack/models/get_token_payload.py +0 -89
- hyperstack/models/get_version_response.py +0 -91
- hyperstack/models/historical_instance.py +0 -101
- hyperstack/models/infrahub_resource_object_response.py +0 -119
- hyperstack/models/insert_discount_plan_fields.py +0 -112
- hyperstack/models/internal_instance_fields.py +0 -156
- hyperstack/models/internal_instance_image_fields.py +0 -95
- hyperstack/models/internal_instances_response.py +0 -99
- hyperstack/models/internal_security_rules_fields_for_instance.py +0 -104
- hyperstack/models/internal_volume_attachment_fields.py +0 -98
- hyperstack/models/internal_volume_fields.py +0 -95
- hyperstack/models/internal_volumes_response.py +0 -99
- hyperstack/models/new_stock_update_response_model.py +0 -89
- hyperstack/models/node_model.py +0 -114
- hyperstack/models/node_payload_model.py +0 -97
- hyperstack/models/node_power_usage_model.py +0 -120
- hyperstack/models/node_stock_payload_model.py +0 -95
- hyperstack/models/organizationcreditrechargelimitresponse.py +0 -95
- hyperstack/models/power_usage_model.py +0 -89
- hyperstack/models/pricebook_resource_object_response.py +0 -107
- hyperstack/models/refresh_token_payload.py +0 -89
- hyperstack/models/region_response.py +0 -95
- hyperstack/models/set_defaults_payload.py +0 -89
- hyperstack/models/single_visibility_user_response.py +0 -91
- hyperstack/models/success_response_model.py +0 -89
- hyperstack/models/token_fields.py +0 -91
- hyperstack/models/update_contract_payload.py +0 -104
- hyperstack/models/update_discounts_payload.py +0 -102
- hyperstack/models/user_transfer_payload.py +0 -89
- hyperstack/models/volume_status_change_fields.py +0 -96
- hyperstack/models/volumes_last_status_change_response.py +0 -99
- hyperstack/models/warning_mail_log_fields.py +0 -99
- hyperstack/models/warning_mail_log_response.py +0 -101
- hyperstack-1.25.0a0.dist-info/RECORD +0 -401
- {hyperstack-1.25.0a0.dist-info → hyperstack-1.41.2a0.dist-info}/top_level.txt +0 -0
|
@@ -17,7 +17,7 @@ from typing import Any, Dict, List, Optional, Tuple, Union
|
|
|
17
17
|
from typing_extensions import Annotated
|
|
18
18
|
|
|
19
19
|
from pydantic import Field, StrictInt, StrictStr, field_validator
|
|
20
|
-
from typing import Optional
|
|
20
|
+
from typing import List, Optional
|
|
21
21
|
from typing_extensions import Annotated
|
|
22
22
|
from ..models.attach_firewalls_to_vm_payload import AttachFirewallsToVMPayload
|
|
23
23
|
from ..models.contract_instances_response import ContractInstancesResponse
|
|
@@ -26,12 +26,15 @@ from ..models.create_instances_response import CreateInstancesResponse
|
|
|
26
26
|
from ..models.create_security_rule_payload import CreateSecurityRulePayload
|
|
27
27
|
from ..models.create_snapshot_payload import CreateSnapshotPayload
|
|
28
28
|
from ..models.create_snapshot_response import CreateSnapshotResponse
|
|
29
|
-
from ..models.
|
|
29
|
+
from ..models.edit_label_of_an_existing_vm_payload import EditLabelOfAnExistingVMPayload
|
|
30
|
+
from ..models.get_instance_logs_response import GetInstanceLogsResponse
|
|
30
31
|
from ..models.instance import Instance
|
|
31
32
|
from ..models.instance_resize_payload import InstanceResizePayload
|
|
32
33
|
from ..models.instances import Instances
|
|
33
34
|
from ..models.metrics_fields import MetricsFields
|
|
34
35
|
from ..models.name_available_model import NameAvailableModel
|
|
36
|
+
from ..models.request_instance_logs_payload import RequestInstanceLogsPayload
|
|
37
|
+
from ..models.request_instance_logs_response import RequestInstanceLogsResponse
|
|
35
38
|
from ..models.response_model import ResponseModel
|
|
36
39
|
from ..models.security_group_rule import SecurityGroupRule
|
|
37
40
|
|
|
@@ -54,10 +57,9 @@ class VirtualMachineApi:
|
|
|
54
57
|
|
|
55
58
|
|
|
56
59
|
@validate_call
|
|
57
|
-
def
|
|
60
|
+
def delete_instance(
|
|
58
61
|
self,
|
|
59
|
-
|
|
60
|
-
payload: CreateSecurityRulePayload,
|
|
62
|
+
vm_id: StrictInt,
|
|
61
63
|
_request_timeout: Union[
|
|
62
64
|
None,
|
|
63
65
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -70,15 +72,13 @@ class VirtualMachineApi:
|
|
|
70
72
|
_content_type: Optional[StrictStr] = None,
|
|
71
73
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
72
74
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
73
|
-
) ->
|
|
74
|
-
"""
|
|
75
|
+
) -> ResponseModel:
|
|
76
|
+
"""Delete virtual machine
|
|
75
77
|
|
|
76
|
-
|
|
78
|
+
Permanently deletes a virtual machine. Provide the virtual machine ID in the path to delete the specified virtual machine.
|
|
77
79
|
|
|
78
|
-
:param
|
|
79
|
-
:type
|
|
80
|
-
:param payload: (required)
|
|
81
|
-
:type payload: CreateSecurityRulePayload
|
|
80
|
+
:param vm_id: (required)
|
|
81
|
+
:type vm_id: int
|
|
82
82
|
:param _request_timeout: timeout setting for this request. If one
|
|
83
83
|
number provided, it will be total request
|
|
84
84
|
timeout. It can also be a pair (tuple) of
|
|
@@ -101,9 +101,8 @@ class VirtualMachineApi:
|
|
|
101
101
|
:return: Returns the result object.
|
|
102
102
|
""" # noqa: E501
|
|
103
103
|
|
|
104
|
-
_param = self.
|
|
105
|
-
|
|
106
|
-
payload=payload,
|
|
104
|
+
_param = self._delete_instance_serialize(
|
|
105
|
+
vm_id=vm_id,
|
|
107
106
|
_request_auth=_request_auth,
|
|
108
107
|
_content_type=_content_type,
|
|
109
108
|
_headers=_headers,
|
|
@@ -111,7 +110,7 @@ class VirtualMachineApi:
|
|
|
111
110
|
)
|
|
112
111
|
|
|
113
112
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
114
|
-
'200': "
|
|
113
|
+
'200': "ResponseModel",
|
|
115
114
|
'400': "ErrorResponseModel",
|
|
116
115
|
'401': "ErrorResponseModel",
|
|
117
116
|
'404': "ErrorResponseModel",
|
|
@@ -130,10 +129,9 @@ class VirtualMachineApi:
|
|
|
130
129
|
|
|
131
130
|
|
|
132
131
|
@validate_call
|
|
133
|
-
def
|
|
132
|
+
def delete_instance_with_http_info(
|
|
134
133
|
self,
|
|
135
|
-
|
|
136
|
-
payload: CreateSecurityRulePayload,
|
|
134
|
+
vm_id: StrictInt,
|
|
137
135
|
_request_timeout: Union[
|
|
138
136
|
None,
|
|
139
137
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -146,15 +144,13 @@ class VirtualMachineApi:
|
|
|
146
144
|
_content_type: Optional[StrictStr] = None,
|
|
147
145
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
148
146
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
149
|
-
) -> ApiResponse[
|
|
150
|
-
"""
|
|
147
|
+
) -> ApiResponse[ResponseModel]:
|
|
148
|
+
"""Delete virtual machine
|
|
151
149
|
|
|
152
|
-
|
|
150
|
+
Permanently deletes a virtual machine. Provide the virtual machine ID in the path to delete the specified virtual machine.
|
|
153
151
|
|
|
154
|
-
:param
|
|
155
|
-
:type
|
|
156
|
-
:param payload: (required)
|
|
157
|
-
:type payload: CreateSecurityRulePayload
|
|
152
|
+
:param vm_id: (required)
|
|
153
|
+
:type vm_id: int
|
|
158
154
|
:param _request_timeout: timeout setting for this request. If one
|
|
159
155
|
number provided, it will be total request
|
|
160
156
|
timeout. It can also be a pair (tuple) of
|
|
@@ -177,9 +173,8 @@ class VirtualMachineApi:
|
|
|
177
173
|
:return: Returns the result object.
|
|
178
174
|
""" # noqa: E501
|
|
179
175
|
|
|
180
|
-
_param = self.
|
|
181
|
-
|
|
182
|
-
payload=payload,
|
|
176
|
+
_param = self._delete_instance_serialize(
|
|
177
|
+
vm_id=vm_id,
|
|
183
178
|
_request_auth=_request_auth,
|
|
184
179
|
_content_type=_content_type,
|
|
185
180
|
_headers=_headers,
|
|
@@ -187,7 +182,7 @@ class VirtualMachineApi:
|
|
|
187
182
|
)
|
|
188
183
|
|
|
189
184
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
190
|
-
'200': "
|
|
185
|
+
'200': "ResponseModel",
|
|
191
186
|
'400': "ErrorResponseModel",
|
|
192
187
|
'401': "ErrorResponseModel",
|
|
193
188
|
'404': "ErrorResponseModel",
|
|
@@ -206,10 +201,9 @@ class VirtualMachineApi:
|
|
|
206
201
|
|
|
207
202
|
|
|
208
203
|
@validate_call
|
|
209
|
-
def
|
|
204
|
+
def delete_instance_without_preload_content(
|
|
210
205
|
self,
|
|
211
|
-
|
|
212
|
-
payload: CreateSecurityRulePayload,
|
|
206
|
+
vm_id: StrictInt,
|
|
213
207
|
_request_timeout: Union[
|
|
214
208
|
None,
|
|
215
209
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -223,14 +217,12 @@ class VirtualMachineApi:
|
|
|
223
217
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
224
218
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
225
219
|
) -> RESTResponseType:
|
|
226
|
-
"""
|
|
220
|
+
"""Delete virtual machine
|
|
227
221
|
|
|
228
|
-
|
|
222
|
+
Permanently deletes a virtual machine. Provide the virtual machine ID in the path to delete the specified virtual machine.
|
|
229
223
|
|
|
230
|
-
:param
|
|
231
|
-
:type
|
|
232
|
-
:param payload: (required)
|
|
233
|
-
:type payload: CreateSecurityRulePayload
|
|
224
|
+
:param vm_id: (required)
|
|
225
|
+
:type vm_id: int
|
|
234
226
|
:param _request_timeout: timeout setting for this request. If one
|
|
235
227
|
number provided, it will be total request
|
|
236
228
|
timeout. It can also be a pair (tuple) of
|
|
@@ -253,9 +245,8 @@ class VirtualMachineApi:
|
|
|
253
245
|
:return: Returns the result object.
|
|
254
246
|
""" # noqa: E501
|
|
255
247
|
|
|
256
|
-
_param = self.
|
|
257
|
-
|
|
258
|
-
payload=payload,
|
|
248
|
+
_param = self._delete_instance_serialize(
|
|
249
|
+
vm_id=vm_id,
|
|
259
250
|
_request_auth=_request_auth,
|
|
260
251
|
_content_type=_content_type,
|
|
261
252
|
_headers=_headers,
|
|
@@ -263,7 +254,7 @@ class VirtualMachineApi:
|
|
|
263
254
|
)
|
|
264
255
|
|
|
265
256
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
266
|
-
'200': "
|
|
257
|
+
'200': "ResponseModel",
|
|
267
258
|
'400': "ErrorResponseModel",
|
|
268
259
|
'401': "ErrorResponseModel",
|
|
269
260
|
'404': "ErrorResponseModel",
|
|
@@ -277,10 +268,9 @@ class VirtualMachineApi:
|
|
|
277
268
|
return response_data.response
|
|
278
269
|
|
|
279
270
|
|
|
280
|
-
def
|
|
271
|
+
def _delete_instance_serialize(
|
|
281
272
|
self,
|
|
282
|
-
|
|
283
|
-
payload,
|
|
273
|
+
vm_id,
|
|
284
274
|
_request_auth,
|
|
285
275
|
_content_type,
|
|
286
276
|
_headers,
|
|
@@ -302,14 +292,12 @@ class VirtualMachineApi:
|
|
|
302
292
|
_body_params: Optional[bytes] = None
|
|
303
293
|
|
|
304
294
|
# process the path parameters
|
|
305
|
-
if
|
|
306
|
-
_path_params['
|
|
295
|
+
if vm_id is not None:
|
|
296
|
+
_path_params['vm_id'] = vm_id
|
|
307
297
|
# process the query parameters
|
|
308
298
|
# process the header parameters
|
|
309
299
|
# process the form parameters
|
|
310
300
|
# process the body parameter
|
|
311
|
-
if payload is not None:
|
|
312
|
-
_body_params = payload
|
|
313
301
|
|
|
314
302
|
|
|
315
303
|
# set the HTTP header `Accept`
|
|
@@ -320,29 +308,15 @@ class VirtualMachineApi:
|
|
|
320
308
|
]
|
|
321
309
|
)
|
|
322
310
|
|
|
323
|
-
# set the HTTP header `Content-Type`
|
|
324
|
-
if _content_type:
|
|
325
|
-
_header_params['Content-Type'] = _content_type
|
|
326
|
-
else:
|
|
327
|
-
_default_content_type = (
|
|
328
|
-
self.api_client.select_header_content_type(
|
|
329
|
-
[
|
|
330
|
-
'application/json'
|
|
331
|
-
]
|
|
332
|
-
)
|
|
333
|
-
)
|
|
334
|
-
if _default_content_type is not None:
|
|
335
|
-
_header_params['Content-Type'] = _default_content_type
|
|
336
311
|
|
|
337
312
|
# authentication setting
|
|
338
313
|
_auth_settings: List[str] = [
|
|
339
|
-
'apiKey'
|
|
340
|
-
'accessToken'
|
|
314
|
+
'apiKey'
|
|
341
315
|
]
|
|
342
316
|
|
|
343
317
|
return self.api_client.param_serialize(
|
|
344
|
-
method='
|
|
345
|
-
resource_path='/core/virtual-machines/{
|
|
318
|
+
method='DELETE',
|
|
319
|
+
resource_path='/core/virtual-machines/{vm_id}',
|
|
346
320
|
path_params=_path_params,
|
|
347
321
|
query_params=_query_params,
|
|
348
322
|
header_params=_header_params,
|
|
@@ -359,10 +333,10 @@ class VirtualMachineApi:
|
|
|
359
333
|
|
|
360
334
|
|
|
361
335
|
@validate_call
|
|
362
|
-
def
|
|
336
|
+
def delete_security_rule(
|
|
363
337
|
self,
|
|
364
338
|
vm_id: StrictInt,
|
|
365
|
-
|
|
339
|
+
sg_rule_id: StrictInt,
|
|
366
340
|
_request_timeout: Union[
|
|
367
341
|
None,
|
|
368
342
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -376,14 +350,14 @@ class VirtualMachineApi:
|
|
|
376
350
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
377
351
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
378
352
|
) -> ResponseModel:
|
|
379
|
-
"""
|
|
353
|
+
"""Delete firewall rule from virtual machine
|
|
380
354
|
|
|
381
|
-
|
|
355
|
+
Deletes a firewall rule associated with a virtual machine. Provide the virtual machine ID and the firewall rule ID in the path to remove the specified rule from the specified virtual machine.
|
|
382
356
|
|
|
383
357
|
:param vm_id: (required)
|
|
384
358
|
:type vm_id: int
|
|
385
|
-
:param
|
|
386
|
-
:type
|
|
359
|
+
:param sg_rule_id: (required)
|
|
360
|
+
:type sg_rule_id: int
|
|
387
361
|
:param _request_timeout: timeout setting for this request. If one
|
|
388
362
|
number provided, it will be total request
|
|
389
363
|
timeout. It can also be a pair (tuple) of
|
|
@@ -406,9 +380,9 @@ class VirtualMachineApi:
|
|
|
406
380
|
:return: Returns the result object.
|
|
407
381
|
""" # noqa: E501
|
|
408
382
|
|
|
409
|
-
_param = self.
|
|
383
|
+
_param = self._delete_security_rule_serialize(
|
|
410
384
|
vm_id=vm_id,
|
|
411
|
-
|
|
385
|
+
sg_rule_id=sg_rule_id,
|
|
412
386
|
_request_auth=_request_auth,
|
|
413
387
|
_content_type=_content_type,
|
|
414
388
|
_headers=_headers,
|
|
@@ -434,10 +408,10 @@ class VirtualMachineApi:
|
|
|
434
408
|
|
|
435
409
|
|
|
436
410
|
@validate_call
|
|
437
|
-
def
|
|
411
|
+
def delete_security_rule_with_http_info(
|
|
438
412
|
self,
|
|
439
413
|
vm_id: StrictInt,
|
|
440
|
-
|
|
414
|
+
sg_rule_id: StrictInt,
|
|
441
415
|
_request_timeout: Union[
|
|
442
416
|
None,
|
|
443
417
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -451,14 +425,14 @@ class VirtualMachineApi:
|
|
|
451
425
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
452
426
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
453
427
|
) -> ApiResponse[ResponseModel]:
|
|
454
|
-
"""
|
|
428
|
+
"""Delete firewall rule from virtual machine
|
|
455
429
|
|
|
456
|
-
|
|
430
|
+
Deletes a firewall rule associated with a virtual machine. Provide the virtual machine ID and the firewall rule ID in the path to remove the specified rule from the specified virtual machine.
|
|
457
431
|
|
|
458
432
|
:param vm_id: (required)
|
|
459
433
|
:type vm_id: int
|
|
460
|
-
:param
|
|
461
|
-
:type
|
|
434
|
+
:param sg_rule_id: (required)
|
|
435
|
+
:type sg_rule_id: int
|
|
462
436
|
:param _request_timeout: timeout setting for this request. If one
|
|
463
437
|
number provided, it will be total request
|
|
464
438
|
timeout. It can also be a pair (tuple) of
|
|
@@ -481,9 +455,9 @@ class VirtualMachineApi:
|
|
|
481
455
|
:return: Returns the result object.
|
|
482
456
|
""" # noqa: E501
|
|
483
457
|
|
|
484
|
-
_param = self.
|
|
458
|
+
_param = self._delete_security_rule_serialize(
|
|
485
459
|
vm_id=vm_id,
|
|
486
|
-
|
|
460
|
+
sg_rule_id=sg_rule_id,
|
|
487
461
|
_request_auth=_request_auth,
|
|
488
462
|
_content_type=_content_type,
|
|
489
463
|
_headers=_headers,
|
|
@@ -509,10 +483,10 @@ class VirtualMachineApi:
|
|
|
509
483
|
|
|
510
484
|
|
|
511
485
|
@validate_call
|
|
512
|
-
def
|
|
486
|
+
def delete_security_rule_without_preload_content(
|
|
513
487
|
self,
|
|
514
488
|
vm_id: StrictInt,
|
|
515
|
-
|
|
489
|
+
sg_rule_id: StrictInt,
|
|
516
490
|
_request_timeout: Union[
|
|
517
491
|
None,
|
|
518
492
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -526,14 +500,14 @@ class VirtualMachineApi:
|
|
|
526
500
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
527
501
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
528
502
|
) -> RESTResponseType:
|
|
529
|
-
"""
|
|
503
|
+
"""Delete firewall rule from virtual machine
|
|
530
504
|
|
|
531
|
-
|
|
505
|
+
Deletes a firewall rule associated with a virtual machine. Provide the virtual machine ID and the firewall rule ID in the path to remove the specified rule from the specified virtual machine.
|
|
532
506
|
|
|
533
507
|
:param vm_id: (required)
|
|
534
508
|
:type vm_id: int
|
|
535
|
-
:param
|
|
536
|
-
:type
|
|
509
|
+
:param sg_rule_id: (required)
|
|
510
|
+
:type sg_rule_id: int
|
|
537
511
|
:param _request_timeout: timeout setting for this request. If one
|
|
538
512
|
number provided, it will be total request
|
|
539
513
|
timeout. It can also be a pair (tuple) of
|
|
@@ -556,9 +530,9 @@ class VirtualMachineApi:
|
|
|
556
530
|
:return: Returns the result object.
|
|
557
531
|
""" # noqa: E501
|
|
558
532
|
|
|
559
|
-
_param = self.
|
|
533
|
+
_param = self._delete_security_rule_serialize(
|
|
560
534
|
vm_id=vm_id,
|
|
561
|
-
|
|
535
|
+
sg_rule_id=sg_rule_id,
|
|
562
536
|
_request_auth=_request_auth,
|
|
563
537
|
_content_type=_content_type,
|
|
564
538
|
_headers=_headers,
|
|
@@ -579,10 +553,10 @@ class VirtualMachineApi:
|
|
|
579
553
|
return response_data.response
|
|
580
554
|
|
|
581
555
|
|
|
582
|
-
def
|
|
556
|
+
def _delete_security_rule_serialize(
|
|
583
557
|
self,
|
|
584
558
|
vm_id,
|
|
585
|
-
|
|
559
|
+
sg_rule_id,
|
|
586
560
|
_request_auth,
|
|
587
561
|
_content_type,
|
|
588
562
|
_headers,
|
|
@@ -606,12 +580,12 @@ class VirtualMachineApi:
|
|
|
606
580
|
# process the path parameters
|
|
607
581
|
if vm_id is not None:
|
|
608
582
|
_path_params['vm_id'] = vm_id
|
|
583
|
+
if sg_rule_id is not None:
|
|
584
|
+
_path_params['sg_rule_id'] = sg_rule_id
|
|
609
585
|
# process the query parameters
|
|
610
586
|
# process the header parameters
|
|
611
587
|
# process the form parameters
|
|
612
588
|
# process the body parameter
|
|
613
|
-
if payload is not None:
|
|
614
|
-
_body_params = payload
|
|
615
589
|
|
|
616
590
|
|
|
617
591
|
# set the HTTP header `Accept`
|
|
@@ -622,29 +596,15 @@ class VirtualMachineApi:
|
|
|
622
596
|
]
|
|
623
597
|
)
|
|
624
598
|
|
|
625
|
-
# set the HTTP header `Content-Type`
|
|
626
|
-
if _content_type:
|
|
627
|
-
_header_params['Content-Type'] = _content_type
|
|
628
|
-
else:
|
|
629
|
-
_default_content_type = (
|
|
630
|
-
self.api_client.select_header_content_type(
|
|
631
|
-
[
|
|
632
|
-
'application/json'
|
|
633
|
-
]
|
|
634
|
-
)
|
|
635
|
-
)
|
|
636
|
-
if _default_content_type is not None:
|
|
637
|
-
_header_params['Content-Type'] = _default_content_type
|
|
638
599
|
|
|
639
600
|
# authentication setting
|
|
640
601
|
_auth_settings: List[str] = [
|
|
641
|
-
'apiKey'
|
|
642
|
-
'accessToken'
|
|
602
|
+
'apiKey'
|
|
643
603
|
]
|
|
644
604
|
|
|
645
605
|
return self.api_client.param_serialize(
|
|
646
|
-
method='
|
|
647
|
-
resource_path='/core/virtual-machines/{vm_id}/
|
|
606
|
+
method='DELETE',
|
|
607
|
+
resource_path='/core/virtual-machines/{vm_id}/sg-rules/{sg_rule_id}',
|
|
648
608
|
path_params=_path_params,
|
|
649
609
|
query_params=_query_params,
|
|
650
610
|
header_params=_header_params,
|
|
@@ -661,10 +621,9 @@ class VirtualMachineApi:
|
|
|
661
621
|
|
|
662
622
|
|
|
663
623
|
@validate_call
|
|
664
|
-
def
|
|
624
|
+
def fetch_virtual_machine_name_availability(
|
|
665
625
|
self,
|
|
666
|
-
|
|
667
|
-
payload: CreateSnapshotPayload,
|
|
626
|
+
name: StrictStr,
|
|
668
627
|
_request_timeout: Union[
|
|
669
628
|
None,
|
|
670
629
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -677,15 +636,13 @@ class VirtualMachineApi:
|
|
|
677
636
|
_content_type: Optional[StrictStr] = None,
|
|
678
637
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
679
638
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
680
|
-
) ->
|
|
681
|
-
"""
|
|
639
|
+
) -> NameAvailableModel:
|
|
640
|
+
"""Fetch virtual machine name availability
|
|
682
641
|
|
|
683
|
-
|
|
642
|
+
Check if a Virtual Machine name is available
|
|
684
643
|
|
|
685
|
-
:param
|
|
686
|
-
:type
|
|
687
|
-
:param payload: (required)
|
|
688
|
-
:type payload: CreateSnapshotPayload
|
|
644
|
+
:param name: (required)
|
|
645
|
+
:type name: str
|
|
689
646
|
:param _request_timeout: timeout setting for this request. If one
|
|
690
647
|
number provided, it will be total request
|
|
691
648
|
timeout. It can also be a pair (tuple) of
|
|
@@ -708,9 +665,8 @@ class VirtualMachineApi:
|
|
|
708
665
|
:return: Returns the result object.
|
|
709
666
|
""" # noqa: E501
|
|
710
667
|
|
|
711
|
-
_param = self.
|
|
712
|
-
|
|
713
|
-
payload=payload,
|
|
668
|
+
_param = self._fetch_virtual_machine_name_availability_serialize(
|
|
669
|
+
name=name,
|
|
714
670
|
_request_auth=_request_auth,
|
|
715
671
|
_content_type=_content_type,
|
|
716
672
|
_headers=_headers,
|
|
@@ -718,7 +674,7 @@ class VirtualMachineApi:
|
|
|
718
674
|
)
|
|
719
675
|
|
|
720
676
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
721
|
-
'
|
|
677
|
+
'200': "NameAvailableModel",
|
|
722
678
|
'400': "ErrorResponseModel",
|
|
723
679
|
'401': "ErrorResponseModel",
|
|
724
680
|
'404': "ErrorResponseModel",
|
|
@@ -736,10 +692,9 @@ class VirtualMachineApi:
|
|
|
736
692
|
|
|
737
693
|
|
|
738
694
|
@validate_call
|
|
739
|
-
def
|
|
695
|
+
def fetch_virtual_machine_name_availability_with_http_info(
|
|
740
696
|
self,
|
|
741
|
-
|
|
742
|
-
payload: CreateSnapshotPayload,
|
|
697
|
+
name: StrictStr,
|
|
743
698
|
_request_timeout: Union[
|
|
744
699
|
None,
|
|
745
700
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -752,15 +707,13 @@ class VirtualMachineApi:
|
|
|
752
707
|
_content_type: Optional[StrictStr] = None,
|
|
753
708
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
754
709
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
755
|
-
) -> ApiResponse[
|
|
756
|
-
"""
|
|
710
|
+
) -> ApiResponse[NameAvailableModel]:
|
|
711
|
+
"""Fetch virtual machine name availability
|
|
757
712
|
|
|
758
|
-
|
|
713
|
+
Check if a Virtual Machine name is available
|
|
759
714
|
|
|
760
|
-
:param
|
|
761
|
-
:type
|
|
762
|
-
:param payload: (required)
|
|
763
|
-
:type payload: CreateSnapshotPayload
|
|
715
|
+
:param name: (required)
|
|
716
|
+
:type name: str
|
|
764
717
|
:param _request_timeout: timeout setting for this request. If one
|
|
765
718
|
number provided, it will be total request
|
|
766
719
|
timeout. It can also be a pair (tuple) of
|
|
@@ -783,9 +736,8 @@ class VirtualMachineApi:
|
|
|
783
736
|
:return: Returns the result object.
|
|
784
737
|
""" # noqa: E501
|
|
785
738
|
|
|
786
|
-
_param = self.
|
|
787
|
-
|
|
788
|
-
payload=payload,
|
|
739
|
+
_param = self._fetch_virtual_machine_name_availability_serialize(
|
|
740
|
+
name=name,
|
|
789
741
|
_request_auth=_request_auth,
|
|
790
742
|
_content_type=_content_type,
|
|
791
743
|
_headers=_headers,
|
|
@@ -793,7 +745,7 @@ class VirtualMachineApi:
|
|
|
793
745
|
)
|
|
794
746
|
|
|
795
747
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
796
|
-
'
|
|
748
|
+
'200': "NameAvailableModel",
|
|
797
749
|
'400': "ErrorResponseModel",
|
|
798
750
|
'401': "ErrorResponseModel",
|
|
799
751
|
'404': "ErrorResponseModel",
|
|
@@ -811,10 +763,9 @@ class VirtualMachineApi:
|
|
|
811
763
|
|
|
812
764
|
|
|
813
765
|
@validate_call
|
|
814
|
-
def
|
|
766
|
+
def fetch_virtual_machine_name_availability_without_preload_content(
|
|
815
767
|
self,
|
|
816
|
-
|
|
817
|
-
payload: CreateSnapshotPayload,
|
|
768
|
+
name: StrictStr,
|
|
818
769
|
_request_timeout: Union[
|
|
819
770
|
None,
|
|
820
771
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -828,14 +779,12 @@ class VirtualMachineApi:
|
|
|
828
779
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
829
780
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
830
781
|
) -> RESTResponseType:
|
|
831
|
-
"""
|
|
782
|
+
"""Fetch virtual machine name availability
|
|
832
783
|
|
|
833
|
-
|
|
784
|
+
Check if a Virtual Machine name is available
|
|
834
785
|
|
|
835
|
-
:param
|
|
836
|
-
:type
|
|
837
|
-
:param payload: (required)
|
|
838
|
-
:type payload: CreateSnapshotPayload
|
|
786
|
+
:param name: (required)
|
|
787
|
+
:type name: str
|
|
839
788
|
:param _request_timeout: timeout setting for this request. If one
|
|
840
789
|
number provided, it will be total request
|
|
841
790
|
timeout. It can also be a pair (tuple) of
|
|
@@ -858,9 +807,8 @@ class VirtualMachineApi:
|
|
|
858
807
|
:return: Returns the result object.
|
|
859
808
|
""" # noqa: E501
|
|
860
809
|
|
|
861
|
-
_param = self.
|
|
862
|
-
|
|
863
|
-
payload=payload,
|
|
810
|
+
_param = self._fetch_virtual_machine_name_availability_serialize(
|
|
811
|
+
name=name,
|
|
864
812
|
_request_auth=_request_auth,
|
|
865
813
|
_content_type=_content_type,
|
|
866
814
|
_headers=_headers,
|
|
@@ -868,7 +816,7 @@ class VirtualMachineApi:
|
|
|
868
816
|
)
|
|
869
817
|
|
|
870
818
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
871
|
-
'
|
|
819
|
+
'200': "NameAvailableModel",
|
|
872
820
|
'400': "ErrorResponseModel",
|
|
873
821
|
'401': "ErrorResponseModel",
|
|
874
822
|
'404': "ErrorResponseModel",
|
|
@@ -881,10 +829,9 @@ class VirtualMachineApi:
|
|
|
881
829
|
return response_data.response
|
|
882
830
|
|
|
883
831
|
|
|
884
|
-
def
|
|
832
|
+
def _fetch_virtual_machine_name_availability_serialize(
|
|
885
833
|
self,
|
|
886
|
-
|
|
887
|
-
payload,
|
|
834
|
+
name,
|
|
888
835
|
_request_auth,
|
|
889
836
|
_content_type,
|
|
890
837
|
_headers,
|
|
@@ -906,14 +853,12 @@ class VirtualMachineApi:
|
|
|
906
853
|
_body_params: Optional[bytes] = None
|
|
907
854
|
|
|
908
855
|
# process the path parameters
|
|
909
|
-
if
|
|
910
|
-
_path_params['
|
|
856
|
+
if name is not None:
|
|
857
|
+
_path_params['name'] = name
|
|
911
858
|
# process the query parameters
|
|
912
859
|
# process the header parameters
|
|
913
860
|
# process the form parameters
|
|
914
861
|
# process the body parameter
|
|
915
|
-
if payload is not None:
|
|
916
|
-
_body_params = payload
|
|
917
862
|
|
|
918
863
|
|
|
919
864
|
# set the HTTP header `Accept`
|
|
@@ -924,29 +869,15 @@ class VirtualMachineApi:
|
|
|
924
869
|
]
|
|
925
870
|
)
|
|
926
871
|
|
|
927
|
-
# set the HTTP header `Content-Type`
|
|
928
|
-
if _content_type:
|
|
929
|
-
_header_params['Content-Type'] = _content_type
|
|
930
|
-
else:
|
|
931
|
-
_default_content_type = (
|
|
932
|
-
self.api_client.select_header_content_type(
|
|
933
|
-
[
|
|
934
|
-
'application/json'
|
|
935
|
-
]
|
|
936
|
-
)
|
|
937
|
-
)
|
|
938
|
-
if _default_content_type is not None:
|
|
939
|
-
_header_params['Content-Type'] = _default_content_type
|
|
940
872
|
|
|
941
873
|
# authentication setting
|
|
942
874
|
_auth_settings: List[str] = [
|
|
943
|
-
'apiKey'
|
|
944
|
-
'accessToken'
|
|
875
|
+
'apiKey'
|
|
945
876
|
]
|
|
946
877
|
|
|
947
878
|
return self.api_client.param_serialize(
|
|
948
|
-
method='
|
|
949
|
-
resource_path='/core/virtual-machines/{
|
|
879
|
+
method='GET',
|
|
880
|
+
resource_path='/core/virtual-machines/name-availability/{name}',
|
|
950
881
|
path_params=_path_params,
|
|
951
882
|
query_params=_query_params,
|
|
952
883
|
header_params=_header_params,
|
|
@@ -963,9 +894,12 @@ class VirtualMachineApi:
|
|
|
963
894
|
|
|
964
895
|
|
|
965
896
|
@validate_call
|
|
966
|
-
def
|
|
897
|
+
def get_contract_instances(
|
|
967
898
|
self,
|
|
968
|
-
|
|
899
|
+
contract_id: StrictInt,
|
|
900
|
+
page: Annotated[Optional[StrictStr], Field(description="Page Number")] = None,
|
|
901
|
+
page_size: Annotated[Optional[StrictStr], Field(description="Data Per Page")] = None,
|
|
902
|
+
search: Annotated[Optional[StrictStr], Field(description="Search By Instance ID or Name")] = None,
|
|
969
903
|
_request_timeout: Union[
|
|
970
904
|
None,
|
|
971
905
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -978,13 +912,19 @@ class VirtualMachineApi:
|
|
|
978
912
|
_content_type: Optional[StrictStr] = None,
|
|
979
913
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
980
914
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
981
|
-
) ->
|
|
982
|
-
"""
|
|
915
|
+
) -> ContractInstancesResponse:
|
|
916
|
+
"""Retrieve virtual machines associated with a contract
|
|
983
917
|
|
|
984
|
-
|
|
918
|
+
Retrieves a list of virtual machines associated with a contract, providing details such as virtual machine name, timestamp, flavor name, and other relevant information. Please provide the ID of the relevant contract in the path.
|
|
985
919
|
|
|
986
|
-
:param
|
|
987
|
-
:type
|
|
920
|
+
:param contract_id: (required)
|
|
921
|
+
:type contract_id: int
|
|
922
|
+
:param page: Page Number
|
|
923
|
+
:type page: str
|
|
924
|
+
:param page_size: Data Per Page
|
|
925
|
+
:type page_size: str
|
|
926
|
+
:param search: Search By Instance ID or Name
|
|
927
|
+
:type search: str
|
|
988
928
|
:param _request_timeout: timeout setting for this request. If one
|
|
989
929
|
number provided, it will be total request
|
|
990
930
|
timeout. It can also be a pair (tuple) of
|
|
@@ -1007,8 +947,11 @@ class VirtualMachineApi:
|
|
|
1007
947
|
:return: Returns the result object.
|
|
1008
948
|
""" # noqa: E501
|
|
1009
949
|
|
|
1010
|
-
_param = self.
|
|
1011
|
-
|
|
950
|
+
_param = self._get_contract_instances_serialize(
|
|
951
|
+
contract_id=contract_id,
|
|
952
|
+
page=page,
|
|
953
|
+
page_size=page_size,
|
|
954
|
+
search=search,
|
|
1012
955
|
_request_auth=_request_auth,
|
|
1013
956
|
_content_type=_content_type,
|
|
1014
957
|
_headers=_headers,
|
|
@@ -1016,12 +959,9 @@ class VirtualMachineApi:
|
|
|
1016
959
|
)
|
|
1017
960
|
|
|
1018
961
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
1019
|
-
'200': "
|
|
962
|
+
'200': "ContractInstancesResponse",
|
|
1020
963
|
'400': "ErrorResponseModel",
|
|
1021
964
|
'401': "ErrorResponseModel",
|
|
1022
|
-
'404': "ErrorResponseModel",
|
|
1023
|
-
'405': "ErrorResponseModel",
|
|
1024
|
-
'409': "ErrorResponseModel",
|
|
1025
965
|
'500': None,
|
|
1026
966
|
}
|
|
1027
967
|
response_data = self.api_client.call_api(
|
|
@@ -1036,9 +976,12 @@ class VirtualMachineApi:
|
|
|
1036
976
|
|
|
1037
977
|
|
|
1038
978
|
@validate_call
|
|
1039
|
-
def
|
|
979
|
+
def get_contract_instances_with_http_info(
|
|
1040
980
|
self,
|
|
1041
|
-
|
|
981
|
+
contract_id: StrictInt,
|
|
982
|
+
page: Annotated[Optional[StrictStr], Field(description="Page Number")] = None,
|
|
983
|
+
page_size: Annotated[Optional[StrictStr], Field(description="Data Per Page")] = None,
|
|
984
|
+
search: Annotated[Optional[StrictStr], Field(description="Search By Instance ID or Name")] = None,
|
|
1042
985
|
_request_timeout: Union[
|
|
1043
986
|
None,
|
|
1044
987
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -1051,14 +994,20 @@ class VirtualMachineApi:
|
|
|
1051
994
|
_content_type: Optional[StrictStr] = None,
|
|
1052
995
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1053
996
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1054
|
-
) -> ApiResponse[
|
|
1055
|
-
"""
|
|
997
|
+
) -> ApiResponse[ContractInstancesResponse]:
|
|
998
|
+
"""Retrieve virtual machines associated with a contract
|
|
1056
999
|
|
|
1057
|
-
|
|
1000
|
+
Retrieves a list of virtual machines associated with a contract, providing details such as virtual machine name, timestamp, flavor name, and other relevant information. Please provide the ID of the relevant contract in the path.
|
|
1058
1001
|
|
|
1059
|
-
:param
|
|
1060
|
-
:type
|
|
1061
|
-
:param
|
|
1002
|
+
:param contract_id: (required)
|
|
1003
|
+
:type contract_id: int
|
|
1004
|
+
:param page: Page Number
|
|
1005
|
+
:type page: str
|
|
1006
|
+
:param page_size: Data Per Page
|
|
1007
|
+
:type page_size: str
|
|
1008
|
+
:param search: Search By Instance ID or Name
|
|
1009
|
+
:type search: str
|
|
1010
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1062
1011
|
number provided, it will be total request
|
|
1063
1012
|
timeout. It can also be a pair (tuple) of
|
|
1064
1013
|
(connection, read) timeouts.
|
|
@@ -1080,8 +1029,11 @@ class VirtualMachineApi:
|
|
|
1080
1029
|
:return: Returns the result object.
|
|
1081
1030
|
""" # noqa: E501
|
|
1082
1031
|
|
|
1083
|
-
_param = self.
|
|
1084
|
-
|
|
1032
|
+
_param = self._get_contract_instances_serialize(
|
|
1033
|
+
contract_id=contract_id,
|
|
1034
|
+
page=page,
|
|
1035
|
+
page_size=page_size,
|
|
1036
|
+
search=search,
|
|
1085
1037
|
_request_auth=_request_auth,
|
|
1086
1038
|
_content_type=_content_type,
|
|
1087
1039
|
_headers=_headers,
|
|
@@ -1089,12 +1041,9 @@ class VirtualMachineApi:
|
|
|
1089
1041
|
)
|
|
1090
1042
|
|
|
1091
1043
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
1092
|
-
'200': "
|
|
1044
|
+
'200': "ContractInstancesResponse",
|
|
1093
1045
|
'400': "ErrorResponseModel",
|
|
1094
1046
|
'401': "ErrorResponseModel",
|
|
1095
|
-
'404': "ErrorResponseModel",
|
|
1096
|
-
'405': "ErrorResponseModel",
|
|
1097
|
-
'409': "ErrorResponseModel",
|
|
1098
1047
|
'500': None,
|
|
1099
1048
|
}
|
|
1100
1049
|
response_data = self.api_client.call_api(
|
|
@@ -1109,9 +1058,12 @@ class VirtualMachineApi:
|
|
|
1109
1058
|
|
|
1110
1059
|
|
|
1111
1060
|
@validate_call
|
|
1112
|
-
def
|
|
1061
|
+
def get_contract_instances_without_preload_content(
|
|
1113
1062
|
self,
|
|
1114
|
-
|
|
1063
|
+
contract_id: StrictInt,
|
|
1064
|
+
page: Annotated[Optional[StrictStr], Field(description="Page Number")] = None,
|
|
1065
|
+
page_size: Annotated[Optional[StrictStr], Field(description="Data Per Page")] = None,
|
|
1066
|
+
search: Annotated[Optional[StrictStr], Field(description="Search By Instance ID or Name")] = None,
|
|
1115
1067
|
_request_timeout: Union[
|
|
1116
1068
|
None,
|
|
1117
1069
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -1125,12 +1077,18 @@ class VirtualMachineApi:
|
|
|
1125
1077
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1126
1078
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1127
1079
|
) -> RESTResponseType:
|
|
1128
|
-
"""
|
|
1080
|
+
"""Retrieve virtual machines associated with a contract
|
|
1129
1081
|
|
|
1130
|
-
|
|
1082
|
+
Retrieves a list of virtual machines associated with a contract, providing details such as virtual machine name, timestamp, flavor name, and other relevant information. Please provide the ID of the relevant contract in the path.
|
|
1131
1083
|
|
|
1132
|
-
:param
|
|
1133
|
-
:type
|
|
1084
|
+
:param contract_id: (required)
|
|
1085
|
+
:type contract_id: int
|
|
1086
|
+
:param page: Page Number
|
|
1087
|
+
:type page: str
|
|
1088
|
+
:param page_size: Data Per Page
|
|
1089
|
+
:type page_size: str
|
|
1090
|
+
:param search: Search By Instance ID or Name
|
|
1091
|
+
:type search: str
|
|
1134
1092
|
:param _request_timeout: timeout setting for this request. If one
|
|
1135
1093
|
number provided, it will be total request
|
|
1136
1094
|
timeout. It can also be a pair (tuple) of
|
|
@@ -1153,8 +1111,11 @@ class VirtualMachineApi:
|
|
|
1153
1111
|
:return: Returns the result object.
|
|
1154
1112
|
""" # noqa: E501
|
|
1155
1113
|
|
|
1156
|
-
_param = self.
|
|
1157
|
-
|
|
1114
|
+
_param = self._get_contract_instances_serialize(
|
|
1115
|
+
contract_id=contract_id,
|
|
1116
|
+
page=page,
|
|
1117
|
+
page_size=page_size,
|
|
1118
|
+
search=search,
|
|
1158
1119
|
_request_auth=_request_auth,
|
|
1159
1120
|
_content_type=_content_type,
|
|
1160
1121
|
_headers=_headers,
|
|
@@ -1162,12 +1123,9 @@ class VirtualMachineApi:
|
|
|
1162
1123
|
)
|
|
1163
1124
|
|
|
1164
1125
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
1165
|
-
'200': "
|
|
1126
|
+
'200': "ContractInstancesResponse",
|
|
1166
1127
|
'400': "ErrorResponseModel",
|
|
1167
1128
|
'401': "ErrorResponseModel",
|
|
1168
|
-
'404': "ErrorResponseModel",
|
|
1169
|
-
'405': "ErrorResponseModel",
|
|
1170
|
-
'409': "ErrorResponseModel",
|
|
1171
1129
|
'500': None,
|
|
1172
1130
|
}
|
|
1173
1131
|
response_data = self.api_client.call_api(
|
|
@@ -1177,9 +1135,12 @@ class VirtualMachineApi:
|
|
|
1177
1135
|
return response_data.response
|
|
1178
1136
|
|
|
1179
1137
|
|
|
1180
|
-
def
|
|
1138
|
+
def _get_contract_instances_serialize(
|
|
1181
1139
|
self,
|
|
1182
|
-
|
|
1140
|
+
contract_id,
|
|
1141
|
+
page,
|
|
1142
|
+
page_size,
|
|
1143
|
+
search,
|
|
1183
1144
|
_request_auth,
|
|
1184
1145
|
_content_type,
|
|
1185
1146
|
_headers,
|
|
@@ -1201,12 +1162,24 @@ class VirtualMachineApi:
|
|
|
1201
1162
|
_body_params: Optional[bytes] = None
|
|
1202
1163
|
|
|
1203
1164
|
# process the path parameters
|
|
1165
|
+
if contract_id is not None:
|
|
1166
|
+
_path_params['contract_id'] = contract_id
|
|
1204
1167
|
# process the query parameters
|
|
1168
|
+
if page is not None:
|
|
1169
|
+
|
|
1170
|
+
_query_params.append(('page', page))
|
|
1171
|
+
|
|
1172
|
+
if page_size is not None:
|
|
1173
|
+
|
|
1174
|
+
_query_params.append(('pageSize', page_size))
|
|
1175
|
+
|
|
1176
|
+
if search is not None:
|
|
1177
|
+
|
|
1178
|
+
_query_params.append(('search', search))
|
|
1179
|
+
|
|
1205
1180
|
# process the header parameters
|
|
1206
1181
|
# process the form parameters
|
|
1207
1182
|
# process the body parameter
|
|
1208
|
-
if payload is not None:
|
|
1209
|
-
_body_params = payload
|
|
1210
1183
|
|
|
1211
1184
|
|
|
1212
1185
|
# set the HTTP header `Accept`
|
|
@@ -1217,29 +1190,15 @@ class VirtualMachineApi:
|
|
|
1217
1190
|
]
|
|
1218
1191
|
)
|
|
1219
1192
|
|
|
1220
|
-
# set the HTTP header `Content-Type`
|
|
1221
|
-
if _content_type:
|
|
1222
|
-
_header_params['Content-Type'] = _content_type
|
|
1223
|
-
else:
|
|
1224
|
-
_default_content_type = (
|
|
1225
|
-
self.api_client.select_header_content_type(
|
|
1226
|
-
[
|
|
1227
|
-
'application/json'
|
|
1228
|
-
]
|
|
1229
|
-
)
|
|
1230
|
-
)
|
|
1231
|
-
if _default_content_type is not None:
|
|
1232
|
-
_header_params['Content-Type'] = _default_content_type
|
|
1233
1193
|
|
|
1234
1194
|
# authentication setting
|
|
1235
1195
|
_auth_settings: List[str] = [
|
|
1236
|
-
'apiKey'
|
|
1237
|
-
'accessToken'
|
|
1196
|
+
'apiKey'
|
|
1238
1197
|
]
|
|
1239
1198
|
|
|
1240
1199
|
return self.api_client.param_serialize(
|
|
1241
|
-
method='
|
|
1242
|
-
resource_path='/core/virtual-machines',
|
|
1200
|
+
method='GET',
|
|
1201
|
+
resource_path='/core/virtual-machines/contract/{contract_id}/virtual-machines',
|
|
1243
1202
|
path_params=_path_params,
|
|
1244
1203
|
query_params=_query_params,
|
|
1245
1204
|
header_params=_header_params,
|
|
@@ -1256,10 +1215,13 @@ class VirtualMachineApi:
|
|
|
1256
1215
|
|
|
1257
1216
|
|
|
1258
1217
|
@validate_call
|
|
1259
|
-
def
|
|
1218
|
+
def get_instance(
|
|
1260
1219
|
self,
|
|
1261
|
-
|
|
1262
|
-
|
|
1220
|
+
page: Optional[StrictInt] = None,
|
|
1221
|
+
page_size: Optional[StrictInt] = None,
|
|
1222
|
+
search: Optional[StrictStr] = None,
|
|
1223
|
+
environment: Optional[StrictStr] = None,
|
|
1224
|
+
exclude_firewalls: Annotated[Optional[List[StrictInt]], Field(description="Comma-separated list of Security Group IDs to ignore instances attached")] = None,
|
|
1263
1225
|
_request_timeout: Union[
|
|
1264
1226
|
None,
|
|
1265
1227
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -1272,15 +1234,21 @@ class VirtualMachineApi:
|
|
|
1272
1234
|
_content_type: Optional[StrictStr] = None,
|
|
1273
1235
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1274
1236
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1275
|
-
) ->
|
|
1276
|
-
"""
|
|
1237
|
+
) -> Instances:
|
|
1238
|
+
"""List virtual machines
|
|
1277
1239
|
|
|
1278
|
-
|
|
1240
|
+
Returns a list of your existing virtual machines, providing configuration details for each. The list is sorted by creation date, with the oldest virtual machines displayed first.
|
|
1279
1241
|
|
|
1280
|
-
:param
|
|
1281
|
-
:type
|
|
1282
|
-
:param
|
|
1283
|
-
:type
|
|
1242
|
+
:param page:
|
|
1243
|
+
:type page: int
|
|
1244
|
+
:param page_size:
|
|
1245
|
+
:type page_size: int
|
|
1246
|
+
:param search:
|
|
1247
|
+
:type search: str
|
|
1248
|
+
:param environment:
|
|
1249
|
+
:type environment: str
|
|
1250
|
+
:param exclude_firewalls: Comma-separated list of Security Group IDs to ignore instances attached
|
|
1251
|
+
:type exclude_firewalls: List[int]
|
|
1284
1252
|
:param _request_timeout: timeout setting for this request. If one
|
|
1285
1253
|
number provided, it will be total request
|
|
1286
1254
|
timeout. It can also be a pair (tuple) of
|
|
@@ -1303,9 +1271,12 @@ class VirtualMachineApi:
|
|
|
1303
1271
|
:return: Returns the result object.
|
|
1304
1272
|
""" # noqa: E501
|
|
1305
1273
|
|
|
1306
|
-
_param = self.
|
|
1307
|
-
|
|
1308
|
-
|
|
1274
|
+
_param = self._get_instance_serialize(
|
|
1275
|
+
page=page,
|
|
1276
|
+
page_size=page_size,
|
|
1277
|
+
search=search,
|
|
1278
|
+
environment=environment,
|
|
1279
|
+
exclude_firewalls=exclude_firewalls,
|
|
1309
1280
|
_request_auth=_request_auth,
|
|
1310
1281
|
_content_type=_content_type,
|
|
1311
1282
|
_headers=_headers,
|
|
@@ -1313,10 +1284,9 @@ class VirtualMachineApi:
|
|
|
1313
1284
|
)
|
|
1314
1285
|
|
|
1315
1286
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
1316
|
-
'200': "
|
|
1287
|
+
'200': "Instances",
|
|
1317
1288
|
'400': "ErrorResponseModel",
|
|
1318
1289
|
'401': "ErrorResponseModel",
|
|
1319
|
-
'404': "ErrorResponseModel",
|
|
1320
1290
|
'500': None,
|
|
1321
1291
|
}
|
|
1322
1292
|
response_data = self.api_client.call_api(
|
|
@@ -1331,10 +1301,13 @@ class VirtualMachineApi:
|
|
|
1331
1301
|
|
|
1332
1302
|
|
|
1333
1303
|
@validate_call
|
|
1334
|
-
def
|
|
1304
|
+
def get_instance_with_http_info(
|
|
1335
1305
|
self,
|
|
1336
|
-
|
|
1337
|
-
|
|
1306
|
+
page: Optional[StrictInt] = None,
|
|
1307
|
+
page_size: Optional[StrictInt] = None,
|
|
1308
|
+
search: Optional[StrictStr] = None,
|
|
1309
|
+
environment: Optional[StrictStr] = None,
|
|
1310
|
+
exclude_firewalls: Annotated[Optional[List[StrictInt]], Field(description="Comma-separated list of Security Group IDs to ignore instances attached")] = None,
|
|
1338
1311
|
_request_timeout: Union[
|
|
1339
1312
|
None,
|
|
1340
1313
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -1347,15 +1320,21 @@ class VirtualMachineApi:
|
|
|
1347
1320
|
_content_type: Optional[StrictStr] = None,
|
|
1348
1321
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1349
1322
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1350
|
-
) -> ApiResponse[
|
|
1351
|
-
"""
|
|
1323
|
+
) -> ApiResponse[Instances]:
|
|
1324
|
+
"""List virtual machines
|
|
1352
1325
|
|
|
1353
|
-
|
|
1326
|
+
Returns a list of your existing virtual machines, providing configuration details for each. The list is sorted by creation date, with the oldest virtual machines displayed first.
|
|
1354
1327
|
|
|
1355
|
-
:param
|
|
1356
|
-
:type
|
|
1357
|
-
:param
|
|
1358
|
-
:type
|
|
1328
|
+
:param page:
|
|
1329
|
+
:type page: int
|
|
1330
|
+
:param page_size:
|
|
1331
|
+
:type page_size: int
|
|
1332
|
+
:param search:
|
|
1333
|
+
:type search: str
|
|
1334
|
+
:param environment:
|
|
1335
|
+
:type environment: str
|
|
1336
|
+
:param exclude_firewalls: Comma-separated list of Security Group IDs to ignore instances attached
|
|
1337
|
+
:type exclude_firewalls: List[int]
|
|
1359
1338
|
:param _request_timeout: timeout setting for this request. If one
|
|
1360
1339
|
number provided, it will be total request
|
|
1361
1340
|
timeout. It can also be a pair (tuple) of
|
|
@@ -1378,9 +1357,12 @@ class VirtualMachineApi:
|
|
|
1378
1357
|
:return: Returns the result object.
|
|
1379
1358
|
""" # noqa: E501
|
|
1380
1359
|
|
|
1381
|
-
_param = self.
|
|
1382
|
-
|
|
1383
|
-
|
|
1360
|
+
_param = self._get_instance_serialize(
|
|
1361
|
+
page=page,
|
|
1362
|
+
page_size=page_size,
|
|
1363
|
+
search=search,
|
|
1364
|
+
environment=environment,
|
|
1365
|
+
exclude_firewalls=exclude_firewalls,
|
|
1384
1366
|
_request_auth=_request_auth,
|
|
1385
1367
|
_content_type=_content_type,
|
|
1386
1368
|
_headers=_headers,
|
|
@@ -1388,10 +1370,9 @@ class VirtualMachineApi:
|
|
|
1388
1370
|
)
|
|
1389
1371
|
|
|
1390
1372
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
1391
|
-
'200': "
|
|
1373
|
+
'200': "Instances",
|
|
1392
1374
|
'400': "ErrorResponseModel",
|
|
1393
1375
|
'401': "ErrorResponseModel",
|
|
1394
|
-
'404': "ErrorResponseModel",
|
|
1395
1376
|
'500': None,
|
|
1396
1377
|
}
|
|
1397
1378
|
response_data = self.api_client.call_api(
|
|
@@ -1406,10 +1387,13 @@ class VirtualMachineApi:
|
|
|
1406
1387
|
|
|
1407
1388
|
|
|
1408
1389
|
@validate_call
|
|
1409
|
-
def
|
|
1390
|
+
def get_instance_without_preload_content(
|
|
1410
1391
|
self,
|
|
1411
|
-
|
|
1412
|
-
|
|
1392
|
+
page: Optional[StrictInt] = None,
|
|
1393
|
+
page_size: Optional[StrictInt] = None,
|
|
1394
|
+
search: Optional[StrictStr] = None,
|
|
1395
|
+
environment: Optional[StrictStr] = None,
|
|
1396
|
+
exclude_firewalls: Annotated[Optional[List[StrictInt]], Field(description="Comma-separated list of Security Group IDs to ignore instances attached")] = None,
|
|
1413
1397
|
_request_timeout: Union[
|
|
1414
1398
|
None,
|
|
1415
1399
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -1423,14 +1407,20 @@ class VirtualMachineApi:
|
|
|
1423
1407
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1424
1408
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1425
1409
|
) -> RESTResponseType:
|
|
1426
|
-
"""
|
|
1410
|
+
"""List virtual machines
|
|
1427
1411
|
|
|
1428
|
-
|
|
1412
|
+
Returns a list of your existing virtual machines, providing configuration details for each. The list is sorted by creation date, with the oldest virtual machines displayed first.
|
|
1429
1413
|
|
|
1430
|
-
:param
|
|
1431
|
-
:type
|
|
1432
|
-
:param
|
|
1433
|
-
:type
|
|
1414
|
+
:param page:
|
|
1415
|
+
:type page: int
|
|
1416
|
+
:param page_size:
|
|
1417
|
+
:type page_size: int
|
|
1418
|
+
:param search:
|
|
1419
|
+
:type search: str
|
|
1420
|
+
:param environment:
|
|
1421
|
+
:type environment: str
|
|
1422
|
+
:param exclude_firewalls: Comma-separated list of Security Group IDs to ignore instances attached
|
|
1423
|
+
:type exclude_firewalls: List[int]
|
|
1434
1424
|
:param _request_timeout: timeout setting for this request. If one
|
|
1435
1425
|
number provided, it will be total request
|
|
1436
1426
|
timeout. It can also be a pair (tuple) of
|
|
@@ -1453,9 +1443,12 @@ class VirtualMachineApi:
|
|
|
1453
1443
|
:return: Returns the result object.
|
|
1454
1444
|
""" # noqa: E501
|
|
1455
1445
|
|
|
1456
|
-
_param = self.
|
|
1457
|
-
|
|
1458
|
-
|
|
1446
|
+
_param = self._get_instance_serialize(
|
|
1447
|
+
page=page,
|
|
1448
|
+
page_size=page_size,
|
|
1449
|
+
search=search,
|
|
1450
|
+
environment=environment,
|
|
1451
|
+
exclude_firewalls=exclude_firewalls,
|
|
1459
1452
|
_request_auth=_request_auth,
|
|
1460
1453
|
_content_type=_content_type,
|
|
1461
1454
|
_headers=_headers,
|
|
@@ -1463,10 +1456,9 @@ class VirtualMachineApi:
|
|
|
1463
1456
|
)
|
|
1464
1457
|
|
|
1465
1458
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
1466
|
-
'200': "
|
|
1459
|
+
'200': "Instances",
|
|
1467
1460
|
'400': "ErrorResponseModel",
|
|
1468
1461
|
'401': "ErrorResponseModel",
|
|
1469
|
-
'404': "ErrorResponseModel",
|
|
1470
1462
|
'500': None,
|
|
1471
1463
|
}
|
|
1472
1464
|
response_data = self.api_client.call_api(
|
|
@@ -1476,10 +1468,13 @@ class VirtualMachineApi:
|
|
|
1476
1468
|
return response_data.response
|
|
1477
1469
|
|
|
1478
1470
|
|
|
1479
|
-
def
|
|
1471
|
+
def _get_instance_serialize(
|
|
1480
1472
|
self,
|
|
1481
|
-
|
|
1482
|
-
|
|
1473
|
+
page,
|
|
1474
|
+
page_size,
|
|
1475
|
+
search,
|
|
1476
|
+
environment,
|
|
1477
|
+
exclude_firewalls,
|
|
1483
1478
|
_request_auth,
|
|
1484
1479
|
_content_type,
|
|
1485
1480
|
_headers,
|
|
@@ -1489,6 +1484,7 @@ class VirtualMachineApi:
|
|
|
1489
1484
|
_host = None
|
|
1490
1485
|
|
|
1491
1486
|
_collection_formats: Dict[str, str] = {
|
|
1487
|
+
'exclude_firewalls': 'multi',
|
|
1492
1488
|
}
|
|
1493
1489
|
|
|
1494
1490
|
_path_params: Dict[str, str] = {}
|
|
@@ -1501,11 +1497,27 @@ class VirtualMachineApi:
|
|
|
1501
1497
|
_body_params: Optional[bytes] = None
|
|
1502
1498
|
|
|
1503
1499
|
# process the path parameters
|
|
1504
|
-
if virtual_machine_id is not None:
|
|
1505
|
-
_path_params['virtual_machine_id'] = virtual_machine_id
|
|
1506
|
-
if sg_rule_id is not None:
|
|
1507
|
-
_path_params['sg_rule_id'] = sg_rule_id
|
|
1508
1500
|
# process the query parameters
|
|
1501
|
+
if page is not None:
|
|
1502
|
+
|
|
1503
|
+
_query_params.append(('page', page))
|
|
1504
|
+
|
|
1505
|
+
if page_size is not None:
|
|
1506
|
+
|
|
1507
|
+
_query_params.append(('pageSize', page_size))
|
|
1508
|
+
|
|
1509
|
+
if search is not None:
|
|
1510
|
+
|
|
1511
|
+
_query_params.append(('search', search))
|
|
1512
|
+
|
|
1513
|
+
if environment is not None:
|
|
1514
|
+
|
|
1515
|
+
_query_params.append(('environment', environment))
|
|
1516
|
+
|
|
1517
|
+
if exclude_firewalls is not None:
|
|
1518
|
+
|
|
1519
|
+
_query_params.append(('exclude_firewalls', exclude_firewalls))
|
|
1520
|
+
|
|
1509
1521
|
# process the header parameters
|
|
1510
1522
|
# process the form parameters
|
|
1511
1523
|
# process the body parameter
|
|
@@ -1522,13 +1534,12 @@ class VirtualMachineApi:
|
|
|
1522
1534
|
|
|
1523
1535
|
# authentication setting
|
|
1524
1536
|
_auth_settings: List[str] = [
|
|
1525
|
-
'apiKey'
|
|
1526
|
-
'accessToken'
|
|
1537
|
+
'apiKey'
|
|
1527
1538
|
]
|
|
1528
1539
|
|
|
1529
1540
|
return self.api_client.param_serialize(
|
|
1530
|
-
method='
|
|
1531
|
-
resource_path='/core/virtual-machines
|
|
1541
|
+
method='GET',
|
|
1542
|
+
resource_path='/core/virtual-machines',
|
|
1532
1543
|
path_params=_path_params,
|
|
1533
1544
|
query_params=_query_params,
|
|
1534
1545
|
header_params=_header_params,
|
|
@@ -1545,9 +1556,9 @@ class VirtualMachineApi:
|
|
|
1545
1556
|
|
|
1546
1557
|
|
|
1547
1558
|
@validate_call
|
|
1548
|
-
def
|
|
1559
|
+
def get_instance2(
|
|
1549
1560
|
self,
|
|
1550
|
-
|
|
1561
|
+
vm_id: StrictInt,
|
|
1551
1562
|
_request_timeout: Union[
|
|
1552
1563
|
None,
|
|
1553
1564
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -1560,13 +1571,13 @@ class VirtualMachineApi:
|
|
|
1560
1571
|
_content_type: Optional[StrictStr] = None,
|
|
1561
1572
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1562
1573
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1563
|
-
) ->
|
|
1564
|
-
"""
|
|
1574
|
+
) -> Instance:
|
|
1575
|
+
"""Retrieve virtual machine details
|
|
1565
1576
|
|
|
1566
|
-
|
|
1577
|
+
Retrieves the details of an existing virtual machine. Provide the virtual machine ID in the path, and Infrahub will return information about the corresponding VM.
|
|
1567
1578
|
|
|
1568
|
-
:param
|
|
1569
|
-
:type
|
|
1579
|
+
:param vm_id: (required)
|
|
1580
|
+
:type vm_id: int
|
|
1570
1581
|
:param _request_timeout: timeout setting for this request. If one
|
|
1571
1582
|
number provided, it will be total request
|
|
1572
1583
|
timeout. It can also be a pair (tuple) of
|
|
@@ -1589,8 +1600,8 @@ class VirtualMachineApi:
|
|
|
1589
1600
|
:return: Returns the result object.
|
|
1590
1601
|
""" # noqa: E501
|
|
1591
1602
|
|
|
1592
|
-
_param = self.
|
|
1593
|
-
|
|
1603
|
+
_param = self._get_instance2_serialize(
|
|
1604
|
+
vm_id=vm_id,
|
|
1594
1605
|
_request_auth=_request_auth,
|
|
1595
1606
|
_content_type=_content_type,
|
|
1596
1607
|
_headers=_headers,
|
|
@@ -1598,11 +1609,10 @@ class VirtualMachineApi:
|
|
|
1598
1609
|
)
|
|
1599
1610
|
|
|
1600
1611
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
1601
|
-
'200': "
|
|
1612
|
+
'200': "Instance",
|
|
1602
1613
|
'400': "ErrorResponseModel",
|
|
1603
1614
|
'401': "ErrorResponseModel",
|
|
1604
1615
|
'404': "ErrorResponseModel",
|
|
1605
|
-
'409': "ErrorResponseModel",
|
|
1606
1616
|
'500': None,
|
|
1607
1617
|
}
|
|
1608
1618
|
response_data = self.api_client.call_api(
|
|
@@ -1617,9 +1627,9 @@ class VirtualMachineApi:
|
|
|
1617
1627
|
|
|
1618
1628
|
|
|
1619
1629
|
@validate_call
|
|
1620
|
-
def
|
|
1630
|
+
def get_instance2_with_http_info(
|
|
1621
1631
|
self,
|
|
1622
|
-
|
|
1632
|
+
vm_id: StrictInt,
|
|
1623
1633
|
_request_timeout: Union[
|
|
1624
1634
|
None,
|
|
1625
1635
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -1632,13 +1642,13 @@ class VirtualMachineApi:
|
|
|
1632
1642
|
_content_type: Optional[StrictStr] = None,
|
|
1633
1643
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1634
1644
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1635
|
-
) -> ApiResponse[
|
|
1636
|
-
"""
|
|
1645
|
+
) -> ApiResponse[Instance]:
|
|
1646
|
+
"""Retrieve virtual machine details
|
|
1637
1647
|
|
|
1638
|
-
|
|
1648
|
+
Retrieves the details of an existing virtual machine. Provide the virtual machine ID in the path, and Infrahub will return information about the corresponding VM.
|
|
1639
1649
|
|
|
1640
|
-
:param
|
|
1641
|
-
:type
|
|
1650
|
+
:param vm_id: (required)
|
|
1651
|
+
:type vm_id: int
|
|
1642
1652
|
:param _request_timeout: timeout setting for this request. If one
|
|
1643
1653
|
number provided, it will be total request
|
|
1644
1654
|
timeout. It can also be a pair (tuple) of
|
|
@@ -1661,8 +1671,8 @@ class VirtualMachineApi:
|
|
|
1661
1671
|
:return: Returns the result object.
|
|
1662
1672
|
""" # noqa: E501
|
|
1663
1673
|
|
|
1664
|
-
_param = self.
|
|
1665
|
-
|
|
1674
|
+
_param = self._get_instance2_serialize(
|
|
1675
|
+
vm_id=vm_id,
|
|
1666
1676
|
_request_auth=_request_auth,
|
|
1667
1677
|
_content_type=_content_type,
|
|
1668
1678
|
_headers=_headers,
|
|
@@ -1670,11 +1680,10 @@ class VirtualMachineApi:
|
|
|
1670
1680
|
)
|
|
1671
1681
|
|
|
1672
1682
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
1673
|
-
'200': "
|
|
1683
|
+
'200': "Instance",
|
|
1674
1684
|
'400': "ErrorResponseModel",
|
|
1675
1685
|
'401': "ErrorResponseModel",
|
|
1676
1686
|
'404': "ErrorResponseModel",
|
|
1677
|
-
'409': "ErrorResponseModel",
|
|
1678
1687
|
'500': None,
|
|
1679
1688
|
}
|
|
1680
1689
|
response_data = self.api_client.call_api(
|
|
@@ -1689,9 +1698,9 @@ class VirtualMachineApi:
|
|
|
1689
1698
|
|
|
1690
1699
|
|
|
1691
1700
|
@validate_call
|
|
1692
|
-
def
|
|
1701
|
+
def get_instance2_without_preload_content(
|
|
1693
1702
|
self,
|
|
1694
|
-
|
|
1703
|
+
vm_id: StrictInt,
|
|
1695
1704
|
_request_timeout: Union[
|
|
1696
1705
|
None,
|
|
1697
1706
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -1705,12 +1714,12 @@ class VirtualMachineApi:
|
|
|
1705
1714
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1706
1715
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1707
1716
|
) -> RESTResponseType:
|
|
1708
|
-
"""
|
|
1717
|
+
"""Retrieve virtual machine details
|
|
1709
1718
|
|
|
1710
|
-
|
|
1719
|
+
Retrieves the details of an existing virtual machine. Provide the virtual machine ID in the path, and Infrahub will return information about the corresponding VM.
|
|
1711
1720
|
|
|
1712
|
-
:param
|
|
1713
|
-
:type
|
|
1721
|
+
:param vm_id: (required)
|
|
1722
|
+
:type vm_id: int
|
|
1714
1723
|
:param _request_timeout: timeout setting for this request. If one
|
|
1715
1724
|
number provided, it will be total request
|
|
1716
1725
|
timeout. It can also be a pair (tuple) of
|
|
@@ -1733,8 +1742,8 @@ class VirtualMachineApi:
|
|
|
1733
1742
|
:return: Returns the result object.
|
|
1734
1743
|
""" # noqa: E501
|
|
1735
1744
|
|
|
1736
|
-
_param = self.
|
|
1737
|
-
|
|
1745
|
+
_param = self._get_instance2_serialize(
|
|
1746
|
+
vm_id=vm_id,
|
|
1738
1747
|
_request_auth=_request_auth,
|
|
1739
1748
|
_content_type=_content_type,
|
|
1740
1749
|
_headers=_headers,
|
|
@@ -1742,11 +1751,10 @@ class VirtualMachineApi:
|
|
|
1742
1751
|
)
|
|
1743
1752
|
|
|
1744
1753
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
1745
|
-
'200': "
|
|
1754
|
+
'200': "Instance",
|
|
1746
1755
|
'400': "ErrorResponseModel",
|
|
1747
1756
|
'401': "ErrorResponseModel",
|
|
1748
1757
|
'404': "ErrorResponseModel",
|
|
1749
|
-
'409': "ErrorResponseModel",
|
|
1750
1758
|
'500': None,
|
|
1751
1759
|
}
|
|
1752
1760
|
response_data = self.api_client.call_api(
|
|
@@ -1756,9 +1764,9 @@ class VirtualMachineApi:
|
|
|
1756
1764
|
return response_data.response
|
|
1757
1765
|
|
|
1758
1766
|
|
|
1759
|
-
def
|
|
1767
|
+
def _get_instance2_serialize(
|
|
1760
1768
|
self,
|
|
1761
|
-
|
|
1769
|
+
vm_id,
|
|
1762
1770
|
_request_auth,
|
|
1763
1771
|
_content_type,
|
|
1764
1772
|
_headers,
|
|
@@ -1780,8 +1788,8 @@ class VirtualMachineApi:
|
|
|
1780
1788
|
_body_params: Optional[bytes] = None
|
|
1781
1789
|
|
|
1782
1790
|
# process the path parameters
|
|
1783
|
-
if
|
|
1784
|
-
_path_params['
|
|
1791
|
+
if vm_id is not None:
|
|
1792
|
+
_path_params['vm_id'] = vm_id
|
|
1785
1793
|
# process the query parameters
|
|
1786
1794
|
# process the header parameters
|
|
1787
1795
|
# process the form parameters
|
|
@@ -1799,13 +1807,12 @@ class VirtualMachineApi:
|
|
|
1799
1807
|
|
|
1800
1808
|
# authentication setting
|
|
1801
1809
|
_auth_settings: List[str] = [
|
|
1802
|
-
'apiKey'
|
|
1803
|
-
'accessToken'
|
|
1810
|
+
'apiKey'
|
|
1804
1811
|
]
|
|
1805
1812
|
|
|
1806
1813
|
return self.api_client.param_serialize(
|
|
1807
|
-
method='
|
|
1808
|
-
resource_path='/core/virtual-machines/{
|
|
1814
|
+
method='GET',
|
|
1815
|
+
resource_path='/core/virtual-machines/{vm_id}',
|
|
1809
1816
|
path_params=_path_params,
|
|
1810
1817
|
query_params=_query_params,
|
|
1811
1818
|
header_params=_header_params,
|
|
@@ -1822,10 +1829,9 @@ class VirtualMachineApi:
|
|
|
1822
1829
|
|
|
1823
1830
|
|
|
1824
1831
|
@validate_call
|
|
1825
|
-
def
|
|
1832
|
+
def get_instance3(
|
|
1826
1833
|
self,
|
|
1827
|
-
|
|
1828
|
-
payload: EditlabelofanexistingVMPayload,
|
|
1834
|
+
vm_id: StrictInt,
|
|
1829
1835
|
_request_timeout: Union[
|
|
1830
1836
|
None,
|
|
1831
1837
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -1839,14 +1845,12 @@ class VirtualMachineApi:
|
|
|
1839
1845
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1840
1846
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1841
1847
|
) -> ResponseModel:
|
|
1842
|
-
"""
|
|
1848
|
+
"""Hard reboot virtual machine
|
|
1843
1849
|
|
|
1844
|
-
|
|
1850
|
+
Initiates a hard reboot for a virtual machine, simulating the process of unplugging and rebooting a physical machine. Provide the virtual machine ID in the path to execute a hard reboot for the specified virtual machine.
|
|
1845
1851
|
|
|
1846
|
-
:param
|
|
1847
|
-
:type
|
|
1848
|
-
:param payload: (required)
|
|
1849
|
-
:type payload: EditlabelofanexistingVMPayload
|
|
1852
|
+
:param vm_id: (required)
|
|
1853
|
+
:type vm_id: int
|
|
1850
1854
|
:param _request_timeout: timeout setting for this request. If one
|
|
1851
1855
|
number provided, it will be total request
|
|
1852
1856
|
timeout. It can also be a pair (tuple) of
|
|
@@ -1869,9 +1873,8 @@ class VirtualMachineApi:
|
|
|
1869
1873
|
:return: Returns the result object.
|
|
1870
1874
|
""" # noqa: E501
|
|
1871
1875
|
|
|
1872
|
-
_param = self.
|
|
1873
|
-
|
|
1874
|
-
payload=payload,
|
|
1876
|
+
_param = self._get_instance3_serialize(
|
|
1877
|
+
vm_id=vm_id,
|
|
1875
1878
|
_request_auth=_request_auth,
|
|
1876
1879
|
_content_type=_content_type,
|
|
1877
1880
|
_headers=_headers,
|
|
@@ -1883,7 +1886,6 @@ class VirtualMachineApi:
|
|
|
1883
1886
|
'400': "ErrorResponseModel",
|
|
1884
1887
|
'401': "ErrorResponseModel",
|
|
1885
1888
|
'404': "ErrorResponseModel",
|
|
1886
|
-
'409': "ErrorResponseModel",
|
|
1887
1889
|
'500': None,
|
|
1888
1890
|
}
|
|
1889
1891
|
response_data = self.api_client.call_api(
|
|
@@ -1898,10 +1900,9 @@ class VirtualMachineApi:
|
|
|
1898
1900
|
|
|
1899
1901
|
|
|
1900
1902
|
@validate_call
|
|
1901
|
-
def
|
|
1903
|
+
def get_instance3_with_http_info(
|
|
1902
1904
|
self,
|
|
1903
|
-
|
|
1904
|
-
payload: EditlabelofanexistingVMPayload,
|
|
1905
|
+
vm_id: StrictInt,
|
|
1905
1906
|
_request_timeout: Union[
|
|
1906
1907
|
None,
|
|
1907
1908
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -1915,14 +1916,12 @@ class VirtualMachineApi:
|
|
|
1915
1916
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1916
1917
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1917
1918
|
) -> ApiResponse[ResponseModel]:
|
|
1918
|
-
"""
|
|
1919
|
+
"""Hard reboot virtual machine
|
|
1919
1920
|
|
|
1920
|
-
|
|
1921
|
+
Initiates a hard reboot for a virtual machine, simulating the process of unplugging and rebooting a physical machine. Provide the virtual machine ID in the path to execute a hard reboot for the specified virtual machine.
|
|
1921
1922
|
|
|
1922
|
-
:param
|
|
1923
|
-
:type
|
|
1924
|
-
:param payload: (required)
|
|
1925
|
-
:type payload: EditlabelofanexistingVMPayload
|
|
1923
|
+
:param vm_id: (required)
|
|
1924
|
+
:type vm_id: int
|
|
1926
1925
|
:param _request_timeout: timeout setting for this request. If one
|
|
1927
1926
|
number provided, it will be total request
|
|
1928
1927
|
timeout. It can also be a pair (tuple) of
|
|
@@ -1945,9 +1944,8 @@ class VirtualMachineApi:
|
|
|
1945
1944
|
:return: Returns the result object.
|
|
1946
1945
|
""" # noqa: E501
|
|
1947
1946
|
|
|
1948
|
-
_param = self.
|
|
1949
|
-
|
|
1950
|
-
payload=payload,
|
|
1947
|
+
_param = self._get_instance3_serialize(
|
|
1948
|
+
vm_id=vm_id,
|
|
1951
1949
|
_request_auth=_request_auth,
|
|
1952
1950
|
_content_type=_content_type,
|
|
1953
1951
|
_headers=_headers,
|
|
@@ -1959,7 +1957,6 @@ class VirtualMachineApi:
|
|
|
1959
1957
|
'400': "ErrorResponseModel",
|
|
1960
1958
|
'401': "ErrorResponseModel",
|
|
1961
1959
|
'404': "ErrorResponseModel",
|
|
1962
|
-
'409': "ErrorResponseModel",
|
|
1963
1960
|
'500': None,
|
|
1964
1961
|
}
|
|
1965
1962
|
response_data = self.api_client.call_api(
|
|
@@ -1974,10 +1971,9 @@ class VirtualMachineApi:
|
|
|
1974
1971
|
|
|
1975
1972
|
|
|
1976
1973
|
@validate_call
|
|
1977
|
-
def
|
|
1974
|
+
def get_instance3_without_preload_content(
|
|
1978
1975
|
self,
|
|
1979
|
-
|
|
1980
|
-
payload: EditlabelofanexistingVMPayload,
|
|
1976
|
+
vm_id: StrictInt,
|
|
1981
1977
|
_request_timeout: Union[
|
|
1982
1978
|
None,
|
|
1983
1979
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -1991,14 +1987,12 @@ class VirtualMachineApi:
|
|
|
1991
1987
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1992
1988
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1993
1989
|
) -> RESTResponseType:
|
|
1994
|
-
"""
|
|
1990
|
+
"""Hard reboot virtual machine
|
|
1995
1991
|
|
|
1996
|
-
|
|
1992
|
+
Initiates a hard reboot for a virtual machine, simulating the process of unplugging and rebooting a physical machine. Provide the virtual machine ID in the path to execute a hard reboot for the specified virtual machine.
|
|
1997
1993
|
|
|
1998
|
-
:param
|
|
1999
|
-
:type
|
|
2000
|
-
:param payload: (required)
|
|
2001
|
-
:type payload: EditlabelofanexistingVMPayload
|
|
1994
|
+
:param vm_id: (required)
|
|
1995
|
+
:type vm_id: int
|
|
2002
1996
|
:param _request_timeout: timeout setting for this request. If one
|
|
2003
1997
|
number provided, it will be total request
|
|
2004
1998
|
timeout. It can also be a pair (tuple) of
|
|
@@ -2021,9 +2015,8 @@ class VirtualMachineApi:
|
|
|
2021
2015
|
:return: Returns the result object.
|
|
2022
2016
|
""" # noqa: E501
|
|
2023
2017
|
|
|
2024
|
-
_param = self.
|
|
2025
|
-
|
|
2026
|
-
payload=payload,
|
|
2018
|
+
_param = self._get_instance3_serialize(
|
|
2019
|
+
vm_id=vm_id,
|
|
2027
2020
|
_request_auth=_request_auth,
|
|
2028
2021
|
_content_type=_content_type,
|
|
2029
2022
|
_headers=_headers,
|
|
@@ -2035,7 +2028,6 @@ class VirtualMachineApi:
|
|
|
2035
2028
|
'400': "ErrorResponseModel",
|
|
2036
2029
|
'401': "ErrorResponseModel",
|
|
2037
2030
|
'404': "ErrorResponseModel",
|
|
2038
|
-
'409': "ErrorResponseModel",
|
|
2039
2031
|
'500': None,
|
|
2040
2032
|
}
|
|
2041
2033
|
response_data = self.api_client.call_api(
|
|
@@ -2045,10 +2037,9 @@ class VirtualMachineApi:
|
|
|
2045
2037
|
return response_data.response
|
|
2046
2038
|
|
|
2047
2039
|
|
|
2048
|
-
def
|
|
2040
|
+
def _get_instance3_serialize(
|
|
2049
2041
|
self,
|
|
2050
|
-
|
|
2051
|
-
payload,
|
|
2042
|
+
vm_id,
|
|
2052
2043
|
_request_auth,
|
|
2053
2044
|
_content_type,
|
|
2054
2045
|
_headers,
|
|
@@ -2070,14 +2061,12 @@ class VirtualMachineApi:
|
|
|
2070
2061
|
_body_params: Optional[bytes] = None
|
|
2071
2062
|
|
|
2072
2063
|
# process the path parameters
|
|
2073
|
-
if
|
|
2074
|
-
_path_params['
|
|
2064
|
+
if vm_id is not None:
|
|
2065
|
+
_path_params['vm_id'] = vm_id
|
|
2075
2066
|
# process the query parameters
|
|
2076
2067
|
# process the header parameters
|
|
2077
2068
|
# process the form parameters
|
|
2078
2069
|
# process the body parameter
|
|
2079
|
-
if payload is not None:
|
|
2080
|
-
_body_params = payload
|
|
2081
2070
|
|
|
2082
2071
|
|
|
2083
2072
|
# set the HTTP header `Accept`
|
|
@@ -2088,29 +2077,15 @@ class VirtualMachineApi:
|
|
|
2088
2077
|
]
|
|
2089
2078
|
)
|
|
2090
2079
|
|
|
2091
|
-
# set the HTTP header `Content-Type`
|
|
2092
|
-
if _content_type:
|
|
2093
|
-
_header_params['Content-Type'] = _content_type
|
|
2094
|
-
else:
|
|
2095
|
-
_default_content_type = (
|
|
2096
|
-
self.api_client.select_header_content_type(
|
|
2097
|
-
[
|
|
2098
|
-
'application/json'
|
|
2099
|
-
]
|
|
2100
|
-
)
|
|
2101
|
-
)
|
|
2102
|
-
if _default_content_type is not None:
|
|
2103
|
-
_header_params['Content-Type'] = _default_content_type
|
|
2104
2080
|
|
|
2105
2081
|
# authentication setting
|
|
2106
2082
|
_auth_settings: List[str] = [
|
|
2107
|
-
'apiKey'
|
|
2108
|
-
'accessToken'
|
|
2083
|
+
'apiKey'
|
|
2109
2084
|
]
|
|
2110
2085
|
|
|
2111
2086
|
return self.api_client.param_serialize(
|
|
2112
|
-
method='
|
|
2113
|
-
resource_path='/core/virtual-machines/{
|
|
2087
|
+
method='GET',
|
|
2088
|
+
resource_path='/core/virtual-machines/{vm_id}/hard-reboot',
|
|
2114
2089
|
path_params=_path_params,
|
|
2115
2090
|
query_params=_query_params,
|
|
2116
2091
|
header_params=_header_params,
|
|
@@ -2127,9 +2102,9 @@ class VirtualMachineApi:
|
|
|
2127
2102
|
|
|
2128
2103
|
|
|
2129
2104
|
@validate_call
|
|
2130
|
-
def
|
|
2105
|
+
def get_instance4(
|
|
2131
2106
|
self,
|
|
2132
|
-
|
|
2107
|
+
vm_id: StrictInt,
|
|
2133
2108
|
_request_timeout: Union[
|
|
2134
2109
|
None,
|
|
2135
2110
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -2142,13 +2117,13 @@ class VirtualMachineApi:
|
|
|
2142
2117
|
_content_type: Optional[StrictStr] = None,
|
|
2143
2118
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2144
2119
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2145
|
-
) ->
|
|
2146
|
-
"""
|
|
2120
|
+
) -> ResponseModel:
|
|
2121
|
+
"""Start virtual machine
|
|
2147
2122
|
|
|
2148
|
-
|
|
2123
|
+
Initiates the startup of a virtual machine. Provide the virtual machine ID in the path to initiate the starting of the specified virtual machine.
|
|
2149
2124
|
|
|
2150
|
-
:param
|
|
2151
|
-
:type
|
|
2125
|
+
:param vm_id: (required)
|
|
2126
|
+
:type vm_id: int
|
|
2152
2127
|
:param _request_timeout: timeout setting for this request. If one
|
|
2153
2128
|
number provided, it will be total request
|
|
2154
2129
|
timeout. It can also be a pair (tuple) of
|
|
@@ -2171,8 +2146,8 @@ class VirtualMachineApi:
|
|
|
2171
2146
|
:return: Returns the result object.
|
|
2172
2147
|
""" # noqa: E501
|
|
2173
2148
|
|
|
2174
|
-
_param = self.
|
|
2175
|
-
|
|
2149
|
+
_param = self._get_instance4_serialize(
|
|
2150
|
+
vm_id=vm_id,
|
|
2176
2151
|
_request_auth=_request_auth,
|
|
2177
2152
|
_content_type=_content_type,
|
|
2178
2153
|
_headers=_headers,
|
|
@@ -2180,7 +2155,7 @@ class VirtualMachineApi:
|
|
|
2180
2155
|
)
|
|
2181
2156
|
|
|
2182
2157
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
2183
|
-
'200': "
|
|
2158
|
+
'200': "ResponseModel",
|
|
2184
2159
|
'400': "ErrorResponseModel",
|
|
2185
2160
|
'401': "ErrorResponseModel",
|
|
2186
2161
|
'404': "ErrorResponseModel",
|
|
@@ -2198,9 +2173,9 @@ class VirtualMachineApi:
|
|
|
2198
2173
|
|
|
2199
2174
|
|
|
2200
2175
|
@validate_call
|
|
2201
|
-
def
|
|
2176
|
+
def get_instance4_with_http_info(
|
|
2202
2177
|
self,
|
|
2203
|
-
|
|
2178
|
+
vm_id: StrictInt,
|
|
2204
2179
|
_request_timeout: Union[
|
|
2205
2180
|
None,
|
|
2206
2181
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -2213,13 +2188,13 @@ class VirtualMachineApi:
|
|
|
2213
2188
|
_content_type: Optional[StrictStr] = None,
|
|
2214
2189
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2215
2190
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2216
|
-
) -> ApiResponse[
|
|
2217
|
-
"""
|
|
2191
|
+
) -> ApiResponse[ResponseModel]:
|
|
2192
|
+
"""Start virtual machine
|
|
2218
2193
|
|
|
2219
|
-
|
|
2194
|
+
Initiates the startup of a virtual machine. Provide the virtual machine ID in the path to initiate the starting of the specified virtual machine.
|
|
2220
2195
|
|
|
2221
|
-
:param
|
|
2222
|
-
:type
|
|
2196
|
+
:param vm_id: (required)
|
|
2197
|
+
:type vm_id: int
|
|
2223
2198
|
:param _request_timeout: timeout setting for this request. If one
|
|
2224
2199
|
number provided, it will be total request
|
|
2225
2200
|
timeout. It can also be a pair (tuple) of
|
|
@@ -2242,8 +2217,8 @@ class VirtualMachineApi:
|
|
|
2242
2217
|
:return: Returns the result object.
|
|
2243
2218
|
""" # noqa: E501
|
|
2244
2219
|
|
|
2245
|
-
_param = self.
|
|
2246
|
-
|
|
2220
|
+
_param = self._get_instance4_serialize(
|
|
2221
|
+
vm_id=vm_id,
|
|
2247
2222
|
_request_auth=_request_auth,
|
|
2248
2223
|
_content_type=_content_type,
|
|
2249
2224
|
_headers=_headers,
|
|
@@ -2251,7 +2226,7 @@ class VirtualMachineApi:
|
|
|
2251
2226
|
)
|
|
2252
2227
|
|
|
2253
2228
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
2254
|
-
'200': "
|
|
2229
|
+
'200': "ResponseModel",
|
|
2255
2230
|
'400': "ErrorResponseModel",
|
|
2256
2231
|
'401': "ErrorResponseModel",
|
|
2257
2232
|
'404': "ErrorResponseModel",
|
|
@@ -2269,9 +2244,9 @@ class VirtualMachineApi:
|
|
|
2269
2244
|
|
|
2270
2245
|
|
|
2271
2246
|
@validate_call
|
|
2272
|
-
def
|
|
2247
|
+
def get_instance4_without_preload_content(
|
|
2273
2248
|
self,
|
|
2274
|
-
|
|
2249
|
+
vm_id: StrictInt,
|
|
2275
2250
|
_request_timeout: Union[
|
|
2276
2251
|
None,
|
|
2277
2252
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -2285,12 +2260,12 @@ class VirtualMachineApi:
|
|
|
2285
2260
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2286
2261
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2287
2262
|
) -> RESTResponseType:
|
|
2288
|
-
"""
|
|
2263
|
+
"""Start virtual machine
|
|
2289
2264
|
|
|
2290
|
-
|
|
2265
|
+
Initiates the startup of a virtual machine. Provide the virtual machine ID in the path to initiate the starting of the specified virtual machine.
|
|
2291
2266
|
|
|
2292
|
-
:param
|
|
2293
|
-
:type
|
|
2267
|
+
:param vm_id: (required)
|
|
2268
|
+
:type vm_id: int
|
|
2294
2269
|
:param _request_timeout: timeout setting for this request. If one
|
|
2295
2270
|
number provided, it will be total request
|
|
2296
2271
|
timeout. It can also be a pair (tuple) of
|
|
@@ -2313,8 +2288,8 @@ class VirtualMachineApi:
|
|
|
2313
2288
|
:return: Returns the result object.
|
|
2314
2289
|
""" # noqa: E501
|
|
2315
2290
|
|
|
2316
|
-
_param = self.
|
|
2317
|
-
|
|
2291
|
+
_param = self._get_instance4_serialize(
|
|
2292
|
+
vm_id=vm_id,
|
|
2318
2293
|
_request_auth=_request_auth,
|
|
2319
2294
|
_content_type=_content_type,
|
|
2320
2295
|
_headers=_headers,
|
|
@@ -2322,7 +2297,7 @@ class VirtualMachineApi:
|
|
|
2322
2297
|
)
|
|
2323
2298
|
|
|
2324
2299
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
2325
|
-
'200': "
|
|
2300
|
+
'200': "ResponseModel",
|
|
2326
2301
|
'400': "ErrorResponseModel",
|
|
2327
2302
|
'401': "ErrorResponseModel",
|
|
2328
2303
|
'404': "ErrorResponseModel",
|
|
@@ -2335,9 +2310,9 @@ class VirtualMachineApi:
|
|
|
2335
2310
|
return response_data.response
|
|
2336
2311
|
|
|
2337
2312
|
|
|
2338
|
-
def
|
|
2313
|
+
def _get_instance4_serialize(
|
|
2339
2314
|
self,
|
|
2340
|
-
|
|
2315
|
+
vm_id,
|
|
2341
2316
|
_request_auth,
|
|
2342
2317
|
_content_type,
|
|
2343
2318
|
_headers,
|
|
@@ -2359,8 +2334,8 @@ class VirtualMachineApi:
|
|
|
2359
2334
|
_body_params: Optional[bytes] = None
|
|
2360
2335
|
|
|
2361
2336
|
# process the path parameters
|
|
2362
|
-
if
|
|
2363
|
-
_path_params['
|
|
2337
|
+
if vm_id is not None:
|
|
2338
|
+
_path_params['vm_id'] = vm_id
|
|
2364
2339
|
# process the query parameters
|
|
2365
2340
|
# process the header parameters
|
|
2366
2341
|
# process the form parameters
|
|
@@ -2378,13 +2353,12 @@ class VirtualMachineApi:
|
|
|
2378
2353
|
|
|
2379
2354
|
# authentication setting
|
|
2380
2355
|
_auth_settings: List[str] = [
|
|
2381
|
-
'apiKey'
|
|
2382
|
-
'accessToken'
|
|
2356
|
+
'apiKey'
|
|
2383
2357
|
]
|
|
2384
2358
|
|
|
2385
2359
|
return self.api_client.param_serialize(
|
|
2386
2360
|
method='GET',
|
|
2387
|
-
resource_path='/core/virtual-machines/
|
|
2361
|
+
resource_path='/core/virtual-machines/{vm_id}/start',
|
|
2388
2362
|
path_params=_path_params,
|
|
2389
2363
|
query_params=_query_params,
|
|
2390
2364
|
header_params=_header_params,
|
|
@@ -2401,9 +2375,9 @@ class VirtualMachineApi:
|
|
|
2401
2375
|
|
|
2402
2376
|
|
|
2403
2377
|
@validate_call
|
|
2404
|
-
def
|
|
2378
|
+
def get_instance5(
|
|
2405
2379
|
self,
|
|
2406
|
-
|
|
2380
|
+
vm_id: StrictInt,
|
|
2407
2381
|
_request_timeout: Union[
|
|
2408
2382
|
None,
|
|
2409
2383
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -2417,12 +2391,12 @@ class VirtualMachineApi:
|
|
|
2417
2391
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2418
2392
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2419
2393
|
) -> ResponseModel:
|
|
2420
|
-
"""
|
|
2394
|
+
"""Stop virtual machine
|
|
2421
2395
|
|
|
2422
|
-
|
|
2396
|
+
Shuts down a virtual machine. Provide the virtual machine ID in the path to initiate the shutdown process for the specified virtual machine.
|
|
2423
2397
|
|
|
2424
|
-
:param
|
|
2425
|
-
:type
|
|
2398
|
+
:param vm_id: (required)
|
|
2399
|
+
:type vm_id: int
|
|
2426
2400
|
:param _request_timeout: timeout setting for this request. If one
|
|
2427
2401
|
number provided, it will be total request
|
|
2428
2402
|
timeout. It can also be a pair (tuple) of
|
|
@@ -2445,8 +2419,8 @@ class VirtualMachineApi:
|
|
|
2445
2419
|
:return: Returns the result object.
|
|
2446
2420
|
""" # noqa: E501
|
|
2447
2421
|
|
|
2448
|
-
_param = self.
|
|
2449
|
-
|
|
2422
|
+
_param = self._get_instance5_serialize(
|
|
2423
|
+
vm_id=vm_id,
|
|
2450
2424
|
_request_auth=_request_auth,
|
|
2451
2425
|
_content_type=_content_type,
|
|
2452
2426
|
_headers=_headers,
|
|
@@ -2472,9 +2446,9 @@ class VirtualMachineApi:
|
|
|
2472
2446
|
|
|
2473
2447
|
|
|
2474
2448
|
@validate_call
|
|
2475
|
-
def
|
|
2449
|
+
def get_instance5_with_http_info(
|
|
2476
2450
|
self,
|
|
2477
|
-
|
|
2451
|
+
vm_id: StrictInt,
|
|
2478
2452
|
_request_timeout: Union[
|
|
2479
2453
|
None,
|
|
2480
2454
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -2488,12 +2462,12 @@ class VirtualMachineApi:
|
|
|
2488
2462
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2489
2463
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2490
2464
|
) -> ApiResponse[ResponseModel]:
|
|
2491
|
-
"""
|
|
2465
|
+
"""Stop virtual machine
|
|
2492
2466
|
|
|
2493
|
-
|
|
2467
|
+
Shuts down a virtual machine. Provide the virtual machine ID in the path to initiate the shutdown process for the specified virtual machine.
|
|
2494
2468
|
|
|
2495
|
-
:param
|
|
2496
|
-
:type
|
|
2469
|
+
:param vm_id: (required)
|
|
2470
|
+
:type vm_id: int
|
|
2497
2471
|
:param _request_timeout: timeout setting for this request. If one
|
|
2498
2472
|
number provided, it will be total request
|
|
2499
2473
|
timeout. It can also be a pair (tuple) of
|
|
@@ -2516,8 +2490,8 @@ class VirtualMachineApi:
|
|
|
2516
2490
|
:return: Returns the result object.
|
|
2517
2491
|
""" # noqa: E501
|
|
2518
2492
|
|
|
2519
|
-
_param = self.
|
|
2520
|
-
|
|
2493
|
+
_param = self._get_instance5_serialize(
|
|
2494
|
+
vm_id=vm_id,
|
|
2521
2495
|
_request_auth=_request_auth,
|
|
2522
2496
|
_content_type=_content_type,
|
|
2523
2497
|
_headers=_headers,
|
|
@@ -2543,9 +2517,9 @@ class VirtualMachineApi:
|
|
|
2543
2517
|
|
|
2544
2518
|
|
|
2545
2519
|
@validate_call
|
|
2546
|
-
def
|
|
2520
|
+
def get_instance5_without_preload_content(
|
|
2547
2521
|
self,
|
|
2548
|
-
|
|
2522
|
+
vm_id: StrictInt,
|
|
2549
2523
|
_request_timeout: Union[
|
|
2550
2524
|
None,
|
|
2551
2525
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -2559,12 +2533,12 @@ class VirtualMachineApi:
|
|
|
2559
2533
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2560
2534
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2561
2535
|
) -> RESTResponseType:
|
|
2562
|
-
"""
|
|
2536
|
+
"""Stop virtual machine
|
|
2563
2537
|
|
|
2564
|
-
|
|
2538
|
+
Shuts down a virtual machine. Provide the virtual machine ID in the path to initiate the shutdown process for the specified virtual machine.
|
|
2565
2539
|
|
|
2566
|
-
:param
|
|
2567
|
-
:type
|
|
2540
|
+
:param vm_id: (required)
|
|
2541
|
+
:type vm_id: int
|
|
2568
2542
|
:param _request_timeout: timeout setting for this request. If one
|
|
2569
2543
|
number provided, it will be total request
|
|
2570
2544
|
timeout. It can also be a pair (tuple) of
|
|
@@ -2587,8 +2561,8 @@ class VirtualMachineApi:
|
|
|
2587
2561
|
:return: Returns the result object.
|
|
2588
2562
|
""" # noqa: E501
|
|
2589
2563
|
|
|
2590
|
-
_param = self.
|
|
2591
|
-
|
|
2564
|
+
_param = self._get_instance5_serialize(
|
|
2565
|
+
vm_id=vm_id,
|
|
2592
2566
|
_request_auth=_request_auth,
|
|
2593
2567
|
_content_type=_content_type,
|
|
2594
2568
|
_headers=_headers,
|
|
@@ -2609,9 +2583,9 @@ class VirtualMachineApi:
|
|
|
2609
2583
|
return response_data.response
|
|
2610
2584
|
|
|
2611
2585
|
|
|
2612
|
-
def
|
|
2586
|
+
def _get_instance5_serialize(
|
|
2613
2587
|
self,
|
|
2614
|
-
|
|
2588
|
+
vm_id,
|
|
2615
2589
|
_request_auth,
|
|
2616
2590
|
_content_type,
|
|
2617
2591
|
_headers,
|
|
@@ -2633,8 +2607,8 @@ class VirtualMachineApi:
|
|
|
2633
2607
|
_body_params: Optional[bytes] = None
|
|
2634
2608
|
|
|
2635
2609
|
# process the path parameters
|
|
2636
|
-
if
|
|
2637
|
-
_path_params['
|
|
2610
|
+
if vm_id is not None:
|
|
2611
|
+
_path_params['vm_id'] = vm_id
|
|
2638
2612
|
# process the query parameters
|
|
2639
2613
|
# process the header parameters
|
|
2640
2614
|
# process the form parameters
|
|
@@ -2652,13 +2626,12 @@ class VirtualMachineApi:
|
|
|
2652
2626
|
|
|
2653
2627
|
# authentication setting
|
|
2654
2628
|
_auth_settings: List[str] = [
|
|
2655
|
-
'apiKey'
|
|
2656
|
-
'accessToken'
|
|
2629
|
+
'apiKey'
|
|
2657
2630
|
]
|
|
2658
2631
|
|
|
2659
2632
|
return self.api_client.param_serialize(
|
|
2660
2633
|
method='GET',
|
|
2661
|
-
resource_path='/core/virtual-machines/{
|
|
2634
|
+
resource_path='/core/virtual-machines/{vm_id}/stop',
|
|
2662
2635
|
path_params=_path_params,
|
|
2663
2636
|
query_params=_query_params,
|
|
2664
2637
|
header_params=_header_params,
|
|
@@ -2675,9 +2648,9 @@ class VirtualMachineApi:
|
|
|
2675
2648
|
|
|
2676
2649
|
|
|
2677
2650
|
@validate_call
|
|
2678
|
-
def
|
|
2651
|
+
def get_instance_hibernate(
|
|
2679
2652
|
self,
|
|
2680
|
-
|
|
2653
|
+
vm_id: StrictInt,
|
|
2681
2654
|
_request_timeout: Union[
|
|
2682
2655
|
None,
|
|
2683
2656
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -2695,8 +2668,8 @@ class VirtualMachineApi:
|
|
|
2695
2668
|
|
|
2696
2669
|
Initiates the hibernation of a virtual machine, saving its current state to disk before powering off. Provide the virtual machine ID in the path to specify the virtual machine to be hibernated.
|
|
2697
2670
|
|
|
2698
|
-
:param
|
|
2699
|
-
:type
|
|
2671
|
+
:param vm_id: (required)
|
|
2672
|
+
:type vm_id: int
|
|
2700
2673
|
:param _request_timeout: timeout setting for this request. If one
|
|
2701
2674
|
number provided, it will be total request
|
|
2702
2675
|
timeout. It can also be a pair (tuple) of
|
|
@@ -2719,8 +2692,8 @@ class VirtualMachineApi:
|
|
|
2719
2692
|
:return: Returns the result object.
|
|
2720
2693
|
""" # noqa: E501
|
|
2721
2694
|
|
|
2722
|
-
_param = self.
|
|
2723
|
-
|
|
2695
|
+
_param = self._get_instance_hibernate_serialize(
|
|
2696
|
+
vm_id=vm_id,
|
|
2724
2697
|
_request_auth=_request_auth,
|
|
2725
2698
|
_content_type=_content_type,
|
|
2726
2699
|
_headers=_headers,
|
|
@@ -2746,9 +2719,9 @@ class VirtualMachineApi:
|
|
|
2746
2719
|
|
|
2747
2720
|
|
|
2748
2721
|
@validate_call
|
|
2749
|
-
def
|
|
2722
|
+
def get_instance_hibernate_with_http_info(
|
|
2750
2723
|
self,
|
|
2751
|
-
|
|
2724
|
+
vm_id: StrictInt,
|
|
2752
2725
|
_request_timeout: Union[
|
|
2753
2726
|
None,
|
|
2754
2727
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -2766,8 +2739,8 @@ class VirtualMachineApi:
|
|
|
2766
2739
|
|
|
2767
2740
|
Initiates the hibernation of a virtual machine, saving its current state to disk before powering off. Provide the virtual machine ID in the path to specify the virtual machine to be hibernated.
|
|
2768
2741
|
|
|
2769
|
-
:param
|
|
2770
|
-
:type
|
|
2742
|
+
:param vm_id: (required)
|
|
2743
|
+
:type vm_id: int
|
|
2771
2744
|
:param _request_timeout: timeout setting for this request. If one
|
|
2772
2745
|
number provided, it will be total request
|
|
2773
2746
|
timeout. It can also be a pair (tuple) of
|
|
@@ -2790,8 +2763,8 @@ class VirtualMachineApi:
|
|
|
2790
2763
|
:return: Returns the result object.
|
|
2791
2764
|
""" # noqa: E501
|
|
2792
2765
|
|
|
2793
|
-
_param = self.
|
|
2794
|
-
|
|
2766
|
+
_param = self._get_instance_hibernate_serialize(
|
|
2767
|
+
vm_id=vm_id,
|
|
2795
2768
|
_request_auth=_request_auth,
|
|
2796
2769
|
_content_type=_content_type,
|
|
2797
2770
|
_headers=_headers,
|
|
@@ -2817,9 +2790,9 @@ class VirtualMachineApi:
|
|
|
2817
2790
|
|
|
2818
2791
|
|
|
2819
2792
|
@validate_call
|
|
2820
|
-
def
|
|
2793
|
+
def get_instance_hibernate_without_preload_content(
|
|
2821
2794
|
self,
|
|
2822
|
-
|
|
2795
|
+
vm_id: StrictInt,
|
|
2823
2796
|
_request_timeout: Union[
|
|
2824
2797
|
None,
|
|
2825
2798
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -2837,8 +2810,8 @@ class VirtualMachineApi:
|
|
|
2837
2810
|
|
|
2838
2811
|
Initiates the hibernation of a virtual machine, saving its current state to disk before powering off. Provide the virtual machine ID in the path to specify the virtual machine to be hibernated.
|
|
2839
2812
|
|
|
2840
|
-
:param
|
|
2841
|
-
:type
|
|
2813
|
+
:param vm_id: (required)
|
|
2814
|
+
:type vm_id: int
|
|
2842
2815
|
:param _request_timeout: timeout setting for this request. If one
|
|
2843
2816
|
number provided, it will be total request
|
|
2844
2817
|
timeout. It can also be a pair (tuple) of
|
|
@@ -2861,8 +2834,8 @@ class VirtualMachineApi:
|
|
|
2861
2834
|
:return: Returns the result object.
|
|
2862
2835
|
""" # noqa: E501
|
|
2863
2836
|
|
|
2864
|
-
_param = self.
|
|
2865
|
-
|
|
2837
|
+
_param = self._get_instance_hibernate_serialize(
|
|
2838
|
+
vm_id=vm_id,
|
|
2866
2839
|
_request_auth=_request_auth,
|
|
2867
2840
|
_content_type=_content_type,
|
|
2868
2841
|
_headers=_headers,
|
|
@@ -2883,9 +2856,9 @@ class VirtualMachineApi:
|
|
|
2883
2856
|
return response_data.response
|
|
2884
2857
|
|
|
2885
2858
|
|
|
2886
|
-
def
|
|
2859
|
+
def _get_instance_hibernate_serialize(
|
|
2887
2860
|
self,
|
|
2888
|
-
|
|
2861
|
+
vm_id,
|
|
2889
2862
|
_request_auth,
|
|
2890
2863
|
_content_type,
|
|
2891
2864
|
_headers,
|
|
@@ -2907,8 +2880,8 @@ class VirtualMachineApi:
|
|
|
2907
2880
|
_body_params: Optional[bytes] = None
|
|
2908
2881
|
|
|
2909
2882
|
# process the path parameters
|
|
2910
|
-
if
|
|
2911
|
-
_path_params['
|
|
2883
|
+
if vm_id is not None:
|
|
2884
|
+
_path_params['vm_id'] = vm_id
|
|
2912
2885
|
# process the query parameters
|
|
2913
2886
|
# process the header parameters
|
|
2914
2887
|
# process the form parameters
|
|
@@ -2926,13 +2899,12 @@ class VirtualMachineApi:
|
|
|
2926
2899
|
|
|
2927
2900
|
# authentication setting
|
|
2928
2901
|
_auth_settings: List[str] = [
|
|
2929
|
-
'apiKey'
|
|
2930
|
-
'accessToken'
|
|
2902
|
+
'apiKey'
|
|
2931
2903
|
]
|
|
2932
2904
|
|
|
2933
2905
|
return self.api_client.param_serialize(
|
|
2934
2906
|
method='GET',
|
|
2935
|
-
resource_path='/core/virtual-machines/{
|
|
2907
|
+
resource_path='/core/virtual-machines/{vm_id}/hibernate',
|
|
2936
2908
|
path_params=_path_params,
|
|
2937
2909
|
query_params=_query_params,
|
|
2938
2910
|
header_params=_header_params,
|
|
@@ -2949,12 +2921,9 @@ class VirtualMachineApi:
|
|
|
2949
2921
|
|
|
2950
2922
|
|
|
2951
2923
|
@validate_call
|
|
2952
|
-
def
|
|
2924
|
+
def get_instance_hibernate_restore(
|
|
2953
2925
|
self,
|
|
2954
|
-
|
|
2955
|
-
page_size: Annotated[Optional[StrictStr], Field(description="Data Per Page")] = None,
|
|
2956
|
-
search: Optional[StrictStr] = None,
|
|
2957
|
-
environment: Annotated[Optional[StrictStr], Field(description="Filter Environment ID or Name")] = None,
|
|
2926
|
+
vm_id: StrictInt,
|
|
2958
2927
|
_request_timeout: Union[
|
|
2959
2928
|
None,
|
|
2960
2929
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -2967,19 +2936,13 @@ class VirtualMachineApi:
|
|
|
2967
2936
|
_content_type: Optional[StrictStr] = None,
|
|
2968
2937
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2969
2938
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2970
|
-
) ->
|
|
2971
|
-
"""
|
|
2939
|
+
) -> ResponseModel:
|
|
2940
|
+
"""Restore virtual machine from hibernation
|
|
2972
2941
|
|
|
2973
|
-
|
|
2942
|
+
Resumes a virtual machine from hibernation, bringing it back to an active state. Provide the virtual machine ID in the path to specify the virtual machine to be restored from hibernation.
|
|
2974
2943
|
|
|
2975
|
-
:param
|
|
2976
|
-
:type
|
|
2977
|
-
:param page_size: Data Per Page
|
|
2978
|
-
:type page_size: str
|
|
2979
|
-
:param search:
|
|
2980
|
-
:type search: str
|
|
2981
|
-
:param environment: Filter Environment ID or Name
|
|
2982
|
-
:type environment: str
|
|
2944
|
+
:param vm_id: (required)
|
|
2945
|
+
:type vm_id: int
|
|
2983
2946
|
:param _request_timeout: timeout setting for this request. If one
|
|
2984
2947
|
number provided, it will be total request
|
|
2985
2948
|
timeout. It can also be a pair (tuple) of
|
|
@@ -3002,11 +2965,8 @@ class VirtualMachineApi:
|
|
|
3002
2965
|
:return: Returns the result object.
|
|
3003
2966
|
""" # noqa: E501
|
|
3004
2967
|
|
|
3005
|
-
_param = self.
|
|
3006
|
-
|
|
3007
|
-
page_size=page_size,
|
|
3008
|
-
search=search,
|
|
3009
|
-
environment=environment,
|
|
2968
|
+
_param = self._get_instance_hibernate_restore_serialize(
|
|
2969
|
+
vm_id=vm_id,
|
|
3010
2970
|
_request_auth=_request_auth,
|
|
3011
2971
|
_content_type=_content_type,
|
|
3012
2972
|
_headers=_headers,
|
|
@@ -3014,9 +2974,10 @@ class VirtualMachineApi:
|
|
|
3014
2974
|
)
|
|
3015
2975
|
|
|
3016
2976
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
3017
|
-
'200': "
|
|
2977
|
+
'200': "ResponseModel",
|
|
3018
2978
|
'400': "ErrorResponseModel",
|
|
3019
2979
|
'401': "ErrorResponseModel",
|
|
2980
|
+
'404': "ErrorResponseModel",
|
|
3020
2981
|
'500': None,
|
|
3021
2982
|
}
|
|
3022
2983
|
response_data = self.api_client.call_api(
|
|
@@ -3031,12 +2992,9 @@ class VirtualMachineApi:
|
|
|
3031
2992
|
|
|
3032
2993
|
|
|
3033
2994
|
@validate_call
|
|
3034
|
-
def
|
|
2995
|
+
def get_instance_hibernate_restore_with_http_info(
|
|
3035
2996
|
self,
|
|
3036
|
-
|
|
3037
|
-
page_size: Annotated[Optional[StrictStr], Field(description="Data Per Page")] = None,
|
|
3038
|
-
search: Optional[StrictStr] = None,
|
|
3039
|
-
environment: Annotated[Optional[StrictStr], Field(description="Filter Environment ID or Name")] = None,
|
|
2997
|
+
vm_id: StrictInt,
|
|
3040
2998
|
_request_timeout: Union[
|
|
3041
2999
|
None,
|
|
3042
3000
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -3049,19 +3007,13 @@ class VirtualMachineApi:
|
|
|
3049
3007
|
_content_type: Optional[StrictStr] = None,
|
|
3050
3008
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
3051
3009
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
3052
|
-
) -> ApiResponse[
|
|
3053
|
-
"""
|
|
3010
|
+
) -> ApiResponse[ResponseModel]:
|
|
3011
|
+
"""Restore virtual machine from hibernation
|
|
3054
3012
|
|
|
3055
|
-
|
|
3013
|
+
Resumes a virtual machine from hibernation, bringing it back to an active state. Provide the virtual machine ID in the path to specify the virtual machine to be restored from hibernation.
|
|
3056
3014
|
|
|
3057
|
-
:param
|
|
3058
|
-
:type
|
|
3059
|
-
:param page_size: Data Per Page
|
|
3060
|
-
:type page_size: str
|
|
3061
|
-
:param search:
|
|
3062
|
-
:type search: str
|
|
3063
|
-
:param environment: Filter Environment ID or Name
|
|
3064
|
-
:type environment: str
|
|
3015
|
+
:param vm_id: (required)
|
|
3016
|
+
:type vm_id: int
|
|
3065
3017
|
:param _request_timeout: timeout setting for this request. If one
|
|
3066
3018
|
number provided, it will be total request
|
|
3067
3019
|
timeout. It can also be a pair (tuple) of
|
|
@@ -3084,11 +3036,8 @@ class VirtualMachineApi:
|
|
|
3084
3036
|
:return: Returns the result object.
|
|
3085
3037
|
""" # noqa: E501
|
|
3086
3038
|
|
|
3087
|
-
_param = self.
|
|
3088
|
-
|
|
3089
|
-
page_size=page_size,
|
|
3090
|
-
search=search,
|
|
3091
|
-
environment=environment,
|
|
3039
|
+
_param = self._get_instance_hibernate_restore_serialize(
|
|
3040
|
+
vm_id=vm_id,
|
|
3092
3041
|
_request_auth=_request_auth,
|
|
3093
3042
|
_content_type=_content_type,
|
|
3094
3043
|
_headers=_headers,
|
|
@@ -3096,9 +3045,10 @@ class VirtualMachineApi:
|
|
|
3096
3045
|
)
|
|
3097
3046
|
|
|
3098
3047
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
3099
|
-
'200': "
|
|
3048
|
+
'200': "ResponseModel",
|
|
3100
3049
|
'400': "ErrorResponseModel",
|
|
3101
3050
|
'401': "ErrorResponseModel",
|
|
3051
|
+
'404': "ErrorResponseModel",
|
|
3102
3052
|
'500': None,
|
|
3103
3053
|
}
|
|
3104
3054
|
response_data = self.api_client.call_api(
|
|
@@ -3113,12 +3063,9 @@ class VirtualMachineApi:
|
|
|
3113
3063
|
|
|
3114
3064
|
|
|
3115
3065
|
@validate_call
|
|
3116
|
-
def
|
|
3066
|
+
def get_instance_hibernate_restore_without_preload_content(
|
|
3117
3067
|
self,
|
|
3118
|
-
|
|
3119
|
-
page_size: Annotated[Optional[StrictStr], Field(description="Data Per Page")] = None,
|
|
3120
|
-
search: Optional[StrictStr] = None,
|
|
3121
|
-
environment: Annotated[Optional[StrictStr], Field(description="Filter Environment ID or Name")] = None,
|
|
3068
|
+
vm_id: StrictInt,
|
|
3122
3069
|
_request_timeout: Union[
|
|
3123
3070
|
None,
|
|
3124
3071
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -3132,18 +3079,12 @@ class VirtualMachineApi:
|
|
|
3132
3079
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
3133
3080
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
3134
3081
|
) -> RESTResponseType:
|
|
3135
|
-
"""
|
|
3082
|
+
"""Restore virtual machine from hibernation
|
|
3136
3083
|
|
|
3137
|
-
|
|
3084
|
+
Resumes a virtual machine from hibernation, bringing it back to an active state. Provide the virtual machine ID in the path to specify the virtual machine to be restored from hibernation.
|
|
3138
3085
|
|
|
3139
|
-
:param
|
|
3140
|
-
:type
|
|
3141
|
-
:param page_size: Data Per Page
|
|
3142
|
-
:type page_size: str
|
|
3143
|
-
:param search:
|
|
3144
|
-
:type search: str
|
|
3145
|
-
:param environment: Filter Environment ID or Name
|
|
3146
|
-
:type environment: str
|
|
3086
|
+
:param vm_id: (required)
|
|
3087
|
+
:type vm_id: int
|
|
3147
3088
|
:param _request_timeout: timeout setting for this request. If one
|
|
3148
3089
|
number provided, it will be total request
|
|
3149
3090
|
timeout. It can also be a pair (tuple) of
|
|
@@ -3166,11 +3107,8 @@ class VirtualMachineApi:
|
|
|
3166
3107
|
:return: Returns the result object.
|
|
3167
3108
|
""" # noqa: E501
|
|
3168
3109
|
|
|
3169
|
-
_param = self.
|
|
3170
|
-
|
|
3171
|
-
page_size=page_size,
|
|
3172
|
-
search=search,
|
|
3173
|
-
environment=environment,
|
|
3110
|
+
_param = self._get_instance_hibernate_restore_serialize(
|
|
3111
|
+
vm_id=vm_id,
|
|
3174
3112
|
_request_auth=_request_auth,
|
|
3175
3113
|
_content_type=_content_type,
|
|
3176
3114
|
_headers=_headers,
|
|
@@ -3178,9 +3116,10 @@ class VirtualMachineApi:
|
|
|
3178
3116
|
)
|
|
3179
3117
|
|
|
3180
3118
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
3181
|
-
'200': "
|
|
3119
|
+
'200': "ResponseModel",
|
|
3182
3120
|
'400': "ErrorResponseModel",
|
|
3183
3121
|
'401': "ErrorResponseModel",
|
|
3122
|
+
'404': "ErrorResponseModel",
|
|
3184
3123
|
'500': None,
|
|
3185
3124
|
}
|
|
3186
3125
|
response_data = self.api_client.call_api(
|
|
@@ -3190,12 +3129,9 @@ class VirtualMachineApi:
|
|
|
3190
3129
|
return response_data.response
|
|
3191
3130
|
|
|
3192
3131
|
|
|
3193
|
-
def
|
|
3132
|
+
def _get_instance_hibernate_restore_serialize(
|
|
3194
3133
|
self,
|
|
3195
|
-
|
|
3196
|
-
page_size,
|
|
3197
|
-
search,
|
|
3198
|
-
environment,
|
|
3134
|
+
vm_id,
|
|
3199
3135
|
_request_auth,
|
|
3200
3136
|
_content_type,
|
|
3201
3137
|
_headers,
|
|
@@ -3217,23 +3153,9 @@ class VirtualMachineApi:
|
|
|
3217
3153
|
_body_params: Optional[bytes] = None
|
|
3218
3154
|
|
|
3219
3155
|
# process the path parameters
|
|
3156
|
+
if vm_id is not None:
|
|
3157
|
+
_path_params['vm_id'] = vm_id
|
|
3220
3158
|
# process the query parameters
|
|
3221
|
-
if page is not None:
|
|
3222
|
-
|
|
3223
|
-
_query_params.append(('page', page))
|
|
3224
|
-
|
|
3225
|
-
if page_size is not None:
|
|
3226
|
-
|
|
3227
|
-
_query_params.append(('pageSize', page_size))
|
|
3228
|
-
|
|
3229
|
-
if search is not None:
|
|
3230
|
-
|
|
3231
|
-
_query_params.append(('search', search))
|
|
3232
|
-
|
|
3233
|
-
if environment is not None:
|
|
3234
|
-
|
|
3235
|
-
_query_params.append(('environment', environment))
|
|
3236
|
-
|
|
3237
3159
|
# process the header parameters
|
|
3238
3160
|
# process the form parameters
|
|
3239
3161
|
# process the body parameter
|
|
@@ -3250,13 +3172,12 @@ class VirtualMachineApi:
|
|
|
3250
3172
|
|
|
3251
3173
|
# authentication setting
|
|
3252
3174
|
_auth_settings: List[str] = [
|
|
3253
|
-
'apiKey'
|
|
3254
|
-
'accessToken'
|
|
3175
|
+
'apiKey'
|
|
3255
3176
|
]
|
|
3256
3177
|
|
|
3257
3178
|
return self.api_client.param_serialize(
|
|
3258
3179
|
method='GET',
|
|
3259
|
-
resource_path='/core/virtual-machines',
|
|
3180
|
+
resource_path='/core/virtual-machines/{vm_id}/hibernate-restore',
|
|
3260
3181
|
path_params=_path_params,
|
|
3261
3182
|
query_params=_query_params,
|
|
3262
3183
|
header_params=_header_params,
|
|
@@ -3273,10 +3194,10 @@ class VirtualMachineApi:
|
|
|
3273
3194
|
|
|
3274
3195
|
|
|
3275
3196
|
@validate_call
|
|
3276
|
-
def
|
|
3197
|
+
def get_instance_logs(
|
|
3277
3198
|
self,
|
|
3278
|
-
|
|
3279
|
-
|
|
3199
|
+
vm_id: StrictInt,
|
|
3200
|
+
request_id: StrictInt,
|
|
3280
3201
|
_request_timeout: Union[
|
|
3281
3202
|
None,
|
|
3282
3203
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -3289,15 +3210,15 @@ class VirtualMachineApi:
|
|
|
3289
3210
|
_content_type: Optional[StrictStr] = None,
|
|
3290
3211
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
3291
3212
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
3292
|
-
) ->
|
|
3293
|
-
"""
|
|
3213
|
+
) -> GetInstanceLogsResponse:
|
|
3214
|
+
"""Get virtual machine logs
|
|
3294
3215
|
|
|
3295
|
-
|
|
3216
|
+
Retrieve console logs for a virtual machine
|
|
3296
3217
|
|
|
3297
|
-
:param
|
|
3298
|
-
:type
|
|
3299
|
-
:param
|
|
3300
|
-
:type
|
|
3218
|
+
:param vm_id: (required)
|
|
3219
|
+
:type vm_id: int
|
|
3220
|
+
:param request_id: (required)
|
|
3221
|
+
:type request_id: int
|
|
3301
3222
|
:param _request_timeout: timeout setting for this request. If one
|
|
3302
3223
|
number provided, it will be total request
|
|
3303
3224
|
timeout. It can also be a pair (tuple) of
|
|
@@ -3320,9 +3241,9 @@ class VirtualMachineApi:
|
|
|
3320
3241
|
:return: Returns the result object.
|
|
3321
3242
|
""" # noqa: E501
|
|
3322
3243
|
|
|
3323
|
-
_param = self.
|
|
3324
|
-
|
|
3325
|
-
|
|
3244
|
+
_param = self._get_instance_logs_serialize(
|
|
3245
|
+
vm_id=vm_id,
|
|
3246
|
+
request_id=request_id,
|
|
3326
3247
|
_request_auth=_request_auth,
|
|
3327
3248
|
_content_type=_content_type,
|
|
3328
3249
|
_headers=_headers,
|
|
@@ -3330,7 +3251,7 @@ class VirtualMachineApi:
|
|
|
3330
3251
|
)
|
|
3331
3252
|
|
|
3332
3253
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
3333
|
-
'200': "
|
|
3254
|
+
'200': "GetInstanceLogsResponse",
|
|
3334
3255
|
'400': "ErrorResponseModel",
|
|
3335
3256
|
'401': "ErrorResponseModel",
|
|
3336
3257
|
'404': "ErrorResponseModel",
|
|
@@ -3349,10 +3270,10 @@ class VirtualMachineApi:
|
|
|
3349
3270
|
|
|
3350
3271
|
|
|
3351
3272
|
@validate_call
|
|
3352
|
-
def
|
|
3273
|
+
def get_instance_logs_with_http_info(
|
|
3353
3274
|
self,
|
|
3354
|
-
|
|
3355
|
-
|
|
3275
|
+
vm_id: StrictInt,
|
|
3276
|
+
request_id: StrictInt,
|
|
3356
3277
|
_request_timeout: Union[
|
|
3357
3278
|
None,
|
|
3358
3279
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -3365,15 +3286,15 @@ class VirtualMachineApi:
|
|
|
3365
3286
|
_content_type: Optional[StrictStr] = None,
|
|
3366
3287
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
3367
3288
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
3368
|
-
) -> ApiResponse[
|
|
3369
|
-
"""
|
|
3289
|
+
) -> ApiResponse[GetInstanceLogsResponse]:
|
|
3290
|
+
"""Get virtual machine logs
|
|
3370
3291
|
|
|
3371
|
-
|
|
3292
|
+
Retrieve console logs for a virtual machine
|
|
3372
3293
|
|
|
3373
|
-
:param
|
|
3374
|
-
:type
|
|
3375
|
-
:param
|
|
3376
|
-
:type
|
|
3294
|
+
:param vm_id: (required)
|
|
3295
|
+
:type vm_id: int
|
|
3296
|
+
:param request_id: (required)
|
|
3297
|
+
:type request_id: int
|
|
3377
3298
|
:param _request_timeout: timeout setting for this request. If one
|
|
3378
3299
|
number provided, it will be total request
|
|
3379
3300
|
timeout. It can also be a pair (tuple) of
|
|
@@ -3396,9 +3317,9 @@ class VirtualMachineApi:
|
|
|
3396
3317
|
:return: Returns the result object.
|
|
3397
3318
|
""" # noqa: E501
|
|
3398
3319
|
|
|
3399
|
-
_param = self.
|
|
3400
|
-
|
|
3401
|
-
|
|
3320
|
+
_param = self._get_instance_logs_serialize(
|
|
3321
|
+
vm_id=vm_id,
|
|
3322
|
+
request_id=request_id,
|
|
3402
3323
|
_request_auth=_request_auth,
|
|
3403
3324
|
_content_type=_content_type,
|
|
3404
3325
|
_headers=_headers,
|
|
@@ -3406,7 +3327,7 @@ class VirtualMachineApi:
|
|
|
3406
3327
|
)
|
|
3407
3328
|
|
|
3408
3329
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
3409
|
-
'200': "
|
|
3330
|
+
'200': "GetInstanceLogsResponse",
|
|
3410
3331
|
'400': "ErrorResponseModel",
|
|
3411
3332
|
'401': "ErrorResponseModel",
|
|
3412
3333
|
'404': "ErrorResponseModel",
|
|
@@ -3425,10 +3346,10 @@ class VirtualMachineApi:
|
|
|
3425
3346
|
|
|
3426
3347
|
|
|
3427
3348
|
@validate_call
|
|
3428
|
-
def
|
|
3349
|
+
def get_instance_logs_without_preload_content(
|
|
3429
3350
|
self,
|
|
3430
|
-
|
|
3431
|
-
|
|
3351
|
+
vm_id: StrictInt,
|
|
3352
|
+
request_id: StrictInt,
|
|
3432
3353
|
_request_timeout: Union[
|
|
3433
3354
|
None,
|
|
3434
3355
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -3442,14 +3363,14 @@ class VirtualMachineApi:
|
|
|
3442
3363
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
3443
3364
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
3444
3365
|
) -> RESTResponseType:
|
|
3445
|
-
"""
|
|
3366
|
+
"""Get virtual machine logs
|
|
3446
3367
|
|
|
3447
|
-
|
|
3368
|
+
Retrieve console logs for a virtual machine
|
|
3448
3369
|
|
|
3449
|
-
:param
|
|
3450
|
-
:type
|
|
3451
|
-
:param
|
|
3452
|
-
:type
|
|
3370
|
+
:param vm_id: (required)
|
|
3371
|
+
:type vm_id: int
|
|
3372
|
+
:param request_id: (required)
|
|
3373
|
+
:type request_id: int
|
|
3453
3374
|
:param _request_timeout: timeout setting for this request. If one
|
|
3454
3375
|
number provided, it will be total request
|
|
3455
3376
|
timeout. It can also be a pair (tuple) of
|
|
@@ -3472,9 +3393,9 @@ class VirtualMachineApi:
|
|
|
3472
3393
|
:return: Returns the result object.
|
|
3473
3394
|
""" # noqa: E501
|
|
3474
3395
|
|
|
3475
|
-
_param = self.
|
|
3476
|
-
|
|
3477
|
-
|
|
3396
|
+
_param = self._get_instance_logs_serialize(
|
|
3397
|
+
vm_id=vm_id,
|
|
3398
|
+
request_id=request_id,
|
|
3478
3399
|
_request_auth=_request_auth,
|
|
3479
3400
|
_content_type=_content_type,
|
|
3480
3401
|
_headers=_headers,
|
|
@@ -3482,7 +3403,7 @@ class VirtualMachineApi:
|
|
|
3482
3403
|
)
|
|
3483
3404
|
|
|
3484
3405
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
3485
|
-
'200': "
|
|
3406
|
+
'200': "GetInstanceLogsResponse",
|
|
3486
3407
|
'400': "ErrorResponseModel",
|
|
3487
3408
|
'401': "ErrorResponseModel",
|
|
3488
3409
|
'404': "ErrorResponseModel",
|
|
@@ -3496,10 +3417,10 @@ class VirtualMachineApi:
|
|
|
3496
3417
|
return response_data.response
|
|
3497
3418
|
|
|
3498
3419
|
|
|
3499
|
-
def
|
|
3420
|
+
def _get_instance_logs_serialize(
|
|
3500
3421
|
self,
|
|
3501
|
-
|
|
3502
|
-
|
|
3422
|
+
vm_id,
|
|
3423
|
+
request_id,
|
|
3503
3424
|
_request_auth,
|
|
3504
3425
|
_content_type,
|
|
3505
3426
|
_headers,
|
|
@@ -3521,14 +3442,16 @@ class VirtualMachineApi:
|
|
|
3521
3442
|
_body_params: Optional[bytes] = None
|
|
3522
3443
|
|
|
3523
3444
|
# process the path parameters
|
|
3524
|
-
if
|
|
3525
|
-
_path_params['
|
|
3445
|
+
if vm_id is not None:
|
|
3446
|
+
_path_params['vm_id'] = vm_id
|
|
3526
3447
|
# process the query parameters
|
|
3527
|
-
|
|
3448
|
+
if request_id is not None:
|
|
3449
|
+
|
|
3450
|
+
_query_params.append(('request_id', request_id))
|
|
3451
|
+
|
|
3452
|
+
# process the header parameters
|
|
3528
3453
|
# process the form parameters
|
|
3529
3454
|
# process the body parameter
|
|
3530
|
-
if payload is not None:
|
|
3531
|
-
_body_params = payload
|
|
3532
3455
|
|
|
3533
3456
|
|
|
3534
3457
|
# set the HTTP header `Accept`
|
|
@@ -3539,29 +3462,15 @@ class VirtualMachineApi:
|
|
|
3539
3462
|
]
|
|
3540
3463
|
)
|
|
3541
3464
|
|
|
3542
|
-
# set the HTTP header `Content-Type`
|
|
3543
|
-
if _content_type:
|
|
3544
|
-
_header_params['Content-Type'] = _content_type
|
|
3545
|
-
else:
|
|
3546
|
-
_default_content_type = (
|
|
3547
|
-
self.api_client.select_header_content_type(
|
|
3548
|
-
[
|
|
3549
|
-
'application/json'
|
|
3550
|
-
]
|
|
3551
|
-
)
|
|
3552
|
-
)
|
|
3553
|
-
if _default_content_type is not None:
|
|
3554
|
-
_header_params['Content-Type'] = _default_content_type
|
|
3555
3465
|
|
|
3556
3466
|
# authentication setting
|
|
3557
3467
|
_auth_settings: List[str] = [
|
|
3558
|
-
'apiKey'
|
|
3559
|
-
'accessToken'
|
|
3468
|
+
'apiKey'
|
|
3560
3469
|
]
|
|
3561
3470
|
|
|
3562
3471
|
return self.api_client.param_serialize(
|
|
3563
|
-
method='
|
|
3564
|
-
resource_path='/core/virtual-machines/{
|
|
3472
|
+
method='GET',
|
|
3473
|
+
resource_path='/core/virtual-machines/{vm_id}/logs',
|
|
3565
3474
|
path_params=_path_params,
|
|
3566
3475
|
query_params=_query_params,
|
|
3567
3476
|
header_params=_header_params,
|
|
@@ -3578,9 +3487,10 @@ class VirtualMachineApi:
|
|
|
3578
3487
|
|
|
3579
3488
|
|
|
3580
3489
|
@validate_call
|
|
3581
|
-
def
|
|
3490
|
+
def get_instance_metrics(
|
|
3582
3491
|
self,
|
|
3583
|
-
|
|
3492
|
+
vm_id: StrictInt,
|
|
3493
|
+
duration: Optional[StrictStr] = None,
|
|
3584
3494
|
_request_timeout: Union[
|
|
3585
3495
|
None,
|
|
3586
3496
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -3593,13 +3503,15 @@ class VirtualMachineApi:
|
|
|
3593
3503
|
_content_type: Optional[StrictStr] = None,
|
|
3594
3504
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
3595
3505
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
3596
|
-
) ->
|
|
3597
|
-
"""
|
|
3506
|
+
) -> MetricsFields:
|
|
3507
|
+
"""Retrieve virtual machine performance metrics
|
|
3598
3508
|
|
|
3599
|
-
|
|
3509
|
+
Retrieves performance metrics data for a virtual machine. Provide the virtual machine ID in the path to retrieve the following data for the specified virtual machine: CPU usage, memory usage (RAM), `network.in`, `network.out`, `disk.read`, and `disk.write`. The optional `duration` parameter can be used to specify the period for retrieving performance metrics; the default value will retrieve all available data. To learn more about virtual machine performance metrics, [**click here**](https://docs...cloud/docs/virtual-machines/vm-performance-metrics-and-events-history#performance-metrics).
|
|
3600
3510
|
|
|
3601
|
-
:param
|
|
3602
|
-
:type
|
|
3511
|
+
:param vm_id: (required)
|
|
3512
|
+
:type vm_id: int
|
|
3513
|
+
:param duration:
|
|
3514
|
+
:type duration: str
|
|
3603
3515
|
:param _request_timeout: timeout setting for this request. If one
|
|
3604
3516
|
number provided, it will be total request
|
|
3605
3517
|
timeout. It can also be a pair (tuple) of
|
|
@@ -3622,8 +3534,9 @@ class VirtualMachineApi:
|
|
|
3622
3534
|
:return: Returns the result object.
|
|
3623
3535
|
""" # noqa: E501
|
|
3624
3536
|
|
|
3625
|
-
_param = self.
|
|
3626
|
-
|
|
3537
|
+
_param = self._get_instance_metrics_serialize(
|
|
3538
|
+
vm_id=vm_id,
|
|
3539
|
+
duration=duration,
|
|
3627
3540
|
_request_auth=_request_auth,
|
|
3628
3541
|
_content_type=_content_type,
|
|
3629
3542
|
_headers=_headers,
|
|
@@ -3631,10 +3544,11 @@ class VirtualMachineApi:
|
|
|
3631
3544
|
)
|
|
3632
3545
|
|
|
3633
3546
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
3634
|
-
'200': "
|
|
3547
|
+
'200': "MetricsFields",
|
|
3635
3548
|
'400': "ErrorResponseModel",
|
|
3636
3549
|
'401': "ErrorResponseModel",
|
|
3637
3550
|
'404': "ErrorResponseModel",
|
|
3551
|
+
'406': "ErrorResponseModel",
|
|
3638
3552
|
'500': None,
|
|
3639
3553
|
}
|
|
3640
3554
|
response_data = self.api_client.call_api(
|
|
@@ -3649,9 +3563,10 @@ class VirtualMachineApi:
|
|
|
3649
3563
|
|
|
3650
3564
|
|
|
3651
3565
|
@validate_call
|
|
3652
|
-
def
|
|
3566
|
+
def get_instance_metrics_with_http_info(
|
|
3653
3567
|
self,
|
|
3654
|
-
|
|
3568
|
+
vm_id: StrictInt,
|
|
3569
|
+
duration: Optional[StrictStr] = None,
|
|
3655
3570
|
_request_timeout: Union[
|
|
3656
3571
|
None,
|
|
3657
3572
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -3664,13 +3579,15 @@ class VirtualMachineApi:
|
|
|
3664
3579
|
_content_type: Optional[StrictStr] = None,
|
|
3665
3580
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
3666
3581
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
3667
|
-
) -> ApiResponse[
|
|
3668
|
-
"""
|
|
3582
|
+
) -> ApiResponse[MetricsFields]:
|
|
3583
|
+
"""Retrieve virtual machine performance metrics
|
|
3669
3584
|
|
|
3670
|
-
|
|
3585
|
+
Retrieves performance metrics data for a virtual machine. Provide the virtual machine ID in the path to retrieve the following data for the specified virtual machine: CPU usage, memory usage (RAM), `network.in`, `network.out`, `disk.read`, and `disk.write`. The optional `duration` parameter can be used to specify the period for retrieving performance metrics; the default value will retrieve all available data. To learn more about virtual machine performance metrics, [**click here**](https://docs...cloud/docs/virtual-machines/vm-performance-metrics-and-events-history#performance-metrics).
|
|
3671
3586
|
|
|
3672
|
-
:param
|
|
3673
|
-
:type
|
|
3587
|
+
:param vm_id: (required)
|
|
3588
|
+
:type vm_id: int
|
|
3589
|
+
:param duration:
|
|
3590
|
+
:type duration: str
|
|
3674
3591
|
:param _request_timeout: timeout setting for this request. If one
|
|
3675
3592
|
number provided, it will be total request
|
|
3676
3593
|
timeout. It can also be a pair (tuple) of
|
|
@@ -3693,8 +3610,9 @@ class VirtualMachineApi:
|
|
|
3693
3610
|
:return: Returns the result object.
|
|
3694
3611
|
""" # noqa: E501
|
|
3695
3612
|
|
|
3696
|
-
_param = self.
|
|
3697
|
-
|
|
3613
|
+
_param = self._get_instance_metrics_serialize(
|
|
3614
|
+
vm_id=vm_id,
|
|
3615
|
+
duration=duration,
|
|
3698
3616
|
_request_auth=_request_auth,
|
|
3699
3617
|
_content_type=_content_type,
|
|
3700
3618
|
_headers=_headers,
|
|
@@ -3702,10 +3620,11 @@ class VirtualMachineApi:
|
|
|
3702
3620
|
)
|
|
3703
3621
|
|
|
3704
3622
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
3705
|
-
'200': "
|
|
3623
|
+
'200': "MetricsFields",
|
|
3706
3624
|
'400': "ErrorResponseModel",
|
|
3707
3625
|
'401': "ErrorResponseModel",
|
|
3708
3626
|
'404': "ErrorResponseModel",
|
|
3627
|
+
'406': "ErrorResponseModel",
|
|
3709
3628
|
'500': None,
|
|
3710
3629
|
}
|
|
3711
3630
|
response_data = self.api_client.call_api(
|
|
@@ -3720,9 +3639,10 @@ class VirtualMachineApi:
|
|
|
3720
3639
|
|
|
3721
3640
|
|
|
3722
3641
|
@validate_call
|
|
3723
|
-
def
|
|
3642
|
+
def get_instance_metrics_without_preload_content(
|
|
3724
3643
|
self,
|
|
3725
|
-
|
|
3644
|
+
vm_id: StrictInt,
|
|
3645
|
+
duration: Optional[StrictStr] = None,
|
|
3726
3646
|
_request_timeout: Union[
|
|
3727
3647
|
None,
|
|
3728
3648
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -3736,12 +3656,14 @@ class VirtualMachineApi:
|
|
|
3736
3656
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
3737
3657
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
3738
3658
|
) -> RESTResponseType:
|
|
3739
|
-
"""
|
|
3659
|
+
"""Retrieve virtual machine performance metrics
|
|
3740
3660
|
|
|
3741
|
-
|
|
3661
|
+
Retrieves performance metrics data for a virtual machine. Provide the virtual machine ID in the path to retrieve the following data for the specified virtual machine: CPU usage, memory usage (RAM), `network.in`, `network.out`, `disk.read`, and `disk.write`. The optional `duration` parameter can be used to specify the period for retrieving performance metrics; the default value will retrieve all available data. To learn more about virtual machine performance metrics, [**click here**](https://docs...cloud/docs/virtual-machines/vm-performance-metrics-and-events-history#performance-metrics).
|
|
3742
3662
|
|
|
3743
|
-
:param
|
|
3744
|
-
:type
|
|
3663
|
+
:param vm_id: (required)
|
|
3664
|
+
:type vm_id: int
|
|
3665
|
+
:param duration:
|
|
3666
|
+
:type duration: str
|
|
3745
3667
|
:param _request_timeout: timeout setting for this request. If one
|
|
3746
3668
|
number provided, it will be total request
|
|
3747
3669
|
timeout. It can also be a pair (tuple) of
|
|
@@ -3764,8 +3686,9 @@ class VirtualMachineApi:
|
|
|
3764
3686
|
:return: Returns the result object.
|
|
3765
3687
|
""" # noqa: E501
|
|
3766
3688
|
|
|
3767
|
-
_param = self.
|
|
3768
|
-
|
|
3689
|
+
_param = self._get_instance_metrics_serialize(
|
|
3690
|
+
vm_id=vm_id,
|
|
3691
|
+
duration=duration,
|
|
3769
3692
|
_request_auth=_request_auth,
|
|
3770
3693
|
_content_type=_content_type,
|
|
3771
3694
|
_headers=_headers,
|
|
@@ -3773,10 +3696,11 @@ class VirtualMachineApi:
|
|
|
3773
3696
|
)
|
|
3774
3697
|
|
|
3775
3698
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
3776
|
-
'200': "
|
|
3699
|
+
'200': "MetricsFields",
|
|
3777
3700
|
'400': "ErrorResponseModel",
|
|
3778
3701
|
'401': "ErrorResponseModel",
|
|
3779
3702
|
'404': "ErrorResponseModel",
|
|
3703
|
+
'406': "ErrorResponseModel",
|
|
3780
3704
|
'500': None,
|
|
3781
3705
|
}
|
|
3782
3706
|
response_data = self.api_client.call_api(
|
|
@@ -3786,9 +3710,10 @@ class VirtualMachineApi:
|
|
|
3786
3710
|
return response_data.response
|
|
3787
3711
|
|
|
3788
3712
|
|
|
3789
|
-
def
|
|
3713
|
+
def _get_instance_metrics_serialize(
|
|
3790
3714
|
self,
|
|
3791
|
-
|
|
3715
|
+
vm_id,
|
|
3716
|
+
duration,
|
|
3792
3717
|
_request_auth,
|
|
3793
3718
|
_content_type,
|
|
3794
3719
|
_headers,
|
|
@@ -3810,9 +3735,13 @@ class VirtualMachineApi:
|
|
|
3810
3735
|
_body_params: Optional[bytes] = None
|
|
3811
3736
|
|
|
3812
3737
|
# process the path parameters
|
|
3813
|
-
if
|
|
3814
|
-
_path_params['
|
|
3738
|
+
if vm_id is not None:
|
|
3739
|
+
_path_params['vm_id'] = vm_id
|
|
3815
3740
|
# process the query parameters
|
|
3741
|
+
if duration is not None:
|
|
3742
|
+
|
|
3743
|
+
_query_params.append(('duration', duration))
|
|
3744
|
+
|
|
3816
3745
|
# process the header parameters
|
|
3817
3746
|
# process the form parameters
|
|
3818
3747
|
# process the body parameter
|
|
@@ -3829,13 +3758,12 @@ class VirtualMachineApi:
|
|
|
3829
3758
|
|
|
3830
3759
|
# authentication setting
|
|
3831
3760
|
_auth_settings: List[str] = [
|
|
3832
|
-
'apiKey'
|
|
3833
|
-
'accessToken'
|
|
3761
|
+
'apiKey'
|
|
3834
3762
|
]
|
|
3835
3763
|
|
|
3836
3764
|
return self.api_client.param_serialize(
|
|
3837
3765
|
method='GET',
|
|
3838
|
-
resource_path='/core/virtual-machines/{
|
|
3766
|
+
resource_path='/core/virtual-machines/{vm_id}/metrics',
|
|
3839
3767
|
path_params=_path_params,
|
|
3840
3768
|
query_params=_query_params,
|
|
3841
3769
|
header_params=_header_params,
|
|
@@ -3852,9 +3780,9 @@ class VirtualMachineApi:
|
|
|
3852
3780
|
|
|
3853
3781
|
|
|
3854
3782
|
@validate_call
|
|
3855
|
-
def
|
|
3783
|
+
def post_instance(
|
|
3856
3784
|
self,
|
|
3857
|
-
|
|
3785
|
+
payload: CreateInstancesPayload,
|
|
3858
3786
|
_request_timeout: Union[
|
|
3859
3787
|
None,
|
|
3860
3788
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -3867,13 +3795,13 @@ class VirtualMachineApi:
|
|
|
3867
3795
|
_content_type: Optional[StrictStr] = None,
|
|
3868
3796
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
3869
3797
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
3870
|
-
) ->
|
|
3871
|
-
"""
|
|
3798
|
+
) -> CreateInstancesResponse:
|
|
3799
|
+
"""Create virtual machines
|
|
3872
3800
|
|
|
3873
|
-
|
|
3801
|
+
Creates one or more virtual machines with the specified custom configuration and features provided in the request body. For more information about the virtual machine features offered by Infrahub, [**click here**](https://docs...cloud/docs/virtual-machines/virtual-machine-features#create-a-virtual-machine-with-custom-features).
|
|
3874
3802
|
|
|
3875
|
-
:param
|
|
3876
|
-
:type
|
|
3803
|
+
:param payload: (required)
|
|
3804
|
+
:type payload: CreateInstancesPayload
|
|
3877
3805
|
:param _request_timeout: timeout setting for this request. If one
|
|
3878
3806
|
number provided, it will be total request
|
|
3879
3807
|
timeout. It can also be a pair (tuple) of
|
|
@@ -3896,8 +3824,8 @@ class VirtualMachineApi:
|
|
|
3896
3824
|
:return: Returns the result object.
|
|
3897
3825
|
""" # noqa: E501
|
|
3898
3826
|
|
|
3899
|
-
_param = self.
|
|
3900
|
-
|
|
3827
|
+
_param = self._post_instance_serialize(
|
|
3828
|
+
payload=payload,
|
|
3901
3829
|
_request_auth=_request_auth,
|
|
3902
3830
|
_content_type=_content_type,
|
|
3903
3831
|
_headers=_headers,
|
|
@@ -3905,10 +3833,12 @@ class VirtualMachineApi:
|
|
|
3905
3833
|
)
|
|
3906
3834
|
|
|
3907
3835
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
3908
|
-
'200': "
|
|
3836
|
+
'200': "CreateInstancesResponse",
|
|
3909
3837
|
'400': "ErrorResponseModel",
|
|
3910
3838
|
'401': "ErrorResponseModel",
|
|
3911
3839
|
'404': "ErrorResponseModel",
|
|
3840
|
+
'405': "ErrorResponseModel",
|
|
3841
|
+
'409': "ErrorResponseModel",
|
|
3912
3842
|
'500': None,
|
|
3913
3843
|
}
|
|
3914
3844
|
response_data = self.api_client.call_api(
|
|
@@ -3923,9 +3853,9 @@ class VirtualMachineApi:
|
|
|
3923
3853
|
|
|
3924
3854
|
|
|
3925
3855
|
@validate_call
|
|
3926
|
-
def
|
|
3856
|
+
def post_instance_with_http_info(
|
|
3927
3857
|
self,
|
|
3928
|
-
|
|
3858
|
+
payload: CreateInstancesPayload,
|
|
3929
3859
|
_request_timeout: Union[
|
|
3930
3860
|
None,
|
|
3931
3861
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -3938,13 +3868,13 @@ class VirtualMachineApi:
|
|
|
3938
3868
|
_content_type: Optional[StrictStr] = None,
|
|
3939
3869
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
3940
3870
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
3941
|
-
) -> ApiResponse[
|
|
3942
|
-
"""
|
|
3871
|
+
) -> ApiResponse[CreateInstancesResponse]:
|
|
3872
|
+
"""Create virtual machines
|
|
3943
3873
|
|
|
3944
|
-
|
|
3874
|
+
Creates one or more virtual machines with the specified custom configuration and features provided in the request body. For more information about the virtual machine features offered by Infrahub, [**click here**](https://docs...cloud/docs/virtual-machines/virtual-machine-features#create-a-virtual-machine-with-custom-features).
|
|
3945
3875
|
|
|
3946
|
-
:param
|
|
3947
|
-
:type
|
|
3876
|
+
:param payload: (required)
|
|
3877
|
+
:type payload: CreateInstancesPayload
|
|
3948
3878
|
:param _request_timeout: timeout setting for this request. If one
|
|
3949
3879
|
number provided, it will be total request
|
|
3950
3880
|
timeout. It can also be a pair (tuple) of
|
|
@@ -3967,8 +3897,8 @@ class VirtualMachineApi:
|
|
|
3967
3897
|
:return: Returns the result object.
|
|
3968
3898
|
""" # noqa: E501
|
|
3969
3899
|
|
|
3970
|
-
_param = self.
|
|
3971
|
-
|
|
3900
|
+
_param = self._post_instance_serialize(
|
|
3901
|
+
payload=payload,
|
|
3972
3902
|
_request_auth=_request_auth,
|
|
3973
3903
|
_content_type=_content_type,
|
|
3974
3904
|
_headers=_headers,
|
|
@@ -3976,10 +3906,12 @@ class VirtualMachineApi:
|
|
|
3976
3906
|
)
|
|
3977
3907
|
|
|
3978
3908
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
3979
|
-
'200': "
|
|
3909
|
+
'200': "CreateInstancesResponse",
|
|
3980
3910
|
'400': "ErrorResponseModel",
|
|
3981
3911
|
'401': "ErrorResponseModel",
|
|
3982
3912
|
'404': "ErrorResponseModel",
|
|
3913
|
+
'405': "ErrorResponseModel",
|
|
3914
|
+
'409': "ErrorResponseModel",
|
|
3983
3915
|
'500': None,
|
|
3984
3916
|
}
|
|
3985
3917
|
response_data = self.api_client.call_api(
|
|
@@ -3994,9 +3926,9 @@ class VirtualMachineApi:
|
|
|
3994
3926
|
|
|
3995
3927
|
|
|
3996
3928
|
@validate_call
|
|
3997
|
-
def
|
|
3929
|
+
def post_instance_without_preload_content(
|
|
3998
3930
|
self,
|
|
3999
|
-
|
|
3931
|
+
payload: CreateInstancesPayload,
|
|
4000
3932
|
_request_timeout: Union[
|
|
4001
3933
|
None,
|
|
4002
3934
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -4010,12 +3942,12 @@ class VirtualMachineApi:
|
|
|
4010
3942
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
4011
3943
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
4012
3944
|
) -> RESTResponseType:
|
|
4013
|
-
"""
|
|
3945
|
+
"""Create virtual machines
|
|
4014
3946
|
|
|
4015
|
-
|
|
3947
|
+
Creates one or more virtual machines with the specified custom configuration and features provided in the request body. For more information about the virtual machine features offered by Infrahub, [**click here**](https://docs...cloud/docs/virtual-machines/virtual-machine-features#create-a-virtual-machine-with-custom-features).
|
|
4016
3948
|
|
|
4017
|
-
:param
|
|
4018
|
-
:type
|
|
3949
|
+
:param payload: (required)
|
|
3950
|
+
:type payload: CreateInstancesPayload
|
|
4019
3951
|
:param _request_timeout: timeout setting for this request. If one
|
|
4020
3952
|
number provided, it will be total request
|
|
4021
3953
|
timeout. It can also be a pair (tuple) of
|
|
@@ -4038,8 +3970,8 @@ class VirtualMachineApi:
|
|
|
4038
3970
|
:return: Returns the result object.
|
|
4039
3971
|
""" # noqa: E501
|
|
4040
3972
|
|
|
4041
|
-
_param = self.
|
|
4042
|
-
|
|
3973
|
+
_param = self._post_instance_serialize(
|
|
3974
|
+
payload=payload,
|
|
4043
3975
|
_request_auth=_request_auth,
|
|
4044
3976
|
_content_type=_content_type,
|
|
4045
3977
|
_headers=_headers,
|
|
@@ -4047,10 +3979,12 @@ class VirtualMachineApi:
|
|
|
4047
3979
|
)
|
|
4048
3980
|
|
|
4049
3981
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
4050
|
-
'200': "
|
|
3982
|
+
'200': "CreateInstancesResponse",
|
|
4051
3983
|
'400': "ErrorResponseModel",
|
|
4052
3984
|
'401': "ErrorResponseModel",
|
|
4053
3985
|
'404': "ErrorResponseModel",
|
|
3986
|
+
'405': "ErrorResponseModel",
|
|
3987
|
+
'409': "ErrorResponseModel",
|
|
4054
3988
|
'500': None,
|
|
4055
3989
|
}
|
|
4056
3990
|
response_data = self.api_client.call_api(
|
|
@@ -4060,9 +3994,9 @@ class VirtualMachineApi:
|
|
|
4060
3994
|
return response_data.response
|
|
4061
3995
|
|
|
4062
3996
|
|
|
4063
|
-
def
|
|
3997
|
+
def _post_instance_serialize(
|
|
4064
3998
|
self,
|
|
4065
|
-
|
|
3999
|
+
payload,
|
|
4066
4000
|
_request_auth,
|
|
4067
4001
|
_content_type,
|
|
4068
4002
|
_headers,
|
|
@@ -4084,12 +4018,12 @@ class VirtualMachineApi:
|
|
|
4084
4018
|
_body_params: Optional[bytes] = None
|
|
4085
4019
|
|
|
4086
4020
|
# process the path parameters
|
|
4087
|
-
if id is not None:
|
|
4088
|
-
_path_params['id'] = id
|
|
4089
4021
|
# process the query parameters
|
|
4090
4022
|
# process the header parameters
|
|
4091
4023
|
# process the form parameters
|
|
4092
4024
|
# process the body parameter
|
|
4025
|
+
if payload is not None:
|
|
4026
|
+
_body_params = payload
|
|
4093
4027
|
|
|
4094
4028
|
|
|
4095
4029
|
# set the HTTP header `Accept`
|
|
@@ -4100,16 +4034,28 @@ class VirtualMachineApi:
|
|
|
4100
4034
|
]
|
|
4101
4035
|
)
|
|
4102
4036
|
|
|
4037
|
+
# set the HTTP header `Content-Type`
|
|
4038
|
+
if _content_type:
|
|
4039
|
+
_header_params['Content-Type'] = _content_type
|
|
4040
|
+
else:
|
|
4041
|
+
_default_content_type = (
|
|
4042
|
+
self.api_client.select_header_content_type(
|
|
4043
|
+
[
|
|
4044
|
+
'application/json'
|
|
4045
|
+
]
|
|
4046
|
+
)
|
|
4047
|
+
)
|
|
4048
|
+
if _default_content_type is not None:
|
|
4049
|
+
_header_params['Content-Type'] = _default_content_type
|
|
4103
4050
|
|
|
4104
4051
|
# authentication setting
|
|
4105
4052
|
_auth_settings: List[str] = [
|
|
4106
|
-
'apiKey'
|
|
4107
|
-
'accessToken'
|
|
4053
|
+
'apiKey'
|
|
4108
4054
|
]
|
|
4109
4055
|
|
|
4110
4056
|
return self.api_client.param_serialize(
|
|
4111
|
-
method='
|
|
4112
|
-
resource_path='/core/virtual-machines
|
|
4057
|
+
method='POST',
|
|
4058
|
+
resource_path='/core/virtual-machines',
|
|
4113
4059
|
path_params=_path_params,
|
|
4114
4060
|
query_params=_query_params,
|
|
4115
4061
|
header_params=_header_params,
|
|
@@ -4126,10 +4072,10 @@ class VirtualMachineApi:
|
|
|
4126
4072
|
|
|
4127
4073
|
|
|
4128
4074
|
@validate_call
|
|
4129
|
-
def
|
|
4075
|
+
def post_instance_attach_firewalls(
|
|
4130
4076
|
self,
|
|
4131
|
-
|
|
4132
|
-
|
|
4077
|
+
vm_id: StrictInt,
|
|
4078
|
+
payload: AttachFirewallsToVMPayload,
|
|
4133
4079
|
_request_timeout: Union[
|
|
4134
4080
|
None,
|
|
4135
4081
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -4142,15 +4088,15 @@ class VirtualMachineApi:
|
|
|
4142
4088
|
_content_type: Optional[StrictStr] = None,
|
|
4143
4089
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
4144
4090
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
4145
|
-
) ->
|
|
4146
|
-
"""
|
|
4091
|
+
) -> ResponseModel:
|
|
4092
|
+
"""Attach firewalls to a virtual machine
|
|
4147
4093
|
|
|
4148
|
-
|
|
4094
|
+
Attach firewalls to a virtual machine by providing the virtual machine ID in the path and the IDs of the firewalls in the request body; any firewalls not included will be detached.
|
|
4149
4095
|
|
|
4150
|
-
:param
|
|
4151
|
-
:type
|
|
4152
|
-
:param
|
|
4153
|
-
:type
|
|
4096
|
+
:param vm_id: (required)
|
|
4097
|
+
:type vm_id: int
|
|
4098
|
+
:param payload: (required)
|
|
4099
|
+
:type payload: AttachFirewallsToVMPayload
|
|
4154
4100
|
:param _request_timeout: timeout setting for this request. If one
|
|
4155
4101
|
number provided, it will be total request
|
|
4156
4102
|
timeout. It can also be a pair (tuple) of
|
|
@@ -4173,9 +4119,9 @@ class VirtualMachineApi:
|
|
|
4173
4119
|
:return: Returns the result object.
|
|
4174
4120
|
""" # noqa: E501
|
|
4175
4121
|
|
|
4176
|
-
_param = self.
|
|
4177
|
-
|
|
4178
|
-
|
|
4122
|
+
_param = self._post_instance_attach_firewalls_serialize(
|
|
4123
|
+
vm_id=vm_id,
|
|
4124
|
+
payload=payload,
|
|
4179
4125
|
_request_auth=_request_auth,
|
|
4180
4126
|
_content_type=_content_type,
|
|
4181
4127
|
_headers=_headers,
|
|
@@ -4183,11 +4129,10 @@ class VirtualMachineApi:
|
|
|
4183
4129
|
)
|
|
4184
4130
|
|
|
4185
4131
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
4186
|
-
'200': "
|
|
4132
|
+
'200': "ResponseModel",
|
|
4187
4133
|
'400': "ErrorResponseModel",
|
|
4188
4134
|
'401': "ErrorResponseModel",
|
|
4189
4135
|
'404': "ErrorResponseModel",
|
|
4190
|
-
'406': "ErrorResponseModel",
|
|
4191
4136
|
'500': None,
|
|
4192
4137
|
}
|
|
4193
4138
|
response_data = self.api_client.call_api(
|
|
@@ -4202,10 +4147,10 @@ class VirtualMachineApi:
|
|
|
4202
4147
|
|
|
4203
4148
|
|
|
4204
4149
|
@validate_call
|
|
4205
|
-
def
|
|
4150
|
+
def post_instance_attach_firewalls_with_http_info(
|
|
4206
4151
|
self,
|
|
4207
|
-
|
|
4208
|
-
|
|
4152
|
+
vm_id: StrictInt,
|
|
4153
|
+
payload: AttachFirewallsToVMPayload,
|
|
4209
4154
|
_request_timeout: Union[
|
|
4210
4155
|
None,
|
|
4211
4156
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -4218,15 +4163,15 @@ class VirtualMachineApi:
|
|
|
4218
4163
|
_content_type: Optional[StrictStr] = None,
|
|
4219
4164
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
4220
4165
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
4221
|
-
) -> ApiResponse[
|
|
4222
|
-
"""
|
|
4166
|
+
) -> ApiResponse[ResponseModel]:
|
|
4167
|
+
"""Attach firewalls to a virtual machine
|
|
4223
4168
|
|
|
4224
|
-
|
|
4169
|
+
Attach firewalls to a virtual machine by providing the virtual machine ID in the path and the IDs of the firewalls in the request body; any firewalls not included will be detached.
|
|
4225
4170
|
|
|
4226
|
-
:param
|
|
4227
|
-
:type
|
|
4228
|
-
:param
|
|
4229
|
-
:type
|
|
4171
|
+
:param vm_id: (required)
|
|
4172
|
+
:type vm_id: int
|
|
4173
|
+
:param payload: (required)
|
|
4174
|
+
:type payload: AttachFirewallsToVMPayload
|
|
4230
4175
|
:param _request_timeout: timeout setting for this request. If one
|
|
4231
4176
|
number provided, it will be total request
|
|
4232
4177
|
timeout. It can also be a pair (tuple) of
|
|
@@ -4249,9 +4194,9 @@ class VirtualMachineApi:
|
|
|
4249
4194
|
:return: Returns the result object.
|
|
4250
4195
|
""" # noqa: E501
|
|
4251
4196
|
|
|
4252
|
-
_param = self.
|
|
4253
|
-
|
|
4254
|
-
|
|
4197
|
+
_param = self._post_instance_attach_firewalls_serialize(
|
|
4198
|
+
vm_id=vm_id,
|
|
4199
|
+
payload=payload,
|
|
4255
4200
|
_request_auth=_request_auth,
|
|
4256
4201
|
_content_type=_content_type,
|
|
4257
4202
|
_headers=_headers,
|
|
@@ -4259,11 +4204,10 @@ class VirtualMachineApi:
|
|
|
4259
4204
|
)
|
|
4260
4205
|
|
|
4261
4206
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
4262
|
-
'200': "
|
|
4207
|
+
'200': "ResponseModel",
|
|
4263
4208
|
'400': "ErrorResponseModel",
|
|
4264
4209
|
'401': "ErrorResponseModel",
|
|
4265
4210
|
'404': "ErrorResponseModel",
|
|
4266
|
-
'406': "ErrorResponseModel",
|
|
4267
4211
|
'500': None,
|
|
4268
4212
|
}
|
|
4269
4213
|
response_data = self.api_client.call_api(
|
|
@@ -4278,10 +4222,10 @@ class VirtualMachineApi:
|
|
|
4278
4222
|
|
|
4279
4223
|
|
|
4280
4224
|
@validate_call
|
|
4281
|
-
def
|
|
4225
|
+
def post_instance_attach_firewalls_without_preload_content(
|
|
4282
4226
|
self,
|
|
4283
|
-
|
|
4284
|
-
|
|
4227
|
+
vm_id: StrictInt,
|
|
4228
|
+
payload: AttachFirewallsToVMPayload,
|
|
4285
4229
|
_request_timeout: Union[
|
|
4286
4230
|
None,
|
|
4287
4231
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -4295,14 +4239,14 @@ class VirtualMachineApi:
|
|
|
4295
4239
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
4296
4240
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
4297
4241
|
) -> RESTResponseType:
|
|
4298
|
-
"""
|
|
4242
|
+
"""Attach firewalls to a virtual machine
|
|
4299
4243
|
|
|
4300
|
-
|
|
4244
|
+
Attach firewalls to a virtual machine by providing the virtual machine ID in the path and the IDs of the firewalls in the request body; any firewalls not included will be detached.
|
|
4301
4245
|
|
|
4302
|
-
:param
|
|
4303
|
-
:type
|
|
4304
|
-
:param
|
|
4305
|
-
:type
|
|
4246
|
+
:param vm_id: (required)
|
|
4247
|
+
:type vm_id: int
|
|
4248
|
+
:param payload: (required)
|
|
4249
|
+
:type payload: AttachFirewallsToVMPayload
|
|
4306
4250
|
:param _request_timeout: timeout setting for this request. If one
|
|
4307
4251
|
number provided, it will be total request
|
|
4308
4252
|
timeout. It can also be a pair (tuple) of
|
|
@@ -4325,9 +4269,9 @@ class VirtualMachineApi:
|
|
|
4325
4269
|
:return: Returns the result object.
|
|
4326
4270
|
""" # noqa: E501
|
|
4327
4271
|
|
|
4328
|
-
_param = self.
|
|
4329
|
-
|
|
4330
|
-
|
|
4272
|
+
_param = self._post_instance_attach_firewalls_serialize(
|
|
4273
|
+
vm_id=vm_id,
|
|
4274
|
+
payload=payload,
|
|
4331
4275
|
_request_auth=_request_auth,
|
|
4332
4276
|
_content_type=_content_type,
|
|
4333
4277
|
_headers=_headers,
|
|
@@ -4335,11 +4279,10 @@ class VirtualMachineApi:
|
|
|
4335
4279
|
)
|
|
4336
4280
|
|
|
4337
4281
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
4338
|
-
'200': "
|
|
4282
|
+
'200': "ResponseModel",
|
|
4339
4283
|
'400': "ErrorResponseModel",
|
|
4340
4284
|
'401': "ErrorResponseModel",
|
|
4341
4285
|
'404': "ErrorResponseModel",
|
|
4342
|
-
'406': "ErrorResponseModel",
|
|
4343
4286
|
'500': None,
|
|
4344
4287
|
}
|
|
4345
4288
|
response_data = self.api_client.call_api(
|
|
@@ -4349,10 +4292,10 @@ class VirtualMachineApi:
|
|
|
4349
4292
|
return response_data.response
|
|
4350
4293
|
|
|
4351
4294
|
|
|
4352
|
-
def
|
|
4295
|
+
def _post_instance_attach_firewalls_serialize(
|
|
4353
4296
|
self,
|
|
4354
|
-
|
|
4355
|
-
|
|
4297
|
+
vm_id,
|
|
4298
|
+
payload,
|
|
4356
4299
|
_request_auth,
|
|
4357
4300
|
_content_type,
|
|
4358
4301
|
_headers,
|
|
@@ -4374,16 +4317,14 @@ class VirtualMachineApi:
|
|
|
4374
4317
|
_body_params: Optional[bytes] = None
|
|
4375
4318
|
|
|
4376
4319
|
# process the path parameters
|
|
4377
|
-
if
|
|
4378
|
-
_path_params['
|
|
4320
|
+
if vm_id is not None:
|
|
4321
|
+
_path_params['vm_id'] = vm_id
|
|
4379
4322
|
# process the query parameters
|
|
4380
|
-
if duration is not None:
|
|
4381
|
-
|
|
4382
|
-
_query_params.append(('duration', duration))
|
|
4383
|
-
|
|
4384
4323
|
# process the header parameters
|
|
4385
4324
|
# process the form parameters
|
|
4386
4325
|
# process the body parameter
|
|
4326
|
+
if payload is not None:
|
|
4327
|
+
_body_params = payload
|
|
4387
4328
|
|
|
4388
4329
|
|
|
4389
4330
|
# set the HTTP header `Accept`
|
|
@@ -4394,16 +4335,28 @@ class VirtualMachineApi:
|
|
|
4394
4335
|
]
|
|
4395
4336
|
)
|
|
4396
4337
|
|
|
4338
|
+
# set the HTTP header `Content-Type`
|
|
4339
|
+
if _content_type:
|
|
4340
|
+
_header_params['Content-Type'] = _content_type
|
|
4341
|
+
else:
|
|
4342
|
+
_default_content_type = (
|
|
4343
|
+
self.api_client.select_header_content_type(
|
|
4344
|
+
[
|
|
4345
|
+
'application/json'
|
|
4346
|
+
]
|
|
4347
|
+
)
|
|
4348
|
+
)
|
|
4349
|
+
if _default_content_type is not None:
|
|
4350
|
+
_header_params['Content-Type'] = _default_content_type
|
|
4397
4351
|
|
|
4398
4352
|
# authentication setting
|
|
4399
4353
|
_auth_settings: List[str] = [
|
|
4400
|
-
'apiKey'
|
|
4401
|
-
'accessToken'
|
|
4354
|
+
'apiKey'
|
|
4402
4355
|
]
|
|
4403
4356
|
|
|
4404
4357
|
return self.api_client.param_serialize(
|
|
4405
|
-
method='
|
|
4406
|
-
resource_path='/core/virtual-machines/{
|
|
4358
|
+
method='POST',
|
|
4359
|
+
resource_path='/core/virtual-machines/{vm_id}/attach-firewalls',
|
|
4407
4360
|
path_params=_path_params,
|
|
4408
4361
|
query_params=_query_params,
|
|
4409
4362
|
header_params=_header_params,
|
|
@@ -4420,12 +4373,10 @@ class VirtualMachineApi:
|
|
|
4420
4373
|
|
|
4421
4374
|
|
|
4422
4375
|
@validate_call
|
|
4423
|
-
def
|
|
4376
|
+
def post_instance_logs(
|
|
4424
4377
|
self,
|
|
4425
|
-
|
|
4426
|
-
|
|
4427
|
-
page_size: Annotated[Optional[StrictStr], Field(description="Data Per Page")] = None,
|
|
4428
|
-
search: Annotated[Optional[StrictStr], Field(description="Search By Instance ID or Name")] = None,
|
|
4378
|
+
vm_id: StrictInt,
|
|
4379
|
+
payload: RequestInstanceLogsPayload,
|
|
4429
4380
|
_request_timeout: Union[
|
|
4430
4381
|
None,
|
|
4431
4382
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -4438,19 +4389,15 @@ class VirtualMachineApi:
|
|
|
4438
4389
|
_content_type: Optional[StrictStr] = None,
|
|
4439
4390
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
4440
4391
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
4441
|
-
) ->
|
|
4442
|
-
"""
|
|
4392
|
+
) -> RequestInstanceLogsResponse:
|
|
4393
|
+
"""Request virtual machine logs
|
|
4443
4394
|
|
|
4444
|
-
|
|
4395
|
+
Request console logs for a virtual machine
|
|
4445
4396
|
|
|
4446
|
-
:param
|
|
4447
|
-
:type
|
|
4448
|
-
:param
|
|
4449
|
-
:type
|
|
4450
|
-
:param page_size: Data Per Page
|
|
4451
|
-
:type page_size: str
|
|
4452
|
-
:param search: Search By Instance ID or Name
|
|
4453
|
-
:type search: str
|
|
4397
|
+
:param vm_id: (required)
|
|
4398
|
+
:type vm_id: int
|
|
4399
|
+
:param payload: (required)
|
|
4400
|
+
:type payload: RequestInstanceLogsPayload
|
|
4454
4401
|
:param _request_timeout: timeout setting for this request. If one
|
|
4455
4402
|
number provided, it will be total request
|
|
4456
4403
|
timeout. It can also be a pair (tuple) of
|
|
@@ -4473,11 +4420,9 @@ class VirtualMachineApi:
|
|
|
4473
4420
|
:return: Returns the result object.
|
|
4474
4421
|
""" # noqa: E501
|
|
4475
4422
|
|
|
4476
|
-
_param = self.
|
|
4477
|
-
|
|
4478
|
-
|
|
4479
|
-
page_size=page_size,
|
|
4480
|
-
search=search,
|
|
4423
|
+
_param = self._post_instance_logs_serialize(
|
|
4424
|
+
vm_id=vm_id,
|
|
4425
|
+
payload=payload,
|
|
4481
4426
|
_request_auth=_request_auth,
|
|
4482
4427
|
_content_type=_content_type,
|
|
4483
4428
|
_headers=_headers,
|
|
@@ -4485,9 +4430,11 @@ class VirtualMachineApi:
|
|
|
4485
4430
|
)
|
|
4486
4431
|
|
|
4487
4432
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
4488
|
-
'200': "
|
|
4433
|
+
'200': "RequestInstanceLogsResponse",
|
|
4489
4434
|
'400': "ErrorResponseModel",
|
|
4490
4435
|
'401': "ErrorResponseModel",
|
|
4436
|
+
'404': "ErrorResponseModel",
|
|
4437
|
+
'405': "ErrorResponseModel",
|
|
4491
4438
|
'500': None,
|
|
4492
4439
|
}
|
|
4493
4440
|
response_data = self.api_client.call_api(
|
|
@@ -4502,12 +4449,10 @@ class VirtualMachineApi:
|
|
|
4502
4449
|
|
|
4503
4450
|
|
|
4504
4451
|
@validate_call
|
|
4505
|
-
def
|
|
4452
|
+
def post_instance_logs_with_http_info(
|
|
4506
4453
|
self,
|
|
4507
|
-
|
|
4508
|
-
|
|
4509
|
-
page_size: Annotated[Optional[StrictStr], Field(description="Data Per Page")] = None,
|
|
4510
|
-
search: Annotated[Optional[StrictStr], Field(description="Search By Instance ID or Name")] = None,
|
|
4454
|
+
vm_id: StrictInt,
|
|
4455
|
+
payload: RequestInstanceLogsPayload,
|
|
4511
4456
|
_request_timeout: Union[
|
|
4512
4457
|
None,
|
|
4513
4458
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -4520,19 +4465,623 @@ class VirtualMachineApi:
|
|
|
4520
4465
|
_content_type: Optional[StrictStr] = None,
|
|
4521
4466
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
4522
4467
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
4523
|
-
) -> ApiResponse[
|
|
4524
|
-
"""
|
|
4468
|
+
) -> ApiResponse[RequestInstanceLogsResponse]:
|
|
4469
|
+
"""Request virtual machine logs
|
|
4525
4470
|
|
|
4526
|
-
|
|
4471
|
+
Request console logs for a virtual machine
|
|
4527
4472
|
|
|
4528
|
-
:param
|
|
4529
|
-
:type
|
|
4530
|
-
:param
|
|
4531
|
-
:type
|
|
4532
|
-
:param
|
|
4533
|
-
|
|
4534
|
-
|
|
4535
|
-
|
|
4473
|
+
:param vm_id: (required)
|
|
4474
|
+
:type vm_id: int
|
|
4475
|
+
:param payload: (required)
|
|
4476
|
+
:type payload: RequestInstanceLogsPayload
|
|
4477
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
4478
|
+
number provided, it will be total request
|
|
4479
|
+
timeout. It can also be a pair (tuple) of
|
|
4480
|
+
(connection, read) timeouts.
|
|
4481
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
4482
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
4483
|
+
request; this effectively ignores the
|
|
4484
|
+
authentication in the spec for a single request.
|
|
4485
|
+
:type _request_auth: dict, optional
|
|
4486
|
+
:param _content_type: force content-type for the request.
|
|
4487
|
+
:type _content_type: str, Optional
|
|
4488
|
+
:param _headers: set to override the headers for a single
|
|
4489
|
+
request; this effectively ignores the headers
|
|
4490
|
+
in the spec for a single request.
|
|
4491
|
+
:type _headers: dict, optional
|
|
4492
|
+
:param _host_index: set to override the host_index for a single
|
|
4493
|
+
request; this effectively ignores the host_index
|
|
4494
|
+
in the spec for a single request.
|
|
4495
|
+
:type _host_index: int, optional
|
|
4496
|
+
:return: Returns the result object.
|
|
4497
|
+
""" # noqa: E501
|
|
4498
|
+
|
|
4499
|
+
_param = self._post_instance_logs_serialize(
|
|
4500
|
+
vm_id=vm_id,
|
|
4501
|
+
payload=payload,
|
|
4502
|
+
_request_auth=_request_auth,
|
|
4503
|
+
_content_type=_content_type,
|
|
4504
|
+
_headers=_headers,
|
|
4505
|
+
_host_index=_host_index
|
|
4506
|
+
)
|
|
4507
|
+
|
|
4508
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
4509
|
+
'200': "RequestInstanceLogsResponse",
|
|
4510
|
+
'400': "ErrorResponseModel",
|
|
4511
|
+
'401': "ErrorResponseModel",
|
|
4512
|
+
'404': "ErrorResponseModel",
|
|
4513
|
+
'405': "ErrorResponseModel",
|
|
4514
|
+
'500': None,
|
|
4515
|
+
}
|
|
4516
|
+
response_data = self.api_client.call_api(
|
|
4517
|
+
*_param,
|
|
4518
|
+
_request_timeout=_request_timeout
|
|
4519
|
+
)
|
|
4520
|
+
response_data.read()
|
|
4521
|
+
return self.api_client.response_deserialize(
|
|
4522
|
+
response_data=response_data,
|
|
4523
|
+
response_types_map=_response_types_map,
|
|
4524
|
+
)
|
|
4525
|
+
|
|
4526
|
+
|
|
4527
|
+
@validate_call
|
|
4528
|
+
def post_instance_logs_without_preload_content(
|
|
4529
|
+
self,
|
|
4530
|
+
vm_id: StrictInt,
|
|
4531
|
+
payload: RequestInstanceLogsPayload,
|
|
4532
|
+
_request_timeout: Union[
|
|
4533
|
+
None,
|
|
4534
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
4535
|
+
Tuple[
|
|
4536
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
4537
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
4538
|
+
]
|
|
4539
|
+
] = None,
|
|
4540
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
4541
|
+
_content_type: Optional[StrictStr] = None,
|
|
4542
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
4543
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
4544
|
+
) -> RESTResponseType:
|
|
4545
|
+
"""Request virtual machine logs
|
|
4546
|
+
|
|
4547
|
+
Request console logs for a virtual machine
|
|
4548
|
+
|
|
4549
|
+
:param vm_id: (required)
|
|
4550
|
+
:type vm_id: int
|
|
4551
|
+
:param payload: (required)
|
|
4552
|
+
:type payload: RequestInstanceLogsPayload
|
|
4553
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
4554
|
+
number provided, it will be total request
|
|
4555
|
+
timeout. It can also be a pair (tuple) of
|
|
4556
|
+
(connection, read) timeouts.
|
|
4557
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
4558
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
4559
|
+
request; this effectively ignores the
|
|
4560
|
+
authentication in the spec for a single request.
|
|
4561
|
+
:type _request_auth: dict, optional
|
|
4562
|
+
:param _content_type: force content-type for the request.
|
|
4563
|
+
:type _content_type: str, Optional
|
|
4564
|
+
:param _headers: set to override the headers for a single
|
|
4565
|
+
request; this effectively ignores the headers
|
|
4566
|
+
in the spec for a single request.
|
|
4567
|
+
:type _headers: dict, optional
|
|
4568
|
+
:param _host_index: set to override the host_index for a single
|
|
4569
|
+
request; this effectively ignores the host_index
|
|
4570
|
+
in the spec for a single request.
|
|
4571
|
+
:type _host_index: int, optional
|
|
4572
|
+
:return: Returns the result object.
|
|
4573
|
+
""" # noqa: E501
|
|
4574
|
+
|
|
4575
|
+
_param = self._post_instance_logs_serialize(
|
|
4576
|
+
vm_id=vm_id,
|
|
4577
|
+
payload=payload,
|
|
4578
|
+
_request_auth=_request_auth,
|
|
4579
|
+
_content_type=_content_type,
|
|
4580
|
+
_headers=_headers,
|
|
4581
|
+
_host_index=_host_index
|
|
4582
|
+
)
|
|
4583
|
+
|
|
4584
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
4585
|
+
'200': "RequestInstanceLogsResponse",
|
|
4586
|
+
'400': "ErrorResponseModel",
|
|
4587
|
+
'401': "ErrorResponseModel",
|
|
4588
|
+
'404': "ErrorResponseModel",
|
|
4589
|
+
'405': "ErrorResponseModel",
|
|
4590
|
+
'500': None,
|
|
4591
|
+
}
|
|
4592
|
+
response_data = self.api_client.call_api(
|
|
4593
|
+
*_param,
|
|
4594
|
+
_request_timeout=_request_timeout
|
|
4595
|
+
)
|
|
4596
|
+
return response_data.response
|
|
4597
|
+
|
|
4598
|
+
|
|
4599
|
+
def _post_instance_logs_serialize(
|
|
4600
|
+
self,
|
|
4601
|
+
vm_id,
|
|
4602
|
+
payload,
|
|
4603
|
+
_request_auth,
|
|
4604
|
+
_content_type,
|
|
4605
|
+
_headers,
|
|
4606
|
+
_host_index,
|
|
4607
|
+
) -> RequestSerialized:
|
|
4608
|
+
|
|
4609
|
+
_host = None
|
|
4610
|
+
|
|
4611
|
+
_collection_formats: Dict[str, str] = {
|
|
4612
|
+
}
|
|
4613
|
+
|
|
4614
|
+
_path_params: Dict[str, str] = {}
|
|
4615
|
+
_query_params: List[Tuple[str, str]] = []
|
|
4616
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
4617
|
+
_form_params: List[Tuple[str, str]] = []
|
|
4618
|
+
_files: Dict[
|
|
4619
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
4620
|
+
] = {}
|
|
4621
|
+
_body_params: Optional[bytes] = None
|
|
4622
|
+
|
|
4623
|
+
# process the path parameters
|
|
4624
|
+
if vm_id is not None:
|
|
4625
|
+
_path_params['vm_id'] = vm_id
|
|
4626
|
+
# process the query parameters
|
|
4627
|
+
# process the header parameters
|
|
4628
|
+
# process the form parameters
|
|
4629
|
+
# process the body parameter
|
|
4630
|
+
if payload is not None:
|
|
4631
|
+
_body_params = payload
|
|
4632
|
+
|
|
4633
|
+
|
|
4634
|
+
# set the HTTP header `Accept`
|
|
4635
|
+
if 'Accept' not in _header_params:
|
|
4636
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
4637
|
+
[
|
|
4638
|
+
'application/json'
|
|
4639
|
+
]
|
|
4640
|
+
)
|
|
4641
|
+
|
|
4642
|
+
# set the HTTP header `Content-Type`
|
|
4643
|
+
if _content_type:
|
|
4644
|
+
_header_params['Content-Type'] = _content_type
|
|
4645
|
+
else:
|
|
4646
|
+
_default_content_type = (
|
|
4647
|
+
self.api_client.select_header_content_type(
|
|
4648
|
+
[
|
|
4649
|
+
'application/json'
|
|
4650
|
+
]
|
|
4651
|
+
)
|
|
4652
|
+
)
|
|
4653
|
+
if _default_content_type is not None:
|
|
4654
|
+
_header_params['Content-Type'] = _default_content_type
|
|
4655
|
+
|
|
4656
|
+
# authentication setting
|
|
4657
|
+
_auth_settings: List[str] = [
|
|
4658
|
+
'apiKey'
|
|
4659
|
+
]
|
|
4660
|
+
|
|
4661
|
+
return self.api_client.param_serialize(
|
|
4662
|
+
method='POST',
|
|
4663
|
+
resource_path='/core/virtual-machines/{vm_id}/logs',
|
|
4664
|
+
path_params=_path_params,
|
|
4665
|
+
query_params=_query_params,
|
|
4666
|
+
header_params=_header_params,
|
|
4667
|
+
body=_body_params,
|
|
4668
|
+
post_params=_form_params,
|
|
4669
|
+
files=_files,
|
|
4670
|
+
auth_settings=_auth_settings,
|
|
4671
|
+
collection_formats=_collection_formats,
|
|
4672
|
+
_host=_host,
|
|
4673
|
+
_request_auth=_request_auth
|
|
4674
|
+
)
|
|
4675
|
+
|
|
4676
|
+
|
|
4677
|
+
|
|
4678
|
+
|
|
4679
|
+
@validate_call
|
|
4680
|
+
def post_instance_resize(
|
|
4681
|
+
self,
|
|
4682
|
+
vm_id: StrictInt,
|
|
4683
|
+
payload: InstanceResizePayload,
|
|
4684
|
+
_request_timeout: Union[
|
|
4685
|
+
None,
|
|
4686
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
4687
|
+
Tuple[
|
|
4688
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
4689
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
4690
|
+
]
|
|
4691
|
+
] = None,
|
|
4692
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
4693
|
+
_content_type: Optional[StrictStr] = None,
|
|
4694
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
4695
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
4696
|
+
) -> ResponseModel:
|
|
4697
|
+
"""Resize virtual machine
|
|
4698
|
+
|
|
4699
|
+
Updates the hardware configuration for an existing virtual machine. Include the virtual machine ID in the path and provide the new configuration, referred to as a `flavor`, in the body of the request. For additional information resizing, [**click here**](https://docs...cloud/docs/hardware/flavors#modify-the-flavor-of-an-existing-virtual-machine).
|
|
4700
|
+
|
|
4701
|
+
:param vm_id: (required)
|
|
4702
|
+
:type vm_id: int
|
|
4703
|
+
:param payload: (required)
|
|
4704
|
+
:type payload: InstanceResizePayload
|
|
4705
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
4706
|
+
number provided, it will be total request
|
|
4707
|
+
timeout. It can also be a pair (tuple) of
|
|
4708
|
+
(connection, read) timeouts.
|
|
4709
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
4710
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
4711
|
+
request; this effectively ignores the
|
|
4712
|
+
authentication in the spec for a single request.
|
|
4713
|
+
:type _request_auth: dict, optional
|
|
4714
|
+
:param _content_type: force content-type for the request.
|
|
4715
|
+
:type _content_type: str, Optional
|
|
4716
|
+
:param _headers: set to override the headers for a single
|
|
4717
|
+
request; this effectively ignores the headers
|
|
4718
|
+
in the spec for a single request.
|
|
4719
|
+
:type _headers: dict, optional
|
|
4720
|
+
:param _host_index: set to override the host_index for a single
|
|
4721
|
+
request; this effectively ignores the host_index
|
|
4722
|
+
in the spec for a single request.
|
|
4723
|
+
:type _host_index: int, optional
|
|
4724
|
+
:return: Returns the result object.
|
|
4725
|
+
""" # noqa: E501
|
|
4726
|
+
|
|
4727
|
+
_param = self._post_instance_resize_serialize(
|
|
4728
|
+
vm_id=vm_id,
|
|
4729
|
+
payload=payload,
|
|
4730
|
+
_request_auth=_request_auth,
|
|
4731
|
+
_content_type=_content_type,
|
|
4732
|
+
_headers=_headers,
|
|
4733
|
+
_host_index=_host_index
|
|
4734
|
+
)
|
|
4735
|
+
|
|
4736
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
4737
|
+
'200': "ResponseModel",
|
|
4738
|
+
'400': "ErrorResponseModel",
|
|
4739
|
+
'401': "ErrorResponseModel",
|
|
4740
|
+
'404': "ErrorResponseModel",
|
|
4741
|
+
'405': "ErrorResponseModel",
|
|
4742
|
+
'500': None,
|
|
4743
|
+
}
|
|
4744
|
+
response_data = self.api_client.call_api(
|
|
4745
|
+
*_param,
|
|
4746
|
+
_request_timeout=_request_timeout
|
|
4747
|
+
)
|
|
4748
|
+
response_data.read()
|
|
4749
|
+
return self.api_client.response_deserialize(
|
|
4750
|
+
response_data=response_data,
|
|
4751
|
+
response_types_map=_response_types_map,
|
|
4752
|
+
).data
|
|
4753
|
+
|
|
4754
|
+
|
|
4755
|
+
@validate_call
|
|
4756
|
+
def post_instance_resize_with_http_info(
|
|
4757
|
+
self,
|
|
4758
|
+
vm_id: StrictInt,
|
|
4759
|
+
payload: InstanceResizePayload,
|
|
4760
|
+
_request_timeout: Union[
|
|
4761
|
+
None,
|
|
4762
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
4763
|
+
Tuple[
|
|
4764
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
4765
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
4766
|
+
]
|
|
4767
|
+
] = None,
|
|
4768
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
4769
|
+
_content_type: Optional[StrictStr] = None,
|
|
4770
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
4771
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
4772
|
+
) -> ApiResponse[ResponseModel]:
|
|
4773
|
+
"""Resize virtual machine
|
|
4774
|
+
|
|
4775
|
+
Updates the hardware configuration for an existing virtual machine. Include the virtual machine ID in the path and provide the new configuration, referred to as a `flavor`, in the body of the request. For additional information resizing, [**click here**](https://docs...cloud/docs/hardware/flavors#modify-the-flavor-of-an-existing-virtual-machine).
|
|
4776
|
+
|
|
4777
|
+
:param vm_id: (required)
|
|
4778
|
+
:type vm_id: int
|
|
4779
|
+
:param payload: (required)
|
|
4780
|
+
:type payload: InstanceResizePayload
|
|
4781
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
4782
|
+
number provided, it will be total request
|
|
4783
|
+
timeout. It can also be a pair (tuple) of
|
|
4784
|
+
(connection, read) timeouts.
|
|
4785
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
4786
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
4787
|
+
request; this effectively ignores the
|
|
4788
|
+
authentication in the spec for a single request.
|
|
4789
|
+
:type _request_auth: dict, optional
|
|
4790
|
+
:param _content_type: force content-type for the request.
|
|
4791
|
+
:type _content_type: str, Optional
|
|
4792
|
+
:param _headers: set to override the headers for a single
|
|
4793
|
+
request; this effectively ignores the headers
|
|
4794
|
+
in the spec for a single request.
|
|
4795
|
+
:type _headers: dict, optional
|
|
4796
|
+
:param _host_index: set to override the host_index for a single
|
|
4797
|
+
request; this effectively ignores the host_index
|
|
4798
|
+
in the spec for a single request.
|
|
4799
|
+
:type _host_index: int, optional
|
|
4800
|
+
:return: Returns the result object.
|
|
4801
|
+
""" # noqa: E501
|
|
4802
|
+
|
|
4803
|
+
_param = self._post_instance_resize_serialize(
|
|
4804
|
+
vm_id=vm_id,
|
|
4805
|
+
payload=payload,
|
|
4806
|
+
_request_auth=_request_auth,
|
|
4807
|
+
_content_type=_content_type,
|
|
4808
|
+
_headers=_headers,
|
|
4809
|
+
_host_index=_host_index
|
|
4810
|
+
)
|
|
4811
|
+
|
|
4812
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
4813
|
+
'200': "ResponseModel",
|
|
4814
|
+
'400': "ErrorResponseModel",
|
|
4815
|
+
'401': "ErrorResponseModel",
|
|
4816
|
+
'404': "ErrorResponseModel",
|
|
4817
|
+
'405': "ErrorResponseModel",
|
|
4818
|
+
'500': None,
|
|
4819
|
+
}
|
|
4820
|
+
response_data = self.api_client.call_api(
|
|
4821
|
+
*_param,
|
|
4822
|
+
_request_timeout=_request_timeout
|
|
4823
|
+
)
|
|
4824
|
+
response_data.read()
|
|
4825
|
+
return self.api_client.response_deserialize(
|
|
4826
|
+
response_data=response_data,
|
|
4827
|
+
response_types_map=_response_types_map,
|
|
4828
|
+
)
|
|
4829
|
+
|
|
4830
|
+
|
|
4831
|
+
@validate_call
|
|
4832
|
+
def post_instance_resize_without_preload_content(
|
|
4833
|
+
self,
|
|
4834
|
+
vm_id: StrictInt,
|
|
4835
|
+
payload: InstanceResizePayload,
|
|
4836
|
+
_request_timeout: Union[
|
|
4837
|
+
None,
|
|
4838
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
4839
|
+
Tuple[
|
|
4840
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
4841
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
4842
|
+
]
|
|
4843
|
+
] = None,
|
|
4844
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
4845
|
+
_content_type: Optional[StrictStr] = None,
|
|
4846
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
4847
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
4848
|
+
) -> RESTResponseType:
|
|
4849
|
+
"""Resize virtual machine
|
|
4850
|
+
|
|
4851
|
+
Updates the hardware configuration for an existing virtual machine. Include the virtual machine ID in the path and provide the new configuration, referred to as a `flavor`, in the body of the request. For additional information resizing, [**click here**](https://docs...cloud/docs/hardware/flavors#modify-the-flavor-of-an-existing-virtual-machine).
|
|
4852
|
+
|
|
4853
|
+
:param vm_id: (required)
|
|
4854
|
+
:type vm_id: int
|
|
4855
|
+
:param payload: (required)
|
|
4856
|
+
:type payload: InstanceResizePayload
|
|
4857
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
4858
|
+
number provided, it will be total request
|
|
4859
|
+
timeout. It can also be a pair (tuple) of
|
|
4860
|
+
(connection, read) timeouts.
|
|
4861
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
4862
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
4863
|
+
request; this effectively ignores the
|
|
4864
|
+
authentication in the spec for a single request.
|
|
4865
|
+
:type _request_auth: dict, optional
|
|
4866
|
+
:param _content_type: force content-type for the request.
|
|
4867
|
+
:type _content_type: str, Optional
|
|
4868
|
+
:param _headers: set to override the headers for a single
|
|
4869
|
+
request; this effectively ignores the headers
|
|
4870
|
+
in the spec for a single request.
|
|
4871
|
+
:type _headers: dict, optional
|
|
4872
|
+
:param _host_index: set to override the host_index for a single
|
|
4873
|
+
request; this effectively ignores the host_index
|
|
4874
|
+
in the spec for a single request.
|
|
4875
|
+
:type _host_index: int, optional
|
|
4876
|
+
:return: Returns the result object.
|
|
4877
|
+
""" # noqa: E501
|
|
4878
|
+
|
|
4879
|
+
_param = self._post_instance_resize_serialize(
|
|
4880
|
+
vm_id=vm_id,
|
|
4881
|
+
payload=payload,
|
|
4882
|
+
_request_auth=_request_auth,
|
|
4883
|
+
_content_type=_content_type,
|
|
4884
|
+
_headers=_headers,
|
|
4885
|
+
_host_index=_host_index
|
|
4886
|
+
)
|
|
4887
|
+
|
|
4888
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
4889
|
+
'200': "ResponseModel",
|
|
4890
|
+
'400': "ErrorResponseModel",
|
|
4891
|
+
'401': "ErrorResponseModel",
|
|
4892
|
+
'404': "ErrorResponseModel",
|
|
4893
|
+
'405': "ErrorResponseModel",
|
|
4894
|
+
'500': None,
|
|
4895
|
+
}
|
|
4896
|
+
response_data = self.api_client.call_api(
|
|
4897
|
+
*_param,
|
|
4898
|
+
_request_timeout=_request_timeout
|
|
4899
|
+
)
|
|
4900
|
+
return response_data.response
|
|
4901
|
+
|
|
4902
|
+
|
|
4903
|
+
def _post_instance_resize_serialize(
|
|
4904
|
+
self,
|
|
4905
|
+
vm_id,
|
|
4906
|
+
payload,
|
|
4907
|
+
_request_auth,
|
|
4908
|
+
_content_type,
|
|
4909
|
+
_headers,
|
|
4910
|
+
_host_index,
|
|
4911
|
+
) -> RequestSerialized:
|
|
4912
|
+
|
|
4913
|
+
_host = None
|
|
4914
|
+
|
|
4915
|
+
_collection_formats: Dict[str, str] = {
|
|
4916
|
+
}
|
|
4917
|
+
|
|
4918
|
+
_path_params: Dict[str, str] = {}
|
|
4919
|
+
_query_params: List[Tuple[str, str]] = []
|
|
4920
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
4921
|
+
_form_params: List[Tuple[str, str]] = []
|
|
4922
|
+
_files: Dict[
|
|
4923
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
4924
|
+
] = {}
|
|
4925
|
+
_body_params: Optional[bytes] = None
|
|
4926
|
+
|
|
4927
|
+
# process the path parameters
|
|
4928
|
+
if vm_id is not None:
|
|
4929
|
+
_path_params['vm_id'] = vm_id
|
|
4930
|
+
# process the query parameters
|
|
4931
|
+
# process the header parameters
|
|
4932
|
+
# process the form parameters
|
|
4933
|
+
# process the body parameter
|
|
4934
|
+
if payload is not None:
|
|
4935
|
+
_body_params = payload
|
|
4936
|
+
|
|
4937
|
+
|
|
4938
|
+
# set the HTTP header `Accept`
|
|
4939
|
+
if 'Accept' not in _header_params:
|
|
4940
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
4941
|
+
[
|
|
4942
|
+
'application/json'
|
|
4943
|
+
]
|
|
4944
|
+
)
|
|
4945
|
+
|
|
4946
|
+
# set the HTTP header `Content-Type`
|
|
4947
|
+
if _content_type:
|
|
4948
|
+
_header_params['Content-Type'] = _content_type
|
|
4949
|
+
else:
|
|
4950
|
+
_default_content_type = (
|
|
4951
|
+
self.api_client.select_header_content_type(
|
|
4952
|
+
[
|
|
4953
|
+
'application/json'
|
|
4954
|
+
]
|
|
4955
|
+
)
|
|
4956
|
+
)
|
|
4957
|
+
if _default_content_type is not None:
|
|
4958
|
+
_header_params['Content-Type'] = _default_content_type
|
|
4959
|
+
|
|
4960
|
+
# authentication setting
|
|
4961
|
+
_auth_settings: List[str] = [
|
|
4962
|
+
'apiKey'
|
|
4963
|
+
]
|
|
4964
|
+
|
|
4965
|
+
return self.api_client.param_serialize(
|
|
4966
|
+
method='POST',
|
|
4967
|
+
resource_path='/core/virtual-machines/{vm_id}/resize',
|
|
4968
|
+
path_params=_path_params,
|
|
4969
|
+
query_params=_query_params,
|
|
4970
|
+
header_params=_header_params,
|
|
4971
|
+
body=_body_params,
|
|
4972
|
+
post_params=_form_params,
|
|
4973
|
+
files=_files,
|
|
4974
|
+
auth_settings=_auth_settings,
|
|
4975
|
+
collection_formats=_collection_formats,
|
|
4976
|
+
_host=_host,
|
|
4977
|
+
_request_auth=_request_auth
|
|
4978
|
+
)
|
|
4979
|
+
|
|
4980
|
+
|
|
4981
|
+
|
|
4982
|
+
|
|
4983
|
+
@validate_call
|
|
4984
|
+
def post_security_rule(
|
|
4985
|
+
self,
|
|
4986
|
+
vm_id: StrictInt,
|
|
4987
|
+
payload: CreateSecurityRulePayload,
|
|
4988
|
+
_request_timeout: Union[
|
|
4989
|
+
None,
|
|
4990
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
4991
|
+
Tuple[
|
|
4992
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
4993
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
4994
|
+
]
|
|
4995
|
+
] = None,
|
|
4996
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
4997
|
+
_content_type: Optional[StrictStr] = None,
|
|
4998
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
4999
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
5000
|
+
) -> SecurityGroupRule:
|
|
5001
|
+
"""Add firewall rule to virtual machine
|
|
5002
|
+
|
|
5003
|
+
Creates a firewall rule for a virtual machine. Include the virtual machine ID in the path, and provide the firewall rule configuration in the request body, as detailed below. For additional information on firewall rules, [**click here**](https://docs...cloud/docs/api-reference/core-resources/virtual-machines/vm-firewall-rules/add-firewall-rule-to-vm).
|
|
5004
|
+
|
|
5005
|
+
:param vm_id: (required)
|
|
5006
|
+
:type vm_id: int
|
|
5007
|
+
:param payload: (required)
|
|
5008
|
+
:type payload: CreateSecurityRulePayload
|
|
5009
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
5010
|
+
number provided, it will be total request
|
|
5011
|
+
timeout. It can also be a pair (tuple) of
|
|
5012
|
+
(connection, read) timeouts.
|
|
5013
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
5014
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
5015
|
+
request; this effectively ignores the
|
|
5016
|
+
authentication in the spec for a single request.
|
|
5017
|
+
:type _request_auth: dict, optional
|
|
5018
|
+
:param _content_type: force content-type for the request.
|
|
5019
|
+
:type _content_type: str, Optional
|
|
5020
|
+
:param _headers: set to override the headers for a single
|
|
5021
|
+
request; this effectively ignores the headers
|
|
5022
|
+
in the spec for a single request.
|
|
5023
|
+
:type _headers: dict, optional
|
|
5024
|
+
:param _host_index: set to override the host_index for a single
|
|
5025
|
+
request; this effectively ignores the host_index
|
|
5026
|
+
in the spec for a single request.
|
|
5027
|
+
:type _host_index: int, optional
|
|
5028
|
+
:return: Returns the result object.
|
|
5029
|
+
""" # noqa: E501
|
|
5030
|
+
|
|
5031
|
+
_param = self._post_security_rule_serialize(
|
|
5032
|
+
vm_id=vm_id,
|
|
5033
|
+
payload=payload,
|
|
5034
|
+
_request_auth=_request_auth,
|
|
5035
|
+
_content_type=_content_type,
|
|
5036
|
+
_headers=_headers,
|
|
5037
|
+
_host_index=_host_index
|
|
5038
|
+
)
|
|
5039
|
+
|
|
5040
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
5041
|
+
'200': "SecurityGroupRule",
|
|
5042
|
+
'400': "ErrorResponseModel",
|
|
5043
|
+
'401': "ErrorResponseModel",
|
|
5044
|
+
'404': "ErrorResponseModel",
|
|
5045
|
+
'409': "ErrorResponseModel",
|
|
5046
|
+
'500': None,
|
|
5047
|
+
}
|
|
5048
|
+
response_data = self.api_client.call_api(
|
|
5049
|
+
*_param,
|
|
5050
|
+
_request_timeout=_request_timeout
|
|
5051
|
+
)
|
|
5052
|
+
response_data.read()
|
|
5053
|
+
return self.api_client.response_deserialize(
|
|
5054
|
+
response_data=response_data,
|
|
5055
|
+
response_types_map=_response_types_map,
|
|
5056
|
+
).data
|
|
5057
|
+
|
|
5058
|
+
|
|
5059
|
+
@validate_call
|
|
5060
|
+
def post_security_rule_with_http_info(
|
|
5061
|
+
self,
|
|
5062
|
+
vm_id: StrictInt,
|
|
5063
|
+
payload: CreateSecurityRulePayload,
|
|
5064
|
+
_request_timeout: Union[
|
|
5065
|
+
None,
|
|
5066
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
5067
|
+
Tuple[
|
|
5068
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
5069
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
5070
|
+
]
|
|
5071
|
+
] = None,
|
|
5072
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
5073
|
+
_content_type: Optional[StrictStr] = None,
|
|
5074
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
5075
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
5076
|
+
) -> ApiResponse[SecurityGroupRule]:
|
|
5077
|
+
"""Add firewall rule to virtual machine
|
|
5078
|
+
|
|
5079
|
+
Creates a firewall rule for a virtual machine. Include the virtual machine ID in the path, and provide the firewall rule configuration in the request body, as detailed below. For additional information on firewall rules, [**click here**](https://docs...cloud/docs/api-reference/core-resources/virtual-machines/vm-firewall-rules/add-firewall-rule-to-vm).
|
|
5080
|
+
|
|
5081
|
+
:param vm_id: (required)
|
|
5082
|
+
:type vm_id: int
|
|
5083
|
+
:param payload: (required)
|
|
5084
|
+
:type payload: CreateSecurityRulePayload
|
|
4536
5085
|
:param _request_timeout: timeout setting for this request. If one
|
|
4537
5086
|
number provided, it will be total request
|
|
4538
5087
|
timeout. It can also be a pair (tuple) of
|
|
@@ -4555,11 +5104,9 @@ class VirtualMachineApi:
|
|
|
4555
5104
|
:return: Returns the result object.
|
|
4556
5105
|
""" # noqa: E501
|
|
4557
5106
|
|
|
4558
|
-
_param = self.
|
|
4559
|
-
|
|
4560
|
-
|
|
4561
|
-
page_size=page_size,
|
|
4562
|
-
search=search,
|
|
5107
|
+
_param = self._post_security_rule_serialize(
|
|
5108
|
+
vm_id=vm_id,
|
|
5109
|
+
payload=payload,
|
|
4563
5110
|
_request_auth=_request_auth,
|
|
4564
5111
|
_content_type=_content_type,
|
|
4565
5112
|
_headers=_headers,
|
|
@@ -4567,9 +5114,11 @@ class VirtualMachineApi:
|
|
|
4567
5114
|
)
|
|
4568
5115
|
|
|
4569
5116
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
4570
|
-
'200': "
|
|
5117
|
+
'200': "SecurityGroupRule",
|
|
4571
5118
|
'400': "ErrorResponseModel",
|
|
4572
5119
|
'401': "ErrorResponseModel",
|
|
5120
|
+
'404': "ErrorResponseModel",
|
|
5121
|
+
'409': "ErrorResponseModel",
|
|
4573
5122
|
'500': None,
|
|
4574
5123
|
}
|
|
4575
5124
|
response_data = self.api_client.call_api(
|
|
@@ -4584,12 +5133,10 @@ class VirtualMachineApi:
|
|
|
4584
5133
|
|
|
4585
5134
|
|
|
4586
5135
|
@validate_call
|
|
4587
|
-
def
|
|
5136
|
+
def post_security_rule_without_preload_content(
|
|
4588
5137
|
self,
|
|
4589
|
-
|
|
4590
|
-
|
|
4591
|
-
page_size: Annotated[Optional[StrictStr], Field(description="Data Per Page")] = None,
|
|
4592
|
-
search: Annotated[Optional[StrictStr], Field(description="Search By Instance ID or Name")] = None,
|
|
5138
|
+
vm_id: StrictInt,
|
|
5139
|
+
payload: CreateSecurityRulePayload,
|
|
4593
5140
|
_request_timeout: Union[
|
|
4594
5141
|
None,
|
|
4595
5142
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -4603,18 +5150,14 @@ class VirtualMachineApi:
|
|
|
4603
5150
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
4604
5151
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
4605
5152
|
) -> RESTResponseType:
|
|
4606
|
-
"""
|
|
5153
|
+
"""Add firewall rule to virtual machine
|
|
4607
5154
|
|
|
4608
|
-
|
|
5155
|
+
Creates a firewall rule for a virtual machine. Include the virtual machine ID in the path, and provide the firewall rule configuration in the request body, as detailed below. For additional information on firewall rules, [**click here**](https://docs...cloud/docs/api-reference/core-resources/virtual-machines/vm-firewall-rules/add-firewall-rule-to-vm).
|
|
4609
5156
|
|
|
4610
|
-
:param
|
|
4611
|
-
:type
|
|
4612
|
-
:param
|
|
4613
|
-
:type
|
|
4614
|
-
:param page_size: Data Per Page
|
|
4615
|
-
:type page_size: str
|
|
4616
|
-
:param search: Search By Instance ID or Name
|
|
4617
|
-
:type search: str
|
|
5157
|
+
:param vm_id: (required)
|
|
5158
|
+
:type vm_id: int
|
|
5159
|
+
:param payload: (required)
|
|
5160
|
+
:type payload: CreateSecurityRulePayload
|
|
4618
5161
|
:param _request_timeout: timeout setting for this request. If one
|
|
4619
5162
|
number provided, it will be total request
|
|
4620
5163
|
timeout. It can also be a pair (tuple) of
|
|
@@ -4637,11 +5180,9 @@ class VirtualMachineApi:
|
|
|
4637
5180
|
:return: Returns the result object.
|
|
4638
5181
|
""" # noqa: E501
|
|
4639
5182
|
|
|
4640
|
-
_param = self.
|
|
4641
|
-
|
|
4642
|
-
|
|
4643
|
-
page_size=page_size,
|
|
4644
|
-
search=search,
|
|
5183
|
+
_param = self._post_security_rule_serialize(
|
|
5184
|
+
vm_id=vm_id,
|
|
5185
|
+
payload=payload,
|
|
4645
5186
|
_request_auth=_request_auth,
|
|
4646
5187
|
_content_type=_content_type,
|
|
4647
5188
|
_headers=_headers,
|
|
@@ -4649,9 +5190,11 @@ class VirtualMachineApi:
|
|
|
4649
5190
|
)
|
|
4650
5191
|
|
|
4651
5192
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
4652
|
-
'200': "
|
|
5193
|
+
'200': "SecurityGroupRule",
|
|
4653
5194
|
'400': "ErrorResponseModel",
|
|
4654
5195
|
'401': "ErrorResponseModel",
|
|
5196
|
+
'404': "ErrorResponseModel",
|
|
5197
|
+
'409': "ErrorResponseModel",
|
|
4655
5198
|
'500': None,
|
|
4656
5199
|
}
|
|
4657
5200
|
response_data = self.api_client.call_api(
|
|
@@ -4661,12 +5204,10 @@ class VirtualMachineApi:
|
|
|
4661
5204
|
return response_data.response
|
|
4662
5205
|
|
|
4663
5206
|
|
|
4664
|
-
def
|
|
5207
|
+
def _post_security_rule_serialize(
|
|
4665
5208
|
self,
|
|
4666
|
-
|
|
4667
|
-
|
|
4668
|
-
page_size,
|
|
4669
|
-
search,
|
|
5209
|
+
vm_id,
|
|
5210
|
+
payload,
|
|
4670
5211
|
_request_auth,
|
|
4671
5212
|
_content_type,
|
|
4672
5213
|
_headers,
|
|
@@ -4688,24 +5229,14 @@ class VirtualMachineApi:
|
|
|
4688
5229
|
_body_params: Optional[bytes] = None
|
|
4689
5230
|
|
|
4690
5231
|
# process the path parameters
|
|
4691
|
-
if
|
|
4692
|
-
_path_params['
|
|
5232
|
+
if vm_id is not None:
|
|
5233
|
+
_path_params['vm_id'] = vm_id
|
|
4693
5234
|
# process the query parameters
|
|
4694
|
-
if page is not None:
|
|
4695
|
-
|
|
4696
|
-
_query_params.append(('page', page))
|
|
4697
|
-
|
|
4698
|
-
if page_size is not None:
|
|
4699
|
-
|
|
4700
|
-
_query_params.append(('pageSize', page_size))
|
|
4701
|
-
|
|
4702
|
-
if search is not None:
|
|
4703
|
-
|
|
4704
|
-
_query_params.append(('search', search))
|
|
4705
|
-
|
|
4706
5235
|
# process the header parameters
|
|
4707
5236
|
# process the form parameters
|
|
4708
5237
|
# process the body parameter
|
|
5238
|
+
if payload is not None:
|
|
5239
|
+
_body_params = payload
|
|
4709
5240
|
|
|
4710
5241
|
|
|
4711
5242
|
# set the HTTP header `Accept`
|
|
@@ -4716,16 +5247,28 @@ class VirtualMachineApi:
|
|
|
4716
5247
|
]
|
|
4717
5248
|
)
|
|
4718
5249
|
|
|
5250
|
+
# set the HTTP header `Content-Type`
|
|
5251
|
+
if _content_type:
|
|
5252
|
+
_header_params['Content-Type'] = _content_type
|
|
5253
|
+
else:
|
|
5254
|
+
_default_content_type = (
|
|
5255
|
+
self.api_client.select_header_content_type(
|
|
5256
|
+
[
|
|
5257
|
+
'application/json'
|
|
5258
|
+
]
|
|
5259
|
+
)
|
|
5260
|
+
)
|
|
5261
|
+
if _default_content_type is not None:
|
|
5262
|
+
_header_params['Content-Type'] = _default_content_type
|
|
4719
5263
|
|
|
4720
5264
|
# authentication setting
|
|
4721
5265
|
_auth_settings: List[str] = [
|
|
4722
|
-
'apiKey'
|
|
4723
|
-
'accessToken'
|
|
5266
|
+
'apiKey'
|
|
4724
5267
|
]
|
|
4725
5268
|
|
|
4726
5269
|
return self.api_client.param_serialize(
|
|
4727
|
-
method='
|
|
4728
|
-
resource_path='/core/virtual-machines/
|
|
5270
|
+
method='POST',
|
|
5271
|
+
resource_path='/core/virtual-machines/{vm_id}/sg-rules',
|
|
4729
5272
|
path_params=_path_params,
|
|
4730
5273
|
query_params=_query_params,
|
|
4731
5274
|
header_params=_header_params,
|
|
@@ -4742,9 +5285,10 @@ class VirtualMachineApi:
|
|
|
4742
5285
|
|
|
4743
5286
|
|
|
4744
5287
|
@validate_call
|
|
4745
|
-
def
|
|
5288
|
+
def post_snapshots(
|
|
4746
5289
|
self,
|
|
4747
|
-
|
|
5290
|
+
vm_id: StrictInt,
|
|
5291
|
+
payload: CreateSnapshotPayload,
|
|
4748
5292
|
_request_timeout: Union[
|
|
4749
5293
|
None,
|
|
4750
5294
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -4757,13 +5301,15 @@ class VirtualMachineApi:
|
|
|
4757
5301
|
_content_type: Optional[StrictStr] = None,
|
|
4758
5302
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
4759
5303
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
4760
|
-
) ->
|
|
4761
|
-
"""
|
|
5304
|
+
) -> CreateSnapshotResponse:
|
|
5305
|
+
"""Create snapshot from a virtual machine
|
|
4762
5306
|
|
|
4763
|
-
|
|
5307
|
+
Create snapshots of a virtual machine by providing the virtual machine ID in the path
|
|
4764
5308
|
|
|
4765
|
-
:param
|
|
4766
|
-
:type
|
|
5309
|
+
:param vm_id: (required)
|
|
5310
|
+
:type vm_id: int
|
|
5311
|
+
:param payload: (required)
|
|
5312
|
+
:type payload: CreateSnapshotPayload
|
|
4767
5313
|
:param _request_timeout: timeout setting for this request. If one
|
|
4768
5314
|
number provided, it will be total request
|
|
4769
5315
|
timeout. It can also be a pair (tuple) of
|
|
@@ -4786,8 +5332,9 @@ class VirtualMachineApi:
|
|
|
4786
5332
|
:return: Returns the result object.
|
|
4787
5333
|
""" # noqa: E501
|
|
4788
5334
|
|
|
4789
|
-
_param = self.
|
|
4790
|
-
|
|
5335
|
+
_param = self._post_snapshots_serialize(
|
|
5336
|
+
vm_id=vm_id,
|
|
5337
|
+
payload=payload,
|
|
4791
5338
|
_request_auth=_request_auth,
|
|
4792
5339
|
_content_type=_content_type,
|
|
4793
5340
|
_headers=_headers,
|
|
@@ -4795,7 +5342,7 @@ class VirtualMachineApi:
|
|
|
4795
5342
|
)
|
|
4796
5343
|
|
|
4797
5344
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
4798
|
-
'
|
|
5345
|
+
'201': "CreateSnapshotResponse",
|
|
4799
5346
|
'400': "ErrorResponseModel",
|
|
4800
5347
|
'401': "ErrorResponseModel",
|
|
4801
5348
|
'404': "ErrorResponseModel",
|
|
@@ -4813,9 +5360,10 @@ class VirtualMachineApi:
|
|
|
4813
5360
|
|
|
4814
5361
|
|
|
4815
5362
|
@validate_call
|
|
4816
|
-
def
|
|
5363
|
+
def post_snapshots_with_http_info(
|
|
4817
5364
|
self,
|
|
4818
|
-
|
|
5365
|
+
vm_id: StrictInt,
|
|
5366
|
+
payload: CreateSnapshotPayload,
|
|
4819
5367
|
_request_timeout: Union[
|
|
4820
5368
|
None,
|
|
4821
5369
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -4828,13 +5376,15 @@ class VirtualMachineApi:
|
|
|
4828
5376
|
_content_type: Optional[StrictStr] = None,
|
|
4829
5377
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
4830
5378
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
4831
|
-
) -> ApiResponse[
|
|
4832
|
-
"""
|
|
5379
|
+
) -> ApiResponse[CreateSnapshotResponse]:
|
|
5380
|
+
"""Create snapshot from a virtual machine
|
|
4833
5381
|
|
|
4834
|
-
|
|
5382
|
+
Create snapshots of a virtual machine by providing the virtual machine ID in the path
|
|
4835
5383
|
|
|
4836
|
-
:param
|
|
4837
|
-
:type
|
|
5384
|
+
:param vm_id: (required)
|
|
5385
|
+
:type vm_id: int
|
|
5386
|
+
:param payload: (required)
|
|
5387
|
+
:type payload: CreateSnapshotPayload
|
|
4838
5388
|
:param _request_timeout: timeout setting for this request. If one
|
|
4839
5389
|
number provided, it will be total request
|
|
4840
5390
|
timeout. It can also be a pair (tuple) of
|
|
@@ -4857,8 +5407,9 @@ class VirtualMachineApi:
|
|
|
4857
5407
|
:return: Returns the result object.
|
|
4858
5408
|
""" # noqa: E501
|
|
4859
5409
|
|
|
4860
|
-
_param = self.
|
|
4861
|
-
|
|
5410
|
+
_param = self._post_snapshots_serialize(
|
|
5411
|
+
vm_id=vm_id,
|
|
5412
|
+
payload=payload,
|
|
4862
5413
|
_request_auth=_request_auth,
|
|
4863
5414
|
_content_type=_content_type,
|
|
4864
5415
|
_headers=_headers,
|
|
@@ -4866,7 +5417,7 @@ class VirtualMachineApi:
|
|
|
4866
5417
|
)
|
|
4867
5418
|
|
|
4868
5419
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
4869
|
-
'
|
|
5420
|
+
'201': "CreateSnapshotResponse",
|
|
4870
5421
|
'400': "ErrorResponseModel",
|
|
4871
5422
|
'401': "ErrorResponseModel",
|
|
4872
5423
|
'404': "ErrorResponseModel",
|
|
@@ -4884,9 +5435,10 @@ class VirtualMachineApi:
|
|
|
4884
5435
|
|
|
4885
5436
|
|
|
4886
5437
|
@validate_call
|
|
4887
|
-
def
|
|
5438
|
+
def post_snapshots_without_preload_content(
|
|
4888
5439
|
self,
|
|
4889
|
-
|
|
5440
|
+
vm_id: StrictInt,
|
|
5441
|
+
payload: CreateSnapshotPayload,
|
|
4890
5442
|
_request_timeout: Union[
|
|
4891
5443
|
None,
|
|
4892
5444
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -4900,12 +5452,14 @@ class VirtualMachineApi:
|
|
|
4900
5452
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
4901
5453
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
4902
5454
|
) -> RESTResponseType:
|
|
4903
|
-
"""
|
|
5455
|
+
"""Create snapshot from a virtual machine
|
|
4904
5456
|
|
|
4905
|
-
|
|
5457
|
+
Create snapshots of a virtual machine by providing the virtual machine ID in the path
|
|
4906
5458
|
|
|
4907
|
-
:param
|
|
4908
|
-
:type
|
|
5459
|
+
:param vm_id: (required)
|
|
5460
|
+
:type vm_id: int
|
|
5461
|
+
:param payload: (required)
|
|
5462
|
+
:type payload: CreateSnapshotPayload
|
|
4909
5463
|
:param _request_timeout: timeout setting for this request. If one
|
|
4910
5464
|
number provided, it will be total request
|
|
4911
5465
|
timeout. It can also be a pair (tuple) of
|
|
@@ -4928,8 +5482,9 @@ class VirtualMachineApi:
|
|
|
4928
5482
|
:return: Returns the result object.
|
|
4929
5483
|
""" # noqa: E501
|
|
4930
5484
|
|
|
4931
|
-
_param = self.
|
|
4932
|
-
|
|
5485
|
+
_param = self._post_snapshots_serialize(
|
|
5486
|
+
vm_id=vm_id,
|
|
5487
|
+
payload=payload,
|
|
4933
5488
|
_request_auth=_request_auth,
|
|
4934
5489
|
_content_type=_content_type,
|
|
4935
5490
|
_headers=_headers,
|
|
@@ -4937,7 +5492,7 @@ class VirtualMachineApi:
|
|
|
4937
5492
|
)
|
|
4938
5493
|
|
|
4939
5494
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
4940
|
-
'
|
|
5495
|
+
'201': "CreateSnapshotResponse",
|
|
4941
5496
|
'400': "ErrorResponseModel",
|
|
4942
5497
|
'401': "ErrorResponseModel",
|
|
4943
5498
|
'404': "ErrorResponseModel",
|
|
@@ -4950,9 +5505,10 @@ class VirtualMachineApi:
|
|
|
4950
5505
|
return response_data.response
|
|
4951
5506
|
|
|
4952
5507
|
|
|
4953
|
-
def
|
|
5508
|
+
def _post_snapshots_serialize(
|
|
4954
5509
|
self,
|
|
4955
|
-
|
|
5510
|
+
vm_id,
|
|
5511
|
+
payload,
|
|
4956
5512
|
_request_auth,
|
|
4957
5513
|
_content_type,
|
|
4958
5514
|
_headers,
|
|
@@ -4974,12 +5530,14 @@ class VirtualMachineApi:
|
|
|
4974
5530
|
_body_params: Optional[bytes] = None
|
|
4975
5531
|
|
|
4976
5532
|
# process the path parameters
|
|
4977
|
-
if
|
|
4978
|
-
_path_params['
|
|
5533
|
+
if vm_id is not None:
|
|
5534
|
+
_path_params['vm_id'] = vm_id
|
|
4979
5535
|
# process the query parameters
|
|
4980
5536
|
# process the header parameters
|
|
4981
5537
|
# process the form parameters
|
|
4982
5538
|
# process the body parameter
|
|
5539
|
+
if payload is not None:
|
|
5540
|
+
_body_params = payload
|
|
4983
5541
|
|
|
4984
5542
|
|
|
4985
5543
|
# set the HTTP header `Accept`
|
|
@@ -4990,16 +5548,28 @@ class VirtualMachineApi:
|
|
|
4990
5548
|
]
|
|
4991
5549
|
)
|
|
4992
5550
|
|
|
5551
|
+
# set the HTTP header `Content-Type`
|
|
5552
|
+
if _content_type:
|
|
5553
|
+
_header_params['Content-Type'] = _content_type
|
|
5554
|
+
else:
|
|
5555
|
+
_default_content_type = (
|
|
5556
|
+
self.api_client.select_header_content_type(
|
|
5557
|
+
[
|
|
5558
|
+
'application/json'
|
|
5559
|
+
]
|
|
5560
|
+
)
|
|
5561
|
+
)
|
|
5562
|
+
if _default_content_type is not None:
|
|
5563
|
+
_header_params['Content-Type'] = _default_content_type
|
|
4993
5564
|
|
|
4994
5565
|
# authentication setting
|
|
4995
5566
|
_auth_settings: List[str] = [
|
|
4996
|
-
'apiKey'
|
|
4997
|
-
'accessToken'
|
|
5567
|
+
'apiKey'
|
|
4998
5568
|
]
|
|
4999
5569
|
|
|
5000
5570
|
return self.api_client.param_serialize(
|
|
5001
|
-
method='
|
|
5002
|
-
resource_path='/core/virtual-machines/{
|
|
5571
|
+
method='POST',
|
|
5572
|
+
resource_path='/core/virtual-machines/{vm_id}/snapshots',
|
|
5003
5573
|
path_params=_path_params,
|
|
5004
5574
|
query_params=_query_params,
|
|
5005
5575
|
header_params=_header_params,
|
|
@@ -5016,9 +5586,10 @@ class VirtualMachineApi:
|
|
|
5016
5586
|
|
|
5017
5587
|
|
|
5018
5588
|
@validate_call
|
|
5019
|
-
def
|
|
5589
|
+
def put_labels(
|
|
5020
5590
|
self,
|
|
5021
|
-
|
|
5591
|
+
vm_id: StrictInt,
|
|
5592
|
+
payload: EditLabelOfAnExistingVMPayload,
|
|
5022
5593
|
_request_timeout: Union[
|
|
5023
5594
|
None,
|
|
5024
5595
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -5032,12 +5603,14 @@ class VirtualMachineApi:
|
|
|
5032
5603
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
5033
5604
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
5034
5605
|
) -> ResponseModel:
|
|
5035
|
-
"""
|
|
5606
|
+
"""Edit virtual machine labels
|
|
5036
5607
|
|
|
5037
|
-
|
|
5608
|
+
Adds one or more labels to an existing virtual machine. Provide the virtual machine ID in the path to add labels to the specified VM. For multiple labels, add a space between each label in the request body.
|
|
5038
5609
|
|
|
5039
|
-
:param
|
|
5040
|
-
:type
|
|
5610
|
+
:param vm_id: (required)
|
|
5611
|
+
:type vm_id: int
|
|
5612
|
+
:param payload: (required)
|
|
5613
|
+
:type payload: EditLabelOfAnExistingVMPayload
|
|
5041
5614
|
:param _request_timeout: timeout setting for this request. If one
|
|
5042
5615
|
number provided, it will be total request
|
|
5043
5616
|
timeout. It can also be a pair (tuple) of
|
|
@@ -5060,8 +5633,9 @@ class VirtualMachineApi:
|
|
|
5060
5633
|
:return: Returns the result object.
|
|
5061
5634
|
""" # noqa: E501
|
|
5062
5635
|
|
|
5063
|
-
_param = self.
|
|
5064
|
-
|
|
5636
|
+
_param = self._put_labels_serialize(
|
|
5637
|
+
vm_id=vm_id,
|
|
5638
|
+
payload=payload,
|
|
5065
5639
|
_request_auth=_request_auth,
|
|
5066
5640
|
_content_type=_content_type,
|
|
5067
5641
|
_headers=_headers,
|
|
@@ -5073,6 +5647,7 @@ class VirtualMachineApi:
|
|
|
5073
5647
|
'400': "ErrorResponseModel",
|
|
5074
5648
|
'401': "ErrorResponseModel",
|
|
5075
5649
|
'404': "ErrorResponseModel",
|
|
5650
|
+
'409': "ErrorResponseModel",
|
|
5076
5651
|
'500': None,
|
|
5077
5652
|
}
|
|
5078
5653
|
response_data = self.api_client.call_api(
|
|
@@ -5087,9 +5662,10 @@ class VirtualMachineApi:
|
|
|
5087
5662
|
|
|
5088
5663
|
|
|
5089
5664
|
@validate_call
|
|
5090
|
-
def
|
|
5665
|
+
def put_labels_with_http_info(
|
|
5091
5666
|
self,
|
|
5092
|
-
|
|
5667
|
+
vm_id: StrictInt,
|
|
5668
|
+
payload: EditLabelOfAnExistingVMPayload,
|
|
5093
5669
|
_request_timeout: Union[
|
|
5094
5670
|
None,
|
|
5095
5671
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -5103,12 +5679,14 @@ class VirtualMachineApi:
|
|
|
5103
5679
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
5104
5680
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
5105
5681
|
) -> ApiResponse[ResponseModel]:
|
|
5106
|
-
"""
|
|
5682
|
+
"""Edit virtual machine labels
|
|
5107
5683
|
|
|
5108
|
-
|
|
5684
|
+
Adds one or more labels to an existing virtual machine. Provide the virtual machine ID in the path to add labels to the specified VM. For multiple labels, add a space between each label in the request body.
|
|
5109
5685
|
|
|
5110
|
-
:param
|
|
5111
|
-
:type
|
|
5686
|
+
:param vm_id: (required)
|
|
5687
|
+
:type vm_id: int
|
|
5688
|
+
:param payload: (required)
|
|
5689
|
+
:type payload: EditLabelOfAnExistingVMPayload
|
|
5112
5690
|
:param _request_timeout: timeout setting for this request. If one
|
|
5113
5691
|
number provided, it will be total request
|
|
5114
5692
|
timeout. It can also be a pair (tuple) of
|
|
@@ -5131,8 +5709,9 @@ class VirtualMachineApi:
|
|
|
5131
5709
|
:return: Returns the result object.
|
|
5132
5710
|
""" # noqa: E501
|
|
5133
5711
|
|
|
5134
|
-
_param = self.
|
|
5135
|
-
|
|
5712
|
+
_param = self._put_labels_serialize(
|
|
5713
|
+
vm_id=vm_id,
|
|
5714
|
+
payload=payload,
|
|
5136
5715
|
_request_auth=_request_auth,
|
|
5137
5716
|
_content_type=_content_type,
|
|
5138
5717
|
_headers=_headers,
|
|
@@ -5144,6 +5723,7 @@ class VirtualMachineApi:
|
|
|
5144
5723
|
'400': "ErrorResponseModel",
|
|
5145
5724
|
'401': "ErrorResponseModel",
|
|
5146
5725
|
'404': "ErrorResponseModel",
|
|
5726
|
+
'409': "ErrorResponseModel",
|
|
5147
5727
|
'500': None,
|
|
5148
5728
|
}
|
|
5149
5729
|
response_data = self.api_client.call_api(
|
|
@@ -5158,9 +5738,10 @@ class VirtualMachineApi:
|
|
|
5158
5738
|
|
|
5159
5739
|
|
|
5160
5740
|
@validate_call
|
|
5161
|
-
def
|
|
5741
|
+
def put_labels_without_preload_content(
|
|
5162
5742
|
self,
|
|
5163
|
-
|
|
5743
|
+
vm_id: StrictInt,
|
|
5744
|
+
payload: EditLabelOfAnExistingVMPayload,
|
|
5164
5745
|
_request_timeout: Union[
|
|
5165
5746
|
None,
|
|
5166
5747
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -5174,12 +5755,14 @@ class VirtualMachineApi:
|
|
|
5174
5755
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
5175
5756
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
5176
5757
|
) -> RESTResponseType:
|
|
5177
|
-
"""
|
|
5758
|
+
"""Edit virtual machine labels
|
|
5178
5759
|
|
|
5179
|
-
|
|
5760
|
+
Adds one or more labels to an existing virtual machine. Provide the virtual machine ID in the path to add labels to the specified VM. For multiple labels, add a space between each label in the request body.
|
|
5180
5761
|
|
|
5181
|
-
:param
|
|
5182
|
-
:type
|
|
5762
|
+
:param vm_id: (required)
|
|
5763
|
+
:type vm_id: int
|
|
5764
|
+
:param payload: (required)
|
|
5765
|
+
:type payload: EditLabelOfAnExistingVMPayload
|
|
5183
5766
|
:param _request_timeout: timeout setting for this request. If one
|
|
5184
5767
|
number provided, it will be total request
|
|
5185
5768
|
timeout. It can also be a pair (tuple) of
|
|
@@ -5202,8 +5785,9 @@ class VirtualMachineApi:
|
|
|
5202
5785
|
:return: Returns the result object.
|
|
5203
5786
|
""" # noqa: E501
|
|
5204
5787
|
|
|
5205
|
-
_param = self.
|
|
5206
|
-
|
|
5788
|
+
_param = self._put_labels_serialize(
|
|
5789
|
+
vm_id=vm_id,
|
|
5790
|
+
payload=payload,
|
|
5207
5791
|
_request_auth=_request_auth,
|
|
5208
5792
|
_content_type=_content_type,
|
|
5209
5793
|
_headers=_headers,
|
|
@@ -5215,6 +5799,7 @@ class VirtualMachineApi:
|
|
|
5215
5799
|
'400': "ErrorResponseModel",
|
|
5216
5800
|
'401': "ErrorResponseModel",
|
|
5217
5801
|
'404': "ErrorResponseModel",
|
|
5802
|
+
'409': "ErrorResponseModel",
|
|
5218
5803
|
'500': None,
|
|
5219
5804
|
}
|
|
5220
5805
|
response_data = self.api_client.call_api(
|
|
@@ -5224,9 +5809,10 @@ class VirtualMachineApi:
|
|
|
5224
5809
|
return response_data.response
|
|
5225
5810
|
|
|
5226
5811
|
|
|
5227
|
-
def
|
|
5812
|
+
def _put_labels_serialize(
|
|
5228
5813
|
self,
|
|
5229
|
-
|
|
5814
|
+
vm_id,
|
|
5815
|
+
payload,
|
|
5230
5816
|
_request_auth,
|
|
5231
5817
|
_content_type,
|
|
5232
5818
|
_headers,
|
|
@@ -5248,12 +5834,14 @@ class VirtualMachineApi:
|
|
|
5248
5834
|
_body_params: Optional[bytes] = None
|
|
5249
5835
|
|
|
5250
5836
|
# process the path parameters
|
|
5251
|
-
if
|
|
5252
|
-
_path_params['
|
|
5837
|
+
if vm_id is not None:
|
|
5838
|
+
_path_params['vm_id'] = vm_id
|
|
5253
5839
|
# process the query parameters
|
|
5254
5840
|
# process the header parameters
|
|
5255
5841
|
# process the form parameters
|
|
5256
5842
|
# process the body parameter
|
|
5843
|
+
if payload is not None:
|
|
5844
|
+
_body_params = payload
|
|
5257
5845
|
|
|
5258
5846
|
|
|
5259
5847
|
# set the HTTP header `Accept`
|
|
@@ -5264,16 +5852,28 @@ class VirtualMachineApi:
|
|
|
5264
5852
|
]
|
|
5265
5853
|
)
|
|
5266
5854
|
|
|
5855
|
+
# set the HTTP header `Content-Type`
|
|
5856
|
+
if _content_type:
|
|
5857
|
+
_header_params['Content-Type'] = _content_type
|
|
5858
|
+
else:
|
|
5859
|
+
_default_content_type = (
|
|
5860
|
+
self.api_client.select_header_content_type(
|
|
5861
|
+
[
|
|
5862
|
+
'application/json'
|
|
5863
|
+
]
|
|
5864
|
+
)
|
|
5865
|
+
)
|
|
5866
|
+
if _default_content_type is not None:
|
|
5867
|
+
_header_params['Content-Type'] = _default_content_type
|
|
5267
5868
|
|
|
5268
5869
|
# authentication setting
|
|
5269
5870
|
_auth_settings: List[str] = [
|
|
5270
|
-
'apiKey'
|
|
5271
|
-
'accessToken'
|
|
5871
|
+
'apiKey'
|
|
5272
5872
|
]
|
|
5273
5873
|
|
|
5274
5874
|
return self.api_client.param_serialize(
|
|
5275
|
-
method='
|
|
5276
|
-
resource_path='/core/virtual-machines/{
|
|
5875
|
+
method='PUT',
|
|
5876
|
+
resource_path='/core/virtual-machines/{vm_id}/label',
|
|
5277
5877
|
path_params=_path_params,
|
|
5278
5878
|
query_params=_query_params,
|
|
5279
5879
|
header_params=_header_params,
|