machine_types
Creates, updates, deletes, gets or lists a machine_types resource.
Overview
| Name | machine_types |
| Type | Resource |
| Id | google.compute.machine_types |
Fields
The following fields are returned by SELECT queries:
- get
- list
- aggregated_list
| Name | Datatype | Description |
|---|---|---|
id | string (uint64) | [Output Only] The unique identifier for the resource. This identifier is defined by the server. |
name | string | [Output Only] Name of the resource. (pattern: a-z?) |
accelerators | array | [Output Only] A list of accelerator configurations assigned to this machine type. |
architecture | string | [Output Only] The architecture of the machine type. |
creationTimestamp | string | [Output Only] Creation timestamp in RFC3339 text format. |
deprecated | object | [Output Only] The deprecation status associated with this machine type. Only applicable if the machine type is unavailable. (id: DeprecationStatus) |
description | string | [Output Only] An optional textual description of the resource. |
guestCpus | integer (int32) | [Output Only] The number of virtual CPUs that are available to the instance. |
imageSpaceGb | integer (int32) | [Deprecated] This property is deprecated and will never be populated with any relevant values. |
isSharedCpu | boolean | [Output Only] Whether this machine type has a shared CPU. See Shared-core machine types for more information. |
kind | string | [Output Only] The type of the resource. Always compute#machineType for machine types. (default: compute#machineType) |
maximumPersistentDisks | integer (int32) | [Output Only] Maximum persistent disks allowed. |
maximumPersistentDisksSizeGb | string (int64) | [Output Only] Maximum total persistent disks size (GB) allowed. |
memoryMb | integer (int32) | [Output Only] The amount of physical memory available to the instance, defined in MB. |
selfLink | string | [Output Only] Server-defined URL for the resource. |
zone | string | [Output Only] The name of the zone where the machine type resides, such as us-central1-a. |
| Name | Datatype | Description |
|---|---|---|
id | string | [Output Only] Unique identifier for the resource; defined by the server. |
items | array | A list of MachineType resources. |
kind | string | [Output Only] Type of resource. Always compute#machineTypeList for lists of machine types. (default: compute#machineTypeList) |
nextPageToken | string | [Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. |
selfLink | string | [Output Only] Server-defined URL for this resource. |
warning | object | [Output Only] Informational warning message. |
| Name | Datatype | Description |
|---|---|---|
id | string (uint64) | [Output Only] The unique identifier for the resource. This identifier is defined by the server. |
name | string | [Output Only] Name of the resource. (pattern: a-z?) |
accelerators | array | [Output Only] A list of accelerator configurations assigned to this machine type. |
architecture | string | [Output Only] The architecture of the machine type. |
creationTimestamp | string | [Output Only] Creation timestamp in RFC3339 text format. |
deprecated | object | [Output Only] The deprecation status associated with this machine type. Only applicable if the machine type is unavailable. (id: DeprecationStatus) |
description | string | [Output Only] An optional textual description of the resource. |
guestCpus | integer (int32) | [Output Only] The number of virtual CPUs that are available to the instance. |
imageSpaceGb | integer (int32) | [Deprecated] This property is deprecated and will never be populated with any relevant values. |
isSharedCpu | boolean | [Output Only] Whether this machine type has a shared CPU. See Shared-core machine types for more information. |
kind | string | [Output Only] The type of the resource. Always compute#machineType for machine types. (default: compute#machineType) |
maximumPersistentDisks | integer (int32) | [Output Only] Maximum persistent disks allowed. |
maximumPersistentDisksSizeGb | string (int64) | [Output Only] Maximum total persistent disks size (GB) allowed. |
memoryMb | integer (int32) | [Output Only] The amount of physical memory available to the instance, defined in MB. |
selfLink | string | [Output Only] Server-defined URL for the resource. |
zone | string | [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:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | project, zone, machineType | Returns the specified machine type. | |
list | select | project, zone | filter, maxResults, orderBy, pageToken, returnPartialSuccess | Retrieves a list of machine types available to the specified project. |
aggregated_list | select | project | filter, includeAllScopes, maxResults, orderBy, pageToken, returnPartialSuccess, serviceProjectNumber | Retrieves 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.
| Name | Datatype | Description |
|---|---|---|
machineType | string | |
project | string | |
zone | string | |
filter | string | |
includeAllScopes | boolean | |
maxResults | integer (uint32) | |
orderBy | string | |
pageToken | string | |
returnPartialSuccess | boolean | |
serviceProjectNumber | string (int64) |
SELECT examples
- get
- list
- aggregated_list
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
;
Retrieves a list of machine types available to the specified project.
SELECT
id,
items,
kind,
nextPageToken,
selfLink,
warning
FROM google.compute.machine_types
WHERE project = '{{ project }}' -- required
AND zone = '{{ zone }}' -- required
AND filter = '{{ filter }}'
AND maxResults = '{{ maxResults }}'
AND orderBy = '{{ orderBy }}'
AND pageToken = '{{ pageToken }}'
AND returnPartialSuccess = '{{ returnPartialSuccess }}'
;
Retrieves an aggregated list of machine types. To prevent failure, Google recommends that you set the returnPartialSuccess parameter to true.
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 filter = '{{ filter }}'
AND includeAllScopes = '{{ includeAllScopes }}'
AND maxResults = '{{ maxResults }}'
AND orderBy = '{{ orderBy }}'
AND pageToken = '{{ pageToken }}'
AND returnPartialSuccess = '{{ returnPartialSuccess }}'
AND serviceProjectNumber = '{{ serviceProjectNumber }}'
;