GetRegion

aws.getRegion provides details about a specific AWS region.

As well as validating a given region name this resource can be used to discover the name of the region configured within the provider. The latter can be useful in a child module which is inheriting an AWS provider configuration from its parent module.

Example Usage

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
    public MyStack()
    {
        var current = Output.Create(Aws.GetRegion.InvokeAsync());
    }

}
package main

import (
    "github.com/pulumi/pulumi-aws/sdk/v2/go/aws"
    "github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)

func main() {
    pulumi.Run(func(ctx *pulumi.Context) error {
        _, err := aws.GetRegion(ctx, nil, nil)
        if err != nil {
            return err
        }
        return nil
    })
}
import pulumi
import pulumi_aws as aws

current = aws.get_region()
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const current = pulumi.output(aws.getRegion({ async: true }));

Using GetRegion

function getRegion(args: GetRegionArgs, opts?: InvokeOptions): Promise<GetRegionResult>
function  get_region(endpoint=None, name=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:

Endpoint string

The EC2 endpoint of the region to select.

Name string

The full name of the region to select.

Endpoint string

The EC2 endpoint of the region to select.

Name string

The full name of the region to select.

endpoint string

The EC2 endpoint of the region to select.

name string

The full name of the region to select.

endpoint str

The EC2 endpoint of the region to select.

name str

The full name of the region to select.

GetRegion Result

The following output properties are available:

Description string

The region’s description in this format: “Location (Region name)”.

Endpoint string

The EC2 endpoint for the selected region.

Id string

The provider-assigned unique ID for this managed resource.

Name string

The name of the selected region.

Description string

The region’s description in this format: “Location (Region name)”.

Endpoint string

The EC2 endpoint for the selected region.

Id string

The provider-assigned unique ID for this managed resource.

Name string

The name of the selected region.

description string

The region’s description in this format: “Location (Region name)”.

endpoint string

The EC2 endpoint for the selected region.

id string

The provider-assigned unique ID for this managed resource.

name string

The name of the selected region.

description str

The region’s description in this format: “Location (Region name)”.

endpoint str

The EC2 endpoint for the selected region.

id str

The provider-assigned unique ID for this managed resource.

name str

The name of the selected region.

Package Details

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