public class ImageInfo extends Object implements Serializable
DiskImageConfiguration to create an image from an existing
disk. Use StorageImageConfiguration to create an image from a file stored in Google
Cloud Storage.| Modifier and Type | Class and Description |
|---|---|
static class |
ImageInfo.Builder
A builder for
ImageInfo objects. |
static class |
ImageInfo.Status
The status of a Google Compute Engine Image.
|
| Modifier and Type | Method and Description |
|---|---|
static ImageInfo.Builder |
builder(ImageId imageId,
ImageConfiguration configuration)
Returns a builder for an
ImageInfo object given the image identity and an image
configuration. |
<T extends ImageConfiguration> |
configuration()
Returns the image configuration.
|
Long |
creationTimestamp()
Returns the creation timestamp in milliseconds since epoch.
|
DeprecationStatus<ImageId> |
deprecationStatus()
Returns the deprecation status of the image.
|
String |
description()
Returns a textual description of the image.
|
Long |
diskSizeGb()
Returns the size of the image when restored onto a persistent disk (in GB).
|
boolean |
equals(Object obj) |
String |
generatedId()
Returns the service-generated unique identifier for the image.
|
int |
hashCode() |
ImageId |
imageId()
Returns the image identity.
|
List<LicenseId> |
licenses()
Returns all applicable publicly visible licenses.
|
static ImageInfo |
of(ImageId imageId,
ImageConfiguration configuration)
Returns an
ImageInfo object given the image identity and an image configuration. |
ImageInfo.Status |
status()
Returns the status of the image.
|
ImageInfo.Builder |
toBuilder()
Returns a builder for the current image.
|
String |
toString() |
public String generatedId()
public Long creationTimestamp()
public ImageId imageId()
public String description()
public <T extends ImageConfiguration> T configuration()
DiskImageConfiguration if the the image was created from a Google Compute Engine disk.
This method returns an instance of StorageImageConfiguration if the image was created
from a file stored in Google Cloud Storage.public ImageInfo.Status status()
ImageInfo.Status.READY.public Long diskSizeGb()
public DeprecationStatus<ImageId> deprecationStatus()
DeprecationStatus.status() is either
DeprecationStatus.Status.DELETED or DeprecationStatus.Status.OBSOLETE the
image must not be used. Returns null if the image is not deprecated.public ImageInfo.Builder toBuilder()
public static ImageInfo.Builder builder(ImageId imageId, ImageConfiguration configuration)
ImageInfo object given the image identity and an image
configuration. Use DiskImageConfiguration to create an image from an existing disk. Use
StorageImageConfiguration to create an image from a file stored in Google Cloud
Storage.public static ImageInfo of(ImageId imageId, ImageConfiguration configuration)
ImageInfo object given the image identity and an image configuration. Use
DiskImageConfiguration to create an image from an existing disk. Use
StorageImageConfiguration to create an image from a file stored in Google Cloud
Storage.Copyright © 2016 Google. All rights reserved.