REST Resource: machineImages

Resource: 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.

JSON representation
{
  "kind": string,
  "id": string,
  "creationTimestamp": string,
  "name": string,
  "description": string,
  "selfLink": string,
  "sourceInstance": string,
  "status": enum (Status),
  "sourceInstanceProperties": {
    object (SourceInstanceProperties)
  },
  "instanceProperties": {
    object (InstanceProperties)
  },
  "savedDisks": [
    {
      object (SavedDisk)
    }
  ],
  "storageLocations": [
    string
  ],
  "machineImageEncryptionKey": {
    object (CustomerEncryptionKey)
  },
  "guestFlush": boolean,
  "sourceDiskEncryptionKeys": [
    {
      object (SourceDiskEncryptionKey)
    }
  ],
  "totalStorageBytes": string,
  "satisfiesPzs": boolean,
  "satisfiesPzi": boolean
}
Fields
kind

string

[Output Only] The resource type, which is always

compute#machineImage

for machine image.

id

string (uint64 format)

[Output Only] A unique identifier for this machine image. The server defines this identifier.

creationTimestamp

string

[Output Only] The creation timestamp for this machine image in RFC3339 text format.

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 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.

description

string

An optional description of this resource. Provide this property when you create the resource.

sourceInstance

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:

status

enum (Status)

[Output Only] The status of the machine image. One of the following values:

INVALID

,

CREATING

,

READY

,

DELETING

, and

UPLOADING

.

sourceInstanceProperties

object (SourceInstanceProperties)

[Output Only] DEPRECATED: Please use

instanceProperties

instead for source instance related properties. New properties will not be added to this field.

instanceProperties

object (InstanceProperties)

[Output Only] Properties of source instance

savedDisks[]

object (SavedDisk)

An array of Machine Image specific properties for disks attached to the source instance

storageLocations[]

string

The regional or multi-regional Cloud Storage bucket location where the machine image is stored.

machineImageEncryptionKey

