1. Packages
  2. Packages
  3. DigitalOcean Provider
  4. API Docs
  5. getDedicatedInferenceAccelerators
Viewing docs for DigitalOcean v4.65.0
published on Wednesday, Apr 29, 2026 by Pulumi
digitalocean logo
Viewing docs for DigitalOcean v4.65.0
published on Wednesday, Apr 29, 2026 by Pulumi

    Returns a list of accelerators (GPUs) attached to a dedicated inference endpoint, with the ability to filter and sort the results.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as digitalocean from "@pulumi/digitalocean";
    
    const example = digitalocean.getDedicatedInferenceAccelerators({
        dedicatedInferenceId: exampleDigitaloceanDedicatedInference.id,
    });
    export const accelerators = example.then(example => example.accelerators);
    
    import pulumi
    import pulumi_digitalocean as digitalocean
    
    example = digitalocean.get_dedicated_inference_accelerators(dedicated_inference_id=example_digitalocean_dedicated_inference["id"])
    pulumi.export("accelerators", example.accelerators)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-digitalocean/sdk/v4/go/digitalocean"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		example, err := digitalocean.GetDedicatedInferenceAccelerators(ctx, &digitalocean.GetDedicatedInferenceAcceleratorsArgs{
    			DedicatedInferenceId: exampleDigitaloceanDedicatedInference.Id,
    		}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("accelerators", example.Accelerators)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using DigitalOcean = Pulumi.DigitalOcean;
    
    return await Deployment.RunAsync(() => 
    {
        var example = DigitalOcean.Index.GetDedicatedInferenceAccelerators.Invoke(new()
        {
            DedicatedInferenceId = exampleDigitaloceanDedicatedInference.Id,
        });
    
        return new Dictionary<string, object?>
        {
            ["accelerators"] = example.Apply(getDedicatedInferenceAcceleratorsResult => getDedicatedInferenceAcceleratorsResult.Accelerators),
        };
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.digitalocean.DigitaloceanFunctions;
    import com.pulumi.digitalocean.inputs.GetDedicatedInferenceAcceleratorsArgs;
    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 = DigitaloceanFunctions.getDedicatedInferenceAccelerators(GetDedicatedInferenceAcceleratorsArgs.builder()
                .dedicatedInferenceId(exampleDigitaloceanDedicatedInference.id())
                .build());
    
            ctx.export("accelerators", example.accelerators());
        }
    }
    
    variables:
      example:
        fn::invoke:
          function: digitalocean:getDedicatedInferenceAccelerators
          arguments:
            dedicatedInferenceId: ${exampleDigitaloceanDedicatedInference.id}
    outputs:
      accelerators: ${example.accelerators}
    

    Filter by slug

    import * as pulumi from "@pulumi/pulumi";
    import * as digitalocean from "@pulumi/digitalocean";
    
    const filtered = digitalocean.getDedicatedInferenceAccelerators({
        dedicatedInferenceId: example.id,
        filters: [{
            key: "slug",
            values: ["gpu-h100x1-80gb"],
        }],
    });
    
    import pulumi
    import pulumi_digitalocean as digitalocean
    
    filtered = digitalocean.get_dedicated_inference_accelerators(dedicated_inference_id=example["id"],
        filters=[{
            "key": "slug",
            "values": ["gpu-h100x1-80gb"],
        }])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-digitalocean/sdk/v4/go/digitalocean"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := digitalocean.GetDedicatedInferenceAccelerators(ctx, &digitalocean.GetDedicatedInferenceAcceleratorsArgs{
    			DedicatedInferenceId: example.Id,
    			Filters: []digitalocean.GetDedicatedInferenceAcceleratorsFilter{
    				{
    					Key: "slug",
    					Values: []string{
    						"gpu-h100x1-80gb",
    					},
    				},
    			},
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using DigitalOcean = Pulumi.DigitalOcean;
    
    return await Deployment.RunAsync(() => 
    {
        var filtered = DigitalOcean.Index.GetDedicatedInferenceAccelerators.Invoke(new()
        {
            DedicatedInferenceId = example.Id,
            Filters = new[]
            {
                new DigitalOcean.Inputs.GetDedicatedInferenceAcceleratorsFilterInputArgs
                {
                    Key = "slug",
                    Values = new[]
                    {
                        "gpu-h100x1-80gb",
                    },
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.digitalocean.DigitaloceanFunctions;
    import com.pulumi.digitalocean.inputs.GetDedicatedInferenceAcceleratorsArgs;
    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 filtered = DigitaloceanFunctions.getDedicatedInferenceAccelerators(GetDedicatedInferenceAcceleratorsArgs.builder()
                .dedicatedInferenceId(example.id())
                .filters(GetDedicatedInferenceAcceleratorsFilterArgs.builder()
                    .key("slug")
                    .values("gpu-h100x1-80gb")
                    .build())
                .build());
    
        }
    }
    
    variables:
      filtered:
        fn::invoke:
          function: digitalocean:getDedicatedInferenceAccelerators
          arguments:
            dedicatedInferenceId: ${example.id}
            filters:
              - key: slug
                values:
                  - gpu-h100x1-80gb
    

    Using getDedicatedInferenceAccelerators

    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 getDedicatedInferenceAccelerators(args: GetDedicatedInferenceAcceleratorsArgs, opts?: InvokeOptions): Promise<GetDedicatedInferenceAcceleratorsResult>
    function getDedicatedInferenceAcceleratorsOutput(args: GetDedicatedInferenceAcceleratorsOutputArgs, opts?: InvokeOptions): Output<GetDedicatedInferenceAcceleratorsResult>
    def get_dedicated_inference_accelerators(dedicated_inference_id: Optional[str] = None,
                                             filters: Optional[Sequence[GetDedicatedInferenceAcceleratorsFilter]] = None,
                                             sorts: Optional[Sequence[GetDedicatedInferenceAcceleratorsSort]] = None,
                                             opts: Optional[InvokeOptions] = None) -> GetDedicatedInferenceAcceleratorsResult
    def get_dedicated_inference_accelerators_output(dedicated_inference_id: Optional[pulumi.Input[str]] = None,
                                             filters: Optional[pulumi.Input[Sequence[pulumi.Input[GetDedicatedInferenceAcceleratorsFilterArgs]]]] = None,
                                             sorts: Optional[pulumi.Input[Sequence[pulumi.Input[GetDedicatedInferenceAcceleratorsSortArgs]]]] = None,
                                             opts: Optional[InvokeOptions] = None) -> Output[GetDedicatedInferenceAcceleratorsResult]
    func GetDedicatedInferenceAccelerators(ctx *Context, args *GetDedicatedInferenceAcceleratorsArgs, opts ...InvokeOption) (*GetDedicatedInferenceAcceleratorsResult, error)
    func GetDedicatedInferenceAcceleratorsOutput(ctx *Context, args *GetDedicatedInferenceAcceleratorsOutputArgs, opts ...InvokeOption) GetDedicatedInferenceAcceleratorsResultOutput

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

    public static class GetDedicatedInferenceAccelerators 
    {
        public static Task<GetDedicatedInferenceAcceleratorsResult> InvokeAsync(GetDedicatedInferenceAcceleratorsArgs args, InvokeOptions? opts = null)
        public static Output<GetDedicatedInferenceAcceleratorsResult> Invoke(GetDedicatedInferenceAcceleratorsInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetDedicatedInferenceAcceleratorsResult> getDedicatedInferenceAccelerators(GetDedicatedInferenceAcceleratorsArgs args, InvokeOptions options)
    public static Output<GetDedicatedInferenceAcceleratorsResult> getDedicatedInferenceAccelerators(GetDedicatedInferenceAcceleratorsArgs args, InvokeOptions options)
    
    fn::invoke:
      function: digitalocean:index/getDedicatedInferenceAccelerators:getDedicatedInferenceAccelerators
      arguments:
        # arguments dictionary

    The following arguments are supported:

    DedicatedInferenceId string
    The ID of the dedicated inference endpoint to list accelerators for.
    Filters List<Pulumi.DigitalOcean.Inputs.GetDedicatedInferenceAcceleratorsFilter>
    Filter the results. The filter block is documented below.
    Sorts List<Pulumi.DigitalOcean.Inputs.GetDedicatedInferenceAcceleratorsSort>
    Sort the results. The sort block is documented below.
    DedicatedInferenceId string
    The ID of the dedicated inference endpoint to list accelerators for.
    Filters []GetDedicatedInferenceAcceleratorsFilter
    Filter the results. The filter block is documented below.
    Sorts []GetDedicatedInferenceAcceleratorsSort
    Sort the results. The sort block is documented below.
    dedicatedInferenceId String
    The ID of the dedicated inference endpoint to list accelerators for.
    filters List<GetDedicatedInferenceAcceleratorsFilter>
    Filter the results. The filter block is documented below.
    sorts List<GetDedicatedInferenceAcceleratorsSort>
    Sort the results. The sort block is documented below.
    dedicatedInferenceId string
    The ID of the dedicated inference endpoint to list accelerators for.
    filters GetDedicatedInferenceAcceleratorsFilter[]
    Filter the results. The filter block is documented below.
    sorts GetDedicatedInferenceAcceleratorsSort[]
    Sort the results. The sort block is documented below.
    dedicated_inference_id str
    The ID of the dedicated inference endpoint to list accelerators for.
    filters Sequence[GetDedicatedInferenceAcceleratorsFilter]
    Filter the results. The filter block is documented below.
    sorts Sequence[GetDedicatedInferenceAcceleratorsSort]
    Sort the results. The sort block is documented below.
    dedicatedInferenceId String
    The ID of the dedicated inference endpoint to list accelerators for.
    filters List<Property Map>
    Filter the results. The filter block is documented below.
    sorts List<Property Map>
    Sort the results. The sort block is documented below.

    getDedicatedInferenceAccelerators Result

    The following output properties are available:

    Accelerators []GetDedicatedInferenceAcceleratorsAccelerator
    A list of accelerators satisfying any filter and sort criteria. Each element contains:
    DedicatedInferenceId string
    Id string
    The provider-assigned unique ID for this managed resource.
    Filters []GetDedicatedInferenceAcceleratorsFilter
    Sorts []GetDedicatedInferenceAcceleratorsSort
    accelerators List<GetDedicatedInferenceAcceleratorsAccelerator>
    A list of accelerators satisfying any filter and sort criteria. Each element contains:
    dedicatedInferenceId String
    id String
    The provider-assigned unique ID for this managed resource.
    filters List<GetDedicatedInferenceAcceleratorsFilter>
    sorts List<GetDedicatedInferenceAcceleratorsSort>
    accelerators GetDedicatedInferenceAcceleratorsAccelerator[]
    A list of accelerators satisfying any filter and sort criteria. Each element contains:
    dedicatedInferenceId string
    id string
    The provider-assigned unique ID for this managed resource.
    filters GetDedicatedInferenceAcceleratorsFilter[]
    sorts GetDedicatedInferenceAcceleratorsSort[]
    accelerators Sequence[GetDedicatedInferenceAcceleratorsAccelerator]
    A list of accelerators satisfying any filter and sort criteria. Each element contains:
    dedicated_inference_id str
    id str
    The provider-assigned unique ID for this managed resource.
    filters Sequence[GetDedicatedInferenceAcceleratorsFilter]
    sorts Sequence[GetDedicatedInferenceAcceleratorsSort]
    accelerators List<Property Map>
    A list of accelerators satisfying any filter and sort criteria. Each element contains:
    dedicatedInferenceId String
    id String
    The provider-assigned unique ID for this managed resource.
    filters List<Property Map>
    sorts List<Property Map>

    Supporting Types

    GetDedicatedInferenceAcceleratorsAccelerator

    CreatedAt string
    The date and time when the accelerator was created.
    Id string
    The unique ID of the accelerator.
    Name string
    The name of the accelerator.
    Slug string
    The slug identifier for the accelerator type.
    Status string
    The current status of the accelerator.
    CreatedAt string
    The date and time when the accelerator was created.
    Id string
    The unique ID of the accelerator.
    Name string
    The name of the accelerator.
    Slug string
    The slug identifier for the accelerator type.
    Status string
    The current status of the accelerator.
    createdAt String
    The date and time when the accelerator was created.
    id String
    The unique ID of the accelerator.
    name String
    The name of the accelerator.
    slug String
    The slug identifier for the accelerator type.
    status String
    The current status of the accelerator.
    createdAt string
    The date and time when the accelerator was created.
    id string
    The unique ID of the accelerator.
    name string
    The name of the accelerator.
    slug string
    The slug identifier for the accelerator type.
    status string
    The current status of the accelerator.
    created_at str
    The date and time when the accelerator was created.
    id str
    The unique ID of the accelerator.
    name str
    The name of the accelerator.
    slug str
    The slug identifier for the accelerator type.
    status str
    The current status of the accelerator.
    createdAt String
    The date and time when the accelerator was created.
    id String
    The unique ID of the accelerator.
    name String
    The name of the accelerator.
    slug String
    The slug identifier for the accelerator type.
    status String
    The current status of the accelerator.

    GetDedicatedInferenceAcceleratorsFilter

    Key string
    Filter the accelerators by this key. This may be one of id, name, slug, status, createdAt.
    Values List<string>
    A list of values to match against the key field.
    All bool
    Set to true to require that a field match all of the values instead of just one.
    MatchBy string
    One of exact (default), re, or substring.
    Key string
    Filter the accelerators by this key. This may be one of id, name, slug, status, createdAt.
    Values []string
    A list of values to match against the key field.
    All bool
    Set to true to require that a field match all of the values instead of just one.
    MatchBy string
    One of exact (default), re, or substring.
    key String
    Filter the accelerators by this key. This may be one of id, name, slug, status, createdAt.
    values List<String>
    A list of values to match against the key field.
    all Boolean
    Set to true to require that a field match all of the values instead of just one.
    matchBy String
    One of exact (default), re, or substring.
    key string
    Filter the accelerators by this key. This may be one of id, name, slug, status, createdAt.
    values string[]
    A list of values to match against the key field.
    all boolean
    Set to true to require that a field match all of the values instead of just one.
    matchBy string
    One of exact (default), re, or substring.
    key str
    Filter the accelerators by this key. This may be one of id, name, slug, status, createdAt.
    values Sequence[str]
    A list of values to match against the key field.
    all bool
    Set to true to require that a field match all of the values instead of just one.
    match_by str
    One of exact (default), re, or substring.
    key String
    Filter the accelerators by this key. This may be one of id, name, slug, status, createdAt.
    values List<String>
    A list of values to match against the key field.
    all Boolean
    Set to true to require that a field match all of the values instead of just one.
    matchBy String
    One of exact (default), re, or substring.

    GetDedicatedInferenceAcceleratorsSort

    Key string
    Sort the accelerators by this key. This may be one of the keys listed in filter.
    Direction string
    The sort direction. This may be either asc or desc.
    Key string
    Sort the accelerators by this key. This may be one of the keys listed in filter.
    Direction string
    The sort direction. This may be either asc or desc.
    key String
    Sort the accelerators by this key. This may be one of the keys listed in filter.
    direction String
    The sort direction. This may be either asc or desc.
    key string
    Sort the accelerators by this key. This may be one of the keys listed in filter.
    direction string
    The sort direction. This may be either asc or desc.
    key str
    Sort the accelerators by this key. This may be one of the keys listed in filter.
    direction str
    The sort direction. This may be either asc or desc.
    key String
    Sort the accelerators by this key. This may be one of the keys listed in filter.
    direction String
    The sort direction. This may be either asc or desc.

    Package Details

    Repository
    DigitalOcean pulumi/pulumi-digitalocean
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the digitalocean Terraform Provider.
    digitalocean logo
    Viewing docs for DigitalOcean v4.65.0
    published on Wednesday, Apr 29, 2026 by Pulumi
      Try Pulumi Cloud free. Your team will thank you.