@@ -125,25 +125,27 @@ async def create_job_definition(
125
125
async def get_job_definition (
126
126
self ,
127
127
* ,
128
- id : str ,
128
+ job_definition_id : str ,
129
129
region : Optional [Region ] = None ,
130
130
) -> JobDefinition :
131
131
"""
132
132
133
133
Usage:
134
134
::
135
135
136
- result = await api.get_job_definition(id ="example")
136
+ result = await api.get_job_definition(job_definition_id ="example")
137
137
"""
138
138
139
139
param_region = validate_path_param (
140
140
"region" , region or self .client .default_region
141
141
)
142
- param_id = validate_path_param ("id" , id )
142
+ param_job_definition_id = validate_path_param (
143
+ "job_definition_id" , job_definition_id
144
+ )
143
145
144
146
res = self ._request (
145
147
"GET" ,
146
- f"/serverless-jobs/v1alpha1/regions/{ param_region } /job-definitions/{ param_id } " ,
148
+ f"/serverless-jobs/v1alpha1/regions/{ param_region } /job-definitions/{ param_job_definition_id } " ,
147
149
)
148
150
149
151
self ._throw_on_error (res )
@@ -218,7 +220,7 @@ async def list_job_definitions_all(
218
220
async def update_job_definition (
219
221
self ,
220
222
* ,
221
- id : str ,
223
+ job_definition_id : str ,
222
224
region : Optional [Region ] = None ,
223
225
name : Optional [str ] = None ,
224
226
cpu_limit : Optional [int ] = None ,
@@ -234,20 +236,22 @@ async def update_job_definition(
234
236
Usage:
235
237
::
236
238
237
- result = await api.update_job_definition(id ="example")
239
+ result = await api.update_job_definition(job_definition_id ="example")
238
240
"""
239
241
240
242
param_region = validate_path_param (
241
243
"region" , region or self .client .default_region
242
244
)
243
- param_id = validate_path_param ("id" , id )
245
+ param_job_definition_id = validate_path_param (
246
+ "job_definition_id" , job_definition_id
247
+ )
244
248
245
249
res = self ._request (
246
250
"PATCH" ,
247
- f"/serverless-jobs/v1alpha1/regions/{ param_region } /job-definitions/{ param_id } " ,
251
+ f"/serverless-jobs/v1alpha1/regions/{ param_region } /job-definitions/{ param_job_definition_id } " ,
248
252
body = marshal_UpdateJobDefinitionRequest (
249
253
UpdateJobDefinitionRequest (
250
- id = id ,
254
+ job_definition_id = job_definition_id ,
251
255
region = region ,
252
256
name = name ,
253
257
cpu_limit = cpu_limit ,
@@ -268,25 +272,27 @@ async def update_job_definition(
268
272
async def delete_job_definition (
269
273
self ,
270
274
* ,
271
- id : str ,
275
+ job_definition_id : str ,
272
276
region : Optional [Region ] = None ,
273
277
) -> Optional [None ]:
274
278
"""
275
279
276
280
Usage:
277
281
::
278
282
279
- result = await api.delete_job_definition(id ="example")
283
+ result = await api.delete_job_definition(job_definition_id ="example")
280
284
"""
281
285
282
286
param_region = validate_path_param (
283
287
"region" , region or self .client .default_region
284
288
)
285
- param_id = validate_path_param ("id" , id )
289
+ param_job_definition_id = validate_path_param (
290
+ "job_definition_id" , job_definition_id
291
+ )
286
292
287
293
res = self ._request (
288
294
"DELETE" ,
289
- f"/serverless-jobs/v1alpha1/regions/{ param_region } /job-definitions/{ param_id } " ,
295
+ f"/serverless-jobs/v1alpha1/regions/{ param_region } /job-definitions/{ param_job_definition_id } " ,
290
296
)
291
297
292
298
self ._throw_on_error (res )
@@ -295,25 +301,27 @@ async def delete_job_definition(
295
301
async def start_job_definition (
296
302
self ,
297
303
* ,
298
- id : str ,
304
+ job_definition_id : str ,
299
305
region : Optional [Region ] = None ,
300
306
) -> JobRun :
301
307
"""
302
308
303
309
Usage:
304
310
::
305
311
306
- result = await api.start_job_definition(id ="example")
312
+ result = await api.start_job_definition(job_definition_id ="example")
307
313
"""
308
314
309
315
param_region = validate_path_param (
310
316
"region" , region or self .client .default_region
311
317
)
312
- param_id = validate_path_param ("id" , id )
318
+ param_job_definition_id = validate_path_param (
319
+ "job_definition_id" , job_definition_id
320
+ )
313
321
314
322
res = self ._request (
315
323
"POST" ,
316
- f"/serverless-jobs/v1alpha1/regions/{ param_region } /job-definitions/{ param_id } /start" ,
324
+ f"/serverless-jobs/v1alpha1/regions/{ param_region } /job-definitions/{ param_job_definition_id } /start" ,
317
325
)
318
326
319
327
self ._throw_on_error (res )
@@ -322,25 +330,25 @@ async def start_job_definition(
322
330
async def get_job_run (
323
331
self ,
324
332
* ,
325
- id : str ,
333
+ job_run_id : str ,
326
334
region : Optional [Region ] = None ,
327
335
) -> JobRun :
328
336
"""
329
337
330
338
Usage:
331
339
::
332
340
333
- result = await api.get_job_run(id ="example")
341
+ result = await api.get_job_run(job_run_id ="example")
334
342
"""
335
343
336
344
param_region = validate_path_param (
337
345
"region" , region or self .client .default_region
338
346
)
339
- param_id = validate_path_param ("id " , id )
347
+ param_job_run_id = validate_path_param ("job_run_id " , job_run_id )
340
348
341
349
res = self ._request (
342
350
"GET" ,
343
- f"/serverless-jobs/v1alpha1/regions/{ param_region } /job-runs/{ param_id } " ,
351
+ f"/serverless-jobs/v1alpha1/regions/{ param_region } /job-runs/{ param_job_run_id } " ,
344
352
)
345
353
346
354
self ._throw_on_error (res )
@@ -349,25 +357,25 @@ async def get_job_run(
349
357
async def stop_job_run (
350
358
self ,
351
359
* ,
352
- id : str ,
360
+ job_run_id : str ,
353
361
region : Optional [Region ] = None ,
354
362
) -> JobRun :
355
363
"""
356
364
357
365
Usage:
358
366
::
359
367
360
- result = await api.stop_job_run(id ="example")
368
+ result = await api.stop_job_run(job_run_id ="example")
361
369
"""
362
370
363
371
param_region = validate_path_param (
364
372
"region" , region or self .client .default_region
365
373
)
366
- param_id = validate_path_param ("id " , id )
374
+ param_job_run_id = validate_path_param ("job_run_id " , job_run_id )
367
375
368
376
res = self ._request (
369
377
"POST" ,
370
- f"/serverless-jobs/v1alpha1/regions/{ param_region } /job-runs/{ param_id } /stop" ,
378
+ f"/serverless-jobs/v1alpha1/regions/{ param_region } /job-runs/{ param_job_run_id } /stop" ,
371
379
)
372
380
373
381
self ._throw_on_error (res )
@@ -380,7 +388,7 @@ async def list_job_runs(
380
388
page : Optional [int ] = None ,
381
389
page_size : Optional [int ] = None ,
382
390
order_by : ListJobRunsRequestOrderBy = ListJobRunsRequestOrderBy .CREATED_AT_ASC ,
383
- id : Optional [str ] = None ,
391
+ job_definition_id : Optional [str ] = None ,
384
392
project_id : Optional [str ] = None ,
385
393
) -> ListJobRunsResponse :
386
394
"""
@@ -399,7 +407,7 @@ async def list_job_runs(
399
407
"GET" ,
400
408
f"/serverless-jobs/v1alpha1/regions/{ param_region } /job-runs" ,
401
409
params = {
402
- "id " : id ,
410
+ "job_definition_id " : job_definition_id ,
403
411
"order_by" : order_by ,
404
412
"page" : page ,
405
413
"page_size" : page_size or self .client .default_page_size ,
@@ -417,7 +425,7 @@ async def list_job_runs_all(
417
425
page : Optional [int ] = None ,
418
426
page_size : Optional [int ] = None ,
419
427
order_by : Optional [ListJobRunsRequestOrderBy ] = None ,
420
- id : Optional [str ] = None ,
428
+ job_definition_id : Optional [str ] = None ,
421
429
project_id : Optional [str ] = None ,
422
430
) -> List [JobRun ]:
423
431
"""
@@ -438,7 +446,7 @@ async def list_job_runs_all(
438
446
"page" : page ,
439
447
"page_size" : page_size ,
440
448
"order_by" : order_by ,
441
- "id " : id ,
449
+ "job_definition_id " : job_definition_id ,
442
450
"project_id" : project_id ,
443
451
},
444
452
)
0 commit comments