get Region
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
The following example shows how the resource might be used to obtain the name of the AWS region configured on the provider.
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.AwsFunctions;
import com.pulumi.aws.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 current = AwsFunctions.getRegion();
}
}
Content copied to clipboard
Return
A collection of values returned by getRegion.
Parameters
argument
A collection of arguments for invoking getRegion.
Return
A collection of values returned by getRegion.
Parameters
endpoint
EC2 endpoint of the region to select.
name
Full name of the region to select.
See also
Return
A collection of values returned by getRegion.
Parameters
argument
Builder for com.pulumi.aws.kotlin.inputs.GetRegionPlainArgs.