region

package
v1.2.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 7, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	STS = iota
	EKS
	ECR
)

Variables

View Source
var (
	AwsRegions = []string{
		"us-east-2",
		"us-east-1",
		"us-west-1",
		"us-west-2",
		"af-south-1",
		"ap-east-1",
		"ap-south-1",
		"ap-northeast-3",
		"ap-northeast-2",
		"ap-southeast-1",
		"ap-southeast-2",
		"ap-northeast-1",
		"ca-central-1",
		"eu-central-1",
		"eu-west-1",
		"eu-west-2",
		"eu-south-1",
		"eu-west-3",
		"eu-north-1",
		"me-south-1",
		"sa-east-1",
		"us-gov-east-1",
		"us-gov-west-1",
		"cn-north-1",
		"cn-northwest-1",
	}

	ErrEmptyResponse  = errors.New("an empty response was returned")
	ErrRegionInvalid  = errors.New("the provided region is invalid")
	ErrRegionNotFound = errors.New("could not find a region in the system")
)

Functions

func GetRegion

func GetRegion(regionType int) (string, error)

func GetResourceRegion

func GetResourceRegion() (string, error)

Returns the region in precedence of environment region, config region and finally default region.

func GetSTSRegion

func GetSTSRegion() (string, error)

Returns the region in precedence of environment region, config region and finally default region.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL