Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetInstances ¶
func GetInstances(c context.Context, api EC2DescribeInstancesAPI, input *ec2.DescribeInstancesInput) (*ec2.DescribeInstancesOutput, error)
GetInstances retrieves information about your Amazon Elastic Compute Cloud (Amazon EC2) instances. Inputs:
c is the context of the method call, which includes the AWS Region. api is the interface that defines the method call. input defines the input arguments to the service call.
Output:
If success, a DescribeInstancesOutput object containing the result of the service call and nil. Otherwise, nil and an error from the call to DescribeInstances.
Types ¶
type EC2DescribeInstancesAPI ¶
type EC2DescribeInstancesAPI interface { DescribeInstances(ctx context.Context, params *ec2.DescribeInstancesInput, optFns ...func(*ec2.Options)) (*ec2.DescribeInstancesOutput, error) }
EC2DescribeInstancesAPI defines the interface for the DescribeInstances function. We use this interface to test the function using a mocked service.
Click to show internal directories.
Click to hide internal directories.