Gathering detailed insights and metrics for gce-images
Gathering detailed insights and metrics for gce-images
Gathering detailed insights and metrics for gce-images
Gathering detailed insights and metrics for gce-images
npm install gce-images
Typescript
Module System
Min. Node Version
Node Version
NPM Version
72.9
Supply Chain
97.2
Quality
81.7
Maintenance
100
Vulnerability
99.6
License
TypeScript (79.07%)
JavaScript (16.99%)
Python (3.94%)
Love this project? Help keep it running — sponsor us today! 🚀
Total Downloads
8,998,106
Last Day
3,531
Last Week
16,337
Last Month
69,941
Last Year
760,374
MIT License
19 Stars
293 Commits
21 Forks
43 Watchers
54 Branches
118 Contributors
Updated on Dec 23, 2024
Latest Version
5.0.0
Package Id
gce-images@5.0.0
Unpacked Size
41.90 kB
Size
11.38 kB
File Count
7
NPM Version
6.14.18
Node Version
14.21.3
Published on
Feb 06, 2024
Cumulative downloads
Total Downloads
Last Day
40.8%
3,531
Compared to previous day
Last Week
6.3%
16,337
Compared to previous week
Last Month
31.5%
69,941
Compared to previous month
Last Year
5.3%
760,374
Compared to previous year
Get a list of globally available Google Compute Engine images
1$ npm install gce-images
1const {GCEImages} = require('gce-images'); 2 3// Create a client (see below for more about authorization) 4const images = new GCEImages(); 5 6images.getAll((err, images) => { 7/* 8 images = { 9 centos: { 10 [ 11 { 12 kind: 'compute#image', 13 selfLink: 'https://compute.googleapis.com/compute/v1/projects/centos-cloud/global/images/centos-6-v20150710', 14 id: '2223645373384728207', 15 creationTimestamp: '2015-07-13T13:32:32.483-07:00', 16 name: 'centos-6-v20150710', 17 description: 'CentOS, CentOS, 6.6, x86_64 built on 2015-07-10', 18 sourceType: 'RAW', 19 rawDisk: [Object], 20 status: 'READY', 21 archiveSizeBytes: '1133229966', 22 diskSizeGb: '10' 23 }, 24 // ... 25 }, 26 coreos: { 27 // ... 28 }, 29 debian: { 30 // ... 31 }, 32 redhat: { 33 // ... 34 }, 35 opensuse: { 36 // ... 37 }, 38 suse: { 39 // ... 40 }, 41 ubuntu: { 42 // ... 43 } 44 }; 45*/ 46});
1images.getLatest('ubuntu', (err, image) => { 2/* 3 image = { 4 kind: 'compute#image', 5 selfLink: 'https://compute.googleapis.com/compute/v1/projects/ubuntu-os-cloud/global/images/ubuntu-1504-vivid-v20150616a', 6 id: '6610082300127119636', 7 creationTimestamp: '2015-06-17T02:03:55.825-07:00', 8 name: 'ubuntu-1504-vivid-v20150616a', 9 description: 'Canonical, Ubuntu, 15.04, amd64 vivid image built on 2015-06-16', 10 sourceType: 'RAW', 11 rawDisk: { source: '', containerType: 'TAR' }, 12 status: 'READY', 13 archiveSizeBytes: '806558757', 14 diskSizeGb: '10', 15 licenses: [ 16 'https://compute.googleapis.com/compute/v1/projects/ubuntu-os-cloud/global/licenses/ubuntu-1504-vivid' 17 ] 18 } 19*/ 20});
1images.getLatest('your-project-id-or-name/ubuntu', (err, image) => { 2/* 3 image = { 4 kind: 'compute#image', 5 selfLink: 'https://compute.googleapis.com/compute/v1/projects/your-project-id-or-name/global/images/ubuntu-1504-vivid-v20150616a', 6 id: '6610082300127119636', 7 creationTimestamp: '2015-06-17T02:03:55.825-07:00', 8 name: 'ubuntu-1504-vivid-v20150616a', 9 description: 'Canonical, Ubuntu, 15.04, amd64 vivid image built on 2015-06-16', 10 sourceType: 'RAW', 11 rawDisk: { source: '', containerType: 'TAR' }, 12 status: 'READY', 13 archiveSizeBytes: '806558757', 14 diskSizeGb: '10', 15 licenses: [ 16 'https://compute.googleapis.com/compute/v1/projects/ubuntu-os-cloud/global/licenses/ubuntu-1504-vivid' 17 ] 18 } 19*/ 20});
1images.getLatest('ubuntu-1404', (err, image) => { 2/* 3 image = { 4 kind: 'compute#image', 5 selfLink: 'https://compute.googleapis.com/compute/v1/projects/ubuntu-os-cloud/global/images/ubuntu-1410-utopic-v20150625', 6 id: '7075003915689987469', 7 creationTimestamp: '2015-07-09T10:46:10.424-07:00', 8 name: 'ubuntu-1410-utopic-v20150625', 9 description: 'Canonical, Ubuntu, 14.10, amd64 utopic image built on 2015-06-25', 10 sourceType: 'RAW', 11 rawDisk: { source: '', containerType: 'TAR' }, 12 status: 'READY', 13 archiveSizeBytes: '752874399', 14 diskSizeGb: '10', 15 licenses: [ 16 'https://compute.googleapis.com/compute/v1/projects/ubuntu-os-cloud/global/licenses/ubuntu-1410-utopic' 17 ] 18 } 19*/ 20});
1images.OS_URLS; // also available on require('gce-images').OS_URLS; 2/* 3 { 4 centos: 'https://compute.googleapis.com/compute/v1/projects/centos-cloud/global/images', 5 'container-vm': 'https://compute.googleapis.com/compute/v1/projects/cos-cloud/global/images', 6 coreos: 'https://compute.googleapis.com/compute/v1/projects/coreos-cloud/global/images', 7 debian: 'https://compute.googleapis.com/compute/v1/projects/debian-cloud/global/images', 8 redhat: 'https://compute.googleapis.com/compute/v1/projects/rhel-cloud/global/images', 9 opensuse: 'https://compute.googleapis.com/compute/v1/projects/opensuse-cloud/global/images', 10 suse: 'https://compute.googleapis.com/compute/v1/projects/suse-cloud/global/images', 11 ubuntu: 'https://compute.googleapis.com/compute/v1/projects/ubuntu-os-cloud/global/images', 12 windows: 'https://compute.googleapis.com/compute/v1/projects/windows-cloud/global/images' 13 } 14*/
This module uses google-auth-library to get the required access token. If you don't meet the requirements for automatic authentication, you will need to provide the same configuration object detailed in that readme.
1const {GCEImages} = require('gce-images');
2const images = new GCEImages({ keyFile: '/Users/stephen/dev/key.json' });
3
4images.getAll((err, images) => {});
5images.getLatest('ubuntu', (err, image) => {});
centos
(also centos-cloud
)container-vm
(also google-containers
)coreos
(also coreos-cloud
)debian
(also debian-cloud
)redhat
(also rhel
, rhel-cloud
)opensuse
(also opensuse-cloud
)suse
(also suse-cloud
)ubuntu
(also ubuntu-cloud
, ubuntu-os-cloud
)windows
(also windows-cloud
)All accepted names may be suffixed with a version, e.g. ubuntu-1404
.
Object
A map of OS names to their Google APIs public image URL.
Object
See the above section on Authorization. This object is only necessary if automatic authentication is not available in your environment. See the google-auto-auth documentation for the accepted properties.
GoogleAuthConfig
If you want to re-use an auth client from google-auto-auth, pass an instance here.
String
or Object
If a string, it is expanded to: options = { osNames: [**string input**] }
.
If not provided, the default options
detailed below are used.
String[]
All operating systems you wish to receive image metadata for. See Accepted OS names.
Boolean
false
Include deprecated image metadata in results.
Error
An error that occurred during an API request or if no results match the provided OS name or version.
Object
or Array
With getAll
:
If only a single OS is being looked up, you will receive an array of all image metadata objects for that OS.
If multiple OS names were given, you will receive an object keyed by the OS name. Each key will reference an array of metadata objects for that OS.
With getLatest
:
If only a single OS is being looked up, you will receive its metadata object back.
If multiple OS names were given, you will receive an object keyed by the OS name. Each key will reference a metadata object.
This is not an officially supported Google product.
No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
all changesets reviewed
Reason
security policy file detected
Details
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
Reason
license file detected
Details
Reason
SAST tool is not run on all commits -- score normalized to 1
Details
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
project is archived
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
project is not fuzzed
Details
Score
Last Scanned on 2025-02-17
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More