Documentation ¶
Index ¶
- func GetRegionVolumes(sess *session.Session) ([]ec2.Volume, error)
- func WriteCheckedImages(checkedImages []ImageInfo, options utils.Ec2Options) error
- func WriteProfilesImages(profileImages ProfilesImages, options utils.Ec2Options) error
- func WriteProfilesInstances(profileInstances ProfilesInstances, options utils.Ec2Options) error
- func WriteProfilesSgRules(profileSGs ProfilesSecurityGroups, options SgOptions) error
- func WriteProfilesSgs(profileSGs ProfilesSecurityGroups, options SgOptions) error
- func WriteProfilesSnapshots(profileSnapshots ProfilesSnapshots, options utils.Ec2Options) error
- func WriteProfilesVolumes(profileVolumes ProfilesVolumes, options utils.Ec2Options) error
- type AccountImages
- type AccountInstances
- type AccountSecurityGroups
- type AccountSnapshots
- type AccountVolumes
- type AmiOptions
- type ImageInfo
- type InstanceOptions
- type ProfilesImages
- type ProfilesInstances
- type ProfilesSecurityGroups
- type ProfilesSnapshots
- type ProfilesVolumes
- type RegionImages
- type RegionInstances
- type RegionSecurityGroups
- type RegionSnapshots
- type RegionVolumes
- type SgOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetRegionVolumes ¶
GetRegionVolumes will take a session and get all volumes based on the region of the session
func WriteCheckedImages ¶
func WriteCheckedImages(checkedImages []ImageInfo, options utils.Ec2Options) error
func WriteProfilesImages ¶
func WriteProfilesImages(profileImages ProfilesImages, options utils.Ec2Options) error
func WriteProfilesInstances ¶
func WriteProfilesInstances(profileInstances ProfilesInstances, options utils.Ec2Options) error
func WriteProfilesSgRules ¶
func WriteProfilesSgRules(profileSGs ProfilesSecurityGroups, options SgOptions) error
if a cidr is given, search the SGs for that rule and only print those containing the cidr
func WriteProfilesSgs ¶
func WriteProfilesSgs(profileSGs ProfilesSecurityGroups, options SgOptions) error
func WriteProfilesSnapshots ¶
func WriteProfilesSnapshots(profileSnapshots ProfilesSnapshots, options utils.Ec2Options) error
func WriteProfilesVolumes ¶
func WriteProfilesVolumes(profileVolumes ProfilesVolumes, options utils.Ec2Options) error
Types ¶
type AccountImages ¶
type AccountImages []RegionImages
func GetAccountImages ¶
func GetAccountImages(account utils.AccountInfo) (AccountImages, error)
GetAccountImages will take a profile and go through all regions to get all amis in the account
type AccountInstances ¶
type AccountInstances []RegionInstances
func GetAccountInstances ¶
func GetAccountInstances(account utils.AccountInfo) (AccountInstances, error)
GetAccountInstances will take a profile and go through all regions to get all instances in the account
type AccountSecurityGroups ¶
type AccountSecurityGroups []RegionSecurityGroups
func GetAccountSecurityGroups ¶
func GetAccountSecurityGroups(account utils.AccountInfo) (AccountSecurityGroups, error)
type AccountSnapshots ¶
type AccountSnapshots []RegionSnapshots
func GetAccountSnapshots ¶
func GetAccountSnapshots(account utils.AccountInfo) (AccountSnapshots, error)
GetAccountSnapshots will take a profile and go through all regions to get all snapshots in the account
type AccountVolumes ¶
type AccountVolumes []RegionVolumes
func GetAccountVolumes ¶
func GetAccountVolumes(account utils.AccountInfo) (AccountVolumes, error)
GetAccountVolumes will take a profile and go through all regions to get all volumes in the account
type AmiOptions ¶
type AmiOptions struct {
Tags []string
}
type ImageInfo ¶
type ImageInfo struct { Image ec2.Image InUse bool //if the AMI is in use by any current instance Count int //how many instances use the AMI AccountId string Profile string Region string }
func CheckImages ¶
func CheckImages(accounts []utils.AccountInfo) ([]ImageInfo, error)
type InstanceOptions ¶
type InstanceOptions struct {
Tags []string
}
type ProfilesImages ¶
type ProfilesImages []AccountImages
func GetProfilesImages ¶
func GetProfilesImages(accounts []utils.AccountInfo) (ProfilesImages, error)
GetProfilesImages will return all the images in all accounts of a given filename with a list of profiles in it
type ProfilesInstances ¶
type ProfilesInstances []AccountInstances
func GetProfilesInstances ¶
func GetProfilesInstances(accounts []utils.AccountInfo) (ProfilesInstances, error)
GetProfilesInstances will return all the instances in all accounts of a given filename with a list of profiles in it
type ProfilesSecurityGroups ¶
type ProfilesSecurityGroups []AccountSecurityGroups
func GetProfilesSGs ¶
func GetProfilesSGs(accounts []utils.AccountInfo) (ProfilesSecurityGroups, error)
type ProfilesSnapshots ¶
type ProfilesSnapshots []AccountSnapshots
func GetProfilesSnapshots ¶
func GetProfilesSnapshots(accounts []utils.AccountInfo) (ProfilesSnapshots, error)
GetProfilesSnapshots will return all the snapshots in all accounts of a given filename with a list of profiles in it
type ProfilesVolumes ¶
type ProfilesVolumes []AccountVolumes
func GetProfilesVolumes ¶
func GetProfilesVolumes(accounts []utils.AccountInfo) (ProfilesVolumes, error)
GetProfilesVolumes will return all the volumes in all accounts of a given filename with a list of profiles in it
type RegionImages ¶
func (*RegionImages) GetRegionImages ¶
func (ri *RegionImages) GetRegionImages(sess *session.Session, accountId string) error
GetRegionImages will take a session and pull all amis based on the region of the session
type RegionInstances ¶
type RegionInstances struct { AccountId string Region string Profile string Instances []ec2.Instance Status []ec2.InstanceStatus }
func (*RegionInstances) GetRegionInstances ¶
func (ri *RegionInstances) GetRegionInstances(sess *session.Session) error
GetRegionInstances will take a session and pull all instances based on the region of the session
func (*RegionInstances) GetRegionInstancesStatuses ¶
func (ri *RegionInstances) GetRegionInstancesStatuses(sess *session.Session) error
type RegionSecurityGroups ¶
type RegionSecurityGroups struct { Region string Profile string AccountId string SecurityGroups []ec2.SecurityGroup }
func (*RegionSecurityGroups) GetRegionSecurityGroups ¶
func (rs *RegionSecurityGroups) GetRegionSecurityGroups(sess *session.Session) error
type RegionSnapshots ¶
type RegionSnapshots struct { Profile string AccountId string Region string Snapshots []ec2.Snapshot //The Volumes info here will be used to determine the attachment status of volumes on the snapshots Volumes []ec2.Volume }
func (*RegionSnapshots) GetRegionSnapshots ¶
func (rs *RegionSnapshots) GetRegionSnapshots(sess *session.Session, accountId string) error
GetRegionSnapshots will take a session and get all snapshots based on the region of the session