1. Packages
  2. Google Cloud (GCP) Classic
  3. API Docs
  4. compute
  5. getMachineTypes
Google Cloud v8.26.0 published on Thursday, Apr 10, 2025 by Pulumi

gcp.compute.getMachineTypes

Explore with Pulumi AI

Google Cloud v8.26.0 published on Thursday, Apr 10, 2025 by Pulumi

Provides access to available Google Compute machine types in a zone for a given project. See more about machine type availability in the upstream docs.

To get more information about machine types, see:

Example Usage

Using getMachineTypes

Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

function getMachineTypes(args: GetMachineTypesArgs, opts?: InvokeOptions): Promise<GetMachineTypesResult>
function getMachineTypesOutput(args: GetMachineTypesOutputArgs, opts?: InvokeOptions): Output<GetMachineTypesResult>
Copy
def get_machine_types(filter: Optional[str] = None,
                      project: Optional[str] = None,
                      zone: Optional[str] = None,
                      opts: Optional[InvokeOptions] = None) -> GetMachineTypesResult
def get_machine_types_output(filter: Optional[pulumi.Input[str]] = None,
                      project: Optional[pulumi.Input[str]] = None,
                      zone: Optional[pulumi.Input[str]] = None,
                      opts: Optional[InvokeOptions] = None) -> Output[GetMachineTypesResult]
Copy
func GetMachineTypes(ctx *Context, args *GetMachineTypesArgs, opts ...InvokeOption) (*GetMachineTypesResult, error)
func GetMachineTypesOutput(ctx *Context, args *GetMachineTypesOutputArgs, opts ...InvokeOption) GetMachineTypesResultOutput
Copy

> Note: This function is named GetMachineTypes in the Go SDK.

public static class GetMachineTypes 
{
    public static Task<GetMachineTypesResult> InvokeAsync(GetMachineTypesArgs args, InvokeOptions? opts = null)
    public static Output<GetMachineTypesResult> Invoke(GetMachineTypesInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetMachineTypesResult> getMachineTypes(GetMachineTypesArgs args, InvokeOptions options)
public static Output<GetMachineTypesResult> getMachineTypes(GetMachineTypesArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: gcp:compute/getMachineTypes:getMachineTypes
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

Filter string
A filter expression that filters machine types listed in the response.
Project string
Project from which to list available zones. Defaults to project declared in the provider.
Zone string
Zone from which to list machine types.
Filter string
A filter expression that filters machine types listed in the response.
Project string
Project from which to list available zones. Defaults to project declared in the provider.
Zone string
Zone from which to list machine types.
filter String
A filter expression that filters machine types listed in the response.
project String
Project from which to list available zones. Defaults to project declared in the provider.
zone String
Zone from which to list machine types.
filter string
A filter expression that filters machine types listed in the response.
project string
Project from which to list available zones. Defaults to project declared in the provider.
zone string
Zone from which to list machine types.
filter str
A filter expression that filters machine types listed in the response.
project str
Project from which to list available zones. Defaults to project declared in the provider.
zone str
Zone from which to list machine types.
filter String
A filter expression that filters machine types listed in the response.
project String
Project from which to list available zones. Defaults to project declared in the provider.
zone String
Zone from which to list machine types.

getMachineTypes Result

The following output properties are available:

Id string
The provider-assigned unique ID for this managed resource.
MachineTypes List<GetMachineTypesMachineType>
The list of machine types matching the provided filter. Structure is documented below.
Project string
Zone string
Filter string
Id string
The provider-assigned unique ID for this managed resource.
MachineTypes []GetMachineTypesMachineType
The list of machine types matching the provided filter. Structure is documented below.
Project string
Zone string
Filter string
id String
The provider-assigned unique ID for this managed resource.
machineTypes List<GetMachineTypesMachineType>
The list of machine types matching the provided filter. Structure is documented below.
project String
zone String
filter String
id string
The provider-assigned unique ID for this managed resource.
machineTypes GetMachineTypesMachineType[]
The list of machine types matching the provided filter. Structure is documented below.
project string
zone string
filter string
id str
The provider-assigned unique ID for this managed resource.
machine_types Sequence[GetMachineTypesMachineType]
The list of machine types matching the provided filter. Structure is documented below.
project str
zone str
filter str
id String
The provider-assigned unique ID for this managed resource.
machineTypes List<Property Map>
The list of machine types matching the provided filter. Structure is documented below.
project String
zone String
filter String

Supporting Types

GetMachineTypesMachineType

Accelerators This property is required. List<GetMachineTypesMachineTypeAccelerator>
A list of accelerator configurations assigned to this machine type. Structure is documented below.
BundledLocalSsds This property is required. List<GetMachineTypesMachineTypeBundledLocalSsd>
The configuration of bundled local SSD for the machine type. Structure is documented below.
Deprecateds This property is required. List<GetMachineTypesMachineTypeDeprecated>
The deprecation status associated with this machine type. Structure is documented below.
Description This property is required. string
A textual description of the machine type.
GuestCpus This property is required. int
The number of virtual CPUs that are available to the instance.
IsSharedCpus This property is required. bool
Whether this machine type has a shared CPU.
MaximumPersistentDisks This property is required. int
The maximum persistent disks allowed.
MaximumPersistentDisksSizeGb This property is required. int
The maximum total persistent disks size (GB) allowed.
MemoryMb This property is required. int
The amount of physical memory available to the instance, defined in MB.
Name This property is required. string
The name of the machine type.
SelfLink This property is required. string
The server-defined URL for the machine type.
Accelerators This property is required. []GetMachineTypesMachineTypeAccelerator
A list of accelerator configurations assigned to this machine type. Structure is documented below.
BundledLocalSsds This property is required. []GetMachineTypesMachineTypeBundledLocalSsd
The configuration of bundled local SSD for the machine type. Structure is documented below.
Deprecateds This property is required. []GetMachineTypesMachineTypeDeprecated
The deprecation status associated with this machine type. Structure is documented below.
Description This property is required. string
A textual description of the machine type.
GuestCpus This property is required. int
The number of virtual CPUs that are available to the instance.
IsSharedCpus This property is required. bool
Whether this machine type has a shared CPU.
MaximumPersistentDisks This property is required. int
The maximum persistent disks allowed.
MaximumPersistentDisksSizeGb This property is required. int
The maximum total persistent disks size (GB) allowed.
MemoryMb This property is required. int
The amount of physical memory available to the instance, defined in MB.
Name This property is required. string
The name of the machine type.
SelfLink This property is required. string
The server-defined URL for the machine type.
accelerators This property is required. List<GetMachineTypesMachineTypeAccelerator>
A list of accelerator configurations assigned to this machine type. Structure is documented below.
bundledLocalSsds This property is required. List<GetMachineTypesMachineTypeBundledLocalSsd>
The configuration of bundled local SSD for the machine type. Structure is documented below.
deprecateds This property is required. List<GetMachineTypesMachineTypeDeprecated>
The deprecation status associated with this machine type. Structure is documented below.
description This property is required. String
A textual description of the machine type.
guestCpus This property is required. Integer
The number of virtual CPUs that are available to the instance.
isSharedCpus This property is required. Boolean
Whether this machine type has a shared CPU.
maximumPersistentDisks This property is required. Integer
The maximum persistent disks allowed.
maximumPersistentDisksSizeGb This property is required. Integer
The maximum total persistent disks size (GB) allowed.
memoryMb This property is required. Integer
The amount of physical memory available to the instance, defined in MB.
name This property is required. String
The name of the machine type.
selfLink This property is required. String
The server-defined URL for the machine type.
accelerators This property is required. GetMachineTypesMachineTypeAccelerator[]
A list of accelerator configurations assigned to this machine type. Structure is documented below.
bundledLocalSsds This property is required. GetMachineTypesMachineTypeBundledLocalSsd[]
The configuration of bundled local SSD for the machine type. Structure is documented below.
deprecateds This property is required. GetMachineTypesMachineTypeDeprecated[]
The deprecation status associated with this machine type. Structure is documented below.
description This property is required. string
A textual description of the machine type.
guestCpus This property is required. number
The number of virtual CPUs that are available to the instance.
isSharedCpus This property is required. boolean
Whether this machine type has a shared CPU.
maximumPersistentDisks This property is required. number
The maximum persistent disks allowed.
maximumPersistentDisksSizeGb This property is required. number
The maximum total persistent disks size (GB) allowed.
memoryMb This property is required. number
The amount of physical memory available to the instance, defined in MB.
name This property is required. string
The name of the machine type.
selfLink This property is required. string
The server-defined URL for the machine type.
accelerators This property is required. Sequence[GetMachineTypesMachineTypeAccelerator]
A list of accelerator configurations assigned to this machine type. Structure is documented below.
bundled_local_ssds This property is required. Sequence[GetMachineTypesMachineTypeBundledLocalSsd]
The configuration of bundled local SSD for the machine type. Structure is documented below.
deprecateds This property is required. Sequence[GetMachineTypesMachineTypeDeprecated]
The deprecation status associated with this machine type. Structure is documented below.
description This property is required. str
A textual description of the machine type.
guest_cpus This property is required. int
The number of virtual CPUs that are available to the instance.
is_shared_cpus This property is required. bool
Whether this machine type has a shared CPU.
maximum_persistent_disks This property is required. int
The maximum persistent disks allowed.
maximum_persistent_disks_size_gb This property is required. int
The maximum total persistent disks size (GB) allowed.
memory_mb This property is required. int
The amount of physical memory available to the instance, defined in MB.
name This property is required. str
The name of the machine type.
self_link This property is required. str
The server-defined URL for the machine type.
accelerators This property is required. List<Property Map>
A list of accelerator configurations assigned to this machine type. Structure is documented below.
bundledLocalSsds This property is required. List<Property Map>
The configuration of bundled local SSD for the machine type. Structure is documented below.
deprecateds This property is required. List<Property Map>
The deprecation status associated with this machine type. Structure is documented below.
description This property is required. String
A textual description of the machine type.
guestCpus This property is required. Number
The number of virtual CPUs that are available to the instance.
isSharedCpus This property is required. Boolean
Whether this machine type has a shared CPU.
maximumPersistentDisks This property is required. Number
The maximum persistent disks allowed.
maximumPersistentDisksSizeGb This property is required. Number
The maximum total persistent disks size (GB) allowed.
memoryMb This property is required. Number
The amount of physical memory available to the instance, defined in MB.
name This property is required. String
The name of the machine type.
selfLink This property is required. String
The server-defined URL for the machine type.

GetMachineTypesMachineTypeAccelerator

GuestAcceleratorCount This property is required. int
Number of accelerator cards exposed to the guest.
GuestAcceleratorType This property is required. string
The accelerator type resource name, not a full URL, e.g. nvidia-tesla-t4.
GuestAcceleratorCount This property is required. int
Number of accelerator cards exposed to the guest.
GuestAcceleratorType This property is required. string
The accelerator type resource name, not a full URL, e.g. nvidia-tesla-t4.
guestAcceleratorCount This property is required. Integer
Number of accelerator cards exposed to the guest.
guestAcceleratorType This property is required. String
The accelerator type resource name, not a full URL, e.g. nvidia-tesla-t4.
guestAcceleratorCount This property is required. number
Number of accelerator cards exposed to the guest.
guestAcceleratorType This property is required. string
The accelerator type resource name, not a full URL, e.g. nvidia-tesla-t4.
guest_accelerator_count This property is required. int
Number of accelerator cards exposed to the guest.
guest_accelerator_type This property is required. str
The accelerator type resource name, not a full URL, e.g. nvidia-tesla-t4.
guestAcceleratorCount This property is required. Number
Number of accelerator cards exposed to the guest.
guestAcceleratorType This property is required. String
The accelerator type resource name, not a full URL, e.g. nvidia-tesla-t4.

GetMachineTypesMachineTypeBundledLocalSsd

DefaultInterface This property is required. string
The default disk interface if the interface is not specified.
PartitionCount This property is required. int
The number of partitions.
DefaultInterface This property is required. string
The default disk interface if the interface is not specified.
PartitionCount This property is required. int
The number of partitions.
defaultInterface This property is required. String
The default disk interface if the interface is not specified.
partitionCount This property is required. Integer
The number of partitions.
defaultInterface This property is required. string
The default disk interface if the interface is not specified.
partitionCount This property is required. number
The number of partitions.
default_interface This property is required. str
The default disk interface if the interface is not specified.
partition_count This property is required. int
The number of partitions.
defaultInterface This property is required. String
The default disk interface if the interface is not specified.
partitionCount This property is required. Number
The number of partitions.

GetMachineTypesMachineTypeDeprecated

Replacement This property is required. string
The URL of the suggested replacement for a deprecated machine type.
State This property is required. string
The deprecation state of this resource. This can be ACTIVE, DEPRECATED, OBSOLETE, or DELETED.
Replacement This property is required. string
The URL of the suggested replacement for a deprecated machine type.
State This property is required. string
The deprecation state of this resource. This can be ACTIVE, DEPRECATED, OBSOLETE, or DELETED.
replacement This property is required. String
The URL of the suggested replacement for a deprecated machine type.
state This property is required. String
The deprecation state of this resource. This can be ACTIVE, DEPRECATED, OBSOLETE, or DELETED.
replacement This property is required. string
The URL of the suggested replacement for a deprecated machine type.
state This property is required. string
The deprecation state of this resource. This can be ACTIVE, DEPRECATED, OBSOLETE, or DELETED.
replacement This property is required. str
The URL of the suggested replacement for a deprecated machine type.
state This property is required. str
The deprecation state of this resource. This can be ACTIVE, DEPRECATED, OBSOLETE, or DELETED.
replacement This property is required. String
The URL of the suggested replacement for a deprecated machine type.
state This property is required. String
The deprecation state of this resource. This can be ACTIVE, DEPRECATED, OBSOLETE, or DELETED.

Package Details

Repository
Google Cloud (GCP) Classic pulumi/pulumi-gcp
License
Apache-2.0
Notes
This Pulumi package is based on the google-beta Terraform Provider.
Google Cloud v8.26.0 published on Thursday, Apr 10, 2025 by Pulumi