ess

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2019 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Alarm

type Alarm struct {
	AlarmName          string
	AlarmID            string
	ScalingGroupID     string
	Enable             bool
	AlarmActions       []string
	MetricType         string
	MetricName         string
	Period             int
	Statistics         string
	ComparisonOperator string
	Threshold          float64
	EvaluationCount    int
}

Alarm struct to map to the tfvars template

type Client

type Client struct {
	*ess.Client
}

Client is the ess client

func New

func New(c sdk.Client) *Client

New returns a new ess client

func (*Client) GetAlarms

func (c *Client) GetAlarms(scalingGroupID string) ([]Alarm, error)

GetAlarms returns list of scaling rule for the given scaling group

func (*Client) GetLifecycleHooks

func (c *Client) GetLifecycleHooks(scalingGroupID string) ([]LifecycleHook, error)

GetLifecycleHooks returns list of lifecyclehooks

func (*Client) GetScalingConfigurations

func (c *Client) GetScalingConfigurations(scalingGroupID string) ([]ScalingConfiguration, error)

GetScalingConfigurations returns list of scaling rule for the given scaling group

func (*Client) GetScalingGroupInstances

func (c *Client) GetScalingGroupInstances(scalingGroupID string) ([]esssdk.ScalingInstance, error)

GetScalingGroupInstances will return list of instances in a scaling group

func (*Client) GetScalingGroupsWithAsync

func (c *Client) GetScalingGroupsWithAsync(ctx context.Context) ([]ScalingGroup, error)

GetScalingGroupsWithAsync will query list of scaling groups

func (*Client) GetScalingRuleByAri

func (c *Client) GetScalingRuleByAri(ari string) (ScalingRule, error)

GetScalingRuleByAri returns the scaling rule matched by it's ari

func (*Client) GetScalingRules

func (c *Client) GetScalingRules(scalingGroupID string) ([]ScalingRule, error)

GetScalingRules returns list of scaling rule for the given scaling group

type LifecycleHook

type LifecycleHook struct {
	LifecycleHookName   string
	LifecycleHookID     string
	LifecycleTransition string
	DefaultResult       string
	HeartbeatTimeout    int
}

LifecycleHook struct is mapped to lifecycle hook template

type ScalingConfiguration

type ScalingConfiguration struct {
	ScalingConfigurationName string
	ScalingConfigurationID   string
	ScalingGroupID           string
	ImageID                  string
	ImageName                string
	InstanceName             string
	InstanceType             string
	InstanceTypes            []string
	Enable                   bool
	Active                   bool
	KeyPairName              string
	RAMRoleName              string
	UserData                 string
	Tags                     map[string]string
}

ScalingConfiguration struct to map to the tfvars template

type ScalingGroup

type ScalingGroup struct {
	ScalingGroupName string
	ScalingGroupID   string
	MinSize          int
	MaxSize          int
	RemovalPolicies  []string
	VSwitchIDs       []string
	MultiAZPolicy    string
	LoadBalancerIDs  []string
}

ScalingGroup struct to map into tfvars template

type ScalingRule

type ScalingRule struct {
	ScalingRuleName string
	ScalingRuleID   string
	ScalingGroupID  string
	AdjustmentType  string
	AdjustmentValue int
	Cooldown        int
}

ScalingRule struct to map to the tfvars template

Jump to

Keyboard shortcuts

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