Please note that the contents of this offline web site may be out of date. To access the most recent documentation visit the online version .
Note that links that point to online resources are green in color and will open in a new window.
We would love it if you could give us feedback about this material by filling this form (You have to be online to fill it)



Images

Represents an Image resource. See the Images documentation for more information.

For a list of methods for this resource, see the end of this page.

Resource representations

An Image resource.

{
  "kind": "compute#image",
  "selfLink": string,
  "id": unsigned long,
  "creationTimestamp": string,
  "name": string,
  "description": string,
  "sourceType": string,
  "rawDisk": {
    "source": string,
    "sha1Checksum": string,
    "containerType": string
  },
  "deprecated": {
    "state": string,
    "replacement": string,
    "deprecated": string,
    "obsolete": string,
    "deleted": string
  },
  "status": string,
  "archiveSizeBytes": long,
  "diskSizeGb": long,
  "sourceDisk": string,
  "sourceDiskId": string,
  "licenses": [
    string
  ]
}
Property name Value Description Notes
archiveSizeBytes long Size of the image tar.gz archive stored in Google Cloud Storage (in bytes).
creationTimestamp string [Output Only] Creation timestamp in RFC3339 text format.
deprecated nested object The deprecation status associated with this image.
deprecated. deleted string An optional RFC3339 timestamp on or after which the deprecation state of this resource will be changed to DELETED .
deprecated. deprecated string An optional RFC3339 timestamp for when the deprecation state of this resource will be changed to DEPRECATED .
deprecated. obsolete string An optional RFC3339 timestamp on or after which the deprecation state of this resource will be changed to OBSOLETE .
deprecated. replacement string A fully-qualified URL of the suggested replacement for the deprecated image. T he deprecated resource and its replacement must be resources of the same kind.
deprecated. state string The deprecation state of this image. This can be set by the client or by Google Compute Engine.


It is possible to revert deprecation states as well. For example, a deprecated image with a DELETED state can be reverted to an OBSOLETE or DEPRECATED state. To return to an active, non-deprecated state, make a request to the images().deprecate method with an empty request body.

For user-added images, Google Compute Engine will enforce the restrictions of each deprecation state as described here. However, setting an image as DELETED doesn't automatically delete the image. Users must still make a request to delete the image from Google Compute Engine.


Acceptable values are:
  • " DELETED ": Existing instances already using a DELETED image can continue to do so, but you cannot create new resources with this image. Google Compute Engine returns an error if you attempt to use the  image for a new resource and recommends a replacement.
  • " DEPRECATED ": DEPRECATED images can still be used to create new resource, but Google Compute Engine issues a warning and recommends a replacement.
  • " OBSOLETE ":  Existing instances already using an OBSOLETE image can continue to do so, but you cannot create new resources with this image. Google Compute Engine returns an error if you attempt to use the  image for a new resource and recommends a replacement.
description string Textual description of the resource; provided by the client when the resource is created.
diskSizeGb long Size of the image when it is restored onto a persistent disk (in GB).
id unsigned long [Output Only] Unique identifier for the resource. This is generated by the server.
kind string [Output Only] Type of the resource. Always compute#image .
licenses[] list Public visible licenses.
name string Name of the resource. For a custom image, this is user-defined. 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. test me
rawDisk object The parameters of the raw disk image.
rawDisk. containerType string The format used to encode and transmit the block device, which should be TAR . This is just a container and transmission format and not a runtime format. Provided by the client when the disk image is created.

Acceptable values are:
  • " TAR ": Indicates that the container is TAR type.
rawDisk. sha1Checksum string An optional SHA1 checksum of the disk image before unpackaging. This is provided by the client when the disk image is created.
rawDisk. source string The full Google Cloud Storage URL where the disk image is stored. This is provided by the client when the disk image is created.
sourceDisk string The source disk used to create this image. Once the source disk has been deleted from the system, this field will be cleared, and will not be set even if a disk with the same name has been re-created.
sourceDiskId string The 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.
sourceType string The source of the image. The source must be of type RAW .

Acceptable values are:
  • " RAW ": Indicates that the source of the image is RAW.
status string [Output Only] The 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 .


Acceptable values are:
  • " FAILED ": The image failed to be created.
  • " PENDING ": The image creation is pending.
  • " READY ": The image is ready to use.

Methods

An Image resource has the following valid methods:

delete
Deletes the specified image resource.
deprecate
Sets the deprecation status of an image. If no message body is given, clears the deprecation status instead.
get
Returns the specified image resource.
insert
Creates an image resource in the specified project using the data included in the request.
list
Retrieves the list of image resources available to the specified project.

Authentication required

You need to be signed in with Google+ to do that.

Signing you in...

Google Developers needs your permission to do that.