| 32 | const livestreamServiceClient = new LivestreamServiceClient(); |
| 33 | |
| 34 | async function updatePool() { |
| 35 | // Construct request |
| 36 | const request = { |
| 37 | pool: { |
| 38 | name: livestreamServiceClient.poolPath(projectId, location, poolId), |
| 39 | networkConfig: { |
| 40 | peeredNetwork: peeredNetwork, |
| 41 | }, |
| 42 | }, |
| 43 | updateMask: { |
| 44 | paths: ['network_config'], |
| 45 | }, |
| 46 | }; |
| 47 | |
| 48 | // Run request |
| 49 | const [operation] = await livestreamServiceClient.updatePool(request); |
| 50 | const response = await operation.promise(); |
| 51 | const [pool] = response; |
| 52 | console.log(`Updated pool: ${pool.name}`); |
| 53 | } |
| 54 | |
| 55 | updatePool(); |
| 56 | // [END livestream_update_pool] |