@@ -167,6 +167,10 @@ class ComputeInstance(Compute):
167
167
:type enable_sso: bool
168
168
:param enable_root_access: Enable or disable root access. Defaults to True.
169
169
:type enable_root_access: bool
170
+ :param release_quota_on_stop: Release quota on stop for the compute instance. Defaults to False.
171
+ :type release_quota_on_stop: bool
172
+ :param enable_os_patching: Enable or disable OS patching for the compute instance. Defaults to False.
173
+ :type enable_os_patching: bool
170
174
171
175
.. admonition:: Example:
172
176
@@ -198,6 +202,8 @@ def __init__(
198
202
custom_applications : Optional [List [CustomApplications ]] = None ,
199
203
enable_sso : bool = True ,
200
204
enable_root_access : bool = True ,
205
+ release_quota_on_stop : bool = False ,
206
+ enable_os_patching : bool = False ,
201
207
** kwargs : Any ,
202
208
) -> None :
203
209
kwargs [TYPE ] = ComputeType .COMPUTEINSTANCE
@@ -226,6 +232,8 @@ def __init__(
226
232
self .enable_node_public_ip = enable_node_public_ip
227
233
self .enable_sso = enable_sso
228
234
self .enable_root_access = enable_root_access
235
+ self .release_quota_on_stop = release_quota_on_stop
236
+ self .enable_os_patching = enable_os_patching
229
237
self .custom_applications = custom_applications
230
238
self .subnet = None
231
239
@@ -308,6 +316,8 @@ def _to_rest_object(self) -> ComputeResource:
308
316
enable_node_public_ip = self .enable_node_public_ip ,
309
317
enable_sso = self .enable_sso ,
310
318
enable_root_access = self .enable_root_access ,
319
+ release_quota_on_stop = self .release_quota_on_stop ,
320
+ enable_os_patching = self .enable_os_patching ,
311
321
)
312
322
compute_instance_prop .schedules = self .schedules ._to_rest_object () if self .schedules else None
313
323
compute_instance_prop .setup_scripts = self .setup_scripts ._to_rest_object () if self .setup_scripts else None
@@ -453,6 +463,12 @@ def _load_from_rest(cls, rest_obj: ComputeResource) -> "ComputeInstance":
453
463
enable_root_access = prop .properties .enable_root_access
454
464
if (prop .properties and prop .properties .enable_root_access is not None )
455
465
else True ,
466
+ release_quota_on_stop = prop .properties .release_quota_on_stop
467
+ if (prop .properties and prop .properties .release_quota_on_stop is not None )
468
+ else False ,
469
+ enable_os_patching = prop .properties .enable_os_patching
470
+ if (prop .properties and prop .properties .enable_os_patching is not None )
471
+ else False ,
456
472
)
457
473
return response
458
474
0 commit comments