eci

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2019 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	VOL_TYPE_NFS              = "NFSVolume"
	VOL_TYPE_EMPTYDIR         = "EmptyDirVolume"
	VOL_TYPE_CONFIGFILEVOLUME = "ConfigFileVolume"
)

Volume is a nested struct in eci response

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 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) CreateContainerGroup

func (client *Client) CreateContainerGroup(request *CreateContainerGroupRequest) (response *CreateContainerGroupResponse, err error)

CreateContainerGroup invokes the eci.CreateContainerGroup API synchronously api document: https://help.aliyun.com/api/eci/createcontainergroup.html

func (*Client) CreateContainerGroupWithCallback

func (client *Client) CreateContainerGroupWithCallback(request *CreateContainerGroupRequest, callback func(response *CreateContainerGroupResponse, err error)) <-chan int

CreateContainerGroupWithCallback invokes the eci.CreateContainerGroup API asynchronously api document: https://help.aliyun.com/api/eci/createcontainergroup.html asynchronous document: https://help.aliyun.com/document_detail/66220.html

func (*Client) CreateContainerGroupWithChan

func (client *Client) CreateContainerGroupWithChan(request *CreateContainerGroupRequest) (<-chan *CreateContainerGroupResponse, <-chan error)

CreateContainerGroupWithChan invokes the eci.CreateContainerGroup API asynchronously api document: https://help.aliyun.com/api/eci/createcontainergroup.html asynchronous document: https://help.aliyun.com/document_detail/66220.html

func (*Client) DeleteContainerGroup

func (client *Client) DeleteContainerGroup(request *DeleteContainerGroupRequest) (response *DeleteContainerGroupResponse, err error)

DeleteContainerGroup invokes the eci.DeleteContainerGroup API synchronously api document: https://help.aliyun.com/api/eci/deletecontainergroup.html

func (*Client) DeleteContainerGroupWithCallback

func (client *Client) DeleteContainerGroupWithCallback(request *DeleteContainerGroupRequest, callback func(response *DeleteContainerGroupResponse, err error)) <-chan int

DeleteContainerGroupWithCallback invokes the eci.DeleteContainerGroup API asynchronously api document: https://help.aliyun.com/api/eci/deletecontainergroup.html asynchronous document: https://help.aliyun.com/document_detail/66220.html

func (*Client) DeleteContainerGroupWithChan

func (client *Client) DeleteContainerGroupWithChan(request *DeleteContainerGroupRequest) (<-chan *DeleteContainerGroupResponse, <-chan error)

DeleteContainerGroupWithChan invokes the eci.DeleteContainerGroup API asynchronously api document: https://help.aliyun.com/api/eci/deletecontainergroup.html asynchronous document: https://help.aliyun.com/document_detail/66220.html

func (*Client) DescribeContainerGroups

func (client *Client) DescribeContainerGroups(request *DescribeContainerGroupsRequest) (response *DescribeContainerGroupsResponse, err error)

DescribeContainerGroups invokes the eci.DescribeContainerGroups API synchronously api document: https://help.aliyun.com/api/eci/describecontainergroups.html

func (*Client) DescribeContainerGroupsWithCallback

func (client *Client) DescribeContainerGroupsWithCallback(request *DescribeContainerGroupsRequest, callback func(response *DescribeContainerGroupsResponse, err error)) <-chan int

DescribeContainerGroupsWithCallback invokes the eci.DescribeContainerGroups API asynchronously api document: https://help.aliyun.com/api/eci/describecontainergroups.html asynchronous document: https://help.aliyun.com/document_detail/66220.html

func (*Client) DescribeContainerGroupsWithChan

func (client *Client) DescribeContainerGroupsWithChan(request *DescribeContainerGroupsRequest) (<-chan *DescribeContainerGroupsResponse, <-chan error)

DescribeContainerGroupsWithChan invokes the eci.DescribeContainerGroups API asynchronously api document: https://help.aliyun.com/api/eci/describecontainergroups.html asynchronous document: https://help.aliyun.com/document_detail/66220.html

func (*Client) DescribeContainerLog

func (client *Client) DescribeContainerLog(request *DescribeContainerLogRequest) (response *DescribeContainerLogResponse, err error)

DescribeContainerLog invokes the eci.DescribeContainerLog API synchronously api document: https://help.aliyun.com/api/eci/describecontainerlog.html

func (*Client) DescribeContainerLogWithCallback

func (client *Client) DescribeContainerLogWithCallback(request *DescribeContainerLogRequest, callback func(response *DescribeContainerLogResponse, err error)) <-chan int

DescribeContainerLogWithCallback invokes the eci.DescribeContainerLog API asynchronously api document: https://help.aliyun.com/api/eci/describecontainerlog.html asynchronous document: https://help.aliyun.com/document_detail/66220.html

func (*Client) DescribeContainerLogWithChan

func (client *Client) DescribeContainerLogWithChan(request *DescribeContainerLogRequest) (<-chan *DescribeContainerLogResponse, <-chan error)

DescribeContainerLogWithChan invokes the eci.DescribeContainerLog API asynchronously api document: https://help.aliyun.com/api/eci/describecontainerlog.html asynchronous document: https://help.aliyun.com/document_detail/66220.html

type ConfigFileToPath

type ConfigFileToPath struct {
	Content string `name:"Content"`
	Path    string `name:"Path"`
}

ConfigFileVolumeConfigFileToPath is a nested struct in eci response

type Container

type Container struct {
	Name            string           `json:"Name" xml:"Name" `
	Image           string           `json:"Image" xml:"Image"`
	Memory          float64          `json:"Memory" xml:"Memory"`
	Cpu             float64          `json:"Cpu" xml:"Cpu"`
	RestartCount    int              `json:"RestartCount" xml:"RestartCount"`
	WorkingDir      string           `json:"WorkingDir" xml:"WorkingDir"`
	ImagePullPolicy string           `json:"ImagePullPolicy" xml:"ImagePullPolicy"`
	Commands        []string         `json:"Commands" xml:"Commands"`
	Args            []string         `json:"Args" xml:"Args"`
	PreviousState   ContainerState   `json:"PreviousState" xml:"PreviousState"`
	CurrentState    ContainerState   `json:"CurrentState" xml:"CurrentState"`
	VolumeMounts    []VolumeMount    `json:"VolumeMounts" xml:"VolumeMounts"`
	Ports           []ContainerPort  `json:"Ports" xml:"Ports"`
	EnvironmentVars []EnvironmentVar `json:"EnvironmentVars" xml:"EnvironmentVars"`
}

Container is a nested struct in eci response

type ContainerGroup

type ContainerGroup struct {
	ContainerGroupId   string      `json:"ContainerGroupId" xml:"ContainerGroupId"`
	ContainerGroupName string      `json:"ContainerGroupName" xml:"ContainerGroupName"`
	RegionId           string      `json:"RegionId" xml:"RegionId"`
	ZoneId             string      `json:"ZoneId" xml:"ZoneId"`
	Memory             float64     `json:"Memory" xml:"Memory"`
	Cpu                float64     `json:"Cpu" xml:"Cpu"`
	VSwitchId          string      `json:"VSwitchId" xml:"VSwitchId"`
	SecurityGroupId    string      `json:"SecurityGroupId" xml:"SecurityGroupId"`
	RestartPolicy      string      `json:"RestartPolicy" xml:"RestartPolicy"`
	IntranetIp         string      `json:"IntranetIp" xml:"IntranetIp"`
	Status             string      `json:"Status" xml:"Status"`
	InternetIp         string      `json:"InternetIp" xml:"InternetIp"`
	CreationTime       string      `json:"CreationTime" xml:"CreationTime"`
	SucceededTime      string      `json:"SucceededTime" xml:"SucceededTime"`
	Tags               []Tag       `json:"Tags" xml:"Tags"`
	Events             []Event     `json:"Events" xml:"Events"`
	Containers         []Container `json:"Containers" xml:"Containers"`
	Volumes            []Volume    `json:"Volumes" xml:"Volumes"`
}

ContainerGroup is a nested struct in eci response

type ContainerPort

type ContainerPort struct {
	Port     requests.Integer `name:"Port"`
	Protocol string           `name:"Protocol"`
}

ContainerPort is a nested struct in eci response

type ContainerState

type ContainerState struct {
	State        string `json:"State" xml:"State"`
	DetailStatus string `json:"DetailStatus" xml:"DetailStatus"`
	ExitCode     int    `json:"ExitCode" xml:"ExitCode"`
	StartTime    string `json:"StartTime" xml:"StartTime"`
	FinishTime   string `json:"FinishTime" xml:"FinishTime"`
}

CurrentState is a nested struct in eci response

type CreateContainer

type CreateContainer struct {
	Name            string           `name:"Name"`
	Image           string           `name:"Image"`
	Memory          requests.Float   `name:"Memory"`
	Cpu             requests.Float   `name:"Cpu"`
	WorkingDir      string           `name:"WorkingDir"`
	ImagePullPolicy string           `name:"ImagePullPolicy"`
	Commands        []string         `name:"Command"  type:"Repeated"`
	Args            []string         `name:"Arg"  type:"Repeated"`
	VolumeMounts    []VolumeMount    `name:"VolumeMount"  type:"Repeated"`
	Ports           []ContainerPort  `name:"Port"  type:"Repeated"`
	EnvironmentVars []EnvironmentVar `name:"EnvironmentVar"  type:"Repeated"`
}

type CreateContainerGroupRequest

type CreateContainerGroupRequest struct {
	*requests.RpcRequest
	Containers               []CreateContainer         `position:"Query" name:"Container"  type:"Repeated"`
	InitContainers           []CreateContainer         `position:"Query" name:"InitContainer"  type:"Repeated"`
	ResourceOwnerId          requests.Integer          `position:"Query" name:"ResourceOwnerId"`
	SecurityGroupId          string                    `position:"Query" name:"SecurityGroupId"`
	ImageRegistryCredentials []ImageRegistryCredential `position:"Query" name:"ImageRegistryCredential"  type:"Repeated"`
	Tags                     []Tag                     `position:"Query" name:"Tag"  type:"Repeated"`
	ResourceOwnerAccount     string                    `position:"Query" name:"ResourceOwnerAccount"`
	RestartPolicy            string                    `position:"Query" name:"RestartPolicy"`
	OwnerAccount             string                    `position:"Query" name:"OwnerAccount"`
	OwnerId                  requests.Integer          `position:"Query" name:"OwnerId"`
	VSwitchId                string                    `position:"Query" name:"VSwitchId"`
	Volumes                  []Volume                  `position:"Query" name:"Volume"  type:"Repeated"`
	ContainerGroupName       string                    `position:"Query" name:"ContainerGroupName"`
	ZoneId                   string                    `position:"Query" name:"ZoneId"`
}

CreateContainerGroupRequest is the request struct for api CreateContainerGroup

func CreateCreateContainerGroupRequest

func CreateCreateContainerGroupRequest() (request *CreateContainerGroupRequest)

CreateCreateContainerGroupRequest creates a request to invoke CreateContainerGroup API

type CreateContainerGroupResponse

type CreateContainerGroupResponse struct {
	*responses.BaseResponse
	RequestId        string
	ContainerGroupId string
}

CreateContainerGroupResponse is the response struct for api CreateContainerGroup

func CreateCreateContainerGroupResponse

func CreateCreateContainerGroupResponse() (response *CreateContainerGroupResponse)

CreateCreateContainerGroupResponse creates a response to parse from CreateContainerGroup response

type DeleteContainerGroupRequest

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

DeleteContainerGroupRequest is the request struct for api DeleteContainerGroup

func CreateDeleteContainerGroupRequest

func CreateDeleteContainerGroupRequest() (request *DeleteContainerGroupRequest)

CreateDeleteContainerGroupRequest creates a request to invoke DeleteContainerGroup API

type DeleteContainerGroupResponse

type DeleteContainerGroupResponse struct {
	*responses.BaseResponse
	RequestId string `json:"RequestId" xml:"RequestId"`
}

DeleteContainerGroupResponse is the response struct for api DeleteContainerGroup

func CreateDeleteContainerGroupResponse

func CreateDeleteContainerGroupResponse() (response *DeleteContainerGroupResponse)

CreateDeleteContainerGroupResponse creates a response to parse from DeleteContainerGroup response

type DescribeContainerGroupsRequest

type DescribeContainerGroupsRequest struct {
	*requests.RpcRequest
	ResourceOwnerId      requests.Integer              `position:"Query" name:"ResourceOwnerId"`
	NextToken            string                        `position:"Query" name:"NextToken"`
	Limit                requests.Integer              `position:"Query" name:"Limit"`
	Tags                 *[]DescribeContainerGroupsTag `position:"Query" name:"Tag"  type:"Repeated"`
	ContainerGroupId     string                        `position:"Query" name:"ContainerGroupId"`
	ResourceOwnerAccount string                        `position:"Query" name:"ResourceOwnerAccount"`
	OwnerAccount         string                        `position:"Query" name:"OwnerAccount"`
	OwnerId              requests.Integer              `position:"Query" name:"OwnerId"`
	VSwitchId            string                        `position:"Query" name:"VSwitchId"`
	ContainerGroupName   string                        `position:"Query" name:"ContainerGroupName"`
	ZoneId               string                        `position:"Query" name:"ZoneId"`
}

DescribeContainerGroupsRequest is the request struct for api DescribeContainerGroups

func CreateDescribeContainerGroupsRequest

func CreateDescribeContainerGroupsRequest() (request *DescribeContainerGroupsRequest)

CreateDescribeContainerGroupsRequest creates a request to invoke DescribeContainerGroups API

type DescribeContainerGroupsResponse

type DescribeContainerGroupsResponse struct {
	*responses.BaseResponse
	RequestId       string           `json:"RequestId" xml:"RequestId"`
	NextToken       string           `json:"NextToken" xml:"NextToken"`
	TotalCount      int              `json:"TotalCount" xml:"TotalCount"`
	ContainerGroups []ContainerGroup `json:"ContainerGroups" xml:"ContainerGroups"`
}

DescribeContainerGroupsResponse is the response struct for api DescribeContainerGroups

func CreateDescribeContainerGroupsResponse

func CreateDescribeContainerGroupsResponse() (response *DescribeContainerGroupsResponse)

CreateDescribeContainerGroupsResponse creates a response to parse from DescribeContainerGroups response

type DescribeContainerGroupsTag

type DescribeContainerGroupsTag struct {
	Key   string `name:"Key"`
	Value string `name:"Value"`
}

DescribeContainerGroupsTag is a repeated param struct in DescribeContainerGroupsRequest

type DescribeContainerLogRequest

type DescribeContainerLogRequest struct {
	*requests.RpcRequest
	ResourceOwnerId      requests.Integer `position:"Query" name:"ResourceOwnerId"`
	ContainerName        string           `position:"Query" name:"ContainerName"`
	StartTime            string           `position:"Query" name:"StartTime"`
	ContainerGroupId     string           `position:"Query" name:"ContainerGroupId"`
	ResourceOwnerAccount string           `position:"Query" name:"ResourceOwnerAccount"`
	Tail                 requests.Integer `position:"Query" name:"Tail"`
	OwnerAccount         string           `position:"Query" name:"OwnerAccount"`
	OwnerId              requests.Integer `position:"Query" name:"OwnerId"`
}

DescribeContainerLogRequest is the request struct for api DescribeContainerLog

func CreateDescribeContainerLogRequest

func CreateDescribeContainerLogRequest() (request *DescribeContainerLogRequest)

CreateDescribeContainerLogRequest creates a request to invoke DescribeContainerLog API

type DescribeContainerLogResponse

type DescribeContainerLogResponse struct {
	*responses.BaseResponse
	RequestId     string `json:"RequestId" xml:"RequestId"`
	ContainerName string `json:"ContainerName" xml:"ContainerName"`
	Content       string `json:"Content" xml:"Content"`
}

DescribeContainerLogResponse is the response struct for api DescribeContainerLog

func CreateDescribeContainerLogResponse

func CreateDescribeContainerLogResponse() (response *DescribeContainerLogResponse)

CreateDescribeContainerLogResponse creates a response to parse from DescribeContainerLog response

type EnvironmentVar

type EnvironmentVar struct {
	Key   string `name:"Key"`
	Value string `name:"Value"`
}

EnvironmentVar is a nested struct in eci response

type Event

type Event struct {
	Count          int    `json:"Count" xml:"Count"`
	Type           string `json:"Type" xml:"Type"`
	Name           string `json:"Name" xml:"Name"`
	Message        string `json:"Message" xml:"Message"`
	FirstTimestamp string `json:"FirstTimestamp" xml:"FirstTimestamp"`
	LastTimestamp  string `json:"LastTimestamp" xml:"LastTimestamp"`
}

Event is a nested struct in eci response

type ImageRegistryCredential

type ImageRegistryCredential struct {
	Server   string `name:"Server"`
	UserName string `name:"UserName"`
	Password string `name:"Password"`
}

CreateContainerGroupImageRegistryCredential is a repeated param struct in CreateContainerGroupRequest

type Tag

type Tag struct {
	Key   string `name:"Key"`
	Value string `name:"Value"`
}

Label is a nested struct in eci response

type Volume

type Volume struct {
	Type                 string             `name:"Type"`
	Name                 string             `name:"Name"`
	NfsVolumePath        string             `name:"NFSVolume.Path"`
	NfsVolumeServer      string             `name:"NFSVolume.Server"`
	NfsVolumeReadOnly    requests.Boolean   `name:"NFSVolume.ReadOnly"`
	EmptyDirVolumeEnable requests.Boolean   `name:"EmptyDirVolume.Enable"`
	ConfigFileToPaths    []ConfigFileToPath `name:"ConfigFileVolume.ConfigFileToPath" type:"Repeated"`
}

type VolumeMount

type VolumeMount struct {
	MountPath string           `name:"MountPath"`
	ReadOnly  requests.Boolean `name:"ReadOnly"`
	Name      string           `name:"Name"`
}

VolumeMount is a nested struct in eci response

Jump to

Keyboard shortcuts

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