Method: images.get

Returns the specified image. Gets a list of available images by making a list() request.

HTTP request

GET https://compute.googleapis.com/compute/v1/projects/{project}/global/images/{resourceId}

The URL uses gRPC Transcoding syntax.

Path parameters

Parameters
project

string

Project ID for this request.

resourceId

string

Name of the image resource to return.

Request body

The request body must be empty.

Response body

If successful, the response body contains data with the following structure:

Represents an Image resource.

You can use images to create boot disks for your VM instances. For more information, read Images.

JSON representation
{
  "id": string,
  "creationTimestamp": string,
  "name": string,
  "description": string,
  "sourceType": enum,
  "rawDisk": {
    "source": string,
    "sha1Checksum": string,
    "containerType": enum
  },
  "deprecated": {
    "state": enum,
    "replacement": string,
    "deprecated": string,
    "obsolete": string,
    "deleted": string
  },
  "status": enum,
  "archiveSizeBytes": string,
  "diskSizeGb": string,
  "sourceDisk": string,
  "sourceDiskId": string,
  "licenses": [
    string
  ],
  "family": string,
  "imageEncryptionKey": {
    "rawKey": string,
    "rsaEncryptedKey": string,
    "kmsKeyName": string,
    "sha256": string,
    "kmsKeyServiceAccount": string
  },
  "sourceDiskEncryptionKey": {
    "rawKey": string,
    "rsaEncryptedKey": string,
    "kmsKeyName": string,
    "sha256": string,
    "kmsKeyServiceAccount": string
  },
  "selfLink": string,
  "labels": {
    string: string,
    ...
  },
  "labelFingerprint": string,
  "guestOsFeatures": [
    {
      "type": enum
    }
  ],
  "licenseCodes": [
    string
  ],
  "sourceImage": string,
  "sourceImageId": string,
  "sourceImageEncryptionKey": {
    "rawKey": string,
    "rsaEncryptedKey": string,
    "kmsKeyName": string,
    "sha256": string,
    "kmsKeyServiceAccount": string
  },
  "sourceSnapshot": string,
  "sourceSnapshotId": string,
  "sourceSnapshotEncryptionKey": {
    "rawKey": string,
    "rsaEncryptedKey": string,
    "kmsKeyName": string,
    "sha256": string,
    "kmsKeyServiceAccount": string
  },
  "storageLocations": [
    string
  ],
  "shieldedInstanceInitialState": {
    "pk": {
      "content": string,
      "fileType": enum
    },
    "keks": [
      {
        "content": string,
        "fileType": enum
      }
    ],
    "dbs": [
      {
        "content": string,
        "fileType": enum
      }
    ],
    "dbxs": [
      {
        "content": string,
        "fileType": enum
      }
    ]
  },
  "satisfiesPzs": boolean,
  "kind": string
}
Fields
id

string (uint64 format)

[Output Only] The unique identifier for the resource. This identifier is defined by the server.

creationTimestamp

string

[Output Only] Creation timestamp 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.

sourceType

enum

The type of the image used to create this disk. The default and only value is RAW

rawDisk

object

The parameters of the raw disk image.

rawDisk.source

string

The full Google Cloud Storage URL where the raw disk image archive is stored. The following are valid formats for the URL:

In order to create an image, you must provide the full or partial URL of one of the following:

  • The rawDisk.source URL
  • The sourceDisk URL
  • The sourceImage URL
  • The sourceSnapshot URL

rawDisk.sha1Checksum
(deprecated)

string

[Deprecated] This field is deprecated. An optional SHA1 checksum of the disk image before unpackaging provided by the client when the disk image is created.

rawDisk.containerType

enum

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.

deprecated

object

The deprecation status associated with this image.