Google Cloud Compute V1 API - Class Google::Cloud::Compute::V1::MachineImage (v1.4.0)

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, see Machine images.

Inherits

  • Object

Extended By

  • Google::Protobuf::MessageExts::ClassMethods

Includes

  • Google::Protobuf::MessageExts

Methods

#creation_timestamp

def creation_timestamp() -> ::String
Returns
  • (::String) — [Output Only] The creation timestamp for this machine image in RFC3339 text format.

#creation_timestamp=

def creation_timestamp=(value) -> ::String
Parameter
  • value (::String) — [Output Only] The creation timestamp for this machine image in RFC3339 text format.
Returns
  • (::String) — [Output Only] The creation timestamp for this machine image in RFC3339 text format.

#description

def description() -> ::String
Returns
  • (::String) — An optional description of this resource. Provide this property when you create the resource.

#description=

def description=(value) -> ::String
Parameter
  • value (::String) — An optional description of this resource. Provide this property when you create the resource.
Returns
  • (::String) — An optional description of this resource. Provide this property when you create the resource.

#guest_flush

def guest_flush() -> ::Boolean
Returns
  • (::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
Parameter
  • value (::Boolean) — [Input Only] Whether to attempt an application consistent machine image by informing the OS to prepare for the snapshot process.
Returns
  • (::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
Returns
  • (::Integer) — [Output Only] A unique identifier for this machine image. The server defines this identifier.

#id=

def id=(value) -> ::Integer
Parameter
  • value (::Integer) — [Output Only] A unique identifier for this machine image. The server defines this identifier.
Returns
  • (::Integer) — [Output Only] A unique identifier for this machine image. The server defines this identifier.

#instance_properties

def instance_properties() -> ::Google::Cloud::Compute::V1::InstanceProperties
Returns

#instance_properties=

def instance_properties=(value) -> ::Google::Cloud::Compute::V1::InstanceProperties
Parameter
Returns

#kind

def kind() -> ::String
Returns
  • (::String) — [Output Only] The resource type, which is always compute#machineImage for machine image.

#kind=

def kind=(value) -> ::String
Parameter
  • value (::String) — [Output Only] The resource type, which is always compute#machineImage for machine image.
Returns
  • (::String) — [Output Only] The resource type, which is always compute#machineImage for machine image.

#machine_image_encryption_key

def machine_image_encryption_key() -> ::Google::Cloud::Compute::V1::CustomerEncryptionKey
Returns
  • (::Google::Cloud::Compute::V1::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.

#machine_image_encryption_key=

def machine_image_encryption_key=(value) -> ::Google::Cloud::Compute::V1::CustomerEncryptionKey
Parameter
  • value (::Google::Cloud::Compute::V1::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.
Returns
  • (::Google::Cloud::Compute::V1::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.

#name

def name() -> ::String
Returns
  • (::String) — 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.

#name=

def name=(value) -> ::String
Parameter
  • 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 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.
Returns
  • (::String) — 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.

#satisfies_pzs

def satisfies_pzs() -> ::Boolean
Returns
  • (::Boolean) — [Output Only] Reserved for future use.

#satisfies_pzs=

def satisfies_pzs=(value) -> ::Boolean
Parameter
  • value (::Boolean) — [Output Only] Reserved for future use.
Returns
  • (::Boolean) — [Output Only] Reserved for future use.

#saved_disks

def saved_disks() -> ::Array<::Google::Cloud::Compute::V1::SavedDisk>
Returns

#saved_disks=

def saved_disks=(value) -> ::Array<::Google::Cloud::Compute::V1::SavedDisk>
Parameter
Returns
def self_link() -> ::String
Returns
  • (::String) — [Output Only] The URL for this machine image. The server defines this URL.
def self_link=(value) -> ::String
Parameter
  • value (::String) — [Output Only] The URL for this machine image. The server defines this URL.
Returns
  • (::String) — [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>
Returns

#source_disk_encryption_keys=

def source_disk_encryption_keys=(value) -> ::Array<::Google::Cloud::Compute::V1::SourceDiskEncryptionKey>
Parameter
Returns

#source_instance

def source_instance() -> ::String
Returns
  • (::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
Parameter
  • 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
Returns
  • (::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
Returns

#source_instance_properties=

def source_instance_properties=(value) -> ::Google::Cloud::Compute::V1::SourceInstanceProperties
Parameter
Returns

#status

def status() -> ::String
Returns
  • (::String) — [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
Parameter
  • value (::String) — [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.
Returns
  • (::String) — [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>
Returns
  • (::Array<::String>) — The regional or multi-regional Cloud Storage bucket location where the machine image is stored.

#storage_locations=

def storage_locations=(value) -> ::Array<::String>
Parameter
  • value (::Array<::String>) — The regional or multi-regional Cloud Storage bucket location where the machine image is stored.
Returns
  • (::Array<::String>) — The regional or multi-regional Cloud Storage bucket location where the machine image is stored.

#total_storage_bytes

def total_storage_bytes() -> ::Integer
Returns
  • (::Integer) — [Output Only] Total size of the storage used by the machine image.

#total_storage_bytes=

def total_storage_bytes=(value) -> ::Integer
Parameter
  • value (::Integer) — [Output Only] Total size of the storage used by the machine image.
Returns
  • (::Integer) — [Output Only] Total size of the storage used by the machine image.