hyperstack 1.41.2a0__py3-none-any.whl → 1.42.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.
- hyperstack/__init__.py +2 -1
- hyperstack/api/__init__.py +1 -0
- hyperstack/api/admin_api.py +297 -0
- hyperstack/api/firewall_attachment_api.py +7 -7
- hyperstack/api/firewalls_api.py +330 -330
- hyperstack/api/snapshots_api.py +160 -160
- hyperstack/api/virtual_machine_api.py +734 -734
- hyperstack/api/vnc_url_api.py +46 -46
- hyperstack/api_client.py +1 -1
- hyperstack/configuration.py +1 -1
- {hyperstack-1.41.2a0.dist-info → hyperstack-1.42.1a0.dist-info}/METADATA +1 -1
- {hyperstack-1.41.2a0.dist-info → hyperstack-1.42.1a0.dist-info}/RECORD +14 -13
- {hyperstack-1.41.2a0.dist-info → hyperstack-1.42.1a0.dist-info}/WHEEL +0 -0
- {hyperstack-1.41.2a0.dist-info → hyperstack-1.42.1a0.dist-info}/top_level.txt +0 -0
|
@@ -57,9 +57,10 @@ class VirtualMachineApi:
|
|
|
57
57
|
|
|
58
58
|
|
|
59
59
|
@validate_call
|
|
60
|
-
def
|
|
60
|
+
def attach_firewalls_to_a_virtual_machine(
|
|
61
61
|
self,
|
|
62
62
|
vm_id: StrictInt,
|
|
63
|
+
payload: AttachFirewallsToVMPayload,
|
|
63
64
|
_request_timeout: Union[
|
|
64
65
|
None,
|
|
65
66
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -73,12 +74,14 @@ class VirtualMachineApi:
|
|
|
73
74
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
74
75
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
75
76
|
) -> ResponseModel:
|
|
76
|
-
"""
|
|
77
|
+
"""Attach firewalls to a virtual machine
|
|
77
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
80
|
|
|
80
81
|
:param vm_id: (required)
|
|
81
82
|
:type vm_id: int
|
|
83
|
+
:param payload: (required)
|
|
84
|
+
:type payload: AttachFirewallsToVMPayload
|
|
82
85
|
:param _request_timeout: timeout setting for this request. If one
|
|
83
86
|
number provided, it will be total request
|
|
84
87
|
timeout. It can also be a pair (tuple) of
|
|
@@ -101,8 +104,9 @@ class VirtualMachineApi:
|
|
|
101
104
|
:return: Returns the result object.
|
|
102
105
|
""" # noqa: E501
|
|
103
106
|
|
|
104
|
-
_param = self.
|
|
107
|
+
_param = self._attach_firewalls_to_a_virtual_machine_serialize(
|
|
105
108
|
vm_id=vm_id,
|
|
109
|
+
payload=payload,
|
|
106
110
|
_request_auth=_request_auth,
|
|
107
111
|
_content_type=_content_type,
|
|
108
112
|
_headers=_headers,
|
|
@@ -114,7 +118,6 @@ class VirtualMachineApi:
|
|
|
114
118
|
'400': "ErrorResponseModel",
|
|
115
119
|
'401': "ErrorResponseModel",
|
|
116
120
|
'404': "ErrorResponseModel",
|
|
117
|
-
'409': "ErrorResponseModel",
|
|
118
121
|
'500': None,
|
|
119
122
|
}
|
|
120
123
|
response_data = self.api_client.call_api(
|
|
@@ -129,9 +132,10 @@ class VirtualMachineApi:
|
|
|
129
132
|
|
|
130
133
|
|
|
131
134
|
@validate_call
|
|
132
|
-
def
|
|
135
|
+
def attach_firewalls_to_a_virtual_machine_with_http_info(
|
|
133
136
|
self,
|
|
134
137
|
vm_id: StrictInt,
|
|
138
|
+
payload: AttachFirewallsToVMPayload,
|
|
135
139
|
_request_timeout: Union[
|
|
136
140
|
None,
|
|
137
141
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -145,12 +149,14 @@ class VirtualMachineApi:
|
|
|
145
149
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
146
150
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
147
151
|
) -> ApiResponse[ResponseModel]:
|
|
148
|
-
"""
|
|
152
|
+
"""Attach firewalls to a virtual machine
|
|
149
153
|
|
|
150
|
-
|
|
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.
|
|
151
155
|
|
|
152
156
|
:param vm_id: (required)
|
|
153
157
|
:type vm_id: int
|
|
158
|
+
:param payload: (required)
|
|
159
|
+
:type payload: AttachFirewallsToVMPayload
|
|
154
160
|
:param _request_timeout: timeout setting for this request. If one
|
|
155
161
|
number provided, it will be total request
|
|
156
162
|
timeout. It can also be a pair (tuple) of
|
|
@@ -173,8 +179,9 @@ class VirtualMachineApi:
|
|
|
173
179
|
:return: Returns the result object.
|
|
174
180
|
""" # noqa: E501
|
|
175
181
|
|
|
176
|
-
_param = self.
|
|
182
|
+
_param = self._attach_firewalls_to_a_virtual_machine_serialize(
|
|
177
183
|
vm_id=vm_id,
|
|
184
|
+
payload=payload,
|
|
178
185
|
_request_auth=_request_auth,
|
|
179
186
|
_content_type=_content_type,
|
|
180
187
|
_headers=_headers,
|
|
@@ -186,7 +193,6 @@ class VirtualMachineApi:
|
|
|
186
193
|
'400': "ErrorResponseModel",
|
|
187
194
|
'401': "ErrorResponseModel",
|
|
188
195
|
'404': "ErrorResponseModel",
|
|
189
|
-
'409': "ErrorResponseModel",
|
|
190
196
|
'500': None,
|
|
191
197
|
}
|
|
192
198
|
response_data = self.api_client.call_api(
|
|
@@ -201,9 +207,10 @@ class VirtualMachineApi:
|
|
|
201
207
|
|
|
202
208
|
|
|
203
209
|
@validate_call
|
|
204
|
-
def
|
|
210
|
+
def attach_firewalls_to_a_virtual_machine_without_preload_content(
|
|
205
211
|
self,
|
|
206
212
|
vm_id: StrictInt,
|
|
213
|
+
payload: AttachFirewallsToVMPayload,
|
|
207
214
|
_request_timeout: Union[
|
|
208
215
|
None,
|
|
209
216
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -217,12 +224,14 @@ class VirtualMachineApi:
|
|
|
217
224
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
218
225
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
219
226
|
) -> RESTResponseType:
|
|
220
|
-
"""
|
|
227
|
+
"""Attach firewalls to a virtual machine
|
|
221
228
|
|
|
222
|
-
|
|
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.
|
|
223
230
|
|
|
224
231
|
:param vm_id: (required)
|
|
225
232
|
:type vm_id: int
|
|
233
|
+
:param payload: (required)
|
|
234
|
+
:type payload: AttachFirewallsToVMPayload
|
|
226
235
|
:param _request_timeout: timeout setting for this request. If one
|
|
227
236
|
number provided, it will be total request
|
|
228
237
|
timeout. It can also be a pair (tuple) of
|
|
@@ -245,8 +254,9 @@ class VirtualMachineApi:
|
|
|
245
254
|
:return: Returns the result object.
|
|
246
255
|
""" # noqa: E501
|
|
247
256
|
|
|
248
|
-
_param = self.
|
|
257
|
+
_param = self._attach_firewalls_to_a_virtual_machine_serialize(
|
|
249
258
|
vm_id=vm_id,
|
|
259
|
+
payload=payload,
|
|
250
260
|
_request_auth=_request_auth,
|
|
251
261
|
_content_type=_content_type,
|
|
252
262
|
_headers=_headers,
|
|
@@ -258,7 +268,6 @@ class VirtualMachineApi:
|
|
|
258
268
|
'400': "ErrorResponseModel",
|
|
259
269
|
'401': "ErrorResponseModel",
|
|
260
270
|
'404': "ErrorResponseModel",
|
|
261
|
-
'409': "ErrorResponseModel",
|
|
262
271
|
'500': None,
|
|
263
272
|
}
|
|
264
273
|
response_data = self.api_client.call_api(
|
|
@@ -268,9 +277,10 @@ class VirtualMachineApi:
|
|
|
268
277
|
return response_data.response
|
|
269
278
|
|
|
270
279
|
|
|
271
|
-
def
|
|
280
|
+
def _attach_firewalls_to_a_virtual_machine_serialize(
|
|
272
281
|
self,
|
|
273
282
|
vm_id,
|
|
283
|
+
payload,
|
|
274
284
|
_request_auth,
|
|
275
285
|
_content_type,
|
|
276
286
|
_headers,
|
|
@@ -298,6 +308,8 @@ class VirtualMachineApi:
|
|
|
298
308
|
# process the header parameters
|
|
299
309
|
# process the form parameters
|
|
300
310
|
# process the body parameter
|
|
311
|
+
if payload is not None:
|
|
312
|
+
_body_params = payload
|
|
301
313
|
|
|
302
314
|
|
|
303
315
|
# set the HTTP header `Accept`
|
|
@@ -308,6 +320,19 @@ class VirtualMachineApi:
|
|
|
308
320
|
]
|
|
309
321
|
)
|
|
310
322
|
|
|
323
|
+
# set the HTTP header `Content-Type`
|
|
324
|
+
if _content_type:
|
|
325
|
+
_header_params['Content-Type'] = _content_type
|
|
326
|
+
else:
|
|
327
|
+
_default_content_type = (
|
|
328
|
+
self.api_client.select_header_content_type(
|
|
329
|
+
[
|
|
330
|
+
'application/json'
|
|
331
|
+
]
|
|
332
|
+
)
|
|
333
|
+
)
|
|
334
|
+
if _default_content_type is not None:
|
|
335
|
+
_header_params['Content-Type'] = _default_content_type
|
|
311
336
|
|
|
312
337
|
# authentication setting
|
|
313
338
|
_auth_settings: List[str] = [
|
|
@@ -315,8 +340,8 @@ class VirtualMachineApi:
|
|
|
315
340
|
]
|
|
316
341
|
|
|
317
342
|
return self.api_client.param_serialize(
|
|
318
|
-
method='
|
|
319
|
-
resource_path='/core/virtual-machines/{vm_id}',
|
|
343
|
+
method='POST',
|
|
344
|
+
resource_path='/core/virtual-machines/{vm_id}/attach-firewalls',
|
|
320
345
|
path_params=_path_params,
|
|
321
346
|
query_params=_query_params,
|
|
322
347
|
header_params=_header_params,
|
|
@@ -333,10 +358,9 @@ class VirtualMachineApi:
|
|
|
333
358
|
|
|
334
359
|
|
|
335
360
|
@validate_call
|
|
336
|
-
def
|
|
361
|
+
def create_one_or_more_virtual_machines(
|
|
337
362
|
self,
|
|
338
|
-
|
|
339
|
-
sg_rule_id: StrictInt,
|
|
363
|
+
payload: CreateInstancesPayload,
|
|
340
364
|
_request_timeout: Union[
|
|
341
365
|
None,
|
|
342
366
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -349,15 +373,13 @@ class VirtualMachineApi:
|
|
|
349
373
|
_content_type: Optional[StrictStr] = None,
|
|
350
374
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
351
375
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
352
|
-
) ->
|
|
353
|
-
"""
|
|
376
|
+
) -> CreateInstancesResponse:
|
|
377
|
+
"""Create virtual machines
|
|
354
378
|
|
|
355
|
-
|
|
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).
|
|
356
380
|
|
|
357
|
-
:param
|
|
358
|
-
:type
|
|
359
|
-
:param sg_rule_id: (required)
|
|
360
|
-
:type sg_rule_id: int
|
|
381
|
+
:param payload: (required)
|
|
382
|
+
:type payload: CreateInstancesPayload
|
|
361
383
|
:param _request_timeout: timeout setting for this request. If one
|
|
362
384
|
number provided, it will be total request
|
|
363
385
|
timeout. It can also be a pair (tuple) of
|
|
@@ -380,9 +402,8 @@ class VirtualMachineApi:
|
|
|
380
402
|
:return: Returns the result object.
|
|
381
403
|
""" # noqa: E501
|
|
382
404
|
|
|
383
|
-
_param = self.
|
|
384
|
-
|
|
385
|
-
sg_rule_id=sg_rule_id,
|
|
405
|
+
_param = self._create_one_or_more_virtual_machines_serialize(
|
|
406
|
+
payload=payload,
|
|
386
407
|
_request_auth=_request_auth,
|
|
387
408
|
_content_type=_content_type,
|
|
388
409
|
_headers=_headers,
|
|
@@ -390,10 +411,12 @@ class VirtualMachineApi:
|
|
|
390
411
|
)
|
|
391
412
|
|
|
392
413
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
393
|
-
'200': "
|
|
414
|
+
'200': "CreateInstancesResponse",
|
|
394
415
|
'400': "ErrorResponseModel",
|
|
395
416
|
'401': "ErrorResponseModel",
|
|
396
417
|
'404': "ErrorResponseModel",
|
|
418
|
+
'405': "ErrorResponseModel",
|
|
419
|
+
'409': "ErrorResponseModel",
|
|
397
420
|
'500': None,
|
|
398
421
|
}
|
|
399
422
|
response_data = self.api_client.call_api(
|
|
@@ -408,10 +431,9 @@ class VirtualMachineApi:
|
|
|
408
431
|
|
|
409
432
|
|
|
410
433
|
@validate_call
|
|
411
|
-
def
|
|
434
|
+
def create_one_or_more_virtual_machines_with_http_info(
|
|
412
435
|
self,
|
|
413
|
-
|
|
414
|
-
sg_rule_id: StrictInt,
|
|
436
|
+
payload: CreateInstancesPayload,
|
|
415
437
|
_request_timeout: Union[
|
|
416
438
|
None,
|
|
417
439
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -424,15 +446,13 @@ class VirtualMachineApi:
|
|
|
424
446
|
_content_type: Optional[StrictStr] = None,
|
|
425
447
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
426
448
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
427
|
-
) -> ApiResponse[
|
|
428
|
-
"""
|
|
449
|
+
) -> ApiResponse[CreateInstancesResponse]:
|
|
450
|
+
"""Create virtual machines
|
|
429
451
|
|
|
430
|
-
|
|
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).
|
|
431
453
|
|
|
432
|
-
:param
|
|
433
|
-
:type
|
|
434
|
-
:param sg_rule_id: (required)
|
|
435
|
-
:type sg_rule_id: int
|
|
454
|
+
:param payload: (required)
|
|
455
|
+
:type payload: CreateInstancesPayload
|
|
436
456
|
:param _request_timeout: timeout setting for this request. If one
|
|
437
457
|
number provided, it will be total request
|
|
438
458
|
timeout. It can also be a pair (tuple) of
|
|
@@ -455,9 +475,8 @@ class VirtualMachineApi:
|
|
|
455
475
|
:return: Returns the result object.
|
|
456
476
|
""" # noqa: E501
|
|
457
477
|
|
|
458
|
-
_param = self.
|
|
459
|
-
|
|
460
|
-
sg_rule_id=sg_rule_id,
|
|
478
|
+
_param = self._create_one_or_more_virtual_machines_serialize(
|
|
479
|
+
payload=payload,
|
|
461
480
|
_request_auth=_request_auth,
|
|
462
481
|
_content_type=_content_type,
|
|
463
482
|
_headers=_headers,
|
|
@@ -465,10 +484,12 @@ class VirtualMachineApi:
|
|
|
465
484
|
)
|
|
466
485
|
|
|
467
486
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
468
|
-
'200': "
|
|
487
|
+
'200': "CreateInstancesResponse",
|
|
469
488
|
'400': "ErrorResponseModel",
|
|
470
489
|
'401': "ErrorResponseModel",
|
|
471
490
|
'404': "ErrorResponseModel",
|
|
491
|
+
'405': "ErrorResponseModel",
|
|
492
|
+
'409': "ErrorResponseModel",
|
|
472
493
|
'500': None,
|
|
473
494
|
}
|
|
474
495
|
response_data = self.api_client.call_api(
|
|
@@ -483,10 +504,9 @@ class VirtualMachineApi:
|
|
|
483
504
|
|
|
484
505
|
|
|
485
506
|
@validate_call
|
|
486
|
-
def
|
|
507
|
+
def create_one_or_more_virtual_machines_without_preload_content(
|
|
487
508
|
self,
|
|
488
|
-
|
|
489
|
-
sg_rule_id: StrictInt,
|
|
509
|
+
payload: CreateInstancesPayload,
|
|
490
510
|
_request_timeout: Union[
|
|
491
511
|
None,
|
|
492
512
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -500,14 +520,12 @@ class VirtualMachineApi:
|
|
|
500
520
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
501
521
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
502
522
|
) -> RESTResponseType:
|
|
503
|
-
"""
|
|
523
|
+
"""Create virtual machines
|
|
504
524
|
|
|
505
|
-
|
|
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).
|
|
506
526
|
|
|
507
|
-
:param
|
|
508
|
-
:type
|
|
509
|
-
:param sg_rule_id: (required)
|
|
510
|
-
:type sg_rule_id: int
|
|
527
|
+
:param payload: (required)
|
|
528
|
+
:type payload: CreateInstancesPayload
|
|
511
529
|
:param _request_timeout: timeout setting for this request. If one
|
|
512
530
|
number provided, it will be total request
|
|
513
531
|
timeout. It can also be a pair (tuple) of
|
|
@@ -530,9 +548,8 @@ class VirtualMachineApi:
|
|
|
530
548
|
:return: Returns the result object.
|
|
531
549
|
""" # noqa: E501
|
|
532
550
|
|
|
533
|
-
_param = self.
|
|
534
|
-
|
|
535
|
-
sg_rule_id=sg_rule_id,
|
|
551
|
+
_param = self._create_one_or_more_virtual_machines_serialize(
|
|
552
|
+
payload=payload,
|
|
536
553
|
_request_auth=_request_auth,
|
|
537
554
|
_content_type=_content_type,
|
|
538
555
|
_headers=_headers,
|
|
@@ -540,10 +557,12 @@ class VirtualMachineApi:
|
|
|
540
557
|
)
|
|
541
558
|
|
|
542
559
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
543
|
-
'200': "
|
|
560
|
+
'200': "CreateInstancesResponse",
|
|
544
561
|
'400': "ErrorResponseModel",
|
|
545
562
|
'401': "ErrorResponseModel",
|
|
546
563
|
'404': "ErrorResponseModel",
|
|
564
|
+
'405': "ErrorResponseModel",
|
|
565
|
+
'409': "ErrorResponseModel",
|
|
547
566
|
'500': None,
|
|
548
567
|
}
|
|
549
568
|
response_data = self.api_client.call_api(
|
|
@@ -553,10 +572,9 @@ class VirtualMachineApi:
|
|
|
553
572
|
return response_data.response
|
|
554
573
|
|
|
555
574
|
|
|
556
|
-
def
|
|
575
|
+
def _create_one_or_more_virtual_machines_serialize(
|
|
557
576
|
self,
|
|
558
|
-
|
|
559
|
-
sg_rule_id,
|
|
577
|
+
payload,
|
|
560
578
|
_request_auth,
|
|
561
579
|
_content_type,
|
|
562
580
|
_headers,
|
|
@@ -578,14 +596,12 @@ class VirtualMachineApi:
|
|
|
578
596
|
_body_params: Optional[bytes] = None
|
|
579
597
|
|
|
580
598
|
# process the path parameters
|
|
581
|
-
if vm_id is not None:
|
|
582
|
-
_path_params['vm_id'] = vm_id
|
|
583
|
-
if sg_rule_id is not None:
|
|
584
|
-
_path_params['sg_rule_id'] = sg_rule_id
|
|
585
599
|
# process the query parameters
|
|
586
600
|
# process the header parameters
|
|
587
601
|
# process the form parameters
|
|
588
602
|
# process the body parameter
|
|
603
|
+
if payload is not None:
|
|
604
|
+
_body_params = payload
|
|
589
605
|
|
|
590
606
|
|
|
591
607
|
# set the HTTP header `Accept`
|
|
@@ -596,6 +612,19 @@ class VirtualMachineApi:
|
|
|
596
612
|
]
|
|
597
613
|
)
|
|
598
614
|
|
|
615
|
+
# set the HTTP header `Content-Type`
|
|
616
|
+
if _content_type:
|
|
617
|
+
_header_params['Content-Type'] = _content_type
|
|
618
|
+
else:
|
|
619
|
+
_default_content_type = (
|
|
620
|
+
self.api_client.select_header_content_type(
|
|
621
|
+
[
|
|
622
|
+
'application/json'
|
|
623
|
+
]
|
|
624
|
+
)
|
|
625
|
+
)
|
|
626
|
+
if _default_content_type is not None:
|
|
627
|
+
_header_params['Content-Type'] = _default_content_type
|
|
599
628
|
|
|
600
629
|
# authentication setting
|
|
601
630
|
_auth_settings: List[str] = [
|
|
@@ -603,8 +632,8 @@ class VirtualMachineApi:
|
|
|
603
632
|
]
|
|
604
633
|
|
|
605
634
|
return self.api_client.param_serialize(
|
|
606
|
-
method='
|
|
607
|
-
resource_path='/core/virtual-machines
|
|
635
|
+
method='POST',
|
|
636
|
+
resource_path='/core/virtual-machines',
|
|
608
637
|
path_params=_path_params,
|
|
609
638
|
query_params=_query_params,
|
|
610
639
|
header_params=_header_params,
|
|
@@ -621,9 +650,10 @@ class VirtualMachineApi:
|
|
|
621
650
|
|
|
622
651
|
|
|
623
652
|
@validate_call
|
|
624
|
-
def
|
|
653
|
+
def delete_security_rule(
|
|
625
654
|
self,
|
|
626
|
-
|
|
655
|
+
vm_id: StrictInt,
|
|
656
|
+
sg_rule_id: StrictInt,
|
|
627
657
|
_request_timeout: Union[
|
|
628
658
|
None,
|
|
629
659
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -636,13 +666,15 @@ class VirtualMachineApi:
|
|
|
636
666
|
_content_type: Optional[StrictStr] = None,
|
|
637
667
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
638
668
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
639
|
-
) ->
|
|
640
|
-
"""
|
|
669
|
+
) -> ResponseModel:
|
|
670
|
+
"""Delete firewall rule from virtual machine
|
|
641
671
|
|
|
642
|
-
|
|
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.
|
|
643
673
|
|
|
644
|
-
:param
|
|
645
|
-
:type
|
|
674
|
+
:param vm_id: (required)
|
|
675
|
+
:type vm_id: int
|
|
676
|
+
:param sg_rule_id: (required)
|
|
677
|
+
:type sg_rule_id: int
|
|
646
678
|
:param _request_timeout: timeout setting for this request. If one
|
|
647
679
|
number provided, it will be total request
|
|
648
680
|
timeout. It can also be a pair (tuple) of
|
|
@@ -665,8 +697,9 @@ class VirtualMachineApi:
|
|
|
665
697
|
:return: Returns the result object.
|
|
666
698
|
""" # noqa: E501
|
|
667
699
|
|
|
668
|
-
_param = self.
|
|
669
|
-
|
|
700
|
+
_param = self._delete_security_rule_serialize(
|
|
701
|
+
vm_id=vm_id,
|
|
702
|
+
sg_rule_id=sg_rule_id,
|
|
670
703
|
_request_auth=_request_auth,
|
|
671
704
|
_content_type=_content_type,
|
|
672
705
|
_headers=_headers,
|
|
@@ -674,7 +707,7 @@ class VirtualMachineApi:
|
|
|
674
707
|
)
|
|
675
708
|
|
|
676
709
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
677
|
-
'200': "
|
|
710
|
+
'200': "ResponseModel",
|
|
678
711
|
'400': "ErrorResponseModel",
|
|
679
712
|
'401': "ErrorResponseModel",
|
|
680
713
|
'404': "ErrorResponseModel",
|
|
@@ -692,9 +725,10 @@ class VirtualMachineApi:
|
|
|
692
725
|
|
|
693
726
|
|
|
694
727
|
@validate_call
|
|
695
|
-
def
|
|
728
|
+
def delete_security_rule_with_http_info(
|
|
696
729
|
self,
|
|
697
|
-
|
|
730
|
+
vm_id: StrictInt,
|
|
731
|
+
sg_rule_id: StrictInt,
|
|
698
732
|
_request_timeout: Union[
|
|
699
733
|
None,
|
|
700
734
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -707,13 +741,15 @@ class VirtualMachineApi:
|
|
|
707
741
|
_content_type: Optional[StrictStr] = None,
|
|
708
742
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
709
743
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
710
|
-
) -> ApiResponse[
|
|
711
|
-
"""
|
|
744
|
+
) -> ApiResponse[ResponseModel]:
|
|
745
|
+
"""Delete firewall rule from virtual machine
|
|
712
746
|
|
|
713
|
-
|
|
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.
|
|
714
748
|
|
|
715
|
-
:param
|
|
716
|
-
:type
|
|
749
|
+
:param vm_id: (required)
|
|
750
|
+
:type vm_id: int
|
|
751
|
+
:param sg_rule_id: (required)
|
|
752
|
+
:type sg_rule_id: int
|
|
717
753
|
:param _request_timeout: timeout setting for this request. If one
|
|
718
754
|
number provided, it will be total request
|
|
719
755
|
timeout. It can also be a pair (tuple) of
|
|
@@ -736,8 +772,9 @@ class VirtualMachineApi:
|
|
|
736
772
|
:return: Returns the result object.
|
|
737
773
|
""" # noqa: E501
|
|
738
774
|
|
|
739
|
-
_param = self.
|
|
740
|
-
|
|
775
|
+
_param = self._delete_security_rule_serialize(
|
|
776
|
+
vm_id=vm_id,
|
|
777
|
+
sg_rule_id=sg_rule_id,
|
|
741
778
|
_request_auth=_request_auth,
|
|
742
779
|
_content_type=_content_type,
|
|
743
780
|
_headers=_headers,
|
|
@@ -745,7 +782,7 @@ class VirtualMachineApi:
|
|
|
745
782
|
)
|
|
746
783
|
|
|
747
784
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
748
|
-
'200': "
|
|
785
|
+
'200': "ResponseModel",
|
|
749
786
|
'400': "ErrorResponseModel",
|
|
750
787
|
'401': "ErrorResponseModel",
|
|
751
788
|
'404': "ErrorResponseModel",
|
|
@@ -763,9 +800,10 @@ class VirtualMachineApi:
|
|
|
763
800
|
|
|
764
801
|
|
|
765
802
|
@validate_call
|
|
766
|
-
def
|
|
803
|
+
def delete_security_rule_without_preload_content(
|
|
767
804
|
self,
|
|
768
|
-
|
|
805
|
+
vm_id: StrictInt,
|
|
806
|
+
sg_rule_id: StrictInt,
|
|
769
807
|
_request_timeout: Union[
|
|
770
808
|
None,
|
|
771
809
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -779,12 +817,14 @@ class VirtualMachineApi:
|
|
|
779
817
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
780
818
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
781
819
|
) -> RESTResponseType:
|
|
782
|
-
"""
|
|
820
|
+
"""Delete firewall rule from virtual machine
|
|
783
821
|
|
|
784
|
-
|
|
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.
|
|
785
823
|
|
|
786
|
-
:param
|
|
787
|
-
:type
|
|
824
|
+
:param vm_id: (required)
|
|
825
|
+
:type vm_id: int
|
|
826
|
+
:param sg_rule_id: (required)
|
|
827
|
+
:type sg_rule_id: int
|
|
788
828
|
:param _request_timeout: timeout setting for this request. If one
|
|
789
829
|
number provided, it will be total request
|
|
790
830
|
timeout. It can also be a pair (tuple) of
|
|
@@ -807,8 +847,9 @@ class VirtualMachineApi:
|
|
|
807
847
|
:return: Returns the result object.
|
|
808
848
|
""" # noqa: E501
|
|
809
849
|
|
|
810
|
-
_param = self.
|
|
811
|
-
|
|
850
|
+
_param = self._delete_security_rule_serialize(
|
|
851
|
+
vm_id=vm_id,
|
|
852
|
+
sg_rule_id=sg_rule_id,
|
|
812
853
|
_request_auth=_request_auth,
|
|
813
854
|
_content_type=_content_type,
|
|
814
855
|
_headers=_headers,
|
|
@@ -816,7 +857,7 @@ class VirtualMachineApi:
|
|
|
816
857
|
)
|
|
817
858
|
|
|
818
859
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
819
|
-
'200': "
|
|
860
|
+
'200': "ResponseModel",
|
|
820
861
|
'400': "ErrorResponseModel",
|
|
821
862
|
'401': "ErrorResponseModel",
|
|
822
863
|
'404': "ErrorResponseModel",
|
|
@@ -829,9 +870,10 @@ class VirtualMachineApi:
|
|
|
829
870
|
return response_data.response
|
|
830
871
|
|
|
831
872
|
|
|
832
|
-
def
|
|
873
|
+
def _delete_security_rule_serialize(
|
|
833
874
|
self,
|
|
834
|
-
|
|
875
|
+
vm_id,
|
|
876
|
+
sg_rule_id,
|
|
835
877
|
_request_auth,
|
|
836
878
|
_content_type,
|
|
837
879
|
_headers,
|
|
@@ -853,8 +895,10 @@ class VirtualMachineApi:
|
|
|
853
895
|
_body_params: Optional[bytes] = None
|
|
854
896
|
|
|
855
897
|
# process the path parameters
|
|
856
|
-
if
|
|
857
|
-
_path_params['
|
|
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
|
|
858
902
|
# process the query parameters
|
|
859
903
|
# process the header parameters
|
|
860
904
|
# process the form parameters
|
|
@@ -876,8 +920,8 @@ class VirtualMachineApi:
|
|
|
876
920
|
]
|
|
877
921
|
|
|
878
922
|
return self.api_client.param_serialize(
|
|
879
|
-
method='
|
|
880
|
-
resource_path='/core/virtual-machines/
|
|
923
|
+
method='DELETE',
|
|
924
|
+
resource_path='/core/virtual-machines/{vm_id}/sg-rules/{sg_rule_id}',
|
|
881
925
|
path_params=_path_params,
|
|
882
926
|
query_params=_query_params,
|
|
883
927
|
header_params=_header_params,
|
|
@@ -894,12 +938,9 @@ class VirtualMachineApi:
|
|
|
894
938
|
|
|
895
939
|
|
|
896
940
|
@validate_call
|
|
897
|
-
def
|
|
941
|
+
def delete_virtual_machine(
|
|
898
942
|
self,
|
|
899
|
-
|
|
900
|
-
page: Annotated[Optional[StrictStr], Field(description="Page Number")] = None,
|
|
901
|
-
page_size: Annotated[Optional[StrictStr], Field(description="Data Per Page")] = None,
|
|
902
|
-
search: Annotated[Optional[StrictStr], Field(description="Search By Instance ID or Name")] = None,
|
|
943
|
+
vm_id: StrictInt,
|
|
903
944
|
_request_timeout: Union[
|
|
904
945
|
None,
|
|
905
946
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -912,19 +953,13 @@ class VirtualMachineApi:
|
|
|
912
953
|
_content_type: Optional[StrictStr] = None,
|
|
913
954
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
914
955
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
915
|
-
) ->
|
|
916
|
-
"""
|
|
956
|
+
) -> ResponseModel:
|
|
957
|
+
"""Delete virtual machine
|
|
917
958
|
|
|
918
|
-
|
|
959
|
+
Permanently deletes a virtual machine. Provide the virtual machine ID in the path to delete the specified virtual machine.
|
|
919
960
|
|
|
920
|
-
:param
|
|
921
|
-
:type
|
|
922
|
-
:param page: Page Number
|
|
923
|
-
:type page: str
|
|
924
|
-
:param page_size: Data Per Page
|
|
925
|
-
:type page_size: str
|
|
926
|
-
:param search: Search By Instance ID or Name
|
|
927
|
-
:type search: str
|
|
961
|
+
:param vm_id: (required)
|
|
962
|
+
:type vm_id: int
|
|
928
963
|
:param _request_timeout: timeout setting for this request. If one
|
|
929
964
|
number provided, it will be total request
|
|
930
965
|
timeout. It can also be a pair (tuple) of
|
|
@@ -947,11 +982,8 @@ class VirtualMachineApi:
|
|
|
947
982
|
:return: Returns the result object.
|
|
948
983
|
""" # noqa: E501
|
|
949
984
|
|
|
950
|
-
_param = self.
|
|
951
|
-
|
|
952
|
-
page=page,
|
|
953
|
-
page_size=page_size,
|
|
954
|
-
search=search,
|
|
985
|
+
_param = self._delete_virtual_machine_serialize(
|
|
986
|
+
vm_id=vm_id,
|
|
955
987
|
_request_auth=_request_auth,
|
|
956
988
|
_content_type=_content_type,
|
|
957
989
|
_headers=_headers,
|
|
@@ -959,9 +991,11 @@ class VirtualMachineApi:
|
|
|
959
991
|
)
|
|
960
992
|
|
|
961
993
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
962
|
-
'200': "
|
|
994
|
+
'200': "ResponseModel",
|
|
963
995
|
'400': "ErrorResponseModel",
|
|
964
996
|
'401': "ErrorResponseModel",
|
|
997
|
+
'404': "ErrorResponseModel",
|
|
998
|
+
'409': "ErrorResponseModel",
|
|
965
999
|
'500': None,
|
|
966
1000
|
}
|
|
967
1001
|
response_data = self.api_client.call_api(
|
|
@@ -976,12 +1010,9 @@ class VirtualMachineApi:
|
|
|
976
1010
|
|
|
977
1011
|
|
|
978
1012
|
@validate_call
|
|
979
|
-
def
|
|
1013
|
+
def delete_virtual_machine_with_http_info(
|
|
980
1014
|
self,
|
|
981
|
-
|
|
982
|
-
page: Annotated[Optional[StrictStr], Field(description="Page Number")] = None,
|
|
983
|
-
page_size: Annotated[Optional[StrictStr], Field(description="Data Per Page")] = None,
|
|
984
|
-
search: Annotated[Optional[StrictStr], Field(description="Search By Instance ID or Name")] = None,
|
|
1015
|
+
vm_id: StrictInt,
|
|
985
1016
|
_request_timeout: Union[
|
|
986
1017
|
None,
|
|
987
1018
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -994,19 +1025,13 @@ class VirtualMachineApi:
|
|
|
994
1025
|
_content_type: Optional[StrictStr] = None,
|
|
995
1026
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
996
1027
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
997
|
-
) -> ApiResponse[
|
|
998
|
-
"""
|
|
1028
|
+
) -> ApiResponse[ResponseModel]:
|
|
1029
|
+
"""Delete virtual machine
|
|
999
1030
|
|
|
1000
|
-
|
|
1031
|
+
Permanently deletes a virtual machine. Provide the virtual machine ID in the path to delete the specified virtual machine.
|
|
1001
1032
|
|
|
1002
|
-
:param
|
|
1003
|
-
:type
|
|
1004
|
-
:param page: Page Number
|
|
1005
|
-
:type page: str
|
|
1006
|
-
:param page_size: Data Per Page
|
|
1007
|
-
:type page_size: str
|
|
1008
|
-
:param search: Search By Instance ID or Name
|
|
1009
|
-
:type search: str
|
|
1033
|
+
:param vm_id: (required)
|
|
1034
|
+
:type vm_id: int
|
|
1010
1035
|
:param _request_timeout: timeout setting for this request. If one
|
|
1011
1036
|
number provided, it will be total request
|
|
1012
1037
|
timeout. It can also be a pair (tuple) of
|
|
@@ -1029,11 +1054,8 @@ class VirtualMachineApi:
|
|
|
1029
1054
|
:return: Returns the result object.
|
|
1030
1055
|
""" # noqa: E501
|
|
1031
1056
|
|
|
1032
|
-
_param = self.
|
|
1033
|
-
|
|
1034
|
-
page=page,
|
|
1035
|
-
page_size=page_size,
|
|
1036
|
-
search=search,
|
|
1057
|
+
_param = self._delete_virtual_machine_serialize(
|
|
1058
|
+
vm_id=vm_id,
|
|
1037
1059
|
_request_auth=_request_auth,
|
|
1038
1060
|
_content_type=_content_type,
|
|
1039
1061
|
_headers=_headers,
|
|
@@ -1041,9 +1063,11 @@ class VirtualMachineApi:
|
|
|
1041
1063
|
)
|
|
1042
1064
|
|
|
1043
1065
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
1044
|
-
'200': "
|
|
1066
|
+
'200': "ResponseModel",
|
|
1045
1067
|
'400': "ErrorResponseModel",
|
|
1046
1068
|
'401': "ErrorResponseModel",
|
|
1069
|
+
'404': "ErrorResponseModel",
|
|
1070
|
+
'409': "ErrorResponseModel",
|
|
1047
1071
|
'500': None,
|
|
1048
1072
|
}
|
|
1049
1073
|
response_data = self.api_client.call_api(
|
|
@@ -1058,12 +1082,9 @@ class VirtualMachineApi:
|
|
|
1058
1082
|
|
|
1059
1083
|
|
|
1060
1084
|
@validate_call
|
|
1061
|
-
def
|
|
1085
|
+
def delete_virtual_machine_without_preload_content(
|
|
1062
1086
|
self,
|
|
1063
|
-
|
|
1064
|
-
page: Annotated[Optional[StrictStr], Field(description="Page Number")] = None,
|
|
1065
|
-
page_size: Annotated[Optional[StrictStr], Field(description="Data Per Page")] = None,
|
|
1066
|
-
search: Annotated[Optional[StrictStr], Field(description="Search By Instance ID or Name")] = None,
|
|
1087
|
+
vm_id: StrictInt,
|
|
1067
1088
|
_request_timeout: Union[
|
|
1068
1089
|
None,
|
|
1069
1090
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -1077,18 +1098,12 @@ class VirtualMachineApi:
|
|
|
1077
1098
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1078
1099
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1079
1100
|
) -> RESTResponseType:
|
|
1080
|
-
"""
|
|
1101
|
+
"""Delete virtual machine
|
|
1081
1102
|
|
|
1082
|
-
|
|
1103
|
+
Permanently deletes a virtual machine. Provide the virtual machine ID in the path to delete the specified virtual machine.
|
|
1083
1104
|
|
|
1084
|
-
:param
|
|
1085
|
-
:type
|
|
1086
|
-
:param page: Page Number
|
|
1087
|
-
:type page: str
|
|
1088
|
-
:param page_size: Data Per Page
|
|
1089
|
-
:type page_size: str
|
|
1090
|
-
:param search: Search By Instance ID or Name
|
|
1091
|
-
:type search: str
|
|
1105
|
+
:param vm_id: (required)
|
|
1106
|
+
:type vm_id: int
|
|
1092
1107
|
:param _request_timeout: timeout setting for this request. If one
|
|
1093
1108
|
number provided, it will be total request
|
|
1094
1109
|
timeout. It can also be a pair (tuple) of
|
|
@@ -1111,11 +1126,8 @@ class VirtualMachineApi:
|
|
|
1111
1126
|
:return: Returns the result object.
|
|
1112
1127
|
""" # noqa: E501
|
|
1113
1128
|
|
|
1114
|
-
_param = self.
|
|
1115
|
-
|
|
1116
|
-
page=page,
|
|
1117
|
-
page_size=page_size,
|
|
1118
|
-
search=search,
|
|
1129
|
+
_param = self._delete_virtual_machine_serialize(
|
|
1130
|
+
vm_id=vm_id,
|
|
1119
1131
|
_request_auth=_request_auth,
|
|
1120
1132
|
_content_type=_content_type,
|
|
1121
1133
|
_headers=_headers,
|
|
@@ -1123,9 +1135,11 @@ class VirtualMachineApi:
|
|
|
1123
1135
|
)
|
|
1124
1136
|
|
|
1125
1137
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
1126
|
-
'200': "
|
|
1138
|
+
'200': "ResponseModel",
|
|
1127
1139
|
'400': "ErrorResponseModel",
|
|
1128
1140
|
'401': "ErrorResponseModel",
|
|
1141
|
+
'404': "ErrorResponseModel",
|
|
1142
|
+
'409': "ErrorResponseModel",
|
|
1129
1143
|
'500': None,
|
|
1130
1144
|
}
|
|
1131
1145
|
response_data = self.api_client.call_api(
|
|
@@ -1135,12 +1149,9 @@ class VirtualMachineApi:
|
|
|
1135
1149
|
return response_data.response
|
|
1136
1150
|
|
|
1137
1151
|
|
|
1138
|
-
def
|
|
1152
|
+
def _delete_virtual_machine_serialize(
|
|
1139
1153
|
self,
|
|
1140
|
-
|
|
1141
|
-
page,
|
|
1142
|
-
page_size,
|
|
1143
|
-
search,
|
|
1154
|
+
vm_id,
|
|
1144
1155
|
_request_auth,
|
|
1145
1156
|
_content_type,
|
|
1146
1157
|
_headers,
|
|
@@ -1162,21 +1173,9 @@ class VirtualMachineApi:
|
|
|
1162
1173
|
_body_params: Optional[bytes] = None
|
|
1163
1174
|
|
|
1164
1175
|
# process the path parameters
|
|
1165
|
-
if
|
|
1166
|
-
_path_params['
|
|
1176
|
+
if vm_id is not None:
|
|
1177
|
+
_path_params['vm_id'] = vm_id
|
|
1167
1178
|
# process the query parameters
|
|
1168
|
-
if page is not None:
|
|
1169
|
-
|
|
1170
|
-
_query_params.append(('page', page))
|
|
1171
|
-
|
|
1172
|
-
if page_size is not None:
|
|
1173
|
-
|
|
1174
|
-
_query_params.append(('pageSize', page_size))
|
|
1175
|
-
|
|
1176
|
-
if search is not None:
|
|
1177
|
-
|
|
1178
|
-
_query_params.append(('search', search))
|
|
1179
|
-
|
|
1180
1179
|
# process the header parameters
|
|
1181
1180
|
# process the form parameters
|
|
1182
1181
|
# process the body parameter
|
|
@@ -1197,8 +1196,8 @@ class VirtualMachineApi:
|
|
|
1197
1196
|
]
|
|
1198
1197
|
|
|
1199
1198
|
return self.api_client.param_serialize(
|
|
1200
|
-
method='
|
|
1201
|
-
resource_path='/core/virtual-machines/
|
|
1199
|
+
method='DELETE',
|
|
1200
|
+
resource_path='/core/virtual-machines/{vm_id}',
|
|
1202
1201
|
path_params=_path_params,
|
|
1203
1202
|
query_params=_query_params,
|
|
1204
1203
|
header_params=_header_params,
|
|
@@ -1215,13 +1214,9 @@ class VirtualMachineApi:
|
|
|
1215
1214
|
|
|
1216
1215
|
|
|
1217
1216
|
@validate_call
|
|
1218
|
-
def
|
|
1217
|
+
def fetch_virtual_machine_name_availability(
|
|
1219
1218
|
self,
|
|
1220
|
-
|
|
1221
|
-
page_size: Optional[StrictInt] = None,
|
|
1222
|
-
search: Optional[StrictStr] = None,
|
|
1223
|
-
environment: Optional[StrictStr] = None,
|
|
1224
|
-
exclude_firewalls: Annotated[Optional[List[StrictInt]], Field(description="Comma-separated list of Security Group IDs to ignore instances attached")] = None,
|
|
1219
|
+
name: StrictStr,
|
|
1225
1220
|
_request_timeout: Union[
|
|
1226
1221
|
None,
|
|
1227
1222
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -1234,21 +1229,13 @@ class VirtualMachineApi:
|
|
|
1234
1229
|
_content_type: Optional[StrictStr] = None,
|
|
1235
1230
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1236
1231
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1237
|
-
) ->
|
|
1238
|
-
"""
|
|
1232
|
+
) -> NameAvailableModel:
|
|
1233
|
+
"""Fetch virtual machine name availability
|
|
1239
1234
|
|
|
1240
|
-
|
|
1235
|
+
Check if a Virtual Machine name is available
|
|
1241
1236
|
|
|
1242
|
-
:param
|
|
1243
|
-
:type
|
|
1244
|
-
:param page_size:
|
|
1245
|
-
:type page_size: int
|
|
1246
|
-
:param search:
|
|
1247
|
-
:type search: str
|
|
1248
|
-
:param environment:
|
|
1249
|
-
:type environment: str
|
|
1250
|
-
:param exclude_firewalls: Comma-separated list of Security Group IDs to ignore instances attached
|
|
1251
|
-
:type exclude_firewalls: List[int]
|
|
1237
|
+
:param name: (required)
|
|
1238
|
+
:type name: str
|
|
1252
1239
|
:param _request_timeout: timeout setting for this request. If one
|
|
1253
1240
|
number provided, it will be total request
|
|
1254
1241
|
timeout. It can also be a pair (tuple) of
|
|
@@ -1271,12 +1258,8 @@ class VirtualMachineApi:
|
|
|
1271
1258
|
:return: Returns the result object.
|
|
1272
1259
|
""" # noqa: E501
|
|
1273
1260
|
|
|
1274
|
-
_param = self.
|
|
1275
|
-
|
|
1276
|
-
page_size=page_size,
|
|
1277
|
-
search=search,
|
|
1278
|
-
environment=environment,
|
|
1279
|
-
exclude_firewalls=exclude_firewalls,
|
|
1261
|
+
_param = self._fetch_virtual_machine_name_availability_serialize(
|
|
1262
|
+
name=name,
|
|
1280
1263
|
_request_auth=_request_auth,
|
|
1281
1264
|
_content_type=_content_type,
|
|
1282
1265
|
_headers=_headers,
|
|
@@ -1284,9 +1267,10 @@ class VirtualMachineApi:
|
|
|
1284
1267
|
)
|
|
1285
1268
|
|
|
1286
1269
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
1287
|
-
'200': "
|
|
1270
|
+
'200': "NameAvailableModel",
|
|
1288
1271
|
'400': "ErrorResponseModel",
|
|
1289
1272
|
'401': "ErrorResponseModel",
|
|
1273
|
+
'404': "ErrorResponseModel",
|
|
1290
1274
|
'500': None,
|
|
1291
1275
|
}
|
|
1292
1276
|
response_data = self.api_client.call_api(
|
|
@@ -1301,13 +1285,9 @@ class VirtualMachineApi:
|
|
|
1301
1285
|
|
|
1302
1286
|
|
|
1303
1287
|
@validate_call
|
|
1304
|
-
def
|
|
1288
|
+
def fetch_virtual_machine_name_availability_with_http_info(
|
|
1305
1289
|
self,
|
|
1306
|
-
|
|
1307
|
-
page_size: Optional[StrictInt] = None,
|
|
1308
|
-
search: Optional[StrictStr] = None,
|
|
1309
|
-
environment: Optional[StrictStr] = None,
|
|
1310
|
-
exclude_firewalls: Annotated[Optional[List[StrictInt]], Field(description="Comma-separated list of Security Group IDs to ignore instances attached")] = None,
|
|
1290
|
+
name: StrictStr,
|
|
1311
1291
|
_request_timeout: Union[
|
|
1312
1292
|
None,
|
|
1313
1293
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -1320,21 +1300,13 @@ class VirtualMachineApi:
|
|
|
1320
1300
|
_content_type: Optional[StrictStr] = None,
|
|
1321
1301
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1322
1302
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1323
|
-
) -> ApiResponse[
|
|
1324
|
-
"""
|
|
1303
|
+
) -> ApiResponse[NameAvailableModel]:
|
|
1304
|
+
"""Fetch virtual machine name availability
|
|
1325
1305
|
|
|
1326
|
-
|
|
1306
|
+
Check if a Virtual Machine name is available
|
|
1327
1307
|
|
|
1328
|
-
:param
|
|
1329
|
-
:type
|
|
1330
|
-
:param page_size:
|
|
1331
|
-
:type page_size: int
|
|
1332
|
-
:param search:
|
|
1333
|
-
:type search: str
|
|
1334
|
-
:param environment:
|
|
1335
|
-
:type environment: str
|
|
1336
|
-
:param exclude_firewalls: Comma-separated list of Security Group IDs to ignore instances attached
|
|
1337
|
-
:type exclude_firewalls: List[int]
|
|
1308
|
+
:param name: (required)
|
|
1309
|
+
:type name: str
|
|
1338
1310
|
:param _request_timeout: timeout setting for this request. If one
|
|
1339
1311
|
number provided, it will be total request
|
|
1340
1312
|
timeout. It can also be a pair (tuple) of
|
|
@@ -1357,12 +1329,8 @@ class VirtualMachineApi:
|
|
|
1357
1329
|
:return: Returns the result object.
|
|
1358
1330
|
""" # noqa: E501
|
|
1359
1331
|
|
|
1360
|
-
_param = self.
|
|
1361
|
-
|
|
1362
|
-
page_size=page_size,
|
|
1363
|
-
search=search,
|
|
1364
|
-
environment=environment,
|
|
1365
|
-
exclude_firewalls=exclude_firewalls,
|
|
1332
|
+
_param = self._fetch_virtual_machine_name_availability_serialize(
|
|
1333
|
+
name=name,
|
|
1366
1334
|
_request_auth=_request_auth,
|
|
1367
1335
|
_content_type=_content_type,
|
|
1368
1336
|
_headers=_headers,
|
|
@@ -1370,9 +1338,10 @@ class VirtualMachineApi:
|
|
|
1370
1338
|
)
|
|
1371
1339
|
|
|
1372
1340
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
1373
|
-
'200': "
|
|
1341
|
+
'200': "NameAvailableModel",
|
|
1374
1342
|
'400': "ErrorResponseModel",
|
|
1375
1343
|
'401': "ErrorResponseModel",
|
|
1344
|
+
'404': "ErrorResponseModel",
|
|
1376
1345
|
'500': None,
|
|
1377
1346
|
}
|
|
1378
1347
|
response_data = self.api_client.call_api(
|
|
@@ -1387,13 +1356,9 @@ class VirtualMachineApi:
|
|
|
1387
1356
|
|
|
1388
1357
|
|
|
1389
1358
|
@validate_call
|
|
1390
|
-
def
|
|
1359
|
+
def fetch_virtual_machine_name_availability_without_preload_content(
|
|
1391
1360
|
self,
|
|
1392
|
-
|
|
1393
|
-
page_size: Optional[StrictInt] = None,
|
|
1394
|
-
search: Optional[StrictStr] = None,
|
|
1395
|
-
environment: Optional[StrictStr] = None,
|
|
1396
|
-
exclude_firewalls: Annotated[Optional[List[StrictInt]], Field(description="Comma-separated list of Security Group IDs to ignore instances attached")] = None,
|
|
1361
|
+
name: StrictStr,
|
|
1397
1362
|
_request_timeout: Union[
|
|
1398
1363
|
None,
|
|
1399
1364
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -1407,20 +1372,12 @@ class VirtualMachineApi:
|
|
|
1407
1372
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1408
1373
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1409
1374
|
) -> RESTResponseType:
|
|
1410
|
-
"""
|
|
1375
|
+
"""Fetch virtual machine name availability
|
|
1411
1376
|
|
|
1412
|
-
|
|
1377
|
+
Check if a Virtual Machine name is available
|
|
1413
1378
|
|
|
1414
|
-
:param
|
|
1415
|
-
:type
|
|
1416
|
-
:param page_size:
|
|
1417
|
-
:type page_size: int
|
|
1418
|
-
:param search:
|
|
1419
|
-
:type search: str
|
|
1420
|
-
:param environment:
|
|
1421
|
-
:type environment: str
|
|
1422
|
-
:param exclude_firewalls: Comma-separated list of Security Group IDs to ignore instances attached
|
|
1423
|
-
:type exclude_firewalls: List[int]
|
|
1379
|
+
:param name: (required)
|
|
1380
|
+
:type name: str
|
|
1424
1381
|
:param _request_timeout: timeout setting for this request. If one
|
|
1425
1382
|
number provided, it will be total request
|
|
1426
1383
|
timeout. It can also be a pair (tuple) of
|
|
@@ -1443,12 +1400,8 @@ class VirtualMachineApi:
|
|
|
1443
1400
|
:return: Returns the result object.
|
|
1444
1401
|
""" # noqa: E501
|
|
1445
1402
|
|
|
1446
|
-
_param = self.
|
|
1447
|
-
|
|
1448
|
-
page_size=page_size,
|
|
1449
|
-
search=search,
|
|
1450
|
-
environment=environment,
|
|
1451
|
-
exclude_firewalls=exclude_firewalls,
|
|
1403
|
+
_param = self._fetch_virtual_machine_name_availability_serialize(
|
|
1404
|
+
name=name,
|
|
1452
1405
|
_request_auth=_request_auth,
|
|
1453
1406
|
_content_type=_content_type,
|
|
1454
1407
|
_headers=_headers,
|
|
@@ -1456,9 +1409,10 @@ class VirtualMachineApi:
|
|
|
1456
1409
|
)
|
|
1457
1410
|
|
|
1458
1411
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
1459
|
-
'200': "
|
|
1412
|
+
'200': "NameAvailableModel",
|
|
1460
1413
|
'400': "ErrorResponseModel",
|
|
1461
1414
|
'401': "ErrorResponseModel",
|
|
1415
|
+
'404': "ErrorResponseModel",
|
|
1462
1416
|
'500': None,
|
|
1463
1417
|
}
|
|
1464
1418
|
response_data = self.api_client.call_api(
|
|
@@ -1468,13 +1422,9 @@ class VirtualMachineApi:
|
|
|
1468
1422
|
return response_data.response
|
|
1469
1423
|
|
|
1470
1424
|
|
|
1471
|
-
def
|
|
1425
|
+
def _fetch_virtual_machine_name_availability_serialize(
|
|
1472
1426
|
self,
|
|
1473
|
-
|
|
1474
|
-
page_size,
|
|
1475
|
-
search,
|
|
1476
|
-
environment,
|
|
1477
|
-
exclude_firewalls,
|
|
1427
|
+
name,
|
|
1478
1428
|
_request_auth,
|
|
1479
1429
|
_content_type,
|
|
1480
1430
|
_headers,
|
|
@@ -1484,7 +1434,6 @@ class VirtualMachineApi:
|
|
|
1484
1434
|
_host = None
|
|
1485
1435
|
|
|
1486
1436
|
_collection_formats: Dict[str, str] = {
|
|
1487
|
-
'exclude_firewalls': 'multi',
|
|
1488
1437
|
}
|
|
1489
1438
|
|
|
1490
1439
|
_path_params: Dict[str, str] = {}
|
|
@@ -1497,27 +1446,9 @@ class VirtualMachineApi:
|
|
|
1497
1446
|
_body_params: Optional[bytes] = None
|
|
1498
1447
|
|
|
1499
1448
|
# process the path parameters
|
|
1449
|
+
if name is not None:
|
|
1450
|
+
_path_params['name'] = name
|
|
1500
1451
|
# process the query parameters
|
|
1501
|
-
if page is not None:
|
|
1502
|
-
|
|
1503
|
-
_query_params.append(('page', page))
|
|
1504
|
-
|
|
1505
|
-
if page_size is not None:
|
|
1506
|
-
|
|
1507
|
-
_query_params.append(('pageSize', page_size))
|
|
1508
|
-
|
|
1509
|
-
if search is not None:
|
|
1510
|
-
|
|
1511
|
-
_query_params.append(('search', search))
|
|
1512
|
-
|
|
1513
|
-
if environment is not None:
|
|
1514
|
-
|
|
1515
|
-
_query_params.append(('environment', environment))
|
|
1516
|
-
|
|
1517
|
-
if exclude_firewalls is not None:
|
|
1518
|
-
|
|
1519
|
-
_query_params.append(('exclude_firewalls', exclude_firewalls))
|
|
1520
|
-
|
|
1521
1452
|
# process the header parameters
|
|
1522
1453
|
# process the form parameters
|
|
1523
1454
|
# process the body parameter
|
|
@@ -1539,7 +1470,7 @@ class VirtualMachineApi:
|
|
|
1539
1470
|
|
|
1540
1471
|
return self.api_client.param_serialize(
|
|
1541
1472
|
method='GET',
|
|
1542
|
-
resource_path='/core/virtual-machines',
|
|
1473
|
+
resource_path='/core/virtual-machines/name-availability/{name}',
|
|
1543
1474
|
path_params=_path_params,
|
|
1544
1475
|
query_params=_query_params,
|
|
1545
1476
|
header_params=_header_params,
|
|
@@ -1556,7 +1487,7 @@ class VirtualMachineApi:
|
|
|
1556
1487
|
|
|
1557
1488
|
|
|
1558
1489
|
@validate_call
|
|
1559
|
-
def
|
|
1490
|
+
def get_instance_hard_reboot(
|
|
1560
1491
|
self,
|
|
1561
1492
|
vm_id: StrictInt,
|
|
1562
1493
|
_request_timeout: Union[
|
|
@@ -1571,10 +1502,10 @@ class VirtualMachineApi:
|
|
|
1571
1502
|
_content_type: Optional[StrictStr] = None,
|
|
1572
1503
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1573
1504
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1574
|
-
) ->
|
|
1575
|
-
"""
|
|
1505
|
+
) -> ResponseModel:
|
|
1506
|
+
"""Hard reboot virtual machine
|
|
1576
1507
|
|
|
1577
|
-
|
|
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.
|
|
1578
1509
|
|
|
1579
1510
|
:param vm_id: (required)
|
|
1580
1511
|
:type vm_id: int
|
|
@@ -1600,7 +1531,7 @@ class VirtualMachineApi:
|
|
|
1600
1531
|
:return: Returns the result object.
|
|
1601
1532
|
""" # noqa: E501
|
|
1602
1533
|
|
|
1603
|
-
_param = self.
|
|
1534
|
+
_param = self._get_instance_hard_reboot_serialize(
|
|
1604
1535
|
vm_id=vm_id,
|
|
1605
1536
|
_request_auth=_request_auth,
|
|
1606
1537
|
_content_type=_content_type,
|
|
@@ -1609,7 +1540,7 @@ class VirtualMachineApi:
|
|
|
1609
1540
|
)
|
|
1610
1541
|
|
|
1611
1542
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
1612
|
-
'200': "
|
|
1543
|
+
'200': "ResponseModel",
|
|
1613
1544
|
'400': "ErrorResponseModel",
|
|
1614
1545
|
'401': "ErrorResponseModel",
|
|
1615
1546
|
'404': "ErrorResponseModel",
|
|
@@ -1627,7 +1558,7 @@ class VirtualMachineApi:
|
|
|
1627
1558
|
|
|
1628
1559
|
|
|
1629
1560
|
@validate_call
|
|
1630
|
-
def
|
|
1561
|
+
def get_instance_hard_reboot_with_http_info(
|
|
1631
1562
|
self,
|
|
1632
1563
|
vm_id: StrictInt,
|
|
1633
1564
|
_request_timeout: Union[
|
|
@@ -1642,10 +1573,10 @@ class VirtualMachineApi:
|
|
|
1642
1573
|
_content_type: Optional[StrictStr] = None,
|
|
1643
1574
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1644
1575
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1645
|
-
) -> ApiResponse[
|
|
1646
|
-
"""
|
|
1576
|
+
) -> ApiResponse[ResponseModel]:
|
|
1577
|
+
"""Hard reboot virtual machine
|
|
1647
1578
|
|
|
1648
|
-
|
|
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.
|
|
1649
1580
|
|
|
1650
1581
|
:param vm_id: (required)
|
|
1651
1582
|
:type vm_id: int
|
|
@@ -1671,7 +1602,7 @@ class VirtualMachineApi:
|
|
|
1671
1602
|
:return: Returns the result object.
|
|
1672
1603
|
""" # noqa: E501
|
|
1673
1604
|
|
|
1674
|
-
_param = self.
|
|
1605
|
+
_param = self._get_instance_hard_reboot_serialize(
|
|
1675
1606
|
vm_id=vm_id,
|
|
1676
1607
|
_request_auth=_request_auth,
|
|
1677
1608
|
_content_type=_content_type,
|
|
@@ -1680,7 +1611,7 @@ class VirtualMachineApi:
|
|
|
1680
1611
|
)
|
|
1681
1612
|
|
|
1682
1613
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
1683
|
-
'200': "
|
|
1614
|
+
'200': "ResponseModel",
|
|
1684
1615
|
'400': "ErrorResponseModel",
|
|
1685
1616
|
'401': "ErrorResponseModel",
|
|
1686
1617
|
'404': "ErrorResponseModel",
|
|
@@ -1698,7 +1629,7 @@ class VirtualMachineApi:
|
|
|
1698
1629
|
|
|
1699
1630
|
|
|
1700
1631
|
@validate_call
|
|
1701
|
-
def
|
|
1632
|
+
def get_instance_hard_reboot_without_preload_content(
|
|
1702
1633
|
self,
|
|
1703
1634
|
vm_id: StrictInt,
|
|
1704
1635
|
_request_timeout: Union[
|
|
@@ -1714,9 +1645,9 @@ class VirtualMachineApi:
|
|
|
1714
1645
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1715
1646
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1716
1647
|
) -> RESTResponseType:
|
|
1717
|
-
"""
|
|
1648
|
+
"""Hard reboot virtual machine
|
|
1718
1649
|
|
|
1719
|
-
|
|
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.
|
|
1720
1651
|
|
|
1721
1652
|
:param vm_id: (required)
|
|
1722
1653
|
:type vm_id: int
|
|
@@ -1742,7 +1673,7 @@ class VirtualMachineApi:
|
|
|
1742
1673
|
:return: Returns the result object.
|
|
1743
1674
|
""" # noqa: E501
|
|
1744
1675
|
|
|
1745
|
-
_param = self.
|
|
1676
|
+
_param = self._get_instance_hard_reboot_serialize(
|
|
1746
1677
|
vm_id=vm_id,
|
|
1747
1678
|
_request_auth=_request_auth,
|
|
1748
1679
|
_content_type=_content_type,
|
|
@@ -1751,7 +1682,7 @@ class VirtualMachineApi:
|
|
|
1751
1682
|
)
|
|
1752
1683
|
|
|
1753
1684
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
1754
|
-
'200': "
|
|
1685
|
+
'200': "ResponseModel",
|
|
1755
1686
|
'400': "ErrorResponseModel",
|
|
1756
1687
|
'401': "ErrorResponseModel",
|
|
1757
1688
|
'404': "ErrorResponseModel",
|
|
@@ -1764,7 +1695,7 @@ class VirtualMachineApi:
|
|
|
1764
1695
|
return response_data.response
|
|
1765
1696
|
|
|
1766
1697
|
|
|
1767
|
-
def
|
|
1698
|
+
def _get_instance_hard_reboot_serialize(
|
|
1768
1699
|
self,
|
|
1769
1700
|
vm_id,
|
|
1770
1701
|
_request_auth,
|
|
@@ -1812,7 +1743,7 @@ class VirtualMachineApi:
|
|
|
1812
1743
|
|
|
1813
1744
|
return self.api_client.param_serialize(
|
|
1814
1745
|
method='GET',
|
|
1815
|
-
resource_path='/core/virtual-machines/{vm_id}',
|
|
1746
|
+
resource_path='/core/virtual-machines/{vm_id}/hard-reboot',
|
|
1816
1747
|
path_params=_path_params,
|
|
1817
1748
|
query_params=_query_params,
|
|
1818
1749
|
header_params=_header_params,
|
|
@@ -1829,7 +1760,7 @@ class VirtualMachineApi:
|
|
|
1829
1760
|
|
|
1830
1761
|
|
|
1831
1762
|
@validate_call
|
|
1832
|
-
def
|
|
1763
|
+
def get_instance_hibernate(
|
|
1833
1764
|
self,
|
|
1834
1765
|
vm_id: StrictInt,
|
|
1835
1766
|
_request_timeout: Union[
|
|
@@ -1845,9 +1776,9 @@ class VirtualMachineApi:
|
|
|
1845
1776
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1846
1777
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1847
1778
|
) -> ResponseModel:
|
|
1848
|
-
"""
|
|
1779
|
+
"""Hibernate virtual machine
|
|
1849
1780
|
|
|
1850
|
-
Initiates
|
|
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.
|
|
1851
1782
|
|
|
1852
1783
|
:param vm_id: (required)
|
|
1853
1784
|
:type vm_id: int
|
|
@@ -1873,7 +1804,7 @@ class VirtualMachineApi:
|
|
|
1873
1804
|
:return: Returns the result object.
|
|
1874
1805
|
""" # noqa: E501
|
|
1875
1806
|
|
|
1876
|
-
_param = self.
|
|
1807
|
+
_param = self._get_instance_hibernate_serialize(
|
|
1877
1808
|
vm_id=vm_id,
|
|
1878
1809
|
_request_auth=_request_auth,
|
|
1879
1810
|
_content_type=_content_type,
|
|
@@ -1900,7 +1831,7 @@ class VirtualMachineApi:
|
|
|
1900
1831
|
|
|
1901
1832
|
|
|
1902
1833
|
@validate_call
|
|
1903
|
-
def
|
|
1834
|
+
def get_instance_hibernate_with_http_info(
|
|
1904
1835
|
self,
|
|
1905
1836
|
vm_id: StrictInt,
|
|
1906
1837
|
_request_timeout: Union[
|
|
@@ -1916,9 +1847,9 @@ class VirtualMachineApi:
|
|
|
1916
1847
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1917
1848
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1918
1849
|
) -> ApiResponse[ResponseModel]:
|
|
1919
|
-
"""
|
|
1850
|
+
"""Hibernate virtual machine
|
|
1920
1851
|
|
|
1921
|
-
Initiates
|
|
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.
|
|
1922
1853
|
|
|
1923
1854
|
:param vm_id: (required)
|
|
1924
1855
|
:type vm_id: int
|
|
@@ -1944,7 +1875,7 @@ class VirtualMachineApi:
|
|
|
1944
1875
|
:return: Returns the result object.
|
|
1945
1876
|
""" # noqa: E501
|
|
1946
1877
|
|
|
1947
|
-
_param = self.
|
|
1878
|
+
_param = self._get_instance_hibernate_serialize(
|
|
1948
1879
|
vm_id=vm_id,
|
|
1949
1880
|
_request_auth=_request_auth,
|
|
1950
1881
|
_content_type=_content_type,
|
|
@@ -1971,7 +1902,7 @@ class VirtualMachineApi:
|
|
|
1971
1902
|
|
|
1972
1903
|
|
|
1973
1904
|
@validate_call
|
|
1974
|
-
def
|
|
1905
|
+
def get_instance_hibernate_without_preload_content(
|
|
1975
1906
|
self,
|
|
1976
1907
|
vm_id: StrictInt,
|
|
1977
1908
|
_request_timeout: Union[
|
|
@@ -1987,9 +1918,9 @@ class VirtualMachineApi:
|
|
|
1987
1918
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1988
1919
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1989
1920
|
) -> RESTResponseType:
|
|
1990
|
-
"""
|
|
1921
|
+
"""Hibernate virtual machine
|
|
1991
1922
|
|
|
1992
|
-
Initiates
|
|
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.
|
|
1993
1924
|
|
|
1994
1925
|
:param vm_id: (required)
|
|
1995
1926
|
:type vm_id: int
|
|
@@ -2015,7 +1946,7 @@ class VirtualMachineApi:
|
|
|
2015
1946
|
:return: Returns the result object.
|
|
2016
1947
|
""" # noqa: E501
|
|
2017
1948
|
|
|
2018
|
-
_param = self.
|
|
1949
|
+
_param = self._get_instance_hibernate_serialize(
|
|
2019
1950
|
vm_id=vm_id,
|
|
2020
1951
|
_request_auth=_request_auth,
|
|
2021
1952
|
_content_type=_content_type,
|
|
@@ -2037,7 +1968,7 @@ class VirtualMachineApi:
|
|
|
2037
1968
|
return response_data.response
|
|
2038
1969
|
|
|
2039
1970
|
|
|
2040
|
-
def
|
|
1971
|
+
def _get_instance_hibernate_serialize(
|
|
2041
1972
|
self,
|
|
2042
1973
|
vm_id,
|
|
2043
1974
|
_request_auth,
|
|
@@ -2085,7 +2016,7 @@ class VirtualMachineApi:
|
|
|
2085
2016
|
|
|
2086
2017
|
return self.api_client.param_serialize(
|
|
2087
2018
|
method='GET',
|
|
2088
|
-
resource_path='/core/virtual-machines/{vm_id}/
|
|
2019
|
+
resource_path='/core/virtual-machines/{vm_id}/hibernate',
|
|
2089
2020
|
path_params=_path_params,
|
|
2090
2021
|
query_params=_query_params,
|
|
2091
2022
|
header_params=_header_params,
|
|
@@ -2102,7 +2033,7 @@ class VirtualMachineApi:
|
|
|
2102
2033
|
|
|
2103
2034
|
|
|
2104
2035
|
@validate_call
|
|
2105
|
-
def
|
|
2036
|
+
def get_instance_hibernate_restore(
|
|
2106
2037
|
self,
|
|
2107
2038
|
vm_id: StrictInt,
|
|
2108
2039
|
_request_timeout: Union[
|
|
@@ -2118,9 +2049,9 @@ class VirtualMachineApi:
|
|
|
2118
2049
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2119
2050
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2120
2051
|
) -> ResponseModel:
|
|
2121
|
-
"""
|
|
2052
|
+
"""Restore virtual machine from hibernation
|
|
2122
2053
|
|
|
2123
|
-
|
|
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.
|
|
2124
2055
|
|
|
2125
2056
|
:param vm_id: (required)
|
|
2126
2057
|
:type vm_id: int
|
|
@@ -2146,7 +2077,7 @@ class VirtualMachineApi:
|
|
|
2146
2077
|
:return: Returns the result object.
|
|
2147
2078
|
""" # noqa: E501
|
|
2148
2079
|
|
|
2149
|
-
_param = self.
|
|
2080
|
+
_param = self._get_instance_hibernate_restore_serialize(
|
|
2150
2081
|
vm_id=vm_id,
|
|
2151
2082
|
_request_auth=_request_auth,
|
|
2152
2083
|
_content_type=_content_type,
|
|
@@ -2173,7 +2104,7 @@ class VirtualMachineApi:
|
|
|
2173
2104
|
|
|
2174
2105
|
|
|
2175
2106
|
@validate_call
|
|
2176
|
-
def
|
|
2107
|
+
def get_instance_hibernate_restore_with_http_info(
|
|
2177
2108
|
self,
|
|
2178
2109
|
vm_id: StrictInt,
|
|
2179
2110
|
_request_timeout: Union[
|
|
@@ -2189,9 +2120,9 @@ class VirtualMachineApi:
|
|
|
2189
2120
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2190
2121
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2191
2122
|
) -> ApiResponse[ResponseModel]:
|
|
2192
|
-
"""
|
|
2123
|
+
"""Restore virtual machine from hibernation
|
|
2193
2124
|
|
|
2194
|
-
|
|
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.
|
|
2195
2126
|
|
|
2196
2127
|
:param vm_id: (required)
|
|
2197
2128
|
:type vm_id: int
|
|
@@ -2217,7 +2148,7 @@ class VirtualMachineApi:
|
|
|
2217
2148
|
:return: Returns the result object.
|
|
2218
2149
|
""" # noqa: E501
|
|
2219
2150
|
|
|
2220
|
-
_param = self.
|
|
2151
|
+
_param = self._get_instance_hibernate_restore_serialize(
|
|
2221
2152
|
vm_id=vm_id,
|
|
2222
2153
|
_request_auth=_request_auth,
|
|
2223
2154
|
_content_type=_content_type,
|
|
@@ -2244,7 +2175,7 @@ class VirtualMachineApi:
|
|
|
2244
2175
|
|
|
2245
2176
|
|
|
2246
2177
|
@validate_call
|
|
2247
|
-
def
|
|
2178
|
+
def get_instance_hibernate_restore_without_preload_content(
|
|
2248
2179
|
self,
|
|
2249
2180
|
vm_id: StrictInt,
|
|
2250
2181
|
_request_timeout: Union[
|
|
@@ -2260,9 +2191,9 @@ class VirtualMachineApi:
|
|
|
2260
2191
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2261
2192
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2262
2193
|
) -> RESTResponseType:
|
|
2263
|
-
"""
|
|
2194
|
+
"""Restore virtual machine from hibernation
|
|
2264
2195
|
|
|
2265
|
-
|
|
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.
|
|
2266
2197
|
|
|
2267
2198
|
:param vm_id: (required)
|
|
2268
2199
|
:type vm_id: int
|
|
@@ -2288,7 +2219,7 @@ class VirtualMachineApi:
|
|
|
2288
2219
|
:return: Returns the result object.
|
|
2289
2220
|
""" # noqa: E501
|
|
2290
2221
|
|
|
2291
|
-
_param = self.
|
|
2222
|
+
_param = self._get_instance_hibernate_restore_serialize(
|
|
2292
2223
|
vm_id=vm_id,
|
|
2293
2224
|
_request_auth=_request_auth,
|
|
2294
2225
|
_content_type=_content_type,
|
|
@@ -2310,7 +2241,7 @@ class VirtualMachineApi:
|
|
|
2310
2241
|
return response_data.response
|
|
2311
2242
|
|
|
2312
2243
|
|
|
2313
|
-
def
|
|
2244
|
+
def _get_instance_hibernate_restore_serialize(
|
|
2314
2245
|
self,
|
|
2315
2246
|
vm_id,
|
|
2316
2247
|
_request_auth,
|
|
@@ -2358,7 +2289,7 @@ class VirtualMachineApi:
|
|
|
2358
2289
|
|
|
2359
2290
|
return self.api_client.param_serialize(
|
|
2360
2291
|
method='GET',
|
|
2361
|
-
resource_path='/core/virtual-machines/{vm_id}/
|
|
2292
|
+
resource_path='/core/virtual-machines/{vm_id}/hibernate-restore',
|
|
2362
2293
|
path_params=_path_params,
|
|
2363
2294
|
query_params=_query_params,
|
|
2364
2295
|
header_params=_header_params,
|
|
@@ -2375,9 +2306,10 @@ class VirtualMachineApi:
|
|
|
2375
2306
|
|
|
2376
2307
|
|
|
2377
2308
|
@validate_call
|
|
2378
|
-
def
|
|
2309
|
+
def get_instance_logs(
|
|
2379
2310
|
self,
|
|
2380
2311
|
vm_id: StrictInt,
|
|
2312
|
+
request_id: StrictInt,
|
|
2381
2313
|
_request_timeout: Union[
|
|
2382
2314
|
None,
|
|
2383
2315
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -2390,13 +2322,15 @@ class VirtualMachineApi:
|
|
|
2390
2322
|
_content_type: Optional[StrictStr] = None,
|
|
2391
2323
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2392
2324
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2393
|
-
) ->
|
|
2394
|
-
"""
|
|
2325
|
+
) -> GetInstanceLogsResponse:
|
|
2326
|
+
"""Get virtual machine logs
|
|
2395
2327
|
|
|
2396
|
-
|
|
2328
|
+
Retrieve console logs for a virtual machine
|
|
2397
2329
|
|
|
2398
2330
|
:param vm_id: (required)
|
|
2399
2331
|
:type vm_id: int
|
|
2332
|
+
:param request_id: (required)
|
|
2333
|
+
:type request_id: int
|
|
2400
2334
|
:param _request_timeout: timeout setting for this request. If one
|
|
2401
2335
|
number provided, it will be total request
|
|
2402
2336
|
timeout. It can also be a pair (tuple) of
|
|
@@ -2419,8 +2353,9 @@ class VirtualMachineApi:
|
|
|
2419
2353
|
:return: Returns the result object.
|
|
2420
2354
|
""" # noqa: E501
|
|
2421
2355
|
|
|
2422
|
-
_param = self.
|
|
2356
|
+
_param = self._get_instance_logs_serialize(
|
|
2423
2357
|
vm_id=vm_id,
|
|
2358
|
+
request_id=request_id,
|
|
2424
2359
|
_request_auth=_request_auth,
|
|
2425
2360
|
_content_type=_content_type,
|
|
2426
2361
|
_headers=_headers,
|
|
@@ -2428,10 +2363,11 @@ class VirtualMachineApi:
|
|
|
2428
2363
|
)
|
|
2429
2364
|
|
|
2430
2365
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
2431
|
-
'200': "
|
|
2366
|
+
'200': "GetInstanceLogsResponse",
|
|
2432
2367
|
'400': "ErrorResponseModel",
|
|
2433
2368
|
'401': "ErrorResponseModel",
|
|
2434
2369
|
'404': "ErrorResponseModel",
|
|
2370
|
+
'405': "ErrorResponseModel",
|
|
2435
2371
|
'500': None,
|
|
2436
2372
|
}
|
|
2437
2373
|
response_data = self.api_client.call_api(
|
|
@@ -2446,9 +2382,10 @@ class VirtualMachineApi:
|
|
|
2446
2382
|
|
|
2447
2383
|
|
|
2448
2384
|
@validate_call
|
|
2449
|
-
def
|
|
2385
|
+
def get_instance_logs_with_http_info(
|
|
2450
2386
|
self,
|
|
2451
2387
|
vm_id: StrictInt,
|
|
2388
|
+
request_id: StrictInt,
|
|
2452
2389
|
_request_timeout: Union[
|
|
2453
2390
|
None,
|
|
2454
2391
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -2461,13 +2398,15 @@ class VirtualMachineApi:
|
|
|
2461
2398
|
_content_type: Optional[StrictStr] = None,
|
|
2462
2399
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2463
2400
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2464
|
-
) -> ApiResponse[
|
|
2465
|
-
"""
|
|
2401
|
+
) -> ApiResponse[GetInstanceLogsResponse]:
|
|
2402
|
+
"""Get virtual machine logs
|
|
2466
2403
|
|
|
2467
|
-
|
|
2404
|
+
Retrieve console logs for a virtual machine
|
|
2468
2405
|
|
|
2469
2406
|
:param vm_id: (required)
|
|
2470
2407
|
:type vm_id: int
|
|
2408
|
+
:param request_id: (required)
|
|
2409
|
+
:type request_id: int
|
|
2471
2410
|
:param _request_timeout: timeout setting for this request. If one
|
|
2472
2411
|
number provided, it will be total request
|
|
2473
2412
|
timeout. It can also be a pair (tuple) of
|
|
@@ -2490,8 +2429,9 @@ class VirtualMachineApi:
|
|
|
2490
2429
|
:return: Returns the result object.
|
|
2491
2430
|
""" # noqa: E501
|
|
2492
2431
|
|
|
2493
|
-
_param = self.
|
|
2432
|
+
_param = self._get_instance_logs_serialize(
|
|
2494
2433
|
vm_id=vm_id,
|
|
2434
|
+
request_id=request_id,
|
|
2495
2435
|
_request_auth=_request_auth,
|
|
2496
2436
|
_content_type=_content_type,
|
|
2497
2437
|
_headers=_headers,
|
|
@@ -2499,10 +2439,11 @@ class VirtualMachineApi:
|
|
|
2499
2439
|
)
|
|
2500
2440
|
|
|
2501
2441
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
2502
|
-
'200': "
|
|
2442
|
+
'200': "GetInstanceLogsResponse",
|
|
2503
2443
|
'400': "ErrorResponseModel",
|
|
2504
2444
|
'401': "ErrorResponseModel",
|
|
2505
2445
|
'404': "ErrorResponseModel",
|
|
2446
|
+
'405': "ErrorResponseModel",
|
|
2506
2447
|
'500': None,
|
|
2507
2448
|
}
|
|
2508
2449
|
response_data = self.api_client.call_api(
|
|
@@ -2517,9 +2458,10 @@ class VirtualMachineApi:
|
|
|
2517
2458
|
|
|
2518
2459
|
|
|
2519
2460
|
@validate_call
|
|
2520
|
-
def
|
|
2461
|
+
def get_instance_logs_without_preload_content(
|
|
2521
2462
|
self,
|
|
2522
2463
|
vm_id: StrictInt,
|
|
2464
|
+
request_id: StrictInt,
|
|
2523
2465
|
_request_timeout: Union[
|
|
2524
2466
|
None,
|
|
2525
2467
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -2533,12 +2475,14 @@ class VirtualMachineApi:
|
|
|
2533
2475
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2534
2476
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2535
2477
|
) -> RESTResponseType:
|
|
2536
|
-
"""
|
|
2478
|
+
"""Get virtual machine logs
|
|
2537
2479
|
|
|
2538
|
-
|
|
2480
|
+
Retrieve console logs for a virtual machine
|
|
2539
2481
|
|
|
2540
2482
|
:param vm_id: (required)
|
|
2541
2483
|
:type vm_id: int
|
|
2484
|
+
:param request_id: (required)
|
|
2485
|
+
:type request_id: int
|
|
2542
2486
|
:param _request_timeout: timeout setting for this request. If one
|
|
2543
2487
|
number provided, it will be total request
|
|
2544
2488
|
timeout. It can also be a pair (tuple) of
|
|
@@ -2561,8 +2505,9 @@ class VirtualMachineApi:
|
|
|
2561
2505
|
:return: Returns the result object.
|
|
2562
2506
|
""" # noqa: E501
|
|
2563
2507
|
|
|
2564
|
-
_param = self.
|
|
2508
|
+
_param = self._get_instance_logs_serialize(
|
|
2565
2509
|
vm_id=vm_id,
|
|
2510
|
+
request_id=request_id,
|
|
2566
2511
|
_request_auth=_request_auth,
|
|
2567
2512
|
_content_type=_content_type,
|
|
2568
2513
|
_headers=_headers,
|
|
@@ -2570,10 +2515,11 @@ class VirtualMachineApi:
|
|
|
2570
2515
|
)
|
|
2571
2516
|
|
|
2572
2517
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
2573
|
-
'200': "
|
|
2518
|
+
'200': "GetInstanceLogsResponse",
|
|
2574
2519
|
'400': "ErrorResponseModel",
|
|
2575
2520
|
'401': "ErrorResponseModel",
|
|
2576
2521
|
'404': "ErrorResponseModel",
|
|
2522
|
+
'405': "ErrorResponseModel",
|
|
2577
2523
|
'500': None,
|
|
2578
2524
|
}
|
|
2579
2525
|
response_data = self.api_client.call_api(
|
|
@@ -2583,9 +2529,10 @@ class VirtualMachineApi:
|
|
|
2583
2529
|
return response_data.response
|
|
2584
2530
|
|
|
2585
2531
|
|
|
2586
|
-
def
|
|
2532
|
+
def _get_instance_logs_serialize(
|
|
2587
2533
|
self,
|
|
2588
2534
|
vm_id,
|
|
2535
|
+
request_id,
|
|
2589
2536
|
_request_auth,
|
|
2590
2537
|
_content_type,
|
|
2591
2538
|
_headers,
|
|
@@ -2610,6 +2557,10 @@ class VirtualMachineApi:
|
|
|
2610
2557
|
if vm_id is not None:
|
|
2611
2558
|
_path_params['vm_id'] = vm_id
|
|
2612
2559
|
# process the query parameters
|
|
2560
|
+
if request_id is not None:
|
|
2561
|
+
|
|
2562
|
+
_query_params.append(('request_id', request_id))
|
|
2563
|
+
|
|
2613
2564
|
# process the header parameters
|
|
2614
2565
|
# process the form parameters
|
|
2615
2566
|
# process the body parameter
|
|
@@ -2631,7 +2582,7 @@ class VirtualMachineApi:
|
|
|
2631
2582
|
|
|
2632
2583
|
return self.api_client.param_serialize(
|
|
2633
2584
|
method='GET',
|
|
2634
|
-
resource_path='/core/virtual-machines/{vm_id}/
|
|
2585
|
+
resource_path='/core/virtual-machines/{vm_id}/logs',
|
|
2635
2586
|
path_params=_path_params,
|
|
2636
2587
|
query_params=_query_params,
|
|
2637
2588
|
header_params=_header_params,
|
|
@@ -2648,9 +2599,10 @@ class VirtualMachineApi:
|
|
|
2648
2599
|
|
|
2649
2600
|
|
|
2650
2601
|
@validate_call
|
|
2651
|
-
def
|
|
2602
|
+
def get_instance_metrics(
|
|
2652
2603
|
self,
|
|
2653
2604
|
vm_id: StrictInt,
|
|
2605
|
+
duration: Optional[StrictStr] = None,
|
|
2654
2606
|
_request_timeout: Union[
|
|
2655
2607
|
None,
|
|
2656
2608
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -2663,13 +2615,15 @@ class VirtualMachineApi:
|
|
|
2663
2615
|
_content_type: Optional[StrictStr] = None,
|
|
2664
2616
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2665
2617
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2666
|
-
) ->
|
|
2667
|
-
"""
|
|
2618
|
+
) -> MetricsFields:
|
|
2619
|
+
"""Retrieve virtual machine performance metrics
|
|
2668
2620
|
|
|
2669
|
-
|
|
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).
|
|
2670
2622
|
|
|
2671
2623
|
:param vm_id: (required)
|
|
2672
2624
|
:type vm_id: int
|
|
2625
|
+
:param duration:
|
|
2626
|
+
:type duration: str
|
|
2673
2627
|
:param _request_timeout: timeout setting for this request. If one
|
|
2674
2628
|
number provided, it will be total request
|
|
2675
2629
|
timeout. It can also be a pair (tuple) of
|
|
@@ -2692,8 +2646,9 @@ class VirtualMachineApi:
|
|
|
2692
2646
|
:return: Returns the result object.
|
|
2693
2647
|
""" # noqa: E501
|
|
2694
2648
|
|
|
2695
|
-
_param = self.
|
|
2649
|
+
_param = self._get_instance_metrics_serialize(
|
|
2696
2650
|
vm_id=vm_id,
|
|
2651
|
+
duration=duration,
|
|
2697
2652
|
_request_auth=_request_auth,
|
|
2698
2653
|
_content_type=_content_type,
|
|
2699
2654
|
_headers=_headers,
|
|
@@ -2701,10 +2656,11 @@ class VirtualMachineApi:
|
|
|
2701
2656
|
)
|
|
2702
2657
|
|
|
2703
2658
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
2704
|
-
'200': "
|
|
2659
|
+
'200': "MetricsFields",
|
|
2705
2660
|
'400': "ErrorResponseModel",
|
|
2706
2661
|
'401': "ErrorResponseModel",
|
|
2707
2662
|
'404': "ErrorResponseModel",
|
|
2663
|
+
'406': "ErrorResponseModel",
|
|
2708
2664
|
'500': None,
|
|
2709
2665
|
}
|
|
2710
2666
|
response_data = self.api_client.call_api(
|
|
@@ -2719,9 +2675,10 @@ class VirtualMachineApi:
|
|
|
2719
2675
|
|
|
2720
2676
|
|
|
2721
2677
|
@validate_call
|
|
2722
|
-
def
|
|
2678
|
+
def get_instance_metrics_with_http_info(
|
|
2723
2679
|
self,
|
|
2724
2680
|
vm_id: StrictInt,
|
|
2681
|
+
duration: Optional[StrictStr] = None,
|
|
2725
2682
|
_request_timeout: Union[
|
|
2726
2683
|
None,
|
|
2727
2684
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -2734,13 +2691,15 @@ class VirtualMachineApi:
|
|
|
2734
2691
|
_content_type: Optional[StrictStr] = None,
|
|
2735
2692
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2736
2693
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2737
|
-
) -> ApiResponse[
|
|
2738
|
-
"""
|
|
2694
|
+
) -> ApiResponse[MetricsFields]:
|
|
2695
|
+
"""Retrieve virtual machine performance metrics
|
|
2739
2696
|
|
|
2740
|
-
|
|
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).
|
|
2741
2698
|
|
|
2742
2699
|
:param vm_id: (required)
|
|
2743
2700
|
:type vm_id: int
|
|
2701
|
+
:param duration:
|
|
2702
|
+
:type duration: str
|
|
2744
2703
|
:param _request_timeout: timeout setting for this request. If one
|
|
2745
2704
|
number provided, it will be total request
|
|
2746
2705
|
timeout. It can also be a pair (tuple) of
|
|
@@ -2763,8 +2722,9 @@ class VirtualMachineApi:
|
|
|
2763
2722
|
:return: Returns the result object.
|
|
2764
2723
|
""" # noqa: E501
|
|
2765
2724
|
|
|
2766
|
-
_param = self.
|
|
2725
|
+
_param = self._get_instance_metrics_serialize(
|
|
2767
2726
|
vm_id=vm_id,
|
|
2727
|
+
duration=duration,
|
|
2768
2728
|
_request_auth=_request_auth,
|
|
2769
2729
|
_content_type=_content_type,
|
|
2770
2730
|
_headers=_headers,
|
|
@@ -2772,10 +2732,11 @@ class VirtualMachineApi:
|
|
|
2772
2732
|
)
|
|
2773
2733
|
|
|
2774
2734
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
2775
|
-
'200': "
|
|
2735
|
+
'200': "MetricsFields",
|
|
2776
2736
|
'400': "ErrorResponseModel",
|
|
2777
2737
|
'401': "ErrorResponseModel",
|
|
2778
2738
|
'404': "ErrorResponseModel",
|
|
2739
|
+
'406': "ErrorResponseModel",
|
|
2779
2740
|
'500': None,
|
|
2780
2741
|
}
|
|
2781
2742
|
response_data = self.api_client.call_api(
|
|
@@ -2790,9 +2751,10 @@ class VirtualMachineApi:
|
|
|
2790
2751
|
|
|
2791
2752
|
|
|
2792
2753
|
@validate_call
|
|
2793
|
-
def
|
|
2754
|
+
def get_instance_metrics_without_preload_content(
|
|
2794
2755
|
self,
|
|
2795
2756
|
vm_id: StrictInt,
|
|
2757
|
+
duration: Optional[StrictStr] = None,
|
|
2796
2758
|
_request_timeout: Union[
|
|
2797
2759
|
None,
|
|
2798
2760
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -2806,12 +2768,14 @@ class VirtualMachineApi:
|
|
|
2806
2768
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2807
2769
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2808
2770
|
) -> RESTResponseType:
|
|
2809
|
-
"""
|
|
2771
|
+
"""Retrieve virtual machine performance metrics
|
|
2810
2772
|
|
|
2811
|
-
|
|
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).
|
|
2812
2774
|
|
|
2813
2775
|
:param vm_id: (required)
|
|
2814
2776
|
:type vm_id: int
|
|
2777
|
+
:param duration:
|
|
2778
|
+
:type duration: str
|
|
2815
2779
|
:param _request_timeout: timeout setting for this request. If one
|
|
2816
2780
|
number provided, it will be total request
|
|
2817
2781
|
timeout. It can also be a pair (tuple) of
|
|
@@ -2834,8 +2798,9 @@ class VirtualMachineApi:
|
|
|
2834
2798
|
:return: Returns the result object.
|
|
2835
2799
|
""" # noqa: E501
|
|
2836
2800
|
|
|
2837
|
-
_param = self.
|
|
2801
|
+
_param = self._get_instance_metrics_serialize(
|
|
2838
2802
|
vm_id=vm_id,
|
|
2803
|
+
duration=duration,
|
|
2839
2804
|
_request_auth=_request_auth,
|
|
2840
2805
|
_content_type=_content_type,
|
|
2841
2806
|
_headers=_headers,
|
|
@@ -2843,10 +2808,11 @@ class VirtualMachineApi:
|
|
|
2843
2808
|
)
|
|
2844
2809
|
|
|
2845
2810
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
2846
|
-
'200': "
|
|
2811
|
+
'200': "MetricsFields",
|
|
2847
2812
|
'400': "ErrorResponseModel",
|
|
2848
2813
|
'401': "ErrorResponseModel",
|
|
2849
2814
|
'404': "ErrorResponseModel",
|
|
2815
|
+
'406': "ErrorResponseModel",
|
|
2850
2816
|
'500': None,
|
|
2851
2817
|
}
|
|
2852
2818
|
response_data = self.api_client.call_api(
|
|
@@ -2856,9 +2822,10 @@ class VirtualMachineApi:
|
|
|
2856
2822
|
return response_data.response
|
|
2857
2823
|
|
|
2858
2824
|
|
|
2859
|
-
def
|
|
2825
|
+
def _get_instance_metrics_serialize(
|
|
2860
2826
|
self,
|
|
2861
2827
|
vm_id,
|
|
2828
|
+
duration,
|
|
2862
2829
|
_request_auth,
|
|
2863
2830
|
_content_type,
|
|
2864
2831
|
_headers,
|
|
@@ -2883,6 +2850,10 @@ class VirtualMachineApi:
|
|
|
2883
2850
|
if vm_id is not None:
|
|
2884
2851
|
_path_params['vm_id'] = vm_id
|
|
2885
2852
|
# process the query parameters
|
|
2853
|
+
if duration is not None:
|
|
2854
|
+
|
|
2855
|
+
_query_params.append(('duration', duration))
|
|
2856
|
+
|
|
2886
2857
|
# process the header parameters
|
|
2887
2858
|
# process the form parameters
|
|
2888
2859
|
# process the body parameter
|
|
@@ -2904,7 +2875,7 @@ class VirtualMachineApi:
|
|
|
2904
2875
|
|
|
2905
2876
|
return self.api_client.param_serialize(
|
|
2906
2877
|
method='GET',
|
|
2907
|
-
resource_path='/core/virtual-machines/{vm_id}/
|
|
2878
|
+
resource_path='/core/virtual-machines/{vm_id}/metrics',
|
|
2908
2879
|
path_params=_path_params,
|
|
2909
2880
|
query_params=_query_params,
|
|
2910
2881
|
header_params=_header_params,
|
|
@@ -2921,7 +2892,7 @@ class VirtualMachineApi:
|
|
|
2921
2892
|
|
|
2922
2893
|
|
|
2923
2894
|
@validate_call
|
|
2924
|
-
def
|
|
2895
|
+
def get_instance_start(
|
|
2925
2896
|
self,
|
|
2926
2897
|
vm_id: StrictInt,
|
|
2927
2898
|
_request_timeout: Union[
|
|
@@ -2937,9 +2908,9 @@ class VirtualMachineApi:
|
|
|
2937
2908
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2938
2909
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2939
2910
|
) -> ResponseModel:
|
|
2940
|
-
"""
|
|
2911
|
+
"""Start virtual machine
|
|
2941
2912
|
|
|
2942
|
-
|
|
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.
|
|
2943
2914
|
|
|
2944
2915
|
:param vm_id: (required)
|
|
2945
2916
|
:type vm_id: int
|
|
@@ -2965,7 +2936,7 @@ class VirtualMachineApi:
|
|
|
2965
2936
|
:return: Returns the result object.
|
|
2966
2937
|
""" # noqa: E501
|
|
2967
2938
|
|
|
2968
|
-
_param = self.
|
|
2939
|
+
_param = self._get_instance_start_serialize(
|
|
2969
2940
|
vm_id=vm_id,
|
|
2970
2941
|
_request_auth=_request_auth,
|
|
2971
2942
|
_content_type=_content_type,
|
|
@@ -2992,7 +2963,7 @@ class VirtualMachineApi:
|
|
|
2992
2963
|
|
|
2993
2964
|
|
|
2994
2965
|
@validate_call
|
|
2995
|
-
def
|
|
2966
|
+
def get_instance_start_with_http_info(
|
|
2996
2967
|
self,
|
|
2997
2968
|
vm_id: StrictInt,
|
|
2998
2969
|
_request_timeout: Union[
|
|
@@ -3008,9 +2979,9 @@ class VirtualMachineApi:
|
|
|
3008
2979
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
3009
2980
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
3010
2981
|
) -> ApiResponse[ResponseModel]:
|
|
3011
|
-
"""
|
|
2982
|
+
"""Start virtual machine
|
|
3012
2983
|
|
|
3013
|
-
|
|
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.
|
|
3014
2985
|
|
|
3015
2986
|
:param vm_id: (required)
|
|
3016
2987
|
:type vm_id: int
|
|
@@ -3036,7 +3007,7 @@ class VirtualMachineApi:
|
|
|
3036
3007
|
:return: Returns the result object.
|
|
3037
3008
|
""" # noqa: E501
|
|
3038
3009
|
|
|
3039
|
-
_param = self.
|
|
3010
|
+
_param = self._get_instance_start_serialize(
|
|
3040
3011
|
vm_id=vm_id,
|
|
3041
3012
|
_request_auth=_request_auth,
|
|
3042
3013
|
_content_type=_content_type,
|
|
@@ -3063,7 +3034,7 @@ class VirtualMachineApi:
|
|
|
3063
3034
|
|
|
3064
3035
|
|
|
3065
3036
|
@validate_call
|
|
3066
|
-
def
|
|
3037
|
+
def get_instance_start_without_preload_content(
|
|
3067
3038
|
self,
|
|
3068
3039
|
vm_id: StrictInt,
|
|
3069
3040
|
_request_timeout: Union[
|
|
@@ -3079,9 +3050,9 @@ class VirtualMachineApi:
|
|
|
3079
3050
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
3080
3051
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
3081
3052
|
) -> RESTResponseType:
|
|
3082
|
-
"""
|
|
3053
|
+
"""Start virtual machine
|
|
3083
3054
|
|
|
3084
|
-
|
|
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.
|
|
3085
3056
|
|
|
3086
3057
|
:param vm_id: (required)
|
|
3087
3058
|
:type vm_id: int
|
|
@@ -3107,7 +3078,7 @@ class VirtualMachineApi:
|
|
|
3107
3078
|
:return: Returns the result object.
|
|
3108
3079
|
""" # noqa: E501
|
|
3109
3080
|
|
|
3110
|
-
_param = self.
|
|
3081
|
+
_param = self._get_instance_start_serialize(
|
|
3111
3082
|
vm_id=vm_id,
|
|
3112
3083
|
_request_auth=_request_auth,
|
|
3113
3084
|
_content_type=_content_type,
|
|
@@ -3129,7 +3100,7 @@ class VirtualMachineApi:
|
|
|
3129
3100
|
return response_data.response
|
|
3130
3101
|
|
|
3131
3102
|
|
|
3132
|
-
def
|
|
3103
|
+
def _get_instance_start_serialize(
|
|
3133
3104
|
self,
|
|
3134
3105
|
vm_id,
|
|
3135
3106
|
_request_auth,
|
|
@@ -3177,7 +3148,7 @@ class VirtualMachineApi:
|
|
|
3177
3148
|
|
|
3178
3149
|
return self.api_client.param_serialize(
|
|
3179
3150
|
method='GET',
|
|
3180
|
-
resource_path='/core/virtual-machines/{vm_id}/
|
|
3151
|
+
resource_path='/core/virtual-machines/{vm_id}/start',
|
|
3181
3152
|
path_params=_path_params,
|
|
3182
3153
|
query_params=_query_params,
|
|
3183
3154
|
header_params=_header_params,
|
|
@@ -3194,10 +3165,9 @@ class VirtualMachineApi:
|
|
|
3194
3165
|
|
|
3195
3166
|
|
|
3196
3167
|
@validate_call
|
|
3197
|
-
def
|
|
3168
|
+
def get_instance_stop(
|
|
3198
3169
|
self,
|
|
3199
3170
|
vm_id: StrictInt,
|
|
3200
|
-
request_id: StrictInt,
|
|
3201
3171
|
_request_timeout: Union[
|
|
3202
3172
|
None,
|
|
3203
3173
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -3210,15 +3180,13 @@ class VirtualMachineApi:
|
|
|
3210
3180
|
_content_type: Optional[StrictStr] = None,
|
|
3211
3181
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
3212
3182
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
3213
|
-
) ->
|
|
3214
|
-
"""
|
|
3183
|
+
) -> ResponseModel:
|
|
3184
|
+
"""Stop virtual machine
|
|
3215
3185
|
|
|
3216
|
-
|
|
3186
|
+
Shuts down a virtual machine. Provide the virtual machine ID in the path to initiate the shutdown process for the specified virtual machine.
|
|
3217
3187
|
|
|
3218
3188
|
:param vm_id: (required)
|
|
3219
3189
|
:type vm_id: int
|
|
3220
|
-
:param request_id: (required)
|
|
3221
|
-
:type request_id: int
|
|
3222
3190
|
:param _request_timeout: timeout setting for this request. If one
|
|
3223
3191
|
number provided, it will be total request
|
|
3224
3192
|
timeout. It can also be a pair (tuple) of
|
|
@@ -3241,9 +3209,8 @@ class VirtualMachineApi:
|
|
|
3241
3209
|
:return: Returns the result object.
|
|
3242
3210
|
""" # noqa: E501
|
|
3243
3211
|
|
|
3244
|
-
_param = self.
|
|
3212
|
+
_param = self._get_instance_stop_serialize(
|
|
3245
3213
|
vm_id=vm_id,
|
|
3246
|
-
request_id=request_id,
|
|
3247
3214
|
_request_auth=_request_auth,
|
|
3248
3215
|
_content_type=_content_type,
|
|
3249
3216
|
_headers=_headers,
|
|
@@ -3251,11 +3218,10 @@ class VirtualMachineApi:
|
|
|
3251
3218
|
)
|
|
3252
3219
|
|
|
3253
3220
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
3254
|
-
'200': "
|
|
3221
|
+
'200': "ResponseModel",
|
|
3255
3222
|
'400': "ErrorResponseModel",
|
|
3256
3223
|
'401': "ErrorResponseModel",
|
|
3257
3224
|
'404': "ErrorResponseModel",
|
|
3258
|
-
'405': "ErrorResponseModel",
|
|
3259
3225
|
'500': None,
|
|
3260
3226
|
}
|
|
3261
3227
|
response_data = self.api_client.call_api(
|
|
@@ -3270,10 +3236,9 @@ class VirtualMachineApi:
|
|
|
3270
3236
|
|
|
3271
3237
|
|
|
3272
3238
|
@validate_call
|
|
3273
|
-
def
|
|
3239
|
+
def get_instance_stop_with_http_info(
|
|
3274
3240
|
self,
|
|
3275
3241
|
vm_id: StrictInt,
|
|
3276
|
-
request_id: StrictInt,
|
|
3277
3242
|
_request_timeout: Union[
|
|
3278
3243
|
None,
|
|
3279
3244
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -3286,15 +3251,13 @@ class VirtualMachineApi:
|
|
|
3286
3251
|
_content_type: Optional[StrictStr] = None,
|
|
3287
3252
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
3288
3253
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
3289
|
-
) -> ApiResponse[
|
|
3290
|
-
"""
|
|
3254
|
+
) -> ApiResponse[ResponseModel]:
|
|
3255
|
+
"""Stop virtual machine
|
|
3291
3256
|
|
|
3292
|
-
|
|
3257
|
+
Shuts down a virtual machine. Provide the virtual machine ID in the path to initiate the shutdown process for the specified virtual machine.
|
|
3293
3258
|
|
|
3294
3259
|
:param vm_id: (required)
|
|
3295
3260
|
:type vm_id: int
|
|
3296
|
-
:param request_id: (required)
|
|
3297
|
-
:type request_id: int
|
|
3298
3261
|
:param _request_timeout: timeout setting for this request. If one
|
|
3299
3262
|
number provided, it will be total request
|
|
3300
3263
|
timeout. It can also be a pair (tuple) of
|
|
@@ -3317,9 +3280,8 @@ class VirtualMachineApi:
|
|
|
3317
3280
|
:return: Returns the result object.
|
|
3318
3281
|
""" # noqa: E501
|
|
3319
3282
|
|
|
3320
|
-
_param = self.
|
|
3283
|
+
_param = self._get_instance_stop_serialize(
|
|
3321
3284
|
vm_id=vm_id,
|
|
3322
|
-
request_id=request_id,
|
|
3323
3285
|
_request_auth=_request_auth,
|
|
3324
3286
|
_content_type=_content_type,
|
|
3325
3287
|
_headers=_headers,
|
|
@@ -3327,11 +3289,10 @@ class VirtualMachineApi:
|
|
|
3327
3289
|
)
|
|
3328
3290
|
|
|
3329
3291
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
3330
|
-
'200': "
|
|
3292
|
+
'200': "ResponseModel",
|
|
3331
3293
|
'400': "ErrorResponseModel",
|
|
3332
3294
|
'401': "ErrorResponseModel",
|
|
3333
3295
|
'404': "ErrorResponseModel",
|
|
3334
|
-
'405': "ErrorResponseModel",
|
|
3335
3296
|
'500': None,
|
|
3336
3297
|
}
|
|
3337
3298
|
response_data = self.api_client.call_api(
|
|
@@ -3346,10 +3307,9 @@ class VirtualMachineApi:
|
|
|
3346
3307
|
|
|
3347
3308
|
|
|
3348
3309
|
@validate_call
|
|
3349
|
-
def
|
|
3310
|
+
def get_instance_stop_without_preload_content(
|
|
3350
3311
|
self,
|
|
3351
3312
|
vm_id: StrictInt,
|
|
3352
|
-
request_id: StrictInt,
|
|
3353
3313
|
_request_timeout: Union[
|
|
3354
3314
|
None,
|
|
3355
3315
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -3363,14 +3323,12 @@ class VirtualMachineApi:
|
|
|
3363
3323
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
3364
3324
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
3365
3325
|
) -> RESTResponseType:
|
|
3366
|
-
"""
|
|
3326
|
+
"""Stop virtual machine
|
|
3367
3327
|
|
|
3368
|
-
|
|
3328
|
+
Shuts down a virtual machine. Provide the virtual machine ID in the path to initiate the shutdown process for the specified virtual machine.
|
|
3369
3329
|
|
|
3370
3330
|
:param vm_id: (required)
|
|
3371
3331
|
:type vm_id: int
|
|
3372
|
-
:param request_id: (required)
|
|
3373
|
-
:type request_id: int
|
|
3374
3332
|
:param _request_timeout: timeout setting for this request. If one
|
|
3375
3333
|
number provided, it will be total request
|
|
3376
3334
|
timeout. It can also be a pair (tuple) of
|
|
@@ -3393,9 +3351,8 @@ class VirtualMachineApi:
|
|
|
3393
3351
|
:return: Returns the result object.
|
|
3394
3352
|
""" # noqa: E501
|
|
3395
3353
|
|
|
3396
|
-
_param = self.
|
|
3354
|
+
_param = self._get_instance_stop_serialize(
|
|
3397
3355
|
vm_id=vm_id,
|
|
3398
|
-
request_id=request_id,
|
|
3399
3356
|
_request_auth=_request_auth,
|
|
3400
3357
|
_content_type=_content_type,
|
|
3401
3358
|
_headers=_headers,
|
|
@@ -3403,11 +3360,10 @@ class VirtualMachineApi:
|
|
|
3403
3360
|
)
|
|
3404
3361
|
|
|
3405
3362
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
3406
|
-
'200': "
|
|
3363
|
+
'200': "ResponseModel",
|
|
3407
3364
|
'400': "ErrorResponseModel",
|
|
3408
3365
|
'401': "ErrorResponseModel",
|
|
3409
3366
|
'404': "ErrorResponseModel",
|
|
3410
|
-
'405': "ErrorResponseModel",
|
|
3411
3367
|
'500': None,
|
|
3412
3368
|
}
|
|
3413
3369
|
response_data = self.api_client.call_api(
|
|
@@ -3417,10 +3373,9 @@ class VirtualMachineApi:
|
|
|
3417
3373
|
return response_data.response
|
|
3418
3374
|
|
|
3419
3375
|
|
|
3420
|
-
def
|
|
3376
|
+
def _get_instance_stop_serialize(
|
|
3421
3377
|
self,
|
|
3422
3378
|
vm_id,
|
|
3423
|
-
request_id,
|
|
3424
3379
|
_request_auth,
|
|
3425
3380
|
_content_type,
|
|
3426
3381
|
_headers,
|
|
@@ -3445,10 +3400,6 @@ class VirtualMachineApi:
|
|
|
3445
3400
|
if vm_id is not None:
|
|
3446
3401
|
_path_params['vm_id'] = vm_id
|
|
3447
3402
|
# process the query parameters
|
|
3448
|
-
if request_id is not None:
|
|
3449
|
-
|
|
3450
|
-
_query_params.append(('request_id', request_id))
|
|
3451
|
-
|
|
3452
3403
|
# process the header parameters
|
|
3453
3404
|
# process the form parameters
|
|
3454
3405
|
# process the body parameter
|
|
@@ -3470,7 +3421,7 @@ class VirtualMachineApi:
|
|
|
3470
3421
|
|
|
3471
3422
|
return self.api_client.param_serialize(
|
|
3472
3423
|
method='GET',
|
|
3473
|
-
resource_path='/core/virtual-machines/{vm_id}/
|
|
3424
|
+
resource_path='/core/virtual-machines/{vm_id}/stop',
|
|
3474
3425
|
path_params=_path_params,
|
|
3475
3426
|
query_params=_query_params,
|
|
3476
3427
|
header_params=_header_params,
|
|
@@ -3487,10 +3438,13 @@ class VirtualMachineApi:
|
|
|
3487
3438
|
|
|
3488
3439
|
|
|
3489
3440
|
@validate_call
|
|
3490
|
-
def
|
|
3441
|
+
def list_virtual_machines(
|
|
3491
3442
|
self,
|
|
3492
|
-
|
|
3493
|
-
|
|
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,
|
|
3494
3448
|
_request_timeout: Union[
|
|
3495
3449
|
None,
|
|
3496
3450
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -3503,15 +3457,21 @@ class VirtualMachineApi:
|
|
|
3503
3457
|
_content_type: Optional[StrictStr] = None,
|
|
3504
3458
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
3505
3459
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
3506
|
-
) ->
|
|
3507
|
-
"""
|
|
3460
|
+
) -> Instances:
|
|
3461
|
+
"""List virtual machines
|
|
3508
3462
|
|
|
3509
|
-
|
|
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.
|
|
3510
3464
|
|
|
3511
|
-
:param
|
|
3512
|
-
:type
|
|
3513
|
-
:param
|
|
3514
|
-
:type
|
|
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]
|
|
3515
3475
|
:param _request_timeout: timeout setting for this request. If one
|
|
3516
3476
|
number provided, it will be total request
|
|
3517
3477
|
timeout. It can also be a pair (tuple) of
|
|
@@ -3534,9 +3494,12 @@ class VirtualMachineApi:
|
|
|
3534
3494
|
:return: Returns the result object.
|
|
3535
3495
|
""" # noqa: E501
|
|
3536
3496
|
|
|
3537
|
-
_param = self.
|
|
3538
|
-
|
|
3539
|
-
|
|
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,
|
|
3540
3503
|
_request_auth=_request_auth,
|
|
3541
3504
|
_content_type=_content_type,
|
|
3542
3505
|
_headers=_headers,
|
|
@@ -3544,11 +3507,9 @@ class VirtualMachineApi:
|
|
|
3544
3507
|
)
|
|
3545
3508
|
|
|
3546
3509
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
3547
|
-
'200': "
|
|
3510
|
+
'200': "Instances",
|
|
3548
3511
|
'400': "ErrorResponseModel",
|
|
3549
3512
|
'401': "ErrorResponseModel",
|
|
3550
|
-
'404': "ErrorResponseModel",
|
|
3551
|
-
'406': "ErrorResponseModel",
|
|
3552
3513
|
'500': None,
|
|
3553
3514
|
}
|
|
3554
3515
|
response_data = self.api_client.call_api(
|
|
@@ -3563,10 +3524,13 @@ class VirtualMachineApi:
|
|
|
3563
3524
|
|
|
3564
3525
|
|
|
3565
3526
|
@validate_call
|
|
3566
|
-
def
|
|
3527
|
+
def list_virtual_machines_with_http_info(
|
|
3567
3528
|
self,
|
|
3568
|
-
|
|
3569
|
-
|
|
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,
|
|
3570
3534
|
_request_timeout: Union[
|
|
3571
3535
|
None,
|
|
3572
3536
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -3579,15 +3543,21 @@ class VirtualMachineApi:
|
|
|
3579
3543
|
_content_type: Optional[StrictStr] = None,
|
|
3580
3544
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
3581
3545
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
3582
|
-
) -> ApiResponse[
|
|
3583
|
-
"""
|
|
3546
|
+
) -> ApiResponse[Instances]:
|
|
3547
|
+
"""List virtual machines
|
|
3584
3548
|
|
|
3585
|
-
|
|
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.
|
|
3586
3550
|
|
|
3587
|
-
:param
|
|
3588
|
-
:type
|
|
3589
|
-
:param
|
|
3590
|
-
:type
|
|
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]
|
|
3591
3561
|
:param _request_timeout: timeout setting for this request. If one
|
|
3592
3562
|
number provided, it will be total request
|
|
3593
3563
|
timeout. It can also be a pair (tuple) of
|
|
@@ -3610,9 +3580,12 @@ class VirtualMachineApi:
|
|
|
3610
3580
|
:return: Returns the result object.
|
|
3611
3581
|
""" # noqa: E501
|
|
3612
3582
|
|
|
3613
|
-
_param = self.
|
|
3614
|
-
|
|
3615
|
-
|
|
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,
|
|
3616
3589
|
_request_auth=_request_auth,
|
|
3617
3590
|
_content_type=_content_type,
|
|
3618
3591
|
_headers=_headers,
|
|
@@ -3620,11 +3593,9 @@ class VirtualMachineApi:
|
|
|
3620
3593
|
)
|
|
3621
3594
|
|
|
3622
3595
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
3623
|
-
'200': "
|
|
3596
|
+
'200': "Instances",
|
|
3624
3597
|
'400': "ErrorResponseModel",
|
|
3625
3598
|
'401': "ErrorResponseModel",
|
|
3626
|
-
'404': "ErrorResponseModel",
|
|
3627
|
-
'406': "ErrorResponseModel",
|
|
3628
3599
|
'500': None,
|
|
3629
3600
|
}
|
|
3630
3601
|
response_data = self.api_client.call_api(
|
|
@@ -3639,10 +3610,13 @@ class VirtualMachineApi:
|
|
|
3639
3610
|
|
|
3640
3611
|
|
|
3641
3612
|
@validate_call
|
|
3642
|
-
def
|
|
3613
|
+
def list_virtual_machines_without_preload_content(
|
|
3643
3614
|
self,
|
|
3644
|
-
|
|
3645
|
-
|
|
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,
|
|
3646
3620
|
_request_timeout: Union[
|
|
3647
3621
|
None,
|
|
3648
3622
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -3656,14 +3630,20 @@ class VirtualMachineApi:
|
|
|
3656
3630
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
3657
3631
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
3658
3632
|
) -> RESTResponseType:
|
|
3659
|
-
"""
|
|
3633
|
+
"""List virtual machines
|
|
3660
3634
|
|
|
3661
|
-
|
|
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.
|
|
3662
3636
|
|
|
3663
|
-
:param
|
|
3664
|
-
:type
|
|
3665
|
-
:param
|
|
3666
|
-
:type
|
|
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]
|
|
3667
3647
|
:param _request_timeout: timeout setting for this request. If one
|
|
3668
3648
|
number provided, it will be total request
|
|
3669
3649
|
timeout. It can also be a pair (tuple) of
|
|
@@ -3686,9 +3666,12 @@ class VirtualMachineApi:
|
|
|
3686
3666
|
:return: Returns the result object.
|
|
3687
3667
|
""" # noqa: E501
|
|
3688
3668
|
|
|
3689
|
-
_param = self.
|
|
3690
|
-
|
|
3691
|
-
|
|
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,
|
|
3692
3675
|
_request_auth=_request_auth,
|
|
3693
3676
|
_content_type=_content_type,
|
|
3694
3677
|
_headers=_headers,
|
|
@@ -3696,11 +3679,9 @@ class VirtualMachineApi:
|
|
|
3696
3679
|
)
|
|
3697
3680
|
|
|
3698
3681
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
3699
|
-
'200': "
|
|
3682
|
+
'200': "Instances",
|
|
3700
3683
|
'400': "ErrorResponseModel",
|
|
3701
3684
|
'401': "ErrorResponseModel",
|
|
3702
|
-
'404': "ErrorResponseModel",
|
|
3703
|
-
'406': "ErrorResponseModel",
|
|
3704
3685
|
'500': None,
|
|
3705
3686
|
}
|
|
3706
3687
|
response_data = self.api_client.call_api(
|
|
@@ -3710,10 +3691,13 @@ class VirtualMachineApi:
|
|
|
3710
3691
|
return response_data.response
|
|
3711
3692
|
|
|
3712
3693
|
|
|
3713
|
-
def
|
|
3694
|
+
def _list_virtual_machines_serialize(
|
|
3714
3695
|
self,
|
|
3715
|
-
|
|
3716
|
-
|
|
3696
|
+
page,
|
|
3697
|
+
page_size,
|
|
3698
|
+
search,
|
|
3699
|
+
environment,
|
|
3700
|
+
exclude_firewalls,
|
|
3717
3701
|
_request_auth,
|
|
3718
3702
|
_content_type,
|
|
3719
3703
|
_headers,
|
|
@@ -3723,6 +3707,7 @@ class VirtualMachineApi:
|
|
|
3723
3707
|
_host = None
|
|
3724
3708
|
|
|
3725
3709
|
_collection_formats: Dict[str, str] = {
|
|
3710
|
+
'exclude_firewalls': 'multi',
|
|
3726
3711
|
}
|
|
3727
3712
|
|
|
3728
3713
|
_path_params: Dict[str, str] = {}
|
|
@@ -3735,12 +3720,26 @@ class VirtualMachineApi:
|
|
|
3735
3720
|
_body_params: Optional[bytes] = None
|
|
3736
3721
|
|
|
3737
3722
|
# process the path parameters
|
|
3738
|
-
if vm_id is not None:
|
|
3739
|
-
_path_params['vm_id'] = vm_id
|
|
3740
3723
|
# process the query parameters
|
|
3741
|
-
if
|
|
3724
|
+
if page is not None:
|
|
3742
3725
|
|
|
3743
|
-
_query_params.append(('
|
|
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))
|
|
3744
3743
|
|
|
3745
3744
|
# process the header parameters
|
|
3746
3745
|
# process the form parameters
|
|
@@ -3763,7 +3762,7 @@ class VirtualMachineApi:
|
|
|
3763
3762
|
|
|
3764
3763
|
return self.api_client.param_serialize(
|
|
3765
3764
|
method='GET',
|
|
3766
|
-
resource_path='/core/virtual-machines
|
|
3765
|
+
resource_path='/core/virtual-machines',
|
|
3767
3766
|
path_params=_path_params,
|
|
3768
3767
|
query_params=_query_params,
|
|
3769
3768
|
header_params=_header_params,
|
|
@@ -3780,9 +3779,10 @@ class VirtualMachineApi:
|
|
|
3780
3779
|
|
|
3781
3780
|
|
|
3782
3781
|
@validate_call
|
|
3783
|
-
def
|
|
3782
|
+
def post_instance_logs(
|
|
3784
3783
|
self,
|
|
3785
|
-
|
|
3784
|
+
vm_id: StrictInt,
|
|
3785
|
+
payload: RequestInstanceLogsPayload,
|
|
3786
3786
|
_request_timeout: Union[
|
|
3787
3787
|
None,
|
|
3788
3788
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -3795,13 +3795,15 @@ class VirtualMachineApi:
|
|
|
3795
3795
|
_content_type: Optional[StrictStr] = None,
|
|
3796
3796
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
3797
3797
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
3798
|
-
) ->
|
|
3799
|
-
"""
|
|
3798
|
+
) -> RequestInstanceLogsResponse:
|
|
3799
|
+
"""Request virtual machine logs
|
|
3800
3800
|
|
|
3801
|
-
|
|
3801
|
+
Request console logs for a virtual machine
|
|
3802
3802
|
|
|
3803
|
+
:param vm_id: (required)
|
|
3804
|
+
:type vm_id: int
|
|
3803
3805
|
:param payload: (required)
|
|
3804
|
-
:type payload:
|
|
3806
|
+
:type payload: RequestInstanceLogsPayload
|
|
3805
3807
|
:param _request_timeout: timeout setting for this request. If one
|
|
3806
3808
|
number provided, it will be total request
|
|
3807
3809
|
timeout. It can also be a pair (tuple) of
|
|
@@ -3824,7 +3826,8 @@ class VirtualMachineApi:
|
|
|
3824
3826
|
:return: Returns the result object.
|
|
3825
3827
|
""" # noqa: E501
|
|
3826
3828
|
|
|
3827
|
-
_param = self.
|
|
3829
|
+
_param = self._post_instance_logs_serialize(
|
|
3830
|
+
vm_id=vm_id,
|
|
3828
3831
|
payload=payload,
|
|
3829
3832
|
_request_auth=_request_auth,
|
|
3830
3833
|
_content_type=_content_type,
|
|
@@ -3833,12 +3836,11 @@ class VirtualMachineApi:
|
|
|
3833
3836
|
)
|
|
3834
3837
|
|
|
3835
3838
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
3836
|
-
'200': "
|
|
3839
|
+
'200': "RequestInstanceLogsResponse",
|
|
3837
3840
|
'400': "ErrorResponseModel",
|
|
3838
3841
|
'401': "ErrorResponseModel",
|
|
3839
3842
|
'404': "ErrorResponseModel",
|
|
3840
3843
|
'405': "ErrorResponseModel",
|
|
3841
|
-
'409': "ErrorResponseModel",
|
|
3842
3844
|
'500': None,
|
|
3843
3845
|
}
|
|
3844
3846
|
response_data = self.api_client.call_api(
|
|
@@ -3853,9 +3855,10 @@ class VirtualMachineApi:
|
|
|
3853
3855
|
|
|
3854
3856
|
|
|
3855
3857
|
@validate_call
|
|
3856
|
-
def
|
|
3858
|
+
def post_instance_logs_with_http_info(
|
|
3857
3859
|
self,
|
|
3858
|
-
|
|
3860
|
+
vm_id: StrictInt,
|
|
3861
|
+
payload: RequestInstanceLogsPayload,
|
|
3859
3862
|
_request_timeout: Union[
|
|
3860
3863
|
None,
|
|
3861
3864
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -3868,13 +3871,15 @@ class VirtualMachineApi:
|
|
|
3868
3871
|
_content_type: Optional[StrictStr] = None,
|
|
3869
3872
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
3870
3873
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
3871
|
-
) -> ApiResponse[
|
|
3872
|
-
"""
|
|
3874
|
+
) -> ApiResponse[RequestInstanceLogsResponse]:
|
|
3875
|
+
"""Request virtual machine logs
|
|
3873
3876
|
|
|
3874
|
-
|
|
3877
|
+
Request console logs for a virtual machine
|
|
3875
3878
|
|
|
3879
|
+
:param vm_id: (required)
|
|
3880
|
+
:type vm_id: int
|
|
3876
3881
|
:param payload: (required)
|
|
3877
|
-
:type payload:
|
|
3882
|
+
:type payload: RequestInstanceLogsPayload
|
|
3878
3883
|
:param _request_timeout: timeout setting for this request. If one
|
|
3879
3884
|
number provided, it will be total request
|
|
3880
3885
|
timeout. It can also be a pair (tuple) of
|
|
@@ -3897,7 +3902,8 @@ class VirtualMachineApi:
|
|
|
3897
3902
|
:return: Returns the result object.
|
|
3898
3903
|
""" # noqa: E501
|
|
3899
3904
|
|
|
3900
|
-
_param = self.
|
|
3905
|
+
_param = self._post_instance_logs_serialize(
|
|
3906
|
+
vm_id=vm_id,
|
|
3901
3907
|
payload=payload,
|
|
3902
3908
|
_request_auth=_request_auth,
|
|
3903
3909
|
_content_type=_content_type,
|
|
@@ -3906,12 +3912,11 @@ class VirtualMachineApi:
|
|
|
3906
3912
|
)
|
|
3907
3913
|
|
|
3908
3914
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
3909
|
-
'200': "
|
|
3915
|
+
'200': "RequestInstanceLogsResponse",
|
|
3910
3916
|
'400': "ErrorResponseModel",
|
|
3911
3917
|
'401': "ErrorResponseModel",
|
|
3912
3918
|
'404': "ErrorResponseModel",
|
|
3913
3919
|
'405': "ErrorResponseModel",
|
|
3914
|
-
'409': "ErrorResponseModel",
|
|
3915
3920
|
'500': None,
|
|
3916
3921
|
}
|
|
3917
3922
|
response_data = self.api_client.call_api(
|
|
@@ -3926,9 +3931,10 @@ class VirtualMachineApi:
|
|
|
3926
3931
|
|
|
3927
3932
|
|
|
3928
3933
|
@validate_call
|
|
3929
|
-
def
|
|
3934
|
+
def post_instance_logs_without_preload_content(
|
|
3930
3935
|
self,
|
|
3931
|
-
|
|
3936
|
+
vm_id: StrictInt,
|
|
3937
|
+
payload: RequestInstanceLogsPayload,
|
|
3932
3938
|
_request_timeout: Union[
|
|
3933
3939
|
None,
|
|
3934
3940
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -3942,12 +3948,14 @@ class VirtualMachineApi:
|
|
|
3942
3948
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
3943
3949
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
3944
3950
|
) -> RESTResponseType:
|
|
3945
|
-
"""
|
|
3951
|
+
"""Request virtual machine logs
|
|
3946
3952
|
|
|
3947
|
-
|
|
3953
|
+
Request console logs for a virtual machine
|
|
3948
3954
|
|
|
3955
|
+
:param vm_id: (required)
|
|
3956
|
+
:type vm_id: int
|
|
3949
3957
|
:param payload: (required)
|
|
3950
|
-
:type payload:
|
|
3958
|
+
:type payload: RequestInstanceLogsPayload
|
|
3951
3959
|
:param _request_timeout: timeout setting for this request. If one
|
|
3952
3960
|
number provided, it will be total request
|
|
3953
3961
|
timeout. It can also be a pair (tuple) of
|
|
@@ -3970,7 +3978,8 @@ class VirtualMachineApi:
|
|
|
3970
3978
|
:return: Returns the result object.
|
|
3971
3979
|
""" # noqa: E501
|
|
3972
3980
|
|
|
3973
|
-
_param = self.
|
|
3981
|
+
_param = self._post_instance_logs_serialize(
|
|
3982
|
+
vm_id=vm_id,
|
|
3974
3983
|
payload=payload,
|
|
3975
3984
|
_request_auth=_request_auth,
|
|
3976
3985
|
_content_type=_content_type,
|
|
@@ -3979,12 +3988,11 @@ class VirtualMachineApi:
|
|
|
3979
3988
|
)
|
|
3980
3989
|
|
|
3981
3990
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
3982
|
-
'200': "
|
|
3991
|
+
'200': "RequestInstanceLogsResponse",
|
|
3983
3992
|
'400': "ErrorResponseModel",
|
|
3984
3993
|
'401': "ErrorResponseModel",
|
|
3985
3994
|
'404': "ErrorResponseModel",
|
|
3986
3995
|
'405': "ErrorResponseModel",
|
|
3987
|
-
'409': "ErrorResponseModel",
|
|
3988
3996
|
'500': None,
|
|
3989
3997
|
}
|
|
3990
3998
|
response_data = self.api_client.call_api(
|
|
@@ -3994,8 +4002,9 @@ class VirtualMachineApi:
|
|
|
3994
4002
|
return response_data.response
|
|
3995
4003
|
|
|
3996
4004
|
|
|
3997
|
-
def
|
|
4005
|
+
def _post_instance_logs_serialize(
|
|
3998
4006
|
self,
|
|
4007
|
+
vm_id,
|
|
3999
4008
|
payload,
|
|
4000
4009
|
_request_auth,
|
|
4001
4010
|
_content_type,
|
|
@@ -4018,6 +4027,8 @@ class VirtualMachineApi:
|
|
|
4018
4027
|
_body_params: Optional[bytes] = None
|
|
4019
4028
|
|
|
4020
4029
|
# process the path parameters
|
|
4030
|
+
if vm_id is not None:
|
|
4031
|
+
_path_params['vm_id'] = vm_id
|
|
4021
4032
|
# process the query parameters
|
|
4022
4033
|
# process the header parameters
|
|
4023
4034
|
# process the form parameters
|
|
@@ -4055,7 +4066,7 @@ class VirtualMachineApi:
|
|
|
4055
4066
|
|
|
4056
4067
|
return self.api_client.param_serialize(
|
|
4057
4068
|
method='POST',
|
|
4058
|
-
resource_path='/core/virtual-machines',
|
|
4069
|
+
resource_path='/core/virtual-machines/{vm_id}/logs',
|
|
4059
4070
|
path_params=_path_params,
|
|
4060
4071
|
query_params=_query_params,
|
|
4061
4072
|
header_params=_header_params,
|
|
@@ -4072,10 +4083,10 @@ class VirtualMachineApi:
|
|
|
4072
4083
|
|
|
4073
4084
|
|
|
4074
4085
|
@validate_call
|
|
4075
|
-
def
|
|
4086
|
+
def post_instance_resize(
|
|
4076
4087
|
self,
|
|
4077
4088
|
vm_id: StrictInt,
|
|
4078
|
-
payload:
|
|
4089
|
+
payload: InstanceResizePayload,
|
|
4079
4090
|
_request_timeout: Union[
|
|
4080
4091
|
None,
|
|
4081
4092
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -4089,14 +4100,14 @@ class VirtualMachineApi:
|
|
|
4089
4100
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
4090
4101
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
4091
4102
|
) -> ResponseModel:
|
|
4092
|
-
"""
|
|
4103
|
+
"""Resize virtual machine
|
|
4093
4104
|
|
|
4094
|
-
|
|
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).
|
|
4095
4106
|
|
|
4096
4107
|
:param vm_id: (required)
|
|
4097
4108
|
:type vm_id: int
|
|
4098
4109
|
:param payload: (required)
|
|
4099
|
-
:type payload:
|
|
4110
|
+
:type payload: InstanceResizePayload
|
|
4100
4111
|
:param _request_timeout: timeout setting for this request. If one
|
|
4101
4112
|
number provided, it will be total request
|
|
4102
4113
|
timeout. It can also be a pair (tuple) of
|
|
@@ -4119,7 +4130,7 @@ class VirtualMachineApi:
|
|
|
4119
4130
|
:return: Returns the result object.
|
|
4120
4131
|
""" # noqa: E501
|
|
4121
4132
|
|
|
4122
|
-
_param = self.
|
|
4133
|
+
_param = self._post_instance_resize_serialize(
|
|
4123
4134
|
vm_id=vm_id,
|
|
4124
4135
|
payload=payload,
|
|
4125
4136
|
_request_auth=_request_auth,
|
|
@@ -4133,6 +4144,7 @@ class VirtualMachineApi:
|
|
|
4133
4144
|
'400': "ErrorResponseModel",
|
|
4134
4145
|
'401': "ErrorResponseModel",
|
|
4135
4146
|
'404': "ErrorResponseModel",
|
|
4147
|
+
'405': "ErrorResponseModel",
|
|
4136
4148
|
'500': None,
|
|
4137
4149
|
}
|
|
4138
4150
|
response_data = self.api_client.call_api(
|
|
@@ -4147,10 +4159,10 @@ class VirtualMachineApi:
|
|
|
4147
4159
|
|
|
4148
4160
|
|
|
4149
4161
|
@validate_call
|
|
4150
|
-
def
|
|
4162
|
+
def post_instance_resize_with_http_info(
|
|
4151
4163
|
self,
|
|
4152
4164
|
vm_id: StrictInt,
|
|
4153
|
-
payload:
|
|
4165
|
+
payload: InstanceResizePayload,
|
|
4154
4166
|
_request_timeout: Union[
|
|
4155
4167
|
None,
|
|
4156
4168
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -4164,14 +4176,14 @@ class VirtualMachineApi:
|
|
|
4164
4176
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
4165
4177
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
4166
4178
|
) -> ApiResponse[ResponseModel]:
|
|
4167
|
-
"""
|
|
4179
|
+
"""Resize virtual machine
|
|
4168
4180
|
|
|
4169
|
-
|
|
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).
|
|
4170
4182
|
|
|
4171
4183
|
:param vm_id: (required)
|
|
4172
4184
|
:type vm_id: int
|
|
4173
4185
|
:param payload: (required)
|
|
4174
|
-
:type payload:
|
|
4186
|
+
:type payload: InstanceResizePayload
|
|
4175
4187
|
:param _request_timeout: timeout setting for this request. If one
|
|
4176
4188
|
number provided, it will be total request
|
|
4177
4189
|
timeout. It can also be a pair (tuple) of
|
|
@@ -4194,7 +4206,7 @@ class VirtualMachineApi:
|
|
|
4194
4206
|
:return: Returns the result object.
|
|
4195
4207
|
""" # noqa: E501
|
|
4196
4208
|
|
|
4197
|
-
_param = self.
|
|
4209
|
+
_param = self._post_instance_resize_serialize(
|
|
4198
4210
|
vm_id=vm_id,
|
|
4199
4211
|
payload=payload,
|
|
4200
4212
|
_request_auth=_request_auth,
|
|
@@ -4208,6 +4220,7 @@ class VirtualMachineApi:
|
|
|
4208
4220
|
'400': "ErrorResponseModel",
|
|
4209
4221
|
'401': "ErrorResponseModel",
|
|
4210
4222
|
'404': "ErrorResponseModel",
|
|
4223
|
+
'405': "ErrorResponseModel",
|
|
4211
4224
|
'500': None,
|
|
4212
4225
|
}
|
|
4213
4226
|
response_data = self.api_client.call_api(
|
|
@@ -4222,10 +4235,10 @@ class VirtualMachineApi:
|
|
|
4222
4235
|
|
|
4223
4236
|
|
|
4224
4237
|
@validate_call
|
|
4225
|
-
def
|
|
4238
|
+
def post_instance_resize_without_preload_content(
|
|
4226
4239
|
self,
|
|
4227
4240
|
vm_id: StrictInt,
|
|
4228
|
-
payload:
|
|
4241
|
+
payload: InstanceResizePayload,
|
|
4229
4242
|
_request_timeout: Union[
|
|
4230
4243
|
None,
|
|
4231
4244
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -4239,14 +4252,14 @@ class VirtualMachineApi:
|
|
|
4239
4252
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
4240
4253
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
4241
4254
|
) -> RESTResponseType:
|
|
4242
|
-
"""
|
|
4255
|
+
"""Resize virtual machine
|
|
4243
4256
|
|
|
4244
|
-
|
|
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).
|
|
4245
4258
|
|
|
4246
4259
|
:param vm_id: (required)
|
|
4247
4260
|
:type vm_id: int
|
|
4248
4261
|
:param payload: (required)
|
|
4249
|
-
:type payload:
|
|
4262
|
+
:type payload: InstanceResizePayload
|
|
4250
4263
|
:param _request_timeout: timeout setting for this request. If one
|
|
4251
4264
|
number provided, it will be total request
|
|
4252
4265
|
timeout. It can also be a pair (tuple) of
|
|
@@ -4269,7 +4282,7 @@ class VirtualMachineApi:
|
|
|
4269
4282
|
:return: Returns the result object.
|
|
4270
4283
|
""" # noqa: E501
|
|
4271
4284
|
|
|
4272
|
-
_param = self.
|
|
4285
|
+
_param = self._post_instance_resize_serialize(
|
|
4273
4286
|
vm_id=vm_id,
|
|
4274
4287
|
payload=payload,
|
|
4275
4288
|
_request_auth=_request_auth,
|
|
@@ -4283,6 +4296,7 @@ class VirtualMachineApi:
|
|
|
4283
4296
|
'400': "ErrorResponseModel",
|
|
4284
4297
|
'401': "ErrorResponseModel",
|
|
4285
4298
|
'404': "ErrorResponseModel",
|
|
4299
|
+
'405': "ErrorResponseModel",
|
|
4286
4300
|
'500': None,
|
|
4287
4301
|
}
|
|
4288
4302
|
response_data = self.api_client.call_api(
|
|
@@ -4292,7 +4306,7 @@ class VirtualMachineApi:
|
|
|
4292
4306
|
return response_data.response
|
|
4293
4307
|
|
|
4294
4308
|
|
|
4295
|
-
def
|
|
4309
|
+
def _post_instance_resize_serialize(
|
|
4296
4310
|
self,
|
|
4297
4311
|
vm_id,
|
|
4298
4312
|
payload,
|
|
@@ -4356,7 +4370,7 @@ class VirtualMachineApi:
|
|
|
4356
4370
|
|
|
4357
4371
|
return self.api_client.param_serialize(
|
|
4358
4372
|
method='POST',
|
|
4359
|
-
resource_path='/core/virtual-machines/{vm_id}/
|
|
4373
|
+
resource_path='/core/virtual-machines/{vm_id}/resize',
|
|
4360
4374
|
path_params=_path_params,
|
|
4361
4375
|
query_params=_query_params,
|
|
4362
4376
|
header_params=_header_params,
|
|
@@ -4373,10 +4387,10 @@ class VirtualMachineApi:
|
|
|
4373
4387
|
|
|
4374
4388
|
|
|
4375
4389
|
@validate_call
|
|
4376
|
-
def
|
|
4390
|
+
def post_security_rule(
|
|
4377
4391
|
self,
|
|
4378
4392
|
vm_id: StrictInt,
|
|
4379
|
-
payload:
|
|
4393
|
+
payload: CreateSecurityRulePayload,
|
|
4380
4394
|
_request_timeout: Union[
|
|
4381
4395
|
None,
|
|
4382
4396
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -4389,15 +4403,15 @@ class VirtualMachineApi:
|
|
|
4389
4403
|
_content_type: Optional[StrictStr] = None,
|
|
4390
4404
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
4391
4405
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
4392
|
-
) ->
|
|
4393
|
-
"""
|
|
4406
|
+
) -> SecurityGroupRule:
|
|
4407
|
+
"""Add firewall rule to virtual machine
|
|
4394
4408
|
|
|
4395
|
-
|
|
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).
|
|
4396
4410
|
|
|
4397
4411
|
:param vm_id: (required)
|
|
4398
4412
|
:type vm_id: int
|
|
4399
4413
|
:param payload: (required)
|
|
4400
|
-
:type payload:
|
|
4414
|
+
:type payload: CreateSecurityRulePayload
|
|
4401
4415
|
:param _request_timeout: timeout setting for this request. If one
|
|
4402
4416
|
number provided, it will be total request
|
|
4403
4417
|
timeout. It can also be a pair (tuple) of
|
|
@@ -4420,7 +4434,7 @@ class VirtualMachineApi:
|
|
|
4420
4434
|
:return: Returns the result object.
|
|
4421
4435
|
""" # noqa: E501
|
|
4422
4436
|
|
|
4423
|
-
_param = self.
|
|
4437
|
+
_param = self._post_security_rule_serialize(
|
|
4424
4438
|
vm_id=vm_id,
|
|
4425
4439
|
payload=payload,
|
|
4426
4440
|
_request_auth=_request_auth,
|
|
@@ -4430,11 +4444,11 @@ class VirtualMachineApi:
|
|
|
4430
4444
|
)
|
|
4431
4445
|
|
|
4432
4446
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
4433
|
-
'200': "
|
|
4447
|
+
'200': "SecurityGroupRule",
|
|
4434
4448
|
'400': "ErrorResponseModel",
|
|
4435
4449
|
'401': "ErrorResponseModel",
|
|
4436
4450
|
'404': "ErrorResponseModel",
|
|
4437
|
-
'
|
|
4451
|
+
'409': "ErrorResponseModel",
|
|
4438
4452
|
'500': None,
|
|
4439
4453
|
}
|
|
4440
4454
|
response_data = self.api_client.call_api(
|
|
@@ -4449,10 +4463,10 @@ class VirtualMachineApi:
|
|
|
4449
4463
|
|
|
4450
4464
|
|
|
4451
4465
|
@validate_call
|
|
4452
|
-
def
|
|
4466
|
+
def post_security_rule_with_http_info(
|
|
4453
4467
|
self,
|
|
4454
4468
|
vm_id: StrictInt,
|
|
4455
|
-
payload:
|
|
4469
|
+
payload: CreateSecurityRulePayload,
|
|
4456
4470
|
_request_timeout: Union[
|
|
4457
4471
|
None,
|
|
4458
4472
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -4465,15 +4479,15 @@ class VirtualMachineApi:
|
|
|
4465
4479
|
_content_type: Optional[StrictStr] = None,
|
|
4466
4480
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
4467
4481
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
4468
|
-
) -> ApiResponse[
|
|
4469
|
-
"""
|
|
4482
|
+
) -> ApiResponse[SecurityGroupRule]:
|
|
4483
|
+
"""Add firewall rule to virtual machine
|
|
4470
4484
|
|
|
4471
|
-
|
|
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).
|
|
4472
4486
|
|
|
4473
4487
|
:param vm_id: (required)
|
|
4474
4488
|
:type vm_id: int
|
|
4475
4489
|
:param payload: (required)
|
|
4476
|
-
:type payload:
|
|
4490
|
+
:type payload: CreateSecurityRulePayload
|
|
4477
4491
|
:param _request_timeout: timeout setting for this request. If one
|
|
4478
4492
|
number provided, it will be total request
|
|
4479
4493
|
timeout. It can also be a pair (tuple) of
|
|
@@ -4496,7 +4510,7 @@ class VirtualMachineApi:
|
|
|
4496
4510
|
:return: Returns the result object.
|
|
4497
4511
|
""" # noqa: E501
|
|
4498
4512
|
|
|
4499
|
-
_param = self.
|
|
4513
|
+
_param = self._post_security_rule_serialize(
|
|
4500
4514
|
vm_id=vm_id,
|
|
4501
4515
|
payload=payload,
|
|
4502
4516
|
_request_auth=_request_auth,
|
|
@@ -4506,11 +4520,11 @@ class VirtualMachineApi:
|
|
|
4506
4520
|
)
|
|
4507
4521
|
|
|
4508
4522
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
4509
|
-
'200': "
|
|
4523
|
+
'200': "SecurityGroupRule",
|
|
4510
4524
|
'400': "ErrorResponseModel",
|
|
4511
4525
|
'401': "ErrorResponseModel",
|
|
4512
4526
|
'404': "ErrorResponseModel",
|
|
4513
|
-
'
|
|
4527
|
+
'409': "ErrorResponseModel",
|
|
4514
4528
|
'500': None,
|
|
4515
4529
|
}
|
|
4516
4530
|
response_data = self.api_client.call_api(
|
|
@@ -4525,10 +4539,10 @@ class VirtualMachineApi:
|
|
|
4525
4539
|
|
|
4526
4540
|
|
|
4527
4541
|
@validate_call
|
|
4528
|
-
def
|
|
4542
|
+
def post_security_rule_without_preload_content(
|
|
4529
4543
|
self,
|
|
4530
4544
|
vm_id: StrictInt,
|
|
4531
|
-
payload:
|
|
4545
|
+
payload: CreateSecurityRulePayload,
|
|
4532
4546
|
_request_timeout: Union[
|
|
4533
4547
|
None,
|
|
4534
4548
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -4542,14 +4556,14 @@ class VirtualMachineApi:
|
|
|
4542
4556
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
4543
4557
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
4544
4558
|
) -> RESTResponseType:
|
|
4545
|
-
"""
|
|
4559
|
+
"""Add firewall rule to virtual machine
|
|
4546
4560
|
|
|
4547
|
-
|
|
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).
|
|
4548
4562
|
|
|
4549
4563
|
:param vm_id: (required)
|
|
4550
4564
|
:type vm_id: int
|
|
4551
4565
|
:param payload: (required)
|
|
4552
|
-
:type payload:
|
|
4566
|
+
:type payload: CreateSecurityRulePayload
|
|
4553
4567
|
:param _request_timeout: timeout setting for this request. If one
|
|
4554
4568
|
number provided, it will be total request
|
|
4555
4569
|
timeout. It can also be a pair (tuple) of
|
|
@@ -4572,7 +4586,7 @@ class VirtualMachineApi:
|
|
|
4572
4586
|
:return: Returns the result object.
|
|
4573
4587
|
""" # noqa: E501
|
|
4574
4588
|
|
|
4575
|
-
_param = self.
|
|
4589
|
+
_param = self._post_security_rule_serialize(
|
|
4576
4590
|
vm_id=vm_id,
|
|
4577
4591
|
payload=payload,
|
|
4578
4592
|
_request_auth=_request_auth,
|
|
@@ -4582,11 +4596,11 @@ class VirtualMachineApi:
|
|
|
4582
4596
|
)
|
|
4583
4597
|
|
|
4584
4598
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
4585
|
-
'200': "
|
|
4599
|
+
'200': "SecurityGroupRule",
|
|
4586
4600
|
'400': "ErrorResponseModel",
|
|
4587
4601
|
'401': "ErrorResponseModel",
|
|
4588
4602
|
'404': "ErrorResponseModel",
|
|
4589
|
-
'
|
|
4603
|
+
'409': "ErrorResponseModel",
|
|
4590
4604
|
'500': None,
|
|
4591
4605
|
}
|
|
4592
4606
|
response_data = self.api_client.call_api(
|
|
@@ -4596,7 +4610,7 @@ class VirtualMachineApi:
|
|
|
4596
4610
|
return response_data.response
|
|
4597
4611
|
|
|
4598
4612
|
|
|
4599
|
-
def
|
|
4613
|
+
def _post_security_rule_serialize(
|
|
4600
4614
|
self,
|
|
4601
4615
|
vm_id,
|
|
4602
4616
|
payload,
|
|
@@ -4660,7 +4674,7 @@ class VirtualMachineApi:
|
|
|
4660
4674
|
|
|
4661
4675
|
return self.api_client.param_serialize(
|
|
4662
4676
|
method='POST',
|
|
4663
|
-
resource_path='/core/virtual-machines/{vm_id}/
|
|
4677
|
+
resource_path='/core/virtual-machines/{vm_id}/sg-rules',
|
|
4664
4678
|
path_params=_path_params,
|
|
4665
4679
|
query_params=_query_params,
|
|
4666
4680
|
header_params=_header_params,
|
|
@@ -4677,10 +4691,10 @@ class VirtualMachineApi:
|
|
|
4677
4691
|
|
|
4678
4692
|
|
|
4679
4693
|
@validate_call
|
|
4680
|
-
def
|
|
4694
|
+
def post_snapshots(
|
|
4681
4695
|
self,
|
|
4682
4696
|
vm_id: StrictInt,
|
|
4683
|
-
payload:
|
|
4697
|
+
payload: CreateSnapshotPayload,
|
|
4684
4698
|
_request_timeout: Union[
|
|
4685
4699
|
None,
|
|
4686
4700
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -4693,15 +4707,15 @@ class VirtualMachineApi:
|
|
|
4693
4707
|
_content_type: Optional[StrictStr] = None,
|
|
4694
4708
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
4695
4709
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
4696
|
-
) ->
|
|
4697
|
-
"""
|
|
4710
|
+
) -> CreateSnapshotResponse:
|
|
4711
|
+
"""Create snapshot from a virtual machine
|
|
4698
4712
|
|
|
4699
|
-
|
|
4713
|
+
Create snapshots of a virtual machine by providing the virtual machine ID in the path
|
|
4700
4714
|
|
|
4701
4715
|
:param vm_id: (required)
|
|
4702
4716
|
:type vm_id: int
|
|
4703
4717
|
:param payload: (required)
|
|
4704
|
-
:type payload:
|
|
4718
|
+
:type payload: CreateSnapshotPayload
|
|
4705
4719
|
:param _request_timeout: timeout setting for this request. If one
|
|
4706
4720
|
number provided, it will be total request
|
|
4707
4721
|
timeout. It can also be a pair (tuple) of
|
|
@@ -4724,7 +4738,7 @@ class VirtualMachineApi:
|
|
|
4724
4738
|
:return: Returns the result object.
|
|
4725
4739
|
""" # noqa: E501
|
|
4726
4740
|
|
|
4727
|
-
_param = self.
|
|
4741
|
+
_param = self._post_snapshots_serialize(
|
|
4728
4742
|
vm_id=vm_id,
|
|
4729
4743
|
payload=payload,
|
|
4730
4744
|
_request_auth=_request_auth,
|
|
@@ -4734,11 +4748,10 @@ class VirtualMachineApi:
|
|
|
4734
4748
|
)
|
|
4735
4749
|
|
|
4736
4750
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
4737
|
-
'
|
|
4751
|
+
'201': "CreateSnapshotResponse",
|
|
4738
4752
|
'400': "ErrorResponseModel",
|
|
4739
4753
|
'401': "ErrorResponseModel",
|
|
4740
4754
|
'404': "ErrorResponseModel",
|
|
4741
|
-
'405': "ErrorResponseModel",
|
|
4742
4755
|
'500': None,
|
|
4743
4756
|
}
|
|
4744
4757
|
response_data = self.api_client.call_api(
|
|
@@ -4753,10 +4766,10 @@ class VirtualMachineApi:
|
|
|
4753
4766
|
|
|
4754
4767
|
|
|
4755
4768
|
@validate_call
|
|
4756
|
-
def
|
|
4769
|
+
def post_snapshots_with_http_info(
|
|
4757
4770
|
self,
|
|
4758
4771
|
vm_id: StrictInt,
|
|
4759
|
-
payload:
|
|
4772
|
+
payload: CreateSnapshotPayload,
|
|
4760
4773
|
_request_timeout: Union[
|
|
4761
4774
|
None,
|
|
4762
4775
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -4769,15 +4782,15 @@ class VirtualMachineApi:
|
|
|
4769
4782
|
_content_type: Optional[StrictStr] = None,
|
|
4770
4783
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
4771
4784
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
4772
|
-
) -> ApiResponse[
|
|
4773
|
-
"""
|
|
4785
|
+
) -> ApiResponse[CreateSnapshotResponse]:
|
|
4786
|
+
"""Create snapshot from a virtual machine
|
|
4774
4787
|
|
|
4775
|
-
|
|
4788
|
+
Create snapshots of a virtual machine by providing the virtual machine ID in the path
|
|
4776
4789
|
|
|
4777
4790
|
:param vm_id: (required)
|
|
4778
4791
|
:type vm_id: int
|
|
4779
4792
|
:param payload: (required)
|
|
4780
|
-
:type payload:
|
|
4793
|
+
:type payload: CreateSnapshotPayload
|
|
4781
4794
|
:param _request_timeout: timeout setting for this request. If one
|
|
4782
4795
|
number provided, it will be total request
|
|
4783
4796
|
timeout. It can also be a pair (tuple) of
|
|
@@ -4800,7 +4813,7 @@ class VirtualMachineApi:
|
|
|
4800
4813
|
:return: Returns the result object.
|
|
4801
4814
|
""" # noqa: E501
|
|
4802
4815
|
|
|
4803
|
-
_param = self.
|
|
4816
|
+
_param = self._post_snapshots_serialize(
|
|
4804
4817
|
vm_id=vm_id,
|
|
4805
4818
|
payload=payload,
|
|
4806
4819
|
_request_auth=_request_auth,
|
|
@@ -4810,11 +4823,10 @@ class VirtualMachineApi:
|
|
|
4810
4823
|
)
|
|
4811
4824
|
|
|
4812
4825
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
4813
|
-
'
|
|
4826
|
+
'201': "CreateSnapshotResponse",
|
|
4814
4827
|
'400': "ErrorResponseModel",
|
|
4815
4828
|
'401': "ErrorResponseModel",
|
|
4816
4829
|
'404': "ErrorResponseModel",
|
|
4817
|
-
'405': "ErrorResponseModel",
|
|
4818
4830
|
'500': None,
|
|
4819
4831
|
}
|
|
4820
4832
|
response_data = self.api_client.call_api(
|
|
@@ -4829,10 +4841,10 @@ class VirtualMachineApi:
|
|
|
4829
4841
|
|
|
4830
4842
|
|
|
4831
4843
|
@validate_call
|
|
4832
|
-
def
|
|
4844
|
+
def post_snapshots_without_preload_content(
|
|
4833
4845
|
self,
|
|
4834
4846
|
vm_id: StrictInt,
|
|
4835
|
-
payload:
|
|
4847
|
+
payload: CreateSnapshotPayload,
|
|
4836
4848
|
_request_timeout: Union[
|
|
4837
4849
|
None,
|
|
4838
4850
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -4846,14 +4858,14 @@ class VirtualMachineApi:
|
|
|
4846
4858
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
4847
4859
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
4848
4860
|
) -> RESTResponseType:
|
|
4849
|
-
"""
|
|
4861
|
+
"""Create snapshot from a virtual machine
|
|
4850
4862
|
|
|
4851
|
-
|
|
4863
|
+
Create snapshots of a virtual machine by providing the virtual machine ID in the path
|
|
4852
4864
|
|
|
4853
4865
|
:param vm_id: (required)
|
|
4854
4866
|
:type vm_id: int
|
|
4855
4867
|
:param payload: (required)
|
|
4856
|
-
:type payload:
|
|
4868
|
+
:type payload: CreateSnapshotPayload
|
|
4857
4869
|
:param _request_timeout: timeout setting for this request. If one
|
|
4858
4870
|
number provided, it will be total request
|
|
4859
4871
|
timeout. It can also be a pair (tuple) of
|
|
@@ -4876,7 +4888,7 @@ class VirtualMachineApi:
|
|
|
4876
4888
|
:return: Returns the result object.
|
|
4877
4889
|
""" # noqa: E501
|
|
4878
4890
|
|
|
4879
|
-
_param = self.
|
|
4891
|
+
_param = self._post_snapshots_serialize(
|
|
4880
4892
|
vm_id=vm_id,
|
|
4881
4893
|
payload=payload,
|
|
4882
4894
|
_request_auth=_request_auth,
|
|
@@ -4886,11 +4898,10 @@ class VirtualMachineApi:
|
|
|
4886
4898
|
)
|
|
4887
4899
|
|
|
4888
4900
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
4889
|
-
'
|
|
4901
|
+
'201': "CreateSnapshotResponse",
|
|
4890
4902
|
'400': "ErrorResponseModel",
|
|
4891
4903
|
'401': "ErrorResponseModel",
|
|
4892
4904
|
'404': "ErrorResponseModel",
|
|
4893
|
-
'405': "ErrorResponseModel",
|
|
4894
4905
|
'500': None,
|
|
4895
4906
|
}
|
|
4896
4907
|
response_data = self.api_client.call_api(
|
|
@@ -4900,7 +4911,7 @@ class VirtualMachineApi:
|
|
|
4900
4911
|
return response_data.response
|
|
4901
4912
|
|
|
4902
4913
|
|
|
4903
|
-
def
|
|
4914
|
+
def _post_snapshots_serialize(
|
|
4904
4915
|
self,
|
|
4905
4916
|
vm_id,
|
|
4906
4917
|
payload,
|
|
@@ -4964,7 +4975,7 @@ class VirtualMachineApi:
|
|
|
4964
4975
|
|
|
4965
4976
|
return self.api_client.param_serialize(
|
|
4966
4977
|
method='POST',
|
|
4967
|
-
resource_path='/core/virtual-machines/{vm_id}/
|
|
4978
|
+
resource_path='/core/virtual-machines/{vm_id}/snapshots',
|
|
4968
4979
|
path_params=_path_params,
|
|
4969
4980
|
query_params=_query_params,
|
|
4970
4981
|
header_params=_header_params,
|
|
@@ -4981,10 +4992,10 @@ class VirtualMachineApi:
|
|
|
4981
4992
|
|
|
4982
4993
|
|
|
4983
4994
|
@validate_call
|
|
4984
|
-
def
|
|
4995
|
+
def put_labels(
|
|
4985
4996
|
self,
|
|
4986
4997
|
vm_id: StrictInt,
|
|
4987
|
-
payload:
|
|
4998
|
+
payload: EditLabelOfAnExistingVMPayload,
|
|
4988
4999
|
_request_timeout: Union[
|
|
4989
5000
|
None,
|
|
4990
5001
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -4997,15 +5008,15 @@ class VirtualMachineApi:
|
|
|
4997
5008
|
_content_type: Optional[StrictStr] = None,
|
|
4998
5009
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
4999
5010
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
5000
|
-
) ->
|
|
5001
|
-
"""
|
|
5011
|
+
) -> ResponseModel:
|
|
5012
|
+
"""Edit virtual machine labels
|
|
5002
5013
|
|
|
5003
|
-
|
|
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.
|
|
5004
5015
|
|
|
5005
5016
|
:param vm_id: (required)
|
|
5006
5017
|
:type vm_id: int
|
|
5007
5018
|
:param payload: (required)
|
|
5008
|
-
:type payload:
|
|
5019
|
+
:type payload: EditLabelOfAnExistingVMPayload
|
|
5009
5020
|
:param _request_timeout: timeout setting for this request. If one
|
|
5010
5021
|
number provided, it will be total request
|
|
5011
5022
|
timeout. It can also be a pair (tuple) of
|
|
@@ -5028,7 +5039,7 @@ class VirtualMachineApi:
|
|
|
5028
5039
|
:return: Returns the result object.
|
|
5029
5040
|
""" # noqa: E501
|
|
5030
5041
|
|
|
5031
|
-
_param = self.
|
|
5042
|
+
_param = self._put_labels_serialize(
|
|
5032
5043
|
vm_id=vm_id,
|
|
5033
5044
|
payload=payload,
|
|
5034
5045
|
_request_auth=_request_auth,
|
|
@@ -5038,7 +5049,7 @@ class VirtualMachineApi:
|
|
|
5038
5049
|
)
|
|
5039
5050
|
|
|
5040
5051
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
5041
|
-
'200': "
|
|
5052
|
+
'200': "ResponseModel",
|
|
5042
5053
|
'400': "ErrorResponseModel",
|
|
5043
5054
|
'401': "ErrorResponseModel",
|
|
5044
5055
|
'404': "ErrorResponseModel",
|
|
@@ -5057,10 +5068,10 @@ class VirtualMachineApi:
|
|
|
5057
5068
|
|
|
5058
5069
|
|
|
5059
5070
|
@validate_call
|
|
5060
|
-
def
|
|
5071
|
+
def put_labels_with_http_info(
|
|
5061
5072
|
self,
|
|
5062
5073
|
vm_id: StrictInt,
|
|
5063
|
-
payload:
|
|
5074
|
+
payload: EditLabelOfAnExistingVMPayload,
|
|
5064
5075
|
_request_timeout: Union[
|
|
5065
5076
|
None,
|
|
5066
5077
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -5073,15 +5084,15 @@ class VirtualMachineApi:
|
|
|
5073
5084
|
_content_type: Optional[StrictStr] = None,
|
|
5074
5085
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
5075
5086
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
5076
|
-
) -> ApiResponse[
|
|
5077
|
-
"""
|
|
5087
|
+
) -> ApiResponse[ResponseModel]:
|
|
5088
|
+
"""Edit virtual machine labels
|
|
5078
5089
|
|
|
5079
|
-
|
|
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.
|
|
5080
5091
|
|
|
5081
5092
|
:param vm_id: (required)
|
|
5082
5093
|
:type vm_id: int
|
|
5083
5094
|
:param payload: (required)
|
|
5084
|
-
:type payload:
|
|
5095
|
+
:type payload: EditLabelOfAnExistingVMPayload
|
|
5085
5096
|
:param _request_timeout: timeout setting for this request. If one
|
|
5086
5097
|
number provided, it will be total request
|
|
5087
5098
|
timeout. It can also be a pair (tuple) of
|
|
@@ -5104,7 +5115,7 @@ class VirtualMachineApi:
|
|
|
5104
5115
|
:return: Returns the result object.
|
|
5105
5116
|
""" # noqa: E501
|
|
5106
5117
|
|
|
5107
|
-
_param = self.
|
|
5118
|
+
_param = self._put_labels_serialize(
|
|
5108
5119
|
vm_id=vm_id,
|
|
5109
5120
|
payload=payload,
|
|
5110
5121
|
_request_auth=_request_auth,
|
|
@@ -5114,7 +5125,7 @@ class VirtualMachineApi:
|
|
|
5114
5125
|
)
|
|
5115
5126
|
|
|
5116
5127
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
5117
|
-
'200': "
|
|
5128
|
+
'200': "ResponseModel",
|
|
5118
5129
|
'400': "ErrorResponseModel",
|
|
5119
5130
|
'401': "ErrorResponseModel",
|
|
5120
5131
|
'404': "ErrorResponseModel",
|
|
@@ -5133,10 +5144,10 @@ class VirtualMachineApi:
|
|
|
5133
5144
|
|
|
5134
5145
|
|
|
5135
5146
|
@validate_call
|
|
5136
|
-
def
|
|
5147
|
+
def put_labels_without_preload_content(
|
|
5137
5148
|
self,
|
|
5138
5149
|
vm_id: StrictInt,
|
|
5139
|
-
payload:
|
|
5150
|
+
payload: EditLabelOfAnExistingVMPayload,
|
|
5140
5151
|
_request_timeout: Union[
|
|
5141
5152
|
None,
|
|
5142
5153
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -5150,14 +5161,14 @@ class VirtualMachineApi:
|
|
|
5150
5161
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
5151
5162
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
5152
5163
|
) -> RESTResponseType:
|
|
5153
|
-
"""
|
|
5164
|
+
"""Edit virtual machine labels
|
|
5154
5165
|
|
|
5155
|
-
|
|
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.
|
|
5156
5167
|
|
|
5157
5168
|
:param vm_id: (required)
|
|
5158
5169
|
:type vm_id: int
|
|
5159
5170
|
:param payload: (required)
|
|
5160
|
-
:type payload:
|
|
5171
|
+
:type payload: EditLabelOfAnExistingVMPayload
|
|
5161
5172
|
:param _request_timeout: timeout setting for this request. If one
|
|
5162
5173
|
number provided, it will be total request
|
|
5163
5174
|
timeout. It can also be a pair (tuple) of
|
|
@@ -5180,7 +5191,7 @@ class VirtualMachineApi:
|
|
|
5180
5191
|
:return: Returns the result object.
|
|
5181
5192
|
""" # noqa: E501
|
|
5182
5193
|
|
|
5183
|
-
_param = self.
|
|
5194
|
+
_param = self._put_labels_serialize(
|
|
5184
5195
|
vm_id=vm_id,
|
|
5185
5196
|
payload=payload,
|
|
5186
5197
|
_request_auth=_request_auth,
|
|
@@ -5190,7 +5201,7 @@ class VirtualMachineApi:
|
|
|
5190
5201
|
)
|
|
5191
5202
|
|
|
5192
5203
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
5193
|
-
'200': "
|
|
5204
|
+
'200': "ResponseModel",
|
|
5194
5205
|
'400': "ErrorResponseModel",
|
|
5195
5206
|
'401': "ErrorResponseModel",
|
|
5196
5207
|
'404': "ErrorResponseModel",
|
|
@@ -5204,7 +5215,7 @@ class VirtualMachineApi:
|
|
|
5204
5215
|
return response_data.response
|
|
5205
5216
|
|
|
5206
5217
|
|
|
5207
|
-
def
|
|
5218
|
+
def _put_labels_serialize(
|
|
5208
5219
|
self,
|
|
5209
5220
|
vm_id,
|
|
5210
5221
|
payload,
|
|
@@ -5267,8 +5278,8 @@ class VirtualMachineApi:
|
|
|
5267
5278
|
]
|
|
5268
5279
|
|
|
5269
5280
|
return self.api_client.param_serialize(
|
|
5270
|
-
method='
|
|
5271
|
-
resource_path='/core/virtual-machines/{vm_id}/
|
|
5281
|
+
method='PUT',
|
|
5282
|
+
resource_path='/core/virtual-machines/{vm_id}/label',
|
|
5272
5283
|
path_params=_path_params,
|
|
5273
5284
|
query_params=_query_params,
|
|
5274
5285
|
header_params=_header_params,
|
|
@@ -5285,10 +5296,9 @@ class VirtualMachineApi:
|
|
|
5285
5296
|
|
|
5286
5297
|
|
|
5287
5298
|
@validate_call
|
|
5288
|
-
def
|
|
5299
|
+
def retrieve_virtual_machine_details(
|
|
5289
5300
|
self,
|
|
5290
5301
|
vm_id: StrictInt,
|
|
5291
|
-
payload: CreateSnapshotPayload,
|
|
5292
5302
|
_request_timeout: Union[
|
|
5293
5303
|
None,
|
|
5294
5304
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -5301,15 +5311,13 @@ class VirtualMachineApi:
|
|
|
5301
5311
|
_content_type: Optional[StrictStr] = None,
|
|
5302
5312
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
5303
5313
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
5304
|
-
) ->
|
|
5305
|
-
"""
|
|
5314
|
+
) -> Instance:
|
|
5315
|
+
"""Retrieve virtual machine details
|
|
5306
5316
|
|
|
5307
|
-
|
|
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.
|
|
5308
5318
|
|
|
5309
5319
|
:param vm_id: (required)
|
|
5310
5320
|
:type vm_id: int
|
|
5311
|
-
:param payload: (required)
|
|
5312
|
-
:type payload: CreateSnapshotPayload
|
|
5313
5321
|
:param _request_timeout: timeout setting for this request. If one
|
|
5314
5322
|
number provided, it will be total request
|
|
5315
5323
|
timeout. It can also be a pair (tuple) of
|
|
@@ -5332,9 +5340,8 @@ class VirtualMachineApi:
|
|
|
5332
5340
|
:return: Returns the result object.
|
|
5333
5341
|
""" # noqa: E501
|
|
5334
5342
|
|
|
5335
|
-
_param = self.
|
|
5343
|
+
_param = self._retrieve_virtual_machine_details_serialize(
|
|
5336
5344
|
vm_id=vm_id,
|
|
5337
|
-
payload=payload,
|
|
5338
5345
|
_request_auth=_request_auth,
|
|
5339
5346
|
_content_type=_content_type,
|
|
5340
5347
|
_headers=_headers,
|
|
@@ -5342,7 +5349,7 @@ class VirtualMachineApi:
|
|
|
5342
5349
|
)
|
|
5343
5350
|
|
|
5344
5351
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
5345
|
-
'
|
|
5352
|
+
'200': "Instance",
|
|
5346
5353
|
'400': "ErrorResponseModel",
|
|
5347
5354
|
'401': "ErrorResponseModel",
|
|
5348
5355
|
'404': "ErrorResponseModel",
|
|
@@ -5360,10 +5367,9 @@ class VirtualMachineApi:
|
|
|
5360
5367
|
|
|
5361
5368
|
|
|
5362
5369
|
@validate_call
|
|
5363
|
-
def
|
|
5370
|
+
def retrieve_virtual_machine_details_with_http_info(
|
|
5364
5371
|
self,
|
|
5365
5372
|
vm_id: StrictInt,
|
|
5366
|
-
payload: CreateSnapshotPayload,
|
|
5367
5373
|
_request_timeout: Union[
|
|
5368
5374
|
None,
|
|
5369
5375
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -5376,15 +5382,13 @@ class VirtualMachineApi:
|
|
|
5376
5382
|
_content_type: Optional[StrictStr] = None,
|
|
5377
5383
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
5378
5384
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
5379
|
-
) -> ApiResponse[
|
|
5380
|
-
"""
|
|
5385
|
+
) -> ApiResponse[Instance]:
|
|
5386
|
+
"""Retrieve virtual machine details
|
|
5381
5387
|
|
|
5382
|
-
|
|
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.
|
|
5383
5389
|
|
|
5384
5390
|
:param vm_id: (required)
|
|
5385
5391
|
:type vm_id: int
|
|
5386
|
-
:param payload: (required)
|
|
5387
|
-
:type payload: CreateSnapshotPayload
|
|
5388
5392
|
:param _request_timeout: timeout setting for this request. If one
|
|
5389
5393
|
number provided, it will be total request
|
|
5390
5394
|
timeout. It can also be a pair (tuple) of
|
|
@@ -5407,9 +5411,8 @@ class VirtualMachineApi:
|
|
|
5407
5411
|
:return: Returns the result object.
|
|
5408
5412
|
""" # noqa: E501
|
|
5409
5413
|
|
|
5410
|
-
_param = self.
|
|
5414
|
+
_param = self._retrieve_virtual_machine_details_serialize(
|
|
5411
5415
|
vm_id=vm_id,
|
|
5412
|
-
payload=payload,
|
|
5413
5416
|
_request_auth=_request_auth,
|
|
5414
5417
|
_content_type=_content_type,
|
|
5415
5418
|
_headers=_headers,
|
|
@@ -5417,7 +5420,7 @@ class VirtualMachineApi:
|
|
|
5417
5420
|
)
|
|
5418
5421
|
|
|
5419
5422
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
5420
|
-
'
|
|
5423
|
+
'200': "Instance",
|
|
5421
5424
|
'400': "ErrorResponseModel",
|
|
5422
5425
|
'401': "ErrorResponseModel",
|
|
5423
5426
|
'404': "ErrorResponseModel",
|
|
@@ -5435,10 +5438,9 @@ class VirtualMachineApi:
|
|
|
5435
5438
|
|
|
5436
5439
|
|
|
5437
5440
|
@validate_call
|
|
5438
|
-
def
|
|
5441
|
+
def retrieve_virtual_machine_details_without_preload_content(
|
|
5439
5442
|
self,
|
|
5440
5443
|
vm_id: StrictInt,
|
|
5441
|
-
payload: CreateSnapshotPayload,
|
|
5442
5444
|
_request_timeout: Union[
|
|
5443
5445
|
None,
|
|
5444
5446
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -5452,14 +5454,12 @@ class VirtualMachineApi:
|
|
|
5452
5454
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
5453
5455
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
5454
5456
|
) -> RESTResponseType:
|
|
5455
|
-
"""
|
|
5457
|
+
"""Retrieve virtual machine details
|
|
5456
5458
|
|
|
5457
|
-
|
|
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.
|
|
5458
5460
|
|
|
5459
5461
|
:param vm_id: (required)
|
|
5460
5462
|
:type vm_id: int
|
|
5461
|
-
:param payload: (required)
|
|
5462
|
-
:type payload: CreateSnapshotPayload
|
|
5463
5463
|
:param _request_timeout: timeout setting for this request. If one
|
|
5464
5464
|
number provided, it will be total request
|
|
5465
5465
|
timeout. It can also be a pair (tuple) of
|
|
@@ -5482,9 +5482,8 @@ class VirtualMachineApi:
|
|
|
5482
5482
|
:return: Returns the result object.
|
|
5483
5483
|
""" # noqa: E501
|
|
5484
5484
|
|
|
5485
|
-
_param = self.
|
|
5485
|
+
_param = self._retrieve_virtual_machine_details_serialize(
|
|
5486
5486
|
vm_id=vm_id,
|
|
5487
|
-
payload=payload,
|
|
5488
5487
|
_request_auth=_request_auth,
|
|
5489
5488
|
_content_type=_content_type,
|
|
5490
5489
|
_headers=_headers,
|
|
@@ -5492,7 +5491,7 @@ class VirtualMachineApi:
|
|
|
5492
5491
|
)
|
|
5493
5492
|
|
|
5494
5493
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
5495
|
-
'
|
|
5494
|
+
'200': "Instance",
|
|
5496
5495
|
'400': "ErrorResponseModel",
|
|
5497
5496
|
'401': "ErrorResponseModel",
|
|
5498
5497
|
'404': "ErrorResponseModel",
|
|
@@ -5505,10 +5504,9 @@ class VirtualMachineApi:
|
|
|
5505
5504
|
return response_data.response
|
|
5506
5505
|
|
|
5507
5506
|
|
|
5508
|
-
def
|
|
5507
|
+
def _retrieve_virtual_machine_details_serialize(
|
|
5509
5508
|
self,
|
|
5510
5509
|
vm_id,
|
|
5511
|
-
payload,
|
|
5512
5510
|
_request_auth,
|
|
5513
5511
|
_content_type,
|
|
5514
5512
|
_headers,
|
|
@@ -5536,8 +5534,6 @@ class VirtualMachineApi:
|
|
|
5536
5534
|
# process the header parameters
|
|
5537
5535
|
# process the form parameters
|
|
5538
5536
|
# process the body parameter
|
|
5539
|
-
if payload is not None:
|
|
5540
|
-
_body_params = payload
|
|
5541
5537
|
|
|
5542
5538
|
|
|
5543
5539
|
# set the HTTP header `Accept`
|
|
@@ -5548,19 +5544,6 @@ class VirtualMachineApi:
|
|
|
5548
5544
|
]
|
|
5549
5545
|
)
|
|
5550
5546
|
|
|
5551
|
-
# set the HTTP header `Content-Type`
|
|
5552
|
-
if _content_type:
|
|
5553
|
-
_header_params['Content-Type'] = _content_type
|
|
5554
|
-
else:
|
|
5555
|
-
_default_content_type = (
|
|
5556
|
-
self.api_client.select_header_content_type(
|
|
5557
|
-
[
|
|
5558
|
-
'application/json'
|
|
5559
|
-
]
|
|
5560
|
-
)
|
|
5561
|
-
)
|
|
5562
|
-
if _default_content_type is not None:
|
|
5563
|
-
_header_params['Content-Type'] = _default_content_type
|
|
5564
5547
|
|
|
5565
5548
|
# authentication setting
|
|
5566
5549
|
_auth_settings: List[str] = [
|
|
@@ -5568,8 +5551,8 @@ class VirtualMachineApi:
|
|
|
5568
5551
|
]
|
|
5569
5552
|
|
|
5570
5553
|
return self.api_client.param_serialize(
|
|
5571
|
-
method='
|
|
5572
|
-
resource_path='/core/virtual-machines/{vm_id}
|
|
5554
|
+
method='GET',
|
|
5555
|
+
resource_path='/core/virtual-machines/{vm_id}',
|
|
5573
5556
|
path_params=_path_params,
|
|
5574
5557
|
query_params=_query_params,
|
|
5575
5558
|
header_params=_header_params,
|
|
@@ -5586,10 +5569,12 @@ class VirtualMachineApi:
|
|
|
5586
5569
|
|
|
5587
5570
|
|
|
5588
5571
|
@validate_call
|
|
5589
|
-
def
|
|
5572
|
+
def retrieve_virtual_machines_associated_with_a_contract(
|
|
5590
5573
|
self,
|
|
5591
|
-
|
|
5592
|
-
|
|
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,
|
|
5593
5578
|
_request_timeout: Union[
|
|
5594
5579
|
None,
|
|
5595
5580
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -5602,15 +5587,19 @@ class VirtualMachineApi:
|
|
|
5602
5587
|
_content_type: Optional[StrictStr] = None,
|
|
5603
5588
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
5604
5589
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
5605
|
-
) ->
|
|
5606
|
-
"""
|
|
5590
|
+
) -> ContractInstancesResponse:
|
|
5591
|
+
"""Retrieve virtual machines associated with a contract
|
|
5607
5592
|
|
|
5608
|
-
|
|
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.
|
|
5609
5594
|
|
|
5610
|
-
:param
|
|
5611
|
-
:type
|
|
5612
|
-
:param
|
|
5613
|
-
:type
|
|
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
|
|
5614
5603
|
:param _request_timeout: timeout setting for this request. If one
|
|
5615
5604
|
number provided, it will be total request
|
|
5616
5605
|
timeout. It can also be a pair (tuple) of
|
|
@@ -5633,9 +5622,11 @@ class VirtualMachineApi:
|
|
|
5633
5622
|
:return: Returns the result object.
|
|
5634
5623
|
""" # noqa: E501
|
|
5635
5624
|
|
|
5636
|
-
_param = self.
|
|
5637
|
-
|
|
5638
|
-
|
|
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,
|
|
5639
5630
|
_request_auth=_request_auth,
|
|
5640
5631
|
_content_type=_content_type,
|
|
5641
5632
|
_headers=_headers,
|
|
@@ -5643,11 +5634,9 @@ class VirtualMachineApi:
|
|
|
5643
5634
|
)
|
|
5644
5635
|
|
|
5645
5636
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
5646
|
-
'200': "
|
|
5637
|
+
'200': "ContractInstancesResponse",
|
|
5647
5638
|
'400': "ErrorResponseModel",
|
|
5648
5639
|
'401': "ErrorResponseModel",
|
|
5649
|
-
'404': "ErrorResponseModel",
|
|
5650
|
-
'409': "ErrorResponseModel",
|
|
5651
5640
|
'500': None,
|
|
5652
5641
|
}
|
|
5653
5642
|
response_data = self.api_client.call_api(
|
|
@@ -5662,10 +5651,12 @@ class VirtualMachineApi:
|
|
|
5662
5651
|
|
|
5663
5652
|
|
|
5664
5653
|
@validate_call
|
|
5665
|
-
def
|
|
5654
|
+
def retrieve_virtual_machines_associated_with_a_contract_with_http_info(
|
|
5666
5655
|
self,
|
|
5667
|
-
|
|
5668
|
-
|
|
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,
|
|
5669
5660
|
_request_timeout: Union[
|
|
5670
5661
|
None,
|
|
5671
5662
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -5678,15 +5669,19 @@ class VirtualMachineApi:
|
|
|
5678
5669
|
_content_type: Optional[StrictStr] = None,
|
|
5679
5670
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
5680
5671
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
5681
|
-
) -> ApiResponse[
|
|
5682
|
-
"""
|
|
5672
|
+
) -> ApiResponse[ContractInstancesResponse]:
|
|
5673
|
+
"""Retrieve virtual machines associated with a contract
|
|
5683
5674
|
|
|
5684
|
-
|
|
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.
|
|
5685
5676
|
|
|
5686
|
-
:param
|
|
5687
|
-
:type
|
|
5688
|
-
:param
|
|
5689
|
-
:type
|
|
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
|
|
5690
5685
|
:param _request_timeout: timeout setting for this request. If one
|
|
5691
5686
|
number provided, it will be total request
|
|
5692
5687
|
timeout. It can also be a pair (tuple) of
|
|
@@ -5709,9 +5704,11 @@ class VirtualMachineApi:
|
|
|
5709
5704
|
:return: Returns the result object.
|
|
5710
5705
|
""" # noqa: E501
|
|
5711
5706
|
|
|
5712
|
-
_param = self.
|
|
5713
|
-
|
|
5714
|
-
|
|
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,
|
|
5715
5712
|
_request_auth=_request_auth,
|
|
5716
5713
|
_content_type=_content_type,
|
|
5717
5714
|
_headers=_headers,
|
|
@@ -5719,11 +5716,9 @@ class VirtualMachineApi:
|
|
|
5719
5716
|
)
|
|
5720
5717
|
|
|
5721
5718
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
5722
|
-
'200': "
|
|
5719
|
+
'200': "ContractInstancesResponse",
|
|
5723
5720
|
'400': "ErrorResponseModel",
|
|
5724
5721
|
'401': "ErrorResponseModel",
|
|
5725
|
-
'404': "ErrorResponseModel",
|
|
5726
|
-
'409': "ErrorResponseModel",
|
|
5727
5722
|
'500': None,
|
|
5728
5723
|
}
|
|
5729
5724
|
response_data = self.api_client.call_api(
|
|
@@ -5738,10 +5733,12 @@ class VirtualMachineApi:
|
|
|
5738
5733
|
|
|
5739
5734
|
|
|
5740
5735
|
@validate_call
|
|
5741
|
-
def
|
|
5736
|
+
def retrieve_virtual_machines_associated_with_a_contract_without_preload_content(
|
|
5742
5737
|
self,
|
|
5743
|
-
|
|
5744
|
-
|
|
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,
|
|
5745
5742
|
_request_timeout: Union[
|
|
5746
5743
|
None,
|
|
5747
5744
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -5755,14 +5752,18 @@ class VirtualMachineApi:
|
|
|
5755
5752
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
5756
5753
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
5757
5754
|
) -> RESTResponseType:
|
|
5758
|
-
"""
|
|
5755
|
+
"""Retrieve virtual machines associated with a contract
|
|
5759
5756
|
|
|
5760
|
-
|
|
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.
|
|
5761
5758
|
|
|
5762
|
-
:param
|
|
5763
|
-
:type
|
|
5764
|
-
:param
|
|
5765
|
-
:type
|
|
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
|
|
5766
5767
|
:param _request_timeout: timeout setting for this request. If one
|
|
5767
5768
|
number provided, it will be total request
|
|
5768
5769
|
timeout. It can also be a pair (tuple) of
|
|
@@ -5785,9 +5786,11 @@ class VirtualMachineApi:
|
|
|
5785
5786
|
:return: Returns the result object.
|
|
5786
5787
|
""" # noqa: E501
|
|
5787
5788
|
|
|
5788
|
-
_param = self.
|
|
5789
|
-
|
|
5790
|
-
|
|
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,
|
|
5791
5794
|
_request_auth=_request_auth,
|
|
5792
5795
|
_content_type=_content_type,
|
|
5793
5796
|
_headers=_headers,
|
|
@@ -5795,11 +5798,9 @@ class VirtualMachineApi:
|
|
|
5795
5798
|
)
|
|
5796
5799
|
|
|
5797
5800
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
5798
|
-
'200': "
|
|
5801
|
+
'200': "ContractInstancesResponse",
|
|
5799
5802
|
'400': "ErrorResponseModel",
|
|
5800
5803
|
'401': "ErrorResponseModel",
|
|
5801
|
-
'404': "ErrorResponseModel",
|
|
5802
|
-
'409': "ErrorResponseModel",
|
|
5803
5804
|
'500': None,
|
|
5804
5805
|
}
|
|
5805
5806
|
response_data = self.api_client.call_api(
|
|
@@ -5809,10 +5810,12 @@ class VirtualMachineApi:
|
|
|
5809
5810
|
return response_data.response
|
|
5810
5811
|
|
|
5811
5812
|
|
|
5812
|
-
def
|
|
5813
|
+
def _retrieve_virtual_machines_associated_with_a_contract_serialize(
|
|
5813
5814
|
self,
|
|
5814
|
-
|
|
5815
|
-
|
|
5815
|
+
contract_id,
|
|
5816
|
+
page,
|
|
5817
|
+
page_size,
|
|
5818
|
+
search,
|
|
5816
5819
|
_request_auth,
|
|
5817
5820
|
_content_type,
|
|
5818
5821
|
_headers,
|
|
@@ -5834,14 +5837,24 @@ class VirtualMachineApi:
|
|
|
5834
5837
|
_body_params: Optional[bytes] = None
|
|
5835
5838
|
|
|
5836
5839
|
# process the path parameters
|
|
5837
|
-
if
|
|
5838
|
-
_path_params['
|
|
5840
|
+
if contract_id is not None:
|
|
5841
|
+
_path_params['contract_id'] = contract_id
|
|
5839
5842
|
# 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
|
+
|
|
5840
5855
|
# process the header parameters
|
|
5841
5856
|
# process the form parameters
|
|
5842
5857
|
# process the body parameter
|
|
5843
|
-
if payload is not None:
|
|
5844
|
-
_body_params = payload
|
|
5845
5858
|
|
|
5846
5859
|
|
|
5847
5860
|
# set the HTTP header `Accept`
|
|
@@ -5852,19 +5865,6 @@ class VirtualMachineApi:
|
|
|
5852
5865
|
]
|
|
5853
5866
|
)
|
|
5854
5867
|
|
|
5855
|
-
# set the HTTP header `Content-Type`
|
|
5856
|
-
if _content_type:
|
|
5857
|
-
_header_params['Content-Type'] = _content_type
|
|
5858
|
-
else:
|
|
5859
|
-
_default_content_type = (
|
|
5860
|
-
self.api_client.select_header_content_type(
|
|
5861
|
-
[
|
|
5862
|
-
'application/json'
|
|
5863
|
-
]
|
|
5864
|
-
)
|
|
5865
|
-
)
|
|
5866
|
-
if _default_content_type is not None:
|
|
5867
|
-
_header_params['Content-Type'] = _default_content_type
|
|
5868
5868
|
|
|
5869
5869
|
# authentication setting
|
|
5870
5870
|
_auth_settings: List[str] = [
|
|
@@ -5872,8 +5872,8 @@ class VirtualMachineApi:
|
|
|
5872
5872
|
]
|
|
5873
5873
|
|
|
5874
5874
|
return self.api_client.param_serialize(
|
|
5875
|
-
method='
|
|
5876
|
-
resource_path='/core/virtual-machines/{
|
|
5875
|
+
method='GET',
|
|
5876
|
+
resource_path='/core/virtual-machines/contract/{contract_id}/virtual-machines',
|
|
5877
5877
|
path_params=_path_params,
|
|
5878
5878
|
query_params=_query_params,
|
|
5879
5879
|
header_params=_header_params,
|