aws

package
v0.0.0-...-f7f2781 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2020 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ApplyChaosSecurityGroupToInstances

func ApplyChaosSecurityGroupToInstances(svc *ec2.EC2, instances []*ec2.Instance, sg string) error

ApplyChaosSecurityGroupToInstances applies given SecurityGroup ID (sg) to all instances provided in the ec2.Instance list (instances). Returns an error

func DeleteDenySecurityGroup

func DeleteDenySecurityGroup(svc *ec2.EC2, sg string) error

DeleteDenySecurityGroup removes the given SecurityGroup ID from AWS. Returns an error

func ForceShutdownInstances

func ForceShutdownInstances(svc *ec2.EC2, instances []*ec2.Instance) error

ForceShutdownInstances will issue a StopInstances with the force flag call to the AWS API. Accepts a pointer to an EC2 service and a list of EC2 instances. Returns an error

func GenerateDenySecurityGroup

func GenerateDenySecurityGroup(svc *ec2.EC2, vpc *string) (string, error)

GenerateDenySecurityGroup used to create an emtpy SecurityGroup within the AWS VPC given. Returns SecurityGroup-ID as a string and an error

func GetInstances

func GetInstances(svc *ec2.EC2, o options.AwsOptions) ([]*ec2.Instance, error)

func RebootInstances

func RebootInstances(svc *ec2.EC2, instances []*ec2.Instance) error

RebootInstances reboots all instances given in an ec2.Instance list (instances). Returns an error

func RevertChaosSecurityGroupOnInstances

func RevertChaosSecurityGroupOnInstances(svc *ec2.EC2, instances []*ec2.Instance) error

RevertChaosSecurityGroupOnInstances applies the original SecurityGroups to each ec2.Instance within the list (instances). Returns error

func SendCommandToSSM

func SendCommandToSSM(ssmClient *ssm.SSM, instances []*ec2.Instance, mode string)

Checks instance to ensure it is online and rectrieve its OS type

func StartInstances

func StartInstances(svc *ec2.EC2, instances []*ec2.Instance) error

StartInstances will attempt to start the AWS instances passed in the variable list "instances".

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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