GetDroplets
Get information on Droplets for use in other resources, with the ability to filter and sort the results. If no filters are specified, all Droplets will be returned.
This data source is useful if the Droplets in question are not managed by this provider or you need to utilize any of the Droplets’ data.
Note: You can use the digitalocean..Droplet data source to obtain metadata
about a single Droplet if you already know the id, unique name, or unique tag to retrieve.
Example Usage
using Pulumi;
using DigitalOcean = Pulumi.DigitalOcean;
class MyStack : Stack
{
public MyStack()
{
var small = Output.Create(DigitalOcean.GetDroplets.InvokeAsync(new DigitalOcean.GetDropletsArgs
{
Filters =
{
new DigitalOcean.Inputs.GetDropletsFilterArgs
{
Key = "size",
Values =
{
"s-1vcpu-1gb",
},
},
},
}));
}
}
Coming soon!
import pulumi
import pulumi_digitalocean as digitalocean
small = digitalocean.get_droplets(filters=[{
"key": "size",
"values": ["s-1vcpu-1gb"],
}])import * as pulumi from "@pulumi/pulumi";
import * as digitalocean from "@pulumi/digitalocean";
const small = pulumi.output(digitalocean.getDroplets({
filters: [{
key: "size",
values: ["s-1vcpu-1gb"],
}],
}, { async: true }));Using GetDroplets
function getDroplets(args: GetDropletsArgs, opts?: InvokeOptions): Promise<GetDropletsResult>function get_droplets(filters=None, sorts=None, opts=None)func GetDroplets(ctx *Context, args *GetDropletsArgs, opts ...InvokeOption) (*GetDropletsResult, error)public static class GetDroplets {
public static Task<GetDropletsResult> InvokeAsync(GetDropletsArgs args, InvokeOptions? opts = null)
}The following arguments are supported:
- Filters
List<Pulumi.
Digital Ocean. Inputs. Get Droplets Filter Args> Filter the results. The
filterblock is documented below.- Sorts
List<Pulumi.
Digital Ocean. Inputs. Get Droplets Sort Args> Sort the results. The
sortblock is documented below.
- Filters
[]Get
Droplets Filter Filter the results. The
filterblock is documented below.- Sorts
[]Get
Droplets Sort Sort the results. The
sortblock is documented below.
- filters
Get
Droplets Filter[] Filter the results. The
filterblock is documented below.- sorts
Get
Droplets Sort[] Sort the results. The
sortblock is documented below.
- filters
List[Get
Droplets Filter] Filter the results. The
filterblock is documented below.- sorts
List[Get
Droplets Sort] Sort the results. The
sortblock is documented below.
GetDroplets Result
The following output properties are available:
- Droplets
List<Pulumi.
Digital Ocean. Outputs. Get Droplets Droplet> A list of Droplets satisfying any
filterandsortcriteria. Each Droplet has the following attributes:- Id string
The provider-assigned unique ID for this managed resource.
- Filters
List<Pulumi.
Digital Ocean. Outputs. Get Droplets Filter> - Sorts
List<Pulumi.
Digital Ocean. Outputs. Get Droplets Sort>
- Droplets
[]Get
Droplets Droplet A list of Droplets satisfying any
filterandsortcriteria. Each Droplet has the following attributes:- Id string
The provider-assigned unique ID for this managed resource.
- Filters
[]Get
Droplets Filter - Sorts
[]Get
Droplets Sort
- droplets
Get
Droplets Droplet[] A list of Droplets satisfying any
filterandsortcriteria. Each Droplet has the following attributes:- id string
The provider-assigned unique ID for this managed resource.
- filters
Get
Droplets Filter[] - sorts
Get
Droplets Sort[]
- droplets
List[Get
Droplets Droplet] A list of Droplets satisfying any
filterandsortcriteria. Each Droplet has the following attributes:- id str
The provider-assigned unique ID for this managed resource.
- filters
List[Get
Droplets Filter] - sorts
List[Get
Droplets Sort]
Supporting Types
GetDropletsDroplet
See the output API doc for this type.
See the output API doc for this type.
See the output API doc for this type.
- Backups bool
- Created
At string - Disk int
- Id int
- Image string
- Ipv4Address string
- Ipv4Address
Private string - Ipv6 bool
- Ipv6Address string
- Ipv6Address
Private string - Locked bool
- Memory int
- Monitoring bool
- Name string
- Price
Hourly double - Price
Monthly double - Private
Networking bool - Region string
- Size string
- Status string
- List<string>
- Urn string
- Vcpus int
- Volume
Ids List<string> - Vpc
Uuid string
- Backups bool
- Created
At string - Disk int
- Id int
- Image string
- Ipv4Address string
- Ipv4Address
Private string - Ipv6 bool
- Ipv6Address string
- Ipv6Address
Private string - Locked bool
- Memory int
- Monitoring bool
- Name string
- Price
Hourly float64 - Price
Monthly float64 - Private
Networking bool - Region string
- Size string
- Status string
- []string
- Urn string
- Vcpus int
- Volume
Ids []string - Vpc
Uuid string
- backups boolean
- created
At string - disk number
- id number
- image string
- ipv4Address string
- ipv4Address
Private string - ipv6 boolean
- ipv6Address string
- ipv6Address
Private string - locked boolean
- memory number
- monitoring boolean
- name string
- price
Hourly number - price
Monthly number - private
Networking boolean - region string
- size string
- status string
- string[]
- urn string
- vcpus number
- volume
Ids string[] - vpc
Uuid string
- backups bool
- created_
at str - disk float
- id float
- image str
- ipv4_
address str - ipv4_
address_ strprivate - ipv6 bool
- ipv6Address
Private str - ipv6_
address str - locked bool
- memory float
- monitoring bool
- name str
- price_
hourly float - price_
monthly float - private_
networking bool - region str
- size str
- status str
- List[str]
- urn str
- vcpus float
- volume_
ids List[str] - vpc_
uuid str
GetDropletsFilter
- Key string
Filter the Droplets by this key. This may be one of ‘
backups,created_at,disk,id,image,ipv4_address,ipv4_address_private,ipv6,ipv6_address,ipv6_address_private,locked,memory,monitoring,name,price_hourly,price_monthly,private_networking,region,size,status,tags,urn,vcpus,volume_ids, orvpc_uuid’.- Values List<string>
A list of values to match against the
keyfield. Only retrieves Droplets where thekeyfield takes on one or more of the values provided here.
- Key string
Filter the Droplets by this key. This may be one of ‘
backups,created_at,disk,id,image,ipv4_address,ipv4_address_private,ipv6,ipv6_address,ipv6_address_private,locked,memory,monitoring,name,price_hourly,price_monthly,private_networking,region,size,status,tags,urn,vcpus,volume_ids, orvpc_uuid’.- Values []string
A list of values to match against the
keyfield. Only retrieves Droplets where thekeyfield takes on one or more of the values provided here.
- key string
Filter the Droplets by this key. This may be one of ‘
backups,created_at,disk,id,image,ipv4_address,ipv4_address_private,ipv6,ipv6_address,ipv6_address_private,locked,memory,monitoring,name,price_hourly,price_monthly,private_networking,region,size,status,tags,urn,vcpus,volume_ids, orvpc_uuid’.- values string[]
A list of values to match against the
keyfield. Only retrieves Droplets where thekeyfield takes on one or more of the values provided here.
- key str
Filter the Droplets by this key. This may be one of ‘
backups,created_at,disk,id,image,ipv4_address,ipv4_address_private,ipv6,ipv6_address,ipv6_address_private,locked,memory,monitoring,name,price_hourly,price_monthly,private_networking,region,size,status,tags,urn,vcpus,volume_ids, orvpc_uuid’.- values List[str]
A list of values to match against the
keyfield. Only retrieves Droplets where thekeyfield takes on one or more of the values provided here.
GetDropletsSort
- Key string
Sort the Droplets by this key. This may be one of
backups,created_at,disk,id,image,ipv4_address,ipv4_address_private,ipv6,ipv6_address,ipv6_address_private,locked,memory,monitoring,name,price_hourly,price_monthly,private_networking,region,size,status,urn,vcpus, orvpc_uuid.- Direction string
The sort direction. This may be either
ascordesc.
- Key string
Sort the Droplets by this key. This may be one of
backups,created_at,disk,id,image,ipv4_address,ipv4_address_private,ipv6,ipv6_address,ipv6_address_private,locked,memory,monitoring,name,price_hourly,price_monthly,private_networking,region,size,status,urn,vcpus, orvpc_uuid.- Direction string
The sort direction. This may be either
ascordesc.
- key string
Sort the Droplets by this key. This may be one of
backups,created_at,disk,id,image,ipv4_address,ipv4_address_private,ipv6,ipv6_address,ipv6_address_private,locked,memory,monitoring,name,price_hourly,price_monthly,private_networking,region,size,status,urn,vcpus, orvpc_uuid.- direction string
The sort direction. This may be either
ascordesc.
- key str
Sort the Droplets by this key. This may be one of
backups,created_at,disk,id,image,ipv4_address,ipv4_address_private,ipv6,ipv6_address,ipv6_address_private,locked,memory,monitoring,name,price_hourly,price_monthly,private_networking,region,size,status,urn,vcpus, orvpc_uuid.- direction str
The sort direction. This may be either
ascordesc.
Package Details
- Repository
- https://github.com/pulumi/pulumi-digitalocean
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
digitaloceanTerraform Provider.