aliyun

package
v0.0.0-...-e47f195 Latest Latest
Warning

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

Go to latest
Published: Oct 4, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IAliyunClient

type IAliyunClient interface {
	// 获取所有region列表
	DescribeRegions() ([]Region, error)
	// 获取region对应的所有image
	DescribeImages(regionID string) (images []Image, err error)
	// 共享镜像
	ShareImage(regionID, imageID, accountID string) error
	// 复制镜像
	CopyImage(imageID, srcRegion, dstRegion string) error
}

func NewAliyunClient

func NewAliyunClient(ak, sk string) (IAliyunClient, error)

type Image

type Image struct {
	Label   string // 镜像名称
	ImageID string // 镜像ID
	OS      string // 系统名称
	/*
		Creating:镜像正在创建中。
		Waiting:多任务排队中。
		Available(默认):您可以使用的镜像。
		UnAvailable:您不能使用的镜像。
		CreateFailed:创建失败的镜像。
		Deprecated:已弃用的镜像。
	*/
	Status string // 状态
}

type Region

type Region struct {
	Label    string // 地域名称
	EndPoint string // 端点
	RegionID string // 地域ID
}

Jump to

Keyboard shortcuts

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