()
| 38 | const batchClient = new batchLib.v1.BatchServiceClient(); |
| 39 | |
| 40 | async function callListJobs() { |
| 41 | // Construct request |
| 42 | const request = { |
| 43 | parent: `projects/${projectId}/locations/${region}`, |
| 44 | }; |
| 45 | |
| 46 | // Run request |
| 47 | const iterable = await batchClient.listJobsAsync(request); |
| 48 | for await (const response of iterable) { |
| 49 | console.log(response); |
| 50 | } |
| 51 | } |
| 52 | |
| 53 | await callListJobs(); |
| 54 | // [END batch_list_jobs] |