autoscaling

package
v0.0.0-...-3a06871 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2015 License: LGPL-3.0 Imports: 14 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AutoScaling

type AutoScaling struct {
	aws.Auth
	aws.Region
}

AutoScaling contains the details of the AWS region to perform operations against.

func New

func New(auth aws.Auth, region aws.Region) *AutoScaling

New creates a new AutoScaling

func (*AutoScaling) CreateAutoScalingGroup

func (as *AutoScaling) CreateAutoScalingGroup(ag AutoScalingGroup) (
	resp *AutoScalingGroupsResp, err error)

CreateAutoScalingGroup creates a new autoscaling group.

func (*AutoScaling) CreateLaunchConfiguration

func (as *AutoScaling) CreateLaunchConfiguration(lc LaunchConfiguration) (
	resp *CreateLaunchConfigurationResp, err error)

CreateLaunchConfiguration creates a new launch configuration.

func (*AutoScaling) DeleteScheduledAction

func (as *AutoScaling) DeleteScheduledAction(rp DeleteScheduledActionRequestParams) (
	resp *SimpleResp, err error)

DeleteScheduledAction deletes a scheduled action.

func (*AutoScaling) DescribeAutoScalingGroups

func (as *AutoScaling) DescribeAutoScalingGroups(groupnames []string) (
	resp *AutoScalingGroupsResp, err error)

DescribeAutoScalingGroups returns details about the groups provided in the list. If the list is nil information is returned about all the groups in the region.

func (*AutoScaling) DescribeLaunchConfigurations

func (as *AutoScaling) DescribeLaunchConfigurations(confnames []string) (
	resp *LaunchConfigurationResp, err error)

DescribeLaunchConfigurations returns details about the launch configurations supplied in the list. If the list is nil, information is returned about all launch configurations in the region.

func (*AutoScaling) DescribeScheduledActions

func (as *AutoScaling) DescribeScheduledActions(rp ScheduledActionsRequestParams) (
	resp *DescribeScheduledActionsResult, err error)

DescribeScheduledActions returns a list of the current scheduled actions. If the AutoScalingGroup name is provided it will list all the scheduled actions for that group.

func (*AutoScaling) PutScheduledUpdateGroupAction

func (as *AutoScaling) PutScheduledUpdateGroupAction(rp PutScheduledActionRequestParams) (
	resp *SimpleResp, err error)

PutScheduledUpdateGroupAction creates or updates a scheduled scaling action for an AutoScaling group. Scheduled actions can be made up to thirty days in advance. When updating a scheduled scaling action, if you leave a parameter unspecified, the corresponding value remains unchanged in the affected AutoScaling group.

Auto Scaling supports the date and time expressed in "YYYY-MM-DDThh:mm:ssZ" format in UTC/GMT only.

func (*AutoScaling) ResumeProcesses

func (as *AutoScaling) ResumeProcesses(ag AutoScalingGroup, processes []string) (
	resp *SimpleResp, err error)

ResumeProcesses resumes the scaling processes for the scaling group. If no processes are provided, all processes are resumed.

func (*AutoScaling) SetDesiredCapacity

func (as *AutoScaling) SetDesiredCapacity(rp SetDesiredCapacityRequestParams) (resp *SimpleResp, err error)

SetDesiredCapacity changes the DesiredCapacity of an AutoScaling group.

func (*AutoScaling) SuspendProcesses

func (as *AutoScaling) SuspendProcesses(ag AutoScalingGroup, processes []string) (
	resp *SimpleResp, err error)

SuspendProcesses suspends the processes for the autoscaling group. If no processes are provided, all processes are suspended.

If you suspend either of the two primary processes (Launch or Terminate), this can prevent other process types from functioning properly.

func (*AutoScaling) UpdateAutoScalingGroup

func (as *AutoScaling) UpdateAutoScalingGroup(ag AutoScalingGroup) (resp *SimpleResp, err error)

UpdateAutoScalingGroup updates the scaling group.

To update an auto scaling group with a launch configuration that has the InstanceMonitoring flag set to False, you must first ensure that collection of group metrics is disabled. Otherwise calls to UpdateAutoScalingGroup will fail.

type AutoScalingGroup

type AutoScalingGroup struct {
	AutoScalingGroupARN     string     `xml:"AutoScalingGroupARN"`
	AutoScalingGroupName    string     `xml:"AutoScalingGroupName"`
	AvailabilityZones       []string   `xml:"AvailabilityZones>member"`
	CreatedTime             string     `xml:"CreatedTime"`
	DefaultCooldown         int64      `xml:"DefaultCooldown"`
	DesiredCapacity         int64      `xml:"DesiredCapacity"`
	HealthCheckGracePeriod  int64      `xml:"HealthCheckGracePeriod"`
	HealthCheckType         string     `xml:"HealthCheckType"`
	Instances               []Instance `xml:"Instances>member"`
	LaunchConfigurationName string     `xml:"LaunchConfigurationName"`
	LoadBalancerNames       []string   `xml:"LoadBalancerNames>member"`
	MaxSize                 int64      `xml:"MaxSize"`
	MinSize                 int64      `xml:"MinSize"`
	TerminationPolicies     []string   `xml:"TerminationPolicies>member"`
	VPCZoneIdentifier       string     `xml:"VPCZoneIdentifier"`
	Tags                    []Tag      `xml:"Tags>member"`
	SuspendedProcesses      []string   `xml:"SuspendedProcesses>member"`
}

type AutoScalingGroupsResp

type AutoScalingGroupsResp struct {
	RequestId         string             `xml:"ResponseMetadata>RequestId"`
	AutoScalingGroups []AutoScalingGroup `xml:"DescribeAutoScalingGroupsResult>AutoScalingGroups>member"`
}

AutoScalingGroupsResp defines the basic response structure.

type CreateLaunchConfigurationResp

type CreateLaunchConfigurationResp struct {
	LaunchConfiguration
	RequestId string `xml:"ResponseMetadata>RequestId"`
}

CreateLaunchConfigurationResp is returned from the CreateLaunchConfiguration request.

type DeleteScheduledActionRequestParams

type DeleteScheduledActionRequestParams struct {
	AutoScalingGroupName string
	ScheduledActionName  string
}

DeleteScheduledActionRequestParams contains the details of the scheduled action to delete.

type DescribeScheduledActionsResult

type DescribeScheduledActionsResult struct {
	NextToken                   string                       `xml:"NextToken"`
	ScheduledUpdateGroupActions []ScheduledUpdateGroupAction `xml:"DescribeScheduledActions>ScheduledUpdateGroups>member"`
}

DescribeScheduledActionsResult contains the response from a DescribeScheduledActions.

type Error

type Error struct {
	// HTTP status code (200, 403, ...)
	StatusCode int
	// AutoScaling error code ("UnsupportedOperation", ...)
	Code string
	// The human-oriented error message
	Message   string
	RequestId string `xml:"RequestID"`
}

Error contains pertinent information from the failed operation.

func (*Error) Error

func (err *Error) Error() string

type Instance

type Instance struct {
	InstanceId              string `xml:"InstanceId"`
	HealthStatus            string `xml:"HealthStatus"`
	AvailabilityZone        string `xml:"AvailabilityZone"`
	LaunchConfigurationName string `xml:"LaunchConfigurationName"`
	LifecycleState          string `xml:"LifecycleState"`
}

type LaunchConfiguration

type LaunchConfiguration struct {
	AssociatePublicIpAddress bool     `xml:"AssociatePublicIpAddress"`
	CreatedTime              string   `xml:"CreatedTime"`
	EbsOptimized             bool     `xml:"EbsOptimized"`
	LaunchConfigurationARN   string   `xml:"LaunchConfigurationARN"`
	LaunchConfigurationName  string   `xml:"LaunchConfigurationName"`
	IamInstanceProfile       string   `xml:"IamInstanceProfile"`
	ImageId                  string   `xml:"ImageId"`
	InstanceType             string   `xml:"InstanceType"`
	KernelId                 string   `xml:"KernelId"`
	SecurityGroups           []string `xml:"SecurityGroups>member"`
	KeyName                  string   `xml:"KeyName"`
	UserData                 string   `xml:"UserData"`
	InstanceMonitoring       string   `xml:"InstanceMonitoring"`
}

type LaunchConfigurationResp

type LaunchConfigurationResp struct {
	RequestId            string                `xml:"ResponseMetadata>RequestId"`
	LaunchConfigurations []LaunchConfiguration `xml:"DescribeLaunchConfigurationsResult>LaunchConfigurations>member"`
}

LaunchConfigurationResp defines the basic response structure for launch configuration requests

type PutScheduledActionRequestParams

type PutScheduledActionRequestParams struct {
	AutoScalingGroupName string
	DesiredCapacity      int64
	EndTime              string
	MaxSize              int64
	MinSize              int64
	Recurrence           string
	ScheduledActionName  string
	StartTime            string
}

PutScheduledActionRequestParams contains the details of the ScheduledAction to be added.

type ScheduledActionsRequestParams

type ScheduledActionsRequestParams struct {
	AutoScalingGroupName string
	EndTime              string
	MaxRecords           int64
	ScheduledActionNames []string
	StartTime            string
}

ScheduledActionsRequestParams contains the items that can be specified when making a ScheduledActions request

type ScheduledUpdateGroupAction

type ScheduledUpdateGroupAction struct {
	AutoScalingGroupName string `xml:"AutoScalingGroupName"`
	DesiredCapacity      int64  `xml:"DesiredCapacity"`
	EndTime              string `xml:"EndTime"`
	MaxSize              int64  `xml:"MaxSize"`
	MinSize              int64  `xml:"MinSize"`
	Recurrence           string `xml:"Recurrence"`
	ScheduledActionARN   string `xml:"ScheduledActionARN"`
	ScheduledActionName  string `xml:"ScheduledActionName"`
	StartTime            string `xml:"StartTime"`
}

ScheduledUpdateGroupAction contains the information to be used in a scheduled update to an AutoScalingGroup

type SetDesiredCapacityRequestParams

type SetDesiredCapacityRequestParams struct {
	AutoScalingGroupName string
	DesiredCapacity      int64
	HonorCooldown        bool
}

SetDesiredCapacityRequestParams contains the details for the SetDesiredCapacity action.

type SimpleResp

type SimpleResp struct {
	XMLName   xml.Name
	RequestId string `xml:"ResponseMetadata>RequestId"`
}

SimpleResp is the basic response from most actions.

type Tag

type Tag struct {
	Key               string `xml:"Key"`
	PropagateAtLaunch bool   `xml:"PropagateAtLaunch"`
	ResourceId        string `xml:"ResourceId"`
	ResourceType      string `xml:"ResourceType"`
	Value             string `xml:"Value"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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