eci

package
v0.7.1 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2018 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 `json:"Content" xml:"Content" position:"Query" name:"Content"`
	Path    string `json:"Path" xml:"Path" position:"Query" name:"Path"`
}

ConfigFileVolumeConfigFileToPath is a nested struct in eci response

type Container

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

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 `json:"Port" xml:"Port" position:"Query" name:"Port"`
	Protocol string           `json:"Protocol" xml:"Protocol" position:"Query" 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           `position:"Query" name:"Name"`
	Image           string           `position:"Query" name:"Image"`
	Memory          requests.Float   `position:"Query" name:"Memory"`
	Cpu             requests.Float   `position:"Query" name:"Cpu"`
	WorkingDir      string           `position:"Query" name:"WorkingDir"`
	ImagePullPolicy string           `position:"Query" name:"ImagePullPolicy"`
	Commands        []string         `position:"Query" name:"Command"  type:"Repeated"`
	Args            []string         `position:"Query" name:"Arg"  type:"Repeated"`
	VolumeMounts    []VolumeMount    `position:"Query" name:"VolumeMount"  type:"Repeated"`
	Ports           []ContainerPort  `position:"Query" name:"Port"  type:"Repeated"`
	EnvironmentVars []EnvironmentVar `position:"Query" name:"EnvironmentVar"  type:"Repeated"`
}

type CreateContainerGroupRequest

type CreateContainerGroupRequest struct {
	*requests.RpcRequest
	Containers               []CreateContainer         `position:"Query" name:"Container"  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 `json:"RequestId" xml:"RequestId"`
	ContainerGroupId string `json:"ContainerGroupId" xml:"ContainerGroupId"`
}

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 `json:"Key" xml:"Key" position:"Query" name:"Key"`
	Value string `json:"Value" xml:"Value" position:"Query" 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 `json:"Key" xml:"Key" position:"Query" name:"Key"`
	Value string `json:"Value" xml:"Value" position:"Query" name:"Value"`
}

Label is a nested struct in eci response

type Volume

type Volume struct {
	Type                              string             `json:"Type" xml:"Type" position:"Query" name:"Type"`
	Name                              string             `json:"Name" xml:"Name" position:"Query" name:"Name"`
	NfsVolumePath                     string             `json:"NfsVolumePath" xml:"NfsVolumePath" position:"Query" name:"NFSVolume.Path"`
	NfsVolumeServer                   string             `json:"NfsVolumeServer" xml:"NfsVolumeServer" position:"Query" name:"NFSVolume.Server"`
	NfsVolumeReadOnly                 requests.Boolean   `json:"NfsVolumeReadOnly" xml:"NfsVolumeReadOnly" position:"Query" name:"NFSVolume.ReadOnly"`
	EmptyDirVolumeEnable              requests.Boolean   `json:"EmptyDirVolumeEnable" xml:"EmptyDirVolumeEnable" position:"Query" name:"EmptyDirVolume.Enable"`
	ConfigFileVolumeConfigFileToPaths []ConfigFileToPath `` /* 138-byte string literal not displayed */
}

type VolumeMount

type VolumeMount struct {
	MountPath string           `json:"MountPath" xml:"MountPath" position:"Query" name:"MountPath"`
	ReadOnly  requests.Boolean `json:"ReadOnly" xml:"ReadOnly" position:"Query" name:"ReadOnly"`
	Name      string           `json:"Name" xml:"Name" position:"Query" 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