diracx-client 0.0.1a46__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/aio/operations/_operations.py +255 -112
- diracx/client/_generated/models/__init__.py +16 -8
- diracx/client/_generated/models/_enums.py +3 -0
- diracx/client/_generated/models/_models.py +396 -77
- diracx/client/_generated/operations/_operations.py +265 -143
- diracx/client/patches/jobs/common.py +1 -1
- {diracx_client-0.0.1a46.dist-info → diracx_client-0.0.1a47.dist-info}/METADATA +1 -1
- {diracx_client-0.0.1a46.dist-info → diracx_client-0.0.1a47.dist-info}/RECORD +9 -9
- {diracx_client-0.0.1a46.dist-info → diracx_client-0.0.1a47.dist-info}/WHEEL +0 -0
@@ -355,26 +355,6 @@ def build_jobs_get_sandbox_file_request(*, pfn: str, **kwargs: Any) -> HttpReque
|
|
355
355
|
return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs)
|
356
356
|
|
357
357
|
|
358
|
-
def build_jobs_unassign_bulk_jobs_sandboxes_request( # pylint: disable=name-too-long
|
359
|
-
*, jobs_ids: List[int], **kwargs: Any
|
360
|
-
) -> HttpRequest:
|
361
|
-
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
|
362
|
-
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
|
363
|
-
|
364
|
-
accept = _headers.pop("Accept", "application/json")
|
365
|
-
|
366
|
-
# Construct URL
|
367
|
-
_url = "/api/jobs/sandbox"
|
368
|
-
|
369
|
-
# Construct parameters
|
370
|
-
_params["jobs_ids"] = _SERIALIZER.query("jobs_ids", jobs_ids, "[int]")
|
371
|
-
|
372
|
-
# Construct headers
|
373
|
-
_headers["Accept"] = _SERIALIZER.header("accept", accept, "str")
|
374
|
-
|
375
|
-
return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs)
|
376
|
-
|
377
|
-
|
378
358
|
def build_jobs_get_job_sandboxes_request(job_id: int, **kwargs: Any) -> HttpRequest:
|
379
359
|
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
|
380
360
|
|
@@ -459,22 +439,18 @@ def build_jobs_assign_sandbox_to_job_request(job_id: int, *, content: str, **kwa
|
|
459
439
|
return HttpRequest(method="PATCH", url=_url, headers=_headers, content=content, **kwargs)
|
460
440
|
|
461
441
|
|
462
|
-
def
|
442
|
+
def build_jobs_unassign_bulk_jobs_sandboxes_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long
|
463
443
|
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
|
464
|
-
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
|
465
|
-
|
466
|
-
accept = _headers.pop("Accept", "application/json")
|
467
444
|
|
445
|
+
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
|
468
446
|
# Construct URL
|
469
|
-
_url = "/api/jobs/"
|
470
|
-
|
471
|
-
# Construct parameters
|
472
|
-
_params["job_ids"] = _SERIALIZER.query("job_ids", job_ids, "[int]")
|
447
|
+
_url = "/api/jobs/sandbox/unassign"
|
473
448
|
|
474
449
|
# Construct headers
|
475
|
-
|
450
|
+
if content_type is not None:
|
451
|
+
_headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str")
|
476
452
|
|
477
|
-
return HttpRequest(method="
|
453
|
+
return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs)
|
478
454
|
|
479
455
|
|
480
456
|
def build_jobs_set_job_statuses_request(*, force: bool = False, **kwargs: Any) -> HttpRequest:
|
@@ -516,21 +492,23 @@ def build_jobs_add_heartbeat_request(**kwargs: Any) -> HttpRequest:
|
|
516
492
|
return HttpRequest(method="PATCH", url=_url, headers=_headers, **kwargs)
|
517
493
|
|
518
494
|
|
519
|
-
def build_jobs_reschedule_jobs_request(*,
|
495
|
+
def build_jobs_reschedule_jobs_request(*, reset_jobs: bool = False, **kwargs: Any) -> HttpRequest:
|
520
496
|
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
|
521
497
|
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
|
522
498
|
|
499
|
+
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
|
523
500
|
accept = _headers.pop("Accept", "application/json")
|
524
501
|
|
525
502
|
# Construct URL
|
526
503
|
_url = "/api/jobs/reschedule"
|
527
504
|
|
528
505
|
# Construct parameters
|
529
|
-
_params["job_ids"] = _SERIALIZER.query("job_ids", job_ids, "[int]")
|
530
506
|
if reset_jobs is not None:
|
531
507
|
_params["reset_jobs"] = _SERIALIZER.query("reset_jobs", reset_jobs, "bool")
|
532
508
|
|
533
509
|
# Construct headers
|
510
|
+
if content_type is not None:
|
511
|
+
_headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str")
|
534
512
|
_headers["Accept"] = _SERIALIZER.header("accept", accept, "str")
|
535
513
|
|
536
514
|
return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs)
|
@@ -1728,56 +1706,6 @@ class JobsOperations:
|
|
1728
1706
|
|
1729
1707
|
return deserialized # type: ignore
|
1730
1708
|
|
1731
|
-
@distributed_trace
|
1732
|
-
def unassign_bulk_jobs_sandboxes(self, *, jobs_ids: List[int], **kwargs: Any) -> Any:
|
1733
|
-
"""Unassign Bulk Jobs Sandboxes.
|
1734
|
-
|
1735
|
-
Delete bulk jobs sandbox mapping.
|
1736
|
-
|
1737
|
-
:keyword jobs_ids: Required.
|
1738
|
-
:paramtype jobs_ids: list[int]
|
1739
|
-
:return: any
|
1740
|
-
:rtype: any
|
1741
|
-
:raises ~azure.core.exceptions.HttpResponseError:
|
1742
|
-
"""
|
1743
|
-
error_map: MutableMapping = {
|
1744
|
-
401: ClientAuthenticationError,
|
1745
|
-
404: ResourceNotFoundError,
|
1746
|
-
409: ResourceExistsError,
|
1747
|
-
304: ResourceNotModifiedError,
|
1748
|
-
}
|
1749
|
-
error_map.update(kwargs.pop("error_map", {}) or {})
|
1750
|
-
|
1751
|
-
_headers = kwargs.pop("headers", {}) or {}
|
1752
|
-
_params = kwargs.pop("params", {}) or {}
|
1753
|
-
|
1754
|
-
cls: ClsType[Any] = kwargs.pop("cls", None)
|
1755
|
-
|
1756
|
-
_request = build_jobs_unassign_bulk_jobs_sandboxes_request(
|
1757
|
-
jobs_ids=jobs_ids,
|
1758
|
-
headers=_headers,
|
1759
|
-
params=_params,
|
1760
|
-
)
|
1761
|
-
_request.url = self._client.format_url(_request.url)
|
1762
|
-
|
1763
|
-
_stream = False
|
1764
|
-
pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
|
1765
|
-
_request, stream=_stream, **kwargs
|
1766
|
-
)
|
1767
|
-
|
1768
|
-
response = pipeline_response.http_response
|
1769
|
-
|
1770
|
-
if response.status_code not in [200]:
|
1771
|
-
map_error(status_code=response.status_code, response=response, error_map=error_map)
|
1772
|
-
raise HttpResponseError(response=response)
|
1773
|
-
|
1774
|
-
deserialized = self._deserialize("object", pipeline_response.http_response)
|
1775
|
-
|
1776
|
-
if cls:
|
1777
|
-
return cls(pipeline_response, deserialized, {}) # type: ignore
|
1778
|
-
|
1779
|
-
return deserialized # type: ignore
|
1780
|
-
|
1781
1709
|
@distributed_trace
|
1782
1710
|
def get_job_sandboxes(self, job_id: int, **kwargs: Any) -> Dict[str, List[Any]]:
|
1783
1711
|
"""Get Job Sandboxes.
|
@@ -1988,21 +1916,54 @@ class JobsOperations:
|
|
1988
1916
|
|
1989
1917
|
return deserialized # type: ignore
|
1990
1918
|
|
1991
|
-
@
|
1992
|
-
def
|
1993
|
-
""
|
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.
|
1924
|
+
|
1925
|
+
Delete bulk jobs sandbox mapping.
|
1926
|
+
|
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
|
+
"""
|
1994
1936
|
|
1995
|
-
|
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.
|
1996
1942
|
|
1997
|
-
|
1998
|
-
and the JobCleaningAgent. However, once this agent is ported to diracx, this endpoint should
|
1999
|
-
be removed, and a status change to Deleted (PATCH /jobs/status) should be used instead for any
|
2000
|
-
other purpose.
|
1943
|
+
Delete bulk jobs sandbox mapping.
|
2001
1944
|
|
2002
|
-
:
|
2003
|
-
:
|
2004
|
-
:
|
2005
|
-
|
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
|
2006
1967
|
:raises ~azure.core.exceptions.HttpResponseError:
|
2007
1968
|
"""
|
2008
1969
|
error_map: MutableMapping = {
|
@@ -2013,13 +1974,24 @@ class JobsOperations:
|
|
2013
1974
|
}
|
2014
1975
|
error_map.update(kwargs.pop("error_map", {}) or {})
|
2015
1976
|
|
2016
|
-
_headers = kwargs.pop("headers", {}) or {}
|
1977
|
+
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
|
2017
1978
|
_params = kwargs.pop("params", {}) or {}
|
2018
1979
|
|
2019
|
-
|
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")
|
2020
1990
|
|
2021
|
-
_request =
|
2022
|
-
|
1991
|
+
_request = build_jobs_unassign_bulk_jobs_sandboxes_request(
|
1992
|
+
content_type=content_type,
|
1993
|
+
json=_json,
|
1994
|
+
content=_content,
|
2023
1995
|
headers=_headers,
|
2024
1996
|
params=_params,
|
2025
1997
|
)
|
@@ -2032,16 +2004,12 @@ class JobsOperations:
|
|
2032
2004
|
|
2033
2005
|
response = pipeline_response.http_response
|
2034
2006
|
|
2035
|
-
if response.status_code not in [
|
2007
|
+
if response.status_code not in [204]:
|
2036
2008
|
map_error(status_code=response.status_code, response=response, error_map=error_map)
|
2037
2009
|
raise HttpResponseError(response=response)
|
2038
2010
|
|
2039
|
-
deserialized = self._deserialize("object", pipeline_response.http_response)
|
2040
|
-
|
2041
2011
|
if cls:
|
2042
|
-
return cls(pipeline_response,
|
2043
|
-
|
2044
|
-
return deserialized # type: ignore
|
2012
|
+
return cls(pipeline_response, None, {}) # type: ignore
|
2045
2013
|
|
2046
2014
|
@overload
|
2047
2015
|
def set_job_statuses(
|
@@ -2054,7 +2022,15 @@ class JobsOperations:
|
|
2054
2022
|
) -> _models.SetJobStatusReturn:
|
2055
2023
|
"""Set Job Statuses.
|
2056
2024
|
|
2057
|
-
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").
|
2058
2034
|
|
2059
2035
|
:param body: Required.
|
2060
2036
|
:type body: dict[str, dict[str, ~_generated.models.JobStatusUpdate]]
|
@@ -2074,7 +2050,15 @@ class JobsOperations:
|
|
2074
2050
|
) -> _models.SetJobStatusReturn:
|
2075
2051
|
"""Set Job Statuses.
|
2076
2052
|
|
2077
|
-
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").
|
2078
2062
|
|
2079
2063
|
:param body: Required.
|
2080
2064
|
:type body: IO[bytes]
|
@@ -2098,7 +2082,15 @@ class JobsOperations:
|
|
2098
2082
|
) -> _models.SetJobStatusReturn:
|
2099
2083
|
"""Set Job Statuses.
|
2100
2084
|
|
2101
|
-
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").
|
2102
2094
|
|
2103
2095
|
:param body: Is either a {str: {str: JobStatusUpdate}} type or a IO[bytes] type. Required.
|
2104
2096
|
:type body: dict[str, dict[str, ~_generated.models.JobStatusUpdate]] or IO[bytes]
|
@@ -2275,14 +2267,79 @@ class JobsOperations:
|
|
2275
2267
|
|
2276
2268
|
return deserialized # type: ignore
|
2277
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
|
+
|
2278
2327
|
@distributed_trace
|
2279
|
-
def reschedule_jobs(
|
2328
|
+
def reschedule_jobs(
|
2329
|
+
self, body: Union[_models.BodyJobsRescheduleJobs, IO[bytes]], *, reset_jobs: bool = False, **kwargs: Any
|
2330
|
+
) -> Dict[str, Any]:
|
2280
2331
|
"""Reschedule Jobs.
|
2281
2332
|
|
2282
|
-
Reschedule
|
2333
|
+
Reschedule a list of killed or failed jobs.
|
2283
2334
|
|
2284
|
-
|
2285
|
-
|
2335
|
+
Body parameters:
|
2336
|
+
|
2337
|
+
|
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]
|
2286
2343
|
:keyword reset_jobs: Default value is False.
|
2287
2344
|
:paramtype reset_jobs: bool
|
2288
2345
|
:return: dict mapping str to any
|
@@ -2297,14 +2354,25 @@ class JobsOperations:
|
|
2297
2354
|
}
|
2298
2355
|
error_map.update(kwargs.pop("error_map", {}) or {})
|
2299
2356
|
|
2300
|
-
_headers = kwargs.pop("headers", {}) or {}
|
2357
|
+
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
|
2301
2358
|
_params = kwargs.pop("params", {}) or {}
|
2302
2359
|
|
2360
|
+
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
|
2303
2361
|
cls: ClsType[Dict[str, Any]] = kwargs.pop("cls", None)
|
2304
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
|
+
|
2305
2371
|
_request = build_jobs_reschedule_jobs_request(
|
2306
|
-
job_ids=job_ids,
|
2307
2372
|
reset_jobs=reset_jobs,
|
2373
|
+
content_type=content_type,
|
2374
|
+
json=_json,
|
2375
|
+
content=_content,
|
2308
2376
|
headers=_headers,
|
2309
2377
|
params=_params,
|
2310
2378
|
)
|
@@ -2330,14 +2398,15 @@ class JobsOperations:
|
|
2330
2398
|
|
2331
2399
|
@overload
|
2332
2400
|
def patch_metadata(
|
2333
|
-
self, body: Dict[str,
|
2401
|
+
self, body: Dict[str, _models.JobMetaData], *, content_type: str = "application/json", **kwargs: Any
|
2334
2402
|
) -> None:
|
2335
2403
|
"""Patch Metadata.
|
2336
2404
|
|
2337
|
-
|
2405
|
+
Update job metadata such as UserPriority, HeartBeatTime, JobType, etc.
|
2406
|
+
The argument are all the attributes/parameters of a job (except the ID).
|
2338
2407
|
|
2339
2408
|
:param body: Required.
|
2340
|
-
:type body: dict[str,
|
2409
|
+
:type body: dict[str, ~_generated.models.JobMetaData]
|
2341
2410
|
:keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
|
2342
2411
|
Default value is "application/json".
|
2343
2412
|
:paramtype content_type: str
|
@@ -2350,7 +2419,8 @@ class JobsOperations:
|
|
2350
2419
|
def patch_metadata(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None:
|
2351
2420
|
"""Patch Metadata.
|
2352
2421
|
|
2353
|
-
|
2422
|
+
Update job metadata such as UserPriority, HeartBeatTime, JobType, etc.
|
2423
|
+
The argument are all the attributes/parameters of a job (except the ID).
|
2354
2424
|
|
2355
2425
|
:param body: Required.
|
2356
2426
|
:type body: IO[bytes]
|
@@ -2364,14 +2434,15 @@ class JobsOperations:
|
|
2364
2434
|
|
2365
2435
|
@distributed_trace
|
2366
2436
|
def patch_metadata( # pylint: disable=inconsistent-return-statements
|
2367
|
-
self, body: Union[Dict[str,
|
2437
|
+
self, body: Union[Dict[str, _models.JobMetaData], IO[bytes]], **kwargs: Any
|
2368
2438
|
) -> None:
|
2369
2439
|
"""Patch Metadata.
|
2370
2440
|
|
2371
|
-
|
2441
|
+
Update job metadata such as UserPriority, HeartBeatTime, JobType, etc.
|
2442
|
+
The argument are all the attributes/parameters of a job (except the ID).
|
2372
2443
|
|
2373
|
-
:param body: Is either a {str:
|
2374
|
-
: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]
|
2375
2446
|
:return: None
|
2376
2447
|
:rtype: None
|
2377
2448
|
:raises ~azure.core.exceptions.HttpResponseError:
|
@@ -2396,7 +2467,7 @@ class JobsOperations:
|
|
2396
2467
|
if isinstance(body, (IOBase, bytes)):
|
2397
2468
|
_content = body
|
2398
2469
|
else:
|
2399
|
-
_json = self._serialize.body(body, "{
|
2470
|
+
_json = self._serialize.body(body, "{JobMetaData}")
|
2400
2471
|
|
2401
2472
|
_request = build_jobs_patch_metadata_request(
|
2402
2473
|
content_type=content_type,
|
@@ -2424,7 +2495,7 @@ class JobsOperations:
|
|
2424
2495
|
@overload
|
2425
2496
|
def search(
|
2426
2497
|
self,
|
2427
|
-
body: Optional[_models.
|
2498
|
+
body: Optional[_models.SearchParams] = None,
|
2428
2499
|
*,
|
2429
2500
|
page: int = 1,
|
2430
2501
|
per_page: int = 100,
|
@@ -2433,12 +2504,21 @@ class JobsOperations:
|
|
2433
2504
|
) -> List[Dict[str, Any]]:
|
2434
2505
|
"""Search.
|
2435
2506
|
|
2436
|
-
|
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
|
+
|
2437
2512
|
|
2438
|
-
|
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).
|
2516
|
+
|
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.
|
2439
2519
|
|
2440
2520
|
:param body: Default value is None.
|
2441
|
-
:type body: ~_generated.models.
|
2521
|
+
:type body: ~_generated.models.SearchParams
|
2442
2522
|
:keyword page: Default value is 1.
|
2443
2523
|
:paramtype page: int
|
2444
2524
|
:keyword per_page: Default value is 100.
|
@@ -2463,9 +2543,18 @@ class JobsOperations:
|
|
2463
2543
|
) -> List[Dict[str, Any]]:
|
2464
2544
|
"""Search.
|
2465
2545
|
|
2466
|
-
|
2546
|
+
Creates a search query to the job database. This search can be based on
|
2547
|
+
different parameters, such as jobID, status, owner, etc.
|
2548
|
+
|
2549
|
+
**Possibilities**
|
2550
|
+
|
2467
2551
|
|
2468
|
-
|
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.
|
2469
2558
|
|
2470
2559
|
:param body: Default value is None.
|
2471
2560
|
:type body: IO[bytes]
|
@@ -2484,7 +2573,7 @@ class JobsOperations:
|
|
2484
2573
|
@distributed_trace
|
2485
2574
|
def search(
|
2486
2575
|
self,
|
2487
|
-
body: Optional[Union[_models.
|
2576
|
+
body: Optional[Union[_models.SearchParams, IO[bytes]]] = None,
|
2488
2577
|
*,
|
2489
2578
|
page: int = 1,
|
2490
2579
|
per_page: int = 100,
|
@@ -2492,12 +2581,21 @@ class JobsOperations:
|
|
2492
2581
|
) -> List[Dict[str, Any]]:
|
2493
2582
|
"""Search.
|
2494
2583
|
|
2495
|
-
|
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
|
+
|
2589
|
+
|
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).
|
2496
2593
|
|
2497
|
-
|
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.
|
2498
2596
|
|
2499
|
-
:param body: Is either a
|
2500
|
-
:type body: ~_generated.models.
|
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]
|
2501
2599
|
:keyword page: Default value is 1.
|
2502
2600
|
:paramtype page: int
|
2503
2601
|
:keyword per_page: Default value is 100.
|
@@ -2527,7 +2625,7 @@ class JobsOperations:
|
|
2527
2625
|
_content = body
|
2528
2626
|
else:
|
2529
2627
|
if body is not None:
|
2530
|
-
_json = self._serialize.body(body, "
|
2628
|
+
_json = self._serialize.body(body, "SearchParams")
|
2531
2629
|
else:
|
2532
2630
|
_json = None
|
2533
2631
|
|
@@ -2565,13 +2663,21 @@ class JobsOperations:
|
|
2565
2663
|
return deserialized # type: ignore
|
2566
2664
|
|
2567
2665
|
@overload
|
2568
|
-
def summary(self, body: _models.
|
2666
|
+
def summary(self, body: _models.SummaryParams, *, content_type: str = "application/json", **kwargs: Any) -> Any:
|
2569
2667
|
"""Summary.
|
2570
2668
|
|
2571
|
-
|
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).
|
2572
2678
|
|
2573
2679
|
:param body: Required.
|
2574
|
-
:type body: ~_generated.models.
|
2680
|
+
:type body: ~_generated.models.SummaryParams
|
2575
2681
|
:keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
|
2576
2682
|
Default value is "application/json".
|
2577
2683
|
:paramtype content_type: str
|
@@ -2584,7 +2690,15 @@ class JobsOperations:
|
|
2584
2690
|
def summary(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> Any:
|
2585
2691
|
"""Summary.
|
2586
2692
|
|
2587
|
-
|
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).
|
2588
2702
|
|
2589
2703
|
:param body: Required.
|
2590
2704
|
:type body: IO[bytes]
|
@@ -2597,13 +2711,21 @@ class JobsOperations:
|
|
2597
2711
|
"""
|
2598
2712
|
|
2599
2713
|
@distributed_trace
|
2600
|
-
def summary(self, body: Union[_models.
|
2714
|
+
def summary(self, body: Union[_models.SummaryParams, IO[bytes]], **kwargs: Any) -> Any:
|
2601
2715
|
"""Summary.
|
2602
2716
|
|
2603
|
-
|
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).
|
2604
2726
|
|
2605
|
-
:param body: Is either a
|
2606
|
-
: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]
|
2607
2729
|
:return: any
|
2608
2730
|
:rtype: any
|
2609
2731
|
:raises ~azure.core.exceptions.HttpResponseError:
|
@@ -2628,7 +2750,7 @@ class JobsOperations:
|
|
2628
2750
|
if isinstance(body, (IOBase, bytes)):
|
2629
2751
|
_content = body
|
2630
2752
|
else:
|
2631
|
-
_json = self._serialize.body(body, "
|
2753
|
+
_json = self._serialize.body(body, "SummaryParams")
|
2632
2754
|
|
2633
2755
|
_request = build_jobs_summary_request(
|
2634
2756
|
content_type=content_type,
|
@@ -59,7 +59,7 @@ def make_search_body(**kwargs: Unpack[SearchKwargs]) -> UnderlyingSearchArgs:
|
|
59
59
|
|
60
60
|
class SummaryBody(TypedDict, total=False):
|
61
61
|
grouping: list[str]
|
62
|
-
search: list[
|
62
|
+
search: list[SearchSpec]
|
63
63
|
|
64
64
|
|
65
65
|
class SummaryKwargs(SummaryBody, ResponseExtra): ...
|