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.
Digital Ocean. Inputs. Get Regions Filter Args> Filter the results. The
filterblock is documented below.- Sorts
List<Pulumi.
Digital Ocean. Inputs. Get Regions Sort Args> Sort the results. The
sortblock is documented below.
- Filters
[]Get
Regions Filter Filter the results. The
filterblock is documented below.- Sorts
[]Get
Regions Sort Sort the results. The
sortblock is documented below.
- filters
Get
Regions Filter[] Filter the results. The
filterblock is documented below.- sorts
Get
Regions Sort[] Sort the results. The
sortblock is documented below.
- filters
List[Get
Regions Filter] Filter the results. The
filterblock is documented below.- sorts
List[Get
Regions Sort] Sort the results. The
sortblock 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.
Digital Ocean. Outputs. Get Regions Region> A set of regions satisfying any
filterandsortcriteria. 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.
Digital Ocean. Outputs. Get Regions Filter> - Sorts
List<Pulumi.
Digital Ocean. Outputs. Get Regions Sort>
- Id string
The provider-assigned unique ID for this managed resource.
- Regions
[]Get
Regions Region A set of regions satisfying any
filterandsortcriteria. 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
[]Get
Regions Filter - Sorts
[]Get
Regions Sort
- id string
The provider-assigned unique ID for this managed resource.
- regions
Get
Regions Region[] A set of regions satisfying any
filterandsortcriteria. 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
Get
Regions Filter[] - sorts
Get
Regions Sort[]
- id str
The provider-assigned unique ID for this managed resource.
- regions
List[Get
Regions Region] A set of regions satisfying any
filterandsortcriteria. 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[Get
Regions Filter] - sorts
List[Get
Regions Sort]
Supporting Types
GetRegionsFilter
- Key string
Filter the regions by this key. This may be one of
slug,name,available,features, orsizes.- Values List<string>
A list of values to match against the
keyfield. Only retrieves regions where thekeyfield 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.
GetRegionsSort
Package Details
- Repository
- https://github.com/pulumi/pulumi-digitalocean
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
digitaloceanTerraform Provider.