Skip to content

Commit 58fa977

Browse files
committed
Support API GetJobInfo.
1 parent b210cf9 commit 58fa977

File tree

5 files changed

+594
-6
lines changed

5 files changed

+594
-6
lines changed

maxcompute-20220104/ChangeLog.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,20 @@
1+
2025-03-10 Version: 4.1.0
2+
- Support API GetJobInfo.
3+
- Support API ListComputeMetricsByInstance.
4+
- Support API ListJobMetric.
5+
- Support API ListJobSnapshotInfos.
6+
- Update API CreateMmsJob: update param body.
7+
- Update API GetMmsJob: update response param.
8+
- Update API GetProject: update response param.
9+
- Update API ListComputeQuotaPlan: update response param.
10+
- Update API ListJobInfos: update response param.
11+
- Update API ListMmsJobs: update response param.
12+
- Update API UpdateComputeQuotaSchedule: add param scheduleTimezone.
13+
- Update API UpdateComputeQuotaSchedule: update param body.
14+
- Update API UpdateTunnelQuotaTimer: add param timezone.
15+
- Update API UpdateTunnelQuotaTimer: update param body.
16+
17+
118
2025-02-18 Version: 4.0.0
219
- Support API ListComputeMetricsByInstance.
320
- Support API ListJobMetric.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = '4.0.0'
1+
__version__ = '4.1.0'

maxcompute-20220104/alibabacloud_maxcompute20220104/client.py

Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2003,6 +2003,108 @@ async def get_compute_quota_schedule_async(
20032003
headers = {}
20042004
return await self.get_compute_quota_schedule_with_options_async(nickname, request, headers, runtime)
20052005

2006+
def get_job_info_with_options(
2007+
self,
2008+
instance_id: str,
2009+
headers: Dict[str, str],
2010+
runtime: util_models.RuntimeOptions,
2011+
) -> max_compute_20220104_models.GetJobInfoResponse:
2012+
"""
2013+
@summary Get basic information about a single job.
2014+
2015+
@param headers: map
2016+
@param runtime: runtime options for this request RuntimeOptions
2017+
@return: GetJobInfoResponse
2018+
"""
2019+
req = open_api_models.OpenApiRequest(
2020+
headers=headers
2021+
)
2022+
params = open_api_models.Params(
2023+
action='GetJobInfo',
2024+
version='2022-01-04',
2025+
protocol='HTTPS',
2026+
pathname=f'/api/v1/jobs/{OpenApiUtilClient.get_encode_param(instance_id)}/info',
2027+
method='GET',
2028+
auth_type='AK',
2029+
style='ROA',
2030+
req_body_type='json',
2031+
body_type='json'
2032+
)
2033+
if UtilClient.is_unset(self._signature_version) or not UtilClient.equal_string(self._signature_version, 'v4'):
2034+
return TeaCore.from_map(
2035+
max_compute_20220104_models.GetJobInfoResponse(),
2036+
self.call_api(params, req, runtime)
2037+
)
2038+
else:
2039+
return TeaCore.from_map(
2040+
max_compute_20220104_models.GetJobInfoResponse(),
2041+
self.execute(params, req, runtime)
2042+
)
2043+
2044+
async def get_job_info_with_options_async(
2045+
self,
2046+
instance_id: str,
2047+
headers: Dict[str, str],
2048+
runtime: util_models.RuntimeOptions,
2049+
) -> max_compute_20220104_models.GetJobInfoResponse:
2050+
"""
2051+
@summary Get basic information about a single job.
2052+
2053+
@param headers: map
2054+
@param runtime: runtime options for this request RuntimeOptions
2055+
@return: GetJobInfoResponse
2056+
"""
2057+
req = open_api_models.OpenApiRequest(
2058+
headers=headers
2059+
)
2060+
params = open_api_models.Params(
2061+
action='GetJobInfo',
2062+
version='2022-01-04',
2063+
protocol='HTTPS',
2064+
pathname=f'/api/v1/jobs/{OpenApiUtilClient.get_encode_param(instance_id)}/info',
2065+
method='GET',
2066+
auth_type='AK',
2067+
style='ROA',
2068+
req_body_type='json',
2069+
body_type='json'
2070+
)
2071+
if UtilClient.is_unset(self._signature_version) or not UtilClient.equal_string(self._signature_version, 'v4'):
2072+
return TeaCore.from_map(
2073+
max_compute_20220104_models.GetJobInfoResponse(),
2074+
await self.call_api_async(params, req, runtime)
2075+
)
2076+
else:
2077+
return TeaCore.from_map(
2078+
max_compute_20220104_models.GetJobInfoResponse(),
2079+
await self.execute_async(params, req, runtime)
2080+
)
2081+
2082+
def get_job_info(
2083+
self,
2084+
instance_id: str,
2085+
) -> max_compute_20220104_models.GetJobInfoResponse:
2086+
"""
2087+
@summary Get basic information about a single job.
2088+
2089+
@return: GetJobInfoResponse
2090+
"""
2091+
runtime = util_models.RuntimeOptions()
2092+
headers = {}
2093+
return self.get_job_info_with_options(instance_id, headers, runtime)
2094+
2095+
async def get_job_info_async(
2096+
self,
2097+
instance_id: str,
2098+
) -> max_compute_20220104_models.GetJobInfoResponse:
2099+
"""
2100+
@summary Get basic information about a single job.
2101+
2102+
@return: GetJobInfoResponse
2103+
"""
2104+
runtime = util_models.RuntimeOptions()
2105+
headers = {}
2106+
return await self.get_job_info_with_options_async(instance_id, headers, runtime)
2107+
20062108
def get_job_resource_usage_with_options(
20072109
self,
20082110
tmp_req: max_compute_20220104_models.GetJobResourceUsageRequest,

0 commit comments

Comments
 (0)