Documentation ¶
Index ¶
- func GetASGTagValue(asg *at.AutoScalingGroup, key string) *string
- func GetEC2TagValue(ec2 *et.Instance, key string) *string
- type Clients
- func (c *Clients) ASGInstToEC2Inst(ctx context.Context, inst at.Instance) (*et.Instance, error)
- func (c Clients) ASGLTplVersionToEC2LTplVersion(ctx context.Context, asgLaunchTemplate *at.LaunchTemplateSpecification) (*string, error)
- func (c *Clients) CompleteLifecycleAction(ctx context.Context, asgName *string, instID *string, lifecycleHook *string, ...) error
- func (c *Clients) GetASG(ctx context.Context, asgName string) (*at.AutoScalingGroup, error)
- func (c *Clients) GetAllASGs(ctx context.Context) ([]*at.AutoScalingGroup, error)
- func (c *Clients) GetLaunchConfiguration(ctx context.Context, asg *at.AutoScalingGroup) (*at.LaunchConfiguration, error)
- func (c *Clients) GetLaunchTemplateSpec(asg *at.AutoScalingGroup) *at.LaunchTemplateSpecification
- func (c *Clients) GetUserData(ctx context.Context, inst *at.Instance) (*string, error)
- func (c *Clients) SetDesiredCapacity(ctx context.Context, asg *at.AutoScalingGroup, desiredCapacity *int32) error
- func (c *Clients) TerminateInstanceInASG(ctx context.Context, instID *string, decrement *bool) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetASGTagValue ¶
func GetASGTagValue(asg *at.AutoScalingGroup, key string) *string
GetASGTagValue returns a pointer to the value for the given tag key
Types ¶
type Clients ¶
type Clients struct { ASGClient *autoscaling.Client EC2Client *ec2.Client }
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(ctx context.Context, asgLaunchTemplate *at.LaunchTemplateSpecification) (*string, error)
ASGLTplVersionToEC2LTplVersion resolves ASG Template Versions to its actual *int32 ec2LaunchTemplate Version
func (*Clients) CompleteLifecycleAction ¶
func (c *Clients) CompleteLifecycleAction(ctx context.Context, 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) GetAllASGs ¶
GetAllASGs returns all ASGs visible with your client, with no filters
func (*Clients) GetLaunchConfiguration ¶
func (c *Clients) GetLaunchConfiguration(ctx context.Context, asg *at.AutoScalingGroup) (*at.LaunchConfiguration, error)
GetLaunchConfiguration returns the LC object of the given ASG
func (*Clients) GetLaunchTemplateSpec ¶
func (c *Clients) GetLaunchTemplateSpec(asg *at.AutoScalingGroup) *at.LaunchTemplateSpecification
GetLaunchTemplateSpec returns the LT spec for a given ASG, if it has one
func (*Clients) GetUserData ¶
GetUserData returns a pointer to the value of the instance's userdata
func (*Clients) SetDesiredCapacity ¶
func (c *Clients) SetDesiredCapacity(ctx context.Context, asg *at.AutoScalingGroup, desiredCapacity *int32) error
SetDesiredCapacity sets the desired capacity of given ASG to given value
func (*Clients) TerminateInstanceInASG ¶
func (c *Clients) TerminateInstanceInASG(ctx context.Context, instID *string, decrement *bool) error
TerminateInstanceInASG calls https://docs.aws.amazon.com/cli/latest/reference/autoscaling/terminate-instance-in-auto-scaling-group.html