wenzuochao %!s(int64=6) %!d(string=hai) anos
pai
achega
5d8d13d139

+ 32 - 0
sdk/requests/acs_request.go

@@ -352,6 +352,38 @@ func flatRepeatedList(dataValue reflect.Value, request AcsRequest, position, pre
 						}
 					}
 				}
+			} else if typeTag == "Struct" {
+				valueField := dataValue.Field(i)
+				if valueField.Kind() == reflect.Struct {
+					if valueField.IsValid() && valueField.String() != "" {
+						valueFieldType := valueField.Type()
+						for m := 0; m < valueFieldType.NumField(); m++ {
+							fieldName := valueFieldType.Field(m).Name
+							elementValue := valueField.FieldByName(fieldName)
+							key := prefix + name + "." + fieldName
+							if elementValue.Type().String() == "[]string" {
+								for j := 0; j < elementValue.Len(); j++ {
+									err = addParam(request, fieldPosition, key+"."+strconv.Itoa(j+1), elementValue.Index(j).String())
+									if err != nil {
+										return
+									}
+								}
+							} else {
+								// 	value := elementValue.String()
+								// 	err = addParam(request, fieldPosition, key, value)
+								// 	if err != nil {
+								// 		return
+								// 	}
+								// } else {
+								// err = flatRepeatedList(elementValue, request, fieldPosition, key+".")
+								// if err != nil {
+								// 	return
+								// }
+								// }
+							}
+						}
+					}
+				}
 			}
 		}
 	}

+ 228 - 0
sdk/requests/acs_request_test.go

@@ -4,6 +4,7 @@ import (
 	"bytes"
 	"fmt"
 	"io"
+	"sort"
 	"testing"
 	"time"
 
@@ -174,6 +175,233 @@ func Test_AcsRequest_InitParams(t *testing.T) {
 	// TODO: check the body & path
 }
 
+// CreateContainerGroupRequest is the request struct for api CreateContainerGroup
+type CreateContainerGroupRequest struct {
+	*RpcRequest
+	OwnerId                 Integer                                         `position:"Query" name:"OwnerId"`
+	ResourceOwnerAccount    string                                          `position:"Query" name:"ResourceOwnerAccount"`
+	ResourceOwnerId         Integer                                         `position:"Query" name:"ResourceOwnerId"`
+	OwnerAccount            string                                          `position:"Query" name:"OwnerAccount"`
+	RegionId                string                                          `position:"Query" name:"RegionId"`
+	ZoneId                  string                                          `position:"Query" name:"ZoneId"`
+	SecurityGroupId         string                                          `position:"Query" name:"SecurityGroupId"`
+	VSwitchId               string                                          `position:"Query" name:"VSwitchId"`
+	ContainerGroupName      string                                          `position:"Query" name:"ContainerGroupName"`
+	RestartPolicy           string                                          `position:"Query" name:"RestartPolicy"`
+	Tag                     *[]CreateContainerGroup_Tag                     `position:"Query" name:"Tag" type:"Repeated"`
+	ImageRegistryCredential *[]CreateContainerGroup_ImageRegistryCredential `position:"Query" name:"ImageRegistryCredential" type:"Repeated"`
+	Container               *[]CreateContainerGroup_Container               `position:"Query" name:"Container" type:"Repeated"`
+	Volume                  *[]CreateContainerGroup_Volume                  `position:"Query" name:"Volume" type:"Repeated"`
+	EipInstanceId           string                                          `position:"Query" name:"EipInstanceId"`
+	InitContainer           *[]CreateContainerGroup_InitContainer           `position:"Query" name:"InitContainer" type:"Repeated"`
+	Cpu                     Float                                           `position:"Query" name:"Cpu"`
+	Memory                  Float                                           `position:"Query" name:"Memory"`
+	DnsConfig               CreateContainerGroup_DnsConfig                  `position:"Query" name:"DnsConfig" type:"Struct"`
+}
+
+type CreateContainerGroup_Tag struct {
+	Key   string `name:"Key"`
+	Value string `name:"Value"`
+}
+
+type CreateContainerGroup_ImageRegistryCredential struct {
+	Server   string `name:"Server"`
+	UserName string `name:"UserName"`
+	Password string `name:"Password"`
+}
+
+type CreateContainerGroup_Container struct {
+	Image           string                                 `name:"Image"`
+	Name            string                                 `name:"Name"`
+	Cpu             Float                                  `name:"Cpu"`
+	Memory          Float                                  `name:"Memory"`
+	WorkingDir      string                                 `name:"WorkingDir"`
+	ImagePullPolicy string                                 `name:"ImagePullPolicy"`
+	Command         []string                               `name:"Command" type:"Repeated"`
+	Arg             []string                               `name:"Arg" type:"Repeated"`
+	VolumeMount     *[]CreateContainerGroup_VolumeMount    `name:"VolumeMount" type:"Repeated"`
+	Port            *[]CreateContainerGroup_Port           `name:"Port" type:"Repeated"`
+	EnvironmentVar  *[]CreateContainerGroup_EnvironmentVar `name:"EnvironmentVar" type:"Repeated"`
+	ReadinessProbe  CreateContainerGroup_ReadinessProbe    `name:"ReadinessProbe" type:"Struct"`
+	LivenessProbe   CreateContainerGroup_LivenessProbe     `name:"LivenessProbe" type:"Struct"`
+	SecurityContext CreateContainerGroup_SecurityContext   `name:"SecurityContext" type:"Struct"`
+}
+
+type CreateContainerGroup_Volume struct {
+	Name             string                                `name:"Name"`
+	Type             string                                `name:"Type"`
+	NFSVolume        CreateContainerGroup_NFSVolume        `name:"NFSVolume"`
+	ConfigFileVolume CreateContainerGroup_ConfigFileVolume `name:"ConfigFileVolume"`
+}
+
+type CreateContainerGroup_InitContainer struct {
+	Name            string                                 `name:"Name"`
+	Image           string                                 `name:"Image"`
+	Cpu             Float                                  `name:"Cpu"`
+	Memory          Float                                  `name:"Memory"`
+	WorkingDir      string                                 `name:"WorkingDir"`
+	ImagePullPolicy string                                 `name:"ImagePullPolicy"`
+	Command         []string                               `name:"Command"`
+	Arg             []string                               `name:"Arg"`
+	VolumeMount     *[]CreateContainerGroup_VolumeMount    `name:"VolumeMount"`
+	Port            *[]CreateContainerGroup_Port           `name:"Port"`
+	EnvironmentVar  *[]CreateContainerGroup_EnvironmentVar `name:"EnvironmentVar"`
+	SecurityContext CreateContainerGroup_SecurityContext   `name:"SecurityContext"`
+}
+
+type CreateContainerGroup_DnsConfig struct {
+	NameServer []string                       `name:"NameServer"`
+	Search     []string                       `name:"Search"`
+	Option     *[]CreateContainerGroup_Option `name:"Option"`
+}
+
+type CreateContainerGroup_VolumeMount struct {
+	MountPath string  `name:"MountPath"`
+	ReadOnly  Boolean `name:"ReadOnly"`
+	Name      string  `name:"Name"`
+}
+
+type CreateContainerGroup_Port struct {
+	Protocol string  `name:"Protocol"`
+	Port     Integer `name:"Port"`
+}
+
+type CreateContainerGroup_EnvironmentVar struct {
+	Key   string `name:"Key"`
+	Value string `name:"Value"`
+}
+
+type CreateContainerGroup_ReadinessProbe struct {
+	InitialDelaySeconds Integer                        `name:"InitialDelaySeconds"`
+	PeriodSeconds       Integer                        `name:"PeriodSeconds"`
+	SuccessThreshold    Integer                        `name:"SuccessThreshold"`
+	FailureThreshold    Integer                        `name:"FailureThreshold"`
+	TimeoutSeconds      Integer                        `name:"TimeoutSeconds"`
+	HttpGet             CreateContainerGroup_HttpGet   `name:"HttpGet"`
+	Exec                CreateContainerGroup_Exec      `name:"Exec"`
+	TcpSocket           CreateContainerGroup_TcpSocket `name:"TcpSocket"`
+}
+
+type CreateContainerGroup_HttpGet struct {
+	Path   string  `name:"Path"`
+	Port   Integer `name:"Port"`
+	Scheme string  `name:"Scheme"`
+}
+
+type CreateContainerGroup_Exec struct {
+	Command []string `name:"Command"`
+}
+
+type CreateContainerGroup_TcpSocket struct {
+	Port Integer `name:"Port"`
+}
+
+type CreateContainerGroup_LivenessProbe struct {
+	InitialDelaySeconds Integer                        `name:"InitialDelaySeconds"`
+	PeriodSeconds       Integer                        `name:"PeriodSeconds"`
+	SuccessThreshold    Integer                        `name:"SuccessThreshold"`
+	FailureThreshold    Integer                        `name:"FailureThreshold"`
+	TimeoutSeconds      Integer                        `name:"TimeoutSeconds"`
+	HttpGet             CreateContainerGroup_HttpGet   `name:"HttpGet"`
+	Exec                CreateContainerGroup_Exec      `name:"Exec"`
+	TcpSocket           CreateContainerGroup_TcpSocket `name:"TcpSocket"`
+}
+
+type CreateContainerGroup_SecurityContext struct {
+	ReadOnlyRootFilesystem Boolean                         `name:"ReadOnlyRootFilesystem"`
+	RunAsUser              Integer                         `name:"RunAsUser"`
+	Capability             CreateContainerGroup_Capability `name:"Capability"`
+}
+
+type CreateContainerGroup_Capability struct {
+	Add []string `name:"Add"`
+}
+
+type CreateContainerGroup_NFSVolume struct {
+	Server   string  `name:"Server"`
+	Path     string  `name:"Path"`
+	ReadOnly Boolean `name:"ReadOnly"`
+}
+
+type CreateContainerGroup_ConfigFileVolume struct {
+	ConfigFileToPath *[]CreateContainerGroup_ConfigFileToPath `name:"ConfigFileToPath"`
+}
+
+type CreateContainerGroup_ConfigFileToPath struct {
+	Content string `name:"Content"`
+	Path    string `name:"Path"`
+}
+
+type CreateContainerGroup_Option struct {
+	Name  string `name:"Name"`
+	Value string `name:"Value"`
+}
+
+func GetQueryString(r *CreateContainerGroupRequest) string {
+	queries := r.GetQueryParams()
+	// To store the keys in slice in sorted order
+	sortedKeys := make([]string, 0)
+	for k := range queries {
+		sortedKeys = append(sortedKeys, k)
+	}
+	sort.Strings(sortedKeys)
+
+	// To perform the opertion you want
+	resultBuilder := bytes.Buffer{}
+	for _, key := range sortedKeys {
+		resultBuilder.WriteString(key + "=" + queries[key] + "&")
+	}
+	return resultBuilder.String()
+}
+
+func InitRequest() (r *CreateContainerGroupRequest) {
+	r = &CreateContainerGroupRequest{
+		RpcRequest: &RpcRequest{},
+	}
+	r.InitWithApiInfo("Eci", "2018-08-08", "CreateContainerGroup", "eci", "openAPI")
+	return
+}
+
+func Test_AcsRequest_InitParams2(t *testing.T) {
+	r := InitRequest()
+	InitParams(r)
+	assert.Equal(t, "", GetQueryString(r))
+}
+
+func Test_AcsRequest_InitParams3(t *testing.T) {
+	r := InitRequest()
+	r.RegionId = "regionid"
+	InitParams(r)
+	assert.Equal(t, "RegionId=regionid&", GetQueryString(r))
+}
+
+func Test_AcsRequest_InitParams4(t *testing.T) {
+	r := InitRequest()
+	r.RegionId = "regionid"
+	r.DnsConfig = CreateContainerGroup_DnsConfig{
+		NameServer: []string{"nameserver1", "nameserver2"},
+	}
+	InitParams(r)
+	assert.Equal(t, "DnsConfig.NameServer.1=nameserver1&DnsConfig.NameServer.2=nameserver2&RegionId=regionid&",
+		GetQueryString(r))
+}
+
+func Test_AcsRequest_InitParams5(t *testing.T) {
+	r := InitRequest()
+	r.Container = &[]CreateContainerGroup_Container{
+		{
+			Image:      "nginx",
+			Name:       "nginx",
+			Cpu:        "1",
+			Memory:     "2",
+			WorkingDir: "ddd",
+		},
+	}
+	InitParams(r)
+	assert.Equal(t, "Container.1.Cpu=1&Container.1.Image=nginx&Container.1.Memory=2&Container.1.Name=nginx&Container.1.WorkingDir=ddd&",
+		GetQueryString(r))
+}
+
 type StartMPUTaskRequest struct {
 	*RpcRequest
 	OwnerId         Integer   `position:"Query" name:"OwnerId"`

+ 104 - 0
services/eci/client.go

@@ -0,0 +1,104 @@
+//Licensed under the Apache License, Version 2.0 (the "License");
+//you may not use this file except in compliance with the License.
+//You may obtain a copy of the License at
+//
+//http://www.apache.org/licenses/LICENSE-2.0
+//
+//Unless required by applicable law or agreed to in writing, software
+//distributed under the License is distributed on an "AS IS" BASIS,
+//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//See the License for the specific language governing permissions and
+//limitations under the License.
+//
+// Code generated by Alibaba Cloud SDK Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+package eci
+
+import (
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk"
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/auth"
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/auth/credentials/provider"
+)
+
+// Client is the sdk client struct, each func corresponds to an OpenAPI
+type Client struct {
+	sdk.Client
+}
+
+// NewClient creates a sdk client with environment variables
+func NewClient() (client *Client, err error) {
+	client = &Client{}
+	err = client.Init()
+	return
+}
+
+// NewClientWithProvider creates a sdk client with providers
+// usage: https://github.com/aliyun/alibaba-cloud-sdk-go/blob/master/docs/2-Client-EN.md
+func NewClientWithProvider(regionId string, providers ...provider.Provider) (client *Client, err error) {
+	client = &Client{}
+	var pc provider.Provider
+	if len(providers) == 0 {
+		pc = provider.DefaultChain
+	} else {
+		pc = provider.NewProviderChain(providers)
+	}
+	err = client.InitWithProviderChain(regionId, pc)
+	return
+}
+
+// NewClientWithOptions creates a sdk client with regionId/sdkConfig/credential
+// this is the common api to create a sdk client
+func NewClientWithOptions(regionId string, config *sdk.Config, credential auth.Credential) (client *Client, err error) {
+	client = &Client{}
+	err = client.InitWithOptions(regionId, config, credential)
+	return
+}
+
+// NewClientWithAccessKey is a shortcut to create sdk client with accesskey
+// usage: https://github.com/aliyun/alibaba-cloud-sdk-go/blob/master/docs/2-Client-EN.md
+func NewClientWithAccessKey(regionId, accessKeyId, accessKeySecret string) (client *Client, err error) {
+	client = &Client{}
+	err = client.InitWithAccessKey(regionId, accessKeyId, accessKeySecret)
+	return
+}
+
+// NewClientWithStsToken is a shortcut to create sdk client with sts token
+// usage: https://github.com/aliyun/alibaba-cloud-sdk-go/blob/master/docs/2-Client-EN.md
+func NewClientWithStsToken(regionId, stsAccessKeyId, stsAccessKeySecret, stsToken string) (client *Client, err error) {
+	client = &Client{}
+	err = client.InitWithStsToken(regionId, stsAccessKeyId, stsAccessKeySecret, stsToken)
+	return
+}
+
+// NewClientWithRamRoleArn is a shortcut to create sdk client with ram roleArn
+// usage: https://github.com/aliyun/alibaba-cloud-sdk-go/blob/master/docs/2-Client-EN.md
+func NewClientWithRamRoleArn(regionId string, accessKeyId, accessKeySecret, roleArn, roleSessionName string) (client *Client, err error) {
+	client = &Client{}
+	err = client.InitWithRamRoleArn(regionId, accessKeyId, accessKeySecret, roleArn, roleSessionName)
+	return
+}
+
+// NewClientWithRamRoleArn is a shortcut to create sdk client with ram roleArn and policy
+// usage: https://github.com/aliyun/alibaba-cloud-sdk-go/blob/master/docs/2-Client-EN.md
+func NewClientWithRamRoleArnAndPolicy(regionId string, accessKeyId, accessKeySecret, roleArn, roleSessionName, policy string) (client *Client, err error) {
+	client = &Client{}
+	err = client.InitWithRamRoleArnAndPolicy(regionId, accessKeyId, accessKeySecret, roleArn, roleSessionName, policy)
+	return
+}
+
+// NewClientWithEcsRamRole is a shortcut to create sdk client with ecs ram role
+// usage: https://github.com/aliyun/alibaba-cloud-sdk-go/blob/master/docs/2-Client-EN.md
+func NewClientWithEcsRamRole(regionId string, roleName string) (client *Client, err error) {
+	client = &Client{}
+	err = client.InitWithEcsRamRole(regionId, roleName)
+	return
+}
+
+// NewClientWithRsaKeyPair is a shortcut to create sdk client with rsa key pair
+// usage: https://github.com/aliyun/alibaba-cloud-sdk-go/blob/master/docs/2-Client-EN.md
+func NewClientWithRsaKeyPair(regionId string, publicKeyId, privateKey string, sessionExpiration int) (client *Client, err error) {
+	client = &Client{}
+	err = client.InitWithRsaKeyPair(regionId, publicKeyId, privateKey, sessionExpiration)
+	return
+}

+ 296 - 0
services/eci/create_container_group.go

@@ -0,0 +1,296 @@
+//Licensed under the Apache License, Version 2.0 (the "License");
+//you may not use this file except in compliance with the License.
+//You may obtain a copy of the License at
+//
+//http://www.apache.org/licenses/LICENSE-2.0
+//
+//Unless required by applicable law or agreed to in writing, software
+//distributed under the License is distributed on an "AS IS" BASIS,
+//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//See the License for the specific language governing permissions and
+//limitations under the License.
+//
+// Code generated by Alibaba Cloud SDK Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+package eci
+
+import (
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
+)
+
+// CreateContainerGroup invokes the eci.CreateContainerGroup API synchronously
+// api document: https://help.aliyun.com/api/eci/createcontainergroup.html
+func (client *Client) CreateContainerGroup(request *CreateContainerGroupRequest) (response *CreateContainerGroupResponse, err error) {
+	response = CreateCreateContainerGroupResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// 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 *Client) CreateContainerGroupWithChan(request *CreateContainerGroupRequest) (<-chan *CreateContainerGroupResponse, <-chan error) {
+	responseChan := make(chan *CreateContainerGroupResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.CreateContainerGroup(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// 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 *Client) CreateContainerGroupWithCallback(request *CreateContainerGroupRequest, callback func(response *CreateContainerGroupResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *CreateContainerGroupResponse
+		var err error
+		defer close(result)
+		response, err = client.CreateContainerGroup(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// CreateContainerGroupRequest is the request struct for api CreateContainerGroup
+type CreateContainerGroupRequest struct {
+	*requests.RpcRequest
+	OwnerId                 requests.Integer                               `position:"Query" name:"OwnerId"`
+	ResourceOwnerAccount    string                                         `position:"Query" name:"ResourceOwnerAccount"`
+	ResourceOwnerId         requests.Integer                               `position:"Query" name:"ResourceOwnerId"`
+	OwnerAccount            string                                         `position:"Query" name:"OwnerAccount"`
+	RegionId                string                                         `position:"Query" name:"RegionId"`
+	ZoneId                  string                                         `position:"Query" name:"ZoneId"`
+	SecurityGroupId         string                                         `position:"Query" name:"SecurityGroupId"`
+	VSwitchId               string                                         `position:"Query" name:"VSwitchId"`
+	ContainerGroupName      string                                         `position:"Query" name:"ContainerGroupName"`
+	RestartPolicy           string                                         `position:"Query" name:"RestartPolicy"`
+	Tag                     *[]CreateContainerGroupTag                     `position:"Query" name:"Tag" type:"Repeated"`
+	ImageRegistryCredential *[]CreateContainerGroupImageRegistryCredential `position:"Query" name:"ImageRegistryCredential" type:"Repeated"`
+	Container               *[]CreateContainerGroupContainer               `position:"Query" name:"Container" type:"Repeated"`
+	Volume                  *[]CreateContainerGroupVolume                  `position:"Query" name:"Volume" type:"Repeated"`
+	EipInstanceId           string                                         `position:"Query" name:"EipInstanceId"`
+	InitContainer           *[]CreateContainerGroupInitContainer           `position:"Query" name:"InitContainer" type:"Repeated"`
+	Cpu                     requests.Float                                 `position:"Query" name:"Cpu"`
+	Memory                  requests.Float                                 `position:"Query" name:"Memory"`
+	ResourceGroupId         string                                         `position:"Query" name:"ResourceGroupId"`
+	DnsPolicy               string                                         `position:"Query" name:"DnsPolicy"`
+	ClientToken             string                                         `position:"Query" name:"ClientToken"`
+	HostAliase              *[]CreateContainerGroupHostAliase              `position:"Query" name:"HostAliase" type:"Repeated"`
+	Arn                     *[]CreateContainerGroupArn                     `position:"Query" name:"Arn" type:"Repeated"`
+	InstanceType            string                                         `position:"Query" name:"InstanceType"`
+	SlsEnable               requests.Boolean                               `position:"Query" name:"SlsEnable"`
+	DnsConfig               CreateContainerGroupDnsConfig                  `position:"Query" name:"DnsConfig" type:"Struct"`
+	SecurityContext         CreateContainerGroupSecurityContext            `position:"Query" name:"SecurityContext" type:"Struct"`
+}
+
+type CreateContainerGroupTag struct {
+	Key   string `name:"Key"`
+	Value string `name:"Value"`
+}
+
+type CreateContainerGroupImageRegistryCredential struct {
+	Server   string `name:"Server"`
+	UserName string `name:"UserName"`
+	Password string `name:"Password"`
+}
+
+type CreateContainerGroupContainer struct {
+	Image           string                                `name:"Image"`
+	Name            string                                `name:"Name"`
+	Cpu             requests.Float                        `name:"Cpu"`
+	Memory          requests.Float                        `name:"Memory"`
+	WorkingDir      string                                `name:"WorkingDir"`
+	ImagePullPolicy string                                `name:"ImagePullPolicy"`
+	Command         []string                              `name:"Command" type:"Repeated"`
+	Arg             []string                              `name:"Arg" type:"Repeated"`
+	VolumeMount     *[]CreateContainerGroupVolumeMount    `name:"VolumeMount" type:"Repeated"`
+	Port            *[]CreateContainerGroupPort           `name:"Port" type:"Repeated"`
+	EnvironmentVar  *[]CreateContainerGroupEnvironmentVar `name:"EnvironmentVar" type:"Repeated"`
+	Stdin           requests.Boolean                      `name:"Stdin"`
+	StdinOnce       requests.Boolean                      `name:"StdinOnce"`
+	Tty             requests.Boolean                      `name:"Tty"`
+	Gpu             requests.Integer                      `name:"Gpu"`
+	ReadinessProbe  CreateContainerGroupReadinessProbe    `name:"ReadinessProbe" type:"Struct"`
+	LivenessProbe   CreateContainerGroupLivenessProbe     `name:"LivenessProbe" type:"Struct"`
+	SecurityContext CreateContainerGroupSecurityContext   `name:"SecurityContext" type:"Struct"`
+}
+
+type CreateContainerGroupVolume struct {
+	Name             string                               `name:"Name"`
+	Type             string                               `name:"Type"`
+	NFSVolume        CreateContainerGroupNFSVolume        `name:"NFSVolume" type:"Struct"`
+	ConfigFileVolume CreateContainerGroupConfigFileVolume `name:"ConfigFileVolume" type:"Struct"`
+	EmptyDirVolume   CreateContainerGroupEmptyDirVolume   `name:"EmptyDirVolume" type:"Struct"`
+}
+
+type CreateContainerGroupInitContainer struct {
+	Name            string                                `name:"Name"`
+	Image           string                                `name:"Image"`
+	Cpu             requests.Float                        `name:"Cpu"`
+	Memory          requests.Float                        `name:"Memory"`
+	WorkingDir      string                                `name:"WorkingDir"`
+	ImagePullPolicy string                                `name:"ImagePullPolicy"`
+	Command         []string                              `name:"Command" type:"Repeated"`
+	Arg             []string                              `name:"Arg" type:"Repeated"`
+	VolumeMount     *[]CreateContainerGroupVolumeMount    `name:"VolumeMount" type:"Repeated"`
+	Port            *[]CreateContainerGroupPort           `name:"Port" type:"Repeated"`
+	EnvironmentVar  *[]CreateContainerGroupEnvironmentVar `name:"EnvironmentVar" type:"Repeated"`
+	Gpu             requests.Integer                      `name:"Gpu"`
+	SecurityContext CreateContainerGroupSecurityContext   `name:"SecurityContext" type:"Struct"`
+}
+
+type CreateContainerGroupHostAliase struct {
+	Ip       string   `name:"Ip"`
+	Hostname []string `name:"Hostname" type:"Repeated"`
+}
+
+type CreateContainerGroupArn struct {
+	RoleArn       string `name:"RoleArn"`
+	RoleType      string `name:"RoleType"`
+	AssumeRoleFor string `name:"AssumeRoleFor"`
+}
+
+type CreateContainerGroupDnsConfig struct {
+	NameServer []string                      `name:"NameServer"`
+	Search     []string                      `name:"Search"`
+	Option     *[]CreateContainerGroupOption `name:"Option"`
+}
+
+type CreateContainerGroupSecurityContext struct {
+	Sysctl *[]CreateContainerGroupSysctl `name:"Sysctl"`
+}
+
+type CreateContainerGroupVolumeMount struct {
+	MountPath string           `name:"MountPath"`
+	ReadOnly  requests.Boolean `name:"ReadOnly"`
+	Name      string           `name:"Name"`
+	SubPath   string           `name:"SubPath"`
+}
+
+type CreateContainerGroupPort struct {
+	Protocol string           `name:"Protocol"`
+	Port     requests.Integer `name:"Port"`
+}
+
+type CreateContainerGroupEnvironmentVar struct {
+	Key      string                       `name:"Key"`
+	Value    string                       `name:"Value"`
+	FieldRef CreateContainerGroupFieldRef `name:"FieldRef" type:"Struct"`
+}
+
+type CreateContainerGroupFieldRef struct {
+	FieldPath string `name:"FieldPath"`
+}
+
+type CreateContainerGroupReadinessProbe struct {
+	InitialDelaySeconds requests.Integer              `name:"InitialDelaySeconds"`
+	PeriodSeconds       requests.Integer              `name:"PeriodSeconds"`
+	SuccessThreshold    requests.Integer              `name:"SuccessThreshold"`
+	FailureThreshold    requests.Integer              `name:"FailureThreshold"`
+	TimeoutSeconds      requests.Integer              `name:"TimeoutSeconds"`
+	HttpGet             CreateContainerGroupHttpGet   `name:"HttpGet"`
+	Exec                CreateContainerGroupExec      `name:"Exec"`
+	TcpSocket           CreateContainerGroupTcpSocket `name:"TcpSocket"`
+}
+
+type CreateContainerGroupHttpGet struct {
+	Path   string           `name:"Path"`
+	Port   requests.Integer `name:"Port"`
+	Scheme string           `name:"Scheme"`
+}
+
+type CreateContainerGroupExec struct {
+	Command []string `name:"Command"`
+}
+
+type CreateContainerGroupTcpSocket struct {
+	Port requests.Integer `name:"Port"`
+}
+
+type CreateContainerGroupLivenessProbe struct {
+	InitialDelaySeconds requests.Integer              `name:"InitialDelaySeconds"`
+	PeriodSeconds       requests.Integer              `name:"PeriodSeconds"`
+	SuccessThreshold    requests.Integer              `name:"SuccessThreshold"`
+	FailureThreshold    requests.Integer              `name:"FailureThreshold"`
+	TimeoutSeconds      requests.Integer              `name:"TimeoutSeconds"`
+	HttpGet             CreateContainerGroupHttpGet   `name:"HttpGet"`
+	Exec                CreateContainerGroupExec      `name:"Exec"`
+	TcpSocket           CreateContainerGroupTcpSocket `name:"TcpSocket"`
+}
+
+type CreateContainerGroupNFSVolume struct {
+	Server   string           `name:"Server"`
+	Path     string           `name:"Path"`
+	ReadOnly requests.Boolean `name:"ReadOnly"`
+}
+
+type CreateContainerGroupConfigFileVolume struct {
+	ConfigFileToPath *[]CreateContainerGroupConfigFileToPath `name:"ConfigFileToPath"`
+	DefaultModel     requests.Integer                        `name:"DefaultModel"`
+}
+
+type CreateContainerGroupConfigFileToPath struct {
+	Content string           `name:"Content"`
+	Path    string           `name:"Path"`
+	Mode    requests.Integer `name:"Mode"`
+}
+
+type CreateContainerGroupEmptyDirVolume struct {
+	Medium string `name:"Medium"`
+}
+
+type CreateContainerGroupOption struct {
+	Name  string `name:"Name"`
+	Value string `name:"Value"`
+}
+
+type CreateContainerGroupSysctl struct {
+	Name  string `name:"Name"`
+	Value string `name:"Value"`
+}
+
+// CreateContainerGroupResponse is the response struct for api CreateContainerGroup
+type CreateContainerGroupResponse struct {
+	*responses.BaseResponse
+	RequestId        string `json:"RequestId" xml:"RequestId"`
+	ContainerGroupId string `json:"ContainerGroupId" xml:"ContainerGroupId"`
+}
+
+// CreateCreateContainerGroupRequest creates a request to invoke CreateContainerGroup API
+func CreateCreateContainerGroupRequest() (request *CreateContainerGroupRequest) {
+	request = &CreateContainerGroupRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("Eci", "2018-08-08", "CreateContainerGroup", "eci", "openAPI")
+	return
+}
+
+// CreateCreateContainerGroupResponse creates a response to parse from CreateContainerGroup response
+func CreateCreateContainerGroupResponse() (response *CreateContainerGroupResponse) {
+	response = &CreateContainerGroupResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 110 - 0
services/eci/create_container_group_from_template.go

@@ -0,0 +1,110 @@
+//Licensed under the Apache License, Version 2.0 (the "License");
+//you may not use this file except in compliance with the License.
+//You may obtain a copy of the License at
+//
+//http://www.apache.org/licenses/LICENSE-2.0
+//
+//Unless required by applicable law or agreed to in writing, software
+//distributed under the License is distributed on an "AS IS" BASIS,
+//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//See the License for the specific language governing permissions and
+//limitations under the License.
+//
+// Code generated by Alibaba Cloud SDK Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+package eci
+
+import (
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
+)
+
+// CreateContainerGroupFromTemplate invokes the eci.CreateContainerGroupFromTemplate API synchronously
+// api document: https://help.aliyun.com/api/eci/createcontainergroupfromtemplate.html
+func (client *Client) CreateContainerGroupFromTemplate(request *CreateContainerGroupFromTemplateRequest) (response *CreateContainerGroupFromTemplateResponse, err error) {
+	response = CreateCreateContainerGroupFromTemplateResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// CreateContainerGroupFromTemplateWithChan invokes the eci.CreateContainerGroupFromTemplate API asynchronously
+// api document: https://help.aliyun.com/api/eci/createcontainergroupfromtemplate.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) CreateContainerGroupFromTemplateWithChan(request *CreateContainerGroupFromTemplateRequest) (<-chan *CreateContainerGroupFromTemplateResponse, <-chan error) {
+	responseChan := make(chan *CreateContainerGroupFromTemplateResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.CreateContainerGroupFromTemplate(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// CreateContainerGroupFromTemplateWithCallback invokes the eci.CreateContainerGroupFromTemplate API asynchronously
+// api document: https://help.aliyun.com/api/eci/createcontainergroupfromtemplate.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) CreateContainerGroupFromTemplateWithCallback(request *CreateContainerGroupFromTemplateRequest, callback func(response *CreateContainerGroupFromTemplateResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *CreateContainerGroupFromTemplateResponse
+		var err error
+		defer close(result)
+		response, err = client.CreateContainerGroupFromTemplate(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// CreateContainerGroupFromTemplateRequest is the request struct for api CreateContainerGroupFromTemplate
+type CreateContainerGroupFromTemplateRequest struct {
+	*requests.RpcRequest
+	OwnerId              requests.Integer `position:"Query" name:"OwnerId"`
+	ResourceOwnerAccount string           `position:"Query" name:"ResourceOwnerAccount"`
+	ResourceOwnerId      requests.Integer `position:"Query" name:"ResourceOwnerId"`
+	OwnerAccount         string           `position:"Query" name:"OwnerAccount"`
+	RegionId             string           `position:"Query" name:"RegionId"`
+	Template             string           `position:"Body" name:"Template"`
+	ClientToken          string           `position:"Query" name:"ClientToken"`
+}
+
+// CreateContainerGroupFromTemplateResponse is the response struct for api CreateContainerGroupFromTemplate
+type CreateContainerGroupFromTemplateResponse struct {
+	*responses.BaseResponse
+	RequestId        string `json:"RequestId" xml:"RequestId"`
+	ContainerGroupId string `json:"ContainerGroupId" xml:"ContainerGroupId"`
+}
+
+// CreateCreateContainerGroupFromTemplateRequest creates a request to invoke CreateContainerGroupFromTemplate API
+func CreateCreateContainerGroupFromTemplateRequest() (request *CreateContainerGroupFromTemplateRequest) {
+	request = &CreateContainerGroupFromTemplateRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("Eci", "2018-08-08", "CreateContainerGroupFromTemplate", "eci", "openAPI")
+	return
+}
+
+// CreateCreateContainerGroupFromTemplateResponse creates a response to parse from CreateContainerGroupFromTemplate response
+func CreateCreateContainerGroupFromTemplateResponse() (response *CreateContainerGroupFromTemplateResponse) {
+	response = &CreateContainerGroupFromTemplateResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 109 - 0
services/eci/delete_container_group.go

@@ -0,0 +1,109 @@
+//Licensed under the Apache License, Version 2.0 (the "License");
+//you may not use this file except in compliance with the License.
+//You may obtain a copy of the License at
+//
+//http://www.apache.org/licenses/LICENSE-2.0
+//
+//Unless required by applicable law or agreed to in writing, software
+//distributed under the License is distributed on an "AS IS" BASIS,
+//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//See the License for the specific language governing permissions and
+//limitations under the License.
+//
+// Code generated by Alibaba Cloud SDK Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+package eci
+
+import (
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
+)
+
+// DeleteContainerGroup invokes the eci.DeleteContainerGroup API synchronously
+// api document: https://help.aliyun.com/api/eci/deletecontainergroup.html
+func (client *Client) DeleteContainerGroup(request *DeleteContainerGroupRequest) (response *DeleteContainerGroupResponse, err error) {
+	response = CreateDeleteContainerGroupResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// 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 *Client) DeleteContainerGroupWithChan(request *DeleteContainerGroupRequest) (<-chan *DeleteContainerGroupResponse, <-chan error) {
+	responseChan := make(chan *DeleteContainerGroupResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.DeleteContainerGroup(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// 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 *Client) DeleteContainerGroupWithCallback(request *DeleteContainerGroupRequest, callback func(response *DeleteContainerGroupResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *DeleteContainerGroupResponse
+		var err error
+		defer close(result)
+		response, err = client.DeleteContainerGroup(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// DeleteContainerGroupRequest is the request struct for api DeleteContainerGroup
+type DeleteContainerGroupRequest struct {
+	*requests.RpcRequest
+	OwnerId              requests.Integer `position:"Query" name:"OwnerId"`
+	ResourceOwnerAccount string           `position:"Query" name:"ResourceOwnerAccount"`
+	ResourceOwnerId      requests.Integer `position:"Query" name:"ResourceOwnerId"`
+	OwnerAccount         string           `position:"Query" name:"OwnerAccount"`
+	RegionId             string           `position:"Query" name:"RegionId"`
+	ContainerGroupId     string           `position:"Query" name:"ContainerGroupId"`
+	ClientToken          string           `position:"Query" name:"ClientToken"`
+}
+
+// DeleteContainerGroupResponse is the response struct for api DeleteContainerGroup
+type DeleteContainerGroupResponse struct {
+	*responses.BaseResponse
+	RequestId string `json:"RequestId" xml:"RequestId"`
+}
+
+// CreateDeleteContainerGroupRequest creates a request to invoke DeleteContainerGroup API
+func CreateDeleteContainerGroupRequest() (request *DeleteContainerGroupRequest) {
+	request = &DeleteContainerGroupRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("Eci", "2018-08-08", "DeleteContainerGroup", "eci", "openAPI")
+	return
+}
+
+// CreateDeleteContainerGroupResponse creates a response to parse from DeleteContainerGroup response
+func CreateDeleteContainerGroupResponse() (response *DeleteContainerGroupResponse) {
+	response = &DeleteContainerGroupResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 181 - 0
services/eci/describe_container_group_metric.go

@@ -0,0 +1,181 @@
+//Licensed under the Apache License, Version 2.0 (the "License");
+//you may not use this file except in compliance with the License.
+//You may obtain a copy of the License at
+//
+//http://www.apache.org/licenses/LICENSE-2.0
+//
+//Unless required by applicable law or agreed to in writing, software
+//distributed under the License is distributed on an "AS IS" BASIS,
+//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//See the License for the specific language governing permissions and
+//limitations under the License.
+//
+// Code generated by Alibaba Cloud SDK Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+package eci
+
+import (
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
+)
+
+// DescribeContainerGroupMetric invokes the eci.DescribeContainerGroupMetric API synchronously
+// api document: https://help.aliyun.com/api/eci/describecontainergroupmetric.html
+func (client *Client) DescribeContainerGroupMetric(request *DescribeContainerGroupMetricRequest) (response *DescribeContainerGroupMetricResponse, err error) {
+	response = CreateDescribeContainerGroupMetricResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// DescribeContainerGroupMetricWithChan invokes the eci.DescribeContainerGroupMetric API asynchronously
+// api document: https://help.aliyun.com/api/eci/describecontainergroupmetric.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) DescribeContainerGroupMetricWithChan(request *DescribeContainerGroupMetricRequest) (<-chan *DescribeContainerGroupMetricResponse, <-chan error) {
+	responseChan := make(chan *DescribeContainerGroupMetricResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.DescribeContainerGroupMetric(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// DescribeContainerGroupMetricWithCallback invokes the eci.DescribeContainerGroupMetric API asynchronously
+// api document: https://help.aliyun.com/api/eci/describecontainergroupmetric.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) DescribeContainerGroupMetricWithCallback(request *DescribeContainerGroupMetricRequest, callback func(response *DescribeContainerGroupMetricResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *DescribeContainerGroupMetricResponse
+		var err error
+		defer close(result)
+		response, err = client.DescribeContainerGroupMetric(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// DescribeContainerGroupMetricRequest is the request struct for api DescribeContainerGroupMetric
+type DescribeContainerGroupMetricRequest struct {
+	*requests.RpcRequest
+	OwnerId              requests.Integer `position:"Query" name:"OwnerId"`
+	ResourceOwnerAccount string           `position:"Query" name:"ResourceOwnerAccount"`
+	ResourceOwnerId      requests.Integer `position:"Query" name:"ResourceOwnerId"`
+	OwnerAccount         string           `position:"Query" name:"OwnerAccount"`
+	RegionId             string           `position:"Query" name:"RegionId"`
+	ContainerGroupId     string           `position:"Query" name:"ContainerGroupId"`
+	StartTime            string           `position:"Query" name:"StartTime"`
+	EndTime              string           `position:"Query" name:"EndTime"`
+	Period               string           `position:"Query" name:"Period"`
+}
+
+// DescribeContainerGroupMetricResponse is the response struct for api DescribeContainerGroupMetric
+type DescribeContainerGroupMetricResponse struct {
+	*responses.BaseResponse
+	RequestId        string                                 `json:"RequestId" xml:"RequestId"`
+	ContainerGroupId string                                 `json:"ContainerGroupId" xml:"ContainerGroupId"`
+	Records          []DescribeContainerGroupMetricRecords0 `json:"Records" xml:"Records"`
+}
+
+type DescribeContainerGroupMetricRecords0 struct {
+	Record []DescribeContainerGroupMetricRecord1 `json:"Record" xml:"Record"`
+}
+
+type DescribeContainerGroupMetricRecord1 struct {
+	Timestamp  string                                    `json:"Timestamp" xml:"Timestamp"`
+	Containers []DescribeContainerGroupMetricContainers1 `json:"Containers" xml:"Containers"`
+	CPU        DescribeContainerGroupMetricCPU1          `json:"CPU" xml:"CPU"`
+	Memory     DescribeContainerGroupMetricMemory1       `json:"Memory" xml:"Memory"`
+	Network    DescribeContainerGroupMetricNetwork1      `json:"Network" xml:"Network"`
+}
+
+type DescribeContainerGroupMetricContainers1 struct {
+	Container []DescribeContainerGroupMetricContainer2 `json:"Container" xml:"Container"`
+}
+
+type DescribeContainerGroupMetricContainer2 struct {
+	Name   string                              `json:"Name" xml:"Name"`
+	CPU    DescribeContainerGroupMetricCPU2    `json:"CPU" xml:"CPU"`
+	Memory DescribeContainerGroupMetricMemory2 `json:"Memory" xml:"Memory"`
+}
+
+type DescribeContainerGroupMetricCPU2 struct {
+	UsageNanoCores       int64 `json:"UsageNanoCores" xml:"UsageNanoCores"`
+	UsageCoreNanoSeconds int64 `json:"UsageCoreNanoSeconds" xml:"UsageCoreNanoSeconds"`
+	Load                 int64 `json:"Load" xml:"Load"`
+	Limit                int64 `json:"Limit" xml:"Limit"`
+}
+
+type DescribeContainerGroupMetricMemory2 struct {
+	AvailableBytes int64 `json:"AvailableBytes" xml:"AvailableBytes"`
+	UsageBytes     int64 `json:"UsageBytes" xml:"UsageBytes"`
+	Cache          int64 `json:"Cache" xml:"Cache"`
+	WorkingSet     int64 `json:"WorkingSet" xml:"WorkingSet"`
+	Rss            int64 `json:"Rss" xml:"Rss"`
+}
+
+type DescribeContainerGroupMetricCPU1 struct {
+	UsageNanoCores       int64 `json:"UsageNanoCores" xml:"UsageNanoCores"`
+	UsageCoreNanoSeconds int64 `json:"UsageCoreNanoSeconds" xml:"UsageCoreNanoSeconds"`
+	Load                 int64 `json:"Load" xml:"Load"`
+	Limit                int64 `json:"Limit" xml:"Limit"`
+}
+
+type DescribeContainerGroupMetricMemory1 struct {
+	AvailableBytes int64 `json:"AvailableBytes" xml:"AvailableBytes"`
+	UsageBytes     int64 `json:"UsageBytes" xml:"UsageBytes"`
+	Cache          int64 `json:"Cache" xml:"Cache"`
+	WorkingSet     int64 `json:"WorkingSet" xml:"WorkingSet"`
+	Rss            int64 `json:"Rss" xml:"Rss"`
+}
+
+type DescribeContainerGroupMetricNetwork1 struct {
+	Interfaces []DescribeContainerGroupMetricInterfaces2 `json:"Interfaces" xml:"Interfaces"`
+}
+
+type DescribeContainerGroupMetricInterfaces2 struct {
+	Interface []DescribeContainerGroupMetricInterface3 `json:"Interface" xml:"Interface"`
+}
+
+type DescribeContainerGroupMetricInterface3 struct {
+	TxBytes  int64  `json:"TxBytes" xml:"TxBytes"`
+	RxBytes  int64  `json:"RxBytes" xml:"RxBytes"`
+	TxErrors int64  `json:"TxErrors" xml:"TxErrors"`
+	RxErrors int64  `json:"RxErrors" xml:"RxErrors"`
+	Name     string `json:"Name" xml:"Name"`
+}
+
+// CreateDescribeContainerGroupMetricRequest creates a request to invoke DescribeContainerGroupMetric API
+func CreateDescribeContainerGroupMetricRequest() (request *DescribeContainerGroupMetricRequest) {
+	request = &DescribeContainerGroupMetricRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("Eci", "2018-08-08", "DescribeContainerGroupMetric", "eci", "openAPI")
+	return
+}
+
+// CreateDescribeContainerGroupMetricResponse creates a response to parse from DescribeContainerGroupMetric response
+func CreateDescribeContainerGroupMetricResponse() (response *DescribeContainerGroupMetricResponse) {
+	response = &DescribeContainerGroupMetricResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 153 - 0
services/eci/describe_container_group_price.go

@@ -0,0 +1,153 @@
+//Licensed under the Apache License, Version 2.0 (the "License");
+//you may not use this file except in compliance with the License.
+//You may obtain a copy of the License at
+//
+//http://www.apache.org/licenses/LICENSE-2.0
+//
+//Unless required by applicable law or agreed to in writing, software
+//distributed under the License is distributed on an "AS IS" BASIS,
+//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//See the License for the specific language governing permissions and
+//limitations under the License.
+//
+// Code generated by Alibaba Cloud SDK Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+package eci
+
+import (
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
+)
+
+// DescribeContainerGroupPrice invokes the eci.DescribeContainerGroupPrice API synchronously
+// api document: https://help.aliyun.com/api/eci/describecontainergroupprice.html
+func (client *Client) DescribeContainerGroupPrice(request *DescribeContainerGroupPriceRequest) (response *DescribeContainerGroupPriceResponse, err error) {
+	response = CreateDescribeContainerGroupPriceResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// DescribeContainerGroupPriceWithChan invokes the eci.DescribeContainerGroupPrice API asynchronously
+// api document: https://help.aliyun.com/api/eci/describecontainergroupprice.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) DescribeContainerGroupPriceWithChan(request *DescribeContainerGroupPriceRequest) (<-chan *DescribeContainerGroupPriceResponse, <-chan error) {
+	responseChan := make(chan *DescribeContainerGroupPriceResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.DescribeContainerGroupPrice(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// DescribeContainerGroupPriceWithCallback invokes the eci.DescribeContainerGroupPrice API asynchronously
+// api document: https://help.aliyun.com/api/eci/describecontainergroupprice.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) DescribeContainerGroupPriceWithCallback(request *DescribeContainerGroupPriceRequest, callback func(response *DescribeContainerGroupPriceResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *DescribeContainerGroupPriceResponse
+		var err error
+		defer close(result)
+		response, err = client.DescribeContainerGroupPrice(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// DescribeContainerGroupPriceRequest is the request struct for api DescribeContainerGroupPrice
+type DescribeContainerGroupPriceRequest struct {
+	*requests.RpcRequest
+	OwnerId              requests.Integer `position:"Query" name:"OwnerId"`
+	ResourceOwnerAccount string           `position:"Query" name:"ResourceOwnerAccount"`
+	ResourceOwnerId      requests.Integer `position:"Query" name:"ResourceOwnerId"`
+	OwnerAccount         string           `position:"Query" name:"OwnerAccount"`
+	RegionId             string           `position:"Query" name:"RegionId"`
+	Cpu                  requests.Float   `position:"Query" name:"Cpu"`
+	Memory               requests.Float   `position:"Query" name:"Memory"`
+}
+
+// DescribeContainerGroupPriceResponse is the response struct for api DescribeContainerGroupPrice
+type DescribeContainerGroupPriceResponse struct {
+	*responses.BaseResponse
+	RequestId string                                `json:"RequestId" xml:"RequestId"`
+	PriceInfo DescribeContainerGroupPricePriceInfo0 `json:"PriceInfo" xml:"PriceInfo"`
+}
+
+type DescribeContainerGroupPricePriceInfo0 struct {
+	Rules []DescribeContainerGroupPriceRules1 `json:"Rules" xml:"Rules"`
+	Price DescribeContainerGroupPricePrice1   `json:"Price" xml:"Price"`
+}
+
+type DescribeContainerGroupPriceRules1 struct {
+	Rule []DescribeContainerGroupPriceRule2 `json:"Rule" xml:"Rule"`
+}
+
+type DescribeContainerGroupPriceRule2 struct {
+	RuleId      int64  `json:"RuleId" xml:"RuleId"`
+	Description string `json:"Description" xml:"Description"`
+}
+
+type DescribeContainerGroupPricePrice1 struct {
+	OriginalPrice float32                                   `json:"OriginalPrice" xml:"OriginalPrice"`
+	DiscountPrice float32                                   `json:"DiscountPrice" xml:"DiscountPrice"`
+	TradePrice    float32                                   `json:"TradePrice" xml:"TradePrice"`
+	Currency      string                                    `json:"Currency" xml:"Currency"`
+	DetailInfos   []DescribeContainerGroupPriceDetailInfos2 `json:"DetailInfos" xml:"DetailInfos"`
+}
+
+type DescribeContainerGroupPriceDetailInfos2 struct {
+	DetailInfo []DescribeContainerGroupPriceDetailInfo3 `json:"DetailInfo" xml:"DetailInfo"`
+}
+
+type DescribeContainerGroupPriceDetailInfo3 struct {
+	Resource      string                              `json:"Resource" xml:"Resource"`
+	OriginalPrice float32                             `json:"OriginalPrice" xml:"OriginalPrice"`
+	DiscountPrice float32                             `json:"DiscountPrice" xml:"DiscountPrice"`
+	TradePrice    float32                             `json:"TradePrice" xml:"TradePrice"`
+	Rules         []DescribeContainerGroupPriceRules3 `json:"Rules" xml:"Rules"`
+}
+
+type DescribeContainerGroupPriceRules3 struct {
+	Rule []DescribeContainerGroupPriceRule4 `json:"Rule" xml:"Rule"`
+}
+
+type DescribeContainerGroupPriceRule4 struct {
+	RuleId      int64  `json:"RuleId" xml:"RuleId"`
+	Description string `json:"Description" xml:"Description"`
+}
+
+// CreateDescribeContainerGroupPriceRequest creates a request to invoke DescribeContainerGroupPrice API
+func CreateDescribeContainerGroupPriceRequest() (request *DescribeContainerGroupPriceRequest) {
+	request = &DescribeContainerGroupPriceRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("Eci", "2018-08-08", "DescribeContainerGroupPrice", "eci", "openAPI")
+	return
+}
+
+// CreateDescribeContainerGroupPriceResponse creates a response to parse from DescribeContainerGroupPrice response
+func CreateDescribeContainerGroupPriceResponse() (response *DescribeContainerGroupPriceResponse) {
+	response = &DescribeContainerGroupPriceResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 370 - 0
services/eci/describe_container_groups.go

@@ -0,0 +1,370 @@
+//Licensed under the Apache License, Version 2.0 (the "License");
+//you may not use this file except in compliance with the License.
+//You may obtain a copy of the License at
+//
+//http://www.apache.org/licenses/LICENSE-2.0
+//
+//Unless required by applicable law or agreed to in writing, software
+//distributed under the License is distributed on an "AS IS" BASIS,
+//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//See the License for the specific language governing permissions and
+//limitations under the License.
+//
+// Code generated by Alibaba Cloud SDK Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+package eci
+
+import (
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
+)
+
+// DescribeContainerGroups invokes the eci.DescribeContainerGroups API synchronously
+// api document: https://help.aliyun.com/api/eci/describecontainergroups.html
+func (client *Client) DescribeContainerGroups(request *DescribeContainerGroupsRequest) (response *DescribeContainerGroupsResponse, err error) {
+	response = CreateDescribeContainerGroupsResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// 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 *Client) DescribeContainerGroupsWithChan(request *DescribeContainerGroupsRequest) (<-chan *DescribeContainerGroupsResponse, <-chan error) {
+	responseChan := make(chan *DescribeContainerGroupsResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.DescribeContainerGroups(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// 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 *Client) DescribeContainerGroupsWithCallback(request *DescribeContainerGroupsRequest, callback func(response *DescribeContainerGroupsResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *DescribeContainerGroupsResponse
+		var err error
+		defer close(result)
+		response, err = client.DescribeContainerGroups(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// DescribeContainerGroupsRequest is the request struct for api DescribeContainerGroups
+type DescribeContainerGroupsRequest struct {
+	*requests.RpcRequest
+	OwnerId              requests.Integer              `position:"Query" name:"OwnerId"`
+	ResourceOwnerAccount string                        `position:"Query" name:"ResourceOwnerAccount"`
+	ResourceOwnerId      requests.Integer              `position:"Query" name:"ResourceOwnerId"`
+	OwnerAccount         string                        `position:"Query" name:"OwnerAccount"`
+	RegionId             string                        `position:"Query" name:"RegionId"`
+	ZoneId               string                        `position:"Query" name:"ZoneId"`
+	VSwitchId            string                        `position:"Query" name:"VSwitchId"`
+	NextToken            string                        `position:"Query" name:"NextToken"`
+	Limit                requests.Integer              `position:"Query" name:"Limit"`
+	Tag                  *[]DescribeContainerGroupsTag `position:"Query" name:"Tag" type:"Repeated"`
+	ContainerGroupIds    string                        `position:"Query" name:"ContainerGroupIds"`
+	ContainerGroupName   string                        `position:"Query" name:"ContainerGroupName"`
+	Status               string                        `position:"Query" name:"Status"`
+}
+
+type DescribeContainerGroupsTag struct {
+	Key   string `name:"Key"`
+	Value string `name:"Value"`
+}
+
+// DescribeContainerGroupsResponse is the response struct for api DescribeContainerGroups
+type DescribeContainerGroupsResponse struct {
+	*responses.BaseResponse
+	RequestId       string                                    `json:"RequestId" xml:"RequestId"`
+	NextToken       string                                    `json:"NextToken" xml:"NextToken"`
+	TotalCount      int                                       `json:"TotalCount" xml:"TotalCount"`
+	ContainerGroups []DescribeContainerGroupsContainerGroups0 `json:"ContainerGroups" xml:"ContainerGroups"`
+}
+
+type DescribeContainerGroupsContainerGroups0 struct {
+	ContainerGroup []DescribeContainerGroupsContainerGroup1 `json:"ContainerGroup" xml:"ContainerGroup"`
+}
+
+type DescribeContainerGroupsContainerGroup1 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             float32                                    `json:"Memory" xml:"Memory"`
+	Cpu                float32                                    `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"`
+	EniInstanceId      string                                     `json:"EniInstanceId" xml:"EniInstanceId"`
+	InstanceType       string                                     `json:"InstanceType" xml:"InstanceType"`
+	ExpiredTime        string                                     `json:"ExpiredTime" xml:"ExpiredTime"`
+	FailedTime         string                                     `json:"FailedTime" xml:"FailedTime"`
+	Tags               []DescribeContainerGroupsTags1             `json:"Tags" xml:"Tags"`
+	Events             []DescribeContainerGroupsEvents1           `json:"Events" xml:"Events"`
+	Containers         []DescribeContainerGroupsContainers1       `json:"Containers" xml:"Containers"`
+	Volumes            []DescribeContainerGroupsVolumes1          `json:"Volumes" xml:"Volumes"`
+	InitContainers     []DescribeContainerGroupsInitContainers1   `json:"InitContainers" xml:"InitContainers"`
+	HostAliases        []DescribeContainerGroupsHostAliases1      `json:"HostAliases" xml:"HostAliases"`
+	DnsConfig          DescribeContainerGroupsDnsConfig1          `json:"DnsConfig" xml:"DnsConfig"`
+	EciSecurityContext DescribeContainerGroupsEciSecurityContext1 `json:"EciSecurityContext" xml:"EciSecurityContext"`
+}
+
+type DescribeContainerGroupsTags1 struct {
+	Label []DescribeContainerGroupsLabel2 `json:"Label" xml:"Label"`
+}
+
+type DescribeContainerGroupsLabel2 struct {
+	Key   string `json:"Key" xml:"Key"`
+	Value string `json:"Value" xml:"Value"`
+}
+
+type DescribeContainerGroupsEvents1 struct {
+	Event []DescribeContainerGroupsEvent2 `json:"Event" xml:"Event"`
+}
+
+type DescribeContainerGroupsEvent2 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"`
+	Reason         string `json:"Reason" xml:"Reason"`
+}
+
+type DescribeContainerGroupsContainers1 struct {
+	Container []DescribeContainerGroupsContainer2 `json:"Container" xml:"Container"`
+}
+
+type DescribeContainerGroupsContainer2 struct {
+	Name            string                                    `json:"Name" xml:"Name"`
+	Image           string                                    `json:"Image" xml:"Image"`
+	Memory          float32                                   `json:"Memory" xml:"Memory"`
+	Cpu             float32                                   `json:"Cpu" xml:"Cpu"`
+	RestartCount    int                                       `json:"RestartCount" xml:"RestartCount"`
+	WorkingDir      string                                    `json:"WorkingDir" xml:"WorkingDir"`
+	ImagePullPolicy string                                    `json:"ImagePullPolicy" xml:"ImagePullPolicy"`
+	Ready           bool                                      `json:"Ready" xml:"Ready"`
+	Gpu             int                                       `json:"Gpu" xml:"Gpu"`
+	VolumeMounts    []DescribeContainerGroupsVolumeMounts2    `json:"VolumeMounts" xml:"VolumeMounts"`
+	Ports           []DescribeContainerGroupsPorts2           `json:"Ports" xml:"Ports"`
+	EnvironmentVars []DescribeContainerGroupsEnvironmentVars2 `json:"EnvironmentVars" xml:"EnvironmentVars"`
+	Commands        []string                                  `json:"Commands" xml:"Commands"`
+	Args            []string                                  `json:"Args" xml:"Args"`
+	PreviousState   DescribeContainerGroupsPreviousState2     `json:"PreviousState" xml:"PreviousState"`
+	CurrentState    DescribeContainerGroupsCurrentState2      `json:"CurrentState" xml:"CurrentState"`
+	ReadinessProbe  DescribeContainerGroupsReadinessProbe2    `json:"ReadinessProbe" xml:"ReadinessProbe"`
+	LivenessProbe   DescribeContainerGroupsLivenessProbe2     `json:"LivenessProbe" xml:"LivenessProbe"`
+	SecurityContext DescribeContainerGroupsSecurityContext2   `json:"SecurityContext" xml:"SecurityContext"`
+}
+
+type DescribeContainerGroupsVolumeMounts2 struct {
+	VolumeMount []DescribeContainerGroupsVolumeMount3 `json:"VolumeMount" xml:"VolumeMount"`
+}
+
+type DescribeContainerGroupsVolumeMount3 struct {
+	Name      string `json:"Name" xml:"Name"`
+	MountPath string `json:"MountPath" xml:"MountPath"`
+	ReadOnly  bool   `json:"ReadOnly" xml:"ReadOnly"`
+}
+
+type DescribeContainerGroupsPorts2 struct {
+	Port []DescribeContainerGroupsPort3 `json:"Port" xml:"Port"`
+}
+
+type DescribeContainerGroupsPort3 struct {
+	Port     int    `json:"Port" xml:"Port"`
+	Protocol string `json:"Protocol" xml:"Protocol"`
+}
+
+type DescribeContainerGroupsEnvironmentVars2 struct {
+	EnvironmentVar []DescribeContainerGroupsEnvironmentVar3 `json:"EnvironmentVar" xml:"EnvironmentVar"`
+}
+
+type DescribeContainerGroupsEnvironmentVar3 struct {
+	Key       string                            `json:"Key" xml:"Key"`
+	Value     string                            `json:"Value" xml:"Value"`
+	ValueFrom DescribeContainerGroupsValueFrom3 `json:"ValueFrom" xml:"ValueFrom"`
+}
+
+type DescribeContainerGroupsValueFrom3 struct {
+	FieldRef DescribeContainerGroupsFieldRef4 `json:"FieldRef" xml:"FieldRef"`
+}
+
+type DescribeContainerGroupsFieldRef4 struct {
+	FieldPath string `json:"FieldPath" xml:"FieldPath"`
+}
+
+type DescribeContainerGroupsPreviousState2 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"`
+	Reason       string `json:"Reason" xml:"Reason"`
+	Message      string `json:"Message" xml:"Message"`
+	Signal       int    `json:"Signal" xml:"Signal"`
+}
+
+type DescribeContainerGroupsCurrentState2 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"`
+	Reason       string `json:"Reason" xml:"Reason"`
+	Message      string `json:"Message" xml:"Message"`
+	Signal       int    `json:"Signal" xml:"Signal"`
+}
+
+type DescribeContainerGroupsReadinessProbe2 struct {
+	InitialDelaySeconds int                               `json:"InitialDelaySeconds" xml:"InitialDelaySeconds"`
+	PeriodSeconds       int                               `json:"PeriodSeconds" xml:"PeriodSeconds"`
+	TimeoutSeconds      int                               `json:"TimeoutSeconds" xml:"TimeoutSeconds"`
+	SuccessThreshold    int                               `json:"SuccessThreshold" xml:"SuccessThreshold"`
+	FailureThreshold    int                               `json:"FailureThreshold" xml:"FailureThreshold"`
+	Execs               []string                          `json:"Execs" xml:"Execs"`
+	HttpGet             DescribeContainerGroupsHttpGet3   `json:"HttpGet" xml:"HttpGet"`
+	TcpSocket           DescribeContainerGroupsTcpSocket3 `json:"TcpSocket" xml:"TcpSocket"`
+}
+
+type DescribeContainerGroupsHttpGet3 struct {
+	Path   string `json:"Path" xml:"Path"`
+	Port   int    `json:"Port" xml:"Port"`
+	Scheme string `json:"Scheme" xml:"Scheme"`
+}
+
+type DescribeContainerGroupsTcpSocket3 struct {
+	Host string `json:"Host" xml:"Host"`
+	Port int    `json:"Port" xml:"Port"`
+}
+
+type DescribeContainerGroupsLivenessProbe2 struct {
+	InitialDelaySeconds int                               `json:"InitialDelaySeconds" xml:"InitialDelaySeconds"`
+	PeriodSeconds       int                               `json:"PeriodSeconds" xml:"PeriodSeconds"`
+	TimeoutSeconds      int                               `json:"TimeoutSeconds" xml:"TimeoutSeconds"`
+	SuccessThreshold    int                               `json:"SuccessThreshold" xml:"SuccessThreshold"`
+	FailureThreshold    int                               `json:"FailureThreshold" xml:"FailureThreshold"`
+	Execs               []string                          `json:"Execs" xml:"Execs"`
+	HttpGet             DescribeContainerGroupsHttpGet3   `json:"HttpGet" xml:"HttpGet"`
+	TcpSocket           DescribeContainerGroupsTcpSocket3 `json:"TcpSocket" xml:"TcpSocket"`
+}
+
+type DescribeContainerGroupsSecurityContext2 struct {
+	ReadOnlyRootFilesystem bool                               `json:"ReadOnlyRootFilesystem" xml:"ReadOnlyRootFilesystem"`
+	RunAsUser              int64                              `json:"RunAsUser" xml:"RunAsUser"`
+	Capability             DescribeContainerGroupsCapability3 `json:"Capability" xml:"Capability"`
+}
+
+type DescribeContainerGroupsCapability3 struct {
+	Adds []string `json:"Adds" xml:"Adds"`
+}
+
+type DescribeContainerGroupsVolumes1 struct {
+	Volume []DescribeContainerGroupsVolume2 `json:"Volume" xml:"Volume"`
+}
+
+type DescribeContainerGroupsVolume2 struct {
+	Type                              string                                                      `json:"Type" xml:"Type"`
+	Name                              string                                                      `json:"Name" xml:"Name"`
+	NFSVolumePath                     string                                                      `json:"NFSVolumePath" xml:"NFSVolumePath"`
+	NFSVolumeServer                   string                                                      `json:"NFSVolumeServer" xml:"NFSVolumeServer"`
+	NFSVolumeReadOnly                 bool                                                        `json:"NFSVolumeReadOnly" xml:"NFSVolumeReadOnly"`
+	ConfigFileVolumeConfigFileToPaths []DescribeContainerGroupsConfigFileVolumeConfigFileToPaths2 `json:"ConfigFileVolumeConfigFileToPaths" xml:"ConfigFileVolumeConfigFileToPaths"`
+}
+
+type DescribeContainerGroupsConfigFileVolumeConfigFileToPaths2 struct {
+	ConfigFileVolumeConfigFileToPath []DescribeContainerGroupsConfigFileVolumeConfigFileToPath3 `json:"ConfigFileVolumeConfigFileToPath" xml:"ConfigFileVolumeConfigFileToPath"`
+}
+
+type DescribeContainerGroupsConfigFileVolumeConfigFileToPath3 struct {
+	Content string `json:"Content" xml:"Content"`
+	Path    string `json:"Path" xml:"Path"`
+}
+
+type DescribeContainerGroupsInitContainers1 struct {
+	Container []DescribeContainerGroupsContainer2 `json:"Container" xml:"Container"`
+}
+
+type DescribeContainerGroupsHostAliases1 struct {
+	HostAliase []DescribeContainerGroupsHostAliase2 `json:"HostAliase" xml:"HostAliase"`
+}
+
+type DescribeContainerGroupsHostAliase2 struct {
+	Ip        string   `json:"Ip" xml:"Ip"`
+	Hostnames []string `json:"Hostnames" xml:"Hostnames"`
+}
+
+type DescribeContainerGroupsDnsConfig1 struct {
+	Options     []DescribeContainerGroupsOptions2 `json:"Options" xml:"Options"`
+	NameServers []string                          `json:"NameServers" xml:"NameServers"`
+	Searches    []string                          `json:"Searches" xml:"Searches"`
+}
+
+type DescribeContainerGroupsOptions2 struct {
+	Option []DescribeContainerGroupsOption3 `json:"Option" xml:"Option"`
+}
+
+type DescribeContainerGroupsOption3 struct {
+	Name  string `json:"Name" xml:"Name"`
+	Value string `json:"Value" xml:"Value"`
+}
+
+type DescribeContainerGroupsEciSecurityContext1 struct {
+	Sysctls []DescribeContainerGroupsSysctls2 `json:"Sysctls" xml:"Sysctls"`
+}
+
+type DescribeContainerGroupsSysctls2 struct {
+	Sysctl []DescribeContainerGroupsSysctl3 `json:"Sysctl" xml:"Sysctl"`
+}
+
+type DescribeContainerGroupsSysctl3 struct {
+	Name  string `json:"Name" xml:"Name"`
+	Value string `json:"Value" xml:"Value"`
+}
+
+// CreateDescribeContainerGroupsRequest creates a request to invoke DescribeContainerGroups API
+func CreateDescribeContainerGroupsRequest() (request *DescribeContainerGroupsRequest) {
+	request = &DescribeContainerGroupsRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("Eci", "2018-08-08", "DescribeContainerGroups", "eci", "openAPI")
+	return
+}
+
+// CreateDescribeContainerGroupsResponse creates a response to parse from DescribeContainerGroups response
+func CreateDescribeContainerGroupsResponse() (response *DescribeContainerGroupsResponse) {
+	response = &DescribeContainerGroupsResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 113 - 0
services/eci/describe_container_log.go

@@ -0,0 +1,113 @@
+//Licensed under the Apache License, Version 2.0 (the "License");
+//you may not use this file except in compliance with the License.
+//You may obtain a copy of the License at
+//
+//http://www.apache.org/licenses/LICENSE-2.0
+//
+//Unless required by applicable law or agreed to in writing, software
+//distributed under the License is distributed on an "AS IS" BASIS,
+//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//See the License for the specific language governing permissions and
+//limitations under the License.
+//
+// Code generated by Alibaba Cloud SDK Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+package eci
+
+import (
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
+)
+
+// DescribeContainerLog invokes the eci.DescribeContainerLog API synchronously
+// api document: https://help.aliyun.com/api/eci/describecontainerlog.html
+func (client *Client) DescribeContainerLog(request *DescribeContainerLogRequest) (response *DescribeContainerLogResponse, err error) {
+	response = CreateDescribeContainerLogResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// 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
+func (client *Client) DescribeContainerLogWithChan(request *DescribeContainerLogRequest) (<-chan *DescribeContainerLogResponse, <-chan error) {
+	responseChan := make(chan *DescribeContainerLogResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.DescribeContainerLog(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// 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 *Client) DescribeContainerLogWithCallback(request *DescribeContainerLogRequest, callback func(response *DescribeContainerLogResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *DescribeContainerLogResponse
+		var err error
+		defer close(result)
+		response, err = client.DescribeContainerLog(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// DescribeContainerLogRequest is the request struct for api DescribeContainerLog
+type DescribeContainerLogRequest struct {
+	*requests.RpcRequest
+	OwnerId              requests.Integer `position:"Query" name:"OwnerId"`
+	ResourceOwnerAccount string           `position:"Query" name:"ResourceOwnerAccount"`
+	ResourceOwnerId      requests.Integer `position:"Query" name:"ResourceOwnerId"`
+	OwnerAccount         string           `position:"Query" name:"OwnerAccount"`
+	RegionId             string           `position:"Query" name:"RegionId"`
+	ContainerGroupId     string           `position:"Query" name:"ContainerGroupId"`
+	ContainerName        string           `position:"Query" name:"ContainerName"`
+	StartTime            string           `position:"Query" name:"StartTime"`
+	Tail                 requests.Integer `position:"Query" name:"Tail"`
+}
+
+// DescribeContainerLogResponse is the response struct for api DescribeContainerLog
+type DescribeContainerLogResponse struct {
+	*responses.BaseResponse
+	RequestId     string `json:"RequestId" xml:"RequestId"`
+	ContainerName string `json:"ContainerName" xml:"ContainerName"`
+	Content       string `json:"Content" xml:"Content"`
+}
+
+// CreateDescribeContainerLogRequest creates a request to invoke DescribeContainerLog API
+func CreateDescribeContainerLogRequest() (request *DescribeContainerLogRequest) {
+	request = &DescribeContainerLogRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("Eci", "2018-08-08", "DescribeContainerLog", "eci", "openAPI")
+	return
+}
+
+// CreateDescribeContainerLogResponse creates a response to parse from DescribeContainerLog response
+func CreateDescribeContainerLogResponse() (response *DescribeContainerLogResponse) {
+	response = &DescribeContainerLogResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 187 - 0
services/eci/describe_multi_container_group_metric.go

@@ -0,0 +1,187 @@
+//Licensed under the Apache License, Version 2.0 (the "License");
+//you may not use this file except in compliance with the License.
+//You may obtain a copy of the License at
+//
+//http://www.apache.org/licenses/LICENSE-2.0
+//
+//Unless required by applicable law or agreed to in writing, software
+//distributed under the License is distributed on an "AS IS" BASIS,
+//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//See the License for the specific language governing permissions and
+//limitations under the License.
+//
+// Code generated by Alibaba Cloud SDK Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+package eci
+
+import (
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
+)
+
+// DescribeMultiContainerGroupMetric invokes the eci.DescribeMultiContainerGroupMetric API synchronously
+// api document: https://help.aliyun.com/api/eci/describemulticontainergroupmetric.html
+func (client *Client) DescribeMultiContainerGroupMetric(request *DescribeMultiContainerGroupMetricRequest) (response *DescribeMultiContainerGroupMetricResponse, err error) {
+	response = CreateDescribeMultiContainerGroupMetricResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// DescribeMultiContainerGroupMetricWithChan invokes the eci.DescribeMultiContainerGroupMetric API asynchronously
+// api document: https://help.aliyun.com/api/eci/describemulticontainergroupmetric.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) DescribeMultiContainerGroupMetricWithChan(request *DescribeMultiContainerGroupMetricRequest) (<-chan *DescribeMultiContainerGroupMetricResponse, <-chan error) {
+	responseChan := make(chan *DescribeMultiContainerGroupMetricResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.DescribeMultiContainerGroupMetric(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// DescribeMultiContainerGroupMetricWithCallback invokes the eci.DescribeMultiContainerGroupMetric API asynchronously
+// api document: https://help.aliyun.com/api/eci/describemulticontainergroupmetric.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) DescribeMultiContainerGroupMetricWithCallback(request *DescribeMultiContainerGroupMetricRequest, callback func(response *DescribeMultiContainerGroupMetricResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *DescribeMultiContainerGroupMetricResponse
+		var err error
+		defer close(result)
+		response, err = client.DescribeMultiContainerGroupMetric(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// DescribeMultiContainerGroupMetricRequest is the request struct for api DescribeMultiContainerGroupMetric
+type DescribeMultiContainerGroupMetricRequest struct {
+	*requests.RpcRequest
+	OwnerId              requests.Integer `position:"Query" name:"OwnerId"`
+	ResourceOwnerAccount string           `position:"Query" name:"ResourceOwnerAccount"`
+	ResourceOwnerId      requests.Integer `position:"Query" name:"ResourceOwnerId"`
+	OwnerAccount         string           `position:"Query" name:"OwnerAccount"`
+	RegionId             string           `position:"Query" name:"RegionId"`
+	ContainerGroupIds    string           `position:"Query" name:"ContainerGroupIds"`
+	ResourceGroupId      string           `position:"Query" name:"ResourceGroupId"`
+}
+
+// DescribeMultiContainerGroupMetricResponse is the response struct for api DescribeMultiContainerGroupMetric
+type DescribeMultiContainerGroupMetricResponse struct {
+	*responses.BaseResponse
+	RequestId    string                                           `json:"RequestId" xml:"RequestId"`
+	MonitorDatas []DescribeMultiContainerGroupMetricMonitorDatas0 `json:"MonitorDatas" xml:"MonitorDatas"`
+}
+
+type DescribeMultiContainerGroupMetricMonitorDatas0 struct {
+	Record []DescribeMultiContainerGroupMetricRecord1 `json:"Record" xml:"Record"`
+}
+
+type DescribeMultiContainerGroupMetricRecord1 struct {
+	ContainerGroupId string                                      `json:"ContainerGroupId" xml:"ContainerGroupId"`
+	Records          []DescribeMultiContainerGroupMetricRecords1 `json:"Records" xml:"Records"`
+}
+
+type DescribeMultiContainerGroupMetricRecords1 struct {
+	PodStat []DescribeMultiContainerGroupMetricPodStat2 `json:"PodStat" xml:"PodStat"`
+}
+
+type DescribeMultiContainerGroupMetricPodStat2 struct {
+	Timestamp  string                                         `json:"Timestamp" xml:"Timestamp"`
+	Containers []DescribeMultiContainerGroupMetricContainers2 `json:"Containers" xml:"Containers"`
+	CPU        DescribeMultiContainerGroupMetricCPU2          `json:"CPU" xml:"CPU"`
+	Memory     DescribeMultiContainerGroupMetricMemory2       `json:"Memory" xml:"Memory"`
+	Network    DescribeMultiContainerGroupMetricNetwork2      `json:"Network" xml:"Network"`
+}
+
+type DescribeMultiContainerGroupMetricContainers2 struct {
+	Container []DescribeMultiContainerGroupMetricContainer3 `json:"Container" xml:"Container"`
+}
+
+type DescribeMultiContainerGroupMetricContainer3 struct {
+	Name   string                                   `json:"Name" xml:"Name"`
+	CPU    DescribeMultiContainerGroupMetricCPU3    `json:"CPU" xml:"CPU"`
+	Memory DescribeMultiContainerGroupMetricMemory3 `json:"Memory" xml:"Memory"`
+}
+
+type DescribeMultiContainerGroupMetricCPU3 struct {
+	UsageNanoCores       int64 `json:"UsageNanoCores" xml:"UsageNanoCores"`
+	UsageCoreNanoSeconds int64 `json:"UsageCoreNanoSeconds" xml:"UsageCoreNanoSeconds"`
+	Load                 int64 `json:"Load" xml:"Load"`
+	Limit                int64 `json:"Limit" xml:"Limit"`
+}
+
+type DescribeMultiContainerGroupMetricMemory3 struct {
+	AvailableBytes int64 `json:"AvailableBytes" xml:"AvailableBytes"`
+	UsageBytes     int64 `json:"UsageBytes" xml:"UsageBytes"`
+	Cache          int64 `json:"Cache" xml:"Cache"`
+	WorkingSet     int64 `json:"WorkingSet" xml:"WorkingSet"`
+	Rss            int64 `json:"Rss" xml:"Rss"`
+}
+
+type DescribeMultiContainerGroupMetricCPU2 struct {
+	UsageNanoCores       int64 `json:"UsageNanoCores" xml:"UsageNanoCores"`
+	UsageCoreNanoSeconds int64 `json:"UsageCoreNanoSeconds" xml:"UsageCoreNanoSeconds"`
+	Load                 int64 `json:"Load" xml:"Load"`
+	Limit                int64 `json:"Limit" xml:"Limit"`
+}
+
+type DescribeMultiContainerGroupMetricMemory2 struct {
+	AvailableBytes int64 `json:"AvailableBytes" xml:"AvailableBytes"`
+	UsageBytes     int64 `json:"UsageBytes" xml:"UsageBytes"`
+	Cache          int64 `json:"Cache" xml:"Cache"`
+	WorkingSet     int64 `json:"WorkingSet" xml:"WorkingSet"`
+	Rss            int64 `json:"Rss" xml:"Rss"`
+}
+
+type DescribeMultiContainerGroupMetricNetwork2 struct {
+	Interfaces []DescribeMultiContainerGroupMetricInterfaces3 `json:"Interfaces" xml:"Interfaces"`
+}
+
+type DescribeMultiContainerGroupMetricInterfaces3 struct {
+	Interface []DescribeMultiContainerGroupMetricInterface4 `json:"Interface" xml:"Interface"`
+}
+
+type DescribeMultiContainerGroupMetricInterface4 struct {
+	TxBytes  int64  `json:"TxBytes" xml:"TxBytes"`
+	RxBytes  int64  `json:"RxBytes" xml:"RxBytes"`
+	TxErrors int64  `json:"TxErrors" xml:"TxErrors"`
+	RxErrors int64  `json:"RxErrors" xml:"RxErrors"`
+	Name     string `json:"Name" xml:"Name"`
+}
+
+// CreateDescribeMultiContainerGroupMetricRequest creates a request to invoke DescribeMultiContainerGroupMetric API
+func CreateDescribeMultiContainerGroupMetricRequest() (request *DescribeMultiContainerGroupMetricRequest) {
+	request = &DescribeMultiContainerGroupMetricRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("Eci", "2018-08-08", "DescribeMultiContainerGroupMetric", "eci", "openAPI")
+	return
+}
+
+// CreateDescribeMultiContainerGroupMetricResponse creates a response to parse from DescribeMultiContainerGroupMetric response
+func CreateDescribeMultiContainerGroupMetricResponse() (response *DescribeMultiContainerGroupMetricResponse) {
+	response = &DescribeMultiContainerGroupMetricResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 112 - 0
services/eci/exec_container_command.go

@@ -0,0 +1,112 @@
+//Licensed under the Apache License, Version 2.0 (the "License");
+//you may not use this file except in compliance with the License.
+//You may obtain a copy of the License at
+//
+//http://www.apache.org/licenses/LICENSE-2.0
+//
+//Unless required by applicable law or agreed to in writing, software
+//distributed under the License is distributed on an "AS IS" BASIS,
+//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//See the License for the specific language governing permissions and
+//limitations under the License.
+//
+// Code generated by Alibaba Cloud SDK Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+package eci
+
+import (
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
+)
+
+// ExecContainerCommand invokes the eci.ExecContainerCommand API synchronously
+// api document: https://help.aliyun.com/api/eci/execcontainercommand.html
+func (client *Client) ExecContainerCommand(request *ExecContainerCommandRequest) (response *ExecContainerCommandResponse, err error) {
+	response = CreateExecContainerCommandResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// ExecContainerCommandWithChan invokes the eci.ExecContainerCommand API asynchronously
+// api document: https://help.aliyun.com/api/eci/execcontainercommand.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) ExecContainerCommandWithChan(request *ExecContainerCommandRequest) (<-chan *ExecContainerCommandResponse, <-chan error) {
+	responseChan := make(chan *ExecContainerCommandResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.ExecContainerCommand(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// ExecContainerCommandWithCallback invokes the eci.ExecContainerCommand API asynchronously
+// api document: https://help.aliyun.com/api/eci/execcontainercommand.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) ExecContainerCommandWithCallback(request *ExecContainerCommandRequest, callback func(response *ExecContainerCommandResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *ExecContainerCommandResponse
+		var err error
+		defer close(result)
+		response, err = client.ExecContainerCommand(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// ExecContainerCommandRequest is the request struct for api ExecContainerCommand
+type ExecContainerCommandRequest struct {
+	*requests.RpcRequest
+	OwnerId              requests.Integer `position:"Query" name:"OwnerId"`
+	ResourceOwnerAccount string           `position:"Query" name:"ResourceOwnerAccount"`
+	ResourceOwnerId      requests.Integer `position:"Query" name:"ResourceOwnerId"`
+	OwnerAccount         string           `position:"Query" name:"OwnerAccount"`
+	RegionId             string           `position:"Query" name:"RegionId"`
+	ContainerGroupId     string           `position:"Query" name:"ContainerGroupId"`
+	ContainerName        string           `position:"Query" name:"ContainerName"`
+	Command              string           `position:"Query" name:"Command"`
+	TTY                  requests.Boolean `position:"Query" name:"TTY"`
+}
+
+// ExecContainerCommandResponse is the response struct for api ExecContainerCommand
+type ExecContainerCommandResponse struct {
+	*responses.BaseResponse
+	RequestId    string `json:"RequestId" xml:"RequestId"`
+	WebSocketUri string `json:"WebSocketUri" xml:"WebSocketUri"`
+}
+
+// CreateExecContainerCommandRequest creates a request to invoke ExecContainerCommand API
+func CreateExecContainerCommandRequest() (request *ExecContainerCommandRequest) {
+	request = &ExecContainerCommandRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("Eci", "2018-08-08", "ExecContainerCommand", "eci", "openAPI")
+	return
+}
+
+// CreateExecContainerCommandResponse creates a response to parse from ExecContainerCommand response
+func CreateExecContainerCommandResponse() (response *ExecContainerCommandResponse) {
+	response = &ExecContainerCommandResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 348 - 0
services/eci/export_container_group_template.go

@@ -0,0 +1,348 @@
+//Licensed under the Apache License, Version 2.0 (the "License");
+//you may not use this file except in compliance with the License.
+//You may obtain a copy of the License at
+//
+//http://www.apache.org/licenses/LICENSE-2.0
+//
+//Unless required by applicable law or agreed to in writing, software
+//distributed under the License is distributed on an "AS IS" BASIS,
+//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//See the License for the specific language governing permissions and
+//limitations under the License.
+//
+// Code generated by Alibaba Cloud SDK Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+package eci
+
+import (
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
+)
+
+// ExportContainerGroupTemplate invokes the eci.ExportContainerGroupTemplate API synchronously
+// api document: https://help.aliyun.com/api/eci/exportcontainergrouptemplate.html
+func (client *Client) ExportContainerGroupTemplate(request *ExportContainerGroupTemplateRequest) (response *ExportContainerGroupTemplateResponse, err error) {
+	response = CreateExportContainerGroupTemplateResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// ExportContainerGroupTemplateWithChan invokes the eci.ExportContainerGroupTemplate API asynchronously
+// api document: https://help.aliyun.com/api/eci/exportcontainergrouptemplate.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) ExportContainerGroupTemplateWithChan(request *ExportContainerGroupTemplateRequest) (<-chan *ExportContainerGroupTemplateResponse, <-chan error) {
+	responseChan := make(chan *ExportContainerGroupTemplateResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.ExportContainerGroupTemplate(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// ExportContainerGroupTemplateWithCallback invokes the eci.ExportContainerGroupTemplate API asynchronously
+// api document: https://help.aliyun.com/api/eci/exportcontainergrouptemplate.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) ExportContainerGroupTemplateWithCallback(request *ExportContainerGroupTemplateRequest, callback func(response *ExportContainerGroupTemplateResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *ExportContainerGroupTemplateResponse
+		var err error
+		defer close(result)
+		response, err = client.ExportContainerGroupTemplate(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// ExportContainerGroupTemplateRequest is the request struct for api ExportContainerGroupTemplate
+type ExportContainerGroupTemplateRequest struct {
+	*requests.RpcRequest
+	OwnerId              requests.Integer `position:"Query" name:"OwnerId"`
+	ResourceOwnerAccount string           `position:"Query" name:"ResourceOwnerAccount"`
+	ResourceOwnerId      requests.Integer `position:"Query" name:"ResourceOwnerId"`
+	OwnerAccount         string           `position:"Query" name:"OwnerAccount"`
+	RegionId             string           `position:"Query" name:"RegionId"`
+	ContainerGroupId     string           `position:"Query" name:"ContainerGroupId"`
+}
+
+// ExportContainerGroupTemplateResponse is the response struct for api ExportContainerGroupTemplate
+type ExportContainerGroupTemplateResponse struct {
+	*responses.BaseResponse
+	RequestId string                                `json:"RequestId" xml:"RequestId"`
+	Template  ExportContainerGroupTemplateTemplate0 `json:"Template" xml:"Template"`
+}
+
+type ExportContainerGroupTemplateTemplate0 struct {
+	RegionId           string                                 `json:"RegionId" xml:"RegionId"`
+	ZoneId             string                                 `json:"ZoneId" xml:"ZoneId"`
+	SecurityGroupId    string                                 `json:"SecurityGroupId" xml:"SecurityGroupId"`
+	VSwitchId          string                                 `json:"VSwitchId" xml:"VSwitchId"`
+	ResourceGroupId    string                                 `json:"ResourceGroupId" xml:"ResourceGroupId"`
+	EipInstanceId      string                                 `json:"EipInstanceId" xml:"EipInstanceId"`
+	ContainerGroupName string                                 `json:"ContainerGroupName" xml:"ContainerGroupName"`
+	InstanceType       string                                 `json:"InstanceType" xml:"InstanceType"`
+	Tags               []ExportContainerGroupTemplateTags1    `json:"Tags" xml:"Tags"`
+	Resources          ExportContainerGroupTemplateResources1 `json:"Resources" xml:"Resources"`
+	Spec               ExportContainerGroupTemplateSpec1      `json:"Spec" xml:"Spec"`
+}
+
+type ExportContainerGroupTemplateTags1 struct {
+	Tag []ExportContainerGroupTemplateTag2 `json:"Tag" xml:"Tag"`
+}
+
+type ExportContainerGroupTemplateTag2 struct {
+	Key   string `json:"Key" xml:"Key"`
+	Value string `json:"Value" xml:"Value"`
+}
+
+type ExportContainerGroupTemplateResources1 struct {
+	Cpu    float32 `json:"Cpu" xml:"Cpu"`
+	Memory float32 `json:"Memory" xml:"Memory"`
+}
+
+type ExportContainerGroupTemplateSpec1 struct {
+	RestartPolicy   string                                        `json:"RestartPolicy" xml:"RestartPolicy"`
+	DnsPolicy       string                                        `json:"DnsPolicy" xml:"DnsPolicy"`
+	Volumes         []ExportContainerGroupTemplateVolumes2        `json:"Volumes" xml:"Volumes"`
+	InitContainers  []ExportContainerGroupTemplateInitContainers2 `json:"InitContainers" xml:"InitContainers"`
+	Containers      []ExportContainerGroupTemplateContainers2     `json:"Containers" xml:"Containers"`
+	DnsConfig       ExportContainerGroupTemplateDnsConfig2        `json:"DnsConfig" xml:"DnsConfig"`
+	SecurityContext ExportContainerGroupTemplateSecurityContext2  `json:"SecurityContext" xml:"SecurityContext"`
+}
+
+type ExportContainerGroupTemplateVolumes2 struct {
+	Volume []ExportContainerGroupTemplateVolume3 `json:"Volume" xml:"Volume"`
+}
+
+type ExportContainerGroupTemplateVolume3 struct {
+	Name       string                                  `json:"Name" xml:"Name"`
+	ConfigFile ExportContainerGroupTemplateConfigFile3 `json:"ConfigFile" xml:"ConfigFile"`
+	EmptyDir   ExportContainerGroupTemplateEmptyDir3   `json:"EmptyDir" xml:"EmptyDir"`
+	Nfs        ExportContainerGroupTemplateNfs3        `json:"Nfs" xml:"Nfs"`
+}
+
+type ExportContainerGroupTemplateConfigFile3 struct {
+	DefaultMode int                                  `json:"DefaultMode" xml:"DefaultMode"`
+	Items       []ExportContainerGroupTemplateItems4 `json:"Items" xml:"Items"`
+}
+
+type ExportContainerGroupTemplateItems4 struct {
+	Item []ExportContainerGroupTemplateItem5 `json:"Item" xml:"Item"`
+}
+
+type ExportContainerGroupTemplateItem5 struct {
+	Mode    int    `json:"Mode" xml:"Mode"`
+	Path    string `json:"Path" xml:"Path"`
+	Content string `json:"Content" xml:"Content"`
+}
+
+type ExportContainerGroupTemplateEmptyDir3 struct {
+	SizeLimit string `json:"SizeLimit" xml:"SizeLimit"`
+}
+
+type ExportContainerGroupTemplateNfs3 struct {
+	Server   string `json:"Server" xml:"Server"`
+	Path     string `json:"Path" xml:"Path"`
+	ReadOnly bool   `json:"ReadOnly" xml:"ReadOnly"`
+}
+
+type ExportContainerGroupTemplateInitContainers2 struct {
+	InitContainer []ExportContainerGroupTemplateInitContainer3 `json:"InitContainer" xml:"InitContainer"`
+}
+
+type ExportContainerGroupTemplateInitContainer3 struct {
+	Name            string                                       `json:"Name" xml:"Name"`
+	Image           string                                       `json:"Image" xml:"Image"`
+	ImagePullPolicy string                                       `json:"ImagePullPolicy" xml:"ImagePullPolicy"`
+	Stdin           bool                                         `json:"Stdin" xml:"Stdin"`
+	StdinOnce       bool                                         `json:"StdinOnce" xml:"StdinOnce"`
+	Tty             bool                                         `json:"Tty" xml:"Tty"`
+	WorkingDir      string                                       `json:"WorkingDir" xml:"WorkingDir"`
+	Env             []ExportContainerGroupTemplateEnv3           `json:"Env" xml:"Env"`
+	Ports           []ExportContainerGroupTemplatePorts3         `json:"Ports" xml:"Ports"`
+	VolumeMounts    []ExportContainerGroupTemplateVolumeMounts3  `json:"VolumeMounts" xml:"VolumeMounts"`
+	Command         []string                                     `json:"Command" xml:"Command"`
+	Args            []string                                     `json:"Args" xml:"Args"`
+	SecurityContext ExportContainerGroupTemplateSecurityContext3 `json:"SecurityContext" xml:"SecurityContext"`
+	Resources       ExportContainerGroupTemplateResources3       `json:"Resources" xml:"Resources"`
+}
+
+type ExportContainerGroupTemplateEnv3 struct {
+	Env []ExportContainerGroupTemplateEnv4 `json:"Env" xml:"Env"`
+}
+
+type ExportContainerGroupTemplateEnv4 struct {
+	Name      string                                 `json:"Name" xml:"Name"`
+	Value     string                                 `json:"Value" xml:"Value"`
+	ValueFrom ExportContainerGroupTemplateValueFrom4 `json:"ValueFrom" xml:"ValueFrom"`
+}
+
+type ExportContainerGroupTemplateValueFrom4 struct {
+	FieldRef ExportContainerGroupTemplateFieldRef5 `json:"FieldRef" xml:"FieldRef"`
+}
+
+type ExportContainerGroupTemplateFieldRef5 struct {
+	FieldPath string `json:"FieldPath" xml:"FieldPath"`
+}
+
+type ExportContainerGroupTemplatePorts3 struct {
+	Port []ExportContainerGroupTemplatePort4 `json:"Port" xml:"Port"`
+}
+
+type ExportContainerGroupTemplatePort4 struct {
+	Name          string `json:"Name" xml:"Name"`
+	Protocol      string `json:"Protocol" xml:"Protocol"`
+	ContainerPort int    `json:"ContainerPort" xml:"ContainerPort"`
+}
+
+type ExportContainerGroupTemplateVolumeMounts3 struct {
+	VolumeMount []ExportContainerGroupTemplateVolumeMount4 `json:"VolumeMount" xml:"VolumeMount"`
+}
+
+type ExportContainerGroupTemplateVolumeMount4 struct {
+	Name      string `json:"Name" xml:"Name"`
+	SubPath   string `json:"SubPath" xml:"SubPath"`
+	MountPath string `json:"MountPath" xml:"MountPath"`
+	ReadOnly  bool   `json:"ReadOnly" xml:"ReadOnly"`
+}
+
+type ExportContainerGroupTemplateSecurityContext3 struct {
+	Sysctls []ExportContainerGroupTemplateSysctls4 `json:"Sysctls" xml:"Sysctls"`
+}
+
+type ExportContainerGroupTemplateSysctls4 struct {
+	Sysctl []ExportContainerGroupTemplateSysctl5 `json:"Sysctl" xml:"Sysctl"`
+}
+
+type ExportContainerGroupTemplateSysctl5 struct {
+	Name  string `json:"Name" xml:"Name"`
+	Value string `json:"Value" xml:"Value"`
+}
+
+type ExportContainerGroupTemplateResources3 struct {
+	Cpu    float32 `json:"Cpu" xml:"Cpu"`
+	Memory float32 `json:"Memory" xml:"Memory"`
+}
+
+type ExportContainerGroupTemplateContainers2 struct {
+	Containers []ExportContainerGroupTemplateContainers3 `json:"Containers" xml:"Containers"`
+}
+
+type ExportContainerGroupTemplateContainers3 struct {
+	Name            string                                       `json:"Name" xml:"Name"`
+	Image           string                                       `json:"Image" xml:"Image"`
+	ImagePullPolicy string                                       `json:"ImagePullPolicy" xml:"ImagePullPolicy"`
+	Stdin           bool                                         `json:"Stdin" xml:"Stdin"`
+	StdinOnce       bool                                         `json:"StdinOnce" xml:"StdinOnce"`
+	Tty             bool                                         `json:"Tty" xml:"Tty"`
+	WorkingDir      string                                       `json:"WorkingDir" xml:"WorkingDir"`
+	Env             []ExportContainerGroupTemplateEnv3           `json:"Env" xml:"Env"`
+	Ports           []ExportContainerGroupTemplatePorts3         `json:"Ports" xml:"Ports"`
+	VolumeMounts    []ExportContainerGroupTemplateVolumeMounts3  `json:"VolumeMounts" xml:"VolumeMounts"`
+	Command         []string                                     `json:"Command" xml:"Command"`
+	Args            []string                                     `json:"Args" xml:"Args"`
+	SecurityContext ExportContainerGroupTemplateSecurityContext3 `json:"SecurityContext" xml:"SecurityContext"`
+	Resources       ExportContainerGroupTemplateResources3       `json:"Resources" xml:"Resources"`
+	ReadinessProbe  ExportContainerGroupTemplateReadinessProbe3  `json:"ReadinessProbe" xml:"ReadinessProbe"`
+	LivenessProbe   ExportContainerGroupTemplateLivenessProbe3   `json:"LivenessProbe" xml:"LivenessProbe"`
+}
+
+type ExportContainerGroupTemplateReadinessProbe3 struct {
+	InitialDelaySeconds int                                    `json:"InitialDelaySeconds" xml:"InitialDelaySeconds"`
+	PeriodSeconds       int                                    `json:"PeriodSeconds" xml:"PeriodSeconds"`
+	SuccessThreshold    int                                    `json:"SuccessThreshold" xml:"SuccessThreshold"`
+	FailureThreshold    int                                    `json:"FailureThreshold" xml:"FailureThreshold"`
+	TimeoutSeconds      int                                    `json:"TimeoutSeconds" xml:"TimeoutSeconds"`
+	Exec                ExportContainerGroupTemplateExec4      `json:"Exec" xml:"Exec"`
+	TcpSocket           ExportContainerGroupTemplateTcpSocket4 `json:"TcpSocket" xml:"TcpSocket"`
+	HttpGet             ExportContainerGroupTemplateHttpGet4   `json:"HttpGet" xml:"HttpGet"`
+}
+
+type ExportContainerGroupTemplateExec4 struct {
+	Command []string `json:"Command" xml:"Command"`
+}
+
+type ExportContainerGroupTemplateTcpSocket4 struct {
+	Port int `json:"Port" xml:"Port"`
+}
+
+type ExportContainerGroupTemplateHttpGet4 struct {
+	Scheme string `json:"Scheme" xml:"Scheme"`
+	Path   string `json:"Path" xml:"Path"`
+	Port   int    `json:"Port" xml:"Port"`
+}
+
+type ExportContainerGroupTemplateLivenessProbe3 struct {
+	InitialDelaySeconds int                                    `json:"InitialDelaySeconds" xml:"InitialDelaySeconds"`
+	PeriodSeconds       int                                    `json:"PeriodSeconds" xml:"PeriodSeconds"`
+	SuccessThreshold    int                                    `json:"SuccessThreshold" xml:"SuccessThreshold"`
+	FailureThreshold    int                                    `json:"FailureThreshold" xml:"FailureThreshold"`
+	TimeoutSeconds      int                                    `json:"TimeoutSeconds" xml:"TimeoutSeconds"`
+	Exec                ExportContainerGroupTemplateExec4      `json:"Exec" xml:"Exec"`
+	TcpSocket           ExportContainerGroupTemplateTcpSocket4 `json:"TcpSocket" xml:"TcpSocket"`
+	HttpGet             ExportContainerGroupTemplateHttpGet4   `json:"HttpGet" xml:"HttpGet"`
+}
+
+type ExportContainerGroupTemplateDnsConfig2 struct {
+	Options     []ExportContainerGroupTemplateOptions3 `json:"Options" xml:"Options"`
+	NameServers []string                               `json:"NameServers" xml:"NameServers"`
+	Searches    []string                               `json:"Searches" xml:"Searches"`
+}
+
+type ExportContainerGroupTemplateOptions3 struct {
+	Option []ExportContainerGroupTemplateOption4 `json:"Option" xml:"Option"`
+}
+
+type ExportContainerGroupTemplateOption4 struct {
+	Name  string `json:"Name" xml:"Name"`
+	Value string `json:"Value" xml:"Value"`
+}
+
+type ExportContainerGroupTemplateSecurityContext2 struct {
+	Sysctls []ExportContainerGroupTemplateSysctls3 `json:"Sysctls" xml:"Sysctls"`
+}
+
+type ExportContainerGroupTemplateSysctls3 struct {
+	Sysctl []ExportContainerGroupTemplateSysctl4 `json:"Sysctl" xml:"Sysctl"`
+}
+
+type ExportContainerGroupTemplateSysctl4 struct {
+	Name  string `json:"Name" xml:"Name"`
+	Value string `json:"Value" xml:"Value"`
+}
+
+// CreateExportContainerGroupTemplateRequest creates a request to invoke ExportContainerGroupTemplate API
+func CreateExportContainerGroupTemplateRequest() (request *ExportContainerGroupTemplateRequest) {
+	request = &ExportContainerGroupTemplateRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("Eci", "2018-08-08", "ExportContainerGroupTemplate", "eci", "openAPI")
+	return
+}
+
+// CreateExportContainerGroupTemplateResponse creates a response to parse from ExportContainerGroupTemplate response
+func CreateExportContainerGroupTemplateResponse() (response *ExportContainerGroupTemplateResponse) {
+	response = &ExportContainerGroupTemplateResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 109 - 0
services/eci/restart_container_group.go

@@ -0,0 +1,109 @@
+//Licensed under the Apache License, Version 2.0 (the "License");
+//you may not use this file except in compliance with the License.
+//You may obtain a copy of the License at
+//
+//http://www.apache.org/licenses/LICENSE-2.0
+//
+//Unless required by applicable law or agreed to in writing, software
+//distributed under the License is distributed on an "AS IS" BASIS,
+//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//See the License for the specific language governing permissions and
+//limitations under the License.
+//
+// Code generated by Alibaba Cloud SDK Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+package eci
+
+import (
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
+)
+
+// RestartContainerGroup invokes the eci.RestartContainerGroup API synchronously
+// api document: https://help.aliyun.com/api/eci/restartcontainergroup.html
+func (client *Client) RestartContainerGroup(request *RestartContainerGroupRequest) (response *RestartContainerGroupResponse, err error) {
+	response = CreateRestartContainerGroupResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// RestartContainerGroupWithChan invokes the eci.RestartContainerGroup API asynchronously
+// api document: https://help.aliyun.com/api/eci/restartcontainergroup.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) RestartContainerGroupWithChan(request *RestartContainerGroupRequest) (<-chan *RestartContainerGroupResponse, <-chan error) {
+	responseChan := make(chan *RestartContainerGroupResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.RestartContainerGroup(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// RestartContainerGroupWithCallback invokes the eci.RestartContainerGroup API asynchronously
+// api document: https://help.aliyun.com/api/eci/restartcontainergroup.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) RestartContainerGroupWithCallback(request *RestartContainerGroupRequest, callback func(response *RestartContainerGroupResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *RestartContainerGroupResponse
+		var err error
+		defer close(result)
+		response, err = client.RestartContainerGroup(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// RestartContainerGroupRequest is the request struct for api RestartContainerGroup
+type RestartContainerGroupRequest struct {
+	*requests.RpcRequest
+	OwnerId              requests.Integer `position:"Query" name:"OwnerId"`
+	ResourceOwnerAccount string           `position:"Query" name:"ResourceOwnerAccount"`
+	ResourceOwnerId      requests.Integer `position:"Query" name:"ResourceOwnerId"`
+	OwnerAccount         string           `position:"Query" name:"OwnerAccount"`
+	RegionId             string           `position:"Query" name:"RegionId"`
+	ContainerGroupId     string           `position:"Query" name:"ContainerGroupId"`
+	ClientToken          string           `position:"Query" name:"ClientToken"`
+}
+
+// RestartContainerGroupResponse is the response struct for api RestartContainerGroup
+type RestartContainerGroupResponse struct {
+	*responses.BaseResponse
+	RequestId string `json:"RequestId" xml:"RequestId"`
+}
+
+// CreateRestartContainerGroupRequest creates a request to invoke RestartContainerGroup API
+func CreateRestartContainerGroupRequest() (request *RestartContainerGroupRequest) {
+	request = &RestartContainerGroupRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("Eci", "2018-08-08", "RestartContainerGroup", "eci", "openAPI")
+	return
+}
+
+// CreateRestartContainerGroupResponse creates a response to parse from RestartContainerGroup response
+func CreateRestartContainerGroupResponse() (response *RestartContainerGroupResponse) {
+	response = &RestartContainerGroupResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 270 - 0
services/eci/update_container_group.go

@@ -0,0 +1,270 @@
+//Licensed under the Apache License, Version 2.0 (the "License");
+//you may not use this file except in compliance with the License.
+//You may obtain a copy of the License at
+//
+//http://www.apache.org/licenses/LICENSE-2.0
+//
+//Unless required by applicable law or agreed to in writing, software
+//distributed under the License is distributed on an "AS IS" BASIS,
+//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//See the License for the specific language governing permissions and
+//limitations under the License.
+//
+// Code generated by Alibaba Cloud SDK Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+package eci
+
+import (
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
+)
+
+// UpdateContainerGroup invokes the eci.UpdateContainerGroup API synchronously
+// api document: https://help.aliyun.com/api/eci/updatecontainergroup.html
+func (client *Client) UpdateContainerGroup(request *UpdateContainerGroupRequest) (response *UpdateContainerGroupResponse, err error) {
+	response = CreateUpdateContainerGroupResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// UpdateContainerGroupWithChan invokes the eci.UpdateContainerGroup API asynchronously
+// api document: https://help.aliyun.com/api/eci/updatecontainergroup.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) UpdateContainerGroupWithChan(request *UpdateContainerGroupRequest) (<-chan *UpdateContainerGroupResponse, <-chan error) {
+	responseChan := make(chan *UpdateContainerGroupResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.UpdateContainerGroup(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// UpdateContainerGroupWithCallback invokes the eci.UpdateContainerGroup API asynchronously
+// api document: https://help.aliyun.com/api/eci/updatecontainergroup.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) UpdateContainerGroupWithCallback(request *UpdateContainerGroupRequest, callback func(response *UpdateContainerGroupResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *UpdateContainerGroupResponse
+		var err error
+		defer close(result)
+		response, err = client.UpdateContainerGroup(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// UpdateContainerGroupRequest is the request struct for api UpdateContainerGroup
+type UpdateContainerGroupRequest struct {
+	*requests.RpcRequest
+	OwnerId                 requests.Integer                               `position:"Query" name:"OwnerId"`
+	ResourceOwnerAccount    string                                         `position:"Query" name:"ResourceOwnerAccount"`
+	ResourceOwnerId         requests.Integer                               `position:"Query" name:"ResourceOwnerId"`
+	OwnerAccount            string                                         `position:"Query" name:"OwnerAccount"`
+	RegionId                string                                         `position:"Query" name:"RegionId"`
+	ContainerGroupId        string                                         `position:"Query" name:"ContainerGroupId"`
+	RestartPolicy           string                                         `position:"Query" name:"RestartPolicy"`
+	Tag                     *[]UpdateContainerGroupTag                     `position:"Query" name:"Tag" type:"Repeated"`
+	Volume                  *[]UpdateContainerGroupVolume                  `position:"Query" name:"Volume" type:"Repeated"`
+	Container               *[]UpdateContainerGroupContainer               `position:"Query" name:"Container" type:"Repeated"`
+	InitContainer           *[]UpdateContainerGroupInitContainer           `position:"Query" name:"InitContainer" type:"Repeated"`
+	ImageRegistryCredential *[]UpdateContainerGroupImageRegistryCredential `position:"Query" name:"ImageRegistryCredential" type:"Repeated"`
+	ClientToken             string                                         `position:"Query" name:"ClientToken"`
+	Cpu                     requests.Float                                 `position:"Query" name:"Cpu"`
+	Memory                  requests.Float                                 `position:"Query" name:"Memory"`
+	DnsConfig               UpdateContainerGroupDnsConfig                  `position:"Query" name:"DnsConfig" type:"Struct"`
+}
+
+type UpdateContainerGroupTag struct {
+	Key   string `name:"Key"`
+	Value string `name:"Value"`
+}
+
+type UpdateContainerGroupVolume struct {
+	Name             string                               `name:"Name"`
+	Type             string                               `name:"Type"`
+	NFSVolume        UpdateContainerGroupNFSVolume        `name:"NFSVolume" type:"Struct"`
+	ConfigFileVolume UpdateContainerGroupConfigFileVolume `name:"ConfigFileVolume" type:"Struct"`
+	EmptyDirVolume   UpdateContainerGroupEmptyDirVolume   `name:"EmptyDirVolume" type:"Struct"`
+}
+
+type UpdateContainerGroupContainer struct {
+	Name            string                              `name:"Name"`
+	Image           string                              `name:"Image"`
+	Cpu             requests.Float                      `name:"Cpu"`
+	Memory          requests.Float                      `name:"Memory"`
+	WorkingDir      string                              `name:"WorkingDir"`
+	ImagePullPolicy string                              `name:"ImagePullPolicy"`
+	Stdin           requests.Boolean                    `name:"Stdin"`
+	StdinOnce       requests.Boolean                    `name:"StdinOnce"`
+	Tty             requests.Boolean                    `name:"Tty"`
+	Command         []string                            `name:"Command" type:"Repeated"`
+	Arg             []string                            `name:"Arg" type:"Repeated"`
+	EnvironmentVar  []string                            `name:"EnvironmentVar" type:"Repeated"`
+	Port            []string                            `name:"Port" type:"Repeated"`
+	VolumeMount     []string                            `name:"VolumeMount" type:"Repeated"`
+	Gpu             requests.Integer                    `name:"Gpu"`
+	ReadinessProbe  UpdateContainerGroupReadinessProbe  `name:"ReadinessProbe" type:"Struct"`
+	LivenessProbe   UpdateContainerGroupLivenessProbe   `name:"LivenessProbe" type:"Struct"`
+	SecurityContext UpdateContainerGroupSecurityContext `name:"SecurityContext" type:"Struct"`
+}
+
+type UpdateContainerGroupInitContainer struct {
+	Name            string                                `name:"Name"`
+	Image           string                                `name:"Image"`
+	Cpu             requests.Float                        `name:"Cpu"`
+	Memory          requests.Float                        `name:"Memory"`
+	WorkingDir      string                                `name:"WorkingDir"`
+	ImagePullPolicy string                                `name:"ImagePullPolicy"`
+	Stdin           requests.Boolean                      `name:"Stdin"`
+	StdinOnce       requests.Boolean                      `name:"StdinOnce"`
+	Tty             requests.Boolean                      `name:"Tty"`
+	Command         []string                              `name:"Command" type:"Repeated"`
+	Arg             []string                              `name:"Arg" type:"Repeated"`
+	EnvironmentVar  *[]UpdateContainerGroupEnvironmentVar `name:"EnvironmentVar" type:"Repeated"`
+	Port            *[]UpdateContainerGroupPort           `name:"Port" type:"Repeated"`
+	VolumeMount     *[]UpdateContainerGroupVolumeMount    `name:"VolumeMount" type:"Repeated"`
+	Gpu             requests.Integer                      `name:"Gpu"`
+	SecurityContext UpdateContainerGroupSecurityContext   `name:"SecurityContext" type:"Struct"`
+}
+
+type UpdateContainerGroupImageRegistryCredential struct {
+	Server   string `name:"Server"`
+	UserName string `name:"UserName"`
+	Password string `name:"Password"`
+}
+
+type UpdateContainerGroupDnsConfig struct {
+	NameServer []string                      `name:"NameServer"`
+	Search     []string                      `name:"Search"`
+	Option     *[]UpdateContainerGroupOption `name:"Option"`
+}
+
+type UpdateContainerGroupNFSVolume struct {
+	Server   string           `name:"Server"`
+	Path     string           `name:"Path"`
+	ReadOnly requests.Boolean `name:"ReadOnly"`
+}
+
+type UpdateContainerGroupConfigFileVolume struct {
+	ConfigFileToPath *[]UpdateContainerGroupConfigFileToPath `name:"ConfigFileToPath"`
+}
+
+type UpdateContainerGroupConfigFileToPath struct {
+	Content string `name:"Content"`
+	Path    string `name:"Path"`
+}
+
+type UpdateContainerGroupEmptyDirVolume struct {
+	Medium string `name:"Medium"`
+}
+
+type UpdateContainerGroupReadinessProbe struct {
+	InitialDelaySeconds requests.Integer              `name:"InitialDelaySeconds"`
+	PeriodSeconds       requests.Integer              `name:"PeriodSeconds"`
+	SuccessThreshold    requests.Integer              `name:"SuccessThreshold"`
+	FailureThreshold    requests.Integer              `name:"FailureThreshold"`
+	TimeoutSeconds      requests.Integer              `name:"TimeoutSeconds"`
+	TcpSocket           UpdateContainerGroupTcpSocket `name:"TcpSocket"`
+	Exec                UpdateContainerGroupExec      `name:"Exec"`
+	HttpGet             UpdateContainerGroupHttpGet   `name:"HttpGet"`
+}
+
+type UpdateContainerGroupTcpSocket struct {
+	Port requests.Integer `name:"Port"`
+}
+
+type UpdateContainerGroupExec struct {
+	Command []string `name:"Command"`
+}
+
+type UpdateContainerGroupHttpGet struct {
+	Path   string           `name:"Path"`
+	Port   requests.Integer `name:"Port"`
+	Scheme string           `name:"Scheme"`
+}
+
+type UpdateContainerGroupLivenessProbe struct {
+	InitialDelaySeconds requests.Integer              `name:"InitialDelaySeconds"`
+	PeriodSeconds       requests.Integer              `name:"PeriodSeconds"`
+	SuccessThreshold    requests.Integer              `name:"SuccessThreshold"`
+	FailureThreshold    requests.Integer              `name:"FailureThreshold"`
+	TimeoutSeconds      requests.Integer              `name:"TimeoutSeconds"`
+	TcpSocket           UpdateContainerGroupTcpSocket `name:"TcpSocket"`
+	Exec                UpdateContainerGroupExec      `name:"Exec"`
+	HttpGet             UpdateContainerGroupHttpGet   `name:"HttpGet"`
+}
+
+type UpdateContainerGroupSecurityContext struct {
+	ReadOnlyRootFilesystem requests.Boolean               `name:"ReadOnlyRootFilesystem"`
+	RunAsUser              requests.Integer               `name:"RunAsUser"`
+	Capability             UpdateContainerGroupCapability `name:"Capability"`
+}
+
+type UpdateContainerGroupCapability struct {
+	Add []string `name:"Add"`
+}
+
+type UpdateContainerGroupEnvironmentVar struct {
+	Key   string `name:"Key"`
+	Value string `name:"Value"`
+}
+
+type UpdateContainerGroupPort struct {
+	Port     requests.Integer `name:"Port"`
+	Protocol string           `name:"Protocol"`
+}
+
+type UpdateContainerGroupVolumeMount struct {
+	Name      string           `name:"Name"`
+	MountPath string           `name:"MountPath"`
+	SubPath   string           `name:"SubPath"`
+	ReadOnly  requests.Boolean `name:"ReadOnly"`
+}
+
+type UpdateContainerGroupOption struct {
+	Name  string `name:"Name"`
+	Value string `name:"Value"`
+}
+
+// UpdateContainerGroupResponse is the response struct for api UpdateContainerGroup
+type UpdateContainerGroupResponse struct {
+	*responses.BaseResponse
+	RequestId string `json:"RequestId" xml:"RequestId"`
+}
+
+// CreateUpdateContainerGroupRequest creates a request to invoke UpdateContainerGroup API
+func CreateUpdateContainerGroupRequest() (request *UpdateContainerGroupRequest) {
+	request = &UpdateContainerGroupRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("Eci", "2018-08-08", "UpdateContainerGroup", "eci", "openAPI")
+	return
+}
+
+// CreateUpdateContainerGroupResponse creates a response to parse from UpdateContainerGroup response
+func CreateUpdateContainerGroupResponse() (response *UpdateContainerGroupResponse) {
+	response = &UpdateContainerGroupResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 109 - 0
services/eci/update_container_group_by_template.go

@@ -0,0 +1,109 @@
+//Licensed under the Apache License, Version 2.0 (the "License");
+//you may not use this file except in compliance with the License.
+//You may obtain a copy of the License at
+//
+//http://www.apache.org/licenses/LICENSE-2.0
+//
+//Unless required by applicable law or agreed to in writing, software
+//distributed under the License is distributed on an "AS IS" BASIS,
+//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//See the License for the specific language governing permissions and
+//limitations under the License.
+//
+// Code generated by Alibaba Cloud SDK Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+package eci
+
+import (
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
+)
+
+// UpdateContainerGroupByTemplate invokes the eci.UpdateContainerGroupByTemplate API synchronously
+// api document: https://help.aliyun.com/api/eci/updatecontainergroupbytemplate.html
+func (client *Client) UpdateContainerGroupByTemplate(request *UpdateContainerGroupByTemplateRequest) (response *UpdateContainerGroupByTemplateResponse, err error) {
+	response = CreateUpdateContainerGroupByTemplateResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// UpdateContainerGroupByTemplateWithChan invokes the eci.UpdateContainerGroupByTemplate API asynchronously
+// api document: https://help.aliyun.com/api/eci/updatecontainergroupbytemplate.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) UpdateContainerGroupByTemplateWithChan(request *UpdateContainerGroupByTemplateRequest) (<-chan *UpdateContainerGroupByTemplateResponse, <-chan error) {
+	responseChan := make(chan *UpdateContainerGroupByTemplateResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.UpdateContainerGroupByTemplate(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// UpdateContainerGroupByTemplateWithCallback invokes the eci.UpdateContainerGroupByTemplate API asynchronously
+// api document: https://help.aliyun.com/api/eci/updatecontainergroupbytemplate.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) UpdateContainerGroupByTemplateWithCallback(request *UpdateContainerGroupByTemplateRequest, callback func(response *UpdateContainerGroupByTemplateResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *UpdateContainerGroupByTemplateResponse
+		var err error
+		defer close(result)
+		response, err = client.UpdateContainerGroupByTemplate(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// UpdateContainerGroupByTemplateRequest is the request struct for api UpdateContainerGroupByTemplate
+type UpdateContainerGroupByTemplateRequest struct {
+	*requests.RpcRequest
+	OwnerId              requests.Integer `position:"Query" name:"OwnerId"`
+	ResourceOwnerAccount string           `position:"Query" name:"ResourceOwnerAccount"`
+	ResourceOwnerId      requests.Integer `position:"Query" name:"ResourceOwnerId"`
+	OwnerAccount         string           `position:"Query" name:"OwnerAccount"`
+	RegionId             string           `position:"Query" name:"RegionId"`
+	Template             string           `position:"Body" name:"Template"`
+	ClientToken          string           `position:"Query" name:"ClientToken"`
+}
+
+// UpdateContainerGroupByTemplateResponse is the response struct for api UpdateContainerGroupByTemplate
+type UpdateContainerGroupByTemplateResponse struct {
+	*responses.BaseResponse
+	RequestId string `json:"RequestId" xml:"RequestId"`
+}
+
+// CreateUpdateContainerGroupByTemplateRequest creates a request to invoke UpdateContainerGroupByTemplate API
+func CreateUpdateContainerGroupByTemplateRequest() (request *UpdateContainerGroupByTemplateRequest) {
+	request = &UpdateContainerGroupByTemplateRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("Eci", "2018-08-08", "UpdateContainerGroupByTemplate", "eci", "openAPI")
+	return
+}
+
+// CreateUpdateContainerGroupByTemplateResponse creates a response to parse from UpdateContainerGroupByTemplate response
+func CreateUpdateContainerGroupByTemplateResponse() (response *UpdateContainerGroupByTemplateResponse) {
+	response = &UpdateContainerGroupByTemplateResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}