Documentation
¶
Index ¶
Constants ¶
View Source
const ( CONFIG_FILE = "~/.aws/config" CREDENTIALS_FILE = "~/.aws/credentials" // #nosec )
Variables ¶
This section is empty.
Functions ¶
func HasStaticCreds ¶
Types ¶
type AwsConfig ¶
type AwsConfig struct {
ConfigFile string
Config *ini.File
CredentialsFile string
Credentials *ini.File
Profiles map[string]map[string]interface{} // profile.go
}
func NewAwsConfig ¶
NewAwsConfig creates a new *AwsConfig struct
func (*AwsConfig) StaticProfiles ¶
StaticProfiles returns a list of all the profiles with static API creds stored in ~/.aws/config and ~/.aws/credentials
func (*AwsConfig) UpdateSecureStore ¶
func (a *AwsConfig) UpdateSecureStore(store storage.SecureStorage) error
UpdateSecureStore writes any new role ARN credentials to the provided SecureStorage
type Profile ¶
type Profile struct {
// Required for import of static creds
FromConfig bool
Name string
AccessKeyId string `ini:"aws_access_key_id"`
SecretAccessKey string `ini:"aws_secret_access_key"`
MfaSerial string `ini:"mfa_serial"`
}
func (*Profile) GetAccountAlias ¶
GetAccountAlias calls iam:ListAccountAliases to retrieve the AWS Account Alias. Returns an empty string if no alias has been set.
Click to show internal directories.
Click to hide internal directories.