@@ -96,13 +96,44 @@ def __init__(self, project_id: str, secret_key: str, url: str = _DEFAULT_URL):
96
96
def __repr__ (self ) -> str :
97
97
return f"<QaaSClient(url={ self .__client ._base_url } ,project_id={ self .__project_id } )>"
98
98
99
+ """Get platform information
100
+
101
+ Retrieve information about the provided **platform ID**, such as provider name, technology, and
102
+ type.
103
+
104
+ Args:
105
+ platform_id (str): Unique ID of the platform.
106
+
107
+ Raises:
108
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
109
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
110
+
111
+ Returns:
112
+ ScalewayQaasV1Alpha1Platform
113
+ """
114
+
99
115
def get_platform (self , platform_id : str ) -> ScalewayQaasV1Alpha1Platform :
100
116
response = _get_platform_sync (client = self .__client , platform_id = platform_id )
101
117
102
118
_raise_on_error (response )
103
119
104
120
return response .parsed
105
121
122
+ """List all available platforms
123
+
124
+ Retrieve information about all platforms.
125
+
126
+ Args:
127
+ name (Union[Unset, str]): List platforms with this name.
128
+
129
+ Raises:
130
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
131
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
132
+
133
+ Returns:
134
+ List[ScalewayQaasV1Alpha1ListPlatforms]
135
+ """
136
+
106
137
def list_platforms (
107
138
self , name : Optional [str ] = None
108
139
) -> List [ScalewayQaasV1Alpha1Platform ]:
@@ -112,6 +143,21 @@ def list_platforms(
112
143
113
144
return response .parsed .platforms
114
145
146
+ """Create a session
147
+
148
+ Create a dedicated session for the specified platform.
149
+
150
+ Args:
151
+ body (CreateSessionBody):
152
+
153
+ Raises:
154
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
155
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
156
+
157
+ Returns:
158
+ ScalewayQaasV1Alpha1Session
159
+ """
160
+
115
161
def create_session (
116
162
self ,
117
163
platform_id : str ,
@@ -144,6 +190,22 @@ def create_session(
144
190
145
191
return response .parsed
146
192
193
+ """Get session information
194
+
195
+ Retrieve information about the provided **session ID**, such as name, status, and number of executed
196
+ jobs.
197
+
198
+ Args:
199
+ session_id (str): Unique ID of the session.
200
+
201
+ Raises:
202
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
203
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
204
+
205
+ Returns:
206
+ ScalewayQaasV1Alpha1Session
207
+ """
208
+
147
209
def get_session (self , session_id : str ) -> ScalewayQaasV1Alpha1Session :
148
210
response = _get_session_sync (client = self .__client , session_id = session_id )
149
211
@@ -162,6 +224,22 @@ def list_session(
162
224
163
225
return response .parsed .sessions
164
226
227
+ """Terminate an existing session
228
+
229
+ Terminate a session by its unique ID and cancel all its attached jobs and booking.
230
+
231
+ Args:
232
+ session_id (str): Unique ID of the session.
233
+ body (TerminateSessionBody):
234
+
235
+ Raises:
236
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
237
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
238
+
239
+ Returns:
240
+ ScalewayQaasV1Alpha1Session
241
+ """
242
+
165
243
def terminate_session (self , session_id : str ) -> ScalewayQaasV1Alpha1Session :
166
244
response = _terminate_session_sync (
167
245
client = self .__client ,
@@ -173,9 +251,36 @@ def terminate_session(self, session_id: str) -> ScalewayQaasV1Alpha1Session:
173
251
174
252
return response .parsed
175
253
254
+ """Delete an existing session
255
+
256
+ Delete a session by its unique ID and delete all its attached job and booking.
257
+
258
+ Args:
259
+ session_id (str): Unique ID of the session.
260
+
261
+ Raises:
262
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
263
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
264
+ """
265
+
176
266
def delete_session (self , session_id : str ):
177
267
_delete_session_sync (client = self .__client , session_id = session_id )
178
268
269
+ """Create a job
270
+
271
+ Create a job to be executed inside a session.
272
+
273
+ Args:
274
+ body (CreateJobBody):
275
+
276
+ Raises:
277
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
278
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
279
+
280
+ Returns:
281
+ ScalewayQaasV1Alpha1Job
282
+ """
283
+
179
284
def create_job (
180
285
self ,
181
286
session_id : str ,
@@ -198,20 +303,66 @@ def create_job(
198
303
199
304
return response .parsed
200
305
306
+ """Get job information
307
+
308
+ Retrieve information about the provided **job ID**, such as status, payload, and result.
309
+
310
+ Args:
311
+ job_id (str): Unique ID of the job you want to get.
312
+
313
+ Raises:
314
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
315
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
316
+
317
+ Returns:
318
+ ScalewayQaasV1Alpha1Job
319
+ """
320
+
201
321
def get_job (self , job_id : str ) -> ScalewayQaasV1Alpha1Job :
202
322
response = _get_job_sync (client = self .__client , job_id = job_id )
203
323
204
324
_raise_on_error (response )
205
325
206
326
return response .parsed
207
327
328
+ """List all results of a job
329
+
330
+ Retrieve all intermediate and final results of a job.
331
+
332
+ Args:
333
+ job_id (str): ID of the job.
334
+
335
+ Raises:
336
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
337
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
338
+
339
+ Returns:
340
+ List[ScalewayQaasV1Alpha1ListJobResultsResponse]
341
+ """
342
+
208
343
def list_job_results (self , job_id : str ) -> List [ScalewayQaasV1Alpha1JobResult ]:
209
344
response = _list_job_result_sync (client = self .__client , job_id = job_id )
210
345
211
346
_raise_on_error (response )
212
347
213
348
return response .parsed .job_results
214
349
350
+ """Cancel a job
351
+
352
+ Cancel the job corresponding to the provided **job ID**.
353
+
354
+ Args:
355
+ job_id (str): Unique ID of the job.
356
+ body (CancelJobBody):
357
+
358
+ Raises:
359
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
360
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
361
+
362
+ Returns:
363
+ ScalewayQaasV1Alpha1Job
364
+ """
365
+
215
366
def cancel_job (self , job_id : str ) -> ScalewayQaasV1Alpha1Job :
216
367
response = _cancel_job_sync (
217
368
client = self .__client ,
0 commit comments