cmd

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2018 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateSession

func CreateSession(profileLongTerm string) *session.Session

CreateSession creates an AWS session from the given profile

func DumpConfig

func DumpConfig()

DumpConfig logs the current viper configuration for debugging

func Execute

func Execute()

Execute adds all child commands to the root command and sets flags appropriately. This is called by main.main(). It only needs to happen once to the rootCmd.

func GetMFAToken

func GetMFAToken() string

GetMFAToken retrieves MFA token codes from either stdin or the "token" flag

Types

type CredentialsShortTerm

type CredentialsShortTerm struct {
	AssumedRole        string `ini:"assumed_role"`
	AssumedRoleARN     string `ini:"assumed_role_arn,omitempty"`
	AWSAccessKeyID     string `ini:"aws_access_key_id"`
	AWSSecretAccessKey string `ini:"aws_secret_access_key"`
	AWSSessionToken    string `ini:"aws_session_token"`
	AWSSecurityToken   string `ini:"aws_security_token"`
	Expiration         string `ini:"expiration"`
}

CredentialsShortTerm is used to reflect updated credentials

func GetCredsWithRole

func GetCredsWithRole(sess *session.Session) CredentialsShortTerm

GetCredsWithRole is used to get temporary AWS credentials when assuming a role

func GetCredsWithoutRole

func GetCredsWithoutRole(sess *session.Session) CredentialsShortTerm

GetCredsWithoutRole is used to get temporary AWS credentials when NOT assuming a role

Jump to

Keyboard shortcuts

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