Documentation ¶
Overview ¶
This is a group of functions to interact with EC2 instances in AWS. The instances modified by these functions are added to the field Instances of Ec2Client.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrNoInstancesFound is returned when no instances are found with the given tag. ErrNoInstancesFound = fmt.Errorf("no instances found with the given tag") )
Functions ¶
This section is empty.
Types ¶
type Ec2Client ¶
func (*Ec2Client) DescribeInstancesTagState ¶
func (e *Ec2Client) DescribeInstancesTagState(ctx context.Context, state string, t Tags) ([]string, error)
DescribeInstancesTagState returns a list of all instances with the given tag and state.
func (*Ec2Client) StartInstancesWithTag ¶
StopInstancesWithTag stops all instances with the given tag. It only works if the instances are in the "running" state. The instances that were stopped are added to the field Instances of Ec2Client.
func (*Ec2Client) StopInstancesWithTag ¶
StopInstancesWithTag stops all instances with the given tag. It only works if the instances are in the "running" state. The instances that were stopped are added to the field Instances of Ec2Client.
Click to show internal directories.
Click to hide internal directories.