GetRegion
Get information on a single DigitalOcean region. This is useful to find out what Droplet sizes and features are supported within a region.
Example Usage
using Pulumi;
using DigitalOcean = Pulumi.DigitalOcean;
class MyStack : Stack
{
public MyStack()
{
var sfo2 = Output.Create(DigitalOcean.GetRegion.InvokeAsync(new DigitalOcean.GetRegionArgs
{
Slug = "sfo2",
}));
this.RegionName = sfo2.Apply(sfo2 => sfo2.Name);
}
[Output("regionName")]
public Output<string> RegionName { get; set; }
}
Coming soon!
import pulumi
import pulumi_digitalocean as digitalocean
sfo2 = digitalocean.get_region(slug="sfo2")
pulumi.export("regionName", sfo2.name)import * as pulumi from "@pulumi/pulumi";
import * as digitalocean from "@pulumi/digitalocean";
const sfo2 = digitalocean.getRegion({
slug: "sfo2",
});
export const regionName = sfo2.then(sfo2 => sfo2.name);Using GetRegion
function getRegion(args: GetRegionArgs, opts?: InvokeOptions): Promise<GetRegionResult>function get_region(slug=None, opts=None)func GetRegion(ctx *Context, args *GetRegionArgs, opts ...InvokeOption) (*GetRegionResult, error)public static class GetRegion {
public static Task<GetRegionResult> InvokeAsync(GetRegionArgs args, InvokeOptions? opts = null)
}The following arguments are supported:
GetRegion Result
The following output properties are available:
- Available bool
A boolean value that represents whether new Droplets can be created in this region.
- Features List<string>
A set of features available in this region.
- Id string
The provider-assigned unique ID for this managed resource.
- Name string
The display name of the region.
- Sizes List<string>
A set of identifying slugs for the Droplet sizes available in this region.
- Slug string
A human-readable string that is used as a unique identifier for each region.
- Available bool
A boolean value that represents whether new Droplets can be created in this region.
- Features []string
A set of features available in this region.
- Id string
The provider-assigned unique ID for this managed resource.
- Name string
The display name of the region.
- Sizes []string
A set of identifying slugs for the Droplet sizes available in this region.
- Slug string
A human-readable string that is used as a unique identifier for each region.
- available boolean
A boolean value that represents whether new Droplets can be created in this region.
- features string[]
A set of features available in this region.
- id string
The provider-assigned unique ID for this managed resource.
- name string
The display name of the region.
- sizes string[]
A set of identifying slugs for the Droplet sizes available in this region.
- slug string
A human-readable string that is used as a unique identifier for each region.
- available bool
A boolean value that represents whether new Droplets can be created in this region.
- features List[str]
A set of features available in this region.
- id str
The provider-assigned unique ID for this managed resource.
- name str
The display name of the region.
- sizes List[str]
A set of identifying slugs for the Droplet sizes available in this region.
- slug str
A human-readable string that is used as a unique identifier for each region.
Package Details
- Repository
- https://github.com/pulumi/pulumi-digitalocean
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
digitaloceanTerraform Provider.