Documentation ¶
Index ¶
- func GetASGTagValue(asg *autoscaling.Group, key string) *string
- func GetEC2TagValue(ec2 *ec2.Instance, key string) *string
- type Clients
- func (c *Clients) ASGInstToEC2Inst(inst *autoscaling.Instance) (*ec2.Instance, error)
- func (c Clients) ASGLTplVersionToEC2LTplVersion(asgLaunchTemplate *autoscaling.LaunchTemplateSpecification) (*string, error)
- func (c *Clients) CompleteLifecycleAction(asgName *string, instID *string, lifecycleHook *string, result *string) error
- func (c *Clients) GetASG(asgName *string) (*autoscaling.Group, error)
- func (c *Clients) GetAllASGs() ([]*autoscaling.Group, error)
- func (c *Clients) GetLaunchConfiguration(asg *autoscaling.Group) (*autoscaling.LaunchConfiguration, error)
- func (c *Clients) GetLaunchTemplateSpec(asg *autoscaling.Group) *autoscaling.LaunchTemplateSpecification
- func (c *Clients) GetUserData(inst *autoscaling.Instance) (*string, error)
- func (c *Clients) SetDesiredCapacity(asg *autoscaling.Group, desiredCapacity *int64) error
- func (c *Clients) TerminateInstanceInASG(instID *string, decrement *bool) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetASGTagValue ¶
func GetASGTagValue(asg *autoscaling.Group, key string) *string
GetASGTagValue returns a pointer to the value for the given tag key
Types ¶
type Clients ¶
type Clients struct { ASGClient *autoscaling.AutoScaling EC2Client *ec2.EC2 }
Clients holds the clients for this account's invocation of the APIs we'll need
func GetAWSClients ¶
GetAWSClients returns the AWS client objects we'll need
func (*Clients) ASGInstToEC2Inst ¶
ASGInstToEC2Inst converts a *autoscaling.Instance to its corresponding *ec2.Instance
func (Clients) ASGLTplVersionToEC2LTplVersion ¶
func (c Clients) ASGLTplVersionToEC2LTplVersion(asgLaunchTemplate *autoscaling.LaunchTemplateSpecification) (*string, error)
ASGLTplVersionToEC2LTplVersion resolves ASG Template Versions to its actual *int64 ec2LaunchTemplate Version
func (*Clients) CompleteLifecycleAction ¶
func (c *Clients) CompleteLifecycleAction(asgName *string, instID *string, lifecycleHook *string, result *string) error
CompleteLifecycleAction calls https://docs.aws.amazon.com/cli/latest/reference/autoscaling/complete-lifecycle-action.html
func (*Clients) GetASG ¶
func (c *Clients) GetASG(asgName *string) (*autoscaling.Group, error)
GetASG gets the *autoscaling.Group that matches for the name given
func (*Clients) GetAllASGs ¶
func (c *Clients) GetAllASGs() ([]*autoscaling.Group, error)
GetAllASGs returns all ASGs visible with your client, with no filters
func (*Clients) GetLaunchConfiguration ¶
func (c *Clients) GetLaunchConfiguration(asg *autoscaling.Group) (*autoscaling.LaunchConfiguration, error)
GetLaunchConfiguration returns the LC object of the given ASG
func (*Clients) GetLaunchTemplateSpec ¶
func (c *Clients) GetLaunchTemplateSpec(asg *autoscaling.Group) *autoscaling.LaunchTemplateSpecification
GetLaunchTemplateSpec returns the LT spec for a given ASG, if it has one
func (*Clients) GetUserData ¶
func (c *Clients) GetUserData(inst *autoscaling.Instance) (*string, error)
GetUserData returns a pointer to the value of the instance's userdata
func (*Clients) SetDesiredCapacity ¶
func (c *Clients) SetDesiredCapacity(asg *autoscaling.Group, desiredCapacity *int64) error
SetDesiredCapacity sets the desired capacity of given ASG to given value
func (*Clients) TerminateInstanceInASG ¶
TerminateInstanceInASG calls https://docs.aws.amazon.com/cli/latest/reference/autoscaling/terminate-instance-in-auto-scaling-group.html