Skip to main content

machine_types

Creates, updates, deletes, gets or lists a machine_types resource.

Overview

Namemachine_types
TypeResource
Idgoogle.compute.machine_types

Fields

The following fields are returned by SELECT queries:

Successful response

NameDatatypeDescription
idstring (uint64)[Output Only] The unique identifier for the resource. This identifier is defined by the server.
namestring[Output Only] Name of the resource. (pattern: a-z?)
acceleratorsarray[Output Only] A list of accelerator configurations assigned to this machine type.
architecturestring[Output Only] The architecture of the machine type.
creationTimestampstring[Output Only] Creation timestamp in RFC3339 text format.
deprecatedobject[Output Only] The deprecation status associated with this machine type. Only applicable if the machine type is unavailable. (id: DeprecationStatus)
descriptionstring[Output Only] An optional textual description of the resource.
guestCpusinteger (int32)[Output Only] The number of virtual CPUs that are available to the instance.
imageSpaceGbinteger (int32)[Deprecated] This property is deprecated and will never be populated with any relevant values.
isSharedCpuboolean[Output Only] Whether this machine type has a shared CPU. See Shared-core machine types for more information.
kindstring[Output Only] The type of the resource. Always compute#machineType for machine types. (default: compute#machineType)
maximumPersistentDisksinteger (int32)[Output Only] Maximum persistent disks allowed.
maximumPersistentDisksSizeGbstring (int64)[Output Only] Maximum total persistent disks size (GB) allowed.
memoryMbinteger (int32)[Output Only] The amount of physical memory available to the instance, defined in MB.
selfLinkstring[Output Only] Server-defined URL for the resource.
zonestring[Output Only] The name of the zone where the machine type resides, such as us-central1-a.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectproject, zone, machineTypeReturns the specified machine type.
listselectproject, zonefilter, maxResults, orderBy, pageToken, returnPartialSuccessRetrieves a list of machine types available to the specified project.
aggregated_listselectprojectfilter, includeAllScopes, maxResults, orderBy, pageToken, returnPartialSuccess, serviceProjectNumberRetrieves an aggregated list of machine types. To prevent failure, Google recommends that you set the returnPartialSuccess parameter to true.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
machineTypestring
projectstring
zonestring
filterstring
includeAllScopesboolean
maxResultsinteger (uint32)
orderBystring
pageTokenstring
returnPartialSuccessboolean
serviceProjectNumberstring (int64)

SELECT examples

Returns the specified machine type.

SELECT
id,
name,
accelerators,
architecture,
creationTimestamp,
deprecated,
description,
guestCpus,
imageSpaceGb,
isSharedCpu,
kind,
maximumPersistentDisks,
maximumPersistentDisksSizeGb,
memoryMb,
selfLink,
zone
FROM google.compute.machine_types
WHERE project = '{{ project }}' -- required
AND zone = '{{ zone }}' -- required
AND machineType = '{{ machineType }}' -- required;