aliyun

package
v0.0.0-...-376e3f8 Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2025 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewECSApi

func NewECSApi(hc *wsa.HttpClient, args map[string]any) (laas.HostApi, error)

Types

type Client

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

type ECSApi

type ECSApi struct {
	Client
}

func (*ECSApi) Close

func (a *ECSApi) Close() error

func (*ECSApi) CreateHosts

func (a *ECSApi) CreateHosts(region, template string, liveTime time.Duration, quantity int) ([]string, error)

CreateHosts refer https://api.aliyun.com/api/Ecs/2014-05-26/RunInstances

func (*ECSApi) DescribeRegions

func (a *ECSApi) DescribeRegions() ([]*RegionInfo, error)

func (*ECSApi) ReleaseHosts

func (a *ECSApi) ReleaseHosts(region string, ids []string) error

ReleaseHosts refer https://api.aliyun.com/api/Ecs/2014-05-26/DeleteInstance

type RegionInfo

type RegionInfo struct {
	RegionId       string `json:"RegionId"`
	RegionEndpoint string `json:"RegionEndpoint"`
	LocalName      string `json:"LocalName"`
}

type ResponseBase

type ResponseBase struct {
	RequestId string `json:"RequestId"`
}

Jump to

Keyboard shortcuts

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