ecs

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2022 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Classify

func Classify(ins []ecs.Instance) (runningCount, gonnaExpiredCount, expiredCount, stoppedCount,
	postpaidCount, prepaidCount, diceManagedCount int, err error)

func GetAllResourceIDs

func GetAllResourceIDs(ctx aliyun_resources.Context) ([]string, error)

func List

func List(ctx aliyun_resources.Context, page aliyun_resources.PageOption,
	regions []string,
	cluster string,
	IPs []string) ([]ecs.Instance, int, error)

func ListInstanceTypes

func ListInstanceTypes(ctx aliyun_resources.Context) ([]ecs.InstanceType, error)

func OverwriteTags

func OverwriteTags(ctx aliyun_resources.Context, items []apistructs.CloudResourceTagItem, tags []string) error

func TagResource

func TagResource(ctx aliyun_resources.Context, instanceIds []string, tags []string) error

func Trend

func Trend(ins []ecs.Instance) (*apistructs.MonthAddTrend, error)

func UnTag

func UnTag(ctx aliyun_resources.Context, instanceIds []string, tags []string) error

Types

type MonthAddTrend

type MonthAddTrend struct {
	Time    []int64               `json:"time"`
	Results []MonthAddTrendData_0 `json:"results"`
}

type MonthAddTrendData

type MonthAddTrendData struct {
	AxisIndex int    `json:"axisIndex"`
	ChartType string `json:"chartType"`
	UnitType  string `json:"unitType"`
	Unit      string `json:"unit"`
	Name      string `json:"name"`
	Tag       string `json:"tag"`
	Data      []int  `json:"data"`
}

type MonthAddTrendData_0

type MonthAddTrendData_0 struct {
	Data []struct {
		MonthAdd MonthAddTrendData `json:"monthadd"`
	} `json:"data"`
}

Jump to

Keyboard shortcuts

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