Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetAllSSMInstances ¶
func GetAllSSMInstances(session ssmiface.SSMAPI, input *ssm.DescribeInstanceInformationInput, checkLatestAgent bool) (output []*ssm.InstanceInformation, err error)
GetAllSSMInstances takes an SSM session and an *ssm.DescribeInstanceInformationInput object, and calls getSSMInstances() to query the SSM API for information about a given SSM-managed EC2 instance. It also filters out any instances returned that are unresponsive to ping or not running Linux. Filtering can only be done based on either instance information OR instance tags for any given instance of a query. As such, filtering of instances by things like bamazon and env tags must be done after retrieving the instance information.
Types ¶
type InstanceInfo ¶
InstanceInfo is used to store information, including EC2 tags, about a particular instance
func (*InstanceInfo) FormatString ¶
func (i *InstanceInfo) FormatString(includeTags ...string) string
FormatString returns a string with various information about a given instance
type InstanceInfoSafe ¶
type InstanceInfoSafe struct { sync.Mutex AllInstances map[string]InstanceInfo }
InstanceInfoSafe allows for concurrent-safe access to a map of InstanceInfo data
func (*InstanceInfoSafe) FormatStringSlice ¶
func (i *InstanceInfoSafe) FormatStringSlice(includeTags ...string) (outSlice []string)
FormatStringSlice is used to return a strings preformatted to the correct width for selection prompts
type InstanceSlice ¶
type InstanceSlice []string
InstanceSlice is the type of object passed to flag.Var() that holds AWS instance IDs
func (*InstanceSlice) Set ¶
func (i *InstanceSlice) Set(value string) error
Set splits the provided comma-delimited list of instance IDs into an InstanceSlice, then sets the value of the caller to the new slice
func (*InstanceSlice) String ¶
func (i *InstanceSlice) String() string
String() returns the string representation of an *InstanceSlice object