Image class final
Represents an Image resource.
You can use images to create boot disks for your VM instances. For more information, read Images.
Constructors
-
Image({String? architecture, int? archiveSizeBytes, String? creationTimestamp, DeprecationStatus? deprecated, String? description, int? diskSizeGb, bool? enableConfidentialCompute, String? family, List<
GuestOsFeature> guestOsFeatures = const [], BigInt? id, CustomerEncryptionKey? imageEncryptionKey, String? kind, String? labelFingerprint, Map<String, String> labels = const {}, List<int> licenseCodes = const [], List<String> licenses = const [], String? name, ImageParams? params, RawDisk? rawDisk, bool? satisfiesPzi, bool? satisfiesPzs, String? selfLink, InitialStateConfig? shieldedInstanceInitialState, String? sourceDisk, CustomerEncryptionKey? sourceDiskEncryptionKey, String? sourceDiskId, String? sourceImage, CustomerEncryptionKey? sourceImageEncryptionKey, String? sourceImageId, String? sourceSnapshot, CustomerEncryptionKey? sourceSnapshotEncryptionKey, String? sourceSnapshotId, String? sourceType, String? status, List<String> storageLocations = const []}) - Image.fromJson(Object? j)
-
factory
Properties
- architecture → String?
-
The architecture of the image. Valid values are
ARM64 or X86_64.
Check the Architecture enum for the list of possible values.
final
- archiveSizeBytes → int?
-
Size of the image tar.gz archive stored in Google Cloud
Storage (in bytes).
final
- creationTimestamp → String?
-
Output only.
Output OnlyCreation timestamp inRFC3339 text format.final - deprecated → DeprecationStatus?
-
Output only. The deprecation status associated with this image.
final
- description → String?
-
An optional description of this resource. Provide this property when you
create the resource.
final
- diskSizeGb → int?
-
Size of the image when restored onto a persistent disk (in GB).
final
- enableConfidentialCompute → bool?
-
Output only. Whether this image is created from a confidential compute mode disk.
Output Only: This field is not set by user, but from source disk.final - family → String?
-
The name of the image family to which this image belongs. The image
family name can be from a publicly managed image family provided by
Compute Engine, or from a custom image family you create. For example,centos-stream-9 is a publicly available image family.
For more information, see Image
family best practices.
final
-
guestOsFeatures
→ List<
GuestOsFeature> -
A list of features to enable on the guest operating system. Applicable
only for bootable images. To see a list of available options, see theguestOSfeatures[].type parameter.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- id → BigInt?
-
Output only.
Output OnlyThe unique identifier for the resource. This identifier is defined by the server.final - imageEncryptionKey → CustomerEncryptionKey?
-
Encrypts the image using acustomer-supplied
encryption key.
final
- kind → String?
-
Output only.
Output OnlyType of the resource. Always compute#image for images.final - labelFingerprint → String?
-
A fingerprint for the labels being applied to this image, which is
essentially a hash of the labels used for optimistic locking. The
fingerprint is initially generated by Compute Engine and changes after
every request to modify or update labels. You must always provide an
up-to-date fingerprint hash in order to update or change labels,
otherwise the request will fail with error412 conditionNotMet.
final
-
labels
→ Map<
String, String> -
Labels to apply to this image. These can be later modified by
the setLabels method.
final
-
licenseCodes
→ List<
int> -
Integer license codes indicating which licenses are attached to this image.
final
-
licenses
→ List<
String> -
Any applicable license URI.
final
- name → String?
-
Name of the resource; provided by the client when the resource is created.
The name must be 1-63 characters long, and comply withRFC1035.
Specifically, the name must be 1-63 characters long and match the regular
expression
[a-z]([-a-z0-9]*[a-z0-9])?which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.final - params → ImageParams?
-
Input only.
Input OnlyAdditional params passed with the request, but not persisted as part of resource payload.final - qualifiedName → String
-
The fully qualified name of this message, i.e.,
google.protobuf.Durationorgoogle.rpc.ErrorInfo.finalinherited - rawDisk → RawDisk?
-
The parameters of the raw disk image.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- satisfiesPzi → bool?
-
Output only. Reserved for future use.
final
- satisfiesPzs → bool?
-
Output only.
Output OnlyReserved for future use.final - selfLink → String?
-
Output only.
Output OnlyServer-defined URL for the resource.final - shieldedInstanceInitialState → InitialStateConfig?
-
Set the secure boot keys of shielded instance.
final
- sourceDisk → String?
-
URL of the source disk used to create this image.
For example, the following are valid values:
final
- sourceDiskEncryptionKey → CustomerEncryptionKey?
-
Thecustomer-supplied
encryption key of the source disk. Required if the source disk is
protected by a customer-supplied encryption key.
final
- sourceDiskId → String?
-
Output only.
Output OnlyThe ID value of the disk used to create this image. This value may be used to determine whether the image was taken from the current or a previous instance of a given disk name.final - sourceImage → String?
-
URL of the source image used to create this image.
The following are valid formats for the URL:
final
- sourceImageEncryptionKey → CustomerEncryptionKey?
-
The customer-supplied encryption key of the source image. Required if the
source image is protected by a customer-supplied encryption key.
final
- sourceImageId → String?
-
Output only.
Output OnlyThe ID value of the image used to create this image. This value may be used to determine whether the image was taken from the current or a previous instance of a given image name.final - sourceSnapshot → String?
-
URL of the source snapshot used to create this image.
The following are valid formats for the URL:
final
- sourceSnapshotEncryptionKey → CustomerEncryptionKey?
-
The customer-supplied encryption key of the source snapshot. Required if
the source snapshot is protected by a customer-supplied encryption key.
final
- sourceSnapshotId → String?
-
Output only.
Output OnlyThe ID value of the snapshot used to create this image. This value may be used to determine whether the snapshot was taken from the current or a previous instance of a given snapshot name.final - sourceType → String?
-
The type of the image used to create this disk. The
default and only valid value is RAW.
Check the SourceType enum for the list of possible values.
final
- status → String?
-
Output only.
Output OnlyThe status of the image. An image can be used to create other resources, such as instances, only after the image has been successfully created and the status is set to READY. Possible values are FAILED, PENDING, orREADY. Check the Status enum for the list of possible values.final -
storageLocations
→ List<
String> -
Cloud Storage bucket storage location of the image (regional or
multi-regional).
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Object -
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Constants
- fullyQualifiedName → const String