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:
|
|
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:
|
|
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. | |
selfLink
|
string
|
[Output Only] Server-defined fully-qualified URL for this resource. | |
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:
|
|
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:
|
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.