GetSizes
Retrieves information about the Droplet sizes that DigitalOcean supports, with the ability to filter and sort the results. If no filters are specified, all sizes will be returned.
Example Usage
using Pulumi;
using DigitalOcean = Pulumi.DigitalOcean;
class MyStack : Stack
{
public MyStack()
{
var main = Output.Create(DigitalOcean.GetSizes.InvokeAsync(new DigitalOcean.GetSizesArgs
{
Filter =
{
{
{ "key", "slug" },
{ "values",
{
"s-1vcpu-1gb",
} },
},
},
}));
var web = new DigitalOcean.Droplet("web", new DigitalOcean.DropletArgs
{
Image = "ubuntu-18-04-x64",
Region = "sgp1",
Size = main.Apply(main => main.Sizes)[0].Apply(sizes => sizes.Slug),
});
}
}
Coming soon!
import pulumi
import pulumi_digitalocean as digitalocean
main = digitalocean.get_sizes(filter=[{
"key": "slug",
"values": ["s-1vcpu-1gb"],
}])
web = digitalocean.Droplet("web",
image="ubuntu-18-04-x64",
region="sgp1",
size=main.sizes[0]["slug"])import * as pulumi from "@pulumi/pulumi";
import * as digitalocean from "@pulumi/digitalocean";
const main = digitalocean.getSizes({
filter: [{
key: "slug",
values: ["s-1vcpu-1gb"],
}],
});
const web = new digitalocean.Droplet("web", {
image: "ubuntu-18-04-x64",
region: "sgp1",
size: main.then(main => main.sizes)[0].then(sizes => sizes.slug),
});Using GetSizes
function getSizes(args: GetSizesArgs, opts?: InvokeOptions): Promise<GetSizesResult>function get_sizes(filters=None, sorts=None, opts=None)func GetSizes(ctx *Context, args *GetSizesArgs, opts ...InvokeOption) (*GetSizesResult, error)public static class GetSizes {
public static Task<GetSizesResult> InvokeAsync(GetSizesArgs args, InvokeOptions? opts = null)
}The following arguments are supported:
- Filters
List<Pulumi.
Digital Ocean. Inputs. Get Sizes Filter Args> Filter the results. The
filterblock is documented below.- Sorts
List<Pulumi.
Digital Ocean. Inputs. Get Sizes Sort Args> Sort the results. The
sortblock is documented below.
- Filters
[]Get
Sizes Filter Filter the results. The
filterblock is documented below.- Sorts
[]Get
Sizes Sort Sort the results. The
sortblock is documented below.
- filters
Get
Sizes Filter[] Filter the results. The
filterblock is documented below.- sorts
Get
Sizes Sort[] Sort the results. The
sortblock is documented below.
- filters
List[Get
Sizes Filter] Filter the results. The
filterblock is documented below.- sorts
List[Get
Sizes Sort] Sort the results. The
sortblock is documented below.
GetSizes Result
The following output properties are available:
- Id string
The provider-assigned unique ID for this managed resource.
- Sizes
List<Pulumi.
Digital Ocean. Outputs. Get Sizes Size> - Filters
List<Pulumi.
Digital Ocean. Outputs. Get Sizes Filter> - Sorts
List<Pulumi.
Digital Ocean. Outputs. Get Sizes Sort>
- Id string
The provider-assigned unique ID for this managed resource.
- Sizes
[]Get
Sizes Size - Filters
[]Get
Sizes Filter - Sorts
[]Get
Sizes Sort
- id string
The provider-assigned unique ID for this managed resource.
- sizes
Get
Sizes Size[] - filters
Get
Sizes Filter[] - sorts
Get
Sizes Sort[]
- id str
The provider-assigned unique ID for this managed resource.
- sizes
List[Get
Sizes Size] - filters
List[Get
Sizes Filter] - sorts
List[Get
Sizes Sort]
Supporting Types
GetSizesFilter
- Key string
Filter the sizes by this key. This may be one of
slug,regions,memory,vcpus,disk,transfer,price_monthly,price_hourly, oravailable.- Values List<string>
Only retrieves images which keys has value that matches one of the values provided here.
GetSizesSize
See the output API doc for this type.
See the output API doc for this type.
See the output API doc for this type.
- Available bool
This represents whether new Droplets can be created with this size.
- Disk int
The amount of disk space set aside for Droplets of this size. The value is measured in gigabytes.
- Memory int
The amount of RAM allocated to Droplets created of this size. The value is measured in megabytes.
- Price
Hourly double The hourly cost of Droplets created in this size as measured hourly. The value is measured in US dollars.
- Price
Monthly double The monthly cost of Droplets created in this size if they are kept for an entire month. The value is measured in US dollars.
- Regions List<string>
List of region slugs where Droplets can be created in this size.
- Slug string
A human-readable string that is used to uniquely identify each size.
- Transfer double
The amount of transfer bandwidth that is available for Droplets created in this size. This only counts traffic on the public interface. The value is given in terabytes.
- Vcpus int
The number of CPUs allocated to Droplets of this size.
- Available bool
This represents whether new Droplets can be created with this size.
- Disk int
The amount of disk space set aside for Droplets of this size. The value is measured in gigabytes.
- Memory int
The amount of RAM allocated to Droplets created of this size. The value is measured in megabytes.
- Price
Hourly float64 The hourly cost of Droplets created in this size as measured hourly. The value is measured in US dollars.
- Price
Monthly float64 The monthly cost of Droplets created in this size if they are kept for an entire month. The value is measured in US dollars.
- Regions []string
List of region slugs where Droplets can be created in this size.
- Slug string
A human-readable string that is used to uniquely identify each size.
- Transfer float64
The amount of transfer bandwidth that is available for Droplets created in this size. This only counts traffic on the public interface. The value is given in terabytes.
- Vcpus int
The number of CPUs allocated to Droplets of this size.
- available boolean
This represents whether new Droplets can be created with this size.
- disk number
The amount of disk space set aside for Droplets of this size. The value is measured in gigabytes.
- memory number
The amount of RAM allocated to Droplets created of this size. The value is measured in megabytes.
- price
Hourly number The hourly cost of Droplets created in this size as measured hourly. The value is measured in US dollars.
- price
Monthly number The monthly cost of Droplets created in this size if they are kept for an entire month. The value is measured in US dollars.
- regions string[]
List of region slugs where Droplets can be created in this size.
- slug string
A human-readable string that is used to uniquely identify each size.
- transfer number
The amount of transfer bandwidth that is available for Droplets created in this size. This only counts traffic on the public interface. The value is given in terabytes.
- vcpus number
The number of CPUs allocated to Droplets of this size.
- available bool
This represents whether new Droplets can be created with this size.
- disk float
The amount of disk space set aside for Droplets of this size. The value is measured in gigabytes.
- memory float
The amount of RAM allocated to Droplets created of this size. The value is measured in megabytes.
- price_
hourly float The hourly cost of Droplets created in this size as measured hourly. The value is measured in US dollars.
- price_
monthly float The monthly cost of Droplets created in this size if they are kept for an entire month. The value is measured in US dollars.
- regions List[str]
List of region slugs where Droplets can be created in this size.
- slug str
A human-readable string that is used to uniquely identify each size.
- transfer float
The amount of transfer bandwidth that is available for Droplets created in this size. This only counts traffic on the public interface. The value is given in terabytes.
- vcpus float
The number of CPUs allocated to Droplets of this size.
GetSizesSort
Package Details
- Repository
- https://github.com/pulumi/pulumi-digitalocean
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
digitaloceanTerraform Provider.