Vultr v2.21.0 published on Wednesday, Jun 19, 2024 by dirien
vultr.getRegion
Explore with Pulumi AI
Get information about a Vultr region.
Example Usage
Get the information for a region by id
:
import * as pulumi from "@pulumi/pulumi";
import * as vultr from "@pulumi/vultr";
const myRegion = vultr.getRegion({
filters: [{
name: "id",
values: ["sea"],
}],
});
import pulumi
import pulumi_vultr as vultr
my_region = vultr.get_region(filters=[vultr.GetRegionFilterArgs(
name="id",
values=["sea"],
)])
package main
import (
"github.com/dirien/pulumi-vultr/sdk/v2/go/vultr"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := vultr.GetRegion(ctx, &vultr.GetRegionArgs{
Filters: []vultr.GetRegionFilter{
{
Name: "id",
Values: []string{
"sea",
},
},
},
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Vultr = Pulumi.Vultr;
return await Deployment.RunAsync(() =>
{
var myRegion = Vultr.GetRegion.Invoke(new()
{
Filters = new[]
{
new Vultr.Inputs.GetRegionFilterInputArgs
{
Name = "id",
Values = new[]
{
"sea",
},
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.vultr.VultrFunctions;
import com.pulumi.vultr.inputs.GetRegionArgs;
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 myRegion = VultrFunctions.getRegion(GetRegionArgs.builder()
.filters(GetRegionFilterArgs.builder()
.name("id")
.values("sea")
.build())
.build());
}
}
variables:
myRegion:
fn::invoke:
Function: vultr:getRegion
Arguments:
filters:
- name: id
values:
- sea
Using getRegion
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 getRegion(args: GetRegionArgs, opts?: InvokeOptions): Promise<GetRegionResult>
function getRegionOutput(args: GetRegionOutputArgs, opts?: InvokeOptions): Output<GetRegionResult>
def get_region(filters: Optional[Sequence[GetRegionFilter]] = None,
opts: Optional[InvokeOptions] = None) -> GetRegionResult
def get_region_output(filters: Optional[pulumi.Input[Sequence[pulumi.Input[GetRegionFilterArgs]]]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetRegionResult]
func GetRegion(ctx *Context, args *GetRegionArgs, opts ...InvokeOption) (*GetRegionResult, error)
func GetRegionOutput(ctx *Context, args *GetRegionOutputArgs, opts ...InvokeOption) GetRegionResultOutput
> Note: This function is named GetRegion
in the Go SDK.
public static class GetRegion
{
public static Task<GetRegionResult> InvokeAsync(GetRegionArgs args, InvokeOptions? opts = null)
public static Output<GetRegionResult> Invoke(GetRegionInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetRegionResult> getRegion(GetRegionArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: vultr:index/getRegion:getRegion
arguments:
# arguments dictionary
The following arguments are supported:
- Filters
List<ediri.
Vultr. Inputs. Get Region Filter> - Query parameters for finding regions.
- Filters
[]Get
Region Filter - Query parameters for finding regions.
- filters
List<Get
Region Filter> - Query parameters for finding regions.
- filters
Get
Region Filter[] - Query parameters for finding regions.
- filters
Sequence[Get
Region Filter] - Query parameters for finding regions.
- filters List<Property Map>
- Query parameters for finding regions.
getRegion Result
The following output properties are available:
- City string
- The city the region is in.
- Continent string
- The continent the region is in.
- Country string
- The country the region is in.
- Id string
- The provider-assigned unique ID for this managed resource.
- Options List<string>
- Shows whether options like ddos protection or block storage are available in the region.
- Filters
List<ediri.
Vultr. Outputs. Get Region Filter>
- City string
- The city the region is in.
- Continent string
- The continent the region is in.
- Country string
- The country the region is in.
- Id string
- The provider-assigned unique ID for this managed resource.
- Options []string
- Shows whether options like ddos protection or block storage are available in the region.
- Filters
[]Get
Region Filter
- city String
- The city the region is in.
- continent String
- The continent the region is in.
- country String
- The country the region is in.
- id String
- The provider-assigned unique ID for this managed resource.
- options List<String>
- Shows whether options like ddos protection or block storage are available in the region.
- filters
List<Get
Region Filter>
- city string
- The city the region is in.
- continent string
- The continent the region is in.
- country string
- The country the region is in.
- id string
- The provider-assigned unique ID for this managed resource.
- options string[]
- Shows whether options like ddos protection or block storage are available in the region.
- filters
Get
Region Filter[]
- city str
- The city the region is in.
- continent str
- The continent the region is in.
- country str
- The country the region is in.
- id str
- The provider-assigned unique ID for this managed resource.
- options Sequence[str]
- Shows whether options like ddos protection or block storage are available in the region.
- filters
Sequence[Get
Region Filter]
- city String
- The city the region is in.
- continent String
- The continent the region is in.
- country String
- The country the region is in.
- id String
- The provider-assigned unique ID for this managed resource.
- options List<String>
- Shows whether options like ddos protection or block storage are available in the region.
- filters List<Property Map>
Supporting Types
GetRegionFilter
Package Details
- Repository
- vultr dirien/pulumi-vultr
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
vultr
Terraform Provider.