Reference documentation and code samples for the Google Cloud Compute V1 API class Google::Cloud::Compute::V1::MachineImage.
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, seeMachine images.
Inherits
- Object
Extended By
- Google::Protobuf::MessageExts::ClassMethods
Includes
- Google::Protobuf::MessageExts
Methods
#creation_timestamp
def creation_timestamp() -> ::String- (::String) — Output only. [Output Only] The creation timestamp for this machine image inRFC3339 text format.
#creation_timestamp=
def creation_timestamp=(value) -> ::String- value (::String) — Output only. [Output Only] The creation timestamp for this machine image inRFC3339 text format.
- (::String) — Output only. [Output Only] The creation timestamp for this machine image inRFC3339 text format.
#description
def description() -> ::String- (::String) — An optional description of this resource. Provide this property when you create the resource.
#description=
def description=(value) -> ::String- value (::String) — An optional description of this resource. Provide this property when you create the resource.
- (::String) — An optional description of this resource. Provide this property when you create the resource.
#guest_flush
def guest_flush() -> ::Boolean- (::Boolean) — [Input Only] Whether to attempt an application consistent machine image by informing the OS to prepare for the snapshot process.
#guest_flush=
def guest_flush=(value) -> ::Boolean- value (::Boolean) — [Input Only] Whether to attempt an application consistent machine image by informing the OS to prepare for the snapshot process.
- (::Boolean) — [Input Only] Whether to attempt an application consistent machine image by informing the OS to prepare for the snapshot process.
#id
def id() -> ::Integer- (::Integer) — Output only. [Output Only] A unique identifier for this machine image. The server defines this identifier.
#id=
def id=(value) -> ::Integer- value (::Integer) — Output only. [Output Only] A unique identifier for this machine image. The server defines this identifier.
- (::Integer) — Output only. [Output Only] A unique identifier for this machine image. The server defines this identifier.
#instance_properties
def instance_properties() -> ::Google::Cloud::Compute::V1::InstanceProperties- (::Google::Cloud::Compute::V1::InstanceProperties) — [Output Only] Properties of source instance
#instance_properties=
def instance_properties=(value) -> ::Google::Cloud::Compute::V1::InstanceProperties- value (::Google::Cloud::Compute::V1::InstanceProperties) — [Output Only] Properties of source instance
- (::Google::Cloud::Compute::V1::InstanceProperties) — [Output Only] Properties of source instance
#kind
def kind() -> ::String- (::String) — Output only. [Output Only] The resource type, which is alwayscompute#machineImage for machine image.
#kind=
def kind=(value) -> ::String- value (::String) — Output only. [Output Only] The resource type, which is alwayscompute#machineImage for machine image.
- (::String) — Output only. [Output Only] The resource type, which is alwayscompute#machineImage for machine image.
#label_fingerprint
def label_fingerprint() -> ::String-
(::String) — 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.
#label_fingerprint=
def label_fingerprint=(value) -> ::String-
value (::String) — 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.
-
(::String) — 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.
#labels
def labels() -> ::Google::Protobuf::Map{::String => ::String}- (::Google::Protobuf::Map{::String => ::String}) — Labels to apply to this machine image. These can be later modified by the setLabels method.
#labels=
def labels=(value) -> ::Google::Protobuf::Map{::String => ::String}- value (::Google::Protobuf::Map{::String => ::String}) — Labels to apply to this machine image. These can be later modified by the setLabels method.
- (::Google::Protobuf::Map{::String => ::String}) — Labels to apply to this machine image. These can be later modified by the setLabels method.
#machine_image_encryption_key
def machine_image_encryption_key() -> ::Google::Cloud::Compute::V1::CustomerEncryptionKey-
(::Google::Cloud::Compute::V1::CustomerEncryptionKey) — Encrypts the machine image using acustomer-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.
#machine_image_encryption_key=
def machine_image_encryption_key=(value) -> ::Google::Cloud::Compute::V1::CustomerEncryptionKey-
value (::Google::Cloud::Compute::V1::CustomerEncryptionKey) — Encrypts the machine image using acustomer-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.
-
(::Google::Cloud::Compute::V1::CustomerEncryptionKey) — Encrypts the machine image using acustomer-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.
#name
def name() -> ::String-
(::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.
#name=
def name=(value) -> ::String-
value (::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.
-
(::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.
#params
def params() -> ::Google::Cloud::Compute::V1::MachineImageParams- (::Google::Cloud::Compute::V1::MachineImageParams) — Input only. [Input Only] Additional parameters that are passed in the request, but are not persisted in the resource.
#params=
def params=(value) -> ::Google::Cloud::Compute::V1::MachineImageParams- value (::Google::Cloud::Compute::V1::MachineImageParams) — Input only. [Input Only] Additional parameters that are passed in the request, but are not persisted in the resource.
- (::Google::Cloud::Compute::V1::MachineImageParams) — Input only. [Input Only] Additional parameters that are passed in the request, but are not persisted in the resource.
#satisfies_pzi
def satisfies_pzi() -> ::Boolean- (::Boolean) — Output only. Reserved for future use.
#satisfies_pzi=
def satisfies_pzi=(value) -> ::Boolean- value (::Boolean) — Output only. Reserved for future use.
- (::Boolean) — Output only. Reserved for future use.
#satisfies_pzs
def satisfies_pzs() -> ::Boolean- (::Boolean) — Output only. [Output Only] Reserved for future use.
#satisfies_pzs=
def satisfies_pzs=(value) -> ::Boolean- value (::Boolean) — Output only. [Output Only] Reserved for future use.
- (::Boolean) — Output only. [Output Only] Reserved for future use.
#saved_disks
def saved_disks() -> ::Array<::Google::Cloud::Compute::V1::SavedDisk>- (::Array<::Google::Cloud::Compute::V1::SavedDisk>) — Output only. An array of Machine Image specific properties for disks attached to the source instance
#saved_disks=
def saved_disks=(value) -> ::Array<::Google::Cloud::Compute::V1::SavedDisk>- value (::Array<::Google::Cloud::Compute::V1::SavedDisk>) — Output only. An array of Machine Image specific properties for disks attached to the source instance
- (::Array<::Google::Cloud::Compute::V1::SavedDisk>) — Output only. An array of Machine Image specific properties for disks attached to the source instance
#self_link
def self_link() -> ::String- (::String) — Output only. [Output Only] The URL for this machine image. The server defines this URL.
#self_link=
def self_link=(value) -> ::String- value (::String) — Output only. [Output Only] The URL for this machine image. The server defines this URL.
- (::String) — Output only. [Output Only] The URL for this machine image. The server defines this URL.
#source_disk_encryption_keys
def source_disk_encryption_keys() -> ::Array<::Google::Cloud::Compute::V1::SourceDiskEncryptionKey>- (::Array<::Google::Cloud::Compute::V1::SourceDiskEncryptionKey>) — [Input Only] Thecustomer-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_disk_encryption_keys=
def source_disk_encryption_keys=(value) -> ::Array<::Google::Cloud::Compute::V1::SourceDiskEncryptionKey>- value (::Array<::Google::Cloud::Compute::V1::SourceDiskEncryptionKey>) — [Input Only] Thecustomer-supplied encryption key of the disks attached to the source instance. Required if the source disk is protected by a customer-supplied encryption key.
- (::Array<::Google::Cloud::Compute::V1::SourceDiskEncryptionKey>) — [Input Only] Thecustomer-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
def source_instance() -> ::String-
(::String) —
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
#source_instance=
def source_instance=(value) -> ::String-
value (::String) —
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
-
(::String) —
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
#source_instance_properties
def source_instance_properties() -> ::Google::Cloud::Compute::V1::SourceInstanceProperties- (::Google::Cloud::Compute::V1::SourceInstanceProperties) — Output only. [Output Only] DEPRECATED: Please use instance_properties instead for source instance related properties. New properties will not be added to this field.
#source_instance_properties=
def source_instance_properties=(value) -> ::Google::Cloud::Compute::V1::SourceInstanceProperties- value (::Google::Cloud::Compute::V1::SourceInstanceProperties) — Output only. [Output Only] DEPRECATED: Please use instance_properties instead for source instance related properties. New properties will not be added to this field.
- (::Google::Cloud::Compute::V1::SourceInstanceProperties) — Output only. [Output Only] DEPRECATED: Please use instance_properties instead for source instance related properties. New properties will not be added to this field.
#status
def status() -> ::String- (::String) — Output only. [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.
#status=
def status=(value) -> ::String- value (::String) — Output only. [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.
- (::String) — Output only. [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.
#storage_locations
def storage_locations() -> ::Array<::String>- (::Array<::String>) — The regional or multi-regional Cloud Storage bucket location where themachine image is stored.
#storage_locations=
def storage_locations=(value) -> ::Array<::String>- value (::Array<::String>) — The regional or multi-regional Cloud Storage bucket location where themachine image is stored.
- (::Array<::String>) — The regional or multi-regional Cloud Storage bucket location where themachine image is stored.
#total_storage_bytes
def total_storage_bytes() -> ::Integer- (::Integer) — Output only. [Output Only] Total size of the storage used by the machine image.
#total_storage_bytes=
def total_storage_bytes=(value) -> ::Integer- value (::Integer) — Output only. [Output Only] Total size of the storage used by the machine image.
- (::Integer) — Output only. [Output Only] Total size of the storage used by the machine image.