ec2instance

package
v0.0.0-...-260e043 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2021 License: GPL-3.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 Ec2Instance

type Ec2Instance struct {
	InstanceID *string
	// contains filtered or unexported fields
}

Ec2Instance is the main type of that package. Will be returned by new. It contains all data relevant for an ec2instance

func New

func New(session *session.Session, instanceID string) (*Ec2Instance, error)

New returns a well construct EC2Instance object ec2instance

func (Ec2Instance) GetEBSMappedVolumes

func (e Ec2Instance) GetEBSMappedVolumes() []*ec2.InstanceBlockDeviceMapping

GetEBSMappedVolumes returns EBS volumes mapped with this ec2instance

func (Ec2Instance) GetEBSVolume

func (e Ec2Instance) GetEBSVolume(volumeID string) (*ebsvolume.VolumeToEncrypt, error)

GetEBSVolume returns a specific EBS volume with high level methods

func (Ec2Instance) IsStopped

func (e Ec2Instance) IsStopped() bool

IsStopped will check if the ec2instance is correctly stopped

func (Ec2Instance) IsSupportsEncryptedVolumes

func (e Ec2Instance) IsSupportsEncryptedVolumes() bool

IsSupportsEncryptedVolumes will check if the ec2instance supports EBS encrypted volumes (not all instances types support that).

func (Ec2Instance) StartInstance

func (e Ec2Instance) StartInstance() error

StartInstance will... start the ec2instance. What a surprise ! :-)

func (Ec2Instance) SwapBlockDevice

func (e Ec2Instance) SwapBlockDevice(source *ec2.InstanceBlockDeviceMapping, target *ec2.Volume) error

SwapBlockDevice will swap two EBS volumes from an EC2 ec2instance

Jump to

Keyboard shortcuts

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