VMware {code} Community
Anandraj
Contributor
Contributor

Can we retrieve a particular TaskInfo of a Vm based on the Task Key...

Is it possible to retrieve a task based on the task Key...

I'll initiate a task and get the Task infos(all the infos... Keys,name,etc..)... and then disconnect from the Vm...

Again when i login is it possible to search /retrieve only the particular task infos...

Right now...thru CreateTaskCollector I'm getting all the recent tasks and by checking all the keys I'll get the status of the particular task info i have..

Anand.

0 Kudos
2 Replies
admin
Immortal
Immortal

You would not be able to directly use the task key but there are several other criteria to retrieve specifc tasks. You can refer the TaskFilterSpec:

The TaskFilterSpec is passed as a parameter to CreateTaskCollector and allows you fetch specific tasks. e.g. If you wanted to fetch the tasks completed for a specific time range, by setting the time.begintime, time.endtime and time.timetype properties. Please refer the above documentation for more details.

Or, you could retrieve tasks by user name, by setting the username property in the TaskFilterSpec.

You can use a combination of different criterial for the taskfilterspec and then narrow down to a specific key, searching the taskHistoryCollector's taskinfo properties returned.

0 Kudos
Anandraj
Contributor
Contributor

Yeah... I tried with that...

Thanks...

Anand

0 Kudos