session

package
v3.3.0 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2019 License: MIT Imports: 3 Imported by: 8

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Credentials CredentialsConfig `json:"credentials" yaml:"credentials"`
	Endpoint    string            `json:"endpoint" yaml:"endpoint"`
	Region      string            `json:"region" yaml:"region"`
}

Config contains configuration fields for an AWS session. This config is common across any AWS components.

func NewConfig

func NewConfig() Config

NewConfig returns a Config with default values.

func (Config) GetSession

func (c Config) GetSession(opts ...func(*aws.Config)) (*session.Session, error)

GetSession attempts to create an AWS session based on Config.

type CredentialsConfig

type CredentialsConfig struct {
	Profile    string `json:"profile" yaml:"profile"`
	ID         string `json:"id" yaml:"id"`
	Secret     string `json:"secret" yaml:"secret"`
	Token      string `json:"token" yaml:"token"`
	Role       string `json:"role" yaml:"role"`
	ExternalID string `json:"role_external_id" yaml:"role_external_id"`
}

CredentialsConfig contains configuration params for AWS credentials.

Jump to

Keyboard shortcuts

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