object (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.

guestFlush

boolean

[Input Only] Whether to attempt an application consistent machine image by informing the OS to prepare for the snapshot process.

sourceDiskEncryptionKeys[]

object (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.

totalStorageBytes

string (int64 format)

[Output Only] Total size of the storage used by the machine image.

satisfiesPzs

boolean

[Output Only] Reserved for future use.

satisfiesPzi

boolean

Output only. Reserved for future use.

Status

Enums
INVALID
CREATING
READY
DELETING
UPLOADING

SourceInstanceProperties

DEPRECATED: Please use

compute#instanceProperties

instead. New properties will not be added to this field.

JSON representation
{
  "description": string,
  "tags": {
    object (Tags)
  },
  "machineType": string,
  "canIpForward": boolean,
  "networkInterfaces": [
    {
      object (NetworkInterface)
    }
  ],
  "disks": [
    {
      object (SavedAttachedDisk)
    }
  ],
  "metadata": {
    object (Metadata)
  },
  "serviceAccounts": [
    {
      object (ServiceAccount)
    }
  ],
  "scheduling": {
    object (Scheduling)
  },
  "labels": {
    string: string,
    ...
  },
  "guestAccelerators": [
    {
      object (AcceleratorConfig)
    }
  ],
  "minCpuPlatform": string,
  "deletionProtection": boolean,
  "keyRevocationActionType": enum (KeyRevocationActionType)
}
Fields
description

string

An optional text description for the instances that are created from this machine image.

tags

object (Tags)

A list of tags to apply to the instances that are created from this machine image. The tags identify valid sources or targets for network firewalls. The setTags method can modify this list of tags. Each tag within the list must comply with RFC1035.

machineType

string

The machine type to use for instances that are created from this machine image.

canIpForward

boolean

Enables instances created based on this machine image to send packets with source IP addresses other than their own and receive packets with destination IP addresses other than their own. If these instances will be used as an IP gateway or it will be set as the next-hop in a Route resource, specify

true

. If unsure, leave this set to

false

. See the Enable IP forwarding documentation for more information.

networkInterfaces[]

object (NetworkInterface)

An array of network access configurations for this interface.

disks[]

object (SavedAttachedDisk)

An array of disks that are associated with the instances that are created from this machine image.

metadata

object (Metadata)

The metadata key/value pairs to assign to instances that are created from this machine image. These pairs can consist of custom metadata or predefined keys. See Project and instance metadata for more information.

serviceAccounts[]

object (ServiceAccount)

A list of service accounts with specified scopes. Access tokens for these service accounts are available to the instances that are created from this machine image. Use metadata queries to obtain the access tokens for these instances.

scheduling

object (Scheduling)

Specifies the scheduling options for the instances that are created from this machine image.

labels

map (key: string, value: string)

Labels to apply to instances that are created from this machine image.

guestAccelerators[]

object (AcceleratorConfig)

A list of guest accelerator cards' type and count to use for instances created from this machine image.

minCpuPlatform

string

Minimum cpu/platform to be used by instances created from this machine image. The instance may be scheduled on the specified or newer cpu/platform. Applicable values are the friendly names of CPU platforms, such as

minCpuPlatform: "Intel Haswell"

or

minCpuPlatform: "Intel Sandy Bridge"

. For more information, read Specifying a Minimum CPU Platform.

deletionProtection

boolean

Whether the instance created from this machine image should be protected against deletion.

keyRevocationActionType

enum (KeyRevocationActionType)

KeyRevocationActionType of the instance. Supported options are "STOP" and "NONE". The default value is "NONE" if it is not specified.

SavedAttachedDisk

DEPRECATED: Please use

compute#savedDisk

instead. An instance-attached disk resource.

JSON representation
{
  "kind": string,
  "type": enum (DiskType),
  "mode": enum (DiskMode),
  "source": string,
  "deviceName": string,
  "index": integer,
  "boot": boolean,
  "autoDelete": boolean,
  "licenses": [
    string
  ],
  "interface": enum (DiskInterface),
  "guestOsFeatures": [
    {
      object (GuestOsFeature)
    }
  ],
  "diskEncryptionKey": {
    object (CustomerEncryptionKey)
  },
  "diskSizeGb": string,
  "storageBytes": string,
  "storageBytesStatus": enum (StorageBytesStatus),
  "diskType": string
}
Fields
kind

string

[Output Only] Type of the resource. Always

compute#attachedDisk

for attached disks.

type

enum (DiskType)

Specifies the type of the attached disk, either

SCRATCH

or

PERSISTENT

.

mode

enum (DiskMode)

The mode in which this disk is attached to the source instance, either

READ_WRITE

or

READ_ONLY

.

source

string

Specifies a URL of the disk attached to the source instance.

deviceName

string

Specifies the name of the disk attached to the source instance.

index

integer

Specifies zero-based index of the disk that is attached to the source instance.

boot

boolean

Indicates that this is a boot disk. The virtual machine will use the first partition of the disk for its root filesystem.

autoDelete

boolean

Specifies whether the disk will be auto-deleted when the instance is deleted (but not when the disk is detached from the instance).

licenses[]

string

[Output Only] Any valid publicly visible licenses.

interface

enum (DiskInterface)

Specifies the disk interface to use for attaching this disk, which is either

SCSI

or

NVME

.

guestOsFeatures[]

object (GuestOsFeature)

A list of features to enable on the guest operating system. Applicable only for bootable images. Read Enabling guest operating system features to see a list of available options.

diskEncryptionKey

object (CustomerEncryptionKey)

The encryption key for the disk.

diskSizeGb

string (int64 format)

The size of the disk in base-2 GB.

storageBytes

string (int64 format)

[Output Only] A size of the storage used by the disk's snapshot by this machine image.

storageBytesStatus

enum (StorageBytesStatus)

[Output Only] An indicator whether

storageBytes

is in a stable state or it is being adjusted as a result of shared storage reallocation. This status can either be

UPDATING

, meaning the size of the snapshot is being updated, or

UP_TO_DATE

, meaning the size of the snapshot is up-to-date.

diskType

string

[Output Only] URL of the disk type resource. For example:

projects/project/zones/zone/diskTypes/pd-standard or pd-ssd

SavedDisk

An instance-attached disk resource.

JSON representation
{
  "kind": string,
  "sourceDisk": string,
  "storageBytes": string,
  "storageBytesStatus": enum (StorageBytesStatus),
  "architecture": enum (Architecture)
}
Fields
kind

string

[Output Only] Type of the resource. Always

compute#savedDisk

for attached disks.

sourceDisk

string

Specifies a URL of the disk attached to the source instance.

storageBytes

string (int64 format)

[Output Only] Size of the individual disk snapshot used by this machine image.

storageBytesStatus

enum (StorageBytesStatus)

[Output Only] An indicator whether

storageBytes

is in a stable state or it is being adjusted as a result of shared storage reallocation. This status can either be

UPDATING

, meaning the size of the snapshot is being updated, or

UP_TO_DATE

, meaning the size of the snapshot is up-to-date.

architecture

enum (Architecture)

[Output Only] The architecture of the attached disk.

SourceDiskEncryptionKey

JSON representation
{
  "sourceDisk": string,
  "diskEncryptionKey": {
    object (CustomerEncryptionKey)
  }
}
Fields
sourceDisk

string

URL of the disk attached to the source instance. This can be a full or valid partial URL. For example, the following are valid values:

diskEncryptionKey

object (CustomerEncryptionKey)

The customer-supplied encryption key of the source disk. Required if the source disk is protected by a customer-supplied encryption key.

Methods

delete

The method compute.v1.MachineImagesService.Delete is not available in this (s3nsapis.fr) universe.

get

The method compute.v1.MachineImagesService.Get is not available in this (s3nsapis.fr) universe.

getIamPolicy

The method compute.v1.MachineImagesService.GetPolicy is not available in this (s3nsapis.fr) universe.

insert

The method compute.v1.MachineImagesService.Insert is not available in this (s3nsapis.fr) universe.

list

The method compute.v1.MachineImagesService.List is not available in this (s3nsapis.fr) universe.

setIamPolicy

The method compute.v1.MachineImagesService.SetPolicy is not available in this (s3nsapis.fr) universe.

testIamPermissions

The method compute.v1.MachineImagesService.TestPermissions is not available in this (s3nsapis.fr) universe.