Documentation ¶
Index ¶
- Variables
- func DeriveRegion() (string, error)
- func GetInServiceInstanceIDs(instances []*autoscaling.Instance) []string
- func GetInstanceIDs(instances []*autoscaling.Instance) []string
- func GetScalingAZs(instances []*autoscaling.Instance) []string
- func GetTemplateLatestVersion(templates []*ec2.LaunchTemplate, templateName string) string
- func SelectScalingGroup(name string, groups []*autoscaling.Group) *autoscaling.Group
- func SelectScalingGroupInstance(instanceID string, group *autoscaling.Group) *autoscaling.Instance
- type AmazonClientSet
- func (a *AmazonClientSet) DescribeInstancesWithoutTagValue(tagKey string, tagValue string) ([]string, error)
- func (a *AmazonClientSet) DescribeLaunchTemplates() ([]*ec2.LaunchTemplate, error)
- func (a *AmazonClientSet) DescribeScalingGroups() ([]*autoscaling.Group, error)
- func (a *AmazonClientSet) DescribeTaggedInstanceIDs(tagKey, tagValue string) ([]string, error)
- func (a *AmazonClientSet) SetInstancesStandBy(instanceIDs []string, scalingGroupName string) error
- func (a *AmazonClientSet) TagEC2instances(instanceIDs []string, tagKey, tagValue string) error
- func (a *AmazonClientSet) TerminateInstance(instance *autoscaling.Instance) error
- func (a *AmazonClientSet) UntagEC2instances(instanceIDs []string, tagKey, tagValue string) error
Constants ¶
This section is empty.
Variables ¶
View Source
var ( TerminatingInstanceStates = []string{ autoscaling.LifecycleStateTerminating, autoscaling.LifecycleStateTerminatingWait, autoscaling.LifecycleStateTerminatingProceed, autoscaling.LifecycleStateTerminated, autoscaling.LifecycleStateWarmedTerminating, autoscaling.LifecycleStateWarmedTerminatingWait, autoscaling.LifecycleStateWarmedTerminatingProceed, autoscaling.LifecycleStateWarmedTerminated, } // Instance standBy limit is enforced by AWS EnterStandBy API InstanceStandByLimit = 19 )
Functions ¶
func DeriveRegion ¶
func GetInServiceInstanceIDs ¶
func GetInServiceInstanceIDs(instances []*autoscaling.Instance) []string
func GetInstanceIDs ¶
func GetInstanceIDs(instances []*autoscaling.Instance) []string
func GetScalingAZs ¶
func GetScalingAZs(instances []*autoscaling.Instance) []string
func GetTemplateLatestVersion ¶
func GetTemplateLatestVersion(templates []*ec2.LaunchTemplate, templateName string) string
func SelectScalingGroup ¶
func SelectScalingGroup(name string, groups []*autoscaling.Group) *autoscaling.Group
func SelectScalingGroupInstance ¶
func SelectScalingGroupInstance(instanceID string, group *autoscaling.Group) *autoscaling.Instance
Types ¶
type AmazonClientSet ¶
type AmazonClientSet struct { AsgClient autoscalingiface.AutoScalingAPI Ec2Client ec2iface.EC2API }
func (*AmazonClientSet) DescribeInstancesWithoutTagValue ¶ added in v1.0.9
func (a *AmazonClientSet) DescribeInstancesWithoutTagValue(tagKey string, tagValue string) ([]string, error)
func (*AmazonClientSet) DescribeLaunchTemplates ¶
func (a *AmazonClientSet) DescribeLaunchTemplates() ([]*ec2.LaunchTemplate, error)
func (*AmazonClientSet) DescribeScalingGroups ¶
func (a *AmazonClientSet) DescribeScalingGroups() ([]*autoscaling.Group, error)
func (*AmazonClientSet) DescribeTaggedInstanceIDs ¶
func (a *AmazonClientSet) DescribeTaggedInstanceIDs(tagKey, tagValue string) ([]string, error)
func (*AmazonClientSet) SetInstancesStandBy ¶
func (a *AmazonClientSet) SetInstancesStandBy(instanceIDs []string, scalingGroupName string) error
func (*AmazonClientSet) TagEC2instances ¶
func (a *AmazonClientSet) TagEC2instances(instanceIDs []string, tagKey, tagValue string) error
func (*AmazonClientSet) TerminateInstance ¶
func (a *AmazonClientSet) TerminateInstance(instance *autoscaling.Instance) error
func (*AmazonClientSet) UntagEC2instances ¶ added in v1.0.9
func (a *AmazonClientSet) UntagEC2instances(instanceIDs []string, tagKey, tagValue string) error
Click to show internal directories.
Click to hide internal directories.