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