v1

latestOpenAPI 3.0.0Creative Commons Attribution 3.02026-07-131,0021,0174.3 MB
machineImages

Creates a machine image in the specified project using the data that is included in the request. If you are creating a new machine image to update an existing instance, your new machine image should use the same network or, if applicable, the same subnetwork as the original instance.

post/projects/{project}/global/machineImages

Path parameters

projectstring required

Project ID for this request.

Query parameters

requestIdstring

An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.

For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.

The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).

sourceInstancestring

Required. Source instance that is used to create the machine image from.

Request body

selfLinkstring

Output only. [Output Only] The URL for this machine image. The server defines this URL.

totalStorageBytesstring int64

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

idstring uint64

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

sourceInstancestring

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
status'CREATING' | 'DELETING' | 'INVALID' | 'READY' | 'UPLOADING'

Output only. [Output Only] The status of the machine image. One of the following values:INVALID, CREATING, READY,DELETING, and UPLOADING.

storageLocationsstring[]

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

satisfiesPzsboolean

Output only. [Output Only] Reserved for future use.

namestring

Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply withRFC1035. 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.

guestFlushboolean

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

kindstring

Output only. [Output Only] The resource type, which is alwayscompute#machineImage for machine image.

creationTimestampstring

Output only. [Output Only] The creation timestamp for this machine image inRFC3339 text format.

descriptionstring

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

labelFingerprintstring byte

A fingerprint for the labels being applied to this machine image, which is essentially a hash of the labels set used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update labels. You must always provide an up-to-date fingerprint hash in order to update or change labels.

To see the latest fingerprint, make get() request to the machine image.

satisfiesPziboolean

Output only. Reserved for future use.

labelsobject

Labels to apply to this machine image. These can be later modified by the setLabels method.

Response

Successful response