Documentation ¶
Index ¶
- type Client
- func (c *Client) CheckIfVPCExists(vpcID string) (bool, error)
- func (c *Client) GetAccountID() (string, error)
- func (c *Client) GetAutoScalingGroups(autoscalingGroupNames []*string) (*autoscaling.DescribeAutoScalingGroupsOutput, error)
- func (c *Client) GetELB(loadBalancerName string) (*elb.DescribeLoadBalancersOutput, error)
- func (c *Client) GetInternetGateway(vpcID string) (string, error)
- func (c *Client) UpdateELBHealthCheck(loadBalancerName string, targetPort string) error
- type ClientInterface
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct { AutoScaling *autoscaling.AutoScaling EC2 *ec2.EC2 ELB *elb.ELB STS *sts.STS }
Client is a struct containing several clients for the different AWS services it needs to interact with. * AutoScaling is the standard client for the AutoScaling service. * EC2 is the standard client for the EC2 service. * ELB is the standard client for the ELB service. * STS is the standard client for the STS service.
func (*Client) CheckIfVPCExists ¶
CheckIfVPCExists returns true if the VPC exists, and false otherwise.
func (*Client) GetAccountID ¶
GetAccountID returns the ID of the AWS account the Client is interacting with.
func (*Client) GetAutoScalingGroups ¶
func (c *Client) GetAutoScalingGroups(autoscalingGroupNames []*string) (*autoscaling.DescribeAutoScalingGroupsOutput, error)
GetAutoScalingGroups returns a filtered list of AutoScaling groups (only for the given list of AutoScaling group names <autoscalingGroupNames>).
func (*Client) GetELB ¶
func (c *Client) GetELB(loadBalancerName string) (*elb.DescribeLoadBalancersOutput, error)
GetELB returns the AWS LoadBalancer object for the given name <loadBalancerName>.
func (*Client) GetInternetGateway ¶
GetInternetGateway returns the ID of the internet gateway attached to the given VPC <vpcID>. If there is no internet gateway attached, the returned string will be empty.
type ClientInterface ¶
type ClientInterface interface { GetAccountID() (string, error) CheckIfVPCExists(string) (bool, error) GetInternetGateway(string) (string, error) GetELB(string) (*elb.DescribeLoadBalancersOutput, error) UpdateELBHealthCheck(string, string) error GetAutoScalingGroups([]*string) (*autoscaling.DescribeAutoScalingGroupsOutput, error) }
ClientInterface is an interface which must be implemented by AWS clients.
func NewClient ¶
func NewClient(accessKeyID, secretAccessKey, region string) ClientInterface
NewClient creates a new Client for the given AWS credentials <accessKeyID>, <secretAccessKey>, and the AWS region <region>. It initializes the clients for the various services like EC2, ELB, etc.