aws

package
v0.0.0-...-c42bc8f Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2019 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AWS

type AWS struct {
	IAM iamiface.IAMAPI
	STS stsiface.STSAPI
	// contains filtered or unexported fields
}

AWS ...

func New

func New(sess *session.Session) *AWS

New ...

func (*AWS) AssumeRole

func (a *AWS) AssumeRole(role string) (*sts.Credentials, error)

AssumeRole will assume a role from the name

func (*AWS) CredentialLocation

func (a *AWS) CredentialLocation() (string, error)

CredentialLocation returns the location the AWS credentials will be stored in. Defaults to ~/.aws/credentials

func (*AWS) GetCredential

func (a *AWS) GetCredential(roleID string) (*role.Credential, error)

GetCredential takes in a role ID and returns a set of wrapped credentials, or an error

func (*AWS) GetRegion

func (a *AWS) GetRegion() string

GetRegion gets the region associated with the calling credentials

func (*AWS) GetRoleARN

func (a *AWS) GetRoleARN(role string) (string, error)

GetRoleARN gets the role ARN from a role name

Jump to

Keyboard shortcuts

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