Retrieves the detailed configuration and runtime information of a job.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
paidlc:GetJob |
get |
*All Resource
|
None | None |
Request syntax
GET /api/v1/jobs/{JobId} HTTP/1.1
Path Parameters
|
Parameter |
Type |
Required |
Description |
Example |
| JobId |
string |
Yes |
The job ID. For information about how to obtain the job ID, see ListJobs. |
dlc******* |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| NeedDetail |
boolean |
No |
Specifies whether to return job details. Default value: true. |
true |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
A JSON-formatted string. |
||
| JobId |
string |
The job ID. |
dlc******* |
| JobType |
string |
The job type. This value is specified by the JobType parameter in the CreateJob operation. |
TFJob |
| DisplayName |
string |
The job name. |
tf-mnist-test |
| UserId |
string |
The Alibaba Cloud UID of the user who submitted the job. |
12********* |
| Status |
string |
The job status. Valid values:
|
Stopped |
| WorkspaceId |
string |
The ID of the workspace to which the job belongs. |
268 |
| WorkspaceName |
string |
The name of the workspace to which the job belongs. |
dlc-workspace |
| ResourceId |
string |
The ID of the resource group in which the job runs. |
r****** |
| ResourceLevel |
string |
The resource level used by the job at runtime. |
L0 |
| ReasonCode |
string |
The status detail code, which is a subcategory of the current status (Status). |
JobStoppedByUser |
| ReasonMessage |
string |
The detailed description of the status. |
Job is stopped by user. |
| JobSpecs |
array |
The node configurations of the job. For more information, see JobSpecs in the CreateJob operation. |
|
| JobSpec |
The detailed configuration of a node type. |
||
| UserCommand |
string |
The startup command for each node. |
python /root/code/mnist.py |
| DataSources |
array<object> |
The list of data sources. |
|
|
object |
The data source. |
||
| DataSourceId |
string |
The data source ID. |
d******* |
| MountPath |
string |
The local mount path. This is an optional parameter. If left empty, the mount path specified in the data source is used. |
/mnt/data/ |
| Uri |
string |
The data source path. |
oss://bucket.oss-cn-hangzhou-internal.aliyuncs.com/path/ |
| CodeSource |
object |
The code source. |
|
| CodeSourceId |
string |
The code source ID. |
code****** |
| Branch |
string |
The code branch. |
master |
| Commit |
string |
The code commit ID. |
44da109b59f8596152987eaa8f3b2487xxxxxx |
| MountPath |
string |
The local mount path. |
/mnt/data |
| ThirdpartyLibs |
array |
The list of third-party Python libraries to install. |
|
|
string |
The third-party Python library. |
numpy==1.16.1 |
|
| ThirdpartyLibDir |
string |
The folder that contains the third-party library (requirements.txt) file. |
/root/code/ |
| Envs |
object |
The environment variable configurations. |
|
|
string |
环境变量 Key 和 Value。 |
ENABLE_DEBUG_MODE |
|
| UserVpc |
object |
The user VPC. |
|
| VpcId |
string |
The ID of the user VPC. |
vpc-abcdef**** |
| SwitchId |
string |
The ID of the user vSwitch. |
vs-abcdef**** |
| SecurityGroupId |
string |
The ID of the user security group. |
sg-abcdef**** |
| ExtendedCidrs |
array |
The extended CIDR blocks. Example: 192.168.0.1/24. |
|
|
string |
The extended CIDR block. |
192.168.0.1/24 |
|
| DefaultRoute |
string |
The default route. This parameter is valid only for general computing resources. Valid values: eth0: uses the default network interface controller (NIC) to access external networks through the public gateway. eth1: uses the user elastic network interfaces (ENIs) to access external networks through the private gateway. |
|
| GmtCreateTime |
string |
The time when the job was created (UTC). |
2021-01-12T14:35:01Z |
| GmtSubmittedTime |
string |
The time when the job was submitted to the cluster (UTC). |
2021-01-12T14:36:01Z |
| GmtRunningTime |
string |
The time when the job started running (UTC). |
2021-01-12T14:36:21Z |
| GmtSuccessedTime |
string |
The time when the job completed successfully (UTC). |
2021-01-12T15:36:08Z |
| GmtStoppedTime |
string |
The time when the job was stopped (UTC). |
2021-01-12T15:36:08Z |
| GmtFailedTime |
string |
The time when the job failed (UTC). |
2021-01-12T15:36:08Z |
| Duration |
integer |
The job running duration, in seconds. |
3602 |
| Pods |
array<object> |
All nodes in the running job. |
|
|
array<object> |
The node array. |
||
| Type |
string |
The node type, which corresponds to a JobSpec in the JobSpecs parameter of the CreateJob operation. |
Worker |
| PodId |
string |
The node ID. You can use this ID with the GetPodLogs and GetPodEvents operations to retrieve detailed logs and events for the node. |
Worker |
| PodUid |
string |
Pod UID。 |
fe846462-af2c-4521-bd6f-96787a57591d |
| Status |
string |
The node status. Valid values:
|
Running |
| Ip |
string |
The network IP address of the node. |
10.0.1.2 |
| GmtCreateTime |
string |
The time when the pod was created (UTC). |
2021-01-12T14:36:01Z |
| GmtStartTime |
string |
The time when the node started (UTC). |
2021-01-12T14:36:01Z |
| GmtFinishTime |
string |
The time when the node finished (UTC). |
2021-01-12T15:36:05Z |
| HistoryPods |
array<object> |
The historical pods. |
|
|
object |
The historical pod array. |
||
| Type |
string |
The pod type. |
Worker |
| PodId |
string |
Pod ID。 |
Worker |
| PodUid |
string |
Pod UID。 |
fe846462-af2c-4521-bd6f-96787a57591d |
| Status |
string |
The pod status. |
Failed |
| Ip |
string |
Pod IP。 |
10.0.1.3 |
| GmtCreateTime |
string |
The time when the pod was created (UTC). |
2021-01-12T14:36:01Z |
| GmtStartTime |
string |
The time when the pod started (UTC). |
2021-01-12T14:36:01Z |
| GmtFinishTime |
string |
The time when the pod finished (UTC). |
2021-01-12T14:36:01Z |
| SubStatus |
string |
The pod substatus, such as preemption status. Valid values:
|
Normal |
| ResourceType |
string |
The resource usage type of the pod. |
Normal |
| Duration |
number |
The pod running duration. |
|
| NodeName |
string |
The node name. |
|
| PodIps |
array |
The IP addresses of the pod. |
|
| PodNetworkInterface |
The IP address corresponding to each NIC. |
||
| SubStatus |
string |
The pod substatus, such as preemption status. Valid values:
|
Normal |
| ResourceType |
string |
The resource usage type of the pod. |
Normal |
| Duration |
number |
The pod running duration. |
|
| NodeName |
string |
The node name. |
|
| PodIps |
array |
The IP addresses of the pod. |
|
| PodNetworkInterface |
The IP address corresponding to each NIC. |
||
| RequestId |
string |
The request ID, used for diagnostics and troubleshooting. |
473469C7-AA6F-4DC5-B3DB-xxxxxxxx |
| Settings | JobSettings |
The additional parameter settings of the job. |
|
| ClusterId |
string |
The cluster ID. |
a***** |
| ElasticSpec | JobElasticSpec |
The elastic job parameters. |
|
| EnabledDebugger |
boolean |
Indicates whether the debugger job is enabled. |
false |
| Priority |
integer |
The priority of the job. Valid values: 1 to 9. |
1 |
| SubStatus |
string |
The job substatus, such as preemption retry status. |
Restarting |
| RestartTimes |
string |
The number of retries used and the maximum number of retries for the job. |
0/10 |
| StatusHistory |
array |
The historical statuses. |
|
| StatusTransitionItem |
The historical statuses. |
||
| TenantId |
string |
The tenant ID. |
GAR***W134 |
| ResourceType |
string |
The resource type. Valid values: ECS, Lingjun, and ACS. |
ECS |
| CredentialConfig | CredentialConfig |
The access credential configuration. |
|
| Accessibility |
string |
The visibility of the job. Valid values:
|
PRIVATE |
| RestartRecord |
array<object> |
The job restart records. |
|
|
array<object> |
The job restart records. |
||
| DetailErrorInfoList |
array<object> |
The list of fault information. |
|
|
object |
The fault information. |
||
| AddJobLevelBlacklist |
boolean |
The job-level blacklist. |
|
| AddNodeToBlacklist |
boolean |
The node blacklist. |
|
| DetailErrorMsg |
string |
The detailed error message. |
|
| ErrorCode |
string |
The error code. |
|
| ErrorMsg |
string |
The fault message. |
|
| ErrorSource |
string |
The error source. |
|
| Node |
string |
The node. |
|
| Pod |
string |
The instance. |
|
| TriggerRestart |
boolean |
Indicates whether a restart is triggered. |
|
| JobRestartCount |
integer |
The number of job restarts. |
|
| OccurPhase |
string |
The phase in which the event occurred. |
|
| OccurTime |
string |
The time when the event occurred. |
|
| Reason |
string |
The reason. |
|
| RestartDurationInSec |
integer |
The restart duration, in seconds. |
|
| RestartFailReason |
string |
The reason for the restart failure. |
|
| RestartStatus |
string |
The restart status. |
|
| TriggerID |
string |
TriggerID |
|
| RestartLevelType |
string |
||
| JobReplicaStatuses |
array |
The job replica statuses. |
|
| JobReplicaStatus |
The job replica statuses. |
||
| GmtFinishTime |
string |
The time when the job finished (UTC). |
2021-01-12T15:36:08Z |
| CustomEnvs |
array<object> |
||
|
object |
|||
| Key |
string |
||
| Value |
string |
||
| Visible |
string |
||
| RoleSystemEnvs |
object |
||
|
object |
|||
|
string |
|||
| Description |
string |
||
| SchedulingStrategy |
string |
Auto |
Examples
Success response
JSON format
{
"JobId": "dlc*******",
"JobType": "TFJob",
"DisplayName": "tf-mnist-test",
"UserId": "12*********",
"Status": "Stopped",
"WorkspaceId": "268",
"WorkspaceName": "dlc-workspace",
"ResourceId": "r******",
"ResourceLevel": "L0",
"ReasonCode": "JobStoppedByUser",
"ReasonMessage": "Job is stopped by user.",
"JobSpecs": [
{
"Type": "Worker",
"Image": "registry-vpc.cn-hangzhou.aliyuncs.com/cloud-dsw/tensorflow:1.12PAI-gpu-py36-cu101-ubuntu18.04",
"ImageConfig": {
"DockerRegistry": "docker****registry.com",
"Username": " username",
"Password": "password",
"Auth": ""
},
"PodCount": 1,
"ExtraPodSpec": {
"SideCarContainers": [
{
"Name": "data-init",
"Image": "registry.cn-hangzhou.aliyuncs.com/pai-dlc/curl:v1.0.0",
"Command": [
"curl www.aliyun.com"
],
"Args": [
"-v"
],
"WorkingDir": "/root",
"Env": [
{
"Name": "ENABLE_DEBUG",
"Value": "true"
}
],
"Resources": {
"Limits": {
"key": "{'cpu': '1', 'memory': '1000Mi'}"
},
"Requests": {
"key": "{'cpu': '1', 'memory': '1000Mi'}"
}
}
}
],
"InitContainers": [
{
"Name": "data-init",
"Image": "registry.cn-hangzhou.aliyuncs.com/pai-dlc/curl:v1.0.0",
"Command": [
"curl www.aliyun.com"
],
"Args": [
"-v"
],
"WorkingDir": "/root",
"Env": [
{
"Name": "ENABLE_DEBUG",
"Value": "true"
}
],
"Resources": {
"Limits": {
"key": "{'cpu': '1', 'memory': '1000Mi'}"
},
"Requests": {
"key": "{'cpu': '1', 'memory': '1000Mi'}"
}
}
}
],
"PodLabels": {
"key": "example-lable"
},
"PodAnnotations": {
"key": "example-annotation"
},
"SharedVolumeMountPaths": [
"/root/share/"
],
"Lifecycle": {
"PreStop": {
"Exec": {
"Command": [
""
]
}
},
"PostStart": {
"Exec": {
"Command": [
""
]
}
}
},
"MainContainerSecurityContext": {
"RunAsUser": 1000,
"RunAsGroup": 1000,
"SeccompProfile": {
"Type": "Unconfined",
"LocalhostProfile": "my-profiles/profile-allow.json"
},
"Privileged": false,
"Capabilities": {
"Add": [
""
],
"Drop": [
""
]
}
}
},
"ResourceConfig": {
"CPU": "10",
"GPU": "3",
"Memory": "10Gi",
"SharedMemory": "5Gi",
"GPUType": "Tesla-V100-16G"
},
"UseSpotInstance": false,
"SpotSpec": {
"SpotStrategy": "SpotWithPriceLimit",
"SpotDiscountLimit": 0.8,
"SpotPriceLimit": 0.4744
},
"AssignNodeSpec": {
"EnableAssignNode": true,
"NodeNames": "lingjxxxxxxxx",
"AntiAffinityNodeNames": "lingjxxxxxxxx",
"HyperNodes": [
{
"HyperNodeName": "",
"NodeNames": ""
}
],
"AntiAffinityHyperNodes": [
{
"HyperNodeName": "",
"NodeNames": ""
}
]
},
"LocalMountSpecs": [
{
"MountMode": "",
"LocalPath": "",
"MountPath": ""
}
],
"AutoScalingSpec": {
"ScalingStrategy": "",
"MinReplicas": 0,
"MaxReplicas": 0,
"PodsToDelete": [
""
],
"AutoscalingMetricSpec": {
"MetricName": "",
"TargetValue": 0,
"StabilizationWindowSeconds": 0,
"Tolerance": ""
}
},
"ServiceSpec": {
"ServiceMode": "PerRole",
"ExtraPorts": [
8081
],
"DefaultPort": 8080
},
"IsCheif": false,
"IsChief": false,
"RestartPolicy": "ExitCode",
"SystemDisk": {
"Size": 0,
"Category": "",
"PerformanceLevel": ""
},
"EcsSpec": "ecs.c6.large",
"QuotaId": "",
"ConsiderInSuccessPolicy": false,
"StartupDependencies": [
{
"Type": "",
"OnPhase": "",
"MinReplicas": ""
}
],
"ElasticSpotSpecs": [
{
"InstanceType": "",
"SpotPriceLimit": 0,
"SpotDiscountLimit": 0,
"SpotStrategy": ""
}
]
}
],
"UserCommand": "python /root/code/mnist.py",
"DataSources": [
{
"DataSourceId": "d*******",
"MountPath": "/mnt/data/",
"Uri": "oss://bucket.oss-cn-hangzhou-internal.aliyuncs.com/path/"
}
],
"CodeSource": {
"CodeSourceId": "code******",
"Branch": "master",
"Commit": "44da109b59f8596152987eaa8f3b2487xxxxxx",
"MountPath": "/mnt/data"
},
"ThirdpartyLibs": [
"numpy==1.16.1"
],
"ThirdpartyLibDir": "/root/code/",
"Envs": {
"key": "ENABLE_DEBUG_MODE"
},
"UserVpc": {
"VpcId": "vpc-abcdef****",
"SwitchId": "vs-abcdef****",
"SecurityGroupId": "sg-abcdef****",
"ExtendedCidrs": [
"192.168.0.1/24"
],
"DefaultRoute": ""
},
"GmtCreateTime": "2021-01-12T14:35:01Z",
"GmtSubmittedTime": "2021-01-12T14:36:01Z",
"GmtRunningTime": "2021-01-12T14:36:21Z",
"GmtSuccessedTime": "2021-01-12T15:36:08Z",
"GmtStoppedTime": "2021-01-12T15:36:08Z",
"GmtFailedTime": "2021-01-12T15:36:08Z",
"Duration": 3602,
"Pods": [
{
"Type": "Worker",
"PodId": "Worker",
"PodUid": "fe846462-af2c-4521-bd6f-96787a57591d",
"Status": "Running",
"Ip": "10.0.1.2",
"GmtCreateTime": "2021-01-12T14:36:01Z",
"GmtStartTime": "2021-01-12T14:36:01Z",
"GmtFinishTime": "2021-01-12T15:36:05Z",
"HistoryPods": [
{
"Type": "Worker",
"PodId": "Worker",
"PodUid": "fe846462-af2c-4521-bd6f-96787a57591d",
"Status": "Failed",
"Ip": "10.0.1.3",
"GmtCreateTime": "2021-01-12T14:36:01Z",
"GmtStartTime": "2021-01-12T14:36:01Z",
"GmtFinishTime": "2021-01-12T14:36:01Z",
"SubStatus": "Normal",
"ResourceType": "Normal",
"Duration": 0,
"NodeName": "",
"PodIps": [
{
"InterfaceName": "",
"Ip": ""
}
]
}
],
"SubStatus": "Normal",
"ResourceType": "Normal",
"Duration": 0,
"NodeName": "",
"PodIps": [
{
"InterfaceName": "",
"Ip": ""
}
]
}
],
"RequestId": "473469C7-AA6F-4DC5-B3DB-xxxxxxxx",
"Settings": {
"BusinessUserId": "16****",
"Caller": "SilkFlow",
"Tags": {
"key": "key:value"
},
"PipelineId": "pid-12****",
"EnableTideResource": true,
"EnableErrorMonitoringInAIMaster": false,
"ErrorMonitoringArgs": "--enable-log-hang-detection true",
"EnableRDMA": true,
"EnableOssAppend": true,
"OversoldType": "AcceptQuotaOverSold",
"AdvancedSettings": {
"test": "test",
"test2": 1
},
"Driver": "535.54.03",
"EnableSanityCheck": true,
"SanityCheckArgs": "--sanity-check-timing=AfterJobFaultTolerant --sanity-check-timeout-ops=MarkJobFail",
"JobReservedMinutes": 30,
"JobReservedPolicy": "Always",
"EnableCPUAffinity": true,
"DisableEcsStockCheck": false,
"AllocateAllRDMADevices": false,
"EnableDSWDev": false,
"DataJuicerConfig": {
"ExecutionMode": "standalone",
"CommandType": "config",
"EnableResourceEstimation": false,
"ResourceLimit": {
"CPU": "2",
"Memory": "10Gi",
"GPU": "20"
}
},
"ModelConfig": {
"ModelName": "",
"ModelTemplate": {
"ModelName": "",
"Provider": "",
"Collections": ""
}
},
"AllowUnschedulableNodes": false,
"Shell": "/bin/bash"
},
"ClusterId": "a*****",
"ElasticSpec": {
"EnableElasticTraining": true,
"MinParallelism": 1,
"MaxParallelism": 8,
"AIMasterType": "",
"AIMasterDockerImage": "",
"EnablePsJobElasticWorker": false,
"EnableAIMaster": false,
"EnablePsResourceEstimate": true,
"EnablePsJobElasticPS": true,
"PSMinParallelism": 4,
"PSMaxParallelism": 10,
"ElasticStrategy": "",
"EnableEDP": true,
"EDPMaxParallelism": 16,
"EDPMinParallelism": 8
},
"EnabledDebugger": false,
"Priority": 1,
"SubStatus": "Restarting",
"RestartTimes": "0/10",
"StatusHistory": [
{
"Status": "",
"StartTime": "",
"EndTime": "",
"ReasonCode": "",
"ReasonMessage": ""
}
],
"TenantId": "GAR***W134",
"ResourceType": "ECS",
"CredentialConfig": {
"EnableCredentialInject": false,
"AliyunEnvRoleKey": "",
"CredentialConfigItems": [
{
"Key": "",
"Type": "",
"Roles": [
{
"RoleArn": "",
"RoleType": "",
"AssumeRoleFor": "",
"Policy": "",
"AssumeUserInfo": {
"SecurityToken": "",
"AccessKeyId": "",
"Type": "",
"Id": ""
}
}
]
}
]
},
"Accessibility": "PRIVATE",
"RestartRecord": [
{
"DetailErrorInfoList": [
{
"AddJobLevelBlacklist": false,
"AddNodeToBlacklist": false,
"DetailErrorMsg": "",
"ErrorCode": "",
"ErrorMsg": "",
"ErrorSource": "",
"Node": "",
"Pod": "",
"TriggerRestart": false
}
],
"JobRestartCount": 0,
"OccurPhase": "",
"OccurTime": "",
"Reason": "",
"RestartDurationInSec": 0,
"RestartFailReason": "",
"RestartStatus": "",
"TriggerID": "",
"RestartLevelType": ""
}
],
"JobReplicaStatuses": [
{
"Type": "",
"Active": 0,
"EstimatedPodCount": 0,
"EstimatedAutoScalingSpec": {
"ScalingStrategy": "",
"MinReplicas": 0,
"MaxReplicas": 0,
"PodsToDelete": [
""
],
"AutoscalingMetricSpec": {
"MetricName": "",
"TargetValue": 0,
"StabilizationWindowSeconds": 0,
"Tolerance": ""
}
},
"EstimatedResourceConfig": {
"CPU": "10",
"GPU": "3",
"Memory": "10Gi",
"SharedMemory": "5Gi",
"GPUType": "Tesla-V100-16G"
},
"Queuing": 0,
"Dequeued": 0,
"CurrentSpotInstanceType": ""
}
],
"GmtFinishTime": "2021-01-12T15:36:08Z",
"CustomEnvs": [
{
"Key": "",
"Value": "",
"Visible": ""
}
],
"RoleSystemEnvs": {
"key": {
"key": ""
}
},
"Description": "",
"SchedulingStrategy": "Auto"
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.