aws

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2017 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type API

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

func New

func New(opts *Options) (*API, error)

New creates a new AWS API wrapper. It uses credentials from AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY environment variables.

func (*API) AddKey

func (a *API) AddKey(name, key string) error

func (*API) CheckInstances

func (a *API) CheckInstances(ids []*string, d time.Duration) error

CheckInstances waits until a set of EC2 instances are accessible by SSH, waiting a maximum of 'd' time.

func (*API) CreateInstances

func (a *API) CreateInstances(keyname, userdata string, count uint64, wait bool) ([]*ec2.Instance, error)

CreateInstances creates EC2 instances with a given ssh key name, user data. The image ID, instance type, and security group set in the API will be used. If wait is true, CreateInstances will block until all instances are reachable by SSH.

func (*API) DeleteKey

func (a *API) DeleteKey(name string) error

func (*API) TerminateInstance

func (a *API) TerminateInstance(id string) error

TerminateInstance schedules an EC2 instance to be terminated.

type Options

type Options struct {
	*platform.Options
	AMI           string
	InstanceType  string
	SecurityGroup string
}

Jump to

Keyboard shortcuts

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