GetRegions

Retrieve information about all supported DigitalOcean regions, with the ability to filter and sort the results. If no filters are specified, all regions will be returned.

Note: You can use the digitalocean..getRegion data source to obtain metadata about a single region if you already know the slug to retrieve.

Example Usage

using Pulumi;
using DigitalOcean = Pulumi.DigitalOcean;

class MyStack : Stack
{
    public MyStack()
    {
        var available = Output.Create(DigitalOcean.GetRegions.InvokeAsync(new DigitalOcean.GetRegionsArgs
        {
            Filters = 
            {
                new DigitalOcean.Inputs.GetRegionsFilterArgs
                {
                    Key = "available",
                    Values = 
                    {
                        "true",
                    },
                },
            },
        }));
    }

}

Coming soon!

import pulumi
import pulumi_digitalocean as digitalocean

available = digitalocean.get_regions(filters=[{
    "key": "available",
    "values": ["true"],
}])
import * as pulumi from "@pulumi/pulumi";
import * as digitalocean from "@pulumi/digitalocean";

const available = pulumi.output(digitalocean.getRegions({
    filters: [{
        key: "available",
        values: ["true"],
    }],
}, { async: true }));

Using GetRegions

function getRegions(args: GetRegionsArgs, opts?: InvokeOptions): Promise<GetRegionsResult>
function  get_regions(filters=None, sorts=None, opts=None)
func GetRegions(ctx *Context, args *GetRegionsArgs, opts ...InvokeOption) (*GetRegionsResult, error)
public static class GetRegions {
    public static Task<GetRegionsResult> InvokeAsync(GetRegionsArgs args, InvokeOptions? opts = null)
}

The following arguments are supported:

Filters List<Pulumi.DigitalOcean.Inputs.GetRegionsFilterArgs>

Filter the results. The filter block is documented below.

Sorts List<Pulumi.DigitalOcean.Inputs.GetRegionsSortArgs>

Sort the results. The sort block is documented below.

Filters []GetRegionsFilter

Filter the results. The filter block is documented below.

Sorts []GetRegionsSort

Sort the results. The sort block is documented below.

filters GetRegionsFilter[]

Filter the results. The filter block is documented below.

sorts GetRegionsSort[]

Sort the results. The sort block is documented below.

filters List[GetRegionsFilter]

Filter the results. The filter block is documented below.

sorts List[GetRegionsSort]

Sort the results. The sort block is documented below.

GetRegions Result

The following output properties are available:

Id string

The provider-assigned unique ID for this managed resource.

Regions List<Pulumi.DigitalOcean.Outputs.GetRegionsRegion>

A set of regions satisfying any filter and sort criteria. Each region has the following attributes:
- slug - A human-readable string that is used as a unique identifier for each region. - name - The display name of the region. - available - A boolean value that represents whether new Droplets can be created in this region. - sizes - A set of identifying slugs for the Droplet sizes available in this region. - features - A set of features available in this region.

Filters List<Pulumi.DigitalOcean.Outputs.GetRegionsFilter>
Sorts List<Pulumi.DigitalOcean.Outputs.GetRegionsSort>
Id string

The provider-assigned unique ID for this managed resource.

Regions []GetRegionsRegion

A set of regions satisfying any filter and sort criteria. Each region has the following attributes:
- slug - A human-readable string that is used as a unique identifier for each region. - name - The display name of the region. - available - A boolean value that represents whether new Droplets can be created in this region. - sizes - A set of identifying slugs for the Droplet sizes available in this region. - features - A set of features available in this region.

Filters []GetRegionsFilter
Sorts []GetRegionsSort
id string

The provider-assigned unique ID for this managed resource.

regions GetRegionsRegion[]

A set of regions satisfying any filter and sort criteria. Each region has the following attributes:
- slug - A human-readable string that is used as a unique identifier for each region. - name - The display name of the region. - available - A boolean value that represents whether new Droplets can be created in this region. - sizes - A set of identifying slugs for the Droplet sizes available in this region. - features - A set of features available in this region.

filters GetRegionsFilter[]
sorts GetRegionsSort[]
id str

The provider-assigned unique ID for this managed resource.

regions List[GetRegionsRegion]

A set of regions satisfying any filter and sort criteria. Each region has the following attributes:
- slug - A human-readable string that is used as a unique identifier for each region. - name - The display name of the region. - available - A boolean value that represents whether new Droplets can be created in this region. - sizes - A set of identifying slugs for the Droplet sizes available in this region. - features - A set of features available in this region.

filters List[GetRegionsFilter]
sorts List[GetRegionsSort]

Supporting Types

GetRegionsFilter

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

Key string

Filter the regions by this key. This may be one of slug, name, available, features, or sizes.

Values List<string>

A list of values to match against the key field. Only retrieves regions where the key field takes on one or more of the values provided here.

Key string

Filter the regions by this key. This may be one of slug, name, available, features, or sizes.

Values []string

A list of values to match against the key field. Only retrieves regions where the key field takes on one or more of the values provided here.

key string

Filter the regions by this key. This may be one of slug, name, available, features, or sizes.

values string[]

A list of values to match against the key field. Only retrieves regions where the key field takes on one or more of the values provided here.

key str

Filter the regions by this key. This may be one of slug, name, available, features, or sizes.

values List[str]

A list of values to match against the key field. Only retrieves regions where the key field takes on one or more of the values provided here.

GetRegionsRegion

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
Features List<string>
Name string
Sizes List<string>
Slug string
Available bool
Features []string
Name string
Sizes []string
Slug string
available boolean
features string[]
name string
sizes string[]
slug string
available bool
features List[str]
name str
sizes List[str]
slug str

GetRegionsSort

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

Key string

Sort the regions by this key. This may be one of slug, name, or available.

Direction string

The sort direction. This may be either asc or desc.

Key string

Sort the regions by this key. This may be one of slug, name, or available.

Direction string

The sort direction. This may be either asc or desc.

key string

Sort the regions by this key. This may be one of slug, name, or available.

direction string

The sort direction. This may be either asc or desc.

key str

Sort the regions by this key. This may be one of slug, name, or available.

direction str

The sort direction. This may be either asc or desc.

Package Details

Repository
https://github.com/pulumi/pulumi-digitalocean
License
Apache-2.0
Notes
This Pulumi package is based on the digitalocean Terraform Provider.