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 |
|---|---|
boolean |
equals(Object obj) |
<T extends ImageConfiguration> |
getConfiguration()
Returns the image configuration.
|
Long |
getCreationTimestamp()
Returns the creation timestamp in milliseconds since epoch.
|
DeprecationStatus<ImageId> |
getDeprecationStatus()
Returns the deprecation status of the image.
|
String |
getDescription()
Returns a textual description of the image.
|
Long |
getDiskSizeGb()
Returns the size of the image when restored onto a persistent disk (in GB).
|
String |
getGeneratedId()
Returns the service-generated unique identifier for the image.
|
ImageId |
getImageId()
Returns the image identity.
|
List<LicenseId> |
getLicenses()
Returns all applicable publicly visible licenses.
|
ImageInfo.Status |
getStatus()
Returns the status of the image.
|
int |
hashCode() |
static ImageInfo.Builder |
newBuilder(ImageId imageId,
ImageConfiguration configuration)
Returns a builder for an
ImageInfo object given the image identity and an image
configuration. |
static ImageInfo |
of(ImageId imageId,
ImageConfiguration configuration)
Returns an
ImageInfo object given the image identity and an image configuration. |
ImageInfo.Builder |
toBuilder()
Returns a builder for the current image.
|
String |
toString() |
public String getGeneratedId()
public Long getCreationTimestamp()
public ImageId getImageId()
public String getDescription()
public <T extends ImageConfiguration> T getConfiguration()
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 getStatus()
ImageInfo.Status.READY.public Long getDiskSizeGb()
public DeprecationStatus<ImageId> getDeprecationStatus()
DeprecationStatus.getStatus() 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 newBuilder(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 © 2019 Google LLC. All rights reserved.