sdk-team 5 лет назад
Родитель
Сommit
b212338ab0

+ 6 - 0
ChangeLog.txt

@@ -1,3 +1,9 @@
+2020-03-16 Version: v1.61.59
+- Generated 2014-05-26 for `Ecs`.
+- Add ImageFamily paramters and apis, in Instance creation apis and Image query apis, and add DescribeImageFromFamily.
+- Add Instance batch operation apis RebootInstances StartInstances and StopInstances.
+- Add EncryptAlgorithm paramter in instance creati
+
 2020-03-13 Version: v1.61.58
 - Generated 2020-02-06 for `acms-open`.
 - ACM POP SDK.

+ 1 - 0
services/ecs/copy_image.go

@@ -78,6 +78,7 @@ type CopyImageRequest struct {
 	*requests.RpcRequest
 	ResourceOwnerId        requests.Integer `position:"Query" name:"ResourceOwnerId"`
 	ImageId                string           `position:"Query" name:"ImageId"`
+	EncryptAlgorithm       string           `position:"Query" name:"EncryptAlgorithm"`
 	DestinationRegionId    string           `position:"Query" name:"DestinationRegionId"`
 	Tag                    *[]CopyImageTag  `position:"Query" name:"Tag"  type:"Repeated"`
 	ResourceOwnerAccount   string           `position:"Query" name:"ResourceOwnerAccount"`

+ 1 - 0
services/ecs/create_disk.go

@@ -79,6 +79,7 @@ type CreateDiskRequest struct {
 	ResourceOwnerId           requests.Integer `position:"Query" name:"ResourceOwnerId"`
 	SnapshotId                string           `position:"Query" name:"SnapshotId"`
 	ClientToken               string           `position:"Query" name:"ClientToken"`
+	EncryptAlgorithm          string           `position:"Query" name:"EncryptAlgorithm"`
 	Description               string           `position:"Query" name:"Description"`
 	DiskName                  string           `position:"Query" name:"DiskName"`
 	ResourceGroupId           string           `position:"Query" name:"ResourceGroupId"`

+ 1 - 0
services/ecs/create_image.go

@@ -90,6 +90,7 @@ type CreateImageRequest struct {
 	OwnerAccount         string                          `position:"Query" name:"OwnerAccount"`
 	OwnerId              requests.Integer                `position:"Query" name:"OwnerId"`
 	InstanceId           string                          `position:"Query" name:"InstanceId"`
+	ImageFamily          string                          `position:"Query" name:"ImageFamily"`
 	ImageVersion         string                          `position:"Query" name:"ImageVersion"`
 }
 

+ 2 - 0
services/ecs/create_instance.go

@@ -134,6 +134,7 @@ type CreateInstanceRequest struct {
 	DataDisk                      *[]CreateInstanceDataDisk `position:"Query" name:"DataDisk"  type:"Repeated"`
 	StorageSetId                  string                    `position:"Query" name:"StorageSetId"`
 	SystemDiskSize                requests.Integer          `position:"Query" name:"SystemDisk.Size"`
+	ImageFamily                   string                    `position:"Query" name:"ImageFamily"`
 	SystemDiskDescription         string                    `position:"Query" name:"SystemDisk.Description"`
 }
 
@@ -157,6 +158,7 @@ type CreateInstanceDataDisk struct {
 	Size               string `name:"Size"`
 	Encrypted          string `name:"Encrypted"`
 	PerformanceLevel   string `name:"PerformanceLevel"`
+	EncryptAlgorithm   string `name:"EncryptAlgorithm"`
 	Description        string `name:"Description"`
 	Category           string `name:"Category"`
 	KMSKeyId           string `name:"KMSKeyId"`

+ 108 - 0
services/ecs/describe_image_from_family.go

@@ -0,0 +1,108 @@
+package ecs
+
+//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.
+
+import (
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
+)
+
+// DescribeImageFromFamily invokes the ecs.DescribeImageFromFamily API synchronously
+// api document: https://help.aliyun.com/api/ecs/describeimagefromfamily.html
+func (client *Client) DescribeImageFromFamily(request *DescribeImageFromFamilyRequest) (response *DescribeImageFromFamilyResponse, err error) {
+	response = CreateDescribeImageFromFamilyResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// DescribeImageFromFamilyWithChan invokes the ecs.DescribeImageFromFamily API asynchronously
+// api document: https://help.aliyun.com/api/ecs/describeimagefromfamily.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) DescribeImageFromFamilyWithChan(request *DescribeImageFromFamilyRequest) (<-chan *DescribeImageFromFamilyResponse, <-chan error) {
+	responseChan := make(chan *DescribeImageFromFamilyResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.DescribeImageFromFamily(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// DescribeImageFromFamilyWithCallback invokes the ecs.DescribeImageFromFamily API asynchronously
+// api document: https://help.aliyun.com/api/ecs/describeimagefromfamily.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) DescribeImageFromFamilyWithCallback(request *DescribeImageFromFamilyRequest, callback func(response *DescribeImageFromFamilyResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *DescribeImageFromFamilyResponse
+		var err error
+		defer close(result)
+		response, err = client.DescribeImageFromFamily(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// DescribeImageFromFamilyRequest is the request struct for api DescribeImageFromFamily
+type DescribeImageFromFamilyRequest struct {
+	*requests.RpcRequest
+	ResourceOwnerId      requests.Integer `position:"Query" name:"ResourceOwnerId"`
+	ResourceOwnerAccount string           `position:"Query" name:"ResourceOwnerAccount"`
+	OwnerAccount         string           `position:"Query" name:"OwnerAccount"`
+	OwnerId              requests.Integer `position:"Query" name:"OwnerId"`
+	ImageFamily          string           `position:"Query" name:"ImageFamily"`
+}
+
+// DescribeImageFromFamilyResponse is the response struct for api DescribeImageFromFamily
+type DescribeImageFromFamilyResponse struct {
+	*responses.BaseResponse
+	RequestId string `json:"RequestId" xml:"RequestId"`
+	Image     Image  `json:"Image" xml:"Image"`
+}
+
+// CreateDescribeImageFromFamilyRequest creates a request to invoke DescribeImageFromFamily API
+func CreateDescribeImageFromFamilyRequest() (request *DescribeImageFromFamilyRequest) {
+	request = &DescribeImageFromFamilyRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("Ecs", "2014-05-26", "DescribeImageFromFamily", "ecs", "openAPI")
+	return
+}
+
+// CreateDescribeImageFromFamilyResponse creates a response to parse from DescribeImageFromFamily response
+func CreateDescribeImageFromFamilyResponse() (response *DescribeImageFromFamilyResponse) {
+	response = &DescribeImageFromFamilyResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 1 - 0
services/ecs/describe_images.go

@@ -98,6 +98,7 @@ type DescribeImagesRequest struct {
 	OSType               string                  `position:"Query" name:"OSType"`
 	OwnerId              requests.Integer        `position:"Query" name:"OwnerId"`
 	Filter               *[]DescribeImagesFilter `position:"Query" name:"Filter"  type:"Repeated"`
+	ImageFamily          string                  `position:"Query" name:"ImageFamily"`
 	Status               string                  `position:"Query" name:"Status"`
 }
 

+ 1 - 0
services/ecs/describe_instance_status.go

@@ -83,6 +83,7 @@ type DescribeInstanceStatusRequest struct {
 	OwnerAccount         string           `position:"Query" name:"OwnerAccount"`
 	ClusterId            string           `position:"Query" name:"ClusterId"`
 	OwnerId              requests.Integer `position:"Query" name:"OwnerId"`
+	InstanceId           *[]string        `position:"Query" name:"InstanceId"  type:"Repeated"`
 	ZoneId               string           `position:"Query" name:"ZoneId"`
 }
 

+ 13 - 5
services/ecs/import_key_pair.go

@@ -76,11 +76,19 @@ func (client *Client) ImportKeyPairWithCallback(request *ImportKeyPairRequest, c
 // ImportKeyPairRequest is the request struct for api ImportKeyPair
 type ImportKeyPairRequest struct {
 	*requests.RpcRequest
-	ResourceOwnerId      requests.Integer `position:"Query" name:"ResourceOwnerId"`
-	KeyPairName          string           `position:"Query" name:"KeyPairName"`
-	ResourceOwnerAccount string           `position:"Query" name:"ResourceOwnerAccount"`
-	PublicKeyBody        string           `position:"Query" name:"PublicKeyBody"`
-	OwnerId              requests.Integer `position:"Query" name:"OwnerId"`
+	ResourceOwnerId      requests.Integer    `position:"Query" name:"ResourceOwnerId"`
+	KeyPairName          string              `position:"Query" name:"KeyPairName"`
+	ResourceGroupId      string              `position:"Query" name:"ResourceGroupId"`
+	Tag                  *[]ImportKeyPairTag `position:"Query" name:"Tag"  type:"Repeated"`
+	ResourceOwnerAccount string              `position:"Query" name:"ResourceOwnerAccount"`
+	PublicKeyBody        string              `position:"Query" name:"PublicKeyBody"`
+	OwnerId              requests.Integer    `position:"Query" name:"OwnerId"`
+}
+
+// ImportKeyPairTag is a repeated param struct in ImportKeyPairRequest
+type ImportKeyPairTag struct {
+	Value string `name:"Value"`
+	Key   string `name:"Key"`
 }
 
 // ImportKeyPairResponse is the response struct for api ImportKeyPair

+ 1 - 0
services/ecs/modify_image_attribute.go

@@ -83,6 +83,7 @@ type ModifyImageAttributeRequest struct {
 	ResourceOwnerAccount string           `position:"Query" name:"ResourceOwnerAccount"`
 	OwnerAccount         string           `position:"Query" name:"OwnerAccount"`
 	OwnerId              requests.Integer `position:"Query" name:"OwnerId"`
+	Status               string           `position:"Query" name:"Status"`
 }
 
 // ModifyImageAttributeResponse is the response struct for api ModifyImageAttribute

+ 109 - 0
services/ecs/reboot_instances.go

@@ -0,0 +1,109 @@
+package ecs
+
+//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.
+
+import (
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
+)
+
+// RebootInstances invokes the ecs.RebootInstances API synchronously
+// api document: https://help.aliyun.com/api/ecs/rebootinstances.html
+func (client *Client) RebootInstances(request *RebootInstancesRequest) (response *RebootInstancesResponse, err error) {
+	response = CreateRebootInstancesResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// RebootInstancesWithChan invokes the ecs.RebootInstances API asynchronously
+// api document: https://help.aliyun.com/api/ecs/rebootinstances.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) RebootInstancesWithChan(request *RebootInstancesRequest) (<-chan *RebootInstancesResponse, <-chan error) {
+	responseChan := make(chan *RebootInstancesResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.RebootInstances(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// RebootInstancesWithCallback invokes the ecs.RebootInstances API asynchronously
+// api document: https://help.aliyun.com/api/ecs/rebootinstances.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) RebootInstancesWithCallback(request *RebootInstancesRequest, callback func(response *RebootInstancesResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *RebootInstancesResponse
+		var err error
+		defer close(result)
+		response, err = client.RebootInstances(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// RebootInstancesRequest is the request struct for api RebootInstances
+type RebootInstancesRequest struct {
+	*requests.RpcRequest
+	ResourceOwnerId      requests.Integer `position:"Query" name:"ResourceOwnerId"`
+	DryRun               requests.Boolean `position:"Query" name:"DryRun"`
+	ResourceOwnerAccount string           `position:"Query" name:"ResourceOwnerAccount"`
+	OwnerAccount         string           `position:"Query" name:"OwnerAccount"`
+	OwnerId              requests.Integer `position:"Query" name:"OwnerId"`
+	ForceReboot          requests.Boolean `position:"Query" name:"ForceReboot"`
+	InstanceId           *[]string        `position:"Query" name:"InstanceId"  type:"Repeated"`
+}
+
+// RebootInstancesResponse is the response struct for api RebootInstances
+type RebootInstancesResponse struct {
+	*responses.BaseResponse
+	RequestId string `json:"RequestId" xml:"RequestId"`
+}
+
+// CreateRebootInstancesRequest creates a request to invoke RebootInstances API
+func CreateRebootInstancesRequest() (request *RebootInstancesRequest) {
+	request = &RebootInstancesRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("Ecs", "2014-05-26", "RebootInstances", "ecs", "openAPI")
+	return
+}
+
+// CreateRebootInstancesResponse creates a response to parse from RebootInstances response
+func CreateRebootInstancesResponse() (response *RebootInstancesResponse) {
+	response = &RebootInstancesResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 2 - 0
services/ecs/run_instances.go

@@ -144,6 +144,7 @@ type RunInstancesRequest struct {
 	LaunchTemplateVersion          requests.Integer                `position:"Query" name:"LaunchTemplateVersion"`
 	StorageSetId                   string                          `position:"Query" name:"StorageSetId"`
 	SystemDiskSize                 string                          `position:"Query" name:"SystemDisk.Size"`
+	ImageFamily                    string                          `position:"Query" name:"ImageFamily"`
 	SystemDiskDescription          string                          `position:"Query" name:"SystemDisk.Description"`
 }
 
@@ -176,6 +177,7 @@ type RunInstancesDataDisk struct {
 	DeleteWithInstance   string `name:"DeleteWithInstance"`
 	PerformanceLevel     string `name:"PerformanceLevel"`
 	AutoSnapshotPolicyId string `name:"AutoSnapshotPolicyId"`
+	EncryptAlgorithm     string `name:"EncryptAlgorithm"`
 }
 
 // RunInstancesResponse is the response struct for api RunInstances

+ 108 - 0
services/ecs/start_instances.go

@@ -0,0 +1,108 @@
+package ecs
+
+//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.
+
+import (
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
+)
+
+// StartInstances invokes the ecs.StartInstances API synchronously
+// api document: https://help.aliyun.com/api/ecs/startinstances.html
+func (client *Client) StartInstances(request *StartInstancesRequest) (response *StartInstancesResponse, err error) {
+	response = CreateStartInstancesResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// StartInstancesWithChan invokes the ecs.StartInstances API asynchronously
+// api document: https://help.aliyun.com/api/ecs/startinstances.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) StartInstancesWithChan(request *StartInstancesRequest) (<-chan *StartInstancesResponse, <-chan error) {
+	responseChan := make(chan *StartInstancesResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.StartInstances(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// StartInstancesWithCallback invokes the ecs.StartInstances API asynchronously
+// api document: https://help.aliyun.com/api/ecs/startinstances.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) StartInstancesWithCallback(request *StartInstancesRequest, callback func(response *StartInstancesResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *StartInstancesResponse
+		var err error
+		defer close(result)
+		response, err = client.StartInstances(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// StartInstancesRequest is the request struct for api StartInstances
+type StartInstancesRequest struct {
+	*requests.RpcRequest
+	ResourceOwnerId      requests.Integer `position:"Query" name:"ResourceOwnerId"`
+	DryRun               requests.Boolean `position:"Query" name:"DryRun"`
+	ResourceOwnerAccount string           `position:"Query" name:"ResourceOwnerAccount"`
+	OwnerAccount         string           `position:"Query" name:"OwnerAccount"`
+	OwnerId              requests.Integer `position:"Query" name:"OwnerId"`
+	InstanceId           *[]string        `position:"Query" name:"InstanceId"  type:"Repeated"`
+}
+
+// StartInstancesResponse is the response struct for api StartInstances
+type StartInstancesResponse struct {
+	*responses.BaseResponse
+	RequestId string `json:"RequestId" xml:"RequestId"`
+}
+
+// CreateStartInstancesRequest creates a request to invoke StartInstances API
+func CreateStartInstancesRequest() (request *StartInstancesRequest) {
+	request = &StartInstancesRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("Ecs", "2014-05-26", "StartInstances", "ecs", "openAPI")
+	return
+}
+
+// CreateStartInstancesResponse creates a response to parse from StartInstances response
+func CreateStartInstancesResponse() (response *StartInstancesResponse) {
+	response = &StartInstancesResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 110 - 0
services/ecs/stop_instances.go

@@ -0,0 +1,110 @@
+package ecs
+
+//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.
+
+import (
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
+)
+
+// StopInstances invokes the ecs.StopInstances API synchronously
+// api document: https://help.aliyun.com/api/ecs/stopinstances.html
+func (client *Client) StopInstances(request *StopInstancesRequest) (response *StopInstancesResponse, err error) {
+	response = CreateStopInstancesResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// StopInstancesWithChan invokes the ecs.StopInstances API asynchronously
+// api document: https://help.aliyun.com/api/ecs/stopinstances.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) StopInstancesWithChan(request *StopInstancesRequest) (<-chan *StopInstancesResponse, <-chan error) {
+	responseChan := make(chan *StopInstancesResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.StopInstances(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// StopInstancesWithCallback invokes the ecs.StopInstances API asynchronously
+// api document: https://help.aliyun.com/api/ecs/stopinstances.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) StopInstancesWithCallback(request *StopInstancesRequest, callback func(response *StopInstancesResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *StopInstancesResponse
+		var err error
+		defer close(result)
+		response, err = client.StopInstances(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// StopInstancesRequest is the request struct for api StopInstances
+type StopInstancesRequest struct {
+	*requests.RpcRequest
+	ResourceOwnerId      requests.Integer `position:"Query" name:"ResourceOwnerId"`
+	StoppedMode          string           `position:"Query" name:"StoppedMode"`
+	ForceStop            requests.Boolean `position:"Query" name:"ForceStop"`
+	DryRun               requests.Boolean `position:"Query" name:"DryRun"`
+	ResourceOwnerAccount string           `position:"Query" name:"ResourceOwnerAccount"`
+	OwnerAccount         string           `position:"Query" name:"OwnerAccount"`
+	OwnerId              requests.Integer `position:"Query" name:"OwnerId"`
+	InstanceId           *[]string        `position:"Query" name:"InstanceId"  type:"Repeated"`
+}
+
+// StopInstancesResponse is the response struct for api StopInstances
+type StopInstancesResponse struct {
+	*responses.BaseResponse
+	RequestId string `json:"RequestId" xml:"RequestId"`
+}
+
+// CreateStopInstancesRequest creates a request to invoke StopInstances API
+func CreateStopInstancesRequest() (request *StopInstancesRequest) {
+	request = &StopInstancesRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("Ecs", "2014-05-26", "StopInstances", "ecs", "openAPI")
+	return
+}
+
+// CreateStopInstancesResponse creates a response to parse from StopInstances response
+func CreateStopInstancesResponse() (response *StopInstancesResponse) {
+	response = &StopInstancesResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 7 - 7
services/ecs/struct_disk_device_mapping.go

@@ -17,13 +17,13 @@ package ecs
 
 // DiskDeviceMapping is a nested struct in ecs response
 type DiskDeviceMapping struct {
-	SnapshotId      string `json:"SnapshotId" xml:"SnapshotId"`
-	Size            string `json:"Size" xml:"Size"`
-	Device          string `json:"Device" xml:"Device"`
-	Type            string `json:"Type" xml:"Type"`
-	Format          string `json:"Format" xml:"Format"`
-	ImportOSSBucket string `json:"ImportOSSBucket" xml:"ImportOSSBucket"`
-	ImportOSSObject string `json:"ImportOSSObject" xml:"ImportOSSObject"`
 	Progress        string `json:"Progress" xml:"Progress"`
+	Format          string `json:"Format" xml:"Format"`
+	Device          string `json:"Device" xml:"Device"`
+	Size            string `json:"Size" xml:"Size"`
 	RemainTime      int    `json:"RemainTime" xml:"RemainTime"`
+	SnapshotId      string `json:"SnapshotId" xml:"SnapshotId"`
+	ImportOSSObject string `json:"ImportOSSObject" xml:"ImportOSSObject"`
+	ImportOSSBucket string `json:"ImportOSSBucket" xml:"ImportOSSBucket"`
+	Type            string `json:"Type" xml:"Type"`
 }

+ 21 - 0
services/ecs/struct_disk_device_mappings_in_describe_image_from_family.go

@@ -0,0 +1,21 @@
+package ecs
+
+//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.
+
+// DiskDeviceMappingsInDescribeImageFromFamily is a nested struct in ecs response
+type DiskDeviceMappingsInDescribeImageFromFamily struct {
+	DiskDeviceMapping []DiskDeviceMapping `json:"DiskDeviceMapping" xml:"DiskDeviceMapping"`
+}

+ 2 - 2
services/ecs/struct_disk_device_mappings.go → services/ecs/struct_disk_device_mappings_in_describe_images.go

@@ -15,7 +15,7 @@ package ecs
 // Code generated by Alibaba Cloud SDK Code Generator.
 // Changes may cause incorrect behavior and will be lost if the code is regenerated.
 
-// DiskDeviceMappings is a nested struct in ecs response
-type DiskDeviceMappings struct {
+// DiskDeviceMappingsInDescribeImages is a nested struct in ecs response
+type DiskDeviceMappingsInDescribeImages struct {
 	DiskDeviceMapping []DiskDeviceMapping `json:"DiskDeviceMapping" xml:"DiskDeviceMapping"`
 }

+ 25 - 24
services/ecs/struct_image.go

@@ -17,28 +17,29 @@ package ecs
 
 // Image is a nested struct in ecs response
 type Image struct {
-	Progress             string               `json:"Progress" xml:"Progress"`
-	ImageId              string               `json:"ImageId" xml:"ImageId"`
-	ImageName            string               `json:"ImageName" xml:"ImageName"`
-	ImageVersion         string               `json:"ImageVersion" xml:"ImageVersion"`
-	Description          string               `json:"Description" xml:"Description"`
-	Size                 int                  `json:"Size" xml:"Size"`
-	ImageOwnerAlias      string               `json:"ImageOwnerAlias" xml:"ImageOwnerAlias"`
-	IsSupportIoOptimized bool                 `json:"IsSupportIoOptimized" xml:"IsSupportIoOptimized"`
-	IsSupportCloudinit   bool                 `json:"IsSupportCloudinit" xml:"IsSupportCloudinit"`
-	OSName               string               `json:"OSName" xml:"OSName"`
-	OSNameEn             string               `json:"OSNameEn" xml:"OSNameEn"`
-	Architecture         string               `json:"Architecture" xml:"Architecture"`
-	Status               string               `json:"Status" xml:"Status"`
-	ProductCode          string               `json:"ProductCode" xml:"ProductCode"`
-	IsSubscribed         bool                 `json:"IsSubscribed" xml:"IsSubscribed"`
-	CreationTime         string               `json:"CreationTime" xml:"CreationTime"`
-	IsSelfShared         string               `json:"IsSelfShared" xml:"IsSelfShared"`
-	OSType               string               `json:"OSType" xml:"OSType"`
-	Platform             string               `json:"Platform" xml:"Platform"`
-	Usage                string               `json:"Usage" xml:"Usage"`
-	IsCopied             bool                 `json:"IsCopied" xml:"IsCopied"`
-	ResourceGroupId      string               `json:"ResourceGroupId" xml:"ResourceGroupId"`
-	DiskDeviceMappings   DiskDeviceMappings   `json:"DiskDeviceMappings" xml:"DiskDeviceMappings"`
-	Tags                 TagsInDescribeImages `json:"Tags" xml:"Tags"`
+	ImageId              string                             `json:"ImageId" xml:"ImageId"`
+	ImageOwnerAlias      string                             `json:"ImageOwnerAlias" xml:"ImageOwnerAlias"`
+	OSName               string                             `json:"OSName" xml:"OSName"`
+	OSNameEn             string                             `json:"OSNameEn" xml:"OSNameEn"`
+	ImageFamily          string                             `json:"ImageFamily" xml:"ImageFamily"`
+	Architecture         string                             `json:"Architecture" xml:"Architecture"`
+	Size                 int                                `json:"Size" xml:"Size"`
+	IsSupportIoOptimized bool                               `json:"IsSupportIoOptimized" xml:"IsSupportIoOptimized"`
+	ResourceGroupId      string                             `json:"ResourceGroupId" xml:"ResourceGroupId"`
+	Description          string                             `json:"Description" xml:"Description"`
+	Usage                string                             `json:"Usage" xml:"Usage"`
+	IsCopied             bool                               `json:"IsCopied" xml:"IsCopied"`
+	ImageVersion         string                             `json:"ImageVersion" xml:"ImageVersion"`
+	OSType               string                             `json:"OSType" xml:"OSType"`
+	IsSubscribed         bool                               `json:"IsSubscribed" xml:"IsSubscribed"`
+	IsSupportCloudinit   bool                               `json:"IsSupportCloudinit" xml:"IsSupportCloudinit"`
+	CreationTime         string                             `json:"CreationTime" xml:"CreationTime"`
+	ProductCode          string                             `json:"ProductCode" xml:"ProductCode"`
+	Progress             string                             `json:"Progress" xml:"Progress"`
+	Platform             string                             `json:"Platform" xml:"Platform"`
+	IsSelfShared         string                             `json:"IsSelfShared" xml:"IsSelfShared"`
+	ImageName            string                             `json:"ImageName" xml:"ImageName"`
+	Status               string                             `json:"Status" xml:"Status"`
+	Tags                 TagsInDescribeImageFromFamily      `json:"Tags" xml:"Tags"`
+	DiskDeviceMappings   DiskDeviceMappingsInDescribeImages `json:"DiskDeviceMappings" xml:"DiskDeviceMappings"`
 }

+ 1 - 0
services/ecs/struct_network_interface_set.go

@@ -33,6 +33,7 @@ type NetworkInterfaceSet struct {
 	ServiceID            int64                                       `json:"ServiceID" xml:"ServiceID"`
 	ServiceManaged       bool                                        `json:"ServiceManaged" xml:"ServiceManaged"`
 	QueueNumber          int                                         `json:"QueueNumber" xml:"QueueNumber"`
+	OwnerId              string                                      `json:"OwnerId" xml:"OwnerId"`
 	SecurityGroupIds     SecurityGroupIdsInDescribeNetworkInterfaces `json:"SecurityGroupIds" xml:"SecurityGroupIds"`
 	AssociatedPublicIp   AssociatedPublicIp                          `json:"AssociatedPublicIp" xml:"AssociatedPublicIp"`
 	PrivateIpSets        PrivateIpSets                               `json:"PrivateIpSets" xml:"PrivateIpSets"`

+ 1 - 0
services/ecs/struct_snapshot.go

@@ -37,5 +37,6 @@ type Snapshot struct {
 	ResourceGroupId   string                  `json:"ResourceGroupId" xml:"ResourceGroupId"`
 	KMSKeyId          string                  `json:"KMSKeyId" xml:"KMSKeyId"`
 	Category          string                  `json:"Category" xml:"Category"`
+	SnapshotType      string                  `json:"SnapshotType" xml:"SnapshotType"`
 	Tags              TagsInDescribeSnapshots `json:"Tags" xml:"Tags"`
 }

+ 21 - 0
services/ecs/struct_tags_in_describe_image_from_family.go

@@ -0,0 +1,21 @@
+package ecs
+
+//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.
+
+// TagsInDescribeImageFromFamily is a nested struct in ecs response
+type TagsInDescribeImageFromFamily struct {
+	Tag []Tag `json:"Tag" xml:"Tag"`
+}

+ 1 - 0
services/ecs/struct_value_item.go

@@ -23,4 +23,5 @@ type ValueItem struct {
 	InstanceChargeType string `json:"InstanceChargeType" xml:"InstanceChargeType"`
 	InstanceType       string `json:"InstanceType" xml:"InstanceType"`
 	Count              int    `json:"Count" xml:"Count"`
+	DiskCategory       string `json:"DiskCategory" xml:"DiskCategory"`
 }