()
| 51 | const batchClient = new batchLib.v1.BatchServiceClient(); |
| 52 | |
| 53 | async function callListTasks() { |
| 54 | // Construct request |
| 55 | const request = { |
| 56 | parent: `projects/${projectId}/locations/${region}/jobs/${jobName}/taskGroups/${groupName}`, |
| 57 | }; |
| 58 | |
| 59 | // Run request |
| 60 | const iterable = await batchClient.listTasksAsync(request); |
| 61 | for await (const response of iterable) { |
| 62 | console.log(response); |
| 63 | } |
| 64 | } |
| 65 | |
| 66 | await callListTasks(); |
| 67 | // [END batch_list_tasks] |