Package
gce-imagesConstructors
(constructor)(config)
constructor
(
config
?:
GCEImagesConfig
|
AuthOptions
);
Constructs a new instance of the GCEImages
class
Properties
OS_TO_URL
OS_TO_URL
:
{
[
index
:
string
]
:
string
;
};
OS_URLS
OS_URLS
:
OSUrls
;
Methods
_filterDeprecated(image)
_filterDeprecated
(
image
:
Image
)
:
boolean
;
Returns
Type
Description
boolean
_getAllByOS(options)
_getAllByOS
(
options
:
GetOptions
&
{
osNames
:
string
[];
})
:
Promise<Image
[]>;
_parseArguments(options, callback)
_parseArguments<O
,
C
> (
options
:
any
,
callback
:
any
)
:
ParsedArguments<O
,
C
> ;
Parameters
Name
Description
options
any
callback
any
Returns
Type
Description
ParsedArguments
<O, C>
Type Parameters
Name
Description
O
C
_parseOsInput(os)
_parseOsInput
(
os
:
string
)
:
{
name
:
string
;
version
:
string
;
url
:
string
;
};
Parameter
Name
Description
os
string
Returns
Type
Description
{
name: string;
version: string;
url: string;
}
_sortNewestFirst(imageA, imageB)
_sortNewestFirst
(
imageA
:
Image
,
imageB
:
Image
)
:
0
|
1
|
-
1
;
Returns
Type
Description
0 | 1 | -1
getAll(cb)
getAll
(
cb
:
GetAllCallback
)
:
void
;
Get all available images.
Returns
Type
Description
void
{Promise} if callback is omitted.
getAll(opts)
getAll
(
opts
?:
GetOptions
|
string
)
:
Promise<Image
[]
|
ImagesMap
> ;
getAll(opts, cb)
getAll
(
opts
:
GetOptions
|
string
,
cb
:
GetAllCallback
)
:
void
;
Returns
Type
Description
void
getLatest(cb)
getLatest
(
cb
:
GetLatestCallback
)
:
void
;
Get all available images, but only return the newest one.
Returns
Type
Description
void
{Promise} if callback is omitted.
getLatest(opts)
getLatest
(
opts
?:
GetOptions
|
string
)
:
Promise<Image
|
ImageMap
> ;
getLatest(opts, cb)
getLatest
(
opts
:
GetOptions
|
string
,
cb
:
GetLatestCallback
)
:
void
;
Returns
Type
Description
void
getProjectId()
getProjectId
()
:
Promise<string>
;
Returns
Type
Description
Promise
<string>