hyperstack 1.45.2a0__py3-none-any.whl → 1.46.1a0__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.
Files changed (41) hide show
  1. hyperstack/__init__.py +2 -1
  2. hyperstack/api/__init__.py +1 -0
  3. hyperstack/api/alive_api.py +10 -10
  4. hyperstack/api/api_key_api.py +7 -7
  5. hyperstack/api/auth_api.py +69 -69
  6. hyperstack/api/beta_access_api.py +50 -50
  7. hyperstack/api/billing_api.py +1659 -1659
  8. hyperstack/api/calculate_api.py +7 -7
  9. hyperstack/api/callbacks_api.py +21 -21
  10. hyperstack/api/cluster_events_api.py +7 -7
  11. hyperstack/api/clusters_api.py +445 -445
  12. hyperstack/api/compliance_api.py +21 -21
  13. hyperstack/api/credit_api.py +7 -7
  14. hyperstack/api/customer_contract_api.py +139 -139
  15. hyperstack/api/dashboard_api.py +7 -7
  16. hyperstack/api/deployment_api.py +7 -7
  17. hyperstack/api/environment_api.py +107 -107
  18. hyperstack/api/fip_exclusions_api.py +313 -0
  19. hyperstack/api/firewall_attachment_api.py +7 -7
  20. hyperstack/api/firewalls_api.py +145 -145
  21. hyperstack/api/floating_ip_api.py +14 -14
  22. hyperstack/api/image_api.py +14 -14
  23. hyperstack/api/payment_api.py +102 -102
  24. hyperstack/api/profile_api.py +56 -56
  25. hyperstack/api/snapshot_events_api.py +7 -7
  26. hyperstack/api/snapshots_api.py +167 -167
  27. hyperstack/api/stock_api.py +7 -7
  28. hyperstack/api/template_api.py +76 -76
  29. hyperstack/api/user_api.py +76 -76
  30. hyperstack/api/user_detail_choice_api.py +10 -10
  31. hyperstack/api/virtual_machine_api.py +799 -782
  32. hyperstack/api/virtual_machine_events_api.py +7 -7
  33. hyperstack/api/vnc_url_api.py +53 -53
  34. hyperstack/api/volume_api.py +77 -77
  35. hyperstack/api/volume_attachment_api.py +21 -21
  36. hyperstack/api_client.py +1 -1
  37. hyperstack/configuration.py +1 -1
  38. {hyperstack-1.45.2a0.dist-info → hyperstack-1.46.1a0.dist-info}/METADATA +1 -1
  39. {hyperstack-1.45.2a0.dist-info → hyperstack-1.46.1a0.dist-info}/RECORD +41 -40
  40. {hyperstack-1.45.2a0.dist-info → hyperstack-1.46.1a0.dist-info}/WHEEL +0 -0
  41. {hyperstack-1.45.2a0.dist-info → hyperstack-1.46.1a0.dist-info}/top_level.txt +0 -0
@@ -57,10 +57,10 @@ class VirtualMachineApi:
57
57
 
58
58
 
59
59
  @validate_call
60
- def attach_firewalls_to_a_virtual_machine(
60
+ def add_vm_label(
61
61
  self,
62
62
  vm_id: StrictInt,
63
- payload: AttachFirewallsToVMPayload,
63
+ payload: EditLabelOfAnExistingVMPayload,
64
64
  _request_timeout: Union[
65
65
  None,
66
66
  Annotated[StrictFloat, Field(gt=0)],
@@ -74,14 +74,14 @@ class VirtualMachineApi:
74
74
  _headers: Optional[Dict[StrictStr, Any]] = None,
75
75
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
76
76
  ) -> ResponseModel:
77
- """Attach firewalls to a virtual machine
77
+ """Edit virtual machine labels
78
78
 
79
- 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.
79
+ 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.
80
80
 
81
81
  :param vm_id: (required)
82
82
  :type vm_id: int
83
83
  :param payload: (required)
84
- :type payload: AttachFirewallsToVMPayload
84
+ :type payload: EditLabelOfAnExistingVMPayload
85
85
  :param _request_timeout: timeout setting for this request. If one
86
86
  number provided, it will be total request
87
87
  timeout. It can also be a pair (tuple) of
@@ -104,7 +104,7 @@ class VirtualMachineApi:
104
104
  :return: Returns the result object.
105
105
  """ # noqa: E501
106
106
 
107
- _param = self._attach_firewalls_to_a_virtual_machine_serialize(
107
+ _param = self._add_vm_label_serialize(
108
108
  vm_id=vm_id,
109
109
  payload=payload,
110
110
  _request_auth=_request_auth,
@@ -118,6 +118,7 @@ class VirtualMachineApi:
118
118
  '400': "ErrorResponseModel",
119
119
  '401': "ErrorResponseModel",
120
120
  '404': "ErrorResponseModel",
121
+ '409': "ErrorResponseModel",
121
122
  '500': None,
122
123
  }
123
124
  response_data = self.api_client.call_api(
@@ -132,10 +133,10 @@ class VirtualMachineApi:
132
133
 
133
134
 
134
135
  @validate_call
135
- def attach_firewalls_to_a_virtual_machine_with_http_info(
136
+ def add_vm_label_with_http_info(
136
137
  self,
137
138
  vm_id: StrictInt,
138
- payload: AttachFirewallsToVMPayload,
139
+ payload: EditLabelOfAnExistingVMPayload,
139
140
  _request_timeout: Union[
140
141
  None,
141
142
  Annotated[StrictFloat, Field(gt=0)],
@@ -149,14 +150,14 @@ class VirtualMachineApi:
149
150
  _headers: Optional[Dict[StrictStr, Any]] = None,
150
151
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
151
152
  ) -> ApiResponse[ResponseModel]:
152
- """Attach firewalls to a virtual machine
153
+ """Edit virtual machine labels
153
154
 
154
- 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.
155
+ 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.
155
156
 
156
157
  :param vm_id: (required)
157
158
  :type vm_id: int
158
159
  :param payload: (required)
159
- :type payload: AttachFirewallsToVMPayload
160
+ :type payload: EditLabelOfAnExistingVMPayload
160
161
  :param _request_timeout: timeout setting for this request. If one
161
162
  number provided, it will be total request
162
163
  timeout. It can also be a pair (tuple) of
@@ -179,7 +180,7 @@ class VirtualMachineApi:
179
180
  :return: Returns the result object.
180
181
  """ # noqa: E501
181
182
 
182
- _param = self._attach_firewalls_to_a_virtual_machine_serialize(
183
+ _param = self._add_vm_label_serialize(
183
184
  vm_id=vm_id,
184
185
  payload=payload,
185
186
  _request_auth=_request_auth,
@@ -193,6 +194,7 @@ class VirtualMachineApi:
193
194
  '400': "ErrorResponseModel",
194
195
  '401': "ErrorResponseModel",
195
196
  '404': "ErrorResponseModel",
197
+ '409': "ErrorResponseModel",
196
198
  '500': None,
197
199
  }
198
200
  response_data = self.api_client.call_api(
@@ -207,10 +209,10 @@ class VirtualMachineApi:
207
209
 
208
210
 
209
211
  @validate_call
210
- def attach_firewalls_to_a_virtual_machine_without_preload_content(
212
+ def add_vm_label_without_preload_content(
211
213
  self,
212
214
  vm_id: StrictInt,
213
- payload: AttachFirewallsToVMPayload,
215
+ payload: EditLabelOfAnExistingVMPayload,
214
216
  _request_timeout: Union[
215
217
  None,
216
218
  Annotated[StrictFloat, Field(gt=0)],
@@ -224,14 +226,14 @@ class VirtualMachineApi:
224
226
  _headers: Optional[Dict[StrictStr, Any]] = None,
225
227
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
226
228
  ) -> RESTResponseType:
227
- """Attach firewalls to a virtual machine
229
+ """Edit virtual machine labels
228
230
 
229
- 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.
231
+ 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.
230
232
 
231
233
  :param vm_id: (required)
232
234
  :type vm_id: int
233
235
  :param payload: (required)
234
- :type payload: AttachFirewallsToVMPayload
236
+ :type payload: EditLabelOfAnExistingVMPayload
235
237
  :param _request_timeout: timeout setting for this request. If one
236
238
  number provided, it will be total request
237
239
  timeout. It can also be a pair (tuple) of
@@ -254,7 +256,7 @@ class VirtualMachineApi:
254
256
  :return: Returns the result object.
255
257
  """ # noqa: E501
256
258
 
257
- _param = self._attach_firewalls_to_a_virtual_machine_serialize(
259
+ _param = self._add_vm_label_serialize(
258
260
  vm_id=vm_id,
259
261
  payload=payload,
260
262
  _request_auth=_request_auth,
@@ -268,6 +270,7 @@ class VirtualMachineApi:
268
270
  '400': "ErrorResponseModel",
269
271
  '401': "ErrorResponseModel",
270
272
  '404': "ErrorResponseModel",
273
+ '409': "ErrorResponseModel",
271
274
  '500': None,
272
275
  }
273
276
  response_data = self.api_client.call_api(
@@ -277,7 +280,7 @@ class VirtualMachineApi:
277
280
  return response_data.response
278
281
 
279
282
 
280
- def _attach_firewalls_to_a_virtual_machine_serialize(
283
+ def _add_vm_label_serialize(
281
284
  self,
282
285
  vm_id,
283
286
  payload,
@@ -340,8 +343,8 @@ class VirtualMachineApi:
340
343
  ]
341
344
 
342
345
  return self.api_client.param_serialize(
343
- method='POST',
344
- resource_path='/core/virtual-machines/{vm_id}/attach-firewalls',
346
+ method='PUT',
347
+ resource_path='/core/virtual-machines/{vm_id}/label',
345
348
  path_params=_path_params,
346
349
  query_params=_query_params,
347
350
  header_params=_header_params,
@@ -358,9 +361,10 @@ class VirtualMachineApi:
358
361
 
359
362
 
360
363
  @validate_call
361
- def create_one_or_more_virtual_machines(
364
+ def attach_firewalls_to_vm(
362
365
  self,
363
- payload: CreateInstancesPayload,
366
+ vm_id: StrictInt,
367
+ payload: AttachFirewallsToVMPayload,
364
368
  _request_timeout: Union[
365
369
  None,
366
370
  Annotated[StrictFloat, Field(gt=0)],
@@ -373,13 +377,15 @@ class VirtualMachineApi:
373
377
  _content_type: Optional[StrictStr] = None,
374
378
  _headers: Optional[Dict[StrictStr, Any]] = None,
375
379
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
376
- ) -> CreateInstancesResponse:
377
- """Create virtual machines
380
+ ) -> ResponseModel:
381
+ """Attach firewalls to a virtual machine
378
382
 
379
- 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).
383
+ 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.
380
384
 
385
+ :param vm_id: (required)
386
+ :type vm_id: int
381
387
  :param payload: (required)
382
- :type payload: CreateInstancesPayload
388
+ :type payload: AttachFirewallsToVMPayload
383
389
  :param _request_timeout: timeout setting for this request. If one
384
390
  number provided, it will be total request
385
391
  timeout. It can also be a pair (tuple) of
@@ -402,7 +408,8 @@ class VirtualMachineApi:
402
408
  :return: Returns the result object.
403
409
  """ # noqa: E501
404
410
 
405
- _param = self._create_one_or_more_virtual_machines_serialize(
411
+ _param = self._attach_firewalls_to_vm_serialize(
412
+ vm_id=vm_id,
406
413
  payload=payload,
407
414
  _request_auth=_request_auth,
408
415
  _content_type=_content_type,
@@ -411,12 +418,10 @@ class VirtualMachineApi:
411
418
  )
412
419
 
413
420
  _response_types_map: Dict[str, Optional[str]] = {
414
- '200': "CreateInstancesResponse",
421
+ '200': "ResponseModel",
415
422
  '400': "ErrorResponseModel",
416
423
  '401': "ErrorResponseModel",
417
424
  '404': "ErrorResponseModel",
418
- '405': "ErrorResponseModel",
419
- '409': "ErrorResponseModel",
420
425
  '500': None,
421
426
  }
422
427
  response_data = self.api_client.call_api(
@@ -431,9 +436,10 @@ class VirtualMachineApi:
431
436
 
432
437
 
433
438
  @validate_call
434
- def create_one_or_more_virtual_machines_with_http_info(
439
+ def attach_firewalls_to_vm_with_http_info(
435
440
  self,
436
- payload: CreateInstancesPayload,
441
+ vm_id: StrictInt,
442
+ payload: AttachFirewallsToVMPayload,
437
443
  _request_timeout: Union[
438
444
  None,
439
445
  Annotated[StrictFloat, Field(gt=0)],
@@ -446,13 +452,15 @@ class VirtualMachineApi:
446
452
  _content_type: Optional[StrictStr] = None,
447
453
  _headers: Optional[Dict[StrictStr, Any]] = None,
448
454
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
449
- ) -> ApiResponse[CreateInstancesResponse]:
450
- """Create virtual machines
455
+ ) -> ApiResponse[ResponseModel]:
456
+ """Attach firewalls to a virtual machine
451
457
 
452
- 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).
458
+ 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.
453
459
 
460
+ :param vm_id: (required)
461
+ :type vm_id: int
454
462
  :param payload: (required)
455
- :type payload: CreateInstancesPayload
463
+ :type payload: AttachFirewallsToVMPayload
456
464
  :param _request_timeout: timeout setting for this request. If one
457
465
  number provided, it will be total request
458
466
  timeout. It can also be a pair (tuple) of
@@ -475,7 +483,8 @@ class VirtualMachineApi:
475
483
  :return: Returns the result object.
476
484
  """ # noqa: E501
477
485
 
478
- _param = self._create_one_or_more_virtual_machines_serialize(
486
+ _param = self._attach_firewalls_to_vm_serialize(
487
+ vm_id=vm_id,
479
488
  payload=payload,
480
489
  _request_auth=_request_auth,
481
490
  _content_type=_content_type,
@@ -484,12 +493,10 @@ class VirtualMachineApi:
484
493
  )
485
494
 
486
495
  _response_types_map: Dict[str, Optional[str]] = {
487
- '200': "CreateInstancesResponse",
496
+ '200': "ResponseModel",
488
497
  '400': "ErrorResponseModel",
489
498
  '401': "ErrorResponseModel",
490
499
  '404': "ErrorResponseModel",
491
- '405': "ErrorResponseModel",
492
- '409': "ErrorResponseModel",
493
500
  '500': None,
494
501
  }
495
502
  response_data = self.api_client.call_api(
@@ -504,9 +511,10 @@ class VirtualMachineApi:
504
511
 
505
512
 
506
513
  @validate_call
507
- def create_one_or_more_virtual_machines_without_preload_content(
514
+ def attach_firewalls_to_vm_without_preload_content(
508
515
  self,
509
- payload: CreateInstancesPayload,
516
+ vm_id: StrictInt,
517
+ payload: AttachFirewallsToVMPayload,
510
518
  _request_timeout: Union[
511
519
  None,
512
520
  Annotated[StrictFloat, Field(gt=0)],
@@ -520,12 +528,14 @@ class VirtualMachineApi:
520
528
  _headers: Optional[Dict[StrictStr, Any]] = None,
521
529
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
522
530
  ) -> RESTResponseType:
523
- """Create virtual machines
531
+ """Attach firewalls to a virtual machine
524
532
 
525
- 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).
533
+ 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.
526
534
 
535
+ :param vm_id: (required)
536
+ :type vm_id: int
527
537
  :param payload: (required)
528
- :type payload: CreateInstancesPayload
538
+ :type payload: AttachFirewallsToVMPayload
529
539
  :param _request_timeout: timeout setting for this request. If one
530
540
  number provided, it will be total request
531
541
  timeout. It can also be a pair (tuple) of
@@ -548,7 +558,8 @@ class VirtualMachineApi:
548
558
  :return: Returns the result object.
549
559
  """ # noqa: E501
550
560
 
551
- _param = self._create_one_or_more_virtual_machines_serialize(
561
+ _param = self._attach_firewalls_to_vm_serialize(
562
+ vm_id=vm_id,
552
563
  payload=payload,
553
564
  _request_auth=_request_auth,
554
565
  _content_type=_content_type,
@@ -557,12 +568,10 @@ class VirtualMachineApi:
557
568
  )
558
569
 
559
570
  _response_types_map: Dict[str, Optional[str]] = {
560
- '200': "CreateInstancesResponse",
571
+ '200': "ResponseModel",
561
572
  '400': "ErrorResponseModel",
562
573
  '401': "ErrorResponseModel",
563
574
  '404': "ErrorResponseModel",
564
- '405': "ErrorResponseModel",
565
- '409': "ErrorResponseModel",
566
575
  '500': None,
567
576
  }
568
577
  response_data = self.api_client.call_api(
@@ -572,8 +581,9 @@ class VirtualMachineApi:
572
581
  return response_data.response
573
582
 
574
583
 
575
- def _create_one_or_more_virtual_machines_serialize(
584
+ def _attach_firewalls_to_vm_serialize(
576
585
  self,
586
+ vm_id,
577
587
  payload,
578
588
  _request_auth,
579
589
  _content_type,
@@ -596,6 +606,8 @@ class VirtualMachineApi:
596
606
  _body_params: Optional[bytes] = None
597
607
 
598
608
  # process the path parameters
609
+ if vm_id is not None:
610
+ _path_params['vm_id'] = vm_id
599
611
  # process the query parameters
600
612
  # process the header parameters
601
613
  # process the form parameters
@@ -633,7 +645,7 @@ class VirtualMachineApi:
633
645
 
634
646
  return self.api_client.param_serialize(
635
647
  method='POST',
636
- resource_path='/core/virtual-machines',
648
+ resource_path='/core/virtual-machines/{vm_id}/attach-firewalls',
637
649
  path_params=_path_params,
638
650
  query_params=_query_params,
639
651
  header_params=_header_params,
@@ -650,10 +662,9 @@ class VirtualMachineApi:
650
662
 
651
663
 
652
664
  @validate_call
653
- def delete_security_rule(
665
+ def check_vm_name_availability(
654
666
  self,
655
- vm_id: StrictInt,
656
- sg_rule_id: StrictInt,
667
+ name: StrictStr,
657
668
  _request_timeout: Union[
658
669
  None,
659
670
  Annotated[StrictFloat, Field(gt=0)],
@@ -666,15 +677,13 @@ class VirtualMachineApi:
666
677
  _content_type: Optional[StrictStr] = None,
667
678
  _headers: Optional[Dict[StrictStr, Any]] = None,
668
679
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
669
- ) -> ResponseModel:
670
- """Delete firewall rule from virtual machine
680
+ ) -> NameAvailableModel:
681
+ """Fetch virtual machine name availability
671
682
 
672
- 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.
683
+ Check if a Virtual Machine name is available
673
684
 
674
- :param vm_id: (required)
675
- :type vm_id: int
676
- :param sg_rule_id: (required)
677
- :type sg_rule_id: int
685
+ :param name: (required)
686
+ :type name: str
678
687
  :param _request_timeout: timeout setting for this request. If one
679
688
  number provided, it will be total request
680
689
  timeout. It can also be a pair (tuple) of
@@ -697,9 +706,8 @@ class VirtualMachineApi:
697
706
  :return: Returns the result object.
698
707
  """ # noqa: E501
699
708
 
700
- _param = self._delete_security_rule_serialize(
701
- vm_id=vm_id,
702
- sg_rule_id=sg_rule_id,
709
+ _param = self._check_vm_name_availability_serialize(
710
+ name=name,
703
711
  _request_auth=_request_auth,
704
712
  _content_type=_content_type,
705
713
  _headers=_headers,
@@ -707,7 +715,7 @@ class VirtualMachineApi:
707
715
  )
708
716
 
709
717
  _response_types_map: Dict[str, Optional[str]] = {
710
- '200': "ResponseModel",
718
+ '200': "NameAvailableModel",
711
719
  '400': "ErrorResponseModel",
712
720
  '401': "ErrorResponseModel",
713
721
  '404': "ErrorResponseModel",
@@ -725,10 +733,9 @@ class VirtualMachineApi:
725
733
 
726
734
 
727
735
  @validate_call
728
- def delete_security_rule_with_http_info(
736
+ def check_vm_name_availability_with_http_info(
729
737
  self,
730
- vm_id: StrictInt,
731
- sg_rule_id: StrictInt,
738
+ name: StrictStr,
732
739
  _request_timeout: Union[
733
740
  None,
734
741
  Annotated[StrictFloat, Field(gt=0)],
@@ -741,15 +748,13 @@ class VirtualMachineApi:
741
748
  _content_type: Optional[StrictStr] = None,
742
749
  _headers: Optional[Dict[StrictStr, Any]] = None,
743
750
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
744
- ) -> ApiResponse[ResponseModel]:
745
- """Delete firewall rule from virtual machine
751
+ ) -> ApiResponse[NameAvailableModel]:
752
+ """Fetch virtual machine name availability
746
753
 
747
- 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.
754
+ Check if a Virtual Machine name is available
748
755
 
749
- :param vm_id: (required)
750
- :type vm_id: int
751
- :param sg_rule_id: (required)
752
- :type sg_rule_id: int
756
+ :param name: (required)
757
+ :type name: str
753
758
  :param _request_timeout: timeout setting for this request. If one
754
759
  number provided, it will be total request
755
760
  timeout. It can also be a pair (tuple) of
@@ -772,9 +777,8 @@ class VirtualMachineApi:
772
777
  :return: Returns the result object.
773
778
  """ # noqa: E501
774
779
 
775
- _param = self._delete_security_rule_serialize(
776
- vm_id=vm_id,
777
- sg_rule_id=sg_rule_id,
780
+ _param = self._check_vm_name_availability_serialize(
781
+ name=name,
778
782
  _request_auth=_request_auth,
779
783
  _content_type=_content_type,
780
784
  _headers=_headers,
@@ -782,7 +786,7 @@ class VirtualMachineApi:
782
786
  )
783
787
 
784
788
  _response_types_map: Dict[str, Optional[str]] = {
785
- '200': "ResponseModel",
789
+ '200': "NameAvailableModel",
786
790
  '400': "ErrorResponseModel",
787
791
  '401': "ErrorResponseModel",
788
792
  '404': "ErrorResponseModel",
@@ -800,10 +804,9 @@ class VirtualMachineApi:
800
804
 
801
805
 
802
806
  @validate_call
803
- def delete_security_rule_without_preload_content(
807
+ def check_vm_name_availability_without_preload_content(
804
808
  self,
805
- vm_id: StrictInt,
806
- sg_rule_id: StrictInt,
809
+ name: StrictStr,
807
810
  _request_timeout: Union[
808
811
  None,
809
812
  Annotated[StrictFloat, Field(gt=0)],
@@ -817,14 +820,12 @@ class VirtualMachineApi:
817
820
  _headers: Optional[Dict[StrictStr, Any]] = None,
818
821
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
819
822
  ) -> RESTResponseType:
820
- """Delete firewall rule from virtual machine
823
+ """Fetch virtual machine name availability
821
824
 
822
- 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.
825
+ Check if a Virtual Machine name is available
823
826
 
824
- :param vm_id: (required)
825
- :type vm_id: int
826
- :param sg_rule_id: (required)
827
- :type sg_rule_id: int
827
+ :param name: (required)
828
+ :type name: str
828
829
  :param _request_timeout: timeout setting for this request. If one
829
830
  number provided, it will be total request
830
831
  timeout. It can also be a pair (tuple) of
@@ -847,9 +848,8 @@ class VirtualMachineApi:
847
848
  :return: Returns the result object.
848
849
  """ # noqa: E501
849
850
 
850
- _param = self._delete_security_rule_serialize(
851
- vm_id=vm_id,
852
- sg_rule_id=sg_rule_id,
851
+ _param = self._check_vm_name_availability_serialize(
852
+ name=name,
853
853
  _request_auth=_request_auth,
854
854
  _content_type=_content_type,
855
855
  _headers=_headers,
@@ -857,7 +857,7 @@ class VirtualMachineApi:
857
857
  )
858
858
 
859
859
  _response_types_map: Dict[str, Optional[str]] = {
860
- '200': "ResponseModel",
860
+ '200': "NameAvailableModel",
861
861
  '400': "ErrorResponseModel",
862
862
  '401': "ErrorResponseModel",
863
863
  '404': "ErrorResponseModel",
@@ -870,10 +870,9 @@ class VirtualMachineApi:
870
870
  return response_data.response
871
871
 
872
872
 
873
- def _delete_security_rule_serialize(
873
+ def _check_vm_name_availability_serialize(
874
874
  self,
875
- vm_id,
876
- sg_rule_id,
875
+ name,
877
876
  _request_auth,
878
877
  _content_type,
879
878
  _headers,
@@ -895,10 +894,8 @@ class VirtualMachineApi:
895
894
  _body_params: Optional[bytes] = None
896
895
 
897
896
  # process the path parameters
898
- if vm_id is not None:
899
- _path_params['vm_id'] = vm_id
900
- if sg_rule_id is not None:
901
- _path_params['sg_rule_id'] = sg_rule_id
897
+ if name is not None:
898
+ _path_params['name'] = name
902
899
  # process the query parameters
903
900
  # process the header parameters
904
901
  # process the form parameters
@@ -920,8 +917,8 @@ class VirtualMachineApi:
920
917
  ]
921
918
 
922
919
  return self.api_client.param_serialize(
923
- method='DELETE',
924
- resource_path='/core/virtual-machines/{vm_id}/sg-rules/{sg_rule_id}',
920
+ method='GET',
921
+ resource_path='/core/virtual-machines/name-availability/{name}',
925
922
  path_params=_path_params,
926
923
  query_params=_query_params,
927
924
  header_params=_header_params,
@@ -938,9 +935,10 @@ class VirtualMachineApi:
938
935
 
939
936
 
940
937
  @validate_call
941
- def delete_virtual_machine(
938
+ def create_firewall_rule_for_vm(
942
939
  self,
943
940
  vm_id: StrictInt,
941
+ payload: CreateSecurityRulePayload,
944
942
  _request_timeout: Union[
945
943
  None,
946
944
  Annotated[StrictFloat, Field(gt=0)],
@@ -953,13 +951,15 @@ class VirtualMachineApi:
953
951
  _content_type: Optional[StrictStr] = None,
954
952
  _headers: Optional[Dict[StrictStr, Any]] = None,
955
953
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
956
- ) -> ResponseModel:
957
- """Delete virtual machine
954
+ ) -> SecurityGroupRule:
955
+ """Add firewall rule to virtual machine
958
956
 
959
- Permanently deletes a virtual machine. Provide the virtual machine ID in the path to delete the specified virtual machine.
957
+ 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).
960
958
 
961
959
  :param vm_id: (required)
962
960
  :type vm_id: int
961
+ :param payload: (required)
962
+ :type payload: CreateSecurityRulePayload
963
963
  :param _request_timeout: timeout setting for this request. If one
964
964
  number provided, it will be total request
965
965
  timeout. It can also be a pair (tuple) of
@@ -982,8 +982,9 @@ class VirtualMachineApi:
982
982
  :return: Returns the result object.
983
983
  """ # noqa: E501
984
984
 
985
- _param = self._delete_virtual_machine_serialize(
985
+ _param = self._create_firewall_rule_for_vm_serialize(
986
986
  vm_id=vm_id,
987
+ payload=payload,
987
988
  _request_auth=_request_auth,
988
989
  _content_type=_content_type,
989
990
  _headers=_headers,
@@ -991,7 +992,7 @@ class VirtualMachineApi:
991
992
  )
992
993
 
993
994
  _response_types_map: Dict[str, Optional[str]] = {
994
- '200': "ResponseModel",
995
+ '200': "SecurityGroupRule",
995
996
  '400': "ErrorResponseModel",
996
997
  '401': "ErrorResponseModel",
997
998
  '404': "ErrorResponseModel",
@@ -1010,9 +1011,10 @@ class VirtualMachineApi:
1010
1011
 
1011
1012
 
1012
1013
  @validate_call
1013
- def delete_virtual_machine_with_http_info(
1014
+ def create_firewall_rule_for_vm_with_http_info(
1014
1015
  self,
1015
1016
  vm_id: StrictInt,
1017
+ payload: CreateSecurityRulePayload,
1016
1018
  _request_timeout: Union[
1017
1019
  None,
1018
1020
  Annotated[StrictFloat, Field(gt=0)],
@@ -1025,13 +1027,15 @@ class VirtualMachineApi:
1025
1027
  _content_type: Optional[StrictStr] = None,
1026
1028
  _headers: Optional[Dict[StrictStr, Any]] = None,
1027
1029
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1028
- ) -> ApiResponse[ResponseModel]:
1029
- """Delete virtual machine
1030
+ ) -> ApiResponse[SecurityGroupRule]:
1031
+ """Add firewall rule to virtual machine
1030
1032
 
1031
- Permanently deletes a virtual machine. Provide the virtual machine ID in the path to delete the specified virtual machine.
1033
+ 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).
1032
1034
 
1033
1035
  :param vm_id: (required)
1034
1036
  :type vm_id: int
1037
+ :param payload: (required)
1038
+ :type payload: CreateSecurityRulePayload
1035
1039
  :param _request_timeout: timeout setting for this request. If one
1036
1040
  number provided, it will be total request
1037
1041
  timeout. It can also be a pair (tuple) of
@@ -1054,8 +1058,9 @@ class VirtualMachineApi:
1054
1058
  :return: Returns the result object.
1055
1059
  """ # noqa: E501
1056
1060
 
1057
- _param = self._delete_virtual_machine_serialize(
1061
+ _param = self._create_firewall_rule_for_vm_serialize(
1058
1062
  vm_id=vm_id,
1063
+ payload=payload,
1059
1064
  _request_auth=_request_auth,
1060
1065
  _content_type=_content_type,
1061
1066
  _headers=_headers,
@@ -1063,7 +1068,7 @@ class VirtualMachineApi:
1063
1068
  )
1064
1069
 
1065
1070
  _response_types_map: Dict[str, Optional[str]] = {
1066
- '200': "ResponseModel",
1071
+ '200': "SecurityGroupRule",
1067
1072
  '400': "ErrorResponseModel",
1068
1073
  '401': "ErrorResponseModel",
1069
1074
  '404': "ErrorResponseModel",
@@ -1082,9 +1087,10 @@ class VirtualMachineApi:
1082
1087
 
1083
1088
 
1084
1089
  @validate_call
1085
- def delete_virtual_machine_without_preload_content(
1090
+ def create_firewall_rule_for_vm_without_preload_content(
1086
1091
  self,
1087
1092
  vm_id: StrictInt,
1093
+ payload: CreateSecurityRulePayload,
1088
1094
  _request_timeout: Union[
1089
1095
  None,
1090
1096
  Annotated[StrictFloat, Field(gt=0)],
@@ -1098,12 +1104,14 @@ class VirtualMachineApi:
1098
1104
  _headers: Optional[Dict[StrictStr, Any]] = None,
1099
1105
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1100
1106
  ) -> RESTResponseType:
1101
- """Delete virtual machine
1107
+ """Add firewall rule to virtual machine
1102
1108
 
1103
- Permanently deletes a virtual machine. Provide the virtual machine ID in the path to delete the specified virtual machine.
1109
+ 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).
1104
1110
 
1105
1111
  :param vm_id: (required)
1106
1112
  :type vm_id: int
1113
+ :param payload: (required)
1114
+ :type payload: CreateSecurityRulePayload
1107
1115
  :param _request_timeout: timeout setting for this request. If one
1108
1116
  number provided, it will be total request
1109
1117
  timeout. It can also be a pair (tuple) of
@@ -1126,8 +1134,9 @@ class VirtualMachineApi:
1126
1134
  :return: Returns the result object.
1127
1135
  """ # noqa: E501
1128
1136
 
1129
- _param = self._delete_virtual_machine_serialize(
1137
+ _param = self._create_firewall_rule_for_vm_serialize(
1130
1138
  vm_id=vm_id,
1139
+ payload=payload,
1131
1140
  _request_auth=_request_auth,
1132
1141
  _content_type=_content_type,
1133
1142
  _headers=_headers,
@@ -1135,7 +1144,7 @@ class VirtualMachineApi:
1135
1144
  )
1136
1145
 
1137
1146
  _response_types_map: Dict[str, Optional[str]] = {
1138
- '200': "ResponseModel",
1147
+ '200': "SecurityGroupRule",
1139
1148
  '400': "ErrorResponseModel",
1140
1149
  '401': "ErrorResponseModel",
1141
1150
  '404': "ErrorResponseModel",
@@ -1149,9 +1158,10 @@ class VirtualMachineApi:
1149
1158
  return response_data.response
1150
1159
 
1151
1160
 
1152
- def _delete_virtual_machine_serialize(
1161
+ def _create_firewall_rule_for_vm_serialize(
1153
1162
  self,
1154
1163
  vm_id,
1164
+ payload,
1155
1165
  _request_auth,
1156
1166
  _content_type,
1157
1167
  _headers,
@@ -1179,6 +1189,8 @@ class VirtualMachineApi:
1179
1189
  # process the header parameters
1180
1190
  # process the form parameters
1181
1191
  # process the body parameter
1192
+ if payload is not None:
1193
+ _body_params = payload
1182
1194
 
1183
1195
 
1184
1196
  # set the HTTP header `Accept`
@@ -1189,6 +1201,19 @@ class VirtualMachineApi:
1189
1201
  ]
1190
1202
  )
1191
1203
 
1204
+ # set the HTTP header `Content-Type`
1205
+ if _content_type:
1206
+ _header_params['Content-Type'] = _content_type
1207
+ else:
1208
+ _default_content_type = (
1209
+ self.api_client.select_header_content_type(
1210
+ [
1211
+ 'application/json'
1212
+ ]
1213
+ )
1214
+ )
1215
+ if _default_content_type is not None:
1216
+ _header_params['Content-Type'] = _default_content_type
1192
1217
 
1193
1218
  # authentication setting
1194
1219
  _auth_settings: List[str] = [
@@ -1196,8 +1221,8 @@ class VirtualMachineApi:
1196
1221
  ]
1197
1222
 
1198
1223
  return self.api_client.param_serialize(
1199
- method='DELETE',
1200
- resource_path='/core/virtual-machines/{vm_id}',
1224
+ method='POST',
1225
+ resource_path='/core/virtual-machines/{vm_id}/sg-rules',
1201
1226
  path_params=_path_params,
1202
1227
  query_params=_query_params,
1203
1228
  header_params=_header_params,
@@ -1214,9 +1239,10 @@ class VirtualMachineApi:
1214
1239
 
1215
1240
 
1216
1241
  @validate_call
1217
- def fetch_virtual_machine_name_availability(
1242
+ def create_snapshot_for_vm(
1218
1243
  self,
1219
- name: StrictStr,
1244
+ vm_id: StrictInt,
1245
+ payload: CreateSnapshotPayload,
1220
1246
  _request_timeout: Union[
1221
1247
  None,
1222
1248
  Annotated[StrictFloat, Field(gt=0)],
@@ -1229,13 +1255,15 @@ class VirtualMachineApi:
1229
1255
  _content_type: Optional[StrictStr] = None,
1230
1256
  _headers: Optional[Dict[StrictStr, Any]] = None,
1231
1257
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1232
- ) -> NameAvailableModel:
1233
- """Fetch virtual machine name availability
1258
+ ) -> CreateSnapshotResponse:
1259
+ """Create snapshot from a virtual machine
1234
1260
 
1235
- Check if a Virtual Machine name is available
1261
+ Create snapshots of a virtual machine by providing the virtual machine ID in the path
1236
1262
 
1237
- :param name: (required)
1238
- :type name: str
1263
+ :param vm_id: (required)
1264
+ :type vm_id: int
1265
+ :param payload: (required)
1266
+ :type payload: CreateSnapshotPayload
1239
1267
  :param _request_timeout: timeout setting for this request. If one
1240
1268
  number provided, it will be total request
1241
1269
  timeout. It can also be a pair (tuple) of
@@ -1258,8 +1286,9 @@ class VirtualMachineApi:
1258
1286
  :return: Returns the result object.
1259
1287
  """ # noqa: E501
1260
1288
 
1261
- _param = self._fetch_virtual_machine_name_availability_serialize(
1262
- name=name,
1289
+ _param = self._create_snapshot_for_vm_serialize(
1290
+ vm_id=vm_id,
1291
+ payload=payload,
1263
1292
  _request_auth=_request_auth,
1264
1293
  _content_type=_content_type,
1265
1294
  _headers=_headers,
@@ -1267,7 +1296,7 @@ class VirtualMachineApi:
1267
1296
  )
1268
1297
 
1269
1298
  _response_types_map: Dict[str, Optional[str]] = {
1270
- '200': "NameAvailableModel",
1299
+ '201': "CreateSnapshotResponse",
1271
1300
  '400': "ErrorResponseModel",
1272
1301
  '401': "ErrorResponseModel",
1273
1302
  '404': "ErrorResponseModel",
@@ -1285,9 +1314,10 @@ class VirtualMachineApi:
1285
1314
 
1286
1315
 
1287
1316
  @validate_call
1288
- def fetch_virtual_machine_name_availability_with_http_info(
1317
+ def create_snapshot_for_vm_with_http_info(
1289
1318
  self,
1290
- name: StrictStr,
1319
+ vm_id: StrictInt,
1320
+ payload: CreateSnapshotPayload,
1291
1321
  _request_timeout: Union[
1292
1322
  None,
1293
1323
  Annotated[StrictFloat, Field(gt=0)],
@@ -1300,13 +1330,15 @@ class VirtualMachineApi:
1300
1330
  _content_type: Optional[StrictStr] = None,
1301
1331
  _headers: Optional[Dict[StrictStr, Any]] = None,
1302
1332
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1303
- ) -> ApiResponse[NameAvailableModel]:
1304
- """Fetch virtual machine name availability
1333
+ ) -> ApiResponse[CreateSnapshotResponse]:
1334
+ """Create snapshot from a virtual machine
1305
1335
 
1306
- Check if a Virtual Machine name is available
1336
+ Create snapshots of a virtual machine by providing the virtual machine ID in the path
1307
1337
 
1308
- :param name: (required)
1309
- :type name: str
1338
+ :param vm_id: (required)
1339
+ :type vm_id: int
1340
+ :param payload: (required)
1341
+ :type payload: CreateSnapshotPayload
1310
1342
  :param _request_timeout: timeout setting for this request. If one
1311
1343
  number provided, it will be total request
1312
1344
  timeout. It can also be a pair (tuple) of
@@ -1329,8 +1361,9 @@ class VirtualMachineApi:
1329
1361
  :return: Returns the result object.
1330
1362
  """ # noqa: E501
1331
1363
 
1332
- _param = self._fetch_virtual_machine_name_availability_serialize(
1333
- name=name,
1364
+ _param = self._create_snapshot_for_vm_serialize(
1365
+ vm_id=vm_id,
1366
+ payload=payload,
1334
1367
  _request_auth=_request_auth,
1335
1368
  _content_type=_content_type,
1336
1369
  _headers=_headers,
@@ -1338,7 +1371,7 @@ class VirtualMachineApi:
1338
1371
  )
1339
1372
 
1340
1373
  _response_types_map: Dict[str, Optional[str]] = {
1341
- '200': "NameAvailableModel",
1374
+ '201': "CreateSnapshotResponse",
1342
1375
  '400': "ErrorResponseModel",
1343
1376
  '401': "ErrorResponseModel",
1344
1377
  '404': "ErrorResponseModel",
@@ -1356,9 +1389,10 @@ class VirtualMachineApi:
1356
1389
 
1357
1390
 
1358
1391
  @validate_call
1359
- def fetch_virtual_machine_name_availability_without_preload_content(
1392
+ def create_snapshot_for_vm_without_preload_content(
1360
1393
  self,
1361
- name: StrictStr,
1394
+ vm_id: StrictInt,
1395
+ payload: CreateSnapshotPayload,
1362
1396
  _request_timeout: Union[
1363
1397
  None,
1364
1398
  Annotated[StrictFloat, Field(gt=0)],
@@ -1372,12 +1406,14 @@ class VirtualMachineApi:
1372
1406
  _headers: Optional[Dict[StrictStr, Any]] = None,
1373
1407
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1374
1408
  ) -> RESTResponseType:
1375
- """Fetch virtual machine name availability
1409
+ """Create snapshot from a virtual machine
1376
1410
 
1377
- Check if a Virtual Machine name is available
1411
+ Create snapshots of a virtual machine by providing the virtual machine ID in the path
1378
1412
 
1379
- :param name: (required)
1380
- :type name: str
1413
+ :param vm_id: (required)
1414
+ :type vm_id: int
1415
+ :param payload: (required)
1416
+ :type payload: CreateSnapshotPayload
1381
1417
  :param _request_timeout: timeout setting for this request. If one
1382
1418
  number provided, it will be total request
1383
1419
  timeout. It can also be a pair (tuple) of
@@ -1400,8 +1436,9 @@ class VirtualMachineApi:
1400
1436
  :return: Returns the result object.
1401
1437
  """ # noqa: E501
1402
1438
 
1403
- _param = self._fetch_virtual_machine_name_availability_serialize(
1404
- name=name,
1439
+ _param = self._create_snapshot_for_vm_serialize(
1440
+ vm_id=vm_id,
1441
+ payload=payload,
1405
1442
  _request_auth=_request_auth,
1406
1443
  _content_type=_content_type,
1407
1444
  _headers=_headers,
@@ -1409,7 +1446,7 @@ class VirtualMachineApi:
1409
1446
  )
1410
1447
 
1411
1448
  _response_types_map: Dict[str, Optional[str]] = {
1412
- '200': "NameAvailableModel",
1449
+ '201': "CreateSnapshotResponse",
1413
1450
  '400': "ErrorResponseModel",
1414
1451
  '401': "ErrorResponseModel",
1415
1452
  '404': "ErrorResponseModel",
@@ -1422,9 +1459,10 @@ class VirtualMachineApi:
1422
1459
  return response_data.response
1423
1460
 
1424
1461
 
1425
- def _fetch_virtual_machine_name_availability_serialize(
1462
+ def _create_snapshot_for_vm_serialize(
1426
1463
  self,
1427
- name,
1464
+ vm_id,
1465
+ payload,
1428
1466
  _request_auth,
1429
1467
  _content_type,
1430
1468
  _headers,
@@ -1446,12 +1484,14 @@ class VirtualMachineApi:
1446
1484
  _body_params: Optional[bytes] = None
1447
1485
 
1448
1486
  # process the path parameters
1449
- if name is not None:
1450
- _path_params['name'] = name
1487
+ if vm_id is not None:
1488
+ _path_params['vm_id'] = vm_id
1451
1489
  # process the query parameters
1452
1490
  # process the header parameters
1453
1491
  # process the form parameters
1454
1492
  # process the body parameter
1493
+ if payload is not None:
1494
+ _body_params = payload
1455
1495
 
1456
1496
 
1457
1497
  # set the HTTP header `Accept`
@@ -1462,6 +1502,19 @@ class VirtualMachineApi:
1462
1502
  ]
1463
1503
  )
1464
1504
 
1505
+ # set the HTTP header `Content-Type`
1506
+ if _content_type:
1507
+ _header_params['Content-Type'] = _content_type
1508
+ else:
1509
+ _default_content_type = (
1510
+ self.api_client.select_header_content_type(
1511
+ [
1512
+ 'application/json'
1513
+ ]
1514
+ )
1515
+ )
1516
+ if _default_content_type is not None:
1517
+ _header_params['Content-Type'] = _default_content_type
1465
1518
 
1466
1519
  # authentication setting
1467
1520
  _auth_settings: List[str] = [
@@ -1469,8 +1522,8 @@ class VirtualMachineApi:
1469
1522
  ]
1470
1523
 
1471
1524
  return self.api_client.param_serialize(
1472
- method='GET',
1473
- resource_path='/core/virtual-machines/name-availability/{name}',
1525
+ method='POST',
1526
+ resource_path='/core/virtual-machines/{vm_id}/snapshots',
1474
1527
  path_params=_path_params,
1475
1528
  query_params=_query_params,
1476
1529
  header_params=_header_params,
@@ -1487,9 +1540,9 @@ class VirtualMachineApi:
1487
1540
 
1488
1541
 
1489
1542
  @validate_call
1490
- def get_instance_hard_reboot(
1543
+ def create_vms(
1491
1544
  self,
1492
- vm_id: StrictInt,
1545
+ payload: CreateInstancesPayload,
1493
1546
  _request_timeout: Union[
1494
1547
  None,
1495
1548
  Annotated[StrictFloat, Field(gt=0)],
@@ -1502,13 +1555,13 @@ class VirtualMachineApi:
1502
1555
  _content_type: Optional[StrictStr] = None,
1503
1556
  _headers: Optional[Dict[StrictStr, Any]] = None,
1504
1557
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1505
- ) -> ResponseModel:
1506
- """Hard reboot virtual machine
1558
+ ) -> CreateInstancesResponse:
1559
+ """Create virtual machines
1507
1560
 
1508
- 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.
1561
+ 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).
1509
1562
 
1510
- :param vm_id: (required)
1511
- :type vm_id: int
1563
+ :param payload: (required)
1564
+ :type payload: CreateInstancesPayload
1512
1565
  :param _request_timeout: timeout setting for this request. If one
1513
1566
  number provided, it will be total request
1514
1567
  timeout. It can also be a pair (tuple) of
@@ -1531,8 +1584,8 @@ class VirtualMachineApi:
1531
1584
  :return: Returns the result object.
1532
1585
  """ # noqa: E501
1533
1586
 
1534
- _param = self._get_instance_hard_reboot_serialize(
1535
- vm_id=vm_id,
1587
+ _param = self._create_vms_serialize(
1588
+ payload=payload,
1536
1589
  _request_auth=_request_auth,
1537
1590
  _content_type=_content_type,
1538
1591
  _headers=_headers,
@@ -1540,10 +1593,12 @@ class VirtualMachineApi:
1540
1593
  )
1541
1594
 
1542
1595
  _response_types_map: Dict[str, Optional[str]] = {
1543
- '200': "ResponseModel",
1596
+ '200': "CreateInstancesResponse",
1544
1597
  '400': "ErrorResponseModel",
1545
1598
  '401': "ErrorResponseModel",
1546
1599
  '404': "ErrorResponseModel",
1600
+ '405': "ErrorResponseModel",
1601
+ '409': "ErrorResponseModel",
1547
1602
  '500': None,
1548
1603
  }
1549
1604
  response_data = self.api_client.call_api(
@@ -1558,9 +1613,9 @@ class VirtualMachineApi:
1558
1613
 
1559
1614
 
1560
1615
  @validate_call
1561
- def get_instance_hard_reboot_with_http_info(
1616
+ def create_vms_with_http_info(
1562
1617
  self,
1563
- vm_id: StrictInt,
1618
+ payload: CreateInstancesPayload,
1564
1619
  _request_timeout: Union[
1565
1620
  None,
1566
1621
  Annotated[StrictFloat, Field(gt=0)],
@@ -1573,13 +1628,13 @@ class VirtualMachineApi:
1573
1628
  _content_type: Optional[StrictStr] = None,
1574
1629
  _headers: Optional[Dict[StrictStr, Any]] = None,
1575
1630
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1576
- ) -> ApiResponse[ResponseModel]:
1577
- """Hard reboot virtual machine
1631
+ ) -> ApiResponse[CreateInstancesResponse]:
1632
+ """Create virtual machines
1578
1633
 
1579
- 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.
1634
+ 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).
1580
1635
 
1581
- :param vm_id: (required)
1582
- :type vm_id: int
1636
+ :param payload: (required)
1637
+ :type payload: CreateInstancesPayload
1583
1638
  :param _request_timeout: timeout setting for this request. If one
1584
1639
  number provided, it will be total request
1585
1640
  timeout. It can also be a pair (tuple) of
@@ -1602,8 +1657,8 @@ class VirtualMachineApi:
1602
1657
  :return: Returns the result object.
1603
1658
  """ # noqa: E501
1604
1659
 
1605
- _param = self._get_instance_hard_reboot_serialize(
1606
- vm_id=vm_id,
1660
+ _param = self._create_vms_serialize(
1661
+ payload=payload,
1607
1662
  _request_auth=_request_auth,
1608
1663
  _content_type=_content_type,
1609
1664
  _headers=_headers,
@@ -1611,10 +1666,12 @@ class VirtualMachineApi:
1611
1666
  )
1612
1667
 
1613
1668
  _response_types_map: Dict[str, Optional[str]] = {
1614
- '200': "ResponseModel",
1669
+ '200': "CreateInstancesResponse",
1615
1670
  '400': "ErrorResponseModel",
1616
1671
  '401': "ErrorResponseModel",
1617
1672
  '404': "ErrorResponseModel",
1673
+ '405': "ErrorResponseModel",
1674
+ '409': "ErrorResponseModel",
1618
1675
  '500': None,
1619
1676
  }
1620
1677
  response_data = self.api_client.call_api(
@@ -1629,9 +1686,9 @@ class VirtualMachineApi:
1629
1686
 
1630
1687
 
1631
1688
  @validate_call
1632
- def get_instance_hard_reboot_without_preload_content(
1689
+ def create_vms_without_preload_content(
1633
1690
  self,
1634
- vm_id: StrictInt,
1691
+ payload: CreateInstancesPayload,
1635
1692
  _request_timeout: Union[
1636
1693
  None,
1637
1694
  Annotated[StrictFloat, Field(gt=0)],
@@ -1645,12 +1702,12 @@ class VirtualMachineApi:
1645
1702
  _headers: Optional[Dict[StrictStr, Any]] = None,
1646
1703
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1647
1704
  ) -> RESTResponseType:
1648
- """Hard reboot virtual machine
1705
+ """Create virtual machines
1649
1706
 
1650
- 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.
1707
+ 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).
1651
1708
 
1652
- :param vm_id: (required)
1653
- :type vm_id: int
1709
+ :param payload: (required)
1710
+ :type payload: CreateInstancesPayload
1654
1711
  :param _request_timeout: timeout setting for this request. If one
1655
1712
  number provided, it will be total request
1656
1713
  timeout. It can also be a pair (tuple) of
@@ -1673,8 +1730,8 @@ class VirtualMachineApi:
1673
1730
  :return: Returns the result object.
1674
1731
  """ # noqa: E501
1675
1732
 
1676
- _param = self._get_instance_hard_reboot_serialize(
1677
- vm_id=vm_id,
1733
+ _param = self._create_vms_serialize(
1734
+ payload=payload,
1678
1735
  _request_auth=_request_auth,
1679
1736
  _content_type=_content_type,
1680
1737
  _headers=_headers,
@@ -1682,10 +1739,12 @@ class VirtualMachineApi:
1682
1739
  )
1683
1740
 
1684
1741
  _response_types_map: Dict[str, Optional[str]] = {
1685
- '200': "ResponseModel",
1742
+ '200': "CreateInstancesResponse",
1686
1743
  '400': "ErrorResponseModel",
1687
1744
  '401': "ErrorResponseModel",
1688
1745
  '404': "ErrorResponseModel",
1746
+ '405': "ErrorResponseModel",
1747
+ '409': "ErrorResponseModel",
1689
1748
  '500': None,
1690
1749
  }
1691
1750
  response_data = self.api_client.call_api(
@@ -1695,9 +1754,9 @@ class VirtualMachineApi:
1695
1754
  return response_data.response
1696
1755
 
1697
1756
 
1698
- def _get_instance_hard_reboot_serialize(
1757
+ def _create_vms_serialize(
1699
1758
  self,
1700
- vm_id,
1759
+ payload,
1701
1760
  _request_auth,
1702
1761
  _content_type,
1703
1762
  _headers,
@@ -1719,12 +1778,12 @@ class VirtualMachineApi:
1719
1778
  _body_params: Optional[bytes] = None
1720
1779
 
1721
1780
  # process the path parameters
1722
- if vm_id is not None:
1723
- _path_params['vm_id'] = vm_id
1724
1781
  # process the query parameters
1725
1782
  # process the header parameters
1726
1783
  # process the form parameters
1727
1784
  # process the body parameter
1785
+ if payload is not None:
1786
+ _body_params = payload
1728
1787
 
1729
1788
 
1730
1789
  # set the HTTP header `Accept`
@@ -1735,6 +1794,19 @@ class VirtualMachineApi:
1735
1794
  ]
1736
1795
  )
1737
1796
 
1797
+ # set the HTTP header `Content-Type`
1798
+ if _content_type:
1799
+ _header_params['Content-Type'] = _content_type
1800
+ else:
1801
+ _default_content_type = (
1802
+ self.api_client.select_header_content_type(
1803
+ [
1804
+ 'application/json'
1805
+ ]
1806
+ )
1807
+ )
1808
+ if _default_content_type is not None:
1809
+ _header_params['Content-Type'] = _default_content_type
1738
1810
 
1739
1811
  # authentication setting
1740
1812
  _auth_settings: List[str] = [
@@ -1742,8 +1814,8 @@ class VirtualMachineApi:
1742
1814
  ]
1743
1815
 
1744
1816
  return self.api_client.param_serialize(
1745
- method='GET',
1746
- resource_path='/core/virtual-machines/{vm_id}/hard-reboot',
1817
+ method='POST',
1818
+ resource_path='/core/virtual-machines',
1747
1819
  path_params=_path_params,
1748
1820
  query_params=_query_params,
1749
1821
  header_params=_header_params,
@@ -1760,9 +1832,10 @@ class VirtualMachineApi:
1760
1832
 
1761
1833
 
1762
1834
  @validate_call
1763
- def get_instance_hibernate(
1835
+ def delete_firewall_rule_for_vm(
1764
1836
  self,
1765
1837
  vm_id: StrictInt,
1838
+ sg_rule_id: StrictInt,
1766
1839
  _request_timeout: Union[
1767
1840
  None,
1768
1841
  Annotated[StrictFloat, Field(gt=0)],
@@ -1776,12 +1849,14 @@ class VirtualMachineApi:
1776
1849
  _headers: Optional[Dict[StrictStr, Any]] = None,
1777
1850
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1778
1851
  ) -> ResponseModel:
1779
- """Hibernate virtual machine
1852
+ """Delete firewall rule from virtual machine
1780
1853
 
1781
- 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.
1854
+ 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.
1782
1855
 
1783
1856
  :param vm_id: (required)
1784
1857
  :type vm_id: int
1858
+ :param sg_rule_id: (required)
1859
+ :type sg_rule_id: int
1785
1860
  :param _request_timeout: timeout setting for this request. If one
1786
1861
  number provided, it will be total request
1787
1862
  timeout. It can also be a pair (tuple) of
@@ -1804,8 +1879,9 @@ class VirtualMachineApi:
1804
1879
  :return: Returns the result object.
1805
1880
  """ # noqa: E501
1806
1881
 
1807
- _param = self._get_instance_hibernate_serialize(
1882
+ _param = self._delete_firewall_rule_for_vm_serialize(
1808
1883
  vm_id=vm_id,
1884
+ sg_rule_id=sg_rule_id,
1809
1885
  _request_auth=_request_auth,
1810
1886
  _content_type=_content_type,
1811
1887
  _headers=_headers,
@@ -1831,9 +1907,10 @@ class VirtualMachineApi:
1831
1907
 
1832
1908
 
1833
1909
  @validate_call
1834
- def get_instance_hibernate_with_http_info(
1910
+ def delete_firewall_rule_for_vm_with_http_info(
1835
1911
  self,
1836
1912
  vm_id: StrictInt,
1913
+ sg_rule_id: StrictInt,
1837
1914
  _request_timeout: Union[
1838
1915
  None,
1839
1916
  Annotated[StrictFloat, Field(gt=0)],
@@ -1847,12 +1924,14 @@ class VirtualMachineApi:
1847
1924
  _headers: Optional[Dict[StrictStr, Any]] = None,
1848
1925
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1849
1926
  ) -> ApiResponse[ResponseModel]:
1850
- """Hibernate virtual machine
1927
+ """Delete firewall rule from virtual machine
1851
1928
 
1852
- 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.
1929
+ 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.
1853
1930
 
1854
1931
  :param vm_id: (required)
1855
1932
  :type vm_id: int
1933
+ :param sg_rule_id: (required)
1934
+ :type sg_rule_id: int
1856
1935
  :param _request_timeout: timeout setting for this request. If one
1857
1936
  number provided, it will be total request
1858
1937
  timeout. It can also be a pair (tuple) of
@@ -1875,8 +1954,9 @@ class VirtualMachineApi:
1875
1954
  :return: Returns the result object.
1876
1955
  """ # noqa: E501
1877
1956
 
1878
- _param = self._get_instance_hibernate_serialize(
1957
+ _param = self._delete_firewall_rule_for_vm_serialize(
1879
1958
  vm_id=vm_id,
1959
+ sg_rule_id=sg_rule_id,
1880
1960
  _request_auth=_request_auth,
1881
1961
  _content_type=_content_type,
1882
1962
  _headers=_headers,
@@ -1902,9 +1982,10 @@ class VirtualMachineApi:
1902
1982
 
1903
1983
 
1904
1984
  @validate_call
1905
- def get_instance_hibernate_without_preload_content(
1985
+ def delete_firewall_rule_for_vm_without_preload_content(
1906
1986
  self,
1907
1987
  vm_id: StrictInt,
1988
+ sg_rule_id: StrictInt,
1908
1989
  _request_timeout: Union[
1909
1990
  None,
1910
1991
  Annotated[StrictFloat, Field(gt=0)],
@@ -1918,12 +1999,14 @@ class VirtualMachineApi:
1918
1999
  _headers: Optional[Dict[StrictStr, Any]] = None,
1919
2000
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1920
2001
  ) -> RESTResponseType:
1921
- """Hibernate virtual machine
2002
+ """Delete firewall rule from virtual machine
1922
2003
 
1923
- 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.
2004
+ 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.
1924
2005
 
1925
2006
  :param vm_id: (required)
1926
2007
  :type vm_id: int
2008
+ :param sg_rule_id: (required)
2009
+ :type sg_rule_id: int
1927
2010
  :param _request_timeout: timeout setting for this request. If one
1928
2011
  number provided, it will be total request
1929
2012
  timeout. It can also be a pair (tuple) of
@@ -1946,8 +2029,9 @@ class VirtualMachineApi:
1946
2029
  :return: Returns the result object.
1947
2030
  """ # noqa: E501
1948
2031
 
1949
- _param = self._get_instance_hibernate_serialize(
2032
+ _param = self._delete_firewall_rule_for_vm_serialize(
1950
2033
  vm_id=vm_id,
2034
+ sg_rule_id=sg_rule_id,
1951
2035
  _request_auth=_request_auth,
1952
2036
  _content_type=_content_type,
1953
2037
  _headers=_headers,
@@ -1968,9 +2052,10 @@ class VirtualMachineApi:
1968
2052
  return response_data.response
1969
2053
 
1970
2054
 
1971
- def _get_instance_hibernate_serialize(
2055
+ def _delete_firewall_rule_for_vm_serialize(
1972
2056
  self,
1973
2057
  vm_id,
2058
+ sg_rule_id,
1974
2059
  _request_auth,
1975
2060
  _content_type,
1976
2061
  _headers,
@@ -1994,6 +2079,8 @@ class VirtualMachineApi:
1994
2079
  # process the path parameters
1995
2080
  if vm_id is not None:
1996
2081
  _path_params['vm_id'] = vm_id
2082
+ if sg_rule_id is not None:
2083
+ _path_params['sg_rule_id'] = sg_rule_id
1997
2084
  # process the query parameters
1998
2085
  # process the header parameters
1999
2086
  # process the form parameters
@@ -2015,8 +2102,8 @@ class VirtualMachineApi:
2015
2102
  ]
2016
2103
 
2017
2104
  return self.api_client.param_serialize(
2018
- method='GET',
2019
- resource_path='/core/virtual-machines/{vm_id}/hibernate',
2105
+ method='DELETE',
2106
+ resource_path='/core/virtual-machines/{vm_id}/sg-rules/{sg_rule_id}',
2020
2107
  path_params=_path_params,
2021
2108
  query_params=_query_params,
2022
2109
  header_params=_header_params,
@@ -2033,7 +2120,7 @@ class VirtualMachineApi:
2033
2120
 
2034
2121
 
2035
2122
  @validate_call
2036
- def get_instance_hibernate_restore(
2123
+ def delete_vm(
2037
2124
  self,
2038
2125
  vm_id: StrictInt,
2039
2126
  _request_timeout: Union[
@@ -2049,9 +2136,9 @@ class VirtualMachineApi:
2049
2136
  _headers: Optional[Dict[StrictStr, Any]] = None,
2050
2137
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2051
2138
  ) -> ResponseModel:
2052
- """Restore virtual machine from hibernation
2139
+ """Delete virtual machine
2053
2140
 
2054
- Resumes a virtual machine from hibernation, bringing it back to an active state. Provide the virtual machine ID that you want to restore from hibernation.
2141
+ Permanently deletes a virtual machine. Provide the virtual machine ID in the path to delete the specified virtual machine.
2055
2142
 
2056
2143
  :param vm_id: (required)
2057
2144
  :type vm_id: int
@@ -2077,7 +2164,7 @@ class VirtualMachineApi:
2077
2164
  :return: Returns the result object.
2078
2165
  """ # noqa: E501
2079
2166
 
2080
- _param = self._get_instance_hibernate_restore_serialize(
2167
+ _param = self._delete_vm_serialize(
2081
2168
  vm_id=vm_id,
2082
2169
  _request_auth=_request_auth,
2083
2170
  _content_type=_content_type,
@@ -2090,6 +2177,7 @@ class VirtualMachineApi:
2090
2177
  '400': "ErrorResponseModel",
2091
2178
  '401': "ErrorResponseModel",
2092
2179
  '404': "ErrorResponseModel",
2180
+ '409': "ErrorResponseModel",
2093
2181
  '500': None,
2094
2182
  }
2095
2183
  response_data = self.api_client.call_api(
@@ -2104,7 +2192,7 @@ class VirtualMachineApi:
2104
2192
 
2105
2193
 
2106
2194
  @validate_call
2107
- def get_instance_hibernate_restore_with_http_info(
2195
+ def delete_vm_with_http_info(
2108
2196
  self,
2109
2197
  vm_id: StrictInt,
2110
2198
  _request_timeout: Union[
@@ -2120,9 +2208,9 @@ class VirtualMachineApi:
2120
2208
  _headers: Optional[Dict[StrictStr, Any]] = None,
2121
2209
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2122
2210
  ) -> ApiResponse[ResponseModel]:
2123
- """Restore virtual machine from hibernation
2211
+ """Delete virtual machine
2124
2212
 
2125
- Resumes a virtual machine from hibernation, bringing it back to an active state. Provide the virtual machine ID that you want to restore from hibernation.
2213
+ Permanently deletes a virtual machine. Provide the virtual machine ID in the path to delete the specified virtual machine.
2126
2214
 
2127
2215
  :param vm_id: (required)
2128
2216
  :type vm_id: int
@@ -2148,7 +2236,7 @@ class VirtualMachineApi:
2148
2236
  :return: Returns the result object.
2149
2237
  """ # noqa: E501
2150
2238
 
2151
- _param = self._get_instance_hibernate_restore_serialize(
2239
+ _param = self._delete_vm_serialize(
2152
2240
  vm_id=vm_id,
2153
2241
  _request_auth=_request_auth,
2154
2242
  _content_type=_content_type,
@@ -2161,6 +2249,7 @@ class VirtualMachineApi:
2161
2249
  '400': "ErrorResponseModel",
2162
2250
  '401': "ErrorResponseModel",
2163
2251
  '404': "ErrorResponseModel",
2252
+ '409': "ErrorResponseModel",
2164
2253
  '500': None,
2165
2254
  }
2166
2255
  response_data = self.api_client.call_api(
@@ -2175,7 +2264,7 @@ class VirtualMachineApi:
2175
2264
 
2176
2265
 
2177
2266
  @validate_call
2178
- def get_instance_hibernate_restore_without_preload_content(
2267
+ def delete_vm_without_preload_content(
2179
2268
  self,
2180
2269
  vm_id: StrictInt,
2181
2270
  _request_timeout: Union[
@@ -2191,9 +2280,9 @@ class VirtualMachineApi:
2191
2280
  _headers: Optional[Dict[StrictStr, Any]] = None,
2192
2281
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2193
2282
  ) -> RESTResponseType:
2194
- """Restore virtual machine from hibernation
2283
+ """Delete virtual machine
2195
2284
 
2196
- Resumes a virtual machine from hibernation, bringing it back to an active state. Provide the virtual machine ID that you want to restore from hibernation.
2285
+ Permanently deletes a virtual machine. Provide the virtual machine ID in the path to delete the specified virtual machine.
2197
2286
 
2198
2287
  :param vm_id: (required)
2199
2288
  :type vm_id: int
@@ -2219,7 +2308,7 @@ class VirtualMachineApi:
2219
2308
  :return: Returns the result object.
2220
2309
  """ # noqa: E501
2221
2310
 
2222
- _param = self._get_instance_hibernate_restore_serialize(
2311
+ _param = self._delete_vm_serialize(
2223
2312
  vm_id=vm_id,
2224
2313
  _request_auth=_request_auth,
2225
2314
  _content_type=_content_type,
@@ -2232,6 +2321,7 @@ class VirtualMachineApi:
2232
2321
  '400': "ErrorResponseModel",
2233
2322
  '401': "ErrorResponseModel",
2234
2323
  '404': "ErrorResponseModel",
2324
+ '409': "ErrorResponseModel",
2235
2325
  '500': None,
2236
2326
  }
2237
2327
  response_data = self.api_client.call_api(
@@ -2241,7 +2331,7 @@ class VirtualMachineApi:
2241
2331
  return response_data.response
2242
2332
 
2243
2333
 
2244
- def _get_instance_hibernate_restore_serialize(
2334
+ def _delete_vm_serialize(
2245
2335
  self,
2246
2336
  vm_id,
2247
2337
  _request_auth,
@@ -2288,8 +2378,8 @@ class VirtualMachineApi:
2288
2378
  ]
2289
2379
 
2290
2380
  return self.api_client.param_serialize(
2291
- method='GET',
2292
- resource_path='/core/virtual-machines/{vm_id}/hibernate-restore',
2381
+ method='DELETE',
2382
+ resource_path='/core/virtual-machines/{vm_id}',
2293
2383
  path_params=_path_params,
2294
2384
  query_params=_query_params,
2295
2385
  header_params=_header_params,
@@ -2306,10 +2396,12 @@ class VirtualMachineApi:
2306
2396
 
2307
2397
 
2308
2398
  @validate_call
2309
- def get_instance_logs(
2399
+ def get_contract_vms(
2310
2400
  self,
2311
- vm_id: StrictInt,
2312
- request_id: StrictInt,
2401
+ contract_id: StrictInt,
2402
+ page: Annotated[Optional[StrictStr], Field(description="Page Number")] = None,
2403
+ page_size: Annotated[Optional[StrictStr], Field(description="Data Per Page")] = None,
2404
+ search: Annotated[Optional[StrictStr], Field(description="Search By Instance ID or Name")] = None,
2313
2405
  _request_timeout: Union[
2314
2406
  None,
2315
2407
  Annotated[StrictFloat, Field(gt=0)],
@@ -2322,15 +2414,19 @@ class VirtualMachineApi:
2322
2414
  _content_type: Optional[StrictStr] = None,
2323
2415
  _headers: Optional[Dict[StrictStr, Any]] = None,
2324
2416
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2325
- ) -> GetInstanceLogsResponse:
2326
- """Get virtual machine logs
2417
+ ) -> ContractInstancesResponse:
2418
+ """Retrieve virtual machines associated with a contract
2327
2419
 
2328
- Retrieve console logs for a virtual machine
2420
+ 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.
2329
2421
 
2330
- :param vm_id: (required)
2331
- :type vm_id: int
2332
- :param request_id: (required)
2333
- :type request_id: int
2422
+ :param contract_id: (required)
2423
+ :type contract_id: int
2424
+ :param page: Page Number
2425
+ :type page: str
2426
+ :param page_size: Data Per Page
2427
+ :type page_size: str
2428
+ :param search: Search By Instance ID or Name
2429
+ :type search: str
2334
2430
  :param _request_timeout: timeout setting for this request. If one
2335
2431
  number provided, it will be total request
2336
2432
  timeout. It can also be a pair (tuple) of
@@ -2353,9 +2449,11 @@ class VirtualMachineApi:
2353
2449
  :return: Returns the result object.
2354
2450
  """ # noqa: E501
2355
2451
 
2356
- _param = self._get_instance_logs_serialize(
2357
- vm_id=vm_id,
2358
- request_id=request_id,
2452
+ _param = self._get_contract_vms_serialize(
2453
+ contract_id=contract_id,
2454
+ page=page,
2455
+ page_size=page_size,
2456
+ search=search,
2359
2457
  _request_auth=_request_auth,
2360
2458
  _content_type=_content_type,
2361
2459
  _headers=_headers,
@@ -2363,11 +2461,9 @@ class VirtualMachineApi:
2363
2461
  )
2364
2462
 
2365
2463
  _response_types_map: Dict[str, Optional[str]] = {
2366
- '200': "GetInstanceLogsResponse",
2464
+ '200': "ContractInstancesResponse",
2367
2465
  '400': "ErrorResponseModel",
2368
2466
  '401': "ErrorResponseModel",
2369
- '404': "ErrorResponseModel",
2370
- '405': "ErrorResponseModel",
2371
2467
  '500': None,
2372
2468
  }
2373
2469
  response_data = self.api_client.call_api(
@@ -2382,10 +2478,12 @@ class VirtualMachineApi:
2382
2478
 
2383
2479
 
2384
2480
  @validate_call
2385
- def get_instance_logs_with_http_info(
2481
+ def get_contract_vms_with_http_info(
2386
2482
  self,
2387
- vm_id: StrictInt,
2388
- request_id: StrictInt,
2483
+ contract_id: StrictInt,
2484
+ page: Annotated[Optional[StrictStr], Field(description="Page Number")] = None,
2485
+ page_size: Annotated[Optional[StrictStr], Field(description="Data Per Page")] = None,
2486
+ search: Annotated[Optional[StrictStr], Field(description="Search By Instance ID or Name")] = None,
2389
2487
  _request_timeout: Union[
2390
2488
  None,
2391
2489
  Annotated[StrictFloat, Field(gt=0)],
@@ -2398,15 +2496,19 @@ class VirtualMachineApi:
2398
2496
  _content_type: Optional[StrictStr] = None,
2399
2497
  _headers: Optional[Dict[StrictStr, Any]] = None,
2400
2498
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2401
- ) -> ApiResponse[GetInstanceLogsResponse]:
2402
- """Get virtual machine logs
2499
+ ) -> ApiResponse[ContractInstancesResponse]:
2500
+ """Retrieve virtual machines associated with a contract
2403
2501
 
2404
- Retrieve console logs for a virtual machine
2502
+ 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.
2405
2503
 
2406
- :param vm_id: (required)
2407
- :type vm_id: int
2408
- :param request_id: (required)
2409
- :type request_id: int
2504
+ :param contract_id: (required)
2505
+ :type contract_id: int
2506
+ :param page: Page Number
2507
+ :type page: str
2508
+ :param page_size: Data Per Page
2509
+ :type page_size: str
2510
+ :param search: Search By Instance ID or Name
2511
+ :type search: str
2410
2512
  :param _request_timeout: timeout setting for this request. If one
2411
2513
  number provided, it will be total request
2412
2514
  timeout. It can also be a pair (tuple) of
@@ -2429,9 +2531,11 @@ class VirtualMachineApi:
2429
2531
  :return: Returns the result object.
2430
2532
  """ # noqa: E501
2431
2533
 
2432
- _param = self._get_instance_logs_serialize(
2433
- vm_id=vm_id,
2434
- request_id=request_id,
2534
+ _param = self._get_contract_vms_serialize(
2535
+ contract_id=contract_id,
2536
+ page=page,
2537
+ page_size=page_size,
2538
+ search=search,
2435
2539
  _request_auth=_request_auth,
2436
2540
  _content_type=_content_type,
2437
2541
  _headers=_headers,
@@ -2439,11 +2543,9 @@ class VirtualMachineApi:
2439
2543
  )
2440
2544
 
2441
2545
  _response_types_map: Dict[str, Optional[str]] = {
2442
- '200': "GetInstanceLogsResponse",
2546
+ '200': "ContractInstancesResponse",
2443
2547
  '400': "ErrorResponseModel",
2444
2548
  '401': "ErrorResponseModel",
2445
- '404': "ErrorResponseModel",
2446
- '405': "ErrorResponseModel",
2447
2549
  '500': None,
2448
2550
  }
2449
2551
  response_data = self.api_client.call_api(
@@ -2458,10 +2560,12 @@ class VirtualMachineApi:
2458
2560
 
2459
2561
 
2460
2562
  @validate_call
2461
- def get_instance_logs_without_preload_content(
2563
+ def get_contract_vms_without_preload_content(
2462
2564
  self,
2463
- vm_id: StrictInt,
2464
- request_id: StrictInt,
2565
+ contract_id: StrictInt,
2566
+ page: Annotated[Optional[StrictStr], Field(description="Page Number")] = None,
2567
+ page_size: Annotated[Optional[StrictStr], Field(description="Data Per Page")] = None,
2568
+ search: Annotated[Optional[StrictStr], Field(description="Search By Instance ID or Name")] = None,
2465
2569
  _request_timeout: Union[
2466
2570
  None,
2467
2571
  Annotated[StrictFloat, Field(gt=0)],
@@ -2475,14 +2579,18 @@ class VirtualMachineApi:
2475
2579
  _headers: Optional[Dict[StrictStr, Any]] = None,
2476
2580
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2477
2581
  ) -> RESTResponseType:
2478
- """Get virtual machine logs
2582
+ """Retrieve virtual machines associated with a contract
2479
2583
 
2480
- Retrieve console logs for a virtual machine
2584
+ 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.
2481
2585
 
2482
- :param vm_id: (required)
2483
- :type vm_id: int
2484
- :param request_id: (required)
2485
- :type request_id: int
2586
+ :param contract_id: (required)
2587
+ :type contract_id: int
2588
+ :param page: Page Number
2589
+ :type page: str
2590
+ :param page_size: Data Per Page
2591
+ :type page_size: str
2592
+ :param search: Search By Instance ID or Name
2593
+ :type search: str
2486
2594
  :param _request_timeout: timeout setting for this request. If one
2487
2595
  number provided, it will be total request
2488
2596
  timeout. It can also be a pair (tuple) of
@@ -2505,9 +2613,11 @@ class VirtualMachineApi:
2505
2613
  :return: Returns the result object.
2506
2614
  """ # noqa: E501
2507
2615
 
2508
- _param = self._get_instance_logs_serialize(
2509
- vm_id=vm_id,
2510
- request_id=request_id,
2616
+ _param = self._get_contract_vms_serialize(
2617
+ contract_id=contract_id,
2618
+ page=page,
2619
+ page_size=page_size,
2620
+ search=search,
2511
2621
  _request_auth=_request_auth,
2512
2622
  _content_type=_content_type,
2513
2623
  _headers=_headers,
@@ -2515,11 +2625,9 @@ class VirtualMachineApi:
2515
2625
  )
2516
2626
 
2517
2627
  _response_types_map: Dict[str, Optional[str]] = {
2518
- '200': "GetInstanceLogsResponse",
2628
+ '200': "ContractInstancesResponse",
2519
2629
  '400': "ErrorResponseModel",
2520
2630
  '401': "ErrorResponseModel",
2521
- '404': "ErrorResponseModel",
2522
- '405': "ErrorResponseModel",
2523
2631
  '500': None,
2524
2632
  }
2525
2633
  response_data = self.api_client.call_api(
@@ -2529,10 +2637,12 @@ class VirtualMachineApi:
2529
2637
  return response_data.response
2530
2638
 
2531
2639
 
2532
- def _get_instance_logs_serialize(
2640
+ def _get_contract_vms_serialize(
2533
2641
  self,
2534
- vm_id,
2535
- request_id,
2642
+ contract_id,
2643
+ page,
2644
+ page_size,
2645
+ search,
2536
2646
  _request_auth,
2537
2647
  _content_type,
2538
2648
  _headers,
@@ -2554,12 +2664,20 @@ class VirtualMachineApi:
2554
2664
  _body_params: Optional[bytes] = None
2555
2665
 
2556
2666
  # process the path parameters
2557
- if vm_id is not None:
2558
- _path_params['vm_id'] = vm_id
2667
+ if contract_id is not None:
2668
+ _path_params['contract_id'] = contract_id
2559
2669
  # process the query parameters
2560
- if request_id is not None:
2670
+ if page is not None:
2561
2671
 
2562
- _query_params.append(('request_id', request_id))
2672
+ _query_params.append(('page', page))
2673
+
2674
+ if page_size is not None:
2675
+
2676
+ _query_params.append(('pageSize', page_size))
2677
+
2678
+ if search is not None:
2679
+
2680
+ _query_params.append(('search', search))
2563
2681
 
2564
2682
  # process the header parameters
2565
2683
  # process the form parameters
@@ -2582,7 +2700,7 @@ class VirtualMachineApi:
2582
2700
 
2583
2701
  return self.api_client.param_serialize(
2584
2702
  method='GET',
2585
- resource_path='/core/virtual-machines/{vm_id}/logs',
2703
+ resource_path='/core/virtual-machines/contract/{contract_id}/virtual-machines',
2586
2704
  path_params=_path_params,
2587
2705
  query_params=_query_params,
2588
2706
  header_params=_header_params,
@@ -2599,10 +2717,9 @@ class VirtualMachineApi:
2599
2717
 
2600
2718
 
2601
2719
  @validate_call
2602
- def get_instance_metrics(
2720
+ def get_vm(
2603
2721
  self,
2604
2722
  vm_id: StrictInt,
2605
- duration: Optional[StrictStr] = None,
2606
2723
  _request_timeout: Union[
2607
2724
  None,
2608
2725
  Annotated[StrictFloat, Field(gt=0)],
@@ -2615,15 +2732,13 @@ class VirtualMachineApi:
2615
2732
  _content_type: Optional[StrictStr] = None,
2616
2733
  _headers: Optional[Dict[StrictStr, Any]] = None,
2617
2734
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2618
- ) -> MetricsFields:
2619
- """Retrieve virtual machine performance metrics
2735
+ ) -> Instance:
2736
+ """Retrieve virtual machine details
2620
2737
 
2621
- 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).
2738
+ 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.
2622
2739
 
2623
2740
  :param vm_id: (required)
2624
2741
  :type vm_id: int
2625
- :param duration:
2626
- :type duration: str
2627
2742
  :param _request_timeout: timeout setting for this request. If one
2628
2743
  number provided, it will be total request
2629
2744
  timeout. It can also be a pair (tuple) of
@@ -2646,9 +2761,8 @@ class VirtualMachineApi:
2646
2761
  :return: Returns the result object.
2647
2762
  """ # noqa: E501
2648
2763
 
2649
- _param = self._get_instance_metrics_serialize(
2764
+ _param = self._get_vm_serialize(
2650
2765
  vm_id=vm_id,
2651
- duration=duration,
2652
2766
  _request_auth=_request_auth,
2653
2767
  _content_type=_content_type,
2654
2768
  _headers=_headers,
@@ -2656,11 +2770,10 @@ class VirtualMachineApi:
2656
2770
  )
2657
2771
 
2658
2772
  _response_types_map: Dict[str, Optional[str]] = {
2659
- '200': "MetricsFields",
2773
+ '200': "Instance",
2660
2774
  '400': "ErrorResponseModel",
2661
2775
  '401': "ErrorResponseModel",
2662
2776
  '404': "ErrorResponseModel",
2663
- '406': "ErrorResponseModel",
2664
2777
  '500': None,
2665
2778
  }
2666
2779
  response_data = self.api_client.call_api(
@@ -2675,10 +2788,9 @@ class VirtualMachineApi:
2675
2788
 
2676
2789
 
2677
2790
  @validate_call
2678
- def get_instance_metrics_with_http_info(
2791
+ def get_vm_with_http_info(
2679
2792
  self,
2680
2793
  vm_id: StrictInt,
2681
- duration: Optional[StrictStr] = None,
2682
2794
  _request_timeout: Union[
2683
2795
  None,
2684
2796
  Annotated[StrictFloat, Field(gt=0)],
@@ -2691,15 +2803,13 @@ class VirtualMachineApi:
2691
2803
  _content_type: Optional[StrictStr] = None,
2692
2804
  _headers: Optional[Dict[StrictStr, Any]] = None,
2693
2805
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2694
- ) -> ApiResponse[MetricsFields]:
2695
- """Retrieve virtual machine performance metrics
2806
+ ) -> ApiResponse[Instance]:
2807
+ """Retrieve virtual machine details
2696
2808
 
2697
- 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).
2809
+ 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.
2698
2810
 
2699
2811
  :param vm_id: (required)
2700
2812
  :type vm_id: int
2701
- :param duration:
2702
- :type duration: str
2703
2813
  :param _request_timeout: timeout setting for this request. If one
2704
2814
  number provided, it will be total request
2705
2815
  timeout. It can also be a pair (tuple) of
@@ -2722,9 +2832,8 @@ class VirtualMachineApi:
2722
2832
  :return: Returns the result object.
2723
2833
  """ # noqa: E501
2724
2834
 
2725
- _param = self._get_instance_metrics_serialize(
2835
+ _param = self._get_vm_serialize(
2726
2836
  vm_id=vm_id,
2727
- duration=duration,
2728
2837
  _request_auth=_request_auth,
2729
2838
  _content_type=_content_type,
2730
2839
  _headers=_headers,
@@ -2732,11 +2841,10 @@ class VirtualMachineApi:
2732
2841
  )
2733
2842
 
2734
2843
  _response_types_map: Dict[str, Optional[str]] = {
2735
- '200': "MetricsFields",
2844
+ '200': "Instance",
2736
2845
  '400': "ErrorResponseModel",
2737
2846
  '401': "ErrorResponseModel",
2738
2847
  '404': "ErrorResponseModel",
2739
- '406': "ErrorResponseModel",
2740
2848
  '500': None,
2741
2849
  }
2742
2850
  response_data = self.api_client.call_api(
@@ -2751,10 +2859,9 @@ class VirtualMachineApi:
2751
2859
 
2752
2860
 
2753
2861
  @validate_call
2754
- def get_instance_metrics_without_preload_content(
2862
+ def get_vm_without_preload_content(
2755
2863
  self,
2756
2864
  vm_id: StrictInt,
2757
- duration: Optional[StrictStr] = None,
2758
2865
  _request_timeout: Union[
2759
2866
  None,
2760
2867
  Annotated[StrictFloat, Field(gt=0)],
@@ -2768,14 +2875,12 @@ class VirtualMachineApi:
2768
2875
  _headers: Optional[Dict[StrictStr, Any]] = None,
2769
2876
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2770
2877
  ) -> RESTResponseType:
2771
- """Retrieve virtual machine performance metrics
2878
+ """Retrieve virtual machine details
2772
2879
 
2773
- 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).
2880
+ 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.
2774
2881
 
2775
2882
  :param vm_id: (required)
2776
2883
  :type vm_id: int
2777
- :param duration:
2778
- :type duration: str
2779
2884
  :param _request_timeout: timeout setting for this request. If one
2780
2885
  number provided, it will be total request
2781
2886
  timeout. It can also be a pair (tuple) of
@@ -2798,9 +2903,8 @@ class VirtualMachineApi:
2798
2903
  :return: Returns the result object.
2799
2904
  """ # noqa: E501
2800
2905
 
2801
- _param = self._get_instance_metrics_serialize(
2906
+ _param = self._get_vm_serialize(
2802
2907
  vm_id=vm_id,
2803
- duration=duration,
2804
2908
  _request_auth=_request_auth,
2805
2909
  _content_type=_content_type,
2806
2910
  _headers=_headers,
@@ -2808,11 +2912,10 @@ class VirtualMachineApi:
2808
2912
  )
2809
2913
 
2810
2914
  _response_types_map: Dict[str, Optional[str]] = {
2811
- '200': "MetricsFields",
2915
+ '200': "Instance",
2812
2916
  '400': "ErrorResponseModel",
2813
2917
  '401': "ErrorResponseModel",
2814
2918
  '404': "ErrorResponseModel",
2815
- '406': "ErrorResponseModel",
2816
2919
  '500': None,
2817
2920
  }
2818
2921
  response_data = self.api_client.call_api(
@@ -2822,10 +2925,9 @@ class VirtualMachineApi:
2822
2925
  return response_data.response
2823
2926
 
2824
2927
 
2825
- def _get_instance_metrics_serialize(
2928
+ def _get_vm_serialize(
2826
2929
  self,
2827
2930
  vm_id,
2828
- duration,
2829
2931
  _request_auth,
2830
2932
  _content_type,
2831
2933
  _headers,
@@ -2850,10 +2952,6 @@ class VirtualMachineApi:
2850
2952
  if vm_id is not None:
2851
2953
  _path_params['vm_id'] = vm_id
2852
2954
  # process the query parameters
2853
- if duration is not None:
2854
-
2855
- _query_params.append(('duration', duration))
2856
-
2857
2955
  # process the header parameters
2858
2956
  # process the form parameters
2859
2957
  # process the body parameter
@@ -2875,7 +2973,7 @@ class VirtualMachineApi:
2875
2973
 
2876
2974
  return self.api_client.param_serialize(
2877
2975
  method='GET',
2878
- resource_path='/core/virtual-machines/{vm_id}/metrics',
2976
+ resource_path='/core/virtual-machines/{vm_id}',
2879
2977
  path_params=_path_params,
2880
2978
  query_params=_query_params,
2881
2979
  header_params=_header_params,
@@ -2892,9 +2990,10 @@ class VirtualMachineApi:
2892
2990
 
2893
2991
 
2894
2992
  @validate_call
2895
- def get_instance_start(
2993
+ def get_vm_logs(
2896
2994
  self,
2897
2995
  vm_id: StrictInt,
2996
+ request_id: StrictInt,
2898
2997
  _request_timeout: Union[
2899
2998
  None,
2900
2999
  Annotated[StrictFloat, Field(gt=0)],
@@ -2907,13 +3006,15 @@ class VirtualMachineApi:
2907
3006
  _content_type: Optional[StrictStr] = None,
2908
3007
  _headers: Optional[Dict[StrictStr, Any]] = None,
2909
3008
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2910
- ) -> ResponseModel:
2911
- """Start virtual machine
3009
+ ) -> GetInstanceLogsResponse:
3010
+ """Get virtual machine logs
2912
3011
 
2913
- Initiates the startup of a virtual machine. Provide the virtual machine ID in the path to initiate the starting of the specified virtual machine.
3012
+ Retrieve console logs for a virtual machine
2914
3013
 
2915
3014
  :param vm_id: (required)
2916
3015
  :type vm_id: int
3016
+ :param request_id: (required)
3017
+ :type request_id: int
2917
3018
  :param _request_timeout: timeout setting for this request. If one
2918
3019
  number provided, it will be total request
2919
3020
  timeout. It can also be a pair (tuple) of
@@ -2936,8 +3037,9 @@ class VirtualMachineApi:
2936
3037
  :return: Returns the result object.
2937
3038
  """ # noqa: E501
2938
3039
 
2939
- _param = self._get_instance_start_serialize(
3040
+ _param = self._get_vm_logs_serialize(
2940
3041
  vm_id=vm_id,
3042
+ request_id=request_id,
2941
3043
  _request_auth=_request_auth,
2942
3044
  _content_type=_content_type,
2943
3045
  _headers=_headers,
@@ -2945,10 +3047,11 @@ class VirtualMachineApi:
2945
3047
  )
2946
3048
 
2947
3049
  _response_types_map: Dict[str, Optional[str]] = {
2948
- '200': "ResponseModel",
3050
+ '200': "GetInstanceLogsResponse",
2949
3051
  '400': "ErrorResponseModel",
2950
3052
  '401': "ErrorResponseModel",
2951
3053
  '404': "ErrorResponseModel",
3054
+ '405': "ErrorResponseModel",
2952
3055
  '500': None,
2953
3056
  }
2954
3057
  response_data = self.api_client.call_api(
@@ -2963,9 +3066,10 @@ class VirtualMachineApi:
2963
3066
 
2964
3067
 
2965
3068
  @validate_call
2966
- def get_instance_start_with_http_info(
3069
+ def get_vm_logs_with_http_info(
2967
3070
  self,
2968
3071
  vm_id: StrictInt,
3072
+ request_id: StrictInt,
2969
3073
  _request_timeout: Union[
2970
3074
  None,
2971
3075
  Annotated[StrictFloat, Field(gt=0)],
@@ -2978,13 +3082,15 @@ class VirtualMachineApi:
2978
3082
  _content_type: Optional[StrictStr] = None,
2979
3083
  _headers: Optional[Dict[StrictStr, Any]] = None,
2980
3084
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2981
- ) -> ApiResponse[ResponseModel]:
2982
- """Start virtual machine
3085
+ ) -> ApiResponse[GetInstanceLogsResponse]:
3086
+ """Get virtual machine logs
2983
3087
 
2984
- Initiates the startup of a virtual machine. Provide the virtual machine ID in the path to initiate the starting of the specified virtual machine.
3088
+ Retrieve console logs for a virtual machine
2985
3089
 
2986
3090
  :param vm_id: (required)
2987
3091
  :type vm_id: int
3092
+ :param request_id: (required)
3093
+ :type request_id: int
2988
3094
  :param _request_timeout: timeout setting for this request. If one
2989
3095
  number provided, it will be total request
2990
3096
  timeout. It can also be a pair (tuple) of
@@ -3007,8 +3113,9 @@ class VirtualMachineApi:
3007
3113
  :return: Returns the result object.
3008
3114
  """ # noqa: E501
3009
3115
 
3010
- _param = self._get_instance_start_serialize(
3116
+ _param = self._get_vm_logs_serialize(
3011
3117
  vm_id=vm_id,
3118
+ request_id=request_id,
3012
3119
  _request_auth=_request_auth,
3013
3120
  _content_type=_content_type,
3014
3121
  _headers=_headers,
@@ -3016,10 +3123,11 @@ class VirtualMachineApi:
3016
3123
  )
3017
3124
 
3018
3125
  _response_types_map: Dict[str, Optional[str]] = {
3019
- '200': "ResponseModel",
3126
+ '200': "GetInstanceLogsResponse",
3020
3127
  '400': "ErrorResponseModel",
3021
3128
  '401': "ErrorResponseModel",
3022
3129
  '404': "ErrorResponseModel",
3130
+ '405': "ErrorResponseModel",
3023
3131
  '500': None,
3024
3132
  }
3025
3133
  response_data = self.api_client.call_api(
@@ -3034,9 +3142,10 @@ class VirtualMachineApi:
3034
3142
 
3035
3143
 
3036
3144
  @validate_call
3037
- def get_instance_start_without_preload_content(
3145
+ def get_vm_logs_without_preload_content(
3038
3146
  self,
3039
3147
  vm_id: StrictInt,
3148
+ request_id: StrictInt,
3040
3149
  _request_timeout: Union[
3041
3150
  None,
3042
3151
  Annotated[StrictFloat, Field(gt=0)],
@@ -3050,12 +3159,14 @@ class VirtualMachineApi:
3050
3159
  _headers: Optional[Dict[StrictStr, Any]] = None,
3051
3160
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
3052
3161
  ) -> RESTResponseType:
3053
- """Start virtual machine
3162
+ """Get virtual machine logs
3054
3163
 
3055
- Initiates the startup of a virtual machine. Provide the virtual machine ID in the path to initiate the starting of the specified virtual machine.
3164
+ Retrieve console logs for a virtual machine
3056
3165
 
3057
3166
  :param vm_id: (required)
3058
3167
  :type vm_id: int
3168
+ :param request_id: (required)
3169
+ :type request_id: int
3059
3170
  :param _request_timeout: timeout setting for this request. If one
3060
3171
  number provided, it will be total request
3061
3172
  timeout. It can also be a pair (tuple) of
@@ -3078,8 +3189,9 @@ class VirtualMachineApi:
3078
3189
  :return: Returns the result object.
3079
3190
  """ # noqa: E501
3080
3191
 
3081
- _param = self._get_instance_start_serialize(
3192
+ _param = self._get_vm_logs_serialize(
3082
3193
  vm_id=vm_id,
3194
+ request_id=request_id,
3083
3195
  _request_auth=_request_auth,
3084
3196
  _content_type=_content_type,
3085
3197
  _headers=_headers,
@@ -3087,10 +3199,11 @@ class VirtualMachineApi:
3087
3199
  )
3088
3200
 
3089
3201
  _response_types_map: Dict[str, Optional[str]] = {
3090
- '200': "ResponseModel",
3202
+ '200': "GetInstanceLogsResponse",
3091
3203
  '400': "ErrorResponseModel",
3092
3204
  '401': "ErrorResponseModel",
3093
3205
  '404': "ErrorResponseModel",
3206
+ '405': "ErrorResponseModel",
3094
3207
  '500': None,
3095
3208
  }
3096
3209
  response_data = self.api_client.call_api(
@@ -3100,9 +3213,10 @@ class VirtualMachineApi:
3100
3213
  return response_data.response
3101
3214
 
3102
3215
 
3103
- def _get_instance_start_serialize(
3216
+ def _get_vm_logs_serialize(
3104
3217
  self,
3105
3218
  vm_id,
3219
+ request_id,
3106
3220
  _request_auth,
3107
3221
  _content_type,
3108
3222
  _headers,
@@ -3127,6 +3241,10 @@ class VirtualMachineApi:
3127
3241
  if vm_id is not None:
3128
3242
  _path_params['vm_id'] = vm_id
3129
3243
  # process the query parameters
3244
+ if request_id is not None:
3245
+
3246
+ _query_params.append(('request_id', request_id))
3247
+
3130
3248
  # process the header parameters
3131
3249
  # process the form parameters
3132
3250
  # process the body parameter
@@ -3148,7 +3266,7 @@ class VirtualMachineApi:
3148
3266
 
3149
3267
  return self.api_client.param_serialize(
3150
3268
  method='GET',
3151
- resource_path='/core/virtual-machines/{vm_id}/start',
3269
+ resource_path='/core/virtual-machines/{vm_id}/logs',
3152
3270
  path_params=_path_params,
3153
3271
  query_params=_query_params,
3154
3272
  header_params=_header_params,
@@ -3165,9 +3283,10 @@ class VirtualMachineApi:
3165
3283
 
3166
3284
 
3167
3285
  @validate_call
3168
- def get_instance_stop(
3286
+ def get_vm_metrics(
3169
3287
  self,
3170
3288
  vm_id: StrictInt,
3289
+ duration: Optional[StrictStr] = None,
3171
3290
  _request_timeout: Union[
3172
3291
  None,
3173
3292
  Annotated[StrictFloat, Field(gt=0)],
@@ -3180,13 +3299,15 @@ class VirtualMachineApi:
3180
3299
  _content_type: Optional[StrictStr] = None,
3181
3300
  _headers: Optional[Dict[StrictStr, Any]] = None,
3182
3301
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
3183
- ) -> ResponseModel:
3184
- """Stop virtual machine
3302
+ ) -> MetricsFields:
3303
+ """Retrieve virtual machine performance metrics
3185
3304
 
3186
- Shuts down a virtual machine. Provide the virtual machine ID in the path to initiate the shutdown process for the specified virtual machine.
3305
+ 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).
3187
3306
 
3188
3307
  :param vm_id: (required)
3189
3308
  :type vm_id: int
3309
+ :param duration:
3310
+ :type duration: str
3190
3311
  :param _request_timeout: timeout setting for this request. If one
3191
3312
  number provided, it will be total request
3192
3313
  timeout. It can also be a pair (tuple) of
@@ -3209,8 +3330,9 @@ class VirtualMachineApi:
3209
3330
  :return: Returns the result object.
3210
3331
  """ # noqa: E501
3211
3332
 
3212
- _param = self._get_instance_stop_serialize(
3333
+ _param = self._get_vm_metrics_serialize(
3213
3334
  vm_id=vm_id,
3335
+ duration=duration,
3214
3336
  _request_auth=_request_auth,
3215
3337
  _content_type=_content_type,
3216
3338
  _headers=_headers,
@@ -3218,10 +3340,11 @@ class VirtualMachineApi:
3218
3340
  )
3219
3341
 
3220
3342
  _response_types_map: Dict[str, Optional[str]] = {
3221
- '200': "ResponseModel",
3343
+ '200': "MetricsFields",
3222
3344
  '400': "ErrorResponseModel",
3223
3345
  '401': "ErrorResponseModel",
3224
3346
  '404': "ErrorResponseModel",
3347
+ '406': "ErrorResponseModel",
3225
3348
  '500': None,
3226
3349
  }
3227
3350
  response_data = self.api_client.call_api(
@@ -3236,9 +3359,10 @@ class VirtualMachineApi:
3236
3359
 
3237
3360
 
3238
3361
  @validate_call
3239
- def get_instance_stop_with_http_info(
3362
+ def get_vm_metrics_with_http_info(
3240
3363
  self,
3241
3364
  vm_id: StrictInt,
3365
+ duration: Optional[StrictStr] = None,
3242
3366
  _request_timeout: Union[
3243
3367
  None,
3244
3368
  Annotated[StrictFloat, Field(gt=0)],
@@ -3251,13 +3375,15 @@ class VirtualMachineApi:
3251
3375
  _content_type: Optional[StrictStr] = None,
3252
3376
  _headers: Optional[Dict[StrictStr, Any]] = None,
3253
3377
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
3254
- ) -> ApiResponse[ResponseModel]:
3255
- """Stop virtual machine
3378
+ ) -> ApiResponse[MetricsFields]:
3379
+ """Retrieve virtual machine performance metrics
3256
3380
 
3257
- Shuts down a virtual machine. Provide the virtual machine ID in the path to initiate the shutdown process for the specified virtual machine.
3381
+ 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).
3258
3382
 
3259
3383
  :param vm_id: (required)
3260
3384
  :type vm_id: int
3385
+ :param duration:
3386
+ :type duration: str
3261
3387
  :param _request_timeout: timeout setting for this request. If one
3262
3388
  number provided, it will be total request
3263
3389
  timeout. It can also be a pair (tuple) of
@@ -3280,8 +3406,9 @@ class VirtualMachineApi:
3280
3406
  :return: Returns the result object.
3281
3407
  """ # noqa: E501
3282
3408
 
3283
- _param = self._get_instance_stop_serialize(
3409
+ _param = self._get_vm_metrics_serialize(
3284
3410
  vm_id=vm_id,
3411
+ duration=duration,
3285
3412
  _request_auth=_request_auth,
3286
3413
  _content_type=_content_type,
3287
3414
  _headers=_headers,
@@ -3289,10 +3416,11 @@ class VirtualMachineApi:
3289
3416
  )
3290
3417
 
3291
3418
  _response_types_map: Dict[str, Optional[str]] = {
3292
- '200': "ResponseModel",
3419
+ '200': "MetricsFields",
3293
3420
  '400': "ErrorResponseModel",
3294
3421
  '401': "ErrorResponseModel",
3295
3422
  '404': "ErrorResponseModel",
3423
+ '406': "ErrorResponseModel",
3296
3424
  '500': None,
3297
3425
  }
3298
3426
  response_data = self.api_client.call_api(
@@ -3307,9 +3435,10 @@ class VirtualMachineApi:
3307
3435
 
3308
3436
 
3309
3437
  @validate_call
3310
- def get_instance_stop_without_preload_content(
3438
+ def get_vm_metrics_without_preload_content(
3311
3439
  self,
3312
3440
  vm_id: StrictInt,
3441
+ duration: Optional[StrictStr] = None,
3313
3442
  _request_timeout: Union[
3314
3443
  None,
3315
3444
  Annotated[StrictFloat, Field(gt=0)],
@@ -3323,12 +3452,14 @@ class VirtualMachineApi:
3323
3452
  _headers: Optional[Dict[StrictStr, Any]] = None,
3324
3453
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
3325
3454
  ) -> RESTResponseType:
3326
- """Stop virtual machine
3455
+ """Retrieve virtual machine performance metrics
3327
3456
 
3328
- Shuts down a virtual machine. Provide the virtual machine ID in the path to initiate the shutdown process for the specified virtual machine.
3457
+ 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).
3329
3458
 
3330
3459
  :param vm_id: (required)
3331
3460
  :type vm_id: int
3461
+ :param duration:
3462
+ :type duration: str
3332
3463
  :param _request_timeout: timeout setting for this request. If one
3333
3464
  number provided, it will be total request
3334
3465
  timeout. It can also be a pair (tuple) of
@@ -3351,8 +3482,9 @@ class VirtualMachineApi:
3351
3482
  :return: Returns the result object.
3352
3483
  """ # noqa: E501
3353
3484
 
3354
- _param = self._get_instance_stop_serialize(
3485
+ _param = self._get_vm_metrics_serialize(
3355
3486
  vm_id=vm_id,
3487
+ duration=duration,
3356
3488
  _request_auth=_request_auth,
3357
3489
  _content_type=_content_type,
3358
3490
  _headers=_headers,
@@ -3360,10 +3492,11 @@ class VirtualMachineApi:
3360
3492
  )
3361
3493
 
3362
3494
  _response_types_map: Dict[str, Optional[str]] = {
3363
- '200': "ResponseModel",
3495
+ '200': "MetricsFields",
3364
3496
  '400': "ErrorResponseModel",
3365
3497
  '401': "ErrorResponseModel",
3366
3498
  '404': "ErrorResponseModel",
3499
+ '406': "ErrorResponseModel",
3367
3500
  '500': None,
3368
3501
  }
3369
3502
  response_data = self.api_client.call_api(
@@ -3373,9 +3506,10 @@ class VirtualMachineApi:
3373
3506
  return response_data.response
3374
3507
 
3375
3508
 
3376
- def _get_instance_stop_serialize(
3509
+ def _get_vm_metrics_serialize(
3377
3510
  self,
3378
3511
  vm_id,
3512
+ duration,
3379
3513
  _request_auth,
3380
3514
  _content_type,
3381
3515
  _headers,
@@ -3400,6 +3534,10 @@ class VirtualMachineApi:
3400
3534
  if vm_id is not None:
3401
3535
  _path_params['vm_id'] = vm_id
3402
3536
  # process the query parameters
3537
+ if duration is not None:
3538
+
3539
+ _query_params.append(('duration', duration))
3540
+
3403
3541
  # process the header parameters
3404
3542
  # process the form parameters
3405
3543
  # process the body parameter
@@ -3421,7 +3559,7 @@ class VirtualMachineApi:
3421
3559
 
3422
3560
  return self.api_client.param_serialize(
3423
3561
  method='GET',
3424
- resource_path='/core/virtual-machines/{vm_id}/stop',
3562
+ resource_path='/core/virtual-machines/{vm_id}/metrics',
3425
3563
  path_params=_path_params,
3426
3564
  query_params=_query_params,
3427
3565
  header_params=_header_params,
@@ -3438,13 +3576,9 @@ class VirtualMachineApi:
3438
3576
 
3439
3577
 
3440
3578
  @validate_call
3441
- def list_virtual_machines(
3579
+ def hard_reboot_vm(
3442
3580
  self,
3443
- page: Optional[StrictInt] = None,
3444
- page_size: Optional[StrictInt] = None,
3445
- search: Optional[StrictStr] = None,
3446
- environment: Optional[StrictStr] = None,
3447
- exclude_firewalls: Annotated[Optional[List[StrictInt]], Field(description="Comma-separated list of Security Group IDs to ignore instances attached")] = None,
3581
+ vm_id: StrictInt,
3448
3582
  _request_timeout: Union[
3449
3583
  None,
3450
3584
  Annotated[StrictFloat, Field(gt=0)],
@@ -3457,21 +3591,13 @@ class VirtualMachineApi:
3457
3591
  _content_type: Optional[StrictStr] = None,
3458
3592
  _headers: Optional[Dict[StrictStr, Any]] = None,
3459
3593
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
3460
- ) -> Instances:
3461
- """List virtual machines
3594
+ ) -> ResponseModel:
3595
+ """Hard reboot virtual machine
3462
3596
 
3463
- 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.
3597
+ 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.
3464
3598
 
3465
- :param page:
3466
- :type page: int
3467
- :param page_size:
3468
- :type page_size: int
3469
- :param search:
3470
- :type search: str
3471
- :param environment:
3472
- :type environment: str
3473
- :param exclude_firewalls: Comma-separated list of Security Group IDs to ignore instances attached
3474
- :type exclude_firewalls: List[int]
3599
+ :param vm_id: (required)
3600
+ :type vm_id: int
3475
3601
  :param _request_timeout: timeout setting for this request. If one
3476
3602
  number provided, it will be total request
3477
3603
  timeout. It can also be a pair (tuple) of
@@ -3494,12 +3620,8 @@ class VirtualMachineApi:
3494
3620
  :return: Returns the result object.
3495
3621
  """ # noqa: E501
3496
3622
 
3497
- _param = self._list_virtual_machines_serialize(
3498
- page=page,
3499
- page_size=page_size,
3500
- search=search,
3501
- environment=environment,
3502
- exclude_firewalls=exclude_firewalls,
3623
+ _param = self._hard_reboot_vm_serialize(
3624
+ vm_id=vm_id,
3503
3625
  _request_auth=_request_auth,
3504
3626
  _content_type=_content_type,
3505
3627
  _headers=_headers,
@@ -3507,9 +3629,10 @@ class VirtualMachineApi:
3507
3629
  )
3508
3630
 
3509
3631
  _response_types_map: Dict[str, Optional[str]] = {
3510
- '200': "Instances",
3632
+ '200': "ResponseModel",
3511
3633
  '400': "ErrorResponseModel",
3512
3634
  '401': "ErrorResponseModel",
3635
+ '404': "ErrorResponseModel",
3513
3636
  '500': None,
3514
3637
  }
3515
3638
  response_data = self.api_client.call_api(
@@ -3524,13 +3647,9 @@ class VirtualMachineApi:
3524
3647
 
3525
3648
 
3526
3649
  @validate_call
3527
- def list_virtual_machines_with_http_info(
3650
+ def hard_reboot_vm_with_http_info(
3528
3651
  self,
3529
- page: Optional[StrictInt] = None,
3530
- page_size: Optional[StrictInt] = None,
3531
- search: Optional[StrictStr] = None,
3532
- environment: Optional[StrictStr] = None,
3533
- exclude_firewalls: Annotated[Optional[List[StrictInt]], Field(description="Comma-separated list of Security Group IDs to ignore instances attached")] = None,
3652
+ vm_id: StrictInt,
3534
3653
  _request_timeout: Union[
3535
3654
  None,
3536
3655
  Annotated[StrictFloat, Field(gt=0)],
@@ -3543,21 +3662,13 @@ class VirtualMachineApi:
3543
3662
  _content_type: Optional[StrictStr] = None,
3544
3663
  _headers: Optional[Dict[StrictStr, Any]] = None,
3545
3664
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
3546
- ) -> ApiResponse[Instances]:
3547
- """List virtual machines
3665
+ ) -> ApiResponse[ResponseModel]:
3666
+ """Hard reboot virtual machine
3548
3667
 
3549
- 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.
3668
+ 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.
3550
3669
 
3551
- :param page:
3552
- :type page: int
3553
- :param page_size:
3554
- :type page_size: int
3555
- :param search:
3556
- :type search: str
3557
- :param environment:
3558
- :type environment: str
3559
- :param exclude_firewalls: Comma-separated list of Security Group IDs to ignore instances attached
3560
- :type exclude_firewalls: List[int]
3670
+ :param vm_id: (required)
3671
+ :type vm_id: int
3561
3672
  :param _request_timeout: timeout setting for this request. If one
3562
3673
  number provided, it will be total request
3563
3674
  timeout. It can also be a pair (tuple) of
@@ -3580,12 +3691,8 @@ class VirtualMachineApi:
3580
3691
  :return: Returns the result object.
3581
3692
  """ # noqa: E501
3582
3693
 
3583
- _param = self._list_virtual_machines_serialize(
3584
- page=page,
3585
- page_size=page_size,
3586
- search=search,
3587
- environment=environment,
3588
- exclude_firewalls=exclude_firewalls,
3694
+ _param = self._hard_reboot_vm_serialize(
3695
+ vm_id=vm_id,
3589
3696
  _request_auth=_request_auth,
3590
3697
  _content_type=_content_type,
3591
3698
  _headers=_headers,
@@ -3593,9 +3700,10 @@ class VirtualMachineApi:
3593
3700
  )
3594
3701
 
3595
3702
  _response_types_map: Dict[str, Optional[str]] = {
3596
- '200': "Instances",
3703
+ '200': "ResponseModel",
3597
3704
  '400': "ErrorResponseModel",
3598
3705
  '401': "ErrorResponseModel",
3706
+ '404': "ErrorResponseModel",
3599
3707
  '500': None,
3600
3708
  }
3601
3709
  response_data = self.api_client.call_api(
@@ -3610,13 +3718,9 @@ class VirtualMachineApi:
3610
3718
 
3611
3719
 
3612
3720
  @validate_call
3613
- def list_virtual_machines_without_preload_content(
3721
+ def hard_reboot_vm_without_preload_content(
3614
3722
  self,
3615
- page: Optional[StrictInt] = None,
3616
- page_size: Optional[StrictInt] = None,
3617
- search: Optional[StrictStr] = None,
3618
- environment: Optional[StrictStr] = None,
3619
- exclude_firewalls: Annotated[Optional[List[StrictInt]], Field(description="Comma-separated list of Security Group IDs to ignore instances attached")] = None,
3723
+ vm_id: StrictInt,
3620
3724
  _request_timeout: Union[
3621
3725
  None,
3622
3726
  Annotated[StrictFloat, Field(gt=0)],
@@ -3630,20 +3734,12 @@ class VirtualMachineApi:
3630
3734
  _headers: Optional[Dict[StrictStr, Any]] = None,
3631
3735
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
3632
3736
  ) -> RESTResponseType:
3633
- """List virtual machines
3737
+ """Hard reboot virtual machine
3634
3738
 
3635
- 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.
3739
+ 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.
3636
3740
 
3637
- :param page:
3638
- :type page: int
3639
- :param page_size:
3640
- :type page_size: int
3641
- :param search:
3642
- :type search: str
3643
- :param environment:
3644
- :type environment: str
3645
- :param exclude_firewalls: Comma-separated list of Security Group IDs to ignore instances attached
3646
- :type exclude_firewalls: List[int]
3741
+ :param vm_id: (required)
3742
+ :type vm_id: int
3647
3743
  :param _request_timeout: timeout setting for this request. If one
3648
3744
  number provided, it will be total request
3649
3745
  timeout. It can also be a pair (tuple) of
@@ -3666,12 +3762,8 @@ class VirtualMachineApi:
3666
3762
  :return: Returns the result object.
3667
3763
  """ # noqa: E501
3668
3764
 
3669
- _param = self._list_virtual_machines_serialize(
3670
- page=page,
3671
- page_size=page_size,
3672
- search=search,
3673
- environment=environment,
3674
- exclude_firewalls=exclude_firewalls,
3765
+ _param = self._hard_reboot_vm_serialize(
3766
+ vm_id=vm_id,
3675
3767
  _request_auth=_request_auth,
3676
3768
  _content_type=_content_type,
3677
3769
  _headers=_headers,
@@ -3679,9 +3771,10 @@ class VirtualMachineApi:
3679
3771
  )
3680
3772
 
3681
3773
  _response_types_map: Dict[str, Optional[str]] = {
3682
- '200': "Instances",
3774
+ '200': "ResponseModel",
3683
3775
  '400': "ErrorResponseModel",
3684
3776
  '401': "ErrorResponseModel",
3777
+ '404': "ErrorResponseModel",
3685
3778
  '500': None,
3686
3779
  }
3687
3780
  response_data = self.api_client.call_api(
@@ -3691,13 +3784,9 @@ class VirtualMachineApi:
3691
3784
  return response_data.response
3692
3785
 
3693
3786
 
3694
- def _list_virtual_machines_serialize(
3787
+ def _hard_reboot_vm_serialize(
3695
3788
  self,
3696
- page,
3697
- page_size,
3698
- search,
3699
- environment,
3700
- exclude_firewalls,
3789
+ vm_id,
3701
3790
  _request_auth,
3702
3791
  _content_type,
3703
3792
  _headers,
@@ -3707,7 +3796,6 @@ class VirtualMachineApi:
3707
3796
  _host = None
3708
3797
 
3709
3798
  _collection_formats: Dict[str, str] = {
3710
- 'exclude_firewalls': 'multi',
3711
3799
  }
3712
3800
 
3713
3801
  _path_params: Dict[str, str] = {}
@@ -3720,27 +3808,9 @@ class VirtualMachineApi:
3720
3808
  _body_params: Optional[bytes] = None
3721
3809
 
3722
3810
  # process the path parameters
3811
+ if vm_id is not None:
3812
+ _path_params['vm_id'] = vm_id
3723
3813
  # process the query parameters
3724
- if page is not None:
3725
-
3726
- _query_params.append(('page', page))
3727
-
3728
- if page_size is not None:
3729
-
3730
- _query_params.append(('pageSize', page_size))
3731
-
3732
- if search is not None:
3733
-
3734
- _query_params.append(('search', search))
3735
-
3736
- if environment is not None:
3737
-
3738
- _query_params.append(('environment', environment))
3739
-
3740
- if exclude_firewalls is not None:
3741
-
3742
- _query_params.append(('exclude_firewalls', exclude_firewalls))
3743
-
3744
3814
  # process the header parameters
3745
3815
  # process the form parameters
3746
3816
  # process the body parameter
@@ -3762,7 +3832,7 @@ class VirtualMachineApi:
3762
3832
 
3763
3833
  return self.api_client.param_serialize(
3764
3834
  method='GET',
3765
- resource_path='/core/virtual-machines',
3835
+ resource_path='/core/virtual-machines/{vm_id}/hard-reboot',
3766
3836
  path_params=_path_params,
3767
3837
  query_params=_query_params,
3768
3838
  header_params=_header_params,
@@ -3779,10 +3849,10 @@ class VirtualMachineApi:
3779
3849
 
3780
3850
 
3781
3851
  @validate_call
3782
- def post_instance_logs(
3852
+ def hibernate_vm(
3783
3853
  self,
3784
3854
  vm_id: StrictInt,
3785
- payload: RequestInstanceLogsPayload,
3855
+ retain_ip: Annotated[Optional[StrictStr], Field(description="false")] = None,
3786
3856
  _request_timeout: Union[
3787
3857
  None,
3788
3858
  Annotated[StrictFloat, Field(gt=0)],
@@ -3795,15 +3865,15 @@ class VirtualMachineApi:
3795
3865
  _content_type: Optional[StrictStr] = None,
3796
3866
  _headers: Optional[Dict[StrictStr, Any]] = None,
3797
3867
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
3798
- ) -> RequestInstanceLogsResponse:
3799
- """Request virtual machine logs
3868
+ ) -> ResponseModel:
3869
+ """Hibernate virtual machine
3800
3870
 
3801
- Request console logs for a virtual machine
3871
+ 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.
3802
3872
 
3803
3873
  :param vm_id: (required)
3804
3874
  :type vm_id: int
3805
- :param payload: (required)
3806
- :type payload: RequestInstanceLogsPayload
3875
+ :param retain_ip: false
3876
+ :type retain_ip: str
3807
3877
  :param _request_timeout: timeout setting for this request. If one
3808
3878
  number provided, it will be total request
3809
3879
  timeout. It can also be a pair (tuple) of
@@ -3826,9 +3896,9 @@ class VirtualMachineApi:
3826
3896
  :return: Returns the result object.
3827
3897
  """ # noqa: E501
3828
3898
 
3829
- _param = self._post_instance_logs_serialize(
3899
+ _param = self._hibernate_vm_serialize(
3830
3900
  vm_id=vm_id,
3831
- payload=payload,
3901
+ retain_ip=retain_ip,
3832
3902
  _request_auth=_request_auth,
3833
3903
  _content_type=_content_type,
3834
3904
  _headers=_headers,
@@ -3836,11 +3906,10 @@ class VirtualMachineApi:
3836
3906
  )
3837
3907
 
3838
3908
  _response_types_map: Dict[str, Optional[str]] = {
3839
- '200': "RequestInstanceLogsResponse",
3909
+ '200': "ResponseModel",
3840
3910
  '400': "ErrorResponseModel",
3841
3911
  '401': "ErrorResponseModel",
3842
3912
  '404': "ErrorResponseModel",
3843
- '405': "ErrorResponseModel",
3844
3913
  '500': None,
3845
3914
  }
3846
3915
  response_data = self.api_client.call_api(
@@ -3855,10 +3924,10 @@ class VirtualMachineApi:
3855
3924
 
3856
3925
 
3857
3926
  @validate_call
3858
- def post_instance_logs_with_http_info(
3927
+ def hibernate_vm_with_http_info(
3859
3928
  self,
3860
3929
  vm_id: StrictInt,
3861
- payload: RequestInstanceLogsPayload,
3930
+ retain_ip: Annotated[Optional[StrictStr], Field(description="false")] = None,
3862
3931
  _request_timeout: Union[
3863
3932
  None,
3864
3933
  Annotated[StrictFloat, Field(gt=0)],
@@ -3871,15 +3940,15 @@ class VirtualMachineApi:
3871
3940
  _content_type: Optional[StrictStr] = None,
3872
3941
  _headers: Optional[Dict[StrictStr, Any]] = None,
3873
3942
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
3874
- ) -> ApiResponse[RequestInstanceLogsResponse]:
3875
- """Request virtual machine logs
3943
+ ) -> ApiResponse[ResponseModel]:
3944
+ """Hibernate virtual machine
3876
3945
 
3877
- Request console logs for a virtual machine
3946
+ 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.
3878
3947
 
3879
3948
  :param vm_id: (required)
3880
3949
  :type vm_id: int
3881
- :param payload: (required)
3882
- :type payload: RequestInstanceLogsPayload
3950
+ :param retain_ip: false
3951
+ :type retain_ip: str
3883
3952
  :param _request_timeout: timeout setting for this request. If one
3884
3953
  number provided, it will be total request
3885
3954
  timeout. It can also be a pair (tuple) of
@@ -3902,9 +3971,9 @@ class VirtualMachineApi:
3902
3971
  :return: Returns the result object.
3903
3972
  """ # noqa: E501
3904
3973
 
3905
- _param = self._post_instance_logs_serialize(
3974
+ _param = self._hibernate_vm_serialize(
3906
3975
  vm_id=vm_id,
3907
- payload=payload,
3976
+ retain_ip=retain_ip,
3908
3977
  _request_auth=_request_auth,
3909
3978
  _content_type=_content_type,
3910
3979
  _headers=_headers,
@@ -3912,11 +3981,10 @@ class VirtualMachineApi:
3912
3981
  )
3913
3982
 
3914
3983
  _response_types_map: Dict[str, Optional[str]] = {
3915
- '200': "RequestInstanceLogsResponse",
3984
+ '200': "ResponseModel",
3916
3985
  '400': "ErrorResponseModel",
3917
3986
  '401': "ErrorResponseModel",
3918
3987
  '404': "ErrorResponseModel",
3919
- '405': "ErrorResponseModel",
3920
3988
  '500': None,
3921
3989
  }
3922
3990
  response_data = self.api_client.call_api(
@@ -3931,10 +3999,10 @@ class VirtualMachineApi:
3931
3999
 
3932
4000
 
3933
4001
  @validate_call
3934
- def post_instance_logs_without_preload_content(
4002
+ def hibernate_vm_without_preload_content(
3935
4003
  self,
3936
4004
  vm_id: StrictInt,
3937
- payload: RequestInstanceLogsPayload,
4005
+ retain_ip: Annotated[Optional[StrictStr], Field(description="false")] = None,
3938
4006
  _request_timeout: Union[
3939
4007
  None,
3940
4008
  Annotated[StrictFloat, Field(gt=0)],
@@ -3948,14 +4016,14 @@ class VirtualMachineApi:
3948
4016
  _headers: Optional[Dict[StrictStr, Any]] = None,
3949
4017
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
3950
4018
  ) -> RESTResponseType:
3951
- """Request virtual machine logs
4019
+ """Hibernate virtual machine
3952
4020
 
3953
- Request console logs for a virtual machine
4021
+ 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.
3954
4022
 
3955
4023
  :param vm_id: (required)
3956
4024
  :type vm_id: int
3957
- :param payload: (required)
3958
- :type payload: RequestInstanceLogsPayload
4025
+ :param retain_ip: false
4026
+ :type retain_ip: str
3959
4027
  :param _request_timeout: timeout setting for this request. If one
3960
4028
  number provided, it will be total request
3961
4029
  timeout. It can also be a pair (tuple) of
@@ -3978,9 +4046,9 @@ class VirtualMachineApi:
3978
4046
  :return: Returns the result object.
3979
4047
  """ # noqa: E501
3980
4048
 
3981
- _param = self._post_instance_logs_serialize(
4049
+ _param = self._hibernate_vm_serialize(
3982
4050
  vm_id=vm_id,
3983
- payload=payload,
4051
+ retain_ip=retain_ip,
3984
4052
  _request_auth=_request_auth,
3985
4053
  _content_type=_content_type,
3986
4054
  _headers=_headers,
@@ -3988,11 +4056,10 @@ class VirtualMachineApi:
3988
4056
  )
3989
4057
 
3990
4058
  _response_types_map: Dict[str, Optional[str]] = {
3991
- '200': "RequestInstanceLogsResponse",
4059
+ '200': "ResponseModel",
3992
4060
  '400': "ErrorResponseModel",
3993
4061
  '401': "ErrorResponseModel",
3994
4062
  '404': "ErrorResponseModel",
3995
- '405': "ErrorResponseModel",
3996
4063
  '500': None,
3997
4064
  }
3998
4065
  response_data = self.api_client.call_api(
@@ -4002,10 +4069,10 @@ class VirtualMachineApi:
4002
4069
  return response_data.response
4003
4070
 
4004
4071
 
4005
- def _post_instance_logs_serialize(
4072
+ def _hibernate_vm_serialize(
4006
4073
  self,
4007
4074
  vm_id,
4008
- payload,
4075
+ retain_ip,
4009
4076
  _request_auth,
4010
4077
  _content_type,
4011
4078
  _headers,
@@ -4030,11 +4097,13 @@ class VirtualMachineApi:
4030
4097
  if vm_id is not None:
4031
4098
  _path_params['vm_id'] = vm_id
4032
4099
  # process the query parameters
4100
+ if retain_ip is not None:
4101
+
4102
+ _query_params.append(('retain_ip', retain_ip))
4103
+
4033
4104
  # process the header parameters
4034
4105
  # process the form parameters
4035
4106
  # process the body parameter
4036
- if payload is not None:
4037
- _body_params = payload
4038
4107
 
4039
4108
 
4040
4109
  # set the HTTP header `Accept`
@@ -4045,19 +4114,6 @@ class VirtualMachineApi:
4045
4114
  ]
4046
4115
  )
4047
4116
 
4048
- # set the HTTP header `Content-Type`
4049
- if _content_type:
4050
- _header_params['Content-Type'] = _content_type
4051
- else:
4052
- _default_content_type = (
4053
- self.api_client.select_header_content_type(
4054
- [
4055
- 'application/json'
4056
- ]
4057
- )
4058
- )
4059
- if _default_content_type is not None:
4060
- _header_params['Content-Type'] = _default_content_type
4061
4117
 
4062
4118
  # authentication setting
4063
4119
  _auth_settings: List[str] = [
@@ -4065,8 +4121,8 @@ class VirtualMachineApi:
4065
4121
  ]
4066
4122
 
4067
4123
  return self.api_client.param_serialize(
4068
- method='POST',
4069
- resource_path='/core/virtual-machines/{vm_id}/logs',
4124
+ method='GET',
4125
+ resource_path='/core/virtual-machines/{vm_id}/hibernate',
4070
4126
  path_params=_path_params,
4071
4127
  query_params=_query_params,
4072
4128
  header_params=_header_params,
@@ -4083,10 +4139,13 @@ class VirtualMachineApi:
4083
4139
 
4084
4140
 
4085
4141
  @validate_call
4086
- def post_instance_resize(
4142
+ def list_vms(
4087
4143
  self,
4088
- vm_id: StrictInt,
4089
- payload: InstanceResizePayload,
4144
+ page: Optional[StrictInt] = None,
4145
+ page_size: Optional[StrictInt] = None,
4146
+ search: Optional[StrictStr] = None,
4147
+ environment: Optional[StrictStr] = None,
4148
+ exclude_firewalls: Annotated[Optional[List[StrictInt]], Field(description="Comma-separated list of Security Group IDs to ignore instances attached")] = None,
4090
4149
  _request_timeout: Union[
4091
4150
  None,
4092
4151
  Annotated[StrictFloat, Field(gt=0)],
@@ -4099,15 +4158,21 @@ class VirtualMachineApi:
4099
4158
  _content_type: Optional[StrictStr] = None,
4100
4159
  _headers: Optional[Dict[StrictStr, Any]] = None,
4101
4160
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
4102
- ) -> ResponseModel:
4103
- """Resize virtual machine
4161
+ ) -> Instances:
4162
+ """List virtual machines
4104
4163
 
4105
- 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).
4164
+ 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.
4106
4165
 
4107
- :param vm_id: (required)
4108
- :type vm_id: int
4109
- :param payload: (required)
4110
- :type payload: InstanceResizePayload
4166
+ :param page:
4167
+ :type page: int
4168
+ :param page_size:
4169
+ :type page_size: int
4170
+ :param search:
4171
+ :type search: str
4172
+ :param environment:
4173
+ :type environment: str
4174
+ :param exclude_firewalls: Comma-separated list of Security Group IDs to ignore instances attached
4175
+ :type exclude_firewalls: List[int]
4111
4176
  :param _request_timeout: timeout setting for this request. If one
4112
4177
  number provided, it will be total request
4113
4178
  timeout. It can also be a pair (tuple) of
@@ -4130,9 +4195,12 @@ class VirtualMachineApi:
4130
4195
  :return: Returns the result object.
4131
4196
  """ # noqa: E501
4132
4197
 
4133
- _param = self._post_instance_resize_serialize(
4134
- vm_id=vm_id,
4135
- payload=payload,
4198
+ _param = self._list_vms_serialize(
4199
+ page=page,
4200
+ page_size=page_size,
4201
+ search=search,
4202
+ environment=environment,
4203
+ exclude_firewalls=exclude_firewalls,
4136
4204
  _request_auth=_request_auth,
4137
4205
  _content_type=_content_type,
4138
4206
  _headers=_headers,
@@ -4140,11 +4208,9 @@ class VirtualMachineApi:
4140
4208
  )
4141
4209
 
4142
4210
  _response_types_map: Dict[str, Optional[str]] = {
4143
- '200': "ResponseModel",
4211
+ '200': "Instances",
4144
4212
  '400': "ErrorResponseModel",
4145
4213
  '401': "ErrorResponseModel",
4146
- '404': "ErrorResponseModel",
4147
- '405': "ErrorResponseModel",
4148
4214
  '500': None,
4149
4215
  }
4150
4216
  response_data = self.api_client.call_api(
@@ -4159,10 +4225,13 @@ class VirtualMachineApi:
4159
4225
 
4160
4226
 
4161
4227
  @validate_call
4162
- def post_instance_resize_with_http_info(
4228
+ def list_vms_with_http_info(
4163
4229
  self,
4164
- vm_id: StrictInt,
4165
- payload: InstanceResizePayload,
4230
+ page: Optional[StrictInt] = None,
4231
+ page_size: Optional[StrictInt] = None,
4232
+ search: Optional[StrictStr] = None,
4233
+ environment: Optional[StrictStr] = None,
4234
+ exclude_firewalls: Annotated[Optional[List[StrictInt]], Field(description="Comma-separated list of Security Group IDs to ignore instances attached")] = None,
4166
4235
  _request_timeout: Union[
4167
4236
  None,
4168
4237
  Annotated[StrictFloat, Field(gt=0)],
@@ -4175,15 +4244,21 @@ class VirtualMachineApi:
4175
4244
  _content_type: Optional[StrictStr] = None,
4176
4245
  _headers: Optional[Dict[StrictStr, Any]] = None,
4177
4246
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
4178
- ) -> ApiResponse[ResponseModel]:
4179
- """Resize virtual machine
4247
+ ) -> ApiResponse[Instances]:
4248
+ """List virtual machines
4180
4249
 
4181
- 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).
4250
+ 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.
4182
4251
 
4183
- :param vm_id: (required)
4184
- :type vm_id: int
4185
- :param payload: (required)
4186
- :type payload: InstanceResizePayload
4252
+ :param page:
4253
+ :type page: int
4254
+ :param page_size:
4255
+ :type page_size: int
4256
+ :param search:
4257
+ :type search: str
4258
+ :param environment:
4259
+ :type environment: str
4260
+ :param exclude_firewalls: Comma-separated list of Security Group IDs to ignore instances attached
4261
+ :type exclude_firewalls: List[int]
4187
4262
  :param _request_timeout: timeout setting for this request. If one
4188
4263
  number provided, it will be total request
4189
4264
  timeout. It can also be a pair (tuple) of
@@ -4206,9 +4281,12 @@ class VirtualMachineApi:
4206
4281
  :return: Returns the result object.
4207
4282
  """ # noqa: E501
4208
4283
 
4209
- _param = self._post_instance_resize_serialize(
4210
- vm_id=vm_id,
4211
- payload=payload,
4284
+ _param = self._list_vms_serialize(
4285
+ page=page,
4286
+ page_size=page_size,
4287
+ search=search,
4288
+ environment=environment,
4289
+ exclude_firewalls=exclude_firewalls,
4212
4290
  _request_auth=_request_auth,
4213
4291
  _content_type=_content_type,
4214
4292
  _headers=_headers,
@@ -4216,11 +4294,9 @@ class VirtualMachineApi:
4216
4294
  )
4217
4295
 
4218
4296
  _response_types_map: Dict[str, Optional[str]] = {
4219
- '200': "ResponseModel",
4297
+ '200': "Instances",
4220
4298
  '400': "ErrorResponseModel",
4221
4299
  '401': "ErrorResponseModel",
4222
- '404': "ErrorResponseModel",
4223
- '405': "ErrorResponseModel",
4224
4300
  '500': None,
4225
4301
  }
4226
4302
  response_data = self.api_client.call_api(
@@ -4235,10 +4311,13 @@ class VirtualMachineApi:
4235
4311
 
4236
4312
 
4237
4313
  @validate_call
4238
- def post_instance_resize_without_preload_content(
4314
+ def list_vms_without_preload_content(
4239
4315
  self,
4240
- vm_id: StrictInt,
4241
- payload: InstanceResizePayload,
4316
+ page: Optional[StrictInt] = None,
4317
+ page_size: Optional[StrictInt] = None,
4318
+ search: Optional[StrictStr] = None,
4319
+ environment: Optional[StrictStr] = None,
4320
+ exclude_firewalls: Annotated[Optional[List[StrictInt]], Field(description="Comma-separated list of Security Group IDs to ignore instances attached")] = None,
4242
4321
  _request_timeout: Union[
4243
4322
  None,
4244
4323
  Annotated[StrictFloat, Field(gt=0)],
@@ -4252,14 +4331,20 @@ class VirtualMachineApi:
4252
4331
  _headers: Optional[Dict[StrictStr, Any]] = None,
4253
4332
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
4254
4333
  ) -> RESTResponseType:
4255
- """Resize virtual machine
4334
+ """List virtual machines
4256
4335
 
4257
- 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).
4336
+ 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.
4258
4337
 
4259
- :param vm_id: (required)
4260
- :type vm_id: int
4261
- :param payload: (required)
4262
- :type payload: InstanceResizePayload
4338
+ :param page:
4339
+ :type page: int
4340
+ :param page_size:
4341
+ :type page_size: int
4342
+ :param search:
4343
+ :type search: str
4344
+ :param environment:
4345
+ :type environment: str
4346
+ :param exclude_firewalls: Comma-separated list of Security Group IDs to ignore instances attached
4347
+ :type exclude_firewalls: List[int]
4263
4348
  :param _request_timeout: timeout setting for this request. If one
4264
4349
  number provided, it will be total request
4265
4350
  timeout. It can also be a pair (tuple) of
@@ -4282,9 +4367,12 @@ class VirtualMachineApi:
4282
4367
  :return: Returns the result object.
4283
4368
  """ # noqa: E501
4284
4369
 
4285
- _param = self._post_instance_resize_serialize(
4286
- vm_id=vm_id,
4287
- payload=payload,
4370
+ _param = self._list_vms_serialize(
4371
+ page=page,
4372
+ page_size=page_size,
4373
+ search=search,
4374
+ environment=environment,
4375
+ exclude_firewalls=exclude_firewalls,
4288
4376
  _request_auth=_request_auth,
4289
4377
  _content_type=_content_type,
4290
4378
  _headers=_headers,
@@ -4292,11 +4380,9 @@ class VirtualMachineApi:
4292
4380
  )
4293
4381
 
4294
4382
  _response_types_map: Dict[str, Optional[str]] = {
4295
- '200': "ResponseModel",
4383
+ '200': "Instances",
4296
4384
  '400': "ErrorResponseModel",
4297
4385
  '401': "ErrorResponseModel",
4298
- '404': "ErrorResponseModel",
4299
- '405': "ErrorResponseModel",
4300
4386
  '500': None,
4301
4387
  }
4302
4388
  response_data = self.api_client.call_api(
@@ -4306,10 +4392,13 @@ class VirtualMachineApi:
4306
4392
  return response_data.response
4307
4393
 
4308
4394
 
4309
- def _post_instance_resize_serialize(
4395
+ def _list_vms_serialize(
4310
4396
  self,
4311
- vm_id,
4312
- payload,
4397
+ page,
4398
+ page_size,
4399
+ search,
4400
+ environment,
4401
+ exclude_firewalls,
4313
4402
  _request_auth,
4314
4403
  _content_type,
4315
4404
  _headers,
@@ -4319,6 +4408,7 @@ class VirtualMachineApi:
4319
4408
  _host = None
4320
4409
 
4321
4410
  _collection_formats: Dict[str, str] = {
4411
+ 'exclude_firewalls': 'multi',
4322
4412
  }
4323
4413
 
4324
4414
  _path_params: Dict[str, str] = {}
@@ -4331,14 +4421,30 @@ class VirtualMachineApi:
4331
4421
  _body_params: Optional[bytes] = None
4332
4422
 
4333
4423
  # process the path parameters
4334
- if vm_id is not None:
4335
- _path_params['vm_id'] = vm_id
4336
4424
  # process the query parameters
4425
+ if page is not None:
4426
+
4427
+ _query_params.append(('page', page))
4428
+
4429
+ if page_size is not None:
4430
+
4431
+ _query_params.append(('pageSize', page_size))
4432
+
4433
+ if search is not None:
4434
+
4435
+ _query_params.append(('search', search))
4436
+
4437
+ if environment is not None:
4438
+
4439
+ _query_params.append(('environment', environment))
4440
+
4441
+ if exclude_firewalls is not None:
4442
+
4443
+ _query_params.append(('exclude_firewalls', exclude_firewalls))
4444
+
4337
4445
  # process the header parameters
4338
4446
  # process the form parameters
4339
4447
  # process the body parameter
4340
- if payload is not None:
4341
- _body_params = payload
4342
4448
 
4343
4449
 
4344
4450
  # set the HTTP header `Accept`
@@ -4349,19 +4455,6 @@ class VirtualMachineApi:
4349
4455
  ]
4350
4456
  )
4351
4457
 
4352
- # set the HTTP header `Content-Type`
4353
- if _content_type:
4354
- _header_params['Content-Type'] = _content_type
4355
- else:
4356
- _default_content_type = (
4357
- self.api_client.select_header_content_type(
4358
- [
4359
- 'application/json'
4360
- ]
4361
- )
4362
- )
4363
- if _default_content_type is not None:
4364
- _header_params['Content-Type'] = _default_content_type
4365
4458
 
4366
4459
  # authentication setting
4367
4460
  _auth_settings: List[str] = [
@@ -4369,8 +4462,8 @@ class VirtualMachineApi:
4369
4462
  ]
4370
4463
 
4371
4464
  return self.api_client.param_serialize(
4372
- method='POST',
4373
- resource_path='/core/virtual-machines/{vm_id}/resize',
4465
+ method='GET',
4466
+ resource_path='/core/virtual-machines',
4374
4467
  path_params=_path_params,
4375
4468
  query_params=_query_params,
4376
4469
  header_params=_header_params,
@@ -4387,10 +4480,10 @@ class VirtualMachineApi:
4387
4480
 
4388
4481
 
4389
4482
  @validate_call
4390
- def post_security_rule(
4483
+ def request_vm_logs(
4391
4484
  self,
4392
4485
  vm_id: StrictInt,
4393
- payload: CreateSecurityRulePayload,
4486
+ payload: RequestInstanceLogsPayload,
4394
4487
  _request_timeout: Union[
4395
4488
  None,
4396
4489
  Annotated[StrictFloat, Field(gt=0)],
@@ -4403,15 +4496,15 @@ class VirtualMachineApi:
4403
4496
  _content_type: Optional[StrictStr] = None,
4404
4497
  _headers: Optional[Dict[StrictStr, Any]] = None,
4405
4498
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
4406
- ) -> SecurityGroupRule:
4407
- """Add firewall rule to virtual machine
4499
+ ) -> RequestInstanceLogsResponse:
4500
+ """Request virtual machine logs
4408
4501
 
4409
- 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).
4502
+ Request console logs for a virtual machine
4410
4503
 
4411
4504
  :param vm_id: (required)
4412
4505
  :type vm_id: int
4413
4506
  :param payload: (required)
4414
- :type payload: CreateSecurityRulePayload
4507
+ :type payload: RequestInstanceLogsPayload
4415
4508
  :param _request_timeout: timeout setting for this request. If one
4416
4509
  number provided, it will be total request
4417
4510
  timeout. It can also be a pair (tuple) of
@@ -4434,7 +4527,7 @@ class VirtualMachineApi:
4434
4527
  :return: Returns the result object.
4435
4528
  """ # noqa: E501
4436
4529
 
4437
- _param = self._post_security_rule_serialize(
4530
+ _param = self._request_vm_logs_serialize(
4438
4531
  vm_id=vm_id,
4439
4532
  payload=payload,
4440
4533
  _request_auth=_request_auth,
@@ -4444,11 +4537,11 @@ class VirtualMachineApi:
4444
4537
  )
4445
4538
 
4446
4539
  _response_types_map: Dict[str, Optional[str]] = {
4447
- '200': "SecurityGroupRule",
4540
+ '200': "RequestInstanceLogsResponse",
4448
4541
  '400': "ErrorResponseModel",
4449
4542
  '401': "ErrorResponseModel",
4450
4543
  '404': "ErrorResponseModel",
4451
- '409': "ErrorResponseModel",
4544
+ '405': "ErrorResponseModel",
4452
4545
  '500': None,
4453
4546
  }
4454
4547
  response_data = self.api_client.call_api(
@@ -4463,10 +4556,10 @@ class VirtualMachineApi:
4463
4556
 
4464
4557
 
4465
4558
  @validate_call
4466
- def post_security_rule_with_http_info(
4559
+ def request_vm_logs_with_http_info(
4467
4560
  self,
4468
4561
  vm_id: StrictInt,
4469
- payload: CreateSecurityRulePayload,
4562
+ payload: RequestInstanceLogsPayload,
4470
4563
  _request_timeout: Union[
4471
4564
  None,
4472
4565
  Annotated[StrictFloat, Field(gt=0)],
@@ -4479,15 +4572,15 @@ class VirtualMachineApi:
4479
4572
  _content_type: Optional[StrictStr] = None,
4480
4573
  _headers: Optional[Dict[StrictStr, Any]] = None,
4481
4574
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
4482
- ) -> ApiResponse[SecurityGroupRule]:
4483
- """Add firewall rule to virtual machine
4575
+ ) -> ApiResponse[RequestInstanceLogsResponse]:
4576
+ """Request virtual machine logs
4484
4577
 
4485
- 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).
4578
+ Request console logs for a virtual machine
4486
4579
 
4487
4580
  :param vm_id: (required)
4488
4581
  :type vm_id: int
4489
4582
  :param payload: (required)
4490
- :type payload: CreateSecurityRulePayload
4583
+ :type payload: RequestInstanceLogsPayload
4491
4584
  :param _request_timeout: timeout setting for this request. If one
4492
4585
  number provided, it will be total request
4493
4586
  timeout. It can also be a pair (tuple) of
@@ -4510,7 +4603,7 @@ class VirtualMachineApi:
4510
4603
  :return: Returns the result object.
4511
4604
  """ # noqa: E501
4512
4605
 
4513
- _param = self._post_security_rule_serialize(
4606
+ _param = self._request_vm_logs_serialize(
4514
4607
  vm_id=vm_id,
4515
4608
  payload=payload,
4516
4609
  _request_auth=_request_auth,
@@ -4520,11 +4613,11 @@ class VirtualMachineApi:
4520
4613
  )
4521
4614
 
4522
4615
  _response_types_map: Dict[str, Optional[str]] = {
4523
- '200': "SecurityGroupRule",
4616
+ '200': "RequestInstanceLogsResponse",
4524
4617
  '400': "ErrorResponseModel",
4525
4618
  '401': "ErrorResponseModel",
4526
4619
  '404': "ErrorResponseModel",
4527
- '409': "ErrorResponseModel",
4620
+ '405': "ErrorResponseModel",
4528
4621
  '500': None,
4529
4622
  }
4530
4623
  response_data = self.api_client.call_api(
@@ -4539,10 +4632,10 @@ class VirtualMachineApi:
4539
4632
 
4540
4633
 
4541
4634
  @validate_call
4542
- def post_security_rule_without_preload_content(
4635
+ def request_vm_logs_without_preload_content(
4543
4636
  self,
4544
4637
  vm_id: StrictInt,
4545
- payload: CreateSecurityRulePayload,
4638
+ payload: RequestInstanceLogsPayload,
4546
4639
  _request_timeout: Union[
4547
4640
  None,
4548
4641
  Annotated[StrictFloat, Field(gt=0)],
@@ -4556,14 +4649,14 @@ class VirtualMachineApi:
4556
4649
  _headers: Optional[Dict[StrictStr, Any]] = None,
4557
4650
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
4558
4651
  ) -> RESTResponseType:
4559
- """Add firewall rule to virtual machine
4652
+ """Request virtual machine logs
4560
4653
 
4561
- 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).
4654
+ Request console logs for a virtual machine
4562
4655
 
4563
4656
  :param vm_id: (required)
4564
4657
  :type vm_id: int
4565
4658
  :param payload: (required)
4566
- :type payload: CreateSecurityRulePayload
4659
+ :type payload: RequestInstanceLogsPayload
4567
4660
  :param _request_timeout: timeout setting for this request. If one
4568
4661
  number provided, it will be total request
4569
4662
  timeout. It can also be a pair (tuple) of
@@ -4586,7 +4679,7 @@ class VirtualMachineApi:
4586
4679
  :return: Returns the result object.
4587
4680
  """ # noqa: E501
4588
4681
 
4589
- _param = self._post_security_rule_serialize(
4682
+ _param = self._request_vm_logs_serialize(
4590
4683
  vm_id=vm_id,
4591
4684
  payload=payload,
4592
4685
  _request_auth=_request_auth,
@@ -4596,11 +4689,11 @@ class VirtualMachineApi:
4596
4689
  )
4597
4690
 
4598
4691
  _response_types_map: Dict[str, Optional[str]] = {
4599
- '200': "SecurityGroupRule",
4692
+ '200': "RequestInstanceLogsResponse",
4600
4693
  '400': "ErrorResponseModel",
4601
4694
  '401': "ErrorResponseModel",
4602
4695
  '404': "ErrorResponseModel",
4603
- '409': "ErrorResponseModel",
4696
+ '405': "ErrorResponseModel",
4604
4697
  '500': None,
4605
4698
  }
4606
4699
  response_data = self.api_client.call_api(
@@ -4610,7 +4703,7 @@ class VirtualMachineApi:
4610
4703
  return response_data.response
4611
4704
 
4612
4705
 
4613
- def _post_security_rule_serialize(
4706
+ def _request_vm_logs_serialize(
4614
4707
  self,
4615
4708
  vm_id,
4616
4709
  payload,
@@ -4674,7 +4767,7 @@ class VirtualMachineApi:
4674
4767
 
4675
4768
  return self.api_client.param_serialize(
4676
4769
  method='POST',
4677
- resource_path='/core/virtual-machines/{vm_id}/sg-rules',
4770
+ resource_path='/core/virtual-machines/{vm_id}/logs',
4678
4771
  path_params=_path_params,
4679
4772
  query_params=_query_params,
4680
4773
  header_params=_header_params,
@@ -4691,10 +4784,10 @@ class VirtualMachineApi:
4691
4784
 
4692
4785
 
4693
4786
  @validate_call
4694
- def post_snapshots(
4787
+ def resize_vm(
4695
4788
  self,
4696
4789
  vm_id: StrictInt,
4697
- payload: CreateSnapshotPayload,
4790
+ payload: InstanceResizePayload,
4698
4791
  _request_timeout: Union[
4699
4792
  None,
4700
4793
  Annotated[StrictFloat, Field(gt=0)],
@@ -4707,15 +4800,15 @@ class VirtualMachineApi:
4707
4800
  _content_type: Optional[StrictStr] = None,
4708
4801
  _headers: Optional[Dict[StrictStr, Any]] = None,
4709
4802
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
4710
- ) -> CreateSnapshotResponse:
4711
- """Create snapshot from a virtual machine
4803
+ ) -> ResponseModel:
4804
+ """Resize virtual machine
4712
4805
 
4713
- Create snapshots of a virtual machine by providing the virtual machine ID in the path
4806
+ 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).
4714
4807
 
4715
4808
  :param vm_id: (required)
4716
4809
  :type vm_id: int
4717
4810
  :param payload: (required)
4718
- :type payload: CreateSnapshotPayload
4811
+ :type payload: InstanceResizePayload
4719
4812
  :param _request_timeout: timeout setting for this request. If one
4720
4813
  number provided, it will be total request
4721
4814
  timeout. It can also be a pair (tuple) of
@@ -4738,7 +4831,7 @@ class VirtualMachineApi:
4738
4831
  :return: Returns the result object.
4739
4832
  """ # noqa: E501
4740
4833
 
4741
- _param = self._post_snapshots_serialize(
4834
+ _param = self._resize_vm_serialize(
4742
4835
  vm_id=vm_id,
4743
4836
  payload=payload,
4744
4837
  _request_auth=_request_auth,
@@ -4748,10 +4841,11 @@ class VirtualMachineApi:
4748
4841
  )
4749
4842
 
4750
4843
  _response_types_map: Dict[str, Optional[str]] = {
4751
- '201': "CreateSnapshotResponse",
4844
+ '200': "ResponseModel",
4752
4845
  '400': "ErrorResponseModel",
4753
4846
  '401': "ErrorResponseModel",
4754
4847
  '404': "ErrorResponseModel",
4848
+ '405': "ErrorResponseModel",
4755
4849
  '500': None,
4756
4850
  }
4757
4851
  response_data = self.api_client.call_api(
@@ -4766,10 +4860,10 @@ class VirtualMachineApi:
4766
4860
 
4767
4861
 
4768
4862
  @validate_call
4769
- def post_snapshots_with_http_info(
4863
+ def resize_vm_with_http_info(
4770
4864
  self,
4771
4865
  vm_id: StrictInt,
4772
- payload: CreateSnapshotPayload,
4866
+ payload: InstanceResizePayload,
4773
4867
  _request_timeout: Union[
4774
4868
  None,
4775
4869
  Annotated[StrictFloat, Field(gt=0)],
@@ -4782,15 +4876,15 @@ class VirtualMachineApi:
4782
4876
  _content_type: Optional[StrictStr] = None,
4783
4877
  _headers: Optional[Dict[StrictStr, Any]] = None,
4784
4878
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
4785
- ) -> ApiResponse[CreateSnapshotResponse]:
4786
- """Create snapshot from a virtual machine
4879
+ ) -> ApiResponse[ResponseModel]:
4880
+ """Resize virtual machine
4787
4881
 
4788
- Create snapshots of a virtual machine by providing the virtual machine ID in the path
4882
+ 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).
4789
4883
 
4790
4884
  :param vm_id: (required)
4791
4885
  :type vm_id: int
4792
4886
  :param payload: (required)
4793
- :type payload: CreateSnapshotPayload
4887
+ :type payload: InstanceResizePayload
4794
4888
  :param _request_timeout: timeout setting for this request. If one
4795
4889
  number provided, it will be total request
4796
4890
  timeout. It can also be a pair (tuple) of
@@ -4813,7 +4907,7 @@ class VirtualMachineApi:
4813
4907
  :return: Returns the result object.
4814
4908
  """ # noqa: E501
4815
4909
 
4816
- _param = self._post_snapshots_serialize(
4910
+ _param = self._resize_vm_serialize(
4817
4911
  vm_id=vm_id,
4818
4912
  payload=payload,
4819
4913
  _request_auth=_request_auth,
@@ -4823,10 +4917,11 @@ class VirtualMachineApi:
4823
4917
  )
4824
4918
 
4825
4919
  _response_types_map: Dict[str, Optional[str]] = {
4826
- '201': "CreateSnapshotResponse",
4920
+ '200': "ResponseModel",
4827
4921
  '400': "ErrorResponseModel",
4828
4922
  '401': "ErrorResponseModel",
4829
4923
  '404': "ErrorResponseModel",
4924
+ '405': "ErrorResponseModel",
4830
4925
  '500': None,
4831
4926
  }
4832
4927
  response_data = self.api_client.call_api(
@@ -4841,10 +4936,10 @@ class VirtualMachineApi:
4841
4936
 
4842
4937
 
4843
4938
  @validate_call
4844
- def post_snapshots_without_preload_content(
4939
+ def resize_vm_without_preload_content(
4845
4940
  self,
4846
4941
  vm_id: StrictInt,
4847
- payload: CreateSnapshotPayload,
4942
+ payload: InstanceResizePayload,
4848
4943
  _request_timeout: Union[
4849
4944
  None,
4850
4945
  Annotated[StrictFloat, Field(gt=0)],
@@ -4858,14 +4953,14 @@ class VirtualMachineApi:
4858
4953
  _headers: Optional[Dict[StrictStr, Any]] = None,
4859
4954
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
4860
4955
  ) -> RESTResponseType:
4861
- """Create snapshot from a virtual machine
4956
+ """Resize virtual machine
4862
4957
 
4863
- Create snapshots of a virtual machine by providing the virtual machine ID in the path
4958
+ 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).
4864
4959
 
4865
4960
  :param vm_id: (required)
4866
4961
  :type vm_id: int
4867
4962
  :param payload: (required)
4868
- :type payload: CreateSnapshotPayload
4963
+ :type payload: InstanceResizePayload
4869
4964
  :param _request_timeout: timeout setting for this request. If one
4870
4965
  number provided, it will be total request
4871
4966
  timeout. It can also be a pair (tuple) of
@@ -4888,7 +4983,7 @@ class VirtualMachineApi:
4888
4983
  :return: Returns the result object.
4889
4984
  """ # noqa: E501
4890
4985
 
4891
- _param = self._post_snapshots_serialize(
4986
+ _param = self._resize_vm_serialize(
4892
4987
  vm_id=vm_id,
4893
4988
  payload=payload,
4894
4989
  _request_auth=_request_auth,
@@ -4898,10 +4993,11 @@ class VirtualMachineApi:
4898
4993
  )
4899
4994
 
4900
4995
  _response_types_map: Dict[str, Optional[str]] = {
4901
- '201': "CreateSnapshotResponse",
4996
+ '200': "ResponseModel",
4902
4997
  '400': "ErrorResponseModel",
4903
4998
  '401': "ErrorResponseModel",
4904
4999
  '404': "ErrorResponseModel",
5000
+ '405': "ErrorResponseModel",
4905
5001
  '500': None,
4906
5002
  }
4907
5003
  response_data = self.api_client.call_api(
@@ -4911,7 +5007,7 @@ class VirtualMachineApi:
4911
5007
  return response_data.response
4912
5008
 
4913
5009
 
4914
- def _post_snapshots_serialize(
5010
+ def _resize_vm_serialize(
4915
5011
  self,
4916
5012
  vm_id,
4917
5013
  payload,
@@ -4975,7 +5071,7 @@ class VirtualMachineApi:
4975
5071
 
4976
5072
  return self.api_client.param_serialize(
4977
5073
  method='POST',
4978
- resource_path='/core/virtual-machines/{vm_id}/snapshots',
5074
+ resource_path='/core/virtual-machines/{vm_id}/resize',
4979
5075
  path_params=_path_params,
4980
5076
  query_params=_query_params,
4981
5077
  header_params=_header_params,
@@ -4992,10 +5088,9 @@ class VirtualMachineApi:
4992
5088
 
4993
5089
 
4994
5090
  @validate_call
4995
- def put_labels(
5091
+ def restore_vm_from_hibernation(
4996
5092
  self,
4997
5093
  vm_id: StrictInt,
4998
- payload: EditLabelOfAnExistingVMPayload,
4999
5094
  _request_timeout: Union[
5000
5095
  None,
5001
5096
  Annotated[StrictFloat, Field(gt=0)],
@@ -5009,14 +5104,12 @@ class VirtualMachineApi:
5009
5104
  _headers: Optional[Dict[StrictStr, Any]] = None,
5010
5105
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
5011
5106
  ) -> ResponseModel:
5012
- """Edit virtual machine labels
5107
+ """Restore virtual machine from hibernation
5013
5108
 
5014
- 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
+ Resumes a virtual machine from hibernation, bringing it back to an active state. Provide the virtual machine ID that you want to restore from hibernation.
5015
5110
 
5016
5111
  :param vm_id: (required)
5017
5112
  :type vm_id: int
5018
- :param payload: (required)
5019
- :type payload: EditLabelOfAnExistingVMPayload
5020
5113
  :param _request_timeout: timeout setting for this request. If one
5021
5114
  number provided, it will be total request
5022
5115
  timeout. It can also be a pair (tuple) of
@@ -5039,9 +5132,8 @@ class VirtualMachineApi:
5039
5132
  :return: Returns the result object.
5040
5133
  """ # noqa: E501
5041
5134
 
5042
- _param = self._put_labels_serialize(
5135
+ _param = self._restore_vm_from_hibernation_serialize(
5043
5136
  vm_id=vm_id,
5044
- payload=payload,
5045
5137
  _request_auth=_request_auth,
5046
5138
  _content_type=_content_type,
5047
5139
  _headers=_headers,
@@ -5053,7 +5145,6 @@ class VirtualMachineApi:
5053
5145
  '400': "ErrorResponseModel",
5054
5146
  '401': "ErrorResponseModel",
5055
5147
  '404': "ErrorResponseModel",
5056
- '409': "ErrorResponseModel",
5057
5148
  '500': None,
5058
5149
  }
5059
5150
  response_data = self.api_client.call_api(
@@ -5068,10 +5159,9 @@ class VirtualMachineApi:
5068
5159
 
5069
5160
 
5070
5161
  @validate_call
5071
- def put_labels_with_http_info(
5162
+ def restore_vm_from_hibernation_with_http_info(
5072
5163
  self,
5073
5164
  vm_id: StrictInt,
5074
- payload: EditLabelOfAnExistingVMPayload,
5075
5165
  _request_timeout: Union[
5076
5166
  None,
5077
5167
  Annotated[StrictFloat, Field(gt=0)],
@@ -5085,14 +5175,12 @@ class VirtualMachineApi:
5085
5175
  _headers: Optional[Dict[StrictStr, Any]] = None,
5086
5176
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
5087
5177
  ) -> ApiResponse[ResponseModel]:
5088
- """Edit virtual machine labels
5178
+ """Restore virtual machine from hibernation
5089
5179
 
5090
- 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
+ Resumes a virtual machine from hibernation, bringing it back to an active state. Provide the virtual machine ID that you want to restore from hibernation.
5091
5181
 
5092
5182
  :param vm_id: (required)
5093
5183
  :type vm_id: int
5094
- :param payload: (required)
5095
- :type payload: EditLabelOfAnExistingVMPayload
5096
5184
  :param _request_timeout: timeout setting for this request. If one
5097
5185
  number provided, it will be total request
5098
5186
  timeout. It can also be a pair (tuple) of
@@ -5115,9 +5203,8 @@ class VirtualMachineApi:
5115
5203
  :return: Returns the result object.
5116
5204
  """ # noqa: E501
5117
5205
 
5118
- _param = self._put_labels_serialize(
5206
+ _param = self._restore_vm_from_hibernation_serialize(
5119
5207
  vm_id=vm_id,
5120
- payload=payload,
5121
5208
  _request_auth=_request_auth,
5122
5209
  _content_type=_content_type,
5123
5210
  _headers=_headers,
@@ -5129,7 +5216,6 @@ class VirtualMachineApi:
5129
5216
  '400': "ErrorResponseModel",
5130
5217
  '401': "ErrorResponseModel",
5131
5218
  '404': "ErrorResponseModel",
5132
- '409': "ErrorResponseModel",
5133
5219
  '500': None,
5134
5220
  }
5135
5221
  response_data = self.api_client.call_api(
@@ -5144,10 +5230,9 @@ class VirtualMachineApi:
5144
5230
 
5145
5231
 
5146
5232
  @validate_call
5147
- def put_labels_without_preload_content(
5233
+ def restore_vm_from_hibernation_without_preload_content(
5148
5234
  self,
5149
5235
  vm_id: StrictInt,
5150
- payload: EditLabelOfAnExistingVMPayload,
5151
5236
  _request_timeout: Union[
5152
5237
  None,
5153
5238
  Annotated[StrictFloat, Field(gt=0)],
@@ -5161,14 +5246,12 @@ class VirtualMachineApi:
5161
5246
  _headers: Optional[Dict[StrictStr, Any]] = None,
5162
5247
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
5163
5248
  ) -> RESTResponseType:
5164
- """Edit virtual machine labels
5249
+ """Restore virtual machine from hibernation
5165
5250
 
5166
- 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.
5251
+ Resumes a virtual machine from hibernation, bringing it back to an active state. Provide the virtual machine ID that you want to restore from hibernation.
5167
5252
 
5168
5253
  :param vm_id: (required)
5169
5254
  :type vm_id: int
5170
- :param payload: (required)
5171
- :type payload: EditLabelOfAnExistingVMPayload
5172
5255
  :param _request_timeout: timeout setting for this request. If one
5173
5256
  number provided, it will be total request
5174
5257
  timeout. It can also be a pair (tuple) of
@@ -5191,9 +5274,8 @@ class VirtualMachineApi:
5191
5274
  :return: Returns the result object.
5192
5275
  """ # noqa: E501
5193
5276
 
5194
- _param = self._put_labels_serialize(
5277
+ _param = self._restore_vm_from_hibernation_serialize(
5195
5278
  vm_id=vm_id,
5196
- payload=payload,
5197
5279
  _request_auth=_request_auth,
5198
5280
  _content_type=_content_type,
5199
5281
  _headers=_headers,
@@ -5205,7 +5287,6 @@ class VirtualMachineApi:
5205
5287
  '400': "ErrorResponseModel",
5206
5288
  '401': "ErrorResponseModel",
5207
5289
  '404': "ErrorResponseModel",
5208
- '409': "ErrorResponseModel",
5209
5290
  '500': None,
5210
5291
  }
5211
5292
  response_data = self.api_client.call_api(
@@ -5215,10 +5296,9 @@ class VirtualMachineApi:
5215
5296
  return response_data.response
5216
5297
 
5217
5298
 
5218
- def _put_labels_serialize(
5299
+ def _restore_vm_from_hibernation_serialize(
5219
5300
  self,
5220
5301
  vm_id,
5221
- payload,
5222
5302
  _request_auth,
5223
5303
  _content_type,
5224
5304
  _headers,
@@ -5246,8 +5326,6 @@ class VirtualMachineApi:
5246
5326
  # process the header parameters
5247
5327
  # process the form parameters
5248
5328
  # process the body parameter
5249
- if payload is not None:
5250
- _body_params = payload
5251
5329
 
5252
5330
 
5253
5331
  # set the HTTP header `Accept`
@@ -5258,19 +5336,6 @@ class VirtualMachineApi:
5258
5336
  ]
5259
5337
  )
5260
5338
 
5261
- # set the HTTP header `Content-Type`
5262
- if _content_type:
5263
- _header_params['Content-Type'] = _content_type
5264
- else:
5265
- _default_content_type = (
5266
- self.api_client.select_header_content_type(
5267
- [
5268
- 'application/json'
5269
- ]
5270
- )
5271
- )
5272
- if _default_content_type is not None:
5273
- _header_params['Content-Type'] = _default_content_type
5274
5339
 
5275
5340
  # authentication setting
5276
5341
  _auth_settings: List[str] = [
@@ -5278,8 +5343,8 @@ class VirtualMachineApi:
5278
5343
  ]
5279
5344
 
5280
5345
  return self.api_client.param_serialize(
5281
- method='PUT',
5282
- resource_path='/core/virtual-machines/{vm_id}/label',
5346
+ method='GET',
5347
+ resource_path='/core/virtual-machines/{vm_id}/hibernate-restore',
5283
5348
  path_params=_path_params,
5284
5349
  query_params=_query_params,
5285
5350
  header_params=_header_params,
@@ -5296,7 +5361,7 @@ class VirtualMachineApi:
5296
5361
 
5297
5362
 
5298
5363
  @validate_call
5299
- def retrieve_virtual_machine_details(
5364
+ def start_vm(
5300
5365
  self,
5301
5366
  vm_id: StrictInt,
5302
5367
  _request_timeout: Union[
@@ -5311,10 +5376,10 @@ class VirtualMachineApi:
5311
5376
  _content_type: Optional[StrictStr] = None,
5312
5377
  _headers: Optional[Dict[StrictStr, Any]] = None,
5313
5378
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
5314
- ) -> Instance:
5315
- """Retrieve virtual machine details
5379
+ ) -> ResponseModel:
5380
+ """Start virtual machine
5316
5381
 
5317
- 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.
5382
+ Initiates the startup of a virtual machine. Provide the virtual machine ID in the path to initiate the starting of the specified virtual machine.
5318
5383
 
5319
5384
  :param vm_id: (required)
5320
5385
  :type vm_id: int
@@ -5340,7 +5405,7 @@ class VirtualMachineApi:
5340
5405
  :return: Returns the result object.
5341
5406
  """ # noqa: E501
5342
5407
 
5343
- _param = self._retrieve_virtual_machine_details_serialize(
5408
+ _param = self._start_vm_serialize(
5344
5409
  vm_id=vm_id,
5345
5410
  _request_auth=_request_auth,
5346
5411
  _content_type=_content_type,
@@ -5349,7 +5414,7 @@ class VirtualMachineApi:
5349
5414
  )
5350
5415
 
5351
5416
  _response_types_map: Dict[str, Optional[str]] = {
5352
- '200': "Instance",
5417
+ '200': "ResponseModel",
5353
5418
  '400': "ErrorResponseModel",
5354
5419
  '401': "ErrorResponseModel",
5355
5420
  '404': "ErrorResponseModel",
@@ -5367,7 +5432,7 @@ class VirtualMachineApi:
5367
5432
 
5368
5433
 
5369
5434
  @validate_call
5370
- def retrieve_virtual_machine_details_with_http_info(
5435
+ def start_vm_with_http_info(
5371
5436
  self,
5372
5437
  vm_id: StrictInt,
5373
5438
  _request_timeout: Union[
@@ -5382,10 +5447,10 @@ class VirtualMachineApi:
5382
5447
  _content_type: Optional[StrictStr] = None,
5383
5448
  _headers: Optional[Dict[StrictStr, Any]] = None,
5384
5449
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
5385
- ) -> ApiResponse[Instance]:
5386
- """Retrieve virtual machine details
5450
+ ) -> ApiResponse[ResponseModel]:
5451
+ """Start virtual machine
5387
5452
 
5388
- 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.
5453
+ Initiates the startup of a virtual machine. Provide the virtual machine ID in the path to initiate the starting of the specified virtual machine.
5389
5454
 
5390
5455
  :param vm_id: (required)
5391
5456
  :type vm_id: int
@@ -5411,7 +5476,7 @@ class VirtualMachineApi:
5411
5476
  :return: Returns the result object.
5412
5477
  """ # noqa: E501
5413
5478
 
5414
- _param = self._retrieve_virtual_machine_details_serialize(
5479
+ _param = self._start_vm_serialize(
5415
5480
  vm_id=vm_id,
5416
5481
  _request_auth=_request_auth,
5417
5482
  _content_type=_content_type,
@@ -5420,7 +5485,7 @@ class VirtualMachineApi:
5420
5485
  )
5421
5486
 
5422
5487
  _response_types_map: Dict[str, Optional[str]] = {
5423
- '200': "Instance",
5488
+ '200': "ResponseModel",
5424
5489
  '400': "ErrorResponseModel",
5425
5490
  '401': "ErrorResponseModel",
5426
5491
  '404': "ErrorResponseModel",
@@ -5438,7 +5503,7 @@ class VirtualMachineApi:
5438
5503
 
5439
5504
 
5440
5505
  @validate_call
5441
- def retrieve_virtual_machine_details_without_preload_content(
5506
+ def start_vm_without_preload_content(
5442
5507
  self,
5443
5508
  vm_id: StrictInt,
5444
5509
  _request_timeout: Union[
@@ -5454,9 +5519,9 @@ class VirtualMachineApi:
5454
5519
  _headers: Optional[Dict[StrictStr, Any]] = None,
5455
5520
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
5456
5521
  ) -> RESTResponseType:
5457
- """Retrieve virtual machine details
5522
+ """Start virtual machine
5458
5523
 
5459
- 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.
5524
+ Initiates the startup of a virtual machine. Provide the virtual machine ID in the path to initiate the starting of the specified virtual machine.
5460
5525
 
5461
5526
  :param vm_id: (required)
5462
5527
  :type vm_id: int
@@ -5482,7 +5547,7 @@ class VirtualMachineApi:
5482
5547
  :return: Returns the result object.
5483
5548
  """ # noqa: E501
5484
5549
 
5485
- _param = self._retrieve_virtual_machine_details_serialize(
5550
+ _param = self._start_vm_serialize(
5486
5551
  vm_id=vm_id,
5487
5552
  _request_auth=_request_auth,
5488
5553
  _content_type=_content_type,
@@ -5491,7 +5556,7 @@ class VirtualMachineApi:
5491
5556
  )
5492
5557
 
5493
5558
  _response_types_map: Dict[str, Optional[str]] = {
5494
- '200': "Instance",
5559
+ '200': "ResponseModel",
5495
5560
  '400': "ErrorResponseModel",
5496
5561
  '401': "ErrorResponseModel",
5497
5562
  '404': "ErrorResponseModel",
@@ -5504,7 +5569,7 @@ class VirtualMachineApi:
5504
5569
  return response_data.response
5505
5570
 
5506
5571
 
5507
- def _retrieve_virtual_machine_details_serialize(
5572
+ def _start_vm_serialize(
5508
5573
  self,
5509
5574
  vm_id,
5510
5575
  _request_auth,
@@ -5552,7 +5617,7 @@ class VirtualMachineApi:
5552
5617
 
5553
5618
  return self.api_client.param_serialize(
5554
5619
  method='GET',
5555
- resource_path='/core/virtual-machines/{vm_id}',
5620
+ resource_path='/core/virtual-machines/{vm_id}/start',
5556
5621
  path_params=_path_params,
5557
5622
  query_params=_query_params,
5558
5623
  header_params=_header_params,
@@ -5569,12 +5634,9 @@ class VirtualMachineApi:
5569
5634
 
5570
5635
 
5571
5636
  @validate_call
5572
- def retrieve_virtual_machines_associated_with_a_contract(
5637
+ def stop_vm(
5573
5638
  self,
5574
- contract_id: StrictInt,
5575
- page: Annotated[Optional[StrictStr], Field(description="Page Number")] = None,
5576
- page_size: Annotated[Optional[StrictStr], Field(description="Data Per Page")] = None,
5577
- search: Annotated[Optional[StrictStr], Field(description="Search By Instance ID or Name")] = None,
5639
+ vm_id: StrictInt,
5578
5640
  _request_timeout: Union[
5579
5641
  None,
5580
5642
  Annotated[StrictFloat, Field(gt=0)],
@@ -5587,19 +5649,13 @@ class VirtualMachineApi:
5587
5649
  _content_type: Optional[StrictStr] = None,
5588
5650
  _headers: Optional[Dict[StrictStr, Any]] = None,
5589
5651
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
5590
- ) -> ContractInstancesResponse:
5591
- """Retrieve virtual machines associated with a contract
5652
+ ) -> ResponseModel:
5653
+ """Stop virtual machine
5592
5654
 
5593
- 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.
5655
+ Shuts down a virtual machine. Provide the virtual machine ID in the path to initiate the shutdown process for the specified virtual machine.
5594
5656
 
5595
- :param contract_id: (required)
5596
- :type contract_id: int
5597
- :param page: Page Number
5598
- :type page: str
5599
- :param page_size: Data Per Page
5600
- :type page_size: str
5601
- :param search: Search By Instance ID or Name
5602
- :type search: str
5657
+ :param vm_id: (required)
5658
+ :type vm_id: int
5603
5659
  :param _request_timeout: timeout setting for this request. If one
5604
5660
  number provided, it will be total request
5605
5661
  timeout. It can also be a pair (tuple) of
@@ -5622,11 +5678,8 @@ class VirtualMachineApi:
5622
5678
  :return: Returns the result object.
5623
5679
  """ # noqa: E501
5624
5680
 
5625
- _param = self._retrieve_virtual_machines_associated_with_a_contract_serialize(
5626
- contract_id=contract_id,
5627
- page=page,
5628
- page_size=page_size,
5629
- search=search,
5681
+ _param = self._stop_vm_serialize(
5682
+ vm_id=vm_id,
5630
5683
  _request_auth=_request_auth,
5631
5684
  _content_type=_content_type,
5632
5685
  _headers=_headers,
@@ -5634,9 +5687,10 @@ class VirtualMachineApi:
5634
5687
  )
5635
5688
 
5636
5689
  _response_types_map: Dict[str, Optional[str]] = {
5637
- '200': "ContractInstancesResponse",
5690
+ '200': "ResponseModel",
5638
5691
  '400': "ErrorResponseModel",
5639
5692
  '401': "ErrorResponseModel",
5693
+ '404': "ErrorResponseModel",
5640
5694
  '500': None,
5641
5695
  }
5642
5696
  response_data = self.api_client.call_api(
@@ -5651,12 +5705,9 @@ class VirtualMachineApi:
5651
5705
 
5652
5706
 
5653
5707
  @validate_call
5654
- def retrieve_virtual_machines_associated_with_a_contract_with_http_info(
5708
+ def stop_vm_with_http_info(
5655
5709
  self,
5656
- contract_id: StrictInt,
5657
- page: Annotated[Optional[StrictStr], Field(description="Page Number")] = None,
5658
- page_size: Annotated[Optional[StrictStr], Field(description="Data Per Page")] = None,
5659
- search: Annotated[Optional[StrictStr], Field(description="Search By Instance ID or Name")] = None,
5710
+ vm_id: StrictInt,
5660
5711
  _request_timeout: Union[
5661
5712
  None,
5662
5713
  Annotated[StrictFloat, Field(gt=0)],
@@ -5669,19 +5720,13 @@ class VirtualMachineApi:
5669
5720
  _content_type: Optional[StrictStr] = None,
5670
5721
  _headers: Optional[Dict[StrictStr, Any]] = None,
5671
5722
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
5672
- ) -> ApiResponse[ContractInstancesResponse]:
5673
- """Retrieve virtual machines associated with a contract
5723
+ ) -> ApiResponse[ResponseModel]:
5724
+ """Stop virtual machine
5674
5725
 
5675
- 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.
5726
+ Shuts down a virtual machine. Provide the virtual machine ID in the path to initiate the shutdown process for the specified virtual machine.
5676
5727
 
5677
- :param contract_id: (required)
5678
- :type contract_id: int
5679
- :param page: Page Number
5680
- :type page: str
5681
- :param page_size: Data Per Page
5682
- :type page_size: str
5683
- :param search: Search By Instance ID or Name
5684
- :type search: str
5728
+ :param vm_id: (required)
5729
+ :type vm_id: int
5685
5730
  :param _request_timeout: timeout setting for this request. If one
5686
5731
  number provided, it will be total request
5687
5732
  timeout. It can also be a pair (tuple) of
@@ -5704,11 +5749,8 @@ class VirtualMachineApi:
5704
5749
  :return: Returns the result object.
5705
5750
  """ # noqa: E501
5706
5751
 
5707
- _param = self._retrieve_virtual_machines_associated_with_a_contract_serialize(
5708
- contract_id=contract_id,
5709
- page=page,
5710
- page_size=page_size,
5711
- search=search,
5752
+ _param = self._stop_vm_serialize(
5753
+ vm_id=vm_id,
5712
5754
  _request_auth=_request_auth,
5713
5755
  _content_type=_content_type,
5714
5756
  _headers=_headers,
@@ -5716,9 +5758,10 @@ class VirtualMachineApi:
5716
5758
  )
5717
5759
 
5718
5760
  _response_types_map: Dict[str, Optional[str]] = {
5719
- '200': "ContractInstancesResponse",
5761
+ '200': "ResponseModel",
5720
5762
  '400': "ErrorResponseModel",
5721
5763
  '401': "ErrorResponseModel",
5764
+ '404': "ErrorResponseModel",
5722
5765
  '500': None,
5723
5766
  }
5724
5767
  response_data = self.api_client.call_api(
@@ -5733,12 +5776,9 @@ class VirtualMachineApi:
5733
5776
 
5734
5777
 
5735
5778
  @validate_call
5736
- def retrieve_virtual_machines_associated_with_a_contract_without_preload_content(
5779
+ def stop_vm_without_preload_content(
5737
5780
  self,
5738
- contract_id: StrictInt,
5739
- page: Annotated[Optional[StrictStr], Field(description="Page Number")] = None,
5740
- page_size: Annotated[Optional[StrictStr], Field(description="Data Per Page")] = None,
5741
- search: Annotated[Optional[StrictStr], Field(description="Search By Instance ID or Name")] = None,
5781
+ vm_id: StrictInt,
5742
5782
  _request_timeout: Union[
5743
5783
  None,
5744
5784
  Annotated[StrictFloat, Field(gt=0)],
@@ -5752,18 +5792,12 @@ class VirtualMachineApi:
5752
5792
  _headers: Optional[Dict[StrictStr, Any]] = None,
5753
5793
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
5754
5794
  ) -> RESTResponseType:
5755
- """Retrieve virtual machines associated with a contract
5795
+ """Stop virtual machine
5756
5796
 
5757
- 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.
5797
+ Shuts down a virtual machine. Provide the virtual machine ID in the path to initiate the shutdown process for the specified virtual machine.
5758
5798
 
5759
- :param contract_id: (required)
5760
- :type contract_id: int
5761
- :param page: Page Number
5762
- :type page: str
5763
- :param page_size: Data Per Page
5764
- :type page_size: str
5765
- :param search: Search By Instance ID or Name
5766
- :type search: str
5799
+ :param vm_id: (required)
5800
+ :type vm_id: int
5767
5801
  :param _request_timeout: timeout setting for this request. If one
5768
5802
  number provided, it will be total request
5769
5803
  timeout. It can also be a pair (tuple) of
@@ -5786,11 +5820,8 @@ class VirtualMachineApi:
5786
5820
  :return: Returns the result object.
5787
5821
  """ # noqa: E501
5788
5822
 
5789
- _param = self._retrieve_virtual_machines_associated_with_a_contract_serialize(
5790
- contract_id=contract_id,
5791
- page=page,
5792
- page_size=page_size,
5793
- search=search,
5823
+ _param = self._stop_vm_serialize(
5824
+ vm_id=vm_id,
5794
5825
  _request_auth=_request_auth,
5795
5826
  _content_type=_content_type,
5796
5827
  _headers=_headers,
@@ -5798,9 +5829,10 @@ class VirtualMachineApi:
5798
5829
  )
5799
5830
 
5800
5831
  _response_types_map: Dict[str, Optional[str]] = {
5801
- '200': "ContractInstancesResponse",
5832
+ '200': "ResponseModel",
5802
5833
  '400': "ErrorResponseModel",
5803
5834
  '401': "ErrorResponseModel",
5835
+ '404': "ErrorResponseModel",
5804
5836
  '500': None,
5805
5837
  }
5806
5838
  response_data = self.api_client.call_api(
@@ -5810,12 +5842,9 @@ class VirtualMachineApi:
5810
5842
  return response_data.response
5811
5843
 
5812
5844
 
5813
- def _retrieve_virtual_machines_associated_with_a_contract_serialize(
5845
+ def _stop_vm_serialize(
5814
5846
  self,
5815
- contract_id,
5816
- page,
5817
- page_size,
5818
- search,
5847
+ vm_id,
5819
5848
  _request_auth,
5820
5849
  _content_type,
5821
5850
  _headers,
@@ -5837,21 +5866,9 @@ class VirtualMachineApi:
5837
5866
  _body_params: Optional[bytes] = None
5838
5867
 
5839
5868
  # process the path parameters
5840
- if contract_id is not None:
5841
- _path_params['contract_id'] = contract_id
5869
+ if vm_id is not None:
5870
+ _path_params['vm_id'] = vm_id
5842
5871
  # process the query parameters
5843
- if page is not None:
5844
-
5845
- _query_params.append(('page', page))
5846
-
5847
- if page_size is not None:
5848
-
5849
- _query_params.append(('pageSize', page_size))
5850
-
5851
- if search is not None:
5852
-
5853
- _query_params.append(('search', search))
5854
-
5855
5872
  # process the header parameters
5856
5873
  # process the form parameters
5857
5874
  # process the body parameter
@@ -5873,7 +5890,7 @@ class VirtualMachineApi:
5873
5890
 
5874
5891
  return self.api_client.param_serialize(
5875
5892
  method='GET',
5876
- resource_path='/core/virtual-machines/contract/{contract_id}/virtual-machines',
5893
+ resource_path='/core/virtual-machines/{vm_id}/stop',
5877
5894
  path_params=_path_params,
5878
5895
  query_params=_query_params,
5879
5896
  header_params=_header_params,