Class MachineImage (1.30.0)

MachineImage(mapping=None, *, ignore_unknown_fields=False, **kwargs)

Represents a machine image resource. A machine image is a Compute Engine resource that stores all the configuration, metadata, permissions, and data from one or more disks required to create a Virtual machine (VM) instance. For more information, see Machine images.

.. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields

Attributes

Name Description
creation_timestamp str
[Output Only] The creation timestamp for this machine image in RFC3339 text format. This field is a member of oneof_ _creation_timestamp.
description str
An optional description of this resource. Provide this property when you create the resource. This field is a member of oneof_ _description.
guest_flush bool
[Input Only] Whether to attempt an application consistent machine image by informing the OS to prepare for the snapshot process. This field is a member of oneof_ _guest_flush.
id int
[Output Only] A unique identifier for this machine image. The server defines this identifier. This field is a member of oneof_ _id.
instance_properties google.cloud.compute_v1.types.InstanceProperties
[Output Only] Properties of source instance This field is a member of oneof_ _instance_properties.
kind str
[Output Only] The resource type, which is always compute#machineImage for machine image. This field is a member of oneof_ _kind.
label_fingerprint str
A fingerprint for the labels being applied to this machine image, which is essentially a hash of the labels set 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. To see the latest fingerprint, make get() request to the machine image. This field is a member of oneof_ _label_fingerprint.
labels MutableMapping[str, str]
Labels to apply to this machine image. These can be later modified by the setLabels method.
machine_image_encryption_key google.cloud.compute_v1.types.CustomerEncryptionKey
Encrypts the machine image using a customer-supplied encryption key. After you encrypt a machine image using a customer-supplied key, you must provide the same key if you use the machine image later. For example, you must provide the encryption key when you create an instance from the encrypted machine image in a future request. Customer-supplied encryption keys do not protect access to metadata of the machine image. If you do not provide an encryption key when creating the machine image, then the machine image will be encrypted using an automatically generated key and you do not need to provide a key to use the machine image later. This field is a member of oneof_ _machine_image_encryption_key.
name str
Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. 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. This field is a member of oneof_ _name.
satisfies_pzi bool
Output only. Reserved for future use. This field is a member of oneof_ _satisfies_pzi.
satisfies_pzs bool
[Output Only] Reserved for future use. This field is a member of oneof_ _satisfies_pzs.
saved_disks MutableSequence[google.cloud.compute_v1.types.SavedDisk]
An array of Machine Image specific properties for disks attached to the source instance
self_link str
[Output Only] The URL for this machine image. The server defines this URL. This field is a member of oneof_ _self_link.
source_disk_encryption_keys MutableSequence[google.cloud.compute_v1.types.SourceDiskEncryptionKey]
[Input Only] The customer-supplied encryption key of the disks attached to the source instance. Required if the source disk is protected by a customer-supplied encryption key.
source_instance str
The source instance used to create the machine image. You can provide this as a partial or full URL to the resource. For example, the following are valid values: - https://www.googleapis.com/compute/v1/projects/project/zones/zone /instances/instance - projects/project/zones/zone/instances/instance This field is a member of oneof_ _source_instance.
source_instance_properties google.cloud.compute_v1.types.SourceInstanceProperties
[Output Only] DEPRECATED: Please use instance_properties instead for source instance related properties. New properties will not be added to this field. This field is a member of oneof_ _source_instance_properties.
status str
[Output Only] The status of the machine image. One of the following values: INVALID, CREATING, READY, DELETING, and UPLOADING. Check the Status enum for the list of possible values. This field is a member of oneof_ _status.
storage_locations MutableSequence[str]
The regional or multi-regional Cloud Storage bucket location where the machine image is stored.
total_storage_bytes int
[Output Only] Total size of the storage used by the machine image. This field is a member of oneof_ _total_storage_bytes.

Classes

LabelsEntry

LabelsEntry(mapping=None, *, ignore_unknown_fields=False, **kwargs)

The abstract base class for a message.

Parameters
Name Description
kwargs dict

Keys and values corresponding to the fields of the message.

mapping Union[dict, .Message]

A dictionary or message to be used to determine the values for this message.

ignore_unknown_fields Optional(bool)

If True, do not raise errors for unknown fields. Only applied if mapping is a mapping type or there are keyword parameters.

Status

Status(value)

[Output Only] The status of the machine image. One of the following values: INVALID, CREATING, READY, DELETING, and UPLOADING.