Documentation ¶
Index ¶
- func CreateAWSLoginURL(sessionId string, sessionKey string, sessionToken string, issuer string) (string, error)
- func CreateRegionalURL(region string, path string) (string, string)
- type Aws
- func (a *Aws) CreateSession(accessKey string, secretKey string) error
- func (a *Aws) GetCredentialPath() (string, error)
- func (a *Aws) GetFederationToken(name string, duration time.Duration) *sts.Credentials
- func (a *Aws) MapProfile(name string, profiles ...interface{}) error
- func (a *Aws) SaveProfile(name string, profile *Profile, setAsDefault bool, ...) error
- func (a *Aws) WaitForActiveCreds()
- type Config
- type Logger
- type Profile
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateAWSLoginURL ¶ added in v0.0.5
func CreateAWSLoginURL(sessionId string, sessionKey string, sessionToken string, issuer string) (string, error)
CreateAWSLoginURL returns a federation AWS URL used for wev console login This uses AWS Security Token Service (AWS STS) AssumeRole More info at: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_enable-console-custom-url.html Thanks to Lachlan Donald for the following code: https://github.com/99designs/aws-vault
Types ¶
type Aws ¶
type Aws struct {
// contains filtered or unexported fields
}
Aws is the main object
func (*Aws) CreateSession ¶ added in v0.0.5
func (*Aws) GetCredentialPath ¶ added in v0.0.5
GetCredentialPath gets the filepath to the credential path in the user's home directory
func (*Aws) GetFederationToken ¶ added in v0.0.4
GetFederationToken takes in a name and returns a set of STS Credentials based on the current session
func (*Aws) MapProfile ¶ added in v0.0.5
MapProfile gets an AWS profile from the user's credentials file and maps it, if found, to the given interface(s)
func (*Aws) SaveProfile ¶ added in v0.0.5
func (a *Aws) SaveProfile(name string, profile *Profile, setAsDefault bool, additionalProfiles ...interface{}) error
SaveProfile saves the given profile(s)/section(s) to file, optionally also saving it as the default profile. The Profile type is requried and additional profile fields can be added with the additionalProfiles parameter
func (*Aws) WaitForActiveCreds ¶ added in v0.0.4
func (a *Aws) WaitForActiveCreds()
WaitForActiveCreds waits for the current session to become valid This is useful when IAM credentials were just provisioned and we need to wait until they're active to take the next step.