ecs

package
v0.0.0-...-ce01f02 Latest Latest
Warning

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

Go to latest
Published: Dec 27, 2024 License: Apache-2.0 Imports: 4 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	sdk.Client
}

Client is the sdk client struct, each func corresponds to an OpenAPI

func NewClient

func NewClient() (client *Client, err error)

NewClient creates a sdk client with environment variables

func NewClientWithAccessKey

func NewClientWithAccessKey(regionId, accessKeyId, accessKeySecret string) (client *Client, err error)

NewClientWithAccessKey is a shortcut to create sdk client with accesskey usage: https://help.aliyun.com/document_detail/66217.html

func NewClientWithEcsRamRole

func NewClientWithEcsRamRole(regionId string, roleName string) (client *Client, err error)

NewClientWithEcsRamRole is a shortcut to create sdk client with ecs ram role usage: https://help.aliyun.com/document_detail/66223.html

func NewClientWithOptions

func NewClientWithOptions(regionId string, config *sdk.Config, credential auth.Credential) (client *Client, err error)

NewClientWithOptions creates a sdk client with regionId/sdkConfig/credential this is the common api to create a sdk client

func NewClientWithRRSA

func NewClientWithRRSA(regionId, roleARN, oidcProviderARN, oidcTokenFilePath, roleSessionName string) (client *Client, err error)

NewClientWithRRSA is a shortcut to create sdk client with RRSA

func NewClientWithRamRoleArn

func NewClientWithRamRoleArn(regionId string, accessKeyId, accessKeySecret, roleArn, roleSessionName string) (client *Client, err error)

NewClientWithRamRoleArn is a shortcut to create sdk client with ram roleArn usage: https://help.aliyun.com/document_detail/66222.html

func NewClientWithRsaKeyPair

func NewClientWithRsaKeyPair(regionId string, publicKeyId, privateKey string, sessionExpiration int) (client *Client, err error)

NewClientWithRsaKeyPair is a shortcut to create sdk client with rsa key pair attention: rsa key pair auth is only Japan regions available

func NewClientWithStsToken

func NewClientWithStsToken(regionId, stsAccessKeyId, stsAccessKeySecret, stsToken string) (client *Client, err error)

NewClientWithStsToken is a shortcut to create sdk client with sts token usage: https://help.aliyun.com/document_detail/66222.html

func (*Client) DescribeInstanceTypes

func (client *Client) DescribeInstanceTypes(request *DescribeInstanceTypesRequest) (response *DescribeInstanceTypesResponse, err error)

DescribeInstanceTypes invokes the ecs.DescribeInstanceTypes API synchronously api document: https://help.aliyun.com/api/ecs/describeinstancetypes.html

func (*Client) DescribeInstanceTypesWithCallback

func (client *Client) DescribeInstanceTypesWithCallback(request *DescribeInstanceTypesRequest, callback func(response *DescribeInstanceTypesResponse, err error)) <-chan int

DescribeInstanceTypesWithCallback invokes the ecs.DescribeInstanceTypes API asynchronously api document: https://help.aliyun.com/api/ecs/describeinstancetypes.html asynchronous document: https://help.aliyun.com/document_detail/66220.html

func (*Client) DescribeInstanceTypesWithChan

func (client *Client) DescribeInstanceTypesWithChan(request *DescribeInstanceTypesRequest) (<-chan *DescribeInstanceTypesResponse, <-chan error)

DescribeInstanceTypesWithChan invokes the ecs.DescribeInstanceTypes API asynchronously api document: https://help.aliyun.com/api/ecs/describeinstancetypes.html asynchronous document: https://help.aliyun.com/document_detail/66220.html

type DescribeInstanceTypesRequest

type DescribeInstanceTypesRequest struct {
	*requests.RpcRequest
	ResourceOwnerId      requests.Integer `position:"Query" name:"ResourceOwnerId"`
	ResourceOwnerAccount string           `position:"Query" name:"ResourceOwnerAccount"`
	OwnerAccount         string           `position:"Query" name:"OwnerAccount"`
	InstanceTypeFamily   string           `position:"Query" name:"InstanceTypeFamily"`
	OwnerId              requests.Integer `position:"Query" name:"OwnerId"`
}

DescribeInstanceTypesRequest is the request struct for api DescribeInstanceTypes

func CreateDescribeInstanceTypesRequest

func CreateDescribeInstanceTypesRequest() (request *DescribeInstanceTypesRequest)

CreateDescribeInstanceTypesRequest creates a request to invoke DescribeInstanceTypes API

type DescribeInstanceTypesResponse

type DescribeInstanceTypesResponse struct {
	*responses.BaseResponse
	RequestId     string                               `json:"RequestId" xml:"RequestId"`
	InstanceTypes InstanceTypesInDescribeInstanceTypes `json:"InstanceTypes" xml:"InstanceTypes"`
}

DescribeInstanceTypesResponse is the response struct for api DescribeInstanceTypes

func CreateDescribeInstanceTypesResponse

func CreateDescribeInstanceTypesResponse() (response *DescribeInstanceTypesResponse)

CreateDescribeInstanceTypesResponse creates a response to parse from DescribeInstanceTypes response

type InstanceType

type InstanceType struct {
	MemorySize           float64 `json:"MemorySize" xml:"MemorySize"`
	InstancePpsRx        int     `json:"InstancePpsRx" xml:"InstancePpsRx"`
	CpuCoreCount         int     `json:"CpuCoreCount" xml:"CpuCoreCount"`
	Cores                int     `json:"Cores" xml:"Cores"`
	Memory               int     `json:"Memory" xml:"Memory"`
	InstanceTypeId       string  `json:"InstanceTypeId" xml:"InstanceTypeId"`
	InstanceBandwidthRx  int     `json:"InstanceBandwidthRx" xml:"InstanceBandwidthRx"`
	InstanceType         string  `json:"InstanceType" xml:"InstanceType"`
	BaselineCredit       int     `json:"BaselineCredit" xml:"BaselineCredit"`
	EniQuantity          int     `json:"EniQuantity" xml:"EniQuantity"`
	Generation           string  `json:"Generation" xml:"Generation"`
	GPUAmount            int     `json:"GPUAmount" xml:"GPUAmount"`
	SupportIoOptimized   string  `json:"SupportIoOptimized" xml:"SupportIoOptimized"`
	InstanceTypeFamily   string  `json:"InstanceTypeFamily" xml:"InstanceTypeFamily"`
	InitialCredit        int     `json:"InitialCredit" xml:"InitialCredit"`
	InstancePpsTx        int     `json:"InstancePpsTx" xml:"InstancePpsTx"`
	LocalStorageAmount   int     `json:"LocalStorageAmount" xml:"LocalStorageAmount"`
	InstanceFamilyLevel  string  `json:"InstanceFamilyLevel" xml:"InstanceFamilyLevel"`
	LocalStorageCapacity int     `json:"LocalStorageCapacity" xml:"LocalStorageCapacity"`
	GPUSpec              string  `json:"GPUSpec" xml:"GPUSpec"`
	LocalStorageCategory string  `json:"LocalStorageCategory" xml:"LocalStorageCategory"`
	InstanceBandwidthTx  int     `json:"InstanceBandwidthTx" xml:"InstanceBandwidthTx"`
}

InstanceType is a nested struct in ecs response

type InstanceTypesInDescribeInstanceTypes

type InstanceTypesInDescribeInstanceTypes struct {
	InstanceType []InstanceType `json:"InstanceType" xml:"InstanceType"`
}

InstanceTypesInDescribeInstanceTypes is a nested struct in ecs response

Jump to

Keyboard shortcuts

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