awsapi

package
v0.4.3 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2019 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Overview

Package awsapi implements wrappers for AWS API calls.

Index

Constants

This section is empty.

Variables

View Source
var AirportToRegion = map[string]string{
	"ARN": "eu-north-1",
	"BAH": "me-south-1",
	"BJS": "cn-north-1",
	"BOM": "ap-south-1",
	"CDG": "eu-west-3",
	"CGK": "ap-southeast-3",
	"CMH": "us-east-2",
	"CPT": "af-south-1",
	"DUB": "eu-west-1",
	"FRA": "eu-central-1",
	"GRU": "sa-east-1",
	"HKG": "ap-east-1",
	"IAD": "us-east-1",
	"ICN": "ap-northeast-2",
	"LHR": "eu-west-2",
	"MXP": "eu-south-1",
	"NRT": "ap-northeast-1",
	"PDX": "us-west-2",
	"SFO": "us-west-1",
	"SIN": "ap-southeast-1",
	"SYD": "ap-southeast-2",
	"YUL": "ca-central-1",
	"ZHY": "cn-northwest-1",
}

AirportToRegion maps airport code to each region.

View Source
var RegionToAiport = map[string]string{
	"eu-north-1":     "ARN",
	"me-south-1":     "BAH",
	"cn-north-1":     "BJS",
	"ap-south-1":     "BOM",
	"eu-west-3":      "CDG",
	"ap-southeast-3": "CGK",
	"us-east-2":      "CMH",
	"af-south-1":     "CPT",
	"eu-west-1":      "DUB",
	"eu-central-1":   "FRA",
	"sa-east-1":      "GRU",
	"ap-east-1":      "HKG",
	"us-east-1":      "IAD",
	"ap-northeast-2": "ICN",
	"eu-west-2":      "LHR",
	"eu-south-1":     "MXP",
	"ap-northeast-1": "NRT",
	"us-west-2":      "PDX",
	"us-west-1":      "SFO",
	"ap-southeast-1": "SIN",
	"ap-southeast-2": "SYD",
	"ca-central-1":   "YUL",
	"cn-northwest-1": "ZHY",
}

RegionToAiport maps each region to airport code.

Functions

func New

func New(cfg *Config) (ss *session.Session, stsOutput *sts.GetCallerIdentityOutput, awsCredsPath string, err error)

New creates a new AWS session. Specify a custom endpoint for tests.

Types

type Config

type Config struct {
	// Logger is the log object.
	Logger *zap.Logger

	// DebugAPICalls is true to log all AWS API call debugging messages.
	DebugAPICalls bool

	// Region is a separate AWS geographic area for EKS service.
	// Each AWS Region has multiple, isolated locations known as Availability Zones.
	Region string

	// ResolverURL is a custom resolver URL.
	ResolverURL string
	// SigningName is the API signing name.
	SigningName string
}

Config defines a top-level AWS API configuration to create a session.

Directories

Path Synopsis
ec2
Package ec2 implements various AWS EC2 operations.
Package ec2 implements various AWS EC2 operations.
instance-types
instance-types auto-generates EC2 instance types from AWS API.
instance-types auto-generates EC2 instance types from AWS API.
metadata
Package metadata queries the EC2 metadata.
Package metadata queries the EC2 metadata.

Jump to

Keyboard shortcuts

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