1. Packages
  2. Packages
  3. DigitalOcean Provider
  4. API Docs
  5. getMicrodropletImages
Viewing docs for DigitalOcean v4.77.0
published on Friday, Jul 31, 2026 by Pulumi
digitalocean logo
Viewing docs for DigitalOcean v4.77.0
published on Friday, Jul 31, 2026 by Pulumi

    Fetches a list of DigitalOcean MicroDroplet images on the account. No server-side filters — narrow the results using filter and sort.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as digitalocean from "@pulumi/digitalocean";
    
    const all = digitalocean.getMicrodropletImages({});
    const available = digitalocean.getMicrodropletImages({
        filters: [{
            key: "status",
            values: ["IMAGE_AVAILABLE"],
        }],
    });
    const newestFirst = digitalocean.getMicrodropletImages({
        sorts: [{
            key: "created_at",
            direction: "desc",
        }],
    });
    
    import pulumi
    import pulumi_digitalocean as digitalocean
    
    all = digitalocean.get_microdroplet_images()
    available = digitalocean.get_microdroplet_images(filters=[{
        "key": "status",
        "values": ["IMAGE_AVAILABLE"],
    }])
    newest_first = digitalocean.get_microdroplet_images(sorts=[{
        "key": "created_at",
        "direction": "desc",
    }])
    
    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.GetMicrodropletImages(ctx, &digitalocean.GetMicrodropletImagesArgs{}, nil)
    		if err != nil {
    			return err
    		}
    		_, err = digitalocean.GetMicrodropletImages(ctx, &digitalocean.GetMicrodropletImagesArgs{
    			Filters: []digitalocean.GetMicrodropletImagesFilter{
    				{
    					Key: "status",
    					Values: []string{
    						"IMAGE_AVAILABLE",
    					},
    				},
    			},
    		}, nil)
    		if err != nil {
    			return err
    		}
    		_, err = digitalocean.GetMicrodropletImages(ctx, &digitalocean.GetMicrodropletImagesArgs{
    			Sorts: []digitalocean.GetMicrodropletImagesSort{
    				{
    					Key:       "created_at",
    					Direction: pulumi.StringRef("desc"),
    				},
    			},
    		}, 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 all = DigitalOcean.GetMicrodropletImages.Invoke();
    
        var available = DigitalOcean.GetMicrodropletImages.Invoke(new()
        {
            Filters = new[]
            {
                new DigitalOcean.Inputs.GetMicrodropletImagesFilterInputArgs
                {
                    Key = "status",
                    Values = new[]
                    {
                        "IMAGE_AVAILABLE",
                    },
                },
            },
        });
    
        var newestFirst = DigitalOcean.GetMicrodropletImages.Invoke(new()
        {
            Sorts = new[]
            {
                new DigitalOcean.Inputs.GetMicrodropletImagesSortInputArgs
                {
                    Key = "created_at",
                    Direction = "desc",
                },
            },
        });
    
    });
    
    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.GetMicrodropletImagesArgs;
    import com.pulumi.digitalocean.inputs.GetMicrodropletImagesFilterArgs;
    import com.pulumi.digitalocean.inputs.GetMicrodropletImagesSortArgs;
    import java.util.ArrayList;
    import java.util.Arrays;
    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 all = DigitaloceanFunctions.getMicrodropletImages(GetMicrodropletImagesArgs.builder()
                .build());
    
            final var available = DigitaloceanFunctions.getMicrodropletImages(GetMicrodropletImagesArgs.builder()
                .filters(GetMicrodropletImagesFilterArgs.builder()
                    .key("status")
                    .values("IMAGE_AVAILABLE")
                    .build())
                .build());
    
            final var newestFirst = DigitaloceanFunctions.getMicrodropletImages(GetMicrodropletImagesArgs.builder()
                .sorts(GetMicrodropletImagesSortArgs.builder()
                    .key("created_at")
                    .direction("desc")
                    .build())
                .build());
    
        }
    }
    
    variables:
      all:
        fn::invoke:
          function: digitalocean:getMicrodropletImages
          arguments: {}
      available:
        fn::invoke:
          function: digitalocean:getMicrodropletImages
          arguments:
            filters:
              - key: status
                values:
                  - IMAGE_AVAILABLE
      newestFirst:
        fn::invoke:
          function: digitalocean:getMicrodropletImages
          arguments:
            sorts:
              - key: created_at
                direction: desc
    
    pulumi {
      required_providers {
        digitalocean = {
          source = "pulumi/digitalocean"
        }
      }
    }
    
    data "digitalocean_getmicrodropletimages" "all" {
    }
    data "digitalocean_getmicrodropletimages" "available" {
      filters {
        key    = "status"
        values = ["IMAGE_AVAILABLE"]
      }
    }
    data "digitalocean_getmicrodropletimages" "newestFirst" {
      sorts {
        key       = "created_at"
        direction = "desc"
      }
    }
    

    Using getMicrodropletImages

    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 getMicrodropletImages(args: GetMicrodropletImagesArgs, opts?: InvokeOptions): Promise<GetMicrodropletImagesResult>
    function getMicrodropletImagesOutput(args: GetMicrodropletImagesOutputArgs, opts?: InvokeOptions): Output<GetMicrodropletImagesResult>
    def get_microdroplet_images(filters: Optional[Sequence[GetMicrodropletImagesFilter]] = None,
                                sorts: Optional[Sequence[GetMicrodropletImagesSort]] = None,
                                opts: Optional[InvokeOptions] = None) -> GetMicrodropletImagesResult
    def get_microdroplet_images_output(filters: pulumi.Input[Optional[Sequence[pulumi.Input[GetMicrodropletImagesFilterArgs]]]] = None,
                                sorts: pulumi.Input[Optional[Sequence[pulumi.Input[GetMicrodropletImagesSortArgs]]]] = None,
                                opts: Optional[InvokeOptions] = None) -> Output[GetMicrodropletImagesResult]
    func GetMicrodropletImages(ctx *Context, args *GetMicrodropletImagesArgs, opts ...InvokeOption) (*GetMicrodropletImagesResult, error)
    func GetMicrodropletImagesOutput(ctx *Context, args *GetMicrodropletImagesOutputArgs, opts ...InvokeOption) GetMicrodropletImagesResultOutput

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

    public static class GetMicrodropletImages 
    {
        public static Task<GetMicrodropletImagesResult> InvokeAsync(GetMicrodropletImagesArgs args, InvokeOptions? opts = null)
        public static Output<GetMicrodropletImagesResult> Invoke(GetMicrodropletImagesInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetMicrodropletImagesResult> getMicrodropletImages(GetMicrodropletImagesArgs args, InvokeOptions options)
    public static Output<GetMicrodropletImagesResult> getMicrodropletImages(GetMicrodropletImagesArgs args, InvokeOptions options)
    
    fn::invoke:
      function: digitalocean:index/getMicrodropletImages:getMicrodropletImages
      arguments:
        # arguments dictionary
    data "digitalocean_get_microdroplet_images" "name" {
        # arguments
    }

    The following arguments are supported:

    Filters []GetMicrodropletImagesFilter
    Repeatable client-side filter block:
    Sorts []GetMicrodropletImagesSort
    Repeatable client-side sort block:
    filters list(object)
    Repeatable client-side filter block:
    sorts list(object)
    Repeatable client-side sort block:
    filters List<GetMicrodropletImagesFilter>
    Repeatable client-side filter block:
    sorts List<GetMicrodropletImagesSort>
    Repeatable client-side sort block:
    filters GetMicrodropletImagesFilter[]
    Repeatable client-side filter block:
    sorts GetMicrodropletImagesSort[]
    Repeatable client-side sort block:
    filters Sequence[GetMicrodropletImagesFilter]
    Repeatable client-side filter block:
    sorts Sequence[GetMicrodropletImagesSort]
    Repeatable client-side sort block:
    filters List<Property Map>
    Repeatable client-side filter block:
    sorts List<Property Map>
    Repeatable client-side sort block:

    getMicrodropletImages Result

    The following output properties are available:

    Id string
    The provider-assigned unique ID for this managed resource.
    MicroDropletImages List<Pulumi.DigitalOcean.Outputs.GetMicrodropletImagesMicroDropletImage>
    A list of MicroDroplet image records. Each record has the same attribute set as the digitalocean.MicrodropletImage data source.
    Filters List<Pulumi.DigitalOcean.Outputs.GetMicrodropletImagesFilter>
    Sorts List<Pulumi.DigitalOcean.Outputs.GetMicrodropletImagesSort>
    Id string
    The provider-assigned unique ID for this managed resource.
    MicroDropletImages []GetMicrodropletImagesMicroDropletImage
    A list of MicroDroplet image records. Each record has the same attribute set as the digitalocean.MicrodropletImage data source.
    Filters []GetMicrodropletImagesFilter
    Sorts []GetMicrodropletImagesSort
    id string
    The provider-assigned unique ID for this managed resource.
    micro_droplet_images list(object)
    A list of MicroDroplet image records. Each record has the same attribute set as the digitalocean.MicrodropletImage data source.
    filters list(object)
    sorts list(object)
    id String
    The provider-assigned unique ID for this managed resource.
    microDropletImages List<GetMicrodropletImagesMicroDropletImage>
    A list of MicroDroplet image records. Each record has the same attribute set as the digitalocean.MicrodropletImage data source.
    filters List<GetMicrodropletImagesFilter>
    sorts List<GetMicrodropletImagesSort>
    id string
    The provider-assigned unique ID for this managed resource.
    microDropletImages GetMicrodropletImagesMicroDropletImage[]
    A list of MicroDroplet image records. Each record has the same attribute set as the digitalocean.MicrodropletImage data source.
    filters GetMicrodropletImagesFilter[]
    sorts GetMicrodropletImagesSort[]
    id str
    The provider-assigned unique ID for this managed resource.
    micro_droplet_images Sequence[GetMicrodropletImagesMicroDropletImage]
    A list of MicroDroplet image records. Each record has the same attribute set as the digitalocean.MicrodropletImage data source.
    filters Sequence[GetMicrodropletImagesFilter]
    sorts Sequence[GetMicrodropletImagesSort]
    id String
    The provider-assigned unique ID for this managed resource.
    microDropletImages List<Property Map>
    A list of MicroDroplet image records. Each record has the same attribute set as the digitalocean.MicrodropletImage data source.
    filters List<Property Map>
    sorts List<Property Map>

    Supporting Types

    GetMicrodropletImagesFilter

    Key string
    Field to match.
    Values List<string>
    List of values to match on key.
    All bool
    Require every value to match. Defaults to false.
    MatchBy string
    exact, re, or substring. Defaults to exact.
    Key string
    Field to match.
    Values []string
    List of values to match on key.
    All bool
    Require every value to match. Defaults to false.
    MatchBy string
    exact, re, or substring. Defaults to exact.
    key string
    Field to match.
    values list(string)
    List of values to match on key.
    all bool
    Require every value to match. Defaults to false.
    match_by string
    exact, re, or substring. Defaults to exact.
    key String
    Field to match.
    values List<String>
    List of values to match on key.
    all Boolean
    Require every value to match. Defaults to false.
    matchBy String
    exact, re, or substring. Defaults to exact.
    key string
    Field to match.
    values string[]
    List of values to match on key.
    all boolean
    Require every value to match. Defaults to false.
    matchBy string
    exact, re, or substring. Defaults to exact.
    key str
    Field to match.
    values Sequence[str]
    List of values to match on key.
    all bool
    Require every value to match. Defaults to false.
    match_by str
    exact, re, or substring. Defaults to exact.
    key String
    Field to match.
    values List<String>
    List of values to match on key.
    all Boolean
    Require every value to match. Defaults to false.
    matchBy String
    exact, re, or substring. Defaults to exact.

    GetMicrodropletImagesMicroDropletImage

    CreatedAt string
    The creation timestamp for the MicroDroplet image
    Name string
    Name of the MicroDroplet image
    Source string
    Source OCI reference for the MicroDroplet image
    Status string
    Lifecycle status of the MicroDroplet image
    Urn string
    The uniform resource name (URN) for the MicroDroplet image
    CreatedAt string
    The creation timestamp for the MicroDroplet image
    Name string
    Name of the MicroDroplet image
    Source string
    Source OCI reference for the MicroDroplet image
    Status string
    Lifecycle status of the MicroDroplet image
    Urn string
    The uniform resource name (URN) for the MicroDroplet image
    created_at string
    The creation timestamp for the MicroDroplet image
    name string
    Name of the MicroDroplet image
    source string
    Source OCI reference for the MicroDroplet image
    status string
    Lifecycle status of the MicroDroplet image
    urn string
    The uniform resource name (URN) for the MicroDroplet image
    createdAt String
    The creation timestamp for the MicroDroplet image
    name String
    Name of the MicroDroplet image
    source String
    Source OCI reference for the MicroDroplet image
    status String
    Lifecycle status of the MicroDroplet image
    urn String
    The uniform resource name (URN) for the MicroDroplet image
    createdAt string
    The creation timestamp for the MicroDroplet image
    name string
    Name of the MicroDroplet image
    source string
    Source OCI reference for the MicroDroplet image
    status string
    Lifecycle status of the MicroDroplet image
    urn string
    The uniform resource name (URN) for the MicroDroplet image
    created_at str
    The creation timestamp for the MicroDroplet image
    name str
    Name of the MicroDroplet image
    source str
    Source OCI reference for the MicroDroplet image
    status str
    Lifecycle status of the MicroDroplet image
    urn str
    The uniform resource name (URN) for the MicroDroplet image
    createdAt String
    The creation timestamp for the MicroDroplet image
    name String
    Name of the MicroDroplet image
    source String
    Source OCI reference for the MicroDroplet image
    status String
    Lifecycle status of the MicroDroplet image
    urn String
    The uniform resource name (URN) for the MicroDroplet image

    GetMicrodropletImagesSort

    Key string
    Field to sort by.
    Direction string
    asc (default) or desc.
    Key string
    Field to sort by.
    Direction string
    asc (default) or desc.
    key string
    Field to sort by.
    direction string
    asc (default) or desc.
    key String
    Field to sort by.
    direction String
    asc (default) or desc.
    key string
    Field to sort by.
    direction string
    asc (default) or desc.
    key str
    Field to sort by.
    direction str
    asc (default) or desc.
    key String
    Field to sort by.
    direction String
    asc (default) 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.77.0
    published on Friday, Jul 31, 2026 by Pulumi

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial