MCPcopy Create free account
hub / github.com/GoogleCloudPlatform/nodejs-docs-samples / listUptimeCheckIps

Function listUptimeCheckIps

monitoring/snippets/uptime.js:129–148  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

127}
128
129async 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
150async function getUptimeCheckConfig(projectId, uptimeCheckConfigId) {
151 // [START monitoring_uptime_check_get]

Callers 1

uptime.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected