Documentation
¶
Overview ¶
awl is an AWS SDK wrapper for lazy coders.
Index ¶
- Variables
- func SetBaseCredentials(creds *credentials.Credentials)
- type Account
- func (a *Account) AllInstances(region string) ([]*ec2.Instance, error)
- func (a *Account) AllSecurityGroups(region string) ([]*ec2.SecurityGroup, error)
- func (a *Account) AllSubnets(region string) ([]*ec2.Subnet, error)
- func (a *Account) AllVpcs(region string) ([]*ec2.Vpc, error)
- func (a *Account) CacheAlias() (string, error)
- func (a *Account) Credentials() *credentials.Credentials
- func (a *Account) EC2(region string) *ec2.EC2
- func (a *Account) IAM() *iam.IAM
- func (a *Account) InstanceByPrivateIP(region string, ip string) (*ec2.Instance, error)
Constants ¶
This section is empty.
Variables ¶
var DefaultRegion string
var Session *session.Session
Session contains the AWS session, which is created on initialization.
Functions ¶
func SetBaseCredentials ¶
func SetBaseCredentials(creds *credentials.Credentials)
Types ¶
type Account ¶
type Account struct { Id string Alias string AssumeRoleArn string // contains filtered or unexported fields }
An Account represents an AWS account you will use via an assumed role. You should use the NewAccount constructor to set it up.
If you need to use more than one role with one AWS account, simply construct additional Account objects, specifying different roles.
func NewAccount ¶
Constructs a new Account object from an AWS account ID and the name (not the full ARN) of a role, including the path, if any.
func (*Account) AllInstances ¶
Returns all of the EC2 instances in the given region.
func (*Account) AllSecurityGroups ¶
func (a *Account) AllSecurityGroups(region string) ([]*ec2.SecurityGroup, error)
Returns all security groups in the given region.
func (*Account) AllSubnets ¶
Returns all subnets in the given region.
func (*Account) CacheAlias ¶
Returns (and caches) the account alias. If none is set, then returns the account ID.
func (*Account) Credentials ¶
func (a *Account) Credentials() *credentials.Credentials
Fetches a lazily provisioned STS credentials manager which will renew the credentials as necessary. Usually this function will only be called internally, but it's here if you need it.