Linode v4.37.0 published on Thursday, Apr 10, 2025 by Pulumi
linode.getRegions
Explore with Pulumi AI
Provides information about Linode regions that match a set of filters. For more information, see the Linode APIv4 docs.
import * as pulumi from "@pulumi/pulumi";
import * as linode from "@pulumi/linode";
const filtered_regions = linode.getRegions({
filters: [
{
name: "status",
values: ["ok"],
},
{
name: "capabilities",
values: ["NodeBalancers"],
},
],
});
export const regions = filtered_regions.then(filtered_regions => filtered_regions.regions);
import pulumi
import pulumi_linode as linode
filtered_regions = linode.get_regions(filters=[
{
"name": "status",
"values": ["ok"],
},
{
"name": "capabilities",
"values": ["NodeBalancers"],
},
])
pulumi.export("regions", filtered_regions.regions)
package main
import (
"github.com/pulumi/pulumi-linode/sdk/v4/go/linode"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
filtered_regions, err := linode.GetRegions(ctx, &linode.GetRegionsArgs{
Filters: []linode.GetRegionsFilter{
{
Name: "status",
Values: []string{
"ok",
},
},
{
Name: "capabilities",
Values: []string{
"NodeBalancers",
},
},
},
}, nil)
if err != nil {
return err
}
ctx.Export("regions", filtered_regions.Regions)
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Linode = Pulumi.Linode;
return await Deployment.RunAsync(() =>
{
var filtered_regions = Linode.GetRegions.Invoke(new()
{
Filters = new[]
{
new Linode.Inputs.GetRegionsFilterInputArgs
{
Name = "status",
Values = new[]
{
"ok",
},
},
new Linode.Inputs.GetRegionsFilterInputArgs
{
Name = "capabilities",
Values = new[]
{
"NodeBalancers",
},
},
},
});
return new Dictionary<string, object?>
{
["regions"] = filtered_regions.Apply(filtered_regions => filtered_regions.Apply(getRegionsResult => getRegionsResult.Regions)),
};
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.linode.LinodeFunctions;
import com.pulumi.linode.inputs.GetRegionsArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
final var filtered-regions = LinodeFunctions.getRegions(GetRegionsArgs.builder()
.filters(
GetRegionsFilterArgs.builder()
.name("status")
.values("ok")
.build(),
GetRegionsFilterArgs.builder()
.name("capabilities")
.values("NodeBalancers")
.build())
.build());
ctx.export("regions", filtered_regions.regions());
}
}
variables:
filtered-regions:
fn::invoke:
function: linode:getRegions
arguments:
filters:
- name: status
values:
- ok
- name: capabilities
values:
- NodeBalancers
outputs:
regions: ${["filtered-regions"].regions}
Filterable Fields
status
country
capabilities
site_type
Using getRegions
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getRegions(args: GetRegionsArgs, opts?: InvokeOptions): Promise<GetRegionsResult>
function getRegionsOutput(args: GetRegionsOutputArgs, opts?: InvokeOptions): Output<GetRegionsResult>
def get_regions(filters: Optional[Sequence[GetRegionsFilter]] = None,
regions: Optional[Sequence[GetRegionsRegion]] = None,
opts: Optional[InvokeOptions] = None) -> GetRegionsResult
def get_regions_output(filters: Optional[pulumi.Input[Sequence[pulumi.Input[GetRegionsFilterArgs]]]] = None,
regions: Optional[pulumi.Input[Sequence[pulumi.Input[GetRegionsRegionArgs]]]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetRegionsResult]
func GetRegions(ctx *Context, args *GetRegionsArgs, opts ...InvokeOption) (*GetRegionsResult, error)
func GetRegionsOutput(ctx *Context, args *GetRegionsOutputArgs, opts ...InvokeOption) GetRegionsResultOutput
> Note: This function is named GetRegions
in the Go SDK.
public static class GetRegions
{
public static Task<GetRegionsResult> InvokeAsync(GetRegionsArgs args, InvokeOptions? opts = null)
public static Output<GetRegionsResult> Invoke(GetRegionsInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetRegionsResult> getRegions(GetRegionsArgs args, InvokeOptions options)
public static Output<GetRegionsResult> getRegions(GetRegionsArgs args, InvokeOptions options)
fn::invoke:
function: linode:index/getRegions:getRegions
arguments:
# arguments dictionary
The following arguments are supported:
getRegions Result
The following output properties are available:
Supporting Types
GetRegionsFilter
- Name
This property is required. string - The name of the field to filter by. See the Filterable Fields section for a complete list of filterable fields.
- Values
This property is required. List<string> - A list of values for the filter to allow. These values should all be in string form.
- Match
By string - The method to match the field by. (
exact
,regex
,substring
; defaultexact
)
- Name
This property is required. string - The name of the field to filter by. See the Filterable Fields section for a complete list of filterable fields.
- Values
This property is required. []string - A list of values for the filter to allow. These values should all be in string form.
- Match
By string - The method to match the field by. (
exact
,regex
,substring
; defaultexact
)
- name
This property is required. String - The name of the field to filter by. See the Filterable Fields section for a complete list of filterable fields.
- values
This property is required. List<String> - A list of values for the filter to allow. These values should all be in string form.
- match
By String - The method to match the field by. (
exact
,regex
,substring
; defaultexact
)
- name
This property is required. string - The name of the field to filter by. See the Filterable Fields section for a complete list of filterable fields.
- values
This property is required. string[] - A list of values for the filter to allow. These values should all be in string form.
- match
By string - The method to match the field by. (
exact
,regex
,substring
; defaultexact
)
- name
This property is required. str - The name of the field to filter by. See the Filterable Fields section for a complete list of filterable fields.
- values
This property is required. Sequence[str] - A list of values for the filter to allow. These values should all be in string form.
- match_
by str - The method to match the field by. (
exact
,regex
,substring
; defaultexact
)
- name
This property is required. String - The name of the field to filter by. See the Filterable Fields section for a complete list of filterable fields.
- values
This property is required. List<String> - A list of values for the filter to allow. These values should all be in string form.
- match
By String - The method to match the field by. (
exact
,regex
,substring
; defaultexact
)
GetRegionsRegion
- Capabilities
This property is required. List<string> - A list of capabilities of this region.
- Country
This property is required. string - The country the region resides in.
- Id
This property is required. string - The unique ID of this Region.
- Label
This property is required. string - Detailed location information for this Region, including city, state or region, and country.
- Placement
Group Limits This property is required. List<GetRegions Region Placement Group Limit> - Information about placement groups limits for this region.
- Site
Type This property is required. string - The type of this region.
- Status
This property is required. string - This region’s current operational status (ok or outage).
- Resolvers
List<Get
Regions Region Resolver>
- Capabilities
This property is required. []string - A list of capabilities of this region.
- Country
This property is required. string - The country the region resides in.
- Id
This property is required. string - The unique ID of this Region.
- Label
This property is required. string - Detailed location information for this Region, including city, state or region, and country.
- Placement
Group Limits This property is required. []GetRegions Region Placement Group Limit - Information about placement groups limits for this region.
- Site
Type This property is required. string - The type of this region.
- Status
This property is required. string - This region’s current operational status (ok or outage).
- Resolvers
[]Get
Regions Region Resolver
- capabilities
This property is required. List<String> - A list of capabilities of this region.
- country
This property is required. String - The country the region resides in.
- id
This property is required. String - The unique ID of this Region.
- label
This property is required. String - Detailed location information for this Region, including city, state or region, and country.
- placement
Group Limits This property is required. List<GetRegions Region Placement Group Limit> - Information about placement groups limits for this region.
- site
Type This property is required. String - The type of this region.
- status
This property is required. String - This region’s current operational status (ok or outage).
- resolvers
List<Get
Regions Region Resolver>
- capabilities
This property is required. string[] - A list of capabilities of this region.
- country
This property is required. string - The country the region resides in.
- id
This property is required. string - The unique ID of this Region.
- label
This property is required. string - Detailed location information for this Region, including city, state or region, and country.
- placement
Group Limits This property is required. GetRegions Region Placement Group Limit[] - Information about placement groups limits for this region.
- site
Type This property is required. string - The type of this region.
- status
This property is required. string - This region’s current operational status (ok or outage).
- resolvers
Get
Regions Region Resolver[]
- capabilities
This property is required. Sequence[str] - A list of capabilities of this region.
- country
This property is required. str - The country the region resides in.
- id
This property is required. str - The unique ID of this Region.
- label
This property is required. str - Detailed location information for this Region, including city, state or region, and country.
- placement_
group_ limits This property is required. Sequence[GetRegions Region Placement Group Limit] - Information about placement groups limits for this region.
- site_
type This property is required. str - The type of this region.
- status
This property is required. str - This region’s current operational status (ok or outage).
- resolvers
Sequence[Get
Regions Region Resolver]
- capabilities
This property is required. List<String> - A list of capabilities of this region.
- country
This property is required. String - The country the region resides in.
- id
This property is required. String - The unique ID of this Region.
- label
This property is required. String - Detailed location information for this Region, including city, state or region, and country.
- placement
Group Limits This property is required. List<Property Map> - Information about placement groups limits for this region.
- site
Type This property is required. String - The type of this region.
- status
This property is required. String - This region’s current operational status (ok or outage).
- resolvers List<Property Map>
GetRegionsRegionPlacementGroupLimit
- Maximum
Linodes Per Pg This property is required. int - The maximum number of Linodes allowed to be assigned to a placement group in this region.
- Maximum
Pgs Per Customer This property is required. int - The maximum number of placement groups allowed for the current user in this region.
- Maximum
Linodes Per Pg This property is required. int - The maximum number of Linodes allowed to be assigned to a placement group in this region.
- Maximum
Pgs Per Customer This property is required. int - The maximum number of placement groups allowed for the current user in this region.
- maximum
Linodes Per Pg This property is required. Integer - The maximum number of Linodes allowed to be assigned to a placement group in this region.
- maximum
Pgs Per Customer This property is required. Integer - The maximum number of placement groups allowed for the current user in this region.
- maximum
Linodes Per Pg This property is required. number - The maximum number of Linodes allowed to be assigned to a placement group in this region.
- maximum
Pgs Per Customer This property is required. number - The maximum number of placement groups allowed for the current user in this region.
- maximum_
linodes_ per_ pg This property is required. int - The maximum number of Linodes allowed to be assigned to a placement group in this region.
- maximum_
pgs_ per_ customer This property is required. int - The maximum number of placement groups allowed for the current user in this region.
- maximum
Linodes Per Pg This property is required. Number - The maximum number of Linodes allowed to be assigned to a placement group in this region.
- maximum
Pgs Per Customer This property is required. Number - The maximum number of placement groups allowed for the current user in this region.
GetRegionsRegionResolver
Package Details
- Repository
- Linode pulumi/pulumi-linode
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
linode
Terraform Provider.