ec2

package
v1.6.9 Latest Latest
Warning

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

Go to latest
Published: Jun 5, 2020 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client represents an EC2 API client

func NewClient

func NewClient(ec2Client *ec2.EC2, metrics metricsAPI, rateLimit float64, burst int) *Client

NewClient returns a new EC2 client

func (*Client) AssignPrivateIpAddresses

func (c *Client) AssignPrivateIpAddresses(eniID string, addresses int64) error

AssignPrivateIpAddresses assigns the specified number of secondary IP addresses

func (*Client) AttachNetworkInterface

func (c *Client) AttachNetworkInterface(index int64, instanceID, eniID string) (string, error)

AttachNetworkInterface attaches a previously created ENI to an instance

func (*Client) CreateNetworkInterface

func (c *Client) CreateNetworkInterface(toAllocate int64, subnetID, desc string, groups []string) (string, *v2.ENI, error)

CreateNetworkInterface creates an ENI with the given parameters

func (*Client) DeleteNetworkInterface

func (c *Client) DeleteNetworkInterface(eniID string) error

DeleteNetworkInterface deletes an ENI with the specified ID

func (*Client) GetInstances

func (c *Client) GetInstances(vpcs types.VpcMap, subnets types.SubnetMap) (types.InstanceMap, error)

GetInstances returns the list of all instances including their ENIs as instanceMap

func (*Client) GetSubnets

func (c *Client) GetSubnets() (types.SubnetMap, error)

GetSubnets returns all EC2 subnets as a subnetMap

func (*Client) GetVpcs

func (c *Client) GetVpcs() (types.VpcMap, error)

GetVpcs retrieves and returns all Vpcs

func (*Client) ModifyNetworkInterface

func (c *Client) ModifyNetworkInterface(eniID, attachmentID string, deleteOnTermination bool) error

ModifyNetworkInterface modifies the attributes of an ENI

func (*Client) TagENI added in v1.6.4

func (c *Client) TagENI(ctx context.Context, eniID string, eniTags map[string]string) error

TagENI creates the specified tags on the ENI

func (*Client) UnassignPrivateIpAddresses added in v1.6.4

func (c *Client) UnassignPrivateIpAddresses(eniID string, addresses []string) error

UnassignPrivateIpAddresses unassigns specified IP addresses from ENI

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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