Documentation ¶
Index ¶
- Variables
- type Creds
- func (c Creds) AccountID() (string, error)
- func (c Creds) Client() *sts.STS
- func (c Creds) MfaArn() (string, error)
- func (c Creds) NextRoleArn(role, inputAccountID string) (string, error)
- func (c Creds) SessionName() (string, error)
- func (c Creds) ToConsoleURL() (string, error)
- func (c Creds) ToCustomConsoleURL(dest string) (string, error)
- func (c Creds) ToEnvVars() []string
- func (c *Creds) ToSdk() *credentials.Credentials
- func (c Creds) ToSignoutURL() (string, error)
- func (c Creds) Translate(dictionary map[string]string) map[string]string
Constants ¶
This section is empty.
Variables ¶
View Source
var Translations = map[string]map[string]string{
"envvar": {
"AWS_ACCESS_KEY_ID": "AccessKey",
"AWS_SECRET_ACCESS_KEY": "SecretKey",
"AWS_SESSION_TOKEN": "SessionToken",
"AWS_SECURITY_TOKEN": "SessionToken",
"AWS_DEFAULT_REGION": "Region",
},
"console": {
"sessionId": "AccessKey",
"sessionKey": "SecretKey",
"sessionToken": "SessionToken",
},
}
Translations defines common mappings for credential variables
Functions ¶
This section is empty.
Types ¶
type Creds ¶
type Creds struct {
AccessKey, SecretKey, SessionToken, Region string
}
Creds defines a set of AWS credentials
func NewFromEnv ¶
NewFromEnv initializes credentials from the environment variables
func NewFromStsSdk ¶
func NewFromStsSdk(stsCreds *sts.Credentials) (Creds, error)
NewFromStsSdk initializes a credential object from an AWS SDK Credentials object
func (Creds) NextRoleArn ¶
NextRoleArn returns the new role's ARN
func (Creds) SessionName ¶
SessionName returns the default session name
func (Creds) ToConsoleURL ¶
ToConsoleURL returns a console URL for the role
func (Creds) ToCustomConsoleURL ¶ added in v0.10.4
ToCustomConsoleURL returns a console URL with a custom path
func (Creds) ToEnvVars ¶
ToEnvVars returns environment variables suitable for eval-ing into the shell
func (*Creds) ToSdk ¶
func (c *Creds) ToSdk() *credentials.Credentials
ToSdk returns an AWS SDK Credentials object
func (Creds) ToSignoutURL ¶
ToSignoutURL returns a signout URL for the console
Click to show internal directories.
Click to hide internal directories.