@@ -18,6 +18,7 @@ def __init__(self,
1818 target : str = None ,
1919 location : str = "FIN1" ,
2020 instance_id : str = None ,
21+ ssh_key_ids : List [str ] = [],
2122 ) -> None :
2223 """Initialize the volume object
2324
@@ -41,6 +42,8 @@ def __init__(self,
4142 :type location: str, optional
4243 :param instance_id: the instance id the volume is attached to, None if detached
4344 :type instance_id: str
45+ :param ssh_key_ids: list of ssh keys ids
46+ :type ssh_key_ids: List[str]
4447 """
4548
4649 self ._id = id
@@ -53,6 +56,7 @@ def __init__(self,
5356 self ._target = target
5457 self ._location = location
5558 self ._instance_id = instance_id
59+ self ._ssh_key_ids = ssh_key_ids
5660
5761 @property
5862 def id (self ) -> str :
@@ -144,6 +148,14 @@ def instance_id(self) -> Optional[str]:
144148 """
145149 return self ._instance_id
146150
151+ @property
152+ def ssh_key_ids (self ) -> List [str ]:
153+ """Get the SSH key IDs of the instance
154+
155+ :return: SSH key IDs
156+ :rtype: List[str]
157+ """
158+ return self ._ssh_key_ids
147159
148160class VolumesService :
149161 """A service for interacting with the volumes endpoint"""
@@ -172,6 +184,7 @@ def get(self, status: str = None) -> List[Volume]:
172184 target = volume_dict ['target' ] if 'target' in volume_dict else None ,
173185 location = volume_dict ['location' ],
174186 instance_id = volume_dict ['instance_id' ] if 'instance_id' in volume_dict else None ,
187+ ssh_key_ids = volume_dict ['ssh_key_ids' ] if 'ssh_key_ids' in volume_dict else [],
175188 ), volumes_dict ))
176189 return volumes
177190
@@ -196,6 +209,7 @@ def get_by_id(self, id: str) -> Volume:
196209 target = volume_dict ['target' ] if 'target' in volume_dict else None ,
197210 location = volume_dict ['location' ],
198211 instance_id = volume_dict ['instance_id' ] if 'instance_id' in volume_dict else None ,
212+ ssh_key_ids = volume_dict ['ssh_key_ids' ] if 'ssh_key_ids' in volume_dict else [],
199213 )
200214 return volume
201215
0 commit comments