@@ -1186,13 +1186,13 @@ async def get_sandbox_file(self, *, pfn: str, **kwargs: Any) -> _models.SandboxD
1186
1186
return deserialized # type: ignore
1187
1187
1188
1188
@distributed_trace_async
1189
- async def unassign_bulk_jobs_sandboxes (self , * , jobs_ids : List [int ], ** kwargs : Any ) -> Any :
1189
+ async def unassign_bulk_jobs_sandboxes (self , * , job_ids : List [int ], ** kwargs : Any ) -> Any :
1190
1190
"""Unassign Bulk Jobs Sandboxes.
1191
1191
1192
1192
Delete bulk jobs sandbox mapping.
1193
1193
1194
- :keyword jobs_ids : Required.
1195
- :paramtype jobs_ids : list[int]
1194
+ :keyword job_ids : Required.
1195
+ :paramtype job_ids : list[int]
1196
1196
:return: any
1197
1197
:rtype: any
1198
1198
:raises ~azure.core.exceptions.HttpResponseError:
@@ -1211,7 +1211,7 @@ async def unassign_bulk_jobs_sandboxes(self, *, jobs_ids: List[int], **kwargs: A
1211
1211
cls : ClsType [Any ] = kwargs .pop ("cls" , None )
1212
1212
1213
1213
_request = build_jobs_unassign_bulk_jobs_sandboxes_request (
1214
- jobs_ids = jobs_ids ,
1214
+ job_ids = job_ids ,
1215
1215
headers = _headers ,
1216
1216
params = _params ,
1217
1217
)
@@ -1458,7 +1458,15 @@ async def set_job_statuses(
1458
1458
) -> _models .SetJobStatusReturn :
1459
1459
"""Set Job Statuses.
1460
1460
1461
- Set Job Statuses.
1461
+ Set the status of a job or a list of jobs.
1462
+
1463
+ Body parameters:
1464
+
1465
+
1466
+ * ``Status``\\ : The new status of the job.
1467
+ * ``MinorStatus``\\ : The minor status of the job.
1468
+ * ``ApplicationStatus``\\ : The application-specific status of the job.
1469
+ * ``Source``\\ : The source of the status update (default is "Unknown").
1462
1470
1463
1471
:param body: Required.
1464
1472
:type body: dict[str, dict[str, ~_generated.models.JobStatusUpdate]]
@@ -1478,7 +1486,15 @@ async def set_job_statuses(
1478
1486
) -> _models .SetJobStatusReturn :
1479
1487
"""Set Job Statuses.
1480
1488
1481
- Set Job Statuses.
1489
+ Set the status of a job or a list of jobs.
1490
+
1491
+ Body parameters:
1492
+
1493
+
1494
+ * ``Status``\\ : The new status of the job.
1495
+ * ``MinorStatus``\\ : The minor status of the job.
1496
+ * ``ApplicationStatus``\\ : The application-specific status of the job.
1497
+ * ``Source``\\ : The source of the status update (default is "Unknown").
1482
1498
1483
1499
:param body: Required.
1484
1500
:type body: IO[bytes]
@@ -1502,7 +1518,15 @@ async def set_job_statuses(
1502
1518
) -> _models .SetJobStatusReturn :
1503
1519
"""Set Job Statuses.
1504
1520
1505
- Set Job Statuses.
1521
+ Set the status of a job or a list of jobs.
1522
+
1523
+ Body parameters:
1524
+
1525
+
1526
+ * ``Status``\\ : The new status of the job.
1527
+ * ``MinorStatus``\\ : The minor status of the job.
1528
+ * ``ApplicationStatus``\\ : The application-specific status of the job.
1529
+ * ``Source``\\ : The source of the status update (default is "Unknown").
1506
1530
1507
1531
:param body: Is either a {str: {str: JobStatusUpdate}} type or a IO[bytes] type. Required.
1508
1532
:type body: dict[str, dict[str, ~_generated.models.JobStatusUpdate]] or IO[bytes]
@@ -1679,14 +1703,79 @@ async def add_heartbeat(
1679
1703
1680
1704
return deserialized # type: ignore
1681
1705
1706
+ @overload
1707
+ async def reschedule_jobs (
1708
+ self ,
1709
+ body : _models .BodyJobsRescheduleJobs ,
1710
+ * ,
1711
+ reset_jobs : bool = False ,
1712
+ content_type : str = "application/json" ,
1713
+ ** kwargs : Any
1714
+ ) -> Dict [str , Any ]:
1715
+ """Reschedule Jobs.
1716
+
1717
+ Reschedule a list of killed or failed jobs.
1718
+
1719
+ Body parameters:
1720
+
1721
+
1722
+ * ``job_ids``\\ : List of job IDs to reschedule.
1723
+ * ``reset_jobs``\\ : If True, reset the count of reschedules for the jobs.
1724
+
1725
+ :param body: Required.
1726
+ :type body: ~_generated.models.BodyJobsRescheduleJobs
1727
+ :keyword reset_jobs: Default value is False.
1728
+ :paramtype reset_jobs: bool
1729
+ :keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
1730
+ Default value is "application/json".
1731
+ :paramtype content_type: str
1732
+ :return: dict mapping str to any
1733
+ :rtype: dict[str, any]
1734
+ :raises ~azure.core.exceptions.HttpResponseError:
1735
+ """
1736
+
1737
+ @overload
1738
+ async def reschedule_jobs (
1739
+ self , body : IO [bytes ], * , reset_jobs : bool = False , content_type : str = "application/json" , ** kwargs : Any
1740
+ ) -> Dict [str , Any ]:
1741
+ """Reschedule Jobs.
1742
+
1743
+ Reschedule a list of killed or failed jobs.
1744
+
1745
+ Body parameters:
1746
+
1747
+
1748
+ * ``job_ids``\\ : List of job IDs to reschedule.
1749
+ * ``reset_jobs``\\ : If True, reset the count of reschedules for the jobs.
1750
+
1751
+ :param body: Required.
1752
+ :type body: IO[bytes]
1753
+ :keyword reset_jobs: Default value is False.
1754
+ :paramtype reset_jobs: bool
1755
+ :keyword content_type: Body Parameter content-type. Content type parameter for binary body.
1756
+ Default value is "application/json".
1757
+ :paramtype content_type: str
1758
+ :return: dict mapping str to any
1759
+ :rtype: dict[str, any]
1760
+ :raises ~azure.core.exceptions.HttpResponseError:
1761
+ """
1762
+
1682
1763
@distributed_trace_async
1683
- async def reschedule_jobs (self , * , job_ids : List [int ], reset_jobs : bool = False , ** kwargs : Any ) -> Dict [str , Any ]:
1764
+ async def reschedule_jobs (
1765
+ self , body : Union [_models .BodyJobsRescheduleJobs , IO [bytes ]], * , reset_jobs : bool = False , ** kwargs : Any
1766
+ ) -> Dict [str , Any ]:
1684
1767
"""Reschedule Jobs.
1685
1768
1686
- Reschedule Jobs .
1769
+ Reschedule a list of killed or failed jobs .
1687
1770
1688
- :keyword job_ids: Required.
1689
- :paramtype job_ids: list[int]
1771
+ Body parameters:
1772
+
1773
+
1774
+ * ``job_ids``\\ : List of job IDs to reschedule.
1775
+ * ``reset_jobs``\\ : If True, reset the count of reschedules for the jobs.
1776
+
1777
+ :param body: Is either a BodyJobsRescheduleJobs type or a IO[bytes] type. Required.
1778
+ :type body: ~_generated.models.BodyJobsRescheduleJobs or IO[bytes]
1690
1779
:keyword reset_jobs: Default value is False.
1691
1780
:paramtype reset_jobs: bool
1692
1781
:return: dict mapping str to any
@@ -1701,14 +1790,25 @@ async def reschedule_jobs(self, *, job_ids: List[int], reset_jobs: bool = False,
1701
1790
}
1702
1791
error_map .update (kwargs .pop ("error_map" , {}) or {})
1703
1792
1704
- _headers = kwargs .pop ("headers" , {}) or {}
1793
+ _headers = case_insensitive_dict ( kwargs .pop ("headers" , {}) or {})
1705
1794
_params = kwargs .pop ("params" , {}) or {}
1706
1795
1796
+ content_type : Optional [str ] = kwargs .pop ("content_type" , _headers .pop ("Content-Type" , None ))
1707
1797
cls : ClsType [Dict [str , Any ]] = kwargs .pop ("cls" , None )
1708
1798
1799
+ content_type = content_type or "application/json"
1800
+ _json = None
1801
+ _content = None
1802
+ if isinstance (body , (IOBase , bytes )):
1803
+ _content = body
1804
+ else :
1805
+ _json = self ._serialize .body (body , "BodyJobsRescheduleJobs" )
1806
+
1709
1807
_request = build_jobs_reschedule_jobs_request (
1710
- job_ids = job_ids ,
1711
1808
reset_jobs = reset_jobs ,
1809
+ content_type = content_type ,
1810
+ json = _json ,
1811
+ content = _content ,
1712
1812
headers = _headers ,
1713
1813
params = _params ,
1714
1814
)
@@ -1734,14 +1834,15 @@ async def reschedule_jobs(self, *, job_ids: List[int], reset_jobs: bool = False,
1734
1834
1735
1835
@overload
1736
1836
async def patch_metadata (
1737
- self , body : Dict [str , Dict [ str , Any ] ], * , content_type : str = "application/json" , ** kwargs : Any
1837
+ self , body : Dict [str , _models . JobMetaData ], * , content_type : str = "application/json" , ** kwargs : Any
1738
1838
) -> None :
1739
1839
"""Patch Metadata.
1740
1840
1741
- Patch Metadata.
1841
+ Update job metadata such as UserPriority, HeartBeatTime, JobType, etc.
1842
+ The argument are all the attributes/parameters of a job (except the ID).
1742
1843
1743
1844
:param body: Required.
1744
- :type body: dict[str, dict[str, any] ]
1845
+ :type body: dict[str, ~_generated.models.JobMetaData ]
1745
1846
:keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
1746
1847
Default value is "application/json".
1747
1848
:paramtype content_type: str
@@ -1754,7 +1855,8 @@ async def patch_metadata(
1754
1855
async def patch_metadata (self , body : IO [bytes ], * , content_type : str = "application/json" , ** kwargs : Any ) -> None :
1755
1856
"""Patch Metadata.
1756
1857
1757
- Patch Metadata.
1858
+ Update job metadata such as UserPriority, HeartBeatTime, JobType, etc.
1859
+ The argument are all the attributes/parameters of a job (except the ID).
1758
1860
1759
1861
:param body: Required.
1760
1862
:type body: IO[bytes]
@@ -1767,13 +1869,14 @@ async def patch_metadata(self, body: IO[bytes], *, content_type: str = "applicat
1767
1869
"""
1768
1870
1769
1871
@distributed_trace_async
1770
- async def patch_metadata (self , body : Union [Dict [str , Dict [ str , Any ] ], IO [bytes ]], ** kwargs : Any ) -> None :
1872
+ async def patch_metadata (self , body : Union [Dict [str , _models . JobMetaData ], IO [bytes ]], ** kwargs : Any ) -> None :
1771
1873
"""Patch Metadata.
1772
1874
1773
- Patch Metadata.
1875
+ Update job metadata such as UserPriority, HeartBeatTime, JobType, etc.
1876
+ The argument are all the attributes/parameters of a job (except the ID).
1774
1877
1775
- :param body: Is either a {str: {str: Any} } type or a IO[bytes] type. Required.
1776
- :type body: dict[str, dict[str, any] ] or IO[bytes]
1878
+ :param body: Is either a {str: JobMetaData } type or a IO[bytes] type. Required.
1879
+ :type body: dict[str, ~_generated.models.JobMetaData ] or IO[bytes]
1777
1880
:return: None
1778
1881
:rtype: None
1779
1882
:raises ~azure.core.exceptions.HttpResponseError:
@@ -1798,7 +1901,7 @@ async def patch_metadata(self, body: Union[Dict[str, Dict[str, Any]], IO[bytes]]
1798
1901
if isinstance (body , (IOBase , bytes )):
1799
1902
_content = body
1800
1903
else :
1801
- _json = self ._serialize .body (body , "{{object} }" )
1904
+ _json = self ._serialize .body (body , "{JobMetaData }" )
1802
1905
1803
1906
_request = build_jobs_patch_metadata_request (
1804
1907
content_type = content_type ,
@@ -1835,9 +1938,18 @@ async def search(
1835
1938
) -> List [Dict [str , Any ]]:
1836
1939
"""Search.
1837
1940
1838
- Retrieve information about jobs.
1941
+ Creates a search query to the job database. This search can be based on
1942
+ different parameters, such as job ID, status, owner, etc.
1943
+
1944
+ **Possibilities**
1945
+
1839
1946
1840
- **TODO: Add more docs**.
1947
+ * Use ``search`` to filter jobs based on various parameters (optional).
1948
+ * Use ``parameters`` to specify which job parameters to return (optional).
1949
+ * Use ``sort`` to order the results based on specific parameters (optional).
1950
+
1951
+ By default, the search will return all jobs the user has access to, and all the fields
1952
+ of the job will be returned.
1841
1953
1842
1954
:param body: Default value is None.
1843
1955
:type body: ~_generated.models.JobSearchParams
@@ -1865,9 +1977,18 @@ async def search(
1865
1977
) -> List [Dict [str , Any ]]:
1866
1978
"""Search.
1867
1979
1868
- Retrieve information about jobs.
1980
+ Creates a search query to the job database. This search can be based on
1981
+ different parameters, such as job ID, status, owner, etc.
1982
+
1983
+ **Possibilities**
1984
+
1869
1985
1870
- **TODO: Add more docs**.
1986
+ * Use ``search`` to filter jobs based on various parameters (optional).
1987
+ * Use ``parameters`` to specify which job parameters to return (optional).
1988
+ * Use ``sort`` to order the results based on specific parameters (optional).
1989
+
1990
+ By default, the search will return all jobs the user has access to, and all the fields
1991
+ of the job will be returned.
1871
1992
1872
1993
:param body: Default value is None.
1873
1994
:type body: IO[bytes]
@@ -1894,9 +2015,18 @@ async def search(
1894
2015
) -> List [Dict [str , Any ]]:
1895
2016
"""Search.
1896
2017
1897
- Retrieve information about jobs.
2018
+ Creates a search query to the job database. This search can be based on
2019
+ different parameters, such as job ID, status, owner, etc.
2020
+
2021
+ **Possibilities**
1898
2022
1899
- **TODO: Add more docs**.
2023
+
2024
+ * Use ``search`` to filter jobs based on various parameters (optional).
2025
+ * Use ``parameters`` to specify which job parameters to return (optional).
2026
+ * Use ``sort`` to order the results based on specific parameters (optional).
2027
+
2028
+ By default, the search will return all jobs the user has access to, and all the fields
2029
+ of the job will be returned.
1900
2030
1901
2031
:param body: Is either a JobSearchParams type or a IO[bytes] type. Default value is None.
1902
2032
:type body: ~_generated.models.JobSearchParams or IO[bytes]
@@ -1972,7 +2102,15 @@ async def summary(
1972
2102
) -> Any :
1973
2103
"""Summary.
1974
2104
1975
- Show information suitable for plotting.
2105
+ Group jobs by a specific list of parameters. Returns an array of n-uplets, where each n-uplet
2106
+ contains the
2107
+ values of the grouping parameters and the number of jobs that match those values.
2108
+
2109
+ Body parameters:
2110
+
2111
+
2112
+ * ``grouping``\\ : List of parameters to group the jobs by.
2113
+ * ``search``\\ : List of search parameters to filter the jobs by (optional).
1976
2114
1977
2115
:param body: Required.
1978
2116
:type body: ~_generated.models.JobSummaryParams
@@ -1988,7 +2126,15 @@ async def summary(
1988
2126
async def summary (self , body : IO [bytes ], * , content_type : str = "application/json" , ** kwargs : Any ) -> Any :
1989
2127
"""Summary.
1990
2128
1991
- Show information suitable for plotting.
2129
+ Group jobs by a specific list of parameters. Returns an array of n-uplets, where each n-uplet
2130
+ contains the
2131
+ values of the grouping parameters and the number of jobs that match those values.
2132
+
2133
+ Body parameters:
2134
+
2135
+
2136
+ * ``grouping``\\ : List of parameters to group the jobs by.
2137
+ * ``search``\\ : List of search parameters to filter the jobs by (optional).
1992
2138
1993
2139
:param body: Required.
1994
2140
:type body: IO[bytes]
@@ -2004,7 +2150,15 @@ async def summary(self, body: IO[bytes], *, content_type: str = "application/jso
2004
2150
async def summary (self , body : Union [_models .JobSummaryParams , IO [bytes ]], ** kwargs : Any ) -> Any :
2005
2151
"""Summary.
2006
2152
2007
- Show information suitable for plotting.
2153
+ Group jobs by a specific list of parameters. Returns an array of n-uplets, where each n-uplet
2154
+ contains the
2155
+ values of the grouping parameters and the number of jobs that match those values.
2156
+
2157
+ Body parameters:
2158
+
2159
+
2160
+ * ``grouping``\\ : List of parameters to group the jobs by.
2161
+ * ``search``\\ : List of search parameters to filter the jobs by (optional).
2008
2162
2009
2163
:param body: Is either a JobSummaryParams type or a IO[bytes] type. Required.
2010
2164
:type body: ~_generated.models.JobSummaryParams or IO[bytes]
0 commit comments