| 127 | } |
| 128 | |
| 129 | async function listUptimeCheckIps() { |
| 130 | // [START monitoring_uptime_check_list_ips] |
| 131 | // Imports the Google Cloud client library |
| 132 | const monitoring = require('@google-cloud/monitoring'); |
| 133 | |
| 134 | // Creates a client |
| 135 | const client = new monitoring.UptimeCheckServiceClient(); |
| 136 | |
| 137 | // List uptime check IPs |
| 138 | const [uptimeCheckIps] = await client.listUptimeCheckIps(); |
| 139 | uptimeCheckIps.forEach(uptimeCheckIp => { |
| 140 | console.log( |
| 141 | uptimeCheckIp.region, |
| 142 | uptimeCheckIp.location, |
| 143 | uptimeCheckIp.ipAddress |
| 144 | ); |
| 145 | }); |
| 146 | |
| 147 | // [END monitoring_uptime_check_list_ips] |
| 148 | } |
| 149 | |
| 150 | async function getUptimeCheckConfig(projectId, uptimeCheckConfigId) { |
| 151 | // [START monitoring_uptime_check_get] |