You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: scaleway-async/scaleway_async/baremetal/v1/api.py
+8-1Lines changed: 8 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -281,6 +281,7 @@ async def create_server(
281
281
offer_id: str,
282
282
name: str,
283
283
description: str,
284
+
protected: bool,
284
285
zone: Optional[ScwZone] =None,
285
286
organization_id: Optional[str] =None,
286
287
project_id: Optional[str] =None,
@@ -294,6 +295,7 @@ async def create_server(
294
295
:param offer_id: Offer ID of the new server.
295
296
:param name: Name of the server (≠hostname).
296
297
:param description: Description associated with the server, max 255 characters.
298
+
:param protected: If enabled, the server can not be deleted.
297
299
:param zone: Zone to target. If none is passed will use default zone from the config.
298
300
:param organization_id: Organization ID with which the server will be created.
299
301
One-Of ('project_identifier'): at most one of 'project_id', 'organization_id' could be set.
@@ -311,6 +313,7 @@ async def create_server(
311
313
offer_id="example",
312
314
name="example",
313
315
description="example",
316
+
protected=False,
314
317
)
315
318
"""
316
319
@@ -324,6 +327,7 @@ async def create_server(
324
327
offer_id=offer_id,
325
328
name=name,
326
329
description=description,
330
+
protected=protected,
327
331
zone=zone,
328
332
tags=tags,
329
333
install=install,
@@ -346,15 +350,17 @@ async def update_server(
346
350
name: Optional[str] =None,
347
351
description: Optional[str] =None,
348
352
tags: Optional[List[str]] =None,
353
+
protected: Optional[bool] =None,
349
354
) ->Server:
350
355
"""
351
356
Update an Elastic Metal server.
352
-
Update the server associated with the ID. You can update parameters such as the server's name, tagsand description. Any parameters left null in the request body are not updated.
357
+
Update the server associated with the ID. You can update parameters such as the server's name, tags, description and protection flag. Any parameters left null in the request body are not updated.
353
358
:param server_id: ID of the server to update.
354
359
:param zone: Zone to target. If none is passed will use default zone from the config.
355
360
:param name: Name of the server (≠hostname), not updated if null.
356
361
:param description: Description associated with the server, max 255 characters, not updated if null.
357
362
:param tags: Tags associated with the server, not updated if null.
363
+
:param protected: If enabled, the server can not be deleted.
Copy file name to clipboardExpand all lines: scaleway/scaleway/baremetal/v1/api.py
+8-1Lines changed: 8 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -281,6 +281,7 @@ def create_server(
281
281
offer_id: str,
282
282
name: str,
283
283
description: str,
284
+
protected: bool,
284
285
zone: Optional[ScwZone] =None,
285
286
organization_id: Optional[str] =None,
286
287
project_id: Optional[str] =None,
@@ -294,6 +295,7 @@ def create_server(
294
295
:param offer_id: Offer ID of the new server.
295
296
:param name: Name of the server (≠hostname).
296
297
:param description: Description associated with the server, max 255 characters.
298
+
:param protected: If enabled, the server can not be deleted.
297
299
:param zone: Zone to target. If none is passed will use default zone from the config.
298
300
:param organization_id: Organization ID with which the server will be created.
299
301
One-Of ('project_identifier'): at most one of 'project_id', 'organization_id' could be set.
@@ -311,6 +313,7 @@ def create_server(
311
313
offer_id="example",
312
314
name="example",
313
315
description="example",
316
+
protected=False,
314
317
)
315
318
"""
316
319
@@ -324,6 +327,7 @@ def create_server(
324
327
offer_id=offer_id,
325
328
name=name,
326
329
description=description,
330
+
protected=protected,
327
331
zone=zone,
328
332
tags=tags,
329
333
install=install,
@@ -346,15 +350,17 @@ def update_server(
346
350
name: Optional[str] =None,
347
351
description: Optional[str] =None,
348
352
tags: Optional[List[str]] =None,
353
+
protected: Optional[bool] =None,
349
354
) ->Server:
350
355
"""
351
356
Update an Elastic Metal server.
352
-
Update the server associated with the ID. You can update parameters such as the server's name, tagsand description. Any parameters left null in the request body are not updated.
357
+
Update the server associated with the ID. You can update parameters such as the server's name, tags, description and protection flag. Any parameters left null in the request body are not updated.
353
358
:param server_id: ID of the server to update.
354
359
:param zone: Zone to target. If none is passed will use default zone from the config.
355
360
:param name: Name of the server (≠hostname), not updated if null.
356
361
:param description: Description associated with the server, max 255 characters, not updated if null.
357
362
:param tags: Tags associated with the server, not updated if null.
363
+
:param protected: If enabled, the server can not be deleted.
0 commit comments