66
77from scaleway_core .api import API
88from scaleway_core .bridge import (
9+ ScwFile ,
910 Zone as ScwZone ,
1011)
1112from scaleway_core .utils import (
@@ -288,6 +289,7 @@ async def create_server(
288289 tags : Optional [list [str ]] = None ,
289290 install : Optional [CreateServerRequestInstall ] = None ,
290291 option_ids : Optional [list [str ]] = None ,
292+ user_data : Optional [str ] = None ,
291293 ) -> Server :
292294 """
293295 Create an Elastic Metal server.
@@ -304,6 +306,7 @@ async def create_server(
304306 :param tags: Tags to associate to the server.
305307 :param install: Object describing the configuration details of the OS installation on the server.
306308 :param option_ids: IDs of options to enable on server.
309+ :param user_data: Configuration data to pass to cloud-init such as a YAML cloud config data or a user-data script.
307310 :return: :class:`Server <Server>`
308311
309312 Usage:
@@ -332,6 +335,7 @@ async def create_server(
332335 tags = tags ,
333336 install = install ,
334337 option_ids = option_ids ,
338+ user_data = user_data ,
335339 project_id = project_id ,
336340 organization_id = organization_id ,
337341 ),
@@ -351,6 +355,7 @@ async def update_server(
351355 description : Optional [str ] = None ,
352356 tags : Optional [list [str ]] = None ,
353357 protected : Optional [bool ] = None ,
358+ user_data : Optional [str ] = None ,
354359 ) -> Server :
355360 """
356361 Update an Elastic Metal server.
@@ -361,6 +366,7 @@ async def update_server(
361366 :param description: Description associated with the server, max 255 characters, not updated if null.
362367 :param tags: Tags associated with the server, not updated if null.
363368 :param protected: If enabled, the server can not be deleted.
369+ :param user_data: Configuration data to pass to cloud-init such as a YAML cloud config data or a user-data script.
364370 :return: :class:`Server <Server>`
365371
366372 Usage:
@@ -385,6 +391,7 @@ async def update_server(
385391 description = description ,
386392 tags = tags ,
387393 protected = protected ,
394+ user_data = user_data ,
388395 ),
389396 self .client ,
390397 ),
@@ -406,6 +413,7 @@ async def install_server(
406413 service_user : Optional [str ] = None ,
407414 service_password : Optional [str ] = None ,
408415 partitioning_schema : Optional [Schema ] = None ,
416+ user_data : Optional [ScwFile ] = None ,
409417 ) -> Server :
410418 """
411419 Install an Elastic Metal server.
@@ -420,6 +428,7 @@ async def install_server(
420428 :param service_user: User used for the service to install.
421429 :param service_password: Password used for the service to install.
422430 :param partitioning_schema: Partitioning schema.
431+ :param user_data: Configuration data to pass to cloud-init such as a YAML cloud config data or a user-data script.
423432 :return: :class:`Server <Server>`
424433
425434 Usage:
@@ -451,6 +460,7 @@ async def install_server(
451460 service_user = service_user ,
452461 service_password = service_password ,
453462 partitioning_schema = partitioning_schema ,
463+ user_data = user_data ,
454464 ),
455465 self .client ,
456466 ),
0 commit comments