diracx-client 0.0.1a45__py3-none-any.whl → 0.0.1a47__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- diracx/client/_generated/_client.py +10 -33
- diracx/client/_generated/_configuration.py +6 -18
- diracx/client/_generated/_utils/serialization.py +70 -224
- diracx/client/_generated/_utils/utils.py +3 -9
- diracx/client/_generated/aio/_client.py +8 -29
- diracx/client/_generated/aio/_configuration.py +7 -21
- diracx/client/_generated/aio/_patch.py +1 -3
- diracx/client/_generated/aio/operations/_operations.py +437 -475
- diracx/client/_generated/models/__init__.py +17 -10
- diracx/client/_generated/models/_enums.py +3 -0
- diracx/client/_generated/models/_models.py +425 -166
- diracx/client/_generated/operations/_operations.py +501 -631
- diracx/client/patches/jobs/common.py +1 -1
- {diracx_client-0.0.1a45.dist-info → diracx_client-0.0.1a47.dist-info}/METADATA +1 -1
- {diracx_client-0.0.1a45.dist-info → diracx_client-0.0.1a47.dist-info}/RECORD +16 -16
- {diracx_client-0.0.1a45.dist-info → diracx_client-0.0.1a47.dist-info}/WHEEL +0 -0
@@ -29,17 +29,13 @@ from .._utils.serialization import Deserializer, Serializer
|
|
29
29
|
from .._utils.utils import prep_if_match, prep_if_none_match, raise_if_not_implemented
|
30
30
|
|
31
31
|
T = TypeVar("T")
|
32
|
-
ClsType = Optional[
|
33
|
-
Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]
|
34
|
-
]
|
32
|
+
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]
|
35
33
|
|
36
34
|
_SERIALIZER = Serializer()
|
37
35
|
_SERIALIZER.client_side_validation = False
|
38
36
|
|
39
37
|
|
40
|
-
def build_well_known_get_openid_configuration_request(
|
41
|
-
**kwargs: Any,
|
42
|
-
) -> HttpRequest: # pylint: disable=name-too-long
|
38
|
+
def build_well_known_get_openid_configuration_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long
|
43
39
|
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
|
44
40
|
|
45
41
|
accept = _headers.pop("Accept", "application/json")
|
@@ -67,9 +63,7 @@ def build_well_known_get_jwks_request(**kwargs: Any) -> HttpRequest:
|
|
67
63
|
return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs)
|
68
64
|
|
69
65
|
|
70
|
-
def build_well_known_get_installation_metadata_request(
|
71
|
-
**kwargs: Any,
|
72
|
-
) -> HttpRequest: # pylint: disable=name-too-long
|
66
|
+
def build_well_known_get_installation_metadata_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long
|
73
67
|
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
|
74
68
|
|
75
69
|
accept = _headers.pop("Accept", "application/json")
|
@@ -83,9 +77,21 @@ def build_well_known_get_installation_metadata_request(
|
|
83
77
|
return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs)
|
84
78
|
|
85
79
|
|
86
|
-
def
|
87
|
-
|
88
|
-
|
80
|
+
def build_well_known_get_security_txt_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long
|
81
|
+
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
|
82
|
+
|
83
|
+
accept = _headers.pop("Accept", "application/json")
|
84
|
+
|
85
|
+
# Construct URL
|
86
|
+
_url = "/.well-known/.well-known/security.txt"
|
87
|
+
|
88
|
+
# Construct headers
|
89
|
+
_headers["Accept"] = _SERIALIZER.header("accept", accept, "str")
|
90
|
+
|
91
|
+
return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs)
|
92
|
+
|
93
|
+
|
94
|
+
def build_auth_initiate_device_flow_request(*, client_id: str, scope: str, **kwargs: Any) -> HttpRequest:
|
89
95
|
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
|
90
96
|
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
|
91
97
|
|
@@ -101,9 +107,7 @@ def build_auth_initiate_device_flow_request(
|
|
101
107
|
# Construct headers
|
102
108
|
_headers["Accept"] = _SERIALIZER.header("accept", accept, "str")
|
103
109
|
|
104
|
-
return HttpRequest(
|
105
|
-
method="POST", url=_url, params=_params, headers=_headers, **kwargs
|
106
|
-
)
|
110
|
+
return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs)
|
107
111
|
|
108
112
|
|
109
113
|
def build_auth_do_device_flow_request(*, user_code: str, **kwargs: Any) -> HttpRequest:
|
@@ -121,14 +125,10 @@ def build_auth_do_device_flow_request(*, user_code: str, **kwargs: Any) -> HttpR
|
|
121
125
|
# Construct headers
|
122
126
|
_headers["Accept"] = _SERIALIZER.header("accept", accept, "str")
|
123
127
|
|
124
|
-
return HttpRequest(
|
125
|
-
method="GET", url=_url, params=_params, headers=_headers, **kwargs
|
126
|
-
)
|
128
|
+
return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs)
|
127
129
|
|
128
130
|
|
129
|
-
def build_auth_finish_device_flow_request(
|
130
|
-
*, code: str, state: str, **kwargs: Any
|
131
|
-
) -> HttpRequest:
|
131
|
+
def build_auth_finish_device_flow_request(*, code: str, state: str, **kwargs: Any) -> HttpRequest:
|
132
132
|
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
|
133
133
|
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
|
134
134
|
|
@@ -144,9 +144,7 @@ def build_auth_finish_device_flow_request(
|
|
144
144
|
# Construct headers
|
145
145
|
_headers["Accept"] = _SERIALIZER.header("accept", accept, "str")
|
146
146
|
|
147
|
-
return HttpRequest(
|
148
|
-
method="GET", url=_url, params=_params, headers=_headers, **kwargs
|
149
|
-
)
|
147
|
+
return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs)
|
150
148
|
|
151
149
|
|
152
150
|
def build_auth_finished_request(**kwargs: Any) -> HttpRequest:
|
@@ -195,9 +193,7 @@ def build_auth_revoke_refresh_token_by_refresh_token_request( # pylint: disable
|
|
195
193
|
# Construct headers
|
196
194
|
_headers["Accept"] = _SERIALIZER.header("accept", accept, "str")
|
197
195
|
|
198
|
-
return HttpRequest(
|
199
|
-
method="POST", url=_url, params=_params, headers=_headers, **kwargs
|
200
|
-
)
|
196
|
+
return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs)
|
201
197
|
|
202
198
|
|
203
199
|
def build_auth_revoke_refresh_token_by_jti_request( # pylint: disable=name-too-long
|
@@ -244,7 +240,7 @@ def build_auth_initiate_authorization_flow_request( # pylint: disable=name-too-
|
|
244
240
|
redirect_uri: str,
|
245
241
|
scope: str,
|
246
242
|
state: str,
|
247
|
-
**kwargs: Any
|
243
|
+
**kwargs: Any
|
248
244
|
) -> HttpRequest:
|
249
245
|
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
|
250
246
|
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
|
@@ -256,12 +252,8 @@ def build_auth_initiate_authorization_flow_request( # pylint: disable=name-too-
|
|
256
252
|
|
257
253
|
# Construct parameters
|
258
254
|
_params["response_type"] = _SERIALIZER.query("response_type", response_type, "str")
|
259
|
-
_params["code_challenge"] = _SERIALIZER.query(
|
260
|
-
|
261
|
-
)
|
262
|
-
_params["code_challenge_method"] = _SERIALIZER.query(
|
263
|
-
"code_challenge_method", code_challenge_method, "str"
|
264
|
-
)
|
255
|
+
_params["code_challenge"] = _SERIALIZER.query("code_challenge", code_challenge, "str")
|
256
|
+
_params["code_challenge_method"] = _SERIALIZER.query("code_challenge_method", code_challenge_method, "str")
|
265
257
|
_params["client_id"] = _SERIALIZER.query("client_id", client_id, "str")
|
266
258
|
_params["redirect_uri"] = _SERIALIZER.query("redirect_uri", redirect_uri, "str")
|
267
259
|
_params["scope"] = _SERIALIZER.query("scope", scope, "str")
|
@@ -270,9 +262,7 @@ def build_auth_initiate_authorization_flow_request( # pylint: disable=name-too-
|
|
270
262
|
# Construct headers
|
271
263
|
_headers["Accept"] = _SERIALIZER.header("accept", accept, "str")
|
272
264
|
|
273
|
-
return HttpRequest(
|
274
|
-
method="GET", url=_url, params=_params, headers=_headers, **kwargs
|
275
|
-
)
|
265
|
+
return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs)
|
276
266
|
|
277
267
|
|
278
268
|
def build_auth_complete_authorization_flow_request( # pylint: disable=name-too-long
|
@@ -293,9 +283,7 @@ def build_auth_complete_authorization_flow_request( # pylint: disable=name-too-
|
|
293
283
|
# Construct headers
|
294
284
|
_headers["Accept"] = _SERIALIZER.header("accept", accept, "str")
|
295
285
|
|
296
|
-
return HttpRequest(
|
297
|
-
method="GET", url=_url, params=_params, headers=_headers, **kwargs
|
298
|
-
)
|
286
|
+
return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs)
|
299
287
|
|
300
288
|
|
301
289
|
def build_config_serve_config_request(
|
@@ -303,7 +291,7 @@ def build_config_serve_config_request(
|
|
303
291
|
if_modified_since: Optional[str] = None,
|
304
292
|
etag: Optional[str] = None,
|
305
293
|
match_condition: Optional[MatchConditions] = None,
|
306
|
-
**kwargs: Any
|
294
|
+
**kwargs: Any
|
307
295
|
) -> HttpRequest:
|
308
296
|
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
|
309
297
|
|
@@ -314,30 +302,22 @@ def build_config_serve_config_request(
|
|
314
302
|
|
315
303
|
# Construct headers
|
316
304
|
if if_modified_since is not None:
|
317
|
-
_headers["if-modified-since"] = _SERIALIZER.header(
|
318
|
-
"if_modified_since", if_modified_since, "str"
|
319
|
-
)
|
305
|
+
_headers["if-modified-since"] = _SERIALIZER.header("if_modified_since", if_modified_since, "str")
|
320
306
|
_headers["Accept"] = _SERIALIZER.header("accept", accept, "str")
|
321
307
|
if_match = prep_if_match(etag, match_condition)
|
322
308
|
if if_match is not None:
|
323
309
|
_headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str")
|
324
310
|
if_none_match = prep_if_none_match(etag, match_condition)
|
325
311
|
if if_none_match is not None:
|
326
|
-
_headers["If-None-Match"] = _SERIALIZER.header(
|
327
|
-
"if_none_match", if_none_match, "str"
|
328
|
-
)
|
312
|
+
_headers["If-None-Match"] = _SERIALIZER.header("if_none_match", if_none_match, "str")
|
329
313
|
|
330
314
|
return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs)
|
331
315
|
|
332
316
|
|
333
|
-
def build_jobs_initiate_sandbox_upload_request(
|
334
|
-
**kwargs: Any,
|
335
|
-
) -> HttpRequest: # pylint: disable=name-too-long
|
317
|
+
def build_jobs_initiate_sandbox_upload_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long
|
336
318
|
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
|
337
319
|
|
338
|
-
content_type: Optional[str] = kwargs.pop(
|
339
|
-
"content_type", _headers.pop("Content-Type", None)
|
340
|
-
)
|
320
|
+
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
|
341
321
|
accept = _headers.pop("Accept", "application/json")
|
342
322
|
|
343
323
|
# Construct URL
|
@@ -345,9 +325,7 @@ def build_jobs_initiate_sandbox_upload_request(
|
|
345
325
|
|
346
326
|
# Construct headers
|
347
327
|
if content_type is not None:
|
348
|
-
_headers["Content-Type"] = _SERIALIZER.header(
|
349
|
-
"content_type", content_type, "str"
|
350
|
-
)
|
328
|
+
_headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str")
|
351
329
|
_headers["Accept"] = _SERIALIZER.header("accept", accept, "str")
|
352
330
|
|
353
331
|
return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs)
|
@@ -374,31 +352,7 @@ def build_jobs_get_sandbox_file_request(*, pfn: str, **kwargs: Any) -> HttpReque
|
|
374
352
|
# Construct headers
|
375
353
|
_headers["Accept"] = _SERIALIZER.header("accept", accept, "str")
|
376
354
|
|
377
|
-
return HttpRequest(
|
378
|
-
method="GET", url=_url, params=_params, headers=_headers, **kwargs
|
379
|
-
)
|
380
|
-
|
381
|
-
|
382
|
-
def build_jobs_unassign_bulk_jobs_sandboxes_request( # pylint: disable=name-too-long
|
383
|
-
*, jobs_ids: List[int], **kwargs: Any
|
384
|
-
) -> HttpRequest:
|
385
|
-
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
|
386
|
-
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
|
387
|
-
|
388
|
-
accept = _headers.pop("Accept", "application/json")
|
389
|
-
|
390
|
-
# Construct URL
|
391
|
-
_url = "/api/jobs/sandbox"
|
392
|
-
|
393
|
-
# Construct parameters
|
394
|
-
_params["jobs_ids"] = _SERIALIZER.query("jobs_ids", jobs_ids, "[int]")
|
395
|
-
|
396
|
-
# Construct headers
|
397
|
-
_headers["Accept"] = _SERIALIZER.header("accept", accept, "str")
|
398
|
-
|
399
|
-
return HttpRequest(
|
400
|
-
method="DELETE", url=_url, params=_params, headers=_headers, **kwargs
|
401
|
-
)
|
355
|
+
return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs)
|
402
356
|
|
403
357
|
|
404
358
|
def build_jobs_get_job_sandboxes_request(job_id: int, **kwargs: Any) -> HttpRequest:
|
@@ -463,14 +417,10 @@ def build_jobs_get_job_sandbox_request(
|
|
463
417
|
return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs)
|
464
418
|
|
465
419
|
|
466
|
-
def build_jobs_assign_sandbox_to_job_request(
|
467
|
-
job_id: int, *, content: str, **kwargs: Any
|
468
|
-
) -> HttpRequest:
|
420
|
+
def build_jobs_assign_sandbox_to_job_request(job_id: int, *, content: str, **kwargs: Any) -> HttpRequest:
|
469
421
|
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
|
470
422
|
|
471
|
-
content_type: Optional[str] = kwargs.pop(
|
472
|
-
"content_type", _headers.pop("Content-Type", None)
|
473
|
-
)
|
423
|
+
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
|
474
424
|
accept = _headers.pop("Accept", "application/json")
|
475
425
|
|
476
426
|
# Construct URL
|
@@ -483,45 +433,31 @@ def build_jobs_assign_sandbox_to_job_request(
|
|
483
433
|
|
484
434
|
# Construct headers
|
485
435
|
if content_type is not None:
|
486
|
-
_headers["Content-Type"] = _SERIALIZER.header(
|
487
|
-
"content_type", content_type, "str"
|
488
|
-
)
|
436
|
+
_headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str")
|
489
437
|
_headers["Accept"] = _SERIALIZER.header("accept", accept, "str")
|
490
438
|
|
491
|
-
return HttpRequest(
|
492
|
-
method="PATCH", url=_url, headers=_headers, content=content, **kwargs
|
493
|
-
)
|
439
|
+
return HttpRequest(method="PATCH", url=_url, headers=_headers, content=content, **kwargs)
|
494
440
|
|
495
441
|
|
496
|
-
def
|
442
|
+
def build_jobs_unassign_bulk_jobs_sandboxes_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long
|
497
443
|
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
|
498
|
-
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
|
499
|
-
|
500
|
-
accept = _headers.pop("Accept", "application/json")
|
501
444
|
|
445
|
+
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
|
502
446
|
# Construct URL
|
503
|
-
_url = "/api/jobs/"
|
504
|
-
|
505
|
-
# Construct parameters
|
506
|
-
_params["job_ids"] = _SERIALIZER.query("job_ids", job_ids, "[int]")
|
447
|
+
_url = "/api/jobs/sandbox/unassign"
|
507
448
|
|
508
449
|
# Construct headers
|
509
|
-
|
450
|
+
if content_type is not None:
|
451
|
+
_headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str")
|
510
452
|
|
511
|
-
return HttpRequest(
|
512
|
-
method="DELETE", url=_url, params=_params, headers=_headers, **kwargs
|
513
|
-
)
|
453
|
+
return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs)
|
514
454
|
|
515
455
|
|
516
|
-
def build_jobs_set_job_statuses_request(
|
517
|
-
*, force: bool = False, **kwargs: Any
|
518
|
-
) -> HttpRequest:
|
456
|
+
def build_jobs_set_job_statuses_request(*, force: bool = False, **kwargs: Any) -> HttpRequest:
|
519
457
|
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
|
520
458
|
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
|
521
459
|
|
522
|
-
content_type: Optional[str] = kwargs.pop(
|
523
|
-
"content_type", _headers.pop("Content-Type", None)
|
524
|
-
)
|
460
|
+
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
|
525
461
|
accept = _headers.pop("Accept", "application/json")
|
526
462
|
|
527
463
|
# Construct URL
|
@@ -533,22 +469,16 @@ def build_jobs_set_job_statuses_request(
|
|
533
469
|
|
534
470
|
# Construct headers
|
535
471
|
if content_type is not None:
|
536
|
-
_headers["Content-Type"] = _SERIALIZER.header(
|
537
|
-
"content_type", content_type, "str"
|
538
|
-
)
|
472
|
+
_headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str")
|
539
473
|
_headers["Accept"] = _SERIALIZER.header("accept", accept, "str")
|
540
474
|
|
541
|
-
return HttpRequest(
|
542
|
-
method="PATCH", url=_url, params=_params, headers=_headers, **kwargs
|
543
|
-
)
|
475
|
+
return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs)
|
544
476
|
|
545
477
|
|
546
478
|
def build_jobs_add_heartbeat_request(**kwargs: Any) -> HttpRequest:
|
547
479
|
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
|
548
480
|
|
549
|
-
content_type: Optional[str] = kwargs.pop(
|
550
|
-
"content_type", _headers.pop("Content-Type", None)
|
551
|
-
)
|
481
|
+
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
|
552
482
|
accept = _headers.pop("Accept", "application/json")
|
553
483
|
|
554
484
|
# Construct URL
|
@@ -556,65 +486,53 @@ def build_jobs_add_heartbeat_request(**kwargs: Any) -> HttpRequest:
|
|
556
486
|
|
557
487
|
# Construct headers
|
558
488
|
if content_type is not None:
|
559
|
-
_headers["Content-Type"] = _SERIALIZER.header(
|
560
|
-
"content_type", content_type, "str"
|
561
|
-
)
|
489
|
+
_headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str")
|
562
490
|
_headers["Accept"] = _SERIALIZER.header("accept", accept, "str")
|
563
491
|
|
564
492
|
return HttpRequest(method="PATCH", url=_url, headers=_headers, **kwargs)
|
565
493
|
|
566
494
|
|
567
|
-
def build_jobs_reschedule_jobs_request(
|
568
|
-
*, job_ids: List[int], reset_jobs: bool = False, **kwargs: Any
|
569
|
-
) -> HttpRequest:
|
495
|
+
def build_jobs_reschedule_jobs_request(*, reset_jobs: bool = False, **kwargs: Any) -> HttpRequest:
|
570
496
|
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
|
571
497
|
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
|
572
498
|
|
499
|
+
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
|
573
500
|
accept = _headers.pop("Accept", "application/json")
|
574
501
|
|
575
502
|
# Construct URL
|
576
503
|
_url = "/api/jobs/reschedule"
|
577
504
|
|
578
505
|
# Construct parameters
|
579
|
-
_params["job_ids"] = _SERIALIZER.query("job_ids", job_ids, "[int]")
|
580
506
|
if reset_jobs is not None:
|
581
507
|
_params["reset_jobs"] = _SERIALIZER.query("reset_jobs", reset_jobs, "bool")
|
582
508
|
|
583
509
|
# Construct headers
|
510
|
+
if content_type is not None:
|
511
|
+
_headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str")
|
584
512
|
_headers["Accept"] = _SERIALIZER.header("accept", accept, "str")
|
585
513
|
|
586
|
-
return HttpRequest(
|
587
|
-
method="POST", url=_url, params=_params, headers=_headers, **kwargs
|
588
|
-
)
|
514
|
+
return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs)
|
589
515
|
|
590
516
|
|
591
517
|
def build_jobs_patch_metadata_request(**kwargs: Any) -> HttpRequest:
|
592
518
|
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
|
593
519
|
|
594
|
-
content_type: Optional[str] = kwargs.pop(
|
595
|
-
"content_type", _headers.pop("Content-Type", None)
|
596
|
-
)
|
520
|
+
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
|
597
521
|
# Construct URL
|
598
522
|
_url = "/api/jobs/metadata"
|
599
523
|
|
600
524
|
# Construct headers
|
601
525
|
if content_type is not None:
|
602
|
-
_headers["Content-Type"] = _SERIALIZER.header(
|
603
|
-
"content_type", content_type, "str"
|
604
|
-
)
|
526
|
+
_headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str")
|
605
527
|
|
606
528
|
return HttpRequest(method="PATCH", url=_url, headers=_headers, **kwargs)
|
607
529
|
|
608
530
|
|
609
|
-
def build_jobs_search_request(
|
610
|
-
*, page: int = 1, per_page: int = 100, **kwargs: Any
|
611
|
-
) -> HttpRequest:
|
531
|
+
def build_jobs_search_request(*, page: int = 1, per_page: int = 100, **kwargs: Any) -> HttpRequest:
|
612
532
|
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
|
613
533
|
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
|
614
534
|
|
615
|
-
content_type: Optional[str] = kwargs.pop(
|
616
|
-
"content_type", _headers.pop("Content-Type", None)
|
617
|
-
)
|
535
|
+
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
|
618
536
|
accept = _headers.pop("Accept", "application/json")
|
619
537
|
|
620
538
|
# Construct URL
|
@@ -628,22 +546,16 @@ def build_jobs_search_request(
|
|
628
546
|
|
629
547
|
# Construct headers
|
630
548
|
if content_type is not None:
|
631
|
-
_headers["Content-Type"] = _SERIALIZER.header(
|
632
|
-
"content_type", content_type, "str"
|
633
|
-
)
|
549
|
+
_headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str")
|
634
550
|
_headers["Accept"] = _SERIALIZER.header("accept", accept, "str")
|
635
551
|
|
636
|
-
return HttpRequest(
|
637
|
-
method="POST", url=_url, params=_params, headers=_headers, **kwargs
|
638
|
-
)
|
552
|
+
return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs)
|
639
553
|
|
640
554
|
|
641
555
|
def build_jobs_summary_request(**kwargs: Any) -> HttpRequest:
|
642
556
|
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
|
643
557
|
|
644
|
-
content_type: Optional[str] = kwargs.pop(
|
645
|
-
"content_type", _headers.pop("Content-Type", None)
|
646
|
-
)
|
558
|
+
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
|
647
559
|
accept = _headers.pop("Accept", "application/json")
|
648
560
|
|
649
561
|
# Construct URL
|
@@ -651,9 +563,7 @@ def build_jobs_summary_request(**kwargs: Any) -> HttpRequest:
|
|
651
563
|
|
652
564
|
# Construct headers
|
653
565
|
if content_type is not None:
|
654
|
-
_headers["Content-Type"] = _SERIALIZER.header(
|
655
|
-
"content_type", content_type, "str"
|
656
|
-
)
|
566
|
+
_headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str")
|
657
567
|
_headers["Accept"] = _SERIALIZER.header("accept", accept, "str")
|
658
568
|
|
659
569
|
return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs)
|
@@ -662,9 +572,7 @@ def build_jobs_summary_request(**kwargs: Any) -> HttpRequest:
|
|
662
572
|
def build_jobs_submit_jdl_jobs_request(**kwargs: Any) -> HttpRequest:
|
663
573
|
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
|
664
574
|
|
665
|
-
content_type: Optional[str] = kwargs.pop(
|
666
|
-
"content_type", _headers.pop("Content-Type", None)
|
667
|
-
)
|
575
|
+
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
|
668
576
|
accept = _headers.pop("Accept", "application/json")
|
669
577
|
|
670
578
|
# Construct URL
|
@@ -672,9 +580,7 @@ def build_jobs_submit_jdl_jobs_request(**kwargs: Any) -> HttpRequest:
|
|
672
580
|
|
673
581
|
# Construct headers
|
674
582
|
if content_type is not None:
|
675
|
-
_headers["Content-Type"] = _SERIALIZER.header(
|
676
|
-
"content_type", content_type, "str"
|
677
|
-
)
|
583
|
+
_headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str")
|
678
584
|
_headers["Accept"] = _SERIALIZER.header("accept", accept, "str")
|
679
585
|
|
680
586
|
return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs)
|
@@ -694,18 +600,10 @@ class WellKnownOperations:
|
|
694
600
|
|
695
601
|
def __init__(self, *args, **kwargs) -> None:
|
696
602
|
input_args = list(args)
|
697
|
-
self._client: PipelineClient = (
|
698
|
-
|
699
|
-
)
|
700
|
-
self.
|
701
|
-
input_args.pop(0) if input_args else kwargs.pop("config")
|
702
|
-
)
|
703
|
-
self._serialize: Serializer = (
|
704
|
-
input_args.pop(0) if input_args else kwargs.pop("serializer")
|
705
|
-
)
|
706
|
-
self._deserialize: Deserializer = (
|
707
|
-
input_args.pop(0) if input_args else kwargs.pop("deserializer")
|
708
|
-
)
|
603
|
+
self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client")
|
604
|
+
self._config: DiracConfiguration = input_args.pop(0) if input_args else kwargs.pop("config")
|
605
|
+
self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer")
|
606
|
+
self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer")
|
709
607
|
|
710
608
|
@distributed_trace
|
711
609
|
def get_openid_configuration(self, **kwargs: Any) -> _models.OpenIDConfiguration:
|
@@ -737,23 +635,17 @@ class WellKnownOperations:
|
|
737
635
|
_request.url = self._client.format_url(_request.url)
|
738
636
|
|
739
637
|
_stream = False
|
740
|
-
pipeline_response: PipelineResponse = (
|
741
|
-
|
742
|
-
_request, stream=_stream, **kwargs
|
743
|
-
)
|
638
|
+
pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
|
639
|
+
_request, stream=_stream, **kwargs
|
744
640
|
)
|
745
641
|
|
746
642
|
response = pipeline_response.http_response
|
747
643
|
|
748
644
|
if response.status_code not in [200]:
|
749
|
-
map_error(
|
750
|
-
status_code=response.status_code, response=response, error_map=error_map
|
751
|
-
)
|
645
|
+
map_error(status_code=response.status_code, response=response, error_map=error_map)
|
752
646
|
raise HttpResponseError(response=response)
|
753
647
|
|
754
|
-
deserialized = self._deserialize(
|
755
|
-
"OpenIDConfiguration", pipeline_response.http_response
|
756
|
-
)
|
648
|
+
deserialized = self._deserialize("OpenIDConfiguration", pipeline_response.http_response)
|
757
649
|
|
758
650
|
if cls:
|
759
651
|
return cls(pipeline_response, deserialized, {}) # type: ignore
|
@@ -790,18 +682,14 @@ class WellKnownOperations:
|
|
790
682
|
_request.url = self._client.format_url(_request.url)
|
791
683
|
|
792
684
|
_stream = False
|
793
|
-
pipeline_response: PipelineResponse = (
|
794
|
-
|
795
|
-
_request, stream=_stream, **kwargs
|
796
|
-
)
|
685
|
+
pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
|
686
|
+
_request, stream=_stream, **kwargs
|
797
687
|
)
|
798
688
|
|
799
689
|
response = pipeline_response.http_response
|
800
690
|
|
801
691
|
if response.status_code not in [200]:
|
802
|
-
map_error(
|
803
|
-
status_code=response.status_code, response=response, error_map=error_map
|
804
|
-
)
|
692
|
+
map_error(status_code=response.status_code, response=response, error_map=error_map)
|
805
693
|
raise HttpResponseError(response=response)
|
806
694
|
|
807
695
|
deserialized = self._deserialize("{object}", pipeline_response.http_response)
|
@@ -841,18 +729,14 @@ class WellKnownOperations:
|
|
841
729
|
_request.url = self._client.format_url(_request.url)
|
842
730
|
|
843
731
|
_stream = False
|
844
|
-
pipeline_response: PipelineResponse = (
|
845
|
-
|
846
|
-
_request, stream=_stream, **kwargs
|
847
|
-
)
|
732
|
+
pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
|
733
|
+
_request, stream=_stream, **kwargs
|
848
734
|
)
|
849
735
|
|
850
736
|
response = pipeline_response.http_response
|
851
737
|
|
852
738
|
if response.status_code not in [200]:
|
853
|
-
map_error(
|
854
|
-
status_code=response.status_code, response=response, error_map=error_map
|
855
|
-
)
|
739
|
+
map_error(status_code=response.status_code, response=response, error_map=error_map)
|
856
740
|
raise HttpResponseError(response=response)
|
857
741
|
|
858
742
|
deserialized = self._deserialize("Metadata", pipeline_response.http_response)
|
@@ -862,6 +746,53 @@ class WellKnownOperations:
|
|
862
746
|
|
863
747
|
return deserialized # type: ignore
|
864
748
|
|
749
|
+
@distributed_trace
|
750
|
+
def get_security_txt(self, **kwargs: Any) -> str:
|
751
|
+
"""Get Security Txt.
|
752
|
+
|
753
|
+
Get the security.txt file.
|
754
|
+
|
755
|
+
:return: str
|
756
|
+
:rtype: str
|
757
|
+
:raises ~azure.core.exceptions.HttpResponseError:
|
758
|
+
"""
|
759
|
+
error_map: MutableMapping = {
|
760
|
+
401: ClientAuthenticationError,
|
761
|
+
404: ResourceNotFoundError,
|
762
|
+
409: ResourceExistsError,
|
763
|
+
304: ResourceNotModifiedError,
|
764
|
+
}
|
765
|
+
error_map.update(kwargs.pop("error_map", {}) or {})
|
766
|
+
|
767
|
+
_headers = kwargs.pop("headers", {}) or {}
|
768
|
+
_params = kwargs.pop("params", {}) or {}
|
769
|
+
|
770
|
+
cls: ClsType[str] = kwargs.pop("cls", None)
|
771
|
+
|
772
|
+
_request = build_well_known_get_security_txt_request(
|
773
|
+
headers=_headers,
|
774
|
+
params=_params,
|
775
|
+
)
|
776
|
+
_request.url = self._client.format_url(_request.url)
|
777
|
+
|
778
|
+
_stream = False
|
779
|
+
pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
|
780
|
+
_request, stream=_stream, **kwargs
|
781
|
+
)
|
782
|
+
|
783
|
+
response = pipeline_response.http_response
|
784
|
+
|
785
|
+
if response.status_code not in [200]:
|
786
|
+
map_error(status_code=response.status_code, response=response, error_map=error_map)
|
787
|
+
raise HttpResponseError(response=response)
|
788
|
+
|
789
|
+
deserialized = self._deserialize("str", pipeline_response.http_response)
|
790
|
+
|
791
|
+
if cls:
|
792
|
+
return cls(pipeline_response, deserialized, {}) # type: ignore
|
793
|
+
|
794
|
+
return deserialized # type: ignore
|
795
|
+
|
865
796
|
|
866
797
|
class AuthOperations: # pylint: disable=abstract-class-instantiated
|
867
798
|
"""
|
@@ -877,18 +808,10 @@ class AuthOperations: # pylint: disable=abstract-class-instantiated
|
|
877
808
|
|
878
809
|
def __init__(self, *args, **kwargs) -> None:
|
879
810
|
input_args = list(args)
|
880
|
-
self._client: PipelineClient = (
|
881
|
-
|
882
|
-
)
|
883
|
-
self.
|
884
|
-
input_args.pop(0) if input_args else kwargs.pop("config")
|
885
|
-
)
|
886
|
-
self._serialize: Serializer = (
|
887
|
-
input_args.pop(0) if input_args else kwargs.pop("serializer")
|
888
|
-
)
|
889
|
-
self._deserialize: Deserializer = (
|
890
|
-
input_args.pop(0) if input_args else kwargs.pop("deserializer")
|
891
|
-
)
|
811
|
+
self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client")
|
812
|
+
self._config: DiracConfiguration = input_args.pop(0) if input_args else kwargs.pop("config")
|
813
|
+
self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer")
|
814
|
+
self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer")
|
892
815
|
|
893
816
|
raise_if_not_implemented(
|
894
817
|
self.__class__,
|
@@ -898,9 +821,7 @@ class AuthOperations: # pylint: disable=abstract-class-instantiated
|
|
898
821
|
)
|
899
822
|
|
900
823
|
@distributed_trace
|
901
|
-
def initiate_device_flow(
|
902
|
-
self, *, client_id: str, scope: str, **kwargs: Any
|
903
|
-
) -> _models.InitiateDeviceFlowResponse:
|
824
|
+
def initiate_device_flow(self, *, client_id: str, scope: str, **kwargs: Any) -> _models.InitiateDeviceFlowResponse:
|
904
825
|
"""Initiate Device Flow.
|
905
826
|
|
906
827
|
Initiate the device flow against DIRAC authorization Server.
|
@@ -957,23 +878,17 @@ class AuthOperations: # pylint: disable=abstract-class-instantiated
|
|
957
878
|
_request.url = self._client.format_url(_request.url)
|
958
879
|
|
959
880
|
_stream = False
|
960
|
-
pipeline_response: PipelineResponse = (
|
961
|
-
|
962
|
-
_request, stream=_stream, **kwargs
|
963
|
-
)
|
881
|
+
pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
|
882
|
+
_request, stream=_stream, **kwargs
|
964
883
|
)
|
965
884
|
|
966
885
|
response = pipeline_response.http_response
|
967
886
|
|
968
887
|
if response.status_code not in [200]:
|
969
|
-
map_error(
|
970
|
-
status_code=response.status_code, response=response, error_map=error_map
|
971
|
-
)
|
888
|
+
map_error(status_code=response.status_code, response=response, error_map=error_map)
|
972
889
|
raise HttpResponseError(response=response)
|
973
890
|
|
974
|
-
deserialized = self._deserialize(
|
975
|
-
"InitiateDeviceFlowResponse", pipeline_response.http_response
|
976
|
-
)
|
891
|
+
deserialized = self._deserialize("InitiateDeviceFlowResponse", pipeline_response.http_response)
|
977
892
|
|
978
893
|
if cls:
|
979
894
|
return cls(pipeline_response, deserialized, {}) # type: ignore
|
@@ -1020,18 +935,14 @@ class AuthOperations: # pylint: disable=abstract-class-instantiated
|
|
1020
935
|
_request.url = self._client.format_url(_request.url)
|
1021
936
|
|
1022
937
|
_stream = False
|
1023
|
-
pipeline_response: PipelineResponse = (
|
1024
|
-
|
1025
|
-
_request, stream=_stream, **kwargs
|
1026
|
-
)
|
938
|
+
pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
|
939
|
+
_request, stream=_stream, **kwargs
|
1027
940
|
)
|
1028
941
|
|
1029
942
|
response = pipeline_response.http_response
|
1030
943
|
|
1031
944
|
if response.status_code not in [200]:
|
1032
|
-
map_error(
|
1033
|
-
status_code=response.status_code, response=response, error_map=error_map
|
1034
|
-
)
|
945
|
+
map_error(status_code=response.status_code, response=response, error_map=error_map)
|
1035
946
|
raise HttpResponseError(response=response)
|
1036
947
|
|
1037
948
|
deserialized = self._deserialize("object", pipeline_response.http_response)
|
@@ -1081,18 +992,14 @@ class AuthOperations: # pylint: disable=abstract-class-instantiated
|
|
1081
992
|
_request.url = self._client.format_url(_request.url)
|
1082
993
|
|
1083
994
|
_stream = False
|
1084
|
-
pipeline_response: PipelineResponse = (
|
1085
|
-
|
1086
|
-
_request, stream=_stream, **kwargs
|
1087
|
-
)
|
995
|
+
pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
|
996
|
+
_request, stream=_stream, **kwargs
|
1088
997
|
)
|
1089
998
|
|
1090
999
|
response = pipeline_response.http_response
|
1091
1000
|
|
1092
1001
|
if response.status_code not in [200]:
|
1093
|
-
map_error(
|
1094
|
-
status_code=response.status_code, response=response, error_map=error_map
|
1095
|
-
)
|
1002
|
+
map_error(status_code=response.status_code, response=response, error_map=error_map)
|
1096
1003
|
raise HttpResponseError(response=response)
|
1097
1004
|
|
1098
1005
|
deserialized = self._deserialize("object", pipeline_response.http_response)
|
@@ -1132,18 +1039,14 @@ class AuthOperations: # pylint: disable=abstract-class-instantiated
|
|
1132
1039
|
_request.url = self._client.format_url(_request.url)
|
1133
1040
|
|
1134
1041
|
_stream = False
|
1135
|
-
pipeline_response: PipelineResponse = (
|
1136
|
-
|
1137
|
-
_request, stream=_stream, **kwargs
|
1138
|
-
)
|
1042
|
+
pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
|
1043
|
+
_request, stream=_stream, **kwargs
|
1139
1044
|
)
|
1140
1045
|
|
1141
1046
|
response = pipeline_response.http_response
|
1142
1047
|
|
1143
1048
|
if response.status_code not in [200]:
|
1144
|
-
map_error(
|
1145
|
-
status_code=response.status_code, response=response, error_map=error_map
|
1146
|
-
)
|
1049
|
+
map_error(status_code=response.status_code, response=response, error_map=error_map)
|
1147
1050
|
raise HttpResponseError(response=response)
|
1148
1051
|
|
1149
1052
|
deserialized = self._deserialize("object", pipeline_response.http_response)
|
@@ -1184,18 +1087,14 @@ class AuthOperations: # pylint: disable=abstract-class-instantiated
|
|
1184
1087
|
_request.url = self._client.format_url(_request.url)
|
1185
1088
|
|
1186
1089
|
_stream = False
|
1187
|
-
pipeline_response: PipelineResponse = (
|
1188
|
-
|
1189
|
-
_request, stream=_stream, **kwargs
|
1190
|
-
)
|
1090
|
+
pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
|
1091
|
+
_request, stream=_stream, **kwargs
|
1191
1092
|
)
|
1192
1093
|
|
1193
1094
|
response = pipeline_response.http_response
|
1194
1095
|
|
1195
1096
|
if response.status_code not in [200]:
|
1196
|
-
map_error(
|
1197
|
-
status_code=response.status_code, response=response, error_map=error_map
|
1198
|
-
)
|
1097
|
+
map_error(status_code=response.status_code, response=response, error_map=error_map)
|
1199
1098
|
raise HttpResponseError(response=response)
|
1200
1099
|
|
1201
1100
|
deserialized = self._deserialize("[object]", pipeline_response.http_response)
|
@@ -1206,9 +1105,7 @@ class AuthOperations: # pylint: disable=abstract-class-instantiated
|
|
1206
1105
|
return deserialized # type: ignore
|
1207
1106
|
|
1208
1107
|
@distributed_trace
|
1209
|
-
def revoke_refresh_token_by_refresh_token(
|
1210
|
-
self, *, refresh_token: str, client_id: str, **kwargs: Any
|
1211
|
-
) -> str:
|
1108
|
+
def revoke_refresh_token_by_refresh_token(self, *, refresh_token: str, client_id: str, **kwargs: Any) -> str:
|
1212
1109
|
"""Revoke Refresh Token By Refresh Token.
|
1213
1110
|
|
1214
1111
|
Revoke a refresh token.
|
@@ -1243,18 +1140,14 @@ class AuthOperations: # pylint: disable=abstract-class-instantiated
|
|
1243
1140
|
_request.url = self._client.format_url(_request.url)
|
1244
1141
|
|
1245
1142
|
_stream = False
|
1246
|
-
pipeline_response: PipelineResponse = (
|
1247
|
-
|
1248
|
-
_request, stream=_stream, **kwargs
|
1249
|
-
)
|
1143
|
+
pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
|
1144
|
+
_request, stream=_stream, **kwargs
|
1250
1145
|
)
|
1251
1146
|
|
1252
1147
|
response = pipeline_response.http_response
|
1253
1148
|
|
1254
1149
|
if response.status_code not in [200]:
|
1255
|
-
map_error(
|
1256
|
-
status_code=response.status_code, response=response, error_map=error_map
|
1257
|
-
)
|
1150
|
+
map_error(status_code=response.status_code, response=response, error_map=error_map)
|
1258
1151
|
raise HttpResponseError(response=response)
|
1259
1152
|
|
1260
1153
|
deserialized = self._deserialize("str", pipeline_response.http_response)
|
@@ -1298,18 +1191,14 @@ class AuthOperations: # pylint: disable=abstract-class-instantiated
|
|
1298
1191
|
_request.url = self._client.format_url(_request.url)
|
1299
1192
|
|
1300
1193
|
_stream = False
|
1301
|
-
pipeline_response: PipelineResponse = (
|
1302
|
-
|
1303
|
-
_request, stream=_stream, **kwargs
|
1304
|
-
)
|
1194
|
+
pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
|
1195
|
+
_request, stream=_stream, **kwargs
|
1305
1196
|
)
|
1306
1197
|
|
1307
1198
|
response = pipeline_response.http_response
|
1308
1199
|
|
1309
1200
|
if response.status_code not in [200]:
|
1310
|
-
map_error(
|
1311
|
-
status_code=response.status_code, response=response, error_map=error_map
|
1312
|
-
)
|
1201
|
+
map_error(status_code=response.status_code, response=response, error_map=error_map)
|
1313
1202
|
raise HttpResponseError(response=response)
|
1314
1203
|
|
1315
1204
|
deserialized = self._deserialize("str", pipeline_response.http_response)
|
@@ -1349,23 +1238,17 @@ class AuthOperations: # pylint: disable=abstract-class-instantiated
|
|
1349
1238
|
_request.url = self._client.format_url(_request.url)
|
1350
1239
|
|
1351
1240
|
_stream = False
|
1352
|
-
pipeline_response: PipelineResponse = (
|
1353
|
-
|
1354
|
-
_request, stream=_stream, **kwargs
|
1355
|
-
)
|
1241
|
+
pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
|
1242
|
+
_request, stream=_stream, **kwargs
|
1356
1243
|
)
|
1357
1244
|
|
1358
1245
|
response = pipeline_response.http_response
|
1359
1246
|
|
1360
1247
|
if response.status_code not in [200]:
|
1361
|
-
map_error(
|
1362
|
-
status_code=response.status_code, response=response, error_map=error_map
|
1363
|
-
)
|
1248
|
+
map_error(status_code=response.status_code, response=response, error_map=error_map)
|
1364
1249
|
raise HttpResponseError(response=response)
|
1365
1250
|
|
1366
|
-
deserialized = self._deserialize(
|
1367
|
-
"UserInfoResponse", pipeline_response.http_response
|
1368
|
-
)
|
1251
|
+
deserialized = self._deserialize("UserInfoResponse", pipeline_response.http_response)
|
1369
1252
|
|
1370
1253
|
if cls:
|
1371
1254
|
return cls(pipeline_response, deserialized, {}) # type: ignore
|
@@ -1383,7 +1266,7 @@ class AuthOperations: # pylint: disable=abstract-class-instantiated
|
|
1383
1266
|
redirect_uri: str,
|
1384
1267
|
scope: str,
|
1385
1268
|
state: str,
|
1386
|
-
**kwargs: Any
|
1269
|
+
**kwargs: Any
|
1387
1270
|
) -> Any:
|
1388
1271
|
"""Initiate Authorization Flow.
|
1389
1272
|
|
@@ -1459,18 +1342,14 @@ class AuthOperations: # pylint: disable=abstract-class-instantiated
|
|
1459
1342
|
_request.url = self._client.format_url(_request.url)
|
1460
1343
|
|
1461
1344
|
_stream = False
|
1462
|
-
pipeline_response: PipelineResponse = (
|
1463
|
-
|
1464
|
-
_request, stream=_stream, **kwargs
|
1465
|
-
)
|
1345
|
+
pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
|
1346
|
+
_request, stream=_stream, **kwargs
|
1466
1347
|
)
|
1467
1348
|
|
1468
1349
|
response = pipeline_response.http_response
|
1469
1350
|
|
1470
1351
|
if response.status_code not in [200]:
|
1471
|
-
map_error(
|
1472
|
-
status_code=response.status_code, response=response, error_map=error_map
|
1473
|
-
)
|
1352
|
+
map_error(status_code=response.status_code, response=response, error_map=error_map)
|
1474
1353
|
raise HttpResponseError(response=response)
|
1475
1354
|
|
1476
1355
|
deserialized = self._deserialize("object", pipeline_response.http_response)
|
@@ -1481,9 +1360,7 @@ class AuthOperations: # pylint: disable=abstract-class-instantiated
|
|
1481
1360
|
return deserialized # type: ignore
|
1482
1361
|
|
1483
1362
|
@distributed_trace
|
1484
|
-
def complete_authorization_flow(
|
1485
|
-
self, *, code: str, state: str, **kwargs: Any
|
1486
|
-
) -> Any:
|
1363
|
+
def complete_authorization_flow(self, *, code: str, state: str, **kwargs: Any) -> Any:
|
1487
1364
|
"""Complete Authorization Flow.
|
1488
1365
|
|
1489
1366
|
Complete the authorization flow.
|
@@ -1524,18 +1401,14 @@ class AuthOperations: # pylint: disable=abstract-class-instantiated
|
|
1524
1401
|
_request.url = self._client.format_url(_request.url)
|
1525
1402
|
|
1526
1403
|
_stream = False
|
1527
|
-
pipeline_response: PipelineResponse = (
|
1528
|
-
|
1529
|
-
_request, stream=_stream, **kwargs
|
1530
|
-
)
|
1404
|
+
pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
|
1405
|
+
_request, stream=_stream, **kwargs
|
1531
1406
|
)
|
1532
1407
|
|
1533
1408
|
response = pipeline_response.http_response
|
1534
1409
|
|
1535
1410
|
if response.status_code not in [200]:
|
1536
|
-
map_error(
|
1537
|
-
status_code=response.status_code, response=response, error_map=error_map
|
1538
|
-
)
|
1411
|
+
map_error(status_code=response.status_code, response=response, error_map=error_map)
|
1539
1412
|
raise HttpResponseError(response=response)
|
1540
1413
|
|
1541
1414
|
deserialized = self._deserialize("object", pipeline_response.http_response)
|
@@ -1560,18 +1433,10 @@ class ConfigOperations:
|
|
1560
1433
|
|
1561
1434
|
def __init__(self, *args, **kwargs) -> None:
|
1562
1435
|
input_args = list(args)
|
1563
|
-
self._client: PipelineClient = (
|
1564
|
-
|
1565
|
-
)
|
1566
|
-
self.
|
1567
|
-
input_args.pop(0) if input_args else kwargs.pop("config")
|
1568
|
-
)
|
1569
|
-
self._serialize: Serializer = (
|
1570
|
-
input_args.pop(0) if input_args else kwargs.pop("serializer")
|
1571
|
-
)
|
1572
|
-
self._deserialize: Deserializer = (
|
1573
|
-
input_args.pop(0) if input_args else kwargs.pop("deserializer")
|
1574
|
-
)
|
1436
|
+
self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client")
|
1437
|
+
self._config: DiracConfiguration = input_args.pop(0) if input_args else kwargs.pop("config")
|
1438
|
+
self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer")
|
1439
|
+
self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer")
|
1575
1440
|
|
1576
1441
|
@distributed_trace
|
1577
1442
|
def serve_config(
|
@@ -1580,7 +1445,7 @@ class ConfigOperations:
|
|
1580
1445
|
if_modified_since: Optional[str] = None,
|
1581
1446
|
etag: Optional[str] = None,
|
1582
1447
|
match_condition: Optional[MatchConditions] = None,
|
1583
|
-
**kwargs: Any
|
1448
|
+
**kwargs: Any
|
1584
1449
|
) -> Any:
|
1585
1450
|
"""Serve Config.
|
1586
1451
|
|
@@ -1631,18 +1496,14 @@ class ConfigOperations:
|
|
1631
1496
|
_request.url = self._client.format_url(_request.url)
|
1632
1497
|
|
1633
1498
|
_stream = False
|
1634
|
-
pipeline_response: PipelineResponse = (
|
1635
|
-
|
1636
|
-
_request, stream=_stream, **kwargs
|
1637
|
-
)
|
1499
|
+
pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
|
1500
|
+
_request, stream=_stream, **kwargs
|
1638
1501
|
)
|
1639
1502
|
|
1640
1503
|
response = pipeline_response.http_response
|
1641
1504
|
|
1642
1505
|
if response.status_code not in [200]:
|
1643
|
-
map_error(
|
1644
|
-
status_code=response.status_code, response=response, error_map=error_map
|
1645
|
-
)
|
1506
|
+
map_error(status_code=response.status_code, response=response, error_map=error_map)
|
1646
1507
|
raise HttpResponseError(response=response)
|
1647
1508
|
|
1648
1509
|
deserialized = self._deserialize("object", pipeline_response.http_response)
|
@@ -1667,26 +1528,14 @@ class JobsOperations:
|
|
1667
1528
|
|
1668
1529
|
def __init__(self, *args, **kwargs) -> None:
|
1669
1530
|
input_args = list(args)
|
1670
|
-
self._client: PipelineClient = (
|
1671
|
-
|
1672
|
-
)
|
1673
|
-
self.
|
1674
|
-
input_args.pop(0) if input_args else kwargs.pop("config")
|
1675
|
-
)
|
1676
|
-
self._serialize: Serializer = (
|
1677
|
-
input_args.pop(0) if input_args else kwargs.pop("serializer")
|
1678
|
-
)
|
1679
|
-
self._deserialize: Deserializer = (
|
1680
|
-
input_args.pop(0) if input_args else kwargs.pop("deserializer")
|
1681
|
-
)
|
1531
|
+
self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client")
|
1532
|
+
self._config: DiracConfiguration = input_args.pop(0) if input_args else kwargs.pop("config")
|
1533
|
+
self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer")
|
1534
|
+
self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer")
|
1682
1535
|
|
1683
1536
|
@overload
|
1684
1537
|
def initiate_sandbox_upload(
|
1685
|
-
self,
|
1686
|
-
body: _models.SandboxInfo,
|
1687
|
-
*,
|
1688
|
-
content_type: str = "application/json",
|
1689
|
-
**kwargs: Any,
|
1538
|
+
self, body: _models.SandboxInfo, *, content_type: str = "application/json", **kwargs: Any
|
1690
1539
|
) -> _models.SandboxUploadResponse:
|
1691
1540
|
"""Initiate Sandbox Upload.
|
1692
1541
|
|
@@ -1763,9 +1612,7 @@ class JobsOperations:
|
|
1763
1612
|
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
|
1764
1613
|
_params = kwargs.pop("params", {}) or {}
|
1765
1614
|
|
1766
|
-
content_type: Optional[str] = kwargs.pop(
|
1767
|
-
"content_type", _headers.pop("Content-Type", None)
|
1768
|
-
)
|
1615
|
+
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
|
1769
1616
|
cls: ClsType[_models.SandboxUploadResponse] = kwargs.pop("cls", None)
|
1770
1617
|
|
1771
1618
|
content_type = content_type or "application/json"
|
@@ -1786,23 +1633,17 @@ class JobsOperations:
|
|
1786
1633
|
_request.url = self._client.format_url(_request.url)
|
1787
1634
|
|
1788
1635
|
_stream = False
|
1789
|
-
pipeline_response: PipelineResponse = (
|
1790
|
-
|
1791
|
-
_request, stream=_stream, **kwargs
|
1792
|
-
)
|
1636
|
+
pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
|
1637
|
+
_request, stream=_stream, **kwargs
|
1793
1638
|
)
|
1794
1639
|
|
1795
1640
|
response = pipeline_response.http_response
|
1796
1641
|
|
1797
1642
|
if response.status_code not in [200]:
|
1798
|
-
map_error(
|
1799
|
-
status_code=response.status_code, response=response, error_map=error_map
|
1800
|
-
)
|
1643
|
+
map_error(status_code=response.status_code, response=response, error_map=error_map)
|
1801
1644
|
raise HttpResponseError(response=response)
|
1802
1645
|
|
1803
|
-
deserialized = self._deserialize(
|
1804
|
-
"SandboxUploadResponse", pipeline_response.http_response
|
1805
|
-
)
|
1646
|
+
deserialized = self._deserialize("SandboxUploadResponse", pipeline_response.http_response)
|
1806
1647
|
|
1807
1648
|
if cls:
|
1808
1649
|
return cls(pipeline_response, deserialized, {}) # type: ignore
|
@@ -1810,9 +1651,7 @@ class JobsOperations:
|
|
1810
1651
|
return deserialized # type: ignore
|
1811
1652
|
|
1812
1653
|
@distributed_trace
|
1813
|
-
def get_sandbox_file(
|
1814
|
-
self, *, pfn: str, **kwargs: Any
|
1815
|
-
) -> _models.SandboxDownloadResponse:
|
1654
|
+
def get_sandbox_file(self, *, pfn: str, **kwargs: Any) -> _models.SandboxDownloadResponse:
|
1816
1655
|
"""Get Sandbox File.
|
1817
1656
|
|
1818
1657
|
Get a presigned URL to download a sandbox file.
|
@@ -1850,79 +1689,17 @@ class JobsOperations:
|
|
1850
1689
|
_request.url = self._client.format_url(_request.url)
|
1851
1690
|
|
1852
1691
|
_stream = False
|
1853
|
-
pipeline_response: PipelineResponse = (
|
1854
|
-
|
1855
|
-
_request, stream=_stream, **kwargs
|
1856
|
-
)
|
1692
|
+
pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
|
1693
|
+
_request, stream=_stream, **kwargs
|
1857
1694
|
)
|
1858
1695
|
|
1859
1696
|
response = pipeline_response.http_response
|
1860
1697
|
|
1861
1698
|
if response.status_code not in [200]:
|
1862
|
-
map_error(
|
1863
|
-
status_code=response.status_code, response=response, error_map=error_map
|
1864
|
-
)
|
1699
|
+
map_error(status_code=response.status_code, response=response, error_map=error_map)
|
1865
1700
|
raise HttpResponseError(response=response)
|
1866
1701
|
|
1867
|
-
deserialized = self._deserialize(
|
1868
|
-
"SandboxDownloadResponse", pipeline_response.http_response
|
1869
|
-
)
|
1870
|
-
|
1871
|
-
if cls:
|
1872
|
-
return cls(pipeline_response, deserialized, {}) # type: ignore
|
1873
|
-
|
1874
|
-
return deserialized # type: ignore
|
1875
|
-
|
1876
|
-
@distributed_trace
|
1877
|
-
def unassign_bulk_jobs_sandboxes(
|
1878
|
-
self, *, jobs_ids: List[int], **kwargs: Any
|
1879
|
-
) -> Any:
|
1880
|
-
"""Unassign Bulk Jobs Sandboxes.
|
1881
|
-
|
1882
|
-
Delete bulk jobs sandbox mapping.
|
1883
|
-
|
1884
|
-
:keyword jobs_ids: Required.
|
1885
|
-
:paramtype jobs_ids: list[int]
|
1886
|
-
:return: any
|
1887
|
-
:rtype: any
|
1888
|
-
:raises ~azure.core.exceptions.HttpResponseError:
|
1889
|
-
"""
|
1890
|
-
error_map: MutableMapping = {
|
1891
|
-
401: ClientAuthenticationError,
|
1892
|
-
404: ResourceNotFoundError,
|
1893
|
-
409: ResourceExistsError,
|
1894
|
-
304: ResourceNotModifiedError,
|
1895
|
-
}
|
1896
|
-
error_map.update(kwargs.pop("error_map", {}) or {})
|
1897
|
-
|
1898
|
-
_headers = kwargs.pop("headers", {}) or {}
|
1899
|
-
_params = kwargs.pop("params", {}) or {}
|
1900
|
-
|
1901
|
-
cls: ClsType[Any] = kwargs.pop("cls", None)
|
1902
|
-
|
1903
|
-
_request = build_jobs_unassign_bulk_jobs_sandboxes_request(
|
1904
|
-
jobs_ids=jobs_ids,
|
1905
|
-
headers=_headers,
|
1906
|
-
params=_params,
|
1907
|
-
)
|
1908
|
-
_request.url = self._client.format_url(_request.url)
|
1909
|
-
|
1910
|
-
_stream = False
|
1911
|
-
pipeline_response: PipelineResponse = (
|
1912
|
-
self._client._pipeline.run( # pylint: disable=protected-access
|
1913
|
-
_request, stream=_stream, **kwargs
|
1914
|
-
)
|
1915
|
-
)
|
1916
|
-
|
1917
|
-
response = pipeline_response.http_response
|
1918
|
-
|
1919
|
-
if response.status_code not in [200]:
|
1920
|
-
map_error(
|
1921
|
-
status_code=response.status_code, response=response, error_map=error_map
|
1922
|
-
)
|
1923
|
-
raise HttpResponseError(response=response)
|
1924
|
-
|
1925
|
-
deserialized = self._deserialize("object", pipeline_response.http_response)
|
1702
|
+
deserialized = self._deserialize("SandboxDownloadResponse", pipeline_response.http_response)
|
1926
1703
|
|
1927
1704
|
if cls:
|
1928
1705
|
return cls(pipeline_response, deserialized, {}) # type: ignore
|
@@ -1962,18 +1739,14 @@ class JobsOperations:
|
|
1962
1739
|
_request.url = self._client.format_url(_request.url)
|
1963
1740
|
|
1964
1741
|
_stream = False
|
1965
|
-
pipeline_response: PipelineResponse = (
|
1966
|
-
|
1967
|
-
_request, stream=_stream, **kwargs
|
1968
|
-
)
|
1742
|
+
pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
|
1743
|
+
_request, stream=_stream, **kwargs
|
1969
1744
|
)
|
1970
1745
|
|
1971
1746
|
response = pipeline_response.http_response
|
1972
1747
|
|
1973
1748
|
if response.status_code not in [200]:
|
1974
|
-
map_error(
|
1975
|
-
status_code=response.status_code, response=response, error_map=error_map
|
1976
|
-
)
|
1749
|
+
map_error(status_code=response.status_code, response=response, error_map=error_map)
|
1977
1750
|
raise HttpResponseError(response=response)
|
1978
1751
|
|
1979
1752
|
deserialized = self._deserialize("{[object]}", pipeline_response.http_response)
|
@@ -2016,18 +1789,14 @@ class JobsOperations:
|
|
2016
1789
|
_request.url = self._client.format_url(_request.url)
|
2017
1790
|
|
2018
1791
|
_stream = False
|
2019
|
-
pipeline_response: PipelineResponse = (
|
2020
|
-
|
2021
|
-
_request, stream=_stream, **kwargs
|
2022
|
-
)
|
1792
|
+
pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
|
1793
|
+
_request, stream=_stream, **kwargs
|
2023
1794
|
)
|
2024
1795
|
|
2025
1796
|
response = pipeline_response.http_response
|
2026
1797
|
|
2027
1798
|
if response.status_code not in [200]:
|
2028
|
-
map_error(
|
2029
|
-
status_code=response.status_code, response=response, error_map=error_map
|
2030
|
-
)
|
1799
|
+
map_error(status_code=response.status_code, response=response, error_map=error_map)
|
2031
1800
|
raise HttpResponseError(response=response)
|
2032
1801
|
|
2033
1802
|
deserialized = self._deserialize("object", pipeline_response.http_response)
|
@@ -2038,9 +1807,7 @@ class JobsOperations:
|
|
2038
1807
|
return deserialized # type: ignore
|
2039
1808
|
|
2040
1809
|
@distributed_trace
|
2041
|
-
def get_job_sandbox(
|
2042
|
-
self, job_id: int, sandbox_type: Union[str, _models.SandboxType], **kwargs: Any
|
2043
|
-
) -> List[Any]:
|
1810
|
+
def get_job_sandbox(self, job_id: int, sandbox_type: Union[str, _models.SandboxType], **kwargs: Any) -> List[Any]:
|
2044
1811
|
"""Get Job Sandbox.
|
2045
1812
|
|
2046
1813
|
Get input or output sandbox of given job.
|
@@ -2075,18 +1842,14 @@ class JobsOperations:
|
|
2075
1842
|
_request.url = self._client.format_url(_request.url)
|
2076
1843
|
|
2077
1844
|
_stream = False
|
2078
|
-
pipeline_response: PipelineResponse = (
|
2079
|
-
|
2080
|
-
_request, stream=_stream, **kwargs
|
2081
|
-
)
|
1845
|
+
pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
|
1846
|
+
_request, stream=_stream, **kwargs
|
2082
1847
|
)
|
2083
1848
|
|
2084
1849
|
response = pipeline_response.http_response
|
2085
1850
|
|
2086
1851
|
if response.status_code not in [200]:
|
2087
|
-
map_error(
|
2088
|
-
status_code=response.status_code, response=response, error_map=error_map
|
2089
|
-
)
|
1852
|
+
map_error(status_code=response.status_code, response=response, error_map=error_map)
|
2090
1853
|
raise HttpResponseError(response=response)
|
2091
1854
|
|
2092
1855
|
deserialized = self._deserialize("[object]", pipeline_response.http_response)
|
@@ -2121,9 +1884,7 @@ class JobsOperations:
|
|
2121
1884
|
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
|
2122
1885
|
_params = kwargs.pop("params", {}) or {}
|
2123
1886
|
|
2124
|
-
content_type: str = kwargs.pop(
|
2125
|
-
"content_type", _headers.pop("Content-Type", "application/json")
|
2126
|
-
)
|
1887
|
+
content_type: str = kwargs.pop("content_type", _headers.pop("Content-Type", "application/json"))
|
2127
1888
|
cls: ClsType[Any] = kwargs.pop("cls", None)
|
2128
1889
|
|
2129
1890
|
_content = self._serialize.body(body, "str")
|
@@ -2138,18 +1899,14 @@ class JobsOperations:
|
|
2138
1899
|
_request.url = self._client.format_url(_request.url)
|
2139
1900
|
|
2140
1901
|
_stream = False
|
2141
|
-
pipeline_response: PipelineResponse = (
|
2142
|
-
|
2143
|
-
_request, stream=_stream, **kwargs
|
2144
|
-
)
|
1902
|
+
pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
|
1903
|
+
_request, stream=_stream, **kwargs
|
2145
1904
|
)
|
2146
1905
|
|
2147
1906
|
response = pipeline_response.http_response
|
2148
1907
|
|
2149
1908
|
if response.status_code not in [200]:
|
2150
|
-
map_error(
|
2151
|
-
status_code=response.status_code, response=response, error_map=error_map
|
2152
|
-
)
|
1909
|
+
map_error(status_code=response.status_code, response=response, error_map=error_map)
|
2153
1910
|
raise HttpResponseError(response=response)
|
2154
1911
|
|
2155
1912
|
deserialized = self._deserialize("object", pipeline_response.http_response)
|
@@ -2159,21 +1916,54 @@ class JobsOperations:
|
|
2159
1916
|
|
2160
1917
|
return deserialized # type: ignore
|
2161
1918
|
|
2162
|
-
@
|
2163
|
-
def
|
2164
|
-
""
|
1919
|
+
@overload
|
1920
|
+
def unassign_bulk_jobs_sandboxes(
|
1921
|
+
self, body: _models.BodyJobsUnassignBulkJobsSandboxes, *, content_type: str = "application/json", **kwargs: Any
|
1922
|
+
) -> None:
|
1923
|
+
"""Unassign Bulk Jobs Sandboxes.
|
2165
1924
|
|
2166
|
-
|
1925
|
+
Delete bulk jobs sandbox mapping.
|
2167
1926
|
|
2168
|
-
|
2169
|
-
|
2170
|
-
|
2171
|
-
|
1927
|
+
:param body: Required.
|
1928
|
+
:type body: ~_generated.models.BodyJobsUnassignBulkJobsSandboxes
|
1929
|
+
:keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
|
1930
|
+
Default value is "application/json".
|
1931
|
+
:paramtype content_type: str
|
1932
|
+
:return: None
|
1933
|
+
:rtype: None
|
1934
|
+
:raises ~azure.core.exceptions.HttpResponseError:
|
1935
|
+
"""
|
2172
1936
|
|
2173
|
-
|
2174
|
-
|
2175
|
-
:
|
2176
|
-
|
1937
|
+
@overload
|
1938
|
+
def unassign_bulk_jobs_sandboxes(
|
1939
|
+
self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any
|
1940
|
+
) -> None:
|
1941
|
+
"""Unassign Bulk Jobs Sandboxes.
|
1942
|
+
|
1943
|
+
Delete bulk jobs sandbox mapping.
|
1944
|
+
|
1945
|
+
:param body: Required.
|
1946
|
+
:type body: IO[bytes]
|
1947
|
+
:keyword content_type: Body Parameter content-type. Content type parameter for binary body.
|
1948
|
+
Default value is "application/json".
|
1949
|
+
:paramtype content_type: str
|
1950
|
+
:return: None
|
1951
|
+
:rtype: None
|
1952
|
+
:raises ~azure.core.exceptions.HttpResponseError:
|
1953
|
+
"""
|
1954
|
+
|
1955
|
+
@distributed_trace
|
1956
|
+
def unassign_bulk_jobs_sandboxes( # pylint: disable=inconsistent-return-statements
|
1957
|
+
self, body: Union[_models.BodyJobsUnassignBulkJobsSandboxes, IO[bytes]], **kwargs: Any
|
1958
|
+
) -> None:
|
1959
|
+
"""Unassign Bulk Jobs Sandboxes.
|
1960
|
+
|
1961
|
+
Delete bulk jobs sandbox mapping.
|
1962
|
+
|
1963
|
+
:param body: Is either a BodyJobsUnassignBulkJobsSandboxes type or a IO[bytes] type. Required.
|
1964
|
+
:type body: ~_generated.models.BodyJobsUnassignBulkJobsSandboxes or IO[bytes]
|
1965
|
+
:return: None
|
1966
|
+
:rtype: None
|
2177
1967
|
:raises ~azure.core.exceptions.HttpResponseError:
|
2178
1968
|
"""
|
2179
1969
|
error_map: MutableMapping = {
|
@@ -2184,39 +1974,42 @@ class JobsOperations:
|
|
2184
1974
|
}
|
2185
1975
|
error_map.update(kwargs.pop("error_map", {}) or {})
|
2186
1976
|
|
2187
|
-
_headers = kwargs.pop("headers", {}) or {}
|
1977
|
+
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
|
2188
1978
|
_params = kwargs.pop("params", {}) or {}
|
2189
1979
|
|
2190
|
-
|
1980
|
+
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
|
1981
|
+
cls: ClsType[None] = kwargs.pop("cls", None)
|
1982
|
+
|
1983
|
+
content_type = content_type or "application/json"
|
1984
|
+
_json = None
|
1985
|
+
_content = None
|
1986
|
+
if isinstance(body, (IOBase, bytes)):
|
1987
|
+
_content = body
|
1988
|
+
else:
|
1989
|
+
_json = self._serialize.body(body, "BodyJobsUnassignBulkJobsSandboxes")
|
2191
1990
|
|
2192
|
-
_request =
|
2193
|
-
|
1991
|
+
_request = build_jobs_unassign_bulk_jobs_sandboxes_request(
|
1992
|
+
content_type=content_type,
|
1993
|
+
json=_json,
|
1994
|
+
content=_content,
|
2194
1995
|
headers=_headers,
|
2195
1996
|
params=_params,
|
2196
1997
|
)
|
2197
1998
|
_request.url = self._client.format_url(_request.url)
|
2198
1999
|
|
2199
2000
|
_stream = False
|
2200
|
-
pipeline_response: PipelineResponse = (
|
2201
|
-
|
2202
|
-
_request, stream=_stream, **kwargs
|
2203
|
-
)
|
2001
|
+
pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
|
2002
|
+
_request, stream=_stream, **kwargs
|
2204
2003
|
)
|
2205
2004
|
|
2206
2005
|
response = pipeline_response.http_response
|
2207
2006
|
|
2208
|
-
if response.status_code not in [
|
2209
|
-
map_error(
|
2210
|
-
status_code=response.status_code, response=response, error_map=error_map
|
2211
|
-
)
|
2007
|
+
if response.status_code not in [204]:
|
2008
|
+
map_error(status_code=response.status_code, response=response, error_map=error_map)
|
2212
2009
|
raise HttpResponseError(response=response)
|
2213
2010
|
|
2214
|
-
deserialized = self._deserialize("object", pipeline_response.http_response)
|
2215
|
-
|
2216
2011
|
if cls:
|
2217
|
-
return cls(pipeline_response,
|
2218
|
-
|
2219
|
-
return deserialized # type: ignore
|
2012
|
+
return cls(pipeline_response, None, {}) # type: ignore
|
2220
2013
|
|
2221
2014
|
@overload
|
2222
2015
|
def set_job_statuses(
|
@@ -2225,11 +2018,19 @@ class JobsOperations:
|
|
2225
2018
|
*,
|
2226
2019
|
force: bool = False,
|
2227
2020
|
content_type: str = "application/json",
|
2228
|
-
**kwargs: Any
|
2021
|
+
**kwargs: Any
|
2229
2022
|
) -> _models.SetJobStatusReturn:
|
2230
2023
|
"""Set Job Statuses.
|
2231
2024
|
|
2232
|
-
Set
|
2025
|
+
Set the status of a job or a list of jobs.
|
2026
|
+
|
2027
|
+
Body parameters:
|
2028
|
+
|
2029
|
+
|
2030
|
+
* ``Status``\\ : The new status of the job.
|
2031
|
+
* ``MinorStatus``\\ : The minor status of the job.
|
2032
|
+
* ``ApplicationStatus``\\ : The application-specific status of the job.
|
2033
|
+
* ``Source``\\ : The source of the status update (default is "Unknown").
|
2233
2034
|
|
2234
2035
|
:param body: Required.
|
2235
2036
|
:type body: dict[str, dict[str, ~_generated.models.JobStatusUpdate]]
|
@@ -2245,16 +2046,19 @@ class JobsOperations:
|
|
2245
2046
|
|
2246
2047
|
@overload
|
2247
2048
|
def set_job_statuses(
|
2248
|
-
self,
|
2249
|
-
body: IO[bytes],
|
2250
|
-
*,
|
2251
|
-
force: bool = False,
|
2252
|
-
content_type: str = "application/json",
|
2253
|
-
**kwargs: Any,
|
2049
|
+
self, body: IO[bytes], *, force: bool = False, content_type: str = "application/json", **kwargs: Any
|
2254
2050
|
) -> _models.SetJobStatusReturn:
|
2255
2051
|
"""Set Job Statuses.
|
2256
2052
|
|
2257
|
-
Set
|
2053
|
+
Set the status of a job or a list of jobs.
|
2054
|
+
|
2055
|
+
Body parameters:
|
2056
|
+
|
2057
|
+
|
2058
|
+
* ``Status``\\ : The new status of the job.
|
2059
|
+
* ``MinorStatus``\\ : The minor status of the job.
|
2060
|
+
* ``ApplicationStatus``\\ : The application-specific status of the job.
|
2061
|
+
* ``Source``\\ : The source of the status update (default is "Unknown").
|
2258
2062
|
|
2259
2063
|
:param body: Required.
|
2260
2064
|
:type body: IO[bytes]
|
@@ -2274,11 +2078,19 @@ class JobsOperations:
|
|
2274
2078
|
body: Union[Dict[str, Dict[str, _models.JobStatusUpdate]], IO[bytes]],
|
2275
2079
|
*,
|
2276
2080
|
force: bool = False,
|
2277
|
-
**kwargs: Any
|
2081
|
+
**kwargs: Any
|
2278
2082
|
) -> _models.SetJobStatusReturn:
|
2279
2083
|
"""Set Job Statuses.
|
2280
2084
|
|
2281
|
-
Set
|
2085
|
+
Set the status of a job or a list of jobs.
|
2086
|
+
|
2087
|
+
Body parameters:
|
2088
|
+
|
2089
|
+
|
2090
|
+
* ``Status``\\ : The new status of the job.
|
2091
|
+
* ``MinorStatus``\\ : The minor status of the job.
|
2092
|
+
* ``ApplicationStatus``\\ : The application-specific status of the job.
|
2093
|
+
* ``Source``\\ : The source of the status update (default is "Unknown").
|
2282
2094
|
|
2283
2095
|
:param body: Is either a {str: {str: JobStatusUpdate}} type or a IO[bytes] type. Required.
|
2284
2096
|
:type body: dict[str, dict[str, ~_generated.models.JobStatusUpdate]] or IO[bytes]
|
@@ -2299,9 +2111,7 @@ class JobsOperations:
|
|
2299
2111
|
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
|
2300
2112
|
_params = kwargs.pop("params", {}) or {}
|
2301
2113
|
|
2302
|
-
content_type: Optional[str] = kwargs.pop(
|
2303
|
-
"content_type", _headers.pop("Content-Type", None)
|
2304
|
-
)
|
2114
|
+
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
|
2305
2115
|
cls: ClsType[_models.SetJobStatusReturn] = kwargs.pop("cls", None)
|
2306
2116
|
|
2307
2117
|
content_type = content_type or "application/json"
|
@@ -2323,23 +2133,17 @@ class JobsOperations:
|
|
2323
2133
|
_request.url = self._client.format_url(_request.url)
|
2324
2134
|
|
2325
2135
|
_stream = False
|
2326
|
-
pipeline_response: PipelineResponse = (
|
2327
|
-
|
2328
|
-
_request, stream=_stream, **kwargs
|
2329
|
-
)
|
2136
|
+
pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
|
2137
|
+
_request, stream=_stream, **kwargs
|
2330
2138
|
)
|
2331
2139
|
|
2332
2140
|
response = pipeline_response.http_response
|
2333
2141
|
|
2334
2142
|
if response.status_code not in [200]:
|
2335
|
-
map_error(
|
2336
|
-
status_code=response.status_code, response=response, error_map=error_map
|
2337
|
-
)
|
2143
|
+
map_error(status_code=response.status_code, response=response, error_map=error_map)
|
2338
2144
|
raise HttpResponseError(response=response)
|
2339
2145
|
|
2340
|
-
deserialized = self._deserialize(
|
2341
|
-
"SetJobStatusReturn", pipeline_response.http_response
|
2342
|
-
)
|
2146
|
+
deserialized = self._deserialize("SetJobStatusReturn", pipeline_response.http_response)
|
2343
2147
|
|
2344
2148
|
if cls:
|
2345
2149
|
return cls(pipeline_response, deserialized, {}) # type: ignore
|
@@ -2348,11 +2152,7 @@ class JobsOperations:
|
|
2348
2152
|
|
2349
2153
|
@overload
|
2350
2154
|
def add_heartbeat(
|
2351
|
-
self,
|
2352
|
-
body: Dict[str, _models.HeartbeatData],
|
2353
|
-
*,
|
2354
|
-
content_type: str = "application/json",
|
2355
|
-
**kwargs: Any,
|
2155
|
+
self, body: Dict[str, _models.HeartbeatData], *, content_type: str = "application/json", **kwargs: Any
|
2356
2156
|
) -> List[_models.JobCommand]:
|
2357
2157
|
"""Add Heartbeat.
|
2358
2158
|
|
@@ -2429,9 +2229,7 @@ class JobsOperations:
|
|
2429
2229
|
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
|
2430
2230
|
_params = kwargs.pop("params", {}) or {}
|
2431
2231
|
|
2432
|
-
content_type: Optional[str] = kwargs.pop(
|
2433
|
-
"content_type", _headers.pop("Content-Type", None)
|
2434
|
-
)
|
2232
|
+
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
|
2435
2233
|
cls: ClsType[List[_models.JobCommand]] = kwargs.pop("cls", None)
|
2436
2234
|
|
2437
2235
|
content_type = content_type or "application/json"
|
@@ -2452,39 +2250,96 @@ class JobsOperations:
|
|
2452
2250
|
_request.url = self._client.format_url(_request.url)
|
2453
2251
|
|
2454
2252
|
_stream = False
|
2455
|
-
pipeline_response: PipelineResponse = (
|
2456
|
-
|
2457
|
-
_request, stream=_stream, **kwargs
|
2458
|
-
)
|
2253
|
+
pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
|
2254
|
+
_request, stream=_stream, **kwargs
|
2459
2255
|
)
|
2460
2256
|
|
2461
2257
|
response = pipeline_response.http_response
|
2462
2258
|
|
2463
2259
|
if response.status_code not in [200]:
|
2464
|
-
map_error(
|
2465
|
-
status_code=response.status_code, response=response, error_map=error_map
|
2466
|
-
)
|
2260
|
+
map_error(status_code=response.status_code, response=response, error_map=error_map)
|
2467
2261
|
raise HttpResponseError(response=response)
|
2468
2262
|
|
2469
|
-
deserialized = self._deserialize(
|
2470
|
-
"[JobCommand]", pipeline_response.http_response
|
2471
|
-
)
|
2263
|
+
deserialized = self._deserialize("[JobCommand]", pipeline_response.http_response)
|
2472
2264
|
|
2473
2265
|
if cls:
|
2474
2266
|
return cls(pipeline_response, deserialized, {}) # type: ignore
|
2475
2267
|
|
2476
2268
|
return deserialized # type: ignore
|
2477
2269
|
|
2270
|
+
@overload
|
2271
|
+
def reschedule_jobs(
|
2272
|
+
self,
|
2273
|
+
body: _models.BodyJobsRescheduleJobs,
|
2274
|
+
*,
|
2275
|
+
reset_jobs: bool = False,
|
2276
|
+
content_type: str = "application/json",
|
2277
|
+
**kwargs: Any
|
2278
|
+
) -> Dict[str, Any]:
|
2279
|
+
"""Reschedule Jobs.
|
2280
|
+
|
2281
|
+
Reschedule a list of killed or failed jobs.
|
2282
|
+
|
2283
|
+
Body parameters:
|
2284
|
+
|
2285
|
+
|
2286
|
+
* ``job_ids``\\ : List of job IDs to reschedule.
|
2287
|
+
* ``reset_jobs``\\ : If True, reset the count of reschedules for the jobs.
|
2288
|
+
|
2289
|
+
:param body: Required.
|
2290
|
+
:type body: ~_generated.models.BodyJobsRescheduleJobs
|
2291
|
+
:keyword reset_jobs: Default value is False.
|
2292
|
+
:paramtype reset_jobs: bool
|
2293
|
+
:keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
|
2294
|
+
Default value is "application/json".
|
2295
|
+
:paramtype content_type: str
|
2296
|
+
:return: dict mapping str to any
|
2297
|
+
:rtype: dict[str, any]
|
2298
|
+
:raises ~azure.core.exceptions.HttpResponseError:
|
2299
|
+
"""
|
2300
|
+
|
2301
|
+
@overload
|
2302
|
+
def reschedule_jobs(
|
2303
|
+
self, body: IO[bytes], *, reset_jobs: bool = False, content_type: str = "application/json", **kwargs: Any
|
2304
|
+
) -> Dict[str, Any]:
|
2305
|
+
"""Reschedule Jobs.
|
2306
|
+
|
2307
|
+
Reschedule a list of killed or failed jobs.
|
2308
|
+
|
2309
|
+
Body parameters:
|
2310
|
+
|
2311
|
+
|
2312
|
+
* ``job_ids``\\ : List of job IDs to reschedule.
|
2313
|
+
* ``reset_jobs``\\ : If True, reset the count of reschedules for the jobs.
|
2314
|
+
|
2315
|
+
:param body: Required.
|
2316
|
+
:type body: IO[bytes]
|
2317
|
+
:keyword reset_jobs: Default value is False.
|
2318
|
+
:paramtype reset_jobs: bool
|
2319
|
+
:keyword content_type: Body Parameter content-type. Content type parameter for binary body.
|
2320
|
+
Default value is "application/json".
|
2321
|
+
:paramtype content_type: str
|
2322
|
+
:return: dict mapping str to any
|
2323
|
+
:rtype: dict[str, any]
|
2324
|
+
:raises ~azure.core.exceptions.HttpResponseError:
|
2325
|
+
"""
|
2326
|
+
|
2478
2327
|
@distributed_trace
|
2479
2328
|
def reschedule_jobs(
|
2480
|
-
self,
|
2329
|
+
self, body: Union[_models.BodyJobsRescheduleJobs, IO[bytes]], *, reset_jobs: bool = False, **kwargs: Any
|
2481
2330
|
) -> Dict[str, Any]:
|
2482
2331
|
"""Reschedule Jobs.
|
2483
2332
|
|
2484
|
-
Reschedule
|
2333
|
+
Reschedule a list of killed or failed jobs.
|
2334
|
+
|
2335
|
+
Body parameters:
|
2336
|
+
|
2485
2337
|
|
2486
|
-
|
2487
|
-
|
2338
|
+
* ``job_ids``\\ : List of job IDs to reschedule.
|
2339
|
+
* ``reset_jobs``\\ : If True, reset the count of reschedules for the jobs.
|
2340
|
+
|
2341
|
+
:param body: Is either a BodyJobsRescheduleJobs type or a IO[bytes] type. Required.
|
2342
|
+
:type body: ~_generated.models.BodyJobsRescheduleJobs or IO[bytes]
|
2488
2343
|
:keyword reset_jobs: Default value is False.
|
2489
2344
|
:paramtype reset_jobs: bool
|
2490
2345
|
:return: dict mapping str to any
|
@@ -2499,32 +2354,39 @@ class JobsOperations:
|
|
2499
2354
|
}
|
2500
2355
|
error_map.update(kwargs.pop("error_map", {}) or {})
|
2501
2356
|
|
2502
|
-
_headers = kwargs.pop("headers", {}) or {}
|
2357
|
+
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
|
2503
2358
|
_params = kwargs.pop("params", {}) or {}
|
2504
2359
|
|
2360
|
+
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
|
2505
2361
|
cls: ClsType[Dict[str, Any]] = kwargs.pop("cls", None)
|
2506
2362
|
|
2363
|
+
content_type = content_type or "application/json"
|
2364
|
+
_json = None
|
2365
|
+
_content = None
|
2366
|
+
if isinstance(body, (IOBase, bytes)):
|
2367
|
+
_content = body
|
2368
|
+
else:
|
2369
|
+
_json = self._serialize.body(body, "BodyJobsRescheduleJobs")
|
2370
|
+
|
2507
2371
|
_request = build_jobs_reschedule_jobs_request(
|
2508
|
-
job_ids=job_ids,
|
2509
2372
|
reset_jobs=reset_jobs,
|
2373
|
+
content_type=content_type,
|
2374
|
+
json=_json,
|
2375
|
+
content=_content,
|
2510
2376
|
headers=_headers,
|
2511
2377
|
params=_params,
|
2512
2378
|
)
|
2513
2379
|
_request.url = self._client.format_url(_request.url)
|
2514
2380
|
|
2515
2381
|
_stream = False
|
2516
|
-
pipeline_response: PipelineResponse = (
|
2517
|
-
|
2518
|
-
_request, stream=_stream, **kwargs
|
2519
|
-
)
|
2382
|
+
pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
|
2383
|
+
_request, stream=_stream, **kwargs
|
2520
2384
|
)
|
2521
2385
|
|
2522
2386
|
response = pipeline_response.http_response
|
2523
2387
|
|
2524
2388
|
if response.status_code not in [200]:
|
2525
|
-
map_error(
|
2526
|
-
status_code=response.status_code, response=response, error_map=error_map
|
2527
|
-
)
|
2389
|
+
map_error(status_code=response.status_code, response=response, error_map=error_map)
|
2528
2390
|
raise HttpResponseError(response=response)
|
2529
2391
|
|
2530
2392
|
deserialized = self._deserialize("{object}", pipeline_response.http_response)
|
@@ -2536,18 +2398,15 @@ class JobsOperations:
|
|
2536
2398
|
|
2537
2399
|
@overload
|
2538
2400
|
def patch_metadata(
|
2539
|
-
self,
|
2540
|
-
body: Dict[str, Dict[str, Any]],
|
2541
|
-
*,
|
2542
|
-
content_type: str = "application/json",
|
2543
|
-
**kwargs: Any,
|
2401
|
+
self, body: Dict[str, _models.JobMetaData], *, content_type: str = "application/json", **kwargs: Any
|
2544
2402
|
) -> None:
|
2545
2403
|
"""Patch Metadata.
|
2546
2404
|
|
2547
|
-
|
2405
|
+
Update job metadata such as UserPriority, HeartBeatTime, JobType, etc.
|
2406
|
+
The argument are all the attributes/parameters of a job (except the ID).
|
2548
2407
|
|
2549
2408
|
:param body: Required.
|
2550
|
-
:type body: dict[str,
|
2409
|
+
:type body: dict[str, ~_generated.models.JobMetaData]
|
2551
2410
|
:keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
|
2552
2411
|
Default value is "application/json".
|
2553
2412
|
:paramtype content_type: str
|
@@ -2557,12 +2416,11 @@ class JobsOperations:
|
|
2557
2416
|
"""
|
2558
2417
|
|
2559
2418
|
@overload
|
2560
|
-
def patch_metadata(
|
2561
|
-
self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any
|
2562
|
-
) -> None:
|
2419
|
+
def patch_metadata(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None:
|
2563
2420
|
"""Patch Metadata.
|
2564
2421
|
|
2565
|
-
|
2422
|
+
Update job metadata such as UserPriority, HeartBeatTime, JobType, etc.
|
2423
|
+
The argument are all the attributes/parameters of a job (except the ID).
|
2566
2424
|
|
2567
2425
|
:param body: Required.
|
2568
2426
|
:type body: IO[bytes]
|
@@ -2576,14 +2434,15 @@ class JobsOperations:
|
|
2576
2434
|
|
2577
2435
|
@distributed_trace
|
2578
2436
|
def patch_metadata( # pylint: disable=inconsistent-return-statements
|
2579
|
-
self, body: Union[Dict[str,
|
2437
|
+
self, body: Union[Dict[str, _models.JobMetaData], IO[bytes]], **kwargs: Any
|
2580
2438
|
) -> None:
|
2581
2439
|
"""Patch Metadata.
|
2582
2440
|
|
2583
|
-
|
2441
|
+
Update job metadata such as UserPriority, HeartBeatTime, JobType, etc.
|
2442
|
+
The argument are all the attributes/parameters of a job (except the ID).
|
2584
2443
|
|
2585
|
-
:param body: Is either a {str:
|
2586
|
-
:type body: dict[str,
|
2444
|
+
:param body: Is either a {str: JobMetaData} type or a IO[bytes] type. Required.
|
2445
|
+
:type body: dict[str, ~_generated.models.JobMetaData] or IO[bytes]
|
2587
2446
|
:return: None
|
2588
2447
|
:rtype: None
|
2589
2448
|
:raises ~azure.core.exceptions.HttpResponseError:
|
@@ -2599,9 +2458,7 @@ class JobsOperations:
|
|
2599
2458
|
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
|
2600
2459
|
_params = kwargs.pop("params", {}) or {}
|
2601
2460
|
|
2602
|
-
content_type: Optional[str] = kwargs.pop(
|
2603
|
-
"content_type", _headers.pop("Content-Type", None)
|
2604
|
-
)
|
2461
|
+
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
|
2605
2462
|
cls: ClsType[None] = kwargs.pop("cls", None)
|
2606
2463
|
|
2607
2464
|
content_type = content_type or "application/json"
|
@@ -2610,7 +2467,7 @@ class JobsOperations:
|
|
2610
2467
|
if isinstance(body, (IOBase, bytes)):
|
2611
2468
|
_content = body
|
2612
2469
|
else:
|
2613
|
-
_json = self._serialize.body(body, "{
|
2470
|
+
_json = self._serialize.body(body, "{JobMetaData}")
|
2614
2471
|
|
2615
2472
|
_request = build_jobs_patch_metadata_request(
|
2616
2473
|
content_type=content_type,
|
@@ -2622,18 +2479,14 @@ class JobsOperations:
|
|
2622
2479
|
_request.url = self._client.format_url(_request.url)
|
2623
2480
|
|
2624
2481
|
_stream = False
|
2625
|
-
pipeline_response: PipelineResponse = (
|
2626
|
-
|
2627
|
-
_request, stream=_stream, **kwargs
|
2628
|
-
)
|
2482
|
+
pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
|
2483
|
+
_request, stream=_stream, **kwargs
|
2629
2484
|
)
|
2630
2485
|
|
2631
2486
|
response = pipeline_response.http_response
|
2632
2487
|
|
2633
2488
|
if response.status_code not in [204]:
|
2634
|
-
map_error(
|
2635
|
-
status_code=response.status_code, response=response, error_map=error_map
|
2636
|
-
)
|
2489
|
+
map_error(status_code=response.status_code, response=response, error_map=error_map)
|
2637
2490
|
raise HttpResponseError(response=response)
|
2638
2491
|
|
2639
2492
|
if cls:
|
@@ -2642,21 +2495,30 @@ class JobsOperations:
|
|
2642
2495
|
@overload
|
2643
2496
|
def search(
|
2644
2497
|
self,
|
2645
|
-
body: Optional[_models.
|
2498
|
+
body: Optional[_models.SearchParams] = None,
|
2646
2499
|
*,
|
2647
2500
|
page: int = 1,
|
2648
2501
|
per_page: int = 100,
|
2649
2502
|
content_type: str = "application/json",
|
2650
|
-
**kwargs: Any
|
2503
|
+
**kwargs: Any
|
2651
2504
|
) -> List[Dict[str, Any]]:
|
2652
2505
|
"""Search.
|
2653
2506
|
|
2654
|
-
|
2507
|
+
Creates a search query to the job database. This search can be based on
|
2508
|
+
different parameters, such as jobID, status, owner, etc.
|
2509
|
+
|
2510
|
+
**Possibilities**
|
2511
|
+
|
2512
|
+
|
2513
|
+
* Use ``search`` to filter jobs based on various parameters (optional).
|
2514
|
+
* Use ``parameters`` to specify which job parameters to return (optional).
|
2515
|
+
* Use ``sort`` to order the results based on specific parameters (optional).
|
2655
2516
|
|
2656
|
-
|
2517
|
+
By default, the search will return all jobs the user has access to, and all the fields
|
2518
|
+
of the job will be returned.
|
2657
2519
|
|
2658
2520
|
:param body: Default value is None.
|
2659
|
-
:type body: ~_generated.models.
|
2521
|
+
:type body: ~_generated.models.SearchParams
|
2660
2522
|
:keyword page: Default value is 1.
|
2661
2523
|
:paramtype page: int
|
2662
2524
|
:keyword per_page: Default value is 100.
|
@@ -2677,13 +2539,22 @@ class JobsOperations:
|
|
2677
2539
|
page: int = 1,
|
2678
2540
|
per_page: int = 100,
|
2679
2541
|
content_type: str = "application/json",
|
2680
|
-
**kwargs: Any
|
2542
|
+
**kwargs: Any
|
2681
2543
|
) -> List[Dict[str, Any]]:
|
2682
2544
|
"""Search.
|
2683
2545
|
|
2684
|
-
|
2546
|
+
Creates a search query to the job database. This search can be based on
|
2547
|
+
different parameters, such as jobID, status, owner, etc.
|
2685
2548
|
|
2686
|
-
**
|
2549
|
+
**Possibilities**
|
2550
|
+
|
2551
|
+
|
2552
|
+
* Use ``search`` to filter jobs based on various parameters (optional).
|
2553
|
+
* Use ``parameters`` to specify which job parameters to return (optional).
|
2554
|
+
* Use ``sort`` to order the results based on specific parameters (optional).
|
2555
|
+
|
2556
|
+
By default, the search will return all jobs the user has access to, and all the fields
|
2557
|
+
of the job will be returned.
|
2687
2558
|
|
2688
2559
|
:param body: Default value is None.
|
2689
2560
|
:type body: IO[bytes]
|
@@ -2702,20 +2573,29 @@ class JobsOperations:
|
|
2702
2573
|
@distributed_trace
|
2703
2574
|
def search(
|
2704
2575
|
self,
|
2705
|
-
body: Optional[Union[_models.
|
2576
|
+
body: Optional[Union[_models.SearchParams, IO[bytes]]] = None,
|
2706
2577
|
*,
|
2707
2578
|
page: int = 1,
|
2708
2579
|
per_page: int = 100,
|
2709
|
-
**kwargs: Any
|
2580
|
+
**kwargs: Any
|
2710
2581
|
) -> List[Dict[str, Any]]:
|
2711
2582
|
"""Search.
|
2712
2583
|
|
2713
|
-
|
2584
|
+
Creates a search query to the job database. This search can be based on
|
2585
|
+
different parameters, such as jobID, status, owner, etc.
|
2586
|
+
|
2587
|
+
**Possibilities**
|
2588
|
+
|
2714
2589
|
|
2715
|
-
|
2590
|
+
* Use ``search`` to filter jobs based on various parameters (optional).
|
2591
|
+
* Use ``parameters`` to specify which job parameters to return (optional).
|
2592
|
+
* Use ``sort`` to order the results based on specific parameters (optional).
|
2716
2593
|
|
2717
|
-
|
2718
|
-
|
2594
|
+
By default, the search will return all jobs the user has access to, and all the fields
|
2595
|
+
of the job will be returned.
|
2596
|
+
|
2597
|
+
:param body: Is either a SearchParams type or a IO[bytes] type. Default value is None.
|
2598
|
+
:type body: ~_generated.models.SearchParams or IO[bytes]
|
2719
2599
|
:keyword page: Default value is 1.
|
2720
2600
|
:paramtype page: int
|
2721
2601
|
:keyword per_page: Default value is 100.
|
@@ -2735,9 +2615,7 @@ class JobsOperations:
|
|
2735
2615
|
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
|
2736
2616
|
_params = kwargs.pop("params", {}) or {}
|
2737
2617
|
|
2738
|
-
content_type: Optional[str] = kwargs.pop(
|
2739
|
-
"content_type", _headers.pop("Content-Type", None)
|
2740
|
-
)
|
2618
|
+
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
|
2741
2619
|
cls: ClsType[List[Dict[str, Any]]] = kwargs.pop("cls", None)
|
2742
2620
|
|
2743
2621
|
content_type = content_type or "application/json"
|
@@ -2747,7 +2625,7 @@ class JobsOperations:
|
|
2747
2625
|
_content = body
|
2748
2626
|
else:
|
2749
2627
|
if body is not None:
|
2750
|
-
_json = self._serialize.body(body, "
|
2628
|
+
_json = self._serialize.body(body, "SearchParams")
|
2751
2629
|
else:
|
2752
2630
|
_json = None
|
2753
2631
|
|
@@ -2763,25 +2641,19 @@ class JobsOperations:
|
|
2763
2641
|
_request.url = self._client.format_url(_request.url)
|
2764
2642
|
|
2765
2643
|
_stream = False
|
2766
|
-
pipeline_response: PipelineResponse = (
|
2767
|
-
|
2768
|
-
_request, stream=_stream, **kwargs
|
2769
|
-
)
|
2644
|
+
pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
|
2645
|
+
_request, stream=_stream, **kwargs
|
2770
2646
|
)
|
2771
2647
|
|
2772
2648
|
response = pipeline_response.http_response
|
2773
2649
|
|
2774
2650
|
if response.status_code not in [200, 206]:
|
2775
|
-
map_error(
|
2776
|
-
status_code=response.status_code, response=response, error_map=error_map
|
2777
|
-
)
|
2651
|
+
map_error(status_code=response.status_code, response=response, error_map=error_map)
|
2778
2652
|
raise HttpResponseError(response=response)
|
2779
2653
|
|
2780
2654
|
response_headers = {}
|
2781
2655
|
if response.status_code == 206:
|
2782
|
-
response_headers["Content-Range"] = self._deserialize(
|
2783
|
-
"str", response.headers.get("Content-Range")
|
2784
|
-
)
|
2656
|
+
response_headers["Content-Range"] = self._deserialize("str", response.headers.get("Content-Range"))
|
2785
2657
|
|
2786
2658
|
deserialized = self._deserialize("[{object}]", pipeline_response.http_response)
|
2787
2659
|
|
@@ -2791,19 +2663,21 @@ class JobsOperations:
|
|
2791
2663
|
return deserialized # type: ignore
|
2792
2664
|
|
2793
2665
|
@overload
|
2794
|
-
def summary(
|
2795
|
-
self,
|
2796
|
-
body: _models.JobSummaryParams,
|
2797
|
-
*,
|
2798
|
-
content_type: str = "application/json",
|
2799
|
-
**kwargs: Any,
|
2800
|
-
) -> Any:
|
2666
|
+
def summary(self, body: _models.SummaryParams, *, content_type: str = "application/json", **kwargs: Any) -> Any:
|
2801
2667
|
"""Summary.
|
2802
2668
|
|
2803
|
-
|
2669
|
+
Group jobs by a specific list of parameters. Returns an array of n-uplets, where each n-uplet
|
2670
|
+
contains the
|
2671
|
+
values of the grouping parameters and the number of jobs that match those values.
|
2672
|
+
|
2673
|
+
Body parameters:
|
2674
|
+
|
2675
|
+
|
2676
|
+
* ``grouping``\\ : List of parameters to group the jobs by.
|
2677
|
+
* ``search``\\ : List of search parameters to filter the jobs by (optional).
|
2804
2678
|
|
2805
2679
|
:param body: Required.
|
2806
|
-
:type body: ~_generated.models.
|
2680
|
+
:type body: ~_generated.models.SummaryParams
|
2807
2681
|
:keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
|
2808
2682
|
Default value is "application/json".
|
2809
2683
|
:paramtype content_type: str
|
@@ -2813,12 +2687,18 @@ class JobsOperations:
|
|
2813
2687
|
"""
|
2814
2688
|
|
2815
2689
|
@overload
|
2816
|
-
def summary(
|
2817
|
-
self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any
|
2818
|
-
) -> Any:
|
2690
|
+
def summary(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> Any:
|
2819
2691
|
"""Summary.
|
2820
2692
|
|
2821
|
-
|
2693
|
+
Group jobs by a specific list of parameters. Returns an array of n-uplets, where each n-uplet
|
2694
|
+
contains the
|
2695
|
+
values of the grouping parameters and the number of jobs that match those values.
|
2696
|
+
|
2697
|
+
Body parameters:
|
2698
|
+
|
2699
|
+
|
2700
|
+
* ``grouping``\\ : List of parameters to group the jobs by.
|
2701
|
+
* ``search``\\ : List of search parameters to filter the jobs by (optional).
|
2822
2702
|
|
2823
2703
|
:param body: Required.
|
2824
2704
|
:type body: IO[bytes]
|
@@ -2831,15 +2711,21 @@ class JobsOperations:
|
|
2831
2711
|
"""
|
2832
2712
|
|
2833
2713
|
@distributed_trace
|
2834
|
-
def summary(
|
2835
|
-
self, body: Union[_models.JobSummaryParams, IO[bytes]], **kwargs: Any
|
2836
|
-
) -> Any:
|
2714
|
+
def summary(self, body: Union[_models.SummaryParams, IO[bytes]], **kwargs: Any) -> Any:
|
2837
2715
|
"""Summary.
|
2838
2716
|
|
2839
|
-
|
2717
|
+
Group jobs by a specific list of parameters. Returns an array of n-uplets, where each n-uplet
|
2718
|
+
contains the
|
2719
|
+
values of the grouping parameters and the number of jobs that match those values.
|
2720
|
+
|
2721
|
+
Body parameters:
|
2722
|
+
|
2723
|
+
|
2724
|
+
* ``grouping``\\ : List of parameters to group the jobs by.
|
2725
|
+
* ``search``\\ : List of search parameters to filter the jobs by (optional).
|
2840
2726
|
|
2841
|
-
:param body: Is either a
|
2842
|
-
:type body: ~_generated.models.
|
2727
|
+
:param body: Is either a SummaryParams type or a IO[bytes] type. Required.
|
2728
|
+
:type body: ~_generated.models.SummaryParams or IO[bytes]
|
2843
2729
|
:return: any
|
2844
2730
|
:rtype: any
|
2845
2731
|
:raises ~azure.core.exceptions.HttpResponseError:
|
@@ -2855,9 +2741,7 @@ class JobsOperations:
|
|
2855
2741
|
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
|
2856
2742
|
_params = kwargs.pop("params", {}) or {}
|
2857
2743
|
|
2858
|
-
content_type: Optional[str] = kwargs.pop(
|
2859
|
-
"content_type", _headers.pop("Content-Type", None)
|
2860
|
-
)
|
2744
|
+
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
|
2861
2745
|
cls: ClsType[Any] = kwargs.pop("cls", None)
|
2862
2746
|
|
2863
2747
|
content_type = content_type or "application/json"
|
@@ -2866,7 +2750,7 @@ class JobsOperations:
|
|
2866
2750
|
if isinstance(body, (IOBase, bytes)):
|
2867
2751
|
_content = body
|
2868
2752
|
else:
|
2869
|
-
_json = self._serialize.body(body, "
|
2753
|
+
_json = self._serialize.body(body, "SummaryParams")
|
2870
2754
|
|
2871
2755
|
_request = build_jobs_summary_request(
|
2872
2756
|
content_type=content_type,
|
@@ -2878,18 +2762,14 @@ class JobsOperations:
|
|
2878
2762
|
_request.url = self._client.format_url(_request.url)
|
2879
2763
|
|
2880
2764
|
_stream = False
|
2881
|
-
pipeline_response: PipelineResponse = (
|
2882
|
-
|
2883
|
-
_request, stream=_stream, **kwargs
|
2884
|
-
)
|
2765
|
+
pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
|
2766
|
+
_request, stream=_stream, **kwargs
|
2885
2767
|
)
|
2886
2768
|
|
2887
2769
|
response = pipeline_response.http_response
|
2888
2770
|
|
2889
2771
|
if response.status_code not in [200]:
|
2890
|
-
map_error(
|
2891
|
-
status_code=response.status_code, response=response, error_map=error_map
|
2892
|
-
)
|
2772
|
+
map_error(status_code=response.status_code, response=response, error_map=error_map)
|
2893
2773
|
raise HttpResponseError(response=response)
|
2894
2774
|
|
2895
2775
|
deserialized = self._deserialize("object", pipeline_response.http_response)
|
@@ -2936,9 +2816,7 @@ class JobsOperations:
|
|
2936
2816
|
"""
|
2937
2817
|
|
2938
2818
|
@distributed_trace
|
2939
|
-
def submit_jdl_jobs(
|
2940
|
-
self, body: Union[List[str], IO[bytes]], **kwargs: Any
|
2941
|
-
) -> List[_models.InsertedJob]:
|
2819
|
+
def submit_jdl_jobs(self, body: Union[List[str], IO[bytes]], **kwargs: Any) -> List[_models.InsertedJob]:
|
2942
2820
|
"""Submit Jdl Jobs.
|
2943
2821
|
|
2944
2822
|
Submit a list of jobs in JDL format.
|
@@ -2960,9 +2838,7 @@ class JobsOperations:
|
|
2960
2838
|
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
|
2961
2839
|
_params = kwargs.pop("params", {}) or {}
|
2962
2840
|
|
2963
|
-
content_type: Optional[str] = kwargs.pop(
|
2964
|
-
"content_type", _headers.pop("Content-Type", None)
|
2965
|
-
)
|
2841
|
+
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
|
2966
2842
|
cls: ClsType[List[_models.InsertedJob]] = kwargs.pop("cls", None)
|
2967
2843
|
|
2968
2844
|
content_type = content_type or "application/json"
|
@@ -2983,23 +2859,17 @@ class JobsOperations:
|
|
2983
2859
|
_request.url = self._client.format_url(_request.url)
|
2984
2860
|
|
2985
2861
|
_stream = False
|
2986
|
-
pipeline_response: PipelineResponse = (
|
2987
|
-
|
2988
|
-
_request, stream=_stream, **kwargs
|
2989
|
-
)
|
2862
|
+
pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
|
2863
|
+
_request, stream=_stream, **kwargs
|
2990
2864
|
)
|
2991
2865
|
|
2992
2866
|
response = pipeline_response.http_response
|
2993
2867
|
|
2994
2868
|
if response.status_code not in [200]:
|
2995
|
-
map_error(
|
2996
|
-
status_code=response.status_code, response=response, error_map=error_map
|
2997
|
-
)
|
2869
|
+
map_error(status_code=response.status_code, response=response, error_map=error_map)
|
2998
2870
|
raise HttpResponseError(response=response)
|
2999
2871
|
|
3000
|
-
deserialized = self._deserialize(
|
3001
|
-
"[InsertedJob]", pipeline_response.http_response
|
3002
|
-
)
|
2872
|
+
deserialized = self._deserialize("[InsertedJob]", pipeline_response.http_response)
|
3003
2873
|
|
3004
2874
|
if cls:
|
3005
2875
|
return cls(pipeline_response, deserialized, {}) # type: ignore
|