1- from io import StringIO
21from typing import Optional
3-
42from scaleway_core .bridge import Zone
53from scaleway_core .utils import validate_path_param
64from .api import InstanceV1API
@@ -39,8 +37,8 @@ def get_server_user_data(self, server_id: str, key: str, zone: Optional[Zone] =
3937 f"/instance/v1/zones/{ param_zone } /servers/{ param_server_id } /user_data/{ key } " ,
4038 body = marshal_GetServerUserDataRequest (
4139 GetServerUserDataRequest (
42- zone = zone ,
43- server_id = server_id ,
40+ zone = zone ,
41+ server_id = server_id ,
4442 key = key ,
4543 ),
4644 self .client ,
@@ -49,13 +47,13 @@ def get_server_user_data(self, server_id: str, key: str, zone: Optional[Zone] =
4947 self ._throw_on_error (res )
5048 return unmarshal_GetServerUserDataResponse (res .json ())
5149
52- def set_server_user_data (self , server_id : str , key : str , content : StringIO , zone : Optional [Zone ] = None ):
50+ def set_server_user_data (self , server_id : str , key : str , content : bytes , zone : Optional [Zone ] = None ):
5351 """
5452 Sets the content of a user data on a server for the given key.
5553 :param zone: Zone to target. If none is passed, it will use the default zone from the config.
5654 :param server_id: The ID of the server.
5755 :param key: The user data key.
58- :param content: The content to set as user data.
56+ :param content: The content to set as user data in bytes .
5957 :return: A plain text response confirming the operation.
6058 """
6159 param_zone = validate_path_param ("zone" , zone or self .client .default_zone )
0 commit comments