Parameter description
Attribute | Type | Description |
job | CreateResponse, str | Job ID |
task_name | str | Task name |
Response description
The get_task method returns a GetResponse object, which encapsulates all interfaces of the Task class.
Task class
Parameter description
Parameter | Type | Description |
properties | dict, str, Task object | Task running status information |
Attribute description
For more information about interfaces of the InstanceMetrics class, see get_job.
Attribute | Type | Description |
TaskName | str | Task name |
State | str | Task running status |
StartTime | str | Start time of the task |
EndTime | str | End time of the task |
State | str | Task status |
InstanceMetrics | InstanceMetrics object | Metrics of all instances in the task |
Example
try:
# Get a Client object.
client = Client(...
...
# Job ID.
job = "job-xxxx"
task_name = "echo_task"
task_desc = client.get_task(job, task_name)
print (task_desc.TaskName, task_desc.State)
except ClientError, e:
print(e)