sdk

package
v0.0.0-...-8cfe922 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2016 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Overview

Package sdk provides the API clients for the AWS SDK.

Index

Constants

This section is empty.

Variables

View Source
var (
	AutoScalingConfigs    = []*aws.Config{}
	EC2Configs            = []*aws.Config{}
	CloudFormationConfigs = []*aws.Config{}
	ELBConfigs            = []*aws.Config{}
)

Functions

This section is empty.

Types

type AutoScaling

type AutoScaling struct {
	// contains filtered or unexported fields
}

AutoScaling represents the AutoScaling API.

func NewAutoScaling

func NewAutoScaling() *AutoScaling

NewAutoScaling returns a new AutoScaling.

func (AutoScaling) DescribeAutoScalingGroup

func (a AutoScaling) DescribeAutoScalingGroup(name string) (*AutoScalingGroup, error)

DescribeAutoScalingGroup returns an AutoScalingGroup, given the name of a group.

func (AutoScaling) KillInstance

func (a AutoScaling) KillInstance(instanceID string) error

KillInstance kills the instance in the Auto Scaling Group with the given ID.

type AutoScalingGroup

type AutoScalingGroup struct {
	Name      string `json:"AutoScalingGroupName"`
	Instances []AutoScalingInstance
}

AutoScalingGroup represents an AWS Auto Scaling Group.

type AutoScalingInstance

type AutoScalingInstance struct {
	InstanceId              string
	AvailabilityZone        string
	HealthStatus            string
	LifecycleState          string
	LaunchConfigurationName string
}

AutoScalingInstance represents an instance in an AutoScalingGroup.

type CloudFormation

type CloudFormation struct {
	// contains filtered or unexported fields
}

CloudFormation represents the CloudFormation API.

func NewCloudFormation

func NewCloudFormation() *CloudFormation

NewCloudFormation returns a new CloudFormation.

func (CloudFormation) CreateStack

func (c CloudFormation) CreateStack(name, stackType, templateFile, parametersFile string) (*Stack, error)

CreateStack creates a CloudFormation stack, given a name, a type of stack, and template and parameters files.

func (CloudFormation) DeleteStack

func (c CloudFormation) DeleteStack(name string) error

DeleteStack deletes the CloudFormation stack of the given name.

func (CloudFormation) DescribeStack

func (c CloudFormation) DescribeStack(name string) (*Stack, error)

DescribeStack returns a Stack, given the name of a CloudFormation stack.

func (CloudFormation) DescribeStackResources

func (c CloudFormation) DescribeStackResources(name string) (*StackResources, error)

DescribeStackResources returns the StackResources, given the name of a stack.

func (CloudFormation) DescribeStacks

func (c CloudFormation) DescribeStacks() (*Stacks, error)

DescribeStacks returns all Stacks.

type ConfigurableSessionProvider

type ConfigurableSessionProvider struct {
	ConfigDisableENVCredentials bool
	ConfigRegion                string
	ConfigAccessKey             string
	ConfigSecretKey             string
	ConfigSessionToken          string
	// contains filtered or unexported fields
}

ConfigurableSessionProvider represents a SessionProvider that can be configured.

var (
	// DefaultSessionProvider represents a default SessionProvider.
	DefaultSessionProvider *ConfigurableSessionProvider = &ConfigurableSessionProvider{
		ConfigRegion:                "eu-west-1",
		ConfigDisableENVCredentials: false,
		ConfigAccessKey:             "",
		ConfigSecretKey:             "",
		ConfigSessionToken:          "",
	}
)

func (*ConfigurableSessionProvider) GetSession

func (dsp *ConfigurableSessionProvider) GetSession() *session.Session

GetSessions returns the current session from the SessionProvider.

func (*ConfigurableSessionProvider) RegisterFlagSet

func (dsp *ConfigurableSessionProvider) RegisterFlagSet(flagSet *pflag.FlagSet)

RegisterFlagSet registers command line flags with the SessionProvider.

type EC2

type EC2 struct {
	// contains filtered or unexported fields
}

EC2 represents the EC2 API.

func NewEC2

func NewEC2() *EC2

NewEC2 returns a new EC2.

func (EC2) DescribeInstances

func (e EC2) DescribeInstances(instanceIds []string) ([]types.Instance, error)

DescribeInstances returns a list of Instances, given a list of instance IDs.

func (EC2) FindInstancesByTags

func (e EC2) FindInstancesByTags(tags ...types.Tag) ([]types.Instance, error)

FindInstancesByTags returns a list of Instances, given a list of Tags.

type ELB

type ELB struct {
	// contains filtered or unexported fields
}

ELB represents the ELB API.

func NewELB

func NewELB() *ELB

NewELB returns a new ELB.

func (ELB) DescribeLoadBalancer

func (e ELB) DescribeLoadBalancer(name string) (*LoadBalancer, error)

DescribeLoadBalancer returns a LoadBalancer, given a matching name.

type LoadBalancer

type LoadBalancer struct {
	LoadBalancerName string
	DNSName          string
	Scheme           string
}

LoadBalancer represents a load balancer running in AWS.

type SessionProvider

type SessionProvider interface {
	GetSession() *session.Session
}

SessionProvider represents the current AWS session.

type Stack

type Stack struct {
	Id           string `json:"StackId"`
	Name         string `json:"StackName"`
	Status       string `json:"StackStatus"`
	StatusReason string `json:"StackStatusReason"`
	Tags         []types.Tag
	CreationTime time.Time
}

Stack represents a CloudFormation stack.

type StackResources

type StackResources struct {
	StackResources []types.StackResource
}

StackResources represents a list containing multiple StackResource.

type Stacks

type Stacks struct {
	Stacks []Stack
}

Stacks represents a list containing multiple Stack.

Jump to

Keyboard shortcuts

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