1. Packages
  2. Packages
  3. Ionoscloud
  4. API Docs
  5. compute
  6. getGpus
Viewing docs for IonosCloud v0.3.0
published on Wednesday, Apr 15, 2026 by ionos-cloud
ionoscloud logo
Viewing docs for IonosCloud v0.3.0
published on Wednesday, Apr 15, 2026 by ionos-cloud

    The GPUs data source can be used to retrieve a list of all GPUs attached to a specific server within a datacenter.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as ionoscloud from "@ionos-cloud/sdk-pulumi";
    
    const example = ionoscloud.compute.getGpus({
        datacenterId: "datacenter_id",
        serverId: "server_id",
    });
    
    import pulumi
    import pulumi_ionoscloud as ionoscloud
    
    example = ionoscloud.compute.get_gpus(datacenter_id="datacenter_id",
        server_id="server_id")
    
    package main
    
    import (
    	"github.com/ionos-cloud/pulumi-ionoscloud/sdk/go/ionoscloud/compute"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := compute.GetGpus(ctx, &compute.GetGpusArgs{
    			DatacenterId: "datacenter_id",
    			ServerId:     "server_id",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Ionoscloud = Ionoscloud.Pulumi.Ionoscloud;
    
    return await Deployment.RunAsync(() => 
    {
        var example = Ionoscloud.Compute.GetGpus.Invoke(new()
        {
            DatacenterId = "datacenter_id",
            ServerId = "server_id",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.ionoscloud.compute.ComputeFunctions;
    import com.pulumi.ionoscloud.compute.inputs.GetGpusArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            final var example = ComputeFunctions.getGpus(GetGpusArgs.builder()
                .datacenterId("datacenter_id")
                .serverId("server_id")
                .build());
    
        }
    }
    
    variables:
      example:
        fn::invoke:
          function: ionoscloud:compute:getGpus
          arguments:
            datacenterId: datacenter_id
            serverId: server_id
    
    Example coming soon!
    

    Using getGpus

    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 getGpus(args: GetGpusArgs, opts?: InvokeOptions): Promise<GetGpusResult>
    function getGpusOutput(args: GetGpusOutputArgs, opts?: InvokeOptions): Output<GetGpusResult>
    def get_gpus(datacenter_id: Optional[str] = None,
                 location: Optional[str] = None,
                 server_id: Optional[str] = None,
                 opts: Optional[InvokeOptions] = None) -> GetGpusResult
    def get_gpus_output(datacenter_id: pulumi.Input[Optional[str]] = None,
                 location: pulumi.Input[Optional[str]] = None,
                 server_id: pulumi.Input[Optional[str]] = None,
                 opts: Optional[InvokeOptions] = None) -> Output[GetGpusResult]
    func GetGpus(ctx *Context, args *GetGpusArgs, opts ...InvokeOption) (*GetGpusResult, error)
    func GetGpusOutput(ctx *Context, args *GetGpusOutputArgs, opts ...InvokeOption) GetGpusResultOutput

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

    public static class GetGpus 
    {
        public static Task<GetGpusResult> InvokeAsync(GetGpusArgs args, InvokeOptions? opts = null)
        public static Output<GetGpusResult> Invoke(GetGpusInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetGpusResult> getGpus(GetGpusArgs args, InvokeOptions options)
    public static Output<GetGpusResult> getGpus(GetGpusArgs args, InvokeOptions options)
    
    fn::invoke:
      function: ionoscloud:compute/getGpus:getGpus
      arguments:
        # arguments dictionary
    data "ionoscloud_compute_getgpus" "name" {
        # arguments
    }

    The following arguments are supported:

    DatacenterId string
    The ID of the datacenter.
    ServerId string
    The ID of the server.
    Location string
    DatacenterId string
    The ID of the datacenter.
    ServerId string
    The ID of the server.
    Location string
    datacenter_id string
    The ID of the datacenter.
    server_id string
    The ID of the server.
    location string
    datacenterId String
    The ID of the datacenter.
    serverId String
    The ID of the server.
    location String
    datacenterId string
    The ID of the datacenter.
    serverId string
    The ID of the server.
    location string
    datacenter_id str
    The ID of the datacenter.
    server_id str
    The ID of the server.
    location str
    datacenterId String
    The ID of the datacenter.
    serverId String
    The ID of the server.
    location String

    getGpus Result

    The following output properties are available:

    DatacenterId string
    Gpuses List<Ionoscloud.GetGpusGpus>
    A list of GPUs. Each GPU has the following attributes:
    Id string
    The provider-assigned unique ID for this managed resource.
    ServerId string
    Location string
    DatacenterId string
    Gpuses []GetGpusGpus
    A list of GPUs. Each GPU has the following attributes:
    Id string
    The provider-assigned unique ID for this managed resource.
    ServerId string
    Location string
    datacenter_id string
    gpuses list(object)
    A list of GPUs. Each GPU has the following attributes:
    id string
    The provider-assigned unique ID for this managed resource.
    server_id string
    location string
    datacenterId String
    gpuses List<GetGpusGpus>
    A list of GPUs. Each GPU has the following attributes:
    id String
    The provider-assigned unique ID for this managed resource.
    serverId String
    location String
    datacenterId string
    gpuses GetGpusGpus[]
    A list of GPUs. Each GPU has the following attributes:
    id string
    The provider-assigned unique ID for this managed resource.
    serverId string
    location string
    datacenter_id str
    gpuses Sequence[GetGpusGpus]
    A list of GPUs. Each GPU has the following attributes:
    id str
    The provider-assigned unique ID for this managed resource.
    server_id str
    location str
    datacenterId String
    gpuses List<Property Map>
    A list of GPUs. Each GPU has the following attributes:
    id String
    The provider-assigned unique ID for this managed resource.
    serverId String
    location String

    Supporting Types

    GetGpusGpus

    Id string
    The id of the GPU.
    Model string
    The model of the GPU.
    Name string
    The name of the GPU.
    Type string
    The type of the GPU.
    Vendor string
    The vendor of the GPU.
    Id string
    The id of the GPU.
    Model string
    The model of the GPU.
    Name string
    The name of the GPU.
    Type string
    The type of the GPU.
    Vendor string
    The vendor of the GPU.
    id string
    The id of the GPU.
    model string
    The model of the GPU.
    name string
    The name of the GPU.
    type string
    The type of the GPU.
    vendor string
    The vendor of the GPU.
    id String
    The id of the GPU.
    model String
    The model of the GPU.
    name String
    The name of the GPU.
    type String
    The type of the GPU.
    vendor String
    The vendor of the GPU.
    id string
    The id of the GPU.
    model string
    The model of the GPU.
    name string
    The name of the GPU.
    type string
    The type of the GPU.
    vendor string
    The vendor of the GPU.
    id str
    The id of the GPU.
    model str
    The model of the GPU.
    name str
    The name of the GPU.
    type str
    The type of the GPU.
    vendor str
    The vendor of the GPU.
    id String
    The id of the GPU.
    model String
    The model of the GPU.
    name String
    The name of the GPU.
    type String
    The type of the GPU.
    vendor String
    The vendor of the GPU.

    Package Details

    Repository
    ionoscloud ionos-cloud/pulumi-ionoscloud
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the ionoscloud Terraform Provider.
    ionoscloud logo
    Viewing docs for IonosCloud v0.3.0
    published on Wednesday, Apr 15, 2026 by ionos-cloud
      Try Pulumi Cloud free. Your team will thank you.