ssm

package
v0.2.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 3, 2020 License: Apache-2.0 Imports: 12 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AppendSSMFilter

func AppendSSMFilter(filters *[]*ssm.InstanceInformationStringFilter, filterToAdd *ssm.InstanceInformationStringFilter)

AppendSSMFilter appends a single *ssm.InstanceInformationStringFilter to an existing array of filters, then returns the appended array

func BuildFilters

func BuildFilters(commonTags map[string]string, filtersList *[]*ssm.InstanceInformationStringFilter)

BuildFilters takes a map of tags (in key[value] format) and converts them into a format that is compatible with *ssm.InstanceInformationStringFilter, updating a provided []*ssm.InstanceInformationStringFilter object

func CheckInstanceReadiness

func CheckInstanceReadiness(sp *session.Pool, ssmSession *ssm.SSM, instanceList []*ssm.InstanceInformation, readyInstancePool *instance.InstanceInfoSafe, limit int)

CheckInstanceReadiness iterates through a list of instances and verifies whether or not it is start-session capable. If it is, it appends the instance info to an instances.InstanceInfoSafe slice.

func CreateSSMDescribeInstanceInput

func CreateSSMDescribeInstanceInput(filters []map[string]string, instances CommaSlice) *ssm.DescribeInstanceInformationInput

CreateSSMDescribeInstanceInput returns an *ssm.DescribeInstanceInformationInput object for use when calling the DescribeInstanceInformation() method

func GetInstanceList

func GetInstanceList(ssmSession *ssm.SSM, filters []map[string]string, instanceInput CommaSlice, checkLatestAgent bool, infoChan chan []*ssm.InstanceInformation, errChan chan error)

GetInstanceList creates a DescribeInstanceInput object and returns all SSM instances that match the provided filters

func NewSSMInstanceFilter

func NewSSMInstanceFilter(name string, values CommaSlice) *ssm.InstanceInformationStringFilter

NewSSMInstanceFilter takes a name and any number of instance IDs to create an *ssm.InstanceInformationStringFilter that can be used to select specific SSM-managed instances instead of solely searching based on tags

func RunInvocations

func RunInvocations(sp *session.Pool, sess *ssm.SSM, instances []*ssm.InstanceInformation, params *invocation.RunShellScriptParameters, dryRun bool, resultsPool *invocation.ResultSafe) (err error)

RunInvocations invokes an SSM document with given parameters on the provided slice of instances

Types

type CommaSlice

type CommaSlice []string

CommaSlice enables comma-delimited input for a Var flag

func (*CommaSlice) Set

func (c *CommaSlice) Set(value string) error

Set takes a list of comma-delimited values, splits them, and appends each item to the current CommaSlice object

func (*CommaSlice) String

func (c *CommaSlice) String() string

func (*CommaSlice) Type added in v0.2.1

func (c *CommaSlice) Type() string

type ListSlice

type ListSlice []string

ListSlice is for standard Var flag usage

func (*ListSlice) Set

func (l *ListSlice) Set(value string) error

Set appends the value provided to the current ListSlice object

func (*ListSlice) String

func (l *ListSlice) String() string

func (*ListSlice) Type added in v0.2.1

func (l *ListSlice) Type() string

type SemiSlice

type SemiSlice []string

SemiSlice enables semicolon-delimited input for a Var flag

func (*SemiSlice) Set

func (s *SemiSlice) Set(value string) error

Set takes a list of semicolon-delimited values, splits them, and appends each item to the current SemiSlice object

func (*SemiSlice) String

func (s *SemiSlice) String() string

func (*SemiSlice) Type added in v0.2.1

func (s *SemiSlice) Type() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL