UNPKG
mashr
Version:
latest (1.0.7)
1.0.7
1.0.6
1.0.5
1.0.4
1.0.3
1.0.2
1.0.1
1.0.0
Simple data pipeline framework for GCP's BigQuery
github.com/mashr-gcp/mashr
mashr-gcp/mashr
mashr
/
src
/
gcp
/
getGCEInstance.js
14 lines
(11 loc)
•
295 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
13
14
const
Compute
=
require
(
'@google-cloud/compute'
);
const
getGCEInstance
=
async
(
integrationName
) => {
const
compute =
new
Compute
();
const
[instances] =
await
compute.
getVMs
({
filter
:
`name eq
${integrationName}
`
, });
return
instances[
0
]; };
module
.
exports
= { getGCEInstance, };