Documentation ¶
Index ¶
- Constants
- type Client
- func (c *Client) AssignPrivateIPAddresses(ctx context.Context, eniID string, toAllocate int) ([]string, error)
- func (c *Client) AttachNetworkInterface(ctx context.Context, instanceID, eniID string) error
- func (c *Client) CreateNetworkInterface(ctx context.Context, secondaryPrivateIPCount int, vSwitchID string, ...) (string, *eniTypes.ENI, error)
- func (c *Client) DeleteNetworkInterface(ctx context.Context, eniID string) error
- func (c *Client) DescribeNetworkInterface(ctx context.Context, eniID string) (*ecs.NetworkInterfaceSet, error)
- func (c *Client) GetInstanceTypes(ctx context.Context) ([]ecs.InstanceType, error)
- func (c *Client) GetInstances(ctx context.Context, vpcs ipamTypes.VirtualNetworkMap, ...) (*ipamTypes.InstanceMap, error)
- func (c *Client) GetSecurityGroups(ctx context.Context) (types.SecurityGroupMap, error)
- func (c *Client) GetVPC(ctx context.Context, vpcID string) (*ipamTypes.VirtualNetwork, error)
- func (c *Client) GetVPCs(ctx context.Context) (ipamTypes.VirtualNetworkMap, error)
- func (c *Client) GetVSwitches(ctx context.Context) (ipamTypes.SubnetMap, error)
- func (c *Client) UnassignPrivateIPAddresses(ctx context.Context, eniID string, addresses []string) error
- func (c *Client) WaitENIAttached(ctx context.Context, eniID string) (string, error)
- type MetricsAPI
Constants ¶
const ( VPCID = "VPCID" MaxListByTagSize = 20 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client an AlibabaCloud API client
func NewClient ¶
func NewClient(vpcClient *vpc.Client, client *ecs.Client, metrics MetricsAPI, rateLimit float64, burst int, filters map[string]string) *Client
NewClient create the client
func (*Client) AssignPrivateIPAddresses ¶
func (c *Client) AssignPrivateIPAddresses(ctx context.Context, eniID string, toAllocate int) ([]string, error)
AssignPrivateIPAddresses assigns the specified number of secondary IP return allocated IPs
func (*Client) AttachNetworkInterface ¶
AttachNetworkInterface attaches a previously created ENI to an instance
func (*Client) CreateNetworkInterface ¶
func (c *Client) CreateNetworkInterface(ctx context.Context, secondaryPrivateIPCount int, vSwitchID string, groups []string, tags map[string]string) (string, *eniTypes.ENI, error)
CreateNetworkInterface creates an ENI with the given parameters
func (*Client) DeleteNetworkInterface ¶
DeleteNetworkInterface deletes an ENI with the specified ID
func (*Client) DescribeNetworkInterface ¶
func (c *Client) DescribeNetworkInterface(ctx context.Context, eniID string) (*ecs.NetworkInterfaceSet, error)
DescribeNetworkInterface get ENI by id
func (*Client) GetInstanceTypes ¶
GetInstanceTypes returns all the known ECS instance types in the configured region
func (*Client) GetInstances ¶
func (c *Client) GetInstances(ctx context.Context, vpcs ipamTypes.VirtualNetworkMap, subnets ipamTypes.SubnetMap) (*ipamTypes.InstanceMap, error)
GetInstances returns the list of all instances including their ENIs as instanceMap
func (*Client) GetSecurityGroups ¶
GetSecurityGroups return all sg
func (*Client) GetVSwitches ¶
GetVSwitches returns all ecs vSwitches as a subnetMap
type MetricsAPI ¶
type MetricsAPI interface { helpers.MetricsAPI ObserveAPICall(call, status string, duration float64) }
MetricsAPI represents the metrics maintained by the AlibabaCloud API client