Documentation ¶
Index ¶
- type Client
- func (c *Client) CompleteLifecycleAction(autoscalingGroupName, instanceID *string) error
- func (c *Client) DescribeAGByName(autoscalingGroupPrefix string) ([]*autoscaling.Group, error)
- func (c *Client) DescribeInstanceByID(instanceID string) (*ec2.Instance, error)
- func (c *Client) DescribeInstancesByTag(tagKey string) ([]*ec2.Instance, error)
- func (c *Client) HasLifeCycleHook(autoscalingGroupName *string) (bool, error)
- func (c *Client) PutLifeCycleHook(autoscalingGroupName *string, heartbeatTimeout *int64) error
- func (c *Client) RemoveASGInstanceProtection(autoscalingGroupName *string, instanceIds []*string) error
- func (c *Client) SetASGInstanceProtection(autoscalingGroupName *string, instanceIds []*string) error
- func (c *Client) SetInstanceTag(key, value, instanceID string) error
- type ClientInterface
- type ConnectionMock
- func (c *ConnectionMock) CompleteLifecycleAction(autoscalingGroupName, instanceID *string) error
- func (c *ConnectionMock) DescribeAGByName(autoscalingGroupName string) ([]*autoscaling.Group, error)
- func (c *ConnectionMock) DescribeInstanceByID(instanceID string) (*ec2.Instance, error)
- func (c *ConnectionMock) DescribeInstancesByTag(tagKey string) ([]*ec2.Instance, error)
- func (c *ConnectionMock) HasLifeCycleHook(autoscalingGroupName *string) (bool, error)
- func (c *ConnectionMock) PutLifeCycleHook(autoscalingGroupName *string, heartbeatTimeout *int64) error
- func (c *ConnectionMock) RemoveASGInstanceProtection(autoscalingGroupName *string, instanceIDs []*string) error
- func (c *ConnectionMock) SetASGInstanceProtection(autoscalingGroupName *string, instanceIDs []*string) error
- func (c *ConnectionMock) SetInstanceTag(key, value, instanceID string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client holds the AWS SDK objects for call AWS API
func (*Client) CompleteLifecycleAction ¶
CompleteLifecycleAction completes a lifecycle event for an instance pending to be deleted
func (*Client) DescribeAGByName ¶
func (c *Client) DescribeAGByName(autoscalingGroupPrefix string) ([]*autoscaling.Group, error)
DescribeAGByName returns all autoscaling groups that matches a certain prefix
func (*Client) DescribeInstanceByID ¶
DescribeInstanceByID returns the instance that matches an instanceID
func (*Client) DescribeInstancesByTag ¶
DescribeInstancesByTag return all instances with a certain tag set
func (*Client) HasLifeCycleHook ¶
HasLifeCycleHook checks if deathnode lifecyclehook is enabled for an autoscalingGroup
func (*Client) PutLifeCycleHook ¶
PutLifeCycleHook adds an INSTANCE_TERMINATING lifecycle hook to an autoscalingGroup
func (*Client) RemoveASGInstanceProtection ¶
func (c *Client) RemoveASGInstanceProtection(autoscalingGroupName *string, instanceIds []*string) error
RemoveASGInstanceProtection remove ProtectFromScaleIn flag from some instances from an autoscalingGroup
func (*Client) SetASGInstanceProtection ¶
func (c *Client) SetASGInstanceProtection(autoscalingGroupName *string, instanceIds []*string) error
SetASGInstanceProtection set an autoscalingGroup and all it's instances with ProtectFromScaleIn flag
func (*Client) SetInstanceTag ¶
SetInstanceTag set a tag with <key,value> to an AWS instance
type ClientInterface ¶
type ClientInterface interface { DescribeInstanceByID(instanceID string) (*ec2.Instance, error) DescribeInstancesByTag(tagKey string) ([]*ec2.Instance, error) DescribeAGByName(autoscalingGroupName string) ([]*autoscaling.Group, error) RemoveASGInstanceProtection(autoscalingGroupName *string, instanceIDs []*string) error SetASGInstanceProtection(autoscalingGroupName *string, instanceIDs []*string) error SetInstanceTag(key, value, instanceID string) error HasLifeCycleHook(autoscalingGroupName *string) (bool, error) PutLifeCycleHook(autoscalingGroupName *string, heartbeatTimeout *int64) error CompleteLifecycleAction(autoscalingGroupName, instanceID *string) error }
ClientInterface implements a client with all required operations against AWS API
type ConnectionMock ¶
ConnectionMock is a aws mock client for testing purposes
func (*ConnectionMock) CompleteLifecycleAction ¶
func (c *ConnectionMock) CompleteLifecycleAction(autoscalingGroupName, instanceID *string) error
CompleteLifecycleAction is a mock call for testing purposes
func (*ConnectionMock) DescribeAGByName ¶
func (c *ConnectionMock) DescribeAGByName(autoscalingGroupName string) ([]*autoscaling.Group, error)
DescribeAGByName is a mock call for testing purposes
func (*ConnectionMock) DescribeInstanceByID ¶
func (c *ConnectionMock) DescribeInstanceByID(instanceID string) (*ec2.Instance, error)
DescribeInstanceByID is a mock call for testing purposes
func (*ConnectionMock) DescribeInstancesByTag ¶
func (c *ConnectionMock) DescribeInstancesByTag(tagKey string) ([]*ec2.Instance, error)
DescribeInstancesByTag is a mock call for testing purposes
func (*ConnectionMock) HasLifeCycleHook ¶
func (c *ConnectionMock) HasLifeCycleHook(autoscalingGroupName *string) (bool, error)
HasLifeCycleHook is a mock call for testing purposes
func (*ConnectionMock) PutLifeCycleHook ¶
func (c *ConnectionMock) PutLifeCycleHook(autoscalingGroupName *string, heartbeatTimeout *int64) error
PutLifeCycleHook is a mock call for testing purposes
func (*ConnectionMock) RemoveASGInstanceProtection ¶
func (c *ConnectionMock) RemoveASGInstanceProtection(autoscalingGroupName *string, instanceIDs []*string) error
RemoveASGInstanceProtection is a mock call for testing purposes
func (*ConnectionMock) SetASGInstanceProtection ¶
func (c *ConnectionMock) SetASGInstanceProtection(autoscalingGroupName *string, instanceIDs []*string) error
SetASGInstanceProtection is a mock call for testing purposes
func (*ConnectionMock) SetInstanceTag ¶
func (c *ConnectionMock) SetInstanceTag(key, value, instanceID string) error
SetInstanceTag is a mock call for testing purposes