浏览代码

ECS SDK Auto Released By junmei.zjm,Version:1.53.28

Signed-off-by: haowei.yao <haowei.yao@alibaba-inc.com>
haowei.yao 6 年之前
父节点
当前提交
f21aa92389

+ 3 - 0
ChangeLog.txt

@@ -1,3 +1,6 @@
+2019-03-13 Version: 1.53.28
+1, add DescribeDemands interface
+
 2019-03-13 Version: 1.53.27
 1, Distinguish between system and service parameters
 

+ 52 - 50
services/ecs/create_instance.go

@@ -76,56 +76,58 @@ func (client *Client) CreateInstanceWithCallback(request *CreateInstanceRequest,
 // CreateInstanceRequest is the request struct for api CreateInstance
 type CreateInstanceRequest struct {
 	*requests.RpcRequest
-	ResourceOwnerId             requests.Integer          `position:"Query" name:"ResourceOwnerId"`
-	HpcClusterId                string                    `position:"Query" name:"HpcClusterId"`
-	SecurityEnhancementStrategy string                    `position:"Query" name:"SecurityEnhancementStrategy"`
-	KeyPairName                 string                    `position:"Query" name:"KeyPairName"`
-	SpotPriceLimit              requests.Float            `position:"Query" name:"SpotPriceLimit"`
-	DeletionProtection          requests.Boolean          `position:"Query" name:"DeletionProtection"`
-	ResourceGroupId             string                    `position:"Query" name:"ResourceGroupId"`
-	HostName                    string                    `position:"Query" name:"HostName"`
-	Password                    string                    `position:"Query" name:"Password"`
-	Tag                         *[]CreateInstanceTag      `position:"Query" name:"Tag"  type:"Repeated"`
-	AutoRenewPeriod             requests.Integer          `position:"Query" name:"AutoRenewPeriod"`
-	NodeControllerId            string                    `position:"Query" name:"NodeControllerId"`
-	Period                      requests.Integer          `position:"Query" name:"Period"`
-	DryRun                      requests.Boolean          `position:"Query" name:"DryRun"`
-	OwnerId                     requests.Integer          `position:"Query" name:"OwnerId"`
-	VSwitchId                   string                    `position:"Query" name:"VSwitchId"`
-	PrivateIpAddress            string                    `position:"Query" name:"PrivateIpAddress"`
-	SpotStrategy                string                    `position:"Query" name:"SpotStrategy"`
-	PeriodUnit                  string                    `position:"Query" name:"PeriodUnit"`
-	InstanceName                string                    `position:"Query" name:"InstanceName"`
-	AutoRenew                   requests.Boolean          `position:"Query" name:"AutoRenew"`
-	InternetChargeType          string                    `position:"Query" name:"InternetChargeType"`
-	ZoneId                      string                    `position:"Query" name:"ZoneId"`
-	InternetMaxBandwidthIn      requests.Integer          `position:"Query" name:"InternetMaxBandwidthIn"`
-	UseAdditionalService        requests.Boolean          `position:"Query" name:"UseAdditionalService"`
-	ImageId                     string                    `position:"Query" name:"ImageId"`
-	ClientToken                 string                    `position:"Query" name:"ClientToken"`
-	VlanId                      string                    `position:"Query" name:"VlanId"`
-	SpotInterruptionBehavior    string                    `position:"Query" name:"SpotInterruptionBehavior"`
-	IoOptimized                 string                    `position:"Query" name:"IoOptimized"`
-	SecurityGroupId             string                    `position:"Query" name:"SecurityGroupId"`
-	InternetMaxBandwidthOut     requests.Integer          `position:"Query" name:"InternetMaxBandwidthOut"`
-	Description                 string                    `position:"Query" name:"Description"`
-	SystemDiskCategory          string                    `position:"Query" name:"SystemDisk.Category"`
-	UserData                    string                    `position:"Query" name:"UserData"`
-	PasswordInherit             requests.Boolean          `position:"Query" name:"PasswordInherit"`
-	InstanceType                string                    `position:"Query" name:"InstanceType"`
-	InstanceChargeType          string                    `position:"Query" name:"InstanceChargeType"`
-	DeploymentSetId             string                    `position:"Query" name:"DeploymentSetId"`
-	InnerIpAddress              string                    `position:"Query" name:"InnerIpAddress"`
-	ResourceOwnerAccount        string                    `position:"Query" name:"ResourceOwnerAccount"`
-	OwnerAccount                string                    `position:"Query" name:"OwnerAccount"`
-	SystemDiskDiskName          string                    `position:"Query" name:"SystemDisk.DiskName"`
-	RamRoleName                 string                    `position:"Query" name:"RamRoleName"`
-	DedicatedHostId             string                    `position:"Query" name:"DedicatedHostId"`
-	ClusterId                   string                    `position:"Query" name:"ClusterId"`
-	CreditSpecification         string                    `position:"Query" name:"CreditSpecification"`
-	DataDisk                    *[]CreateInstanceDataDisk `position:"Query" name:"DataDisk"  type:"Repeated"`
-	SystemDiskSize              requests.Integer          `position:"Query" name:"SystemDisk.Size"`
-	SystemDiskDescription       string                    `position:"Query" name:"SystemDisk.Description"`
+	ResourceOwnerId               requests.Integer          `position:"Query" name:"ResourceOwnerId"`
+	HpcClusterId                  string                    `position:"Query" name:"HpcClusterId"`
+	SecurityEnhancementStrategy   string                    `position:"Query" name:"SecurityEnhancementStrategy"`
+	KeyPairName                   string                    `position:"Query" name:"KeyPairName"`
+	SpotPriceLimit                requests.Float            `position:"Query" name:"SpotPriceLimit"`
+	DeletionProtection            requests.Boolean          `position:"Query" name:"DeletionProtection"`
+	ResourceGroupId               string                    `position:"Query" name:"ResourceGroupId"`
+	HostName                      string                    `position:"Query" name:"HostName"`
+	Password                      string                    `position:"Query" name:"Password"`
+	Tag                           *[]CreateInstanceTag      `position:"Query" name:"Tag"  type:"Repeated"`
+	AutoRenewPeriod               requests.Integer          `position:"Query" name:"AutoRenewPeriod"`
+	NodeControllerId              string                    `position:"Query" name:"NodeControllerId"`
+	Period                        requests.Integer          `position:"Query" name:"Period"`
+	DryRun                        requests.Boolean          `position:"Query" name:"DryRun"`
+	OwnerId                       requests.Integer          `position:"Query" name:"OwnerId"`
+	CapacityReservationPreference string                    `position:"Query" name:"CapacityReservationPreference"`
+	VSwitchId                     string                    `position:"Query" name:"VSwitchId"`
+	PrivateIpAddress              string                    `position:"Query" name:"PrivateIpAddress"`
+	SpotStrategy                  string                    `position:"Query" name:"SpotStrategy"`
+	PeriodUnit                    string                    `position:"Query" name:"PeriodUnit"`
+	InstanceName                  string                    `position:"Query" name:"InstanceName"`
+	AutoRenew                     requests.Boolean          `position:"Query" name:"AutoRenew"`
+	InternetChargeType            string                    `position:"Query" name:"InternetChargeType"`
+	ZoneId                        string                    `position:"Query" name:"ZoneId"`
+	InternetMaxBandwidthIn        requests.Integer          `position:"Query" name:"InternetMaxBandwidthIn"`
+	UseAdditionalService          requests.Boolean          `position:"Query" name:"UseAdditionalService"`
+	ImageId                       string                    `position:"Query" name:"ImageId"`
+	ClientToken                   string                    `position:"Query" name:"ClientToken"`
+	VlanId                        string                    `position:"Query" name:"VlanId"`
+	SpotInterruptionBehavior      string                    `position:"Query" name:"SpotInterruptionBehavior"`
+	IoOptimized                   string                    `position:"Query" name:"IoOptimized"`
+	SecurityGroupId               string                    `position:"Query" name:"SecurityGroupId"`
+	InternetMaxBandwidthOut       requests.Integer          `position:"Query" name:"InternetMaxBandwidthOut"`
+	Description                   string                    `position:"Query" name:"Description"`
+	SystemDiskCategory            string                    `position:"Query" name:"SystemDisk.Category"`
+	CapacityReservationId         string                    `position:"Query" name:"CapacityReservationId"`
+	UserData                      string                    `position:"Query" name:"UserData"`
+	PasswordInherit               requests.Boolean          `position:"Query" name:"PasswordInherit"`
+	InstanceType                  string                    `position:"Query" name:"InstanceType"`
+	InstanceChargeType            string                    `position:"Query" name:"InstanceChargeType"`
+	DeploymentSetId               string                    `position:"Query" name:"DeploymentSetId"`
+	InnerIpAddress                string                    `position:"Query" name:"InnerIpAddress"`
+	ResourceOwnerAccount          string                    `position:"Query" name:"ResourceOwnerAccount"`
+	OwnerAccount                  string                    `position:"Query" name:"OwnerAccount"`
+	SystemDiskDiskName            string                    `position:"Query" name:"SystemDisk.DiskName"`
+	RamRoleName                   string                    `position:"Query" name:"RamRoleName"`
+	DedicatedHostId               string                    `position:"Query" name:"DedicatedHostId"`
+	ClusterId                     string                    `position:"Query" name:"ClusterId"`
+	CreditSpecification           string                    `position:"Query" name:"CreditSpecification"`
+	DataDisk                      *[]CreateInstanceDataDisk `position:"Query" name:"DataDisk"  type:"Repeated"`
+	SystemDiskSize                requests.Integer          `position:"Query" name:"SystemDisk.Size"`
+	SystemDiskDescription         string                    `position:"Query" name:"SystemDisk.Description"`
 }
 
 // CreateInstanceTag is a repeated param struct in CreateInstanceRequest

+ 1 - 0
services/ecs/create_key_pair.go

@@ -94,6 +94,7 @@ type CreateKeyPairTag struct {
 type CreateKeyPairResponse struct {
 	*responses.BaseResponse
 	RequestId          string `json:"RequestId" xml:"RequestId"`
+	KeyPairId          string `json:"KeyPairId" xml:"KeyPairId"`
 	KeyPairName        string `json:"KeyPairName" xml:"KeyPairName"`
 	KeyPairFingerPrint string `json:"KeyPairFingerPrint" xml:"KeyPairFingerPrint"`
 	PrivateKeyBody     string `json:"PrivateKeyBody" xml:"PrivateKeyBody"`

+ 126 - 0
services/ecs/describe_demands.go

@@ -0,0 +1,126 @@
+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"
+)
+
+// DescribeDemands invokes the ecs.DescribeDemands API synchronously
+// api document: https://help.aliyun.com/api/ecs/describedemands.html
+func (client *Client) DescribeDemands(request *DescribeDemandsRequest) (response *DescribeDemandsResponse, err error) {
+	response = CreateDescribeDemandsResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// DescribeDemandsWithChan invokes the ecs.DescribeDemands API asynchronously
+// api document: https://help.aliyun.com/api/ecs/describedemands.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) DescribeDemandsWithChan(request *DescribeDemandsRequest) (<-chan *DescribeDemandsResponse, <-chan error) {
+	responseChan := make(chan *DescribeDemandsResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.DescribeDemands(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// DescribeDemandsWithCallback invokes the ecs.DescribeDemands API asynchronously
+// api document: https://help.aliyun.com/api/ecs/describedemands.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) DescribeDemandsWithCallback(request *DescribeDemandsRequest, callback func(response *DescribeDemandsResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *DescribeDemandsResponse
+		var err error
+		defer close(result)
+		response, err = client.DescribeDemands(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// DescribeDemandsRequest is the request struct for api DescribeDemands
+type DescribeDemandsRequest struct {
+	*requests.RpcRequest
+	ResourceOwnerId      requests.Integer      `position:"Query" name:"ResourceOwnerId"`
+	PageNumber           requests.Integer      `position:"Query" name:"PageNumber"`
+	PageSize             requests.Integer      `position:"Query" name:"PageSize"`
+	InstanceType         string                `position:"Query" name:"InstanceType"`
+	Tag                  *[]DescribeDemandsTag `position:"Query" name:"Tag"  type:"Repeated"`
+	InstanceChargeType   string                `position:"Query" name:"InstanceChargeType"`
+	DryRun               requests.Boolean      `position:"Query" name:"DryRun"`
+	ResourceOwnerAccount string                `position:"Query" name:"ResourceOwnerAccount"`
+	OwnerAccount         string                `position:"Query" name:"OwnerAccount"`
+	InstanceTypeFamily   string                `position:"Query" name:"InstanceTypeFamily"`
+	OwnerId              requests.Integer      `position:"Query" name:"OwnerId"`
+	DemandStatus         *[]string             `position:"Query" name:"DemandStatus"  type:"Repeated"`
+	ZoneId               string                `position:"Query" name:"ZoneId"`
+}
+
+// DescribeDemandsTag is a repeated param struct in DescribeDemandsRequest
+type DescribeDemandsTag struct {
+	Key   string `name:"Key"`
+	Value string `name:"Value"`
+}
+
+// DescribeDemandsResponse is the response struct for api DescribeDemands
+type DescribeDemandsResponse struct {
+	*responses.BaseResponse
+	RequestId  string  `json:"RequestId" xml:"RequestId"`
+	TotalCount int     `json:"TotalCount" xml:"TotalCount"`
+	PageNumber int     `json:"PageNumber" xml:"PageNumber"`
+	PageSize   int     `json:"PageSize" xml:"PageSize"`
+	RegionId   string  `json:"RegionId" xml:"RegionId"`
+	Demands    Demands `json:"Demands" xml:"Demands"`
+}
+
+// CreateDescribeDemandsRequest creates a request to invoke DescribeDemands API
+func CreateDescribeDemandsRequest() (request *DescribeDemandsRequest) {
+	request = &DescribeDemandsRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("Ecs", "2014-05-26", "DescribeDemands", "ecs", "openAPI")
+	return
+}
+
+// CreateDescribeDemandsResponse creates a response to parse from DescribeDemands response
+func CreateDescribeDemandsResponse() (response *DescribeDemandsResponse) {
+	response = &DescribeDemandsResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 1 - 0
services/ecs/redeploy_instance.go

@@ -88,6 +88,7 @@ type RedeployInstanceRequest struct {
 type RedeployInstanceResponse struct {
 	*responses.BaseResponse
 	RequestId string `json:"RequestId" xml:"RequestId"`
+	TaskId    string `json:"TaskId" xml:"TaskId"`
 }
 
 // CreateRedeployInstanceRequest creates a request to invoke RedeployInstance API

+ 58 - 55
services/ecs/run_instances.go

@@ -76,61 +76,64 @@ func (client *Client) RunInstancesWithCallback(request *RunInstancesRequest, cal
 // RunInstancesRequest is the request struct for api RunInstances
 type RunInstancesRequest struct {
 	*requests.RpcRequest
-	LaunchTemplateName          string                          `position:"Query" name:"LaunchTemplateName"`
-	ResourceOwnerId             requests.Integer                `position:"Query" name:"ResourceOwnerId"`
-	UniqueSuffix                requests.Boolean                `position:"Query" name:"UniqueSuffix"`
-	HpcClusterId                string                          `position:"Query" name:"HpcClusterId"`
-	SecurityEnhancementStrategy string                          `position:"Query" name:"SecurityEnhancementStrategy"`
-	KeyPairName                 string                          `position:"Query" name:"KeyPairName"`
-	MinAmount                   requests.Integer                `position:"Query" name:"MinAmount"`
-	SpotPriceLimit              requests.Float                  `position:"Query" name:"SpotPriceLimit"`
-	DeletionProtection          requests.Boolean                `position:"Query" name:"DeletionProtection"`
-	ResourceGroupId             string                          `position:"Query" name:"ResourceGroupId"`
-	HostName                    string                          `position:"Query" name:"HostName"`
-	Password                    string                          `position:"Query" name:"Password"`
-	Tag                         *[]RunInstancesTag              `position:"Query" name:"Tag"  type:"Repeated"`
-	AutoRenewPeriod             requests.Integer                `position:"Query" name:"AutoRenewPeriod"`
-	Period                      requests.Integer                `position:"Query" name:"Period"`
-	DryRun                      requests.Boolean                `position:"Query" name:"DryRun"`
-	LaunchTemplateId            string                          `position:"Query" name:"LaunchTemplateId"`
-	Ipv6AddressCount            requests.Integer                `position:"Query" name:"Ipv6AddressCount"`
-	OwnerId                     requests.Integer                `position:"Query" name:"OwnerId"`
-	VSwitchId                   string                          `position:"Query" name:"VSwitchId"`
-	SpotStrategy                string                          `position:"Query" name:"SpotStrategy"`
-	PrivateIpAddress            string                          `position:"Query" name:"PrivateIpAddress"`
-	PeriodUnit                  string                          `position:"Query" name:"PeriodUnit"`
-	InstanceName                string                          `position:"Query" name:"InstanceName"`
-	AutoRenew                   requests.Boolean                `position:"Query" name:"AutoRenew"`
-	InternetChargeType          string                          `position:"Query" name:"InternetChargeType"`
-	ZoneId                      string                          `position:"Query" name:"ZoneId"`
-	Ipv6Address                 *[]string                       `position:"Query" name:"Ipv6Address"  type:"Repeated"`
-	InternetMaxBandwidthIn      requests.Integer                `position:"Query" name:"InternetMaxBandwidthIn"`
-	ImageId                     string                          `position:"Query" name:"ImageId"`
-	SpotInterruptionBehavior    string                          `position:"Query" name:"SpotInterruptionBehavior"`
-	ClientToken                 string                          `position:"Query" name:"ClientToken"`
-	IoOptimized                 string                          `position:"Query" name:"IoOptimized"`
-	SecurityGroupId             string                          `position:"Query" name:"SecurityGroupId"`
-	InternetMaxBandwidthOut     requests.Integer                `position:"Query" name:"InternetMaxBandwidthOut"`
-	Description                 string                          `position:"Query" name:"Description"`
-	SystemDiskCategory          string                          `position:"Query" name:"SystemDisk.Category"`
-	UserData                    string                          `position:"Query" name:"UserData"`
-	PasswordInherit             requests.Boolean                `position:"Query" name:"PasswordInherit"`
-	InstanceType                string                          `position:"Query" name:"InstanceType"`
-	InstanceChargeType          string                          `position:"Query" name:"InstanceChargeType"`
-	NetworkInterface            *[]RunInstancesNetworkInterface `position:"Query" name:"NetworkInterface"  type:"Repeated"`
-	DeploymentSetId             string                          `position:"Query" name:"DeploymentSetId"`
-	Amount                      requests.Integer                `position:"Query" name:"Amount"`
-	ResourceOwnerAccount        string                          `position:"Query" name:"ResourceOwnerAccount"`
-	OwnerAccount                string                          `position:"Query" name:"OwnerAccount"`
-	SystemDiskDiskName          string                          `position:"Query" name:"SystemDisk.DiskName"`
-	RamRoleName                 string                          `position:"Query" name:"RamRoleName"`
-	AutoReleaseTime             string                          `position:"Query" name:"AutoReleaseTime"`
-	DedicatedHostId             string                          `position:"Query" name:"DedicatedHostId"`
-	CreditSpecification         string                          `position:"Query" name:"CreditSpecification"`
-	DataDisk                    *[]RunInstancesDataDisk         `position:"Query" name:"DataDisk"  type:"Repeated"`
-	LaunchTemplateVersion       requests.Integer                `position:"Query" name:"LaunchTemplateVersion"`
-	SystemDiskSize              string                          `position:"Query" name:"SystemDisk.Size"`
-	SystemDiskDescription       string                          `position:"Query" name:"SystemDisk.Description"`
+	LaunchTemplateName            string                          `position:"Query" name:"LaunchTemplateName"`
+	ResourceOwnerId               requests.Integer                `position:"Query" name:"ResourceOwnerId"`
+	UniqueSuffix                  requests.Boolean                `position:"Query" name:"UniqueSuffix"`
+	HpcClusterId                  string                          `position:"Query" name:"HpcClusterId"`
+	SecurityEnhancementStrategy   string                          `position:"Query" name:"SecurityEnhancementStrategy"`
+	KeyPairName                   string                          `position:"Query" name:"KeyPairName"`
+	MinAmount                     requests.Integer                `position:"Query" name:"MinAmount"`
+	SpotPriceLimit                requests.Float                  `position:"Query" name:"SpotPriceLimit"`
+	DeletionProtection            requests.Boolean                `position:"Query" name:"DeletionProtection"`
+	ResourceGroupId               string                          `position:"Query" name:"ResourceGroupId"`
+	HostName                      string                          `position:"Query" name:"HostName"`
+	Password                      string                          `position:"Query" name:"Password"`
+	Tag                           *[]RunInstancesTag              `position:"Query" name:"Tag"  type:"Repeated"`
+	AutoRenewPeriod               requests.Integer                `position:"Query" name:"AutoRenewPeriod"`
+	Period                        requests.Integer                `position:"Query" name:"Period"`
+	DryRun                        requests.Boolean                `position:"Query" name:"DryRun"`
+	LaunchTemplateId              string                          `position:"Query" name:"LaunchTemplateId"`
+	Ipv6AddressCount              requests.Integer                `position:"Query" name:"Ipv6AddressCount"`
+	OwnerId                       requests.Integer                `position:"Query" name:"OwnerId"`
+	CapacityReservationPreference string                          `position:"Query" name:"CapacityReservationPreference"`
+	VSwitchId                     string                          `position:"Query" name:"VSwitchId"`
+	SpotStrategy                  string                          `position:"Query" name:"SpotStrategy"`
+	PrivateIpAddress              string                          `position:"Query" name:"PrivateIpAddress"`
+	PeriodUnit                    string                          `position:"Query" name:"PeriodUnit"`
+	InstanceName                  string                          `position:"Query" name:"InstanceName"`
+	AutoRenew                     requests.Boolean                `position:"Query" name:"AutoRenew"`
+	InternetChargeType            string                          `position:"Query" name:"InternetChargeType"`
+	ZoneId                        string                          `position:"Query" name:"ZoneId"`
+	Ipv6Address                   *[]string                       `position:"Query" name:"Ipv6Address"  type:"Repeated"`
+	InternetMaxBandwidthIn        requests.Integer                `position:"Query" name:"InternetMaxBandwidthIn"`
+	ImageId                       string                          `position:"Query" name:"ImageId"`
+	SpotInterruptionBehavior      string                          `position:"Query" name:"SpotInterruptionBehavior"`
+	ClientToken                   string                          `position:"Query" name:"ClientToken"`
+	IoOptimized                   string                          `position:"Query" name:"IoOptimized"`
+	SecurityGroupId               string                          `position:"Query" name:"SecurityGroupId"`
+	InternetMaxBandwidthOut       requests.Integer                `position:"Query" name:"InternetMaxBandwidthOut"`
+	Description                   string                          `position:"Query" name:"Description"`
+	SystemDiskCategory            string                          `position:"Query" name:"SystemDisk.Category"`
+	CapacityReservationId         string                          `position:"Query" name:"CapacityReservationId"`
+	UserData                      string                          `position:"Query" name:"UserData"`
+	PasswordInherit               requests.Boolean                `position:"Query" name:"PasswordInherit"`
+	InstanceType                  string                          `position:"Query" name:"InstanceType"`
+	HibernationConfigured         requests.Boolean                `position:"Query" name:"HibernationConfigured"`
+	InstanceChargeType            string                          `position:"Query" name:"InstanceChargeType"`
+	NetworkInterface              *[]RunInstancesNetworkInterface `position:"Query" name:"NetworkInterface"  type:"Repeated"`
+	DeploymentSetId               string                          `position:"Query" name:"DeploymentSetId"`
+	Amount                        requests.Integer                `position:"Query" name:"Amount"`
+	ResourceOwnerAccount          string                          `position:"Query" name:"ResourceOwnerAccount"`
+	OwnerAccount                  string                          `position:"Query" name:"OwnerAccount"`
+	SystemDiskDiskName            string                          `position:"Query" name:"SystemDisk.DiskName"`
+	RamRoleName                   string                          `position:"Query" name:"RamRoleName"`
+	AutoReleaseTime               string                          `position:"Query" name:"AutoReleaseTime"`
+	DedicatedHostId               string                          `position:"Query" name:"DedicatedHostId"`
+	CreditSpecification           string                          `position:"Query" name:"CreditSpecification"`
+	DataDisk                      *[]RunInstancesDataDisk         `position:"Query" name:"DataDisk"  type:"Repeated"`
+	LaunchTemplateVersion         requests.Integer                `position:"Query" name:"LaunchTemplateVersion"`
+	SystemDiskSize                string                          `position:"Query" name:"SystemDisk.Size"`
+	SystemDiskDescription         string                          `position:"Query" name:"SystemDisk.Description"`
 }
 
 // RunInstancesTag is a repeated param struct in RunInstancesRequest

+ 1 - 0
services/ecs/stop_instance.go

@@ -84,6 +84,7 @@ type StopInstanceRequest struct {
 	OwnerAccount         string           `position:"Query" name:"OwnerAccount"`
 	StoppedMode          string           `position:"Query" name:"StoppedMode"`
 	OwnerId              requests.Integer `position:"Query" name:"OwnerId"`
+	Hibernate            requests.Boolean `position:"Query" name:"Hibernate"`
 	ForceStop            requests.Boolean `position:"Query" name:"ForceStop"`
 }
 

+ 1 - 0
services/ecs/struct_available_zone.go

@@ -19,6 +19,7 @@ package ecs
 type AvailableZone struct {
 	RegionId           string                                            `json:"RegionId" xml:"RegionId"`
 	ZoneId             string                                            `json:"ZoneId" xml:"ZoneId"`
+	StatusCategory     string                                            `json:"StatusCategory" xml:"StatusCategory"`
 	Status             string                                            `json:"Status" xml:"Status"`
 	AvailableResources AvailableResourcesInDescribeResourcesModification `json:"AvailableResources" xml:"AvailableResources"`
 }

+ 35 - 0
services/ecs/struct_demand.go

@@ -0,0 +1,35 @@
+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.
+
+// Demand is a nested struct in ecs response
+type Demand struct {
+	ZoneId             string      `json:"ZoneId" xml:"ZoneId"`
+	DemandTime         string      `json:"DemandTime" xml:"DemandTime"`
+	InstanceTypeFamily string      `json:"InstanceTypeFamily" xml:"InstanceTypeFamily"`
+	InstanceType       string      `json:"InstanceType" xml:"InstanceType"`
+	InstanceChargeType string      `json:"InstanceChargeType" xml:"InstanceChargeType"`
+	Period             int         `json:"Period" xml:"Period"`
+	PeriodUnit         string      `json:"PeriodUnit" xml:"PeriodUnit"`
+	StartTime          string      `json:"StartTime" xml:"StartTime"`
+	EndTime            string      `json:"EndTime" xml:"EndTime"`
+	DemandStatus       string      `json:"DemandStatus" xml:"DemandStatus"`
+	TotalAmount        int         `json:"TotalAmount" xml:"TotalAmount"`
+	AvailableAmount    int         `json:"AvailableAmount" xml:"AvailableAmount"`
+	UsedAmount         int         `json:"UsedAmount" xml:"UsedAmount"`
+	DeliveringAmount   int         `json:"DeliveringAmount" xml:"DeliveringAmount"`
+	SupplyInfos        SupplyInfos `json:"SupplyInfos" xml:"SupplyInfos"`
+}

+ 21 - 0
services/ecs/struct_demands.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.
+
+// Demands is a nested struct in ecs response
+type Demands struct {
+	Demand []Demand `json:"Demand" xml:"Demand"`
+}

+ 22 - 0
services/ecs/struct_ecs_capacity_reservation_attr.go

@@ -0,0 +1,22 @@
+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.
+
+// EcsCapacityReservationAttr is a nested struct in ecs response
+type EcsCapacityReservationAttr struct {
+	CapacityReservationId         string `json:"CapacityReservationId" xml:"CapacityReservationId"`
+	CapacityReservationPreference string `json:"CapacityReservationPreference" xml:"CapacityReservationPreference"`
+}

+ 54 - 53
services/ecs/struct_instance.go

@@ -17,57 +17,58 @@ package ecs
 
 // Instance is a nested struct in ecs response
 type Instance struct {
-	ImageId                 string                               `json:"ImageId" xml:"ImageId"`
-	InstanceType            string                               `json:"InstanceType" xml:"InstanceType"`
-	AutoReleaseTime         string                               `json:"AutoReleaseTime" xml:"AutoReleaseTime"`
-	DeviceAvailable         bool                                 `json:"DeviceAvailable" xml:"DeviceAvailable"`
-	InstanceNetworkType     string                               `json:"InstanceNetworkType" xml:"InstanceNetworkType"`
-	LocalStorageAmount      int                                  `json:"LocalStorageAmount" xml:"LocalStorageAmount"`
-	InstanceChargeType      string                               `json:"InstanceChargeType" xml:"InstanceChargeType"`
-	ClusterId               string                               `json:"ClusterId" xml:"ClusterId"`
-	InstanceName            string                               `json:"InstanceName" xml:"InstanceName"`
-	CreditSpecification     string                               `json:"CreditSpecification" xml:"CreditSpecification"`
-	GPUAmount               int                                  `json:"GPUAmount" xml:"GPUAmount"`
-	StartTime               string                               `json:"StartTime" xml:"StartTime"`
-	ZoneId                  string                               `json:"ZoneId" xml:"ZoneId"`
-	InternetChargeType      string                               `json:"InternetChargeType" xml:"InternetChargeType"`
-	InternetMaxBandwidthIn  int                                  `json:"InternetMaxBandwidthIn" xml:"InternetMaxBandwidthIn"`
-	HostName                string                               `json:"HostName" xml:"HostName"`
-	Cpu                     int                                  `json:"Cpu" xml:"Cpu"`
-	Status                  string                               `json:"Status" xml:"Status"`
-	SpotPriceLimit          float64                              `json:"SpotPriceLimit" xml:"SpotPriceLimit"`
-	OSName                  string                               `json:"OSName" xml:"OSName"`
-	SerialNumber            string                               `json:"SerialNumber" xml:"SerialNumber"`
-	RegionId                string                               `json:"RegionId" xml:"RegionId"`
-	InternetMaxBandwidthOut int                                  `json:"InternetMaxBandwidthOut" xml:"InternetMaxBandwidthOut"`
-	IoOptimized             bool                                 `json:"IoOptimized" xml:"IoOptimized"`
-	ResourceGroupId         string                               `json:"ResourceGroupId" xml:"ResourceGroupId"`
-	InstanceTypeFamily      string                               `json:"InstanceTypeFamily" xml:"InstanceTypeFamily"`
-	InstanceId              string                               `json:"InstanceId" xml:"InstanceId"`
-	DeploymentSetId         string                               `json:"DeploymentSetId" xml:"DeploymentSetId"`
-	GPUSpec                 string                               `json:"GPUSpec" xml:"GPUSpec"`
-	Description             string                               `json:"Description" xml:"Description"`
-	Recyclable              bool                                 `json:"Recyclable" xml:"Recyclable"`
-	SaleCycle               string                               `json:"SaleCycle" xml:"SaleCycle"`
-	ExpiredTime             string                               `json:"ExpiredTime" xml:"ExpiredTime"`
-	OSType                  string                               `json:"OSType" xml:"OSType"`
-	Memory                  int                                  `json:"Memory" xml:"Memory"`
-	CreationTime            string                               `json:"CreationTime" xml:"CreationTime"`
-	KeyPairName             string                               `json:"KeyPairName" xml:"KeyPairName"`
-	HpcClusterId            string                               `json:"HpcClusterId" xml:"HpcClusterId"`
-	LocalStorageCapacity    int                                  `json:"LocalStorageCapacity" xml:"LocalStorageCapacity"`
-	VlanId                  string                               `json:"VlanId" xml:"VlanId"`
-	StoppedMode             string                               `json:"StoppedMode" xml:"StoppedMode"`
-	SpotStrategy            string                               `json:"SpotStrategy" xml:"SpotStrategy"`
-	DeletionProtection      bool                                 `json:"DeletionProtection" xml:"DeletionProtection"`
-	SecurityGroupIds        SecurityGroupIdsInDescribeInstances  `json:"SecurityGroupIds" xml:"SecurityGroupIds"`
-	InnerIpAddress          InnerIpAddressInDescribeInstances    `json:"InnerIpAddress" xml:"InnerIpAddress"`
-	PublicIpAddress         PublicIpAddressInDescribeInstances   `json:"PublicIpAddress" xml:"PublicIpAddress"`
-	RdmaIpAddress           RdmaIpAddress                        `json:"RdmaIpAddress" xml:"RdmaIpAddress"`
-	EipAddress              EipAddress                           `json:"EipAddress" xml:"EipAddress"`
-	DedicatedHostAttribute  DedicatedHostAttribute               `json:"DedicatedHostAttribute" xml:"DedicatedHostAttribute"`
-	VpcAttributes           VpcAttributes                        `json:"VpcAttributes" xml:"VpcAttributes"`
-	NetworkInterfaces       NetworkInterfacesInDescribeInstances `json:"NetworkInterfaces" xml:"NetworkInterfaces"`
-	OperationLocks          OperationLocksInDescribeInstances    `json:"OperationLocks" xml:"OperationLocks"`
-	Tags                    TagsInDescribeInstances              `json:"Tags" xml:"Tags"`
+	ImageId                    string                               `json:"ImageId" xml:"ImageId"`
+	InstanceType               string                               `json:"InstanceType" xml:"InstanceType"`
+	AutoReleaseTime            string                               `json:"AutoReleaseTime" xml:"AutoReleaseTime"`
+	DeviceAvailable            bool                                 `json:"DeviceAvailable" xml:"DeviceAvailable"`
+	InstanceNetworkType        string                               `json:"InstanceNetworkType" xml:"InstanceNetworkType"`
+	LocalStorageAmount         int                                  `json:"LocalStorageAmount" xml:"LocalStorageAmount"`
+	InstanceChargeType         string                               `json:"InstanceChargeType" xml:"InstanceChargeType"`
+	ClusterId                  string                               `json:"ClusterId" xml:"ClusterId"`
+	InstanceName               string                               `json:"InstanceName" xml:"InstanceName"`
+	CreditSpecification        string                               `json:"CreditSpecification" xml:"CreditSpecification"`
+	GPUAmount                  int                                  `json:"GPUAmount" xml:"GPUAmount"`
+	StartTime                  string                               `json:"StartTime" xml:"StartTime"`
+	ZoneId                     string                               `json:"ZoneId" xml:"ZoneId"`
+	InternetChargeType         string                               `json:"InternetChargeType" xml:"InternetChargeType"`
+	InternetMaxBandwidthIn     int                                  `json:"InternetMaxBandwidthIn" xml:"InternetMaxBandwidthIn"`
+	HostName                   string                               `json:"HostName" xml:"HostName"`
+	Cpu                        int                                  `json:"Cpu" xml:"Cpu"`
+	Status                     string                               `json:"Status" xml:"Status"`
+	SpotPriceLimit             float64                              `json:"SpotPriceLimit" xml:"SpotPriceLimit"`
+	OSName                     string                               `json:"OSName" xml:"OSName"`
+	SerialNumber               string                               `json:"SerialNumber" xml:"SerialNumber"`
+	RegionId                   string                               `json:"RegionId" xml:"RegionId"`
+	InternetMaxBandwidthOut    int                                  `json:"InternetMaxBandwidthOut" xml:"InternetMaxBandwidthOut"`
+	IoOptimized                bool                                 `json:"IoOptimized" xml:"IoOptimized"`
+	ResourceGroupId            string                               `json:"ResourceGroupId" xml:"ResourceGroupId"`
+	InstanceTypeFamily         string                               `json:"InstanceTypeFamily" xml:"InstanceTypeFamily"`
+	InstanceId                 string                               `json:"InstanceId" xml:"InstanceId"`
+	DeploymentSetId            string                               `json:"DeploymentSetId" xml:"DeploymentSetId"`
+	GPUSpec                    string                               `json:"GPUSpec" xml:"GPUSpec"`
+	Description                string                               `json:"Description" xml:"Description"`
+	Recyclable                 bool                                 `json:"Recyclable" xml:"Recyclable"`
+	SaleCycle                  string                               `json:"SaleCycle" xml:"SaleCycle"`
+	ExpiredTime                string                               `json:"ExpiredTime" xml:"ExpiredTime"`
+	OSType                     string                               `json:"OSType" xml:"OSType"`
+	Memory                     int                                  `json:"Memory" xml:"Memory"`
+	CreationTime               string                               `json:"CreationTime" xml:"CreationTime"`
+	KeyPairName                string                               `json:"KeyPairName" xml:"KeyPairName"`
+	HpcClusterId               string                               `json:"HpcClusterId" xml:"HpcClusterId"`
+	LocalStorageCapacity       int                                  `json:"LocalStorageCapacity" xml:"LocalStorageCapacity"`
+	VlanId                     string                               `json:"VlanId" xml:"VlanId"`
+	StoppedMode                string                               `json:"StoppedMode" xml:"StoppedMode"`
+	SpotStrategy               string                               `json:"SpotStrategy" xml:"SpotStrategy"`
+	DeletionProtection         bool                                 `json:"DeletionProtection" xml:"DeletionProtection"`
+	SecurityGroupIds           SecurityGroupIdsInDescribeInstances  `json:"SecurityGroupIds" xml:"SecurityGroupIds"`
+	InnerIpAddress             InnerIpAddressInDescribeInstances    `json:"InnerIpAddress" xml:"InnerIpAddress"`
+	PublicIpAddress            PublicIpAddressInDescribeInstances   `json:"PublicIpAddress" xml:"PublicIpAddress"`
+	RdmaIpAddress              RdmaIpAddress                        `json:"RdmaIpAddress" xml:"RdmaIpAddress"`
+	EipAddress                 EipAddress                           `json:"EipAddress" xml:"EipAddress"`
+	EcsCapacityReservationAttr EcsCapacityReservationAttr           `json:"EcsCapacityReservationAttr" xml:"EcsCapacityReservationAttr"`
+	DedicatedHostAttribute     DedicatedHostAttribute               `json:"DedicatedHostAttribute" xml:"DedicatedHostAttribute"`
+	VpcAttributes              VpcAttributes                        `json:"VpcAttributes" xml:"VpcAttributes"`
+	NetworkInterfaces          NetworkInterfacesInDescribeInstances `json:"NetworkInterfaces" xml:"NetworkInterfaces"`
+	OperationLocks             OperationLocksInDescribeInstances    `json:"OperationLocks" xml:"OperationLocks"`
+	Tags                       TagsInDescribeInstances              `json:"Tags" xml:"Tags"`
 }

+ 24 - 0
services/ecs/struct_supply_info.go

@@ -0,0 +1,24 @@
+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.
+
+// SupplyInfo is a nested struct in ecs response
+type SupplyInfo struct {
+	Amount          int    `json:"Amount" xml:"Amount"`
+	SupplyStatus    string `json:"SupplyStatus" xml:"SupplyStatus"`
+	SupplyStartTime string `json:"SupplyStartTime" xml:"SupplyStartTime"`
+	SupplyEndTime   string `json:"SupplyEndTime" xml:"SupplyEndTime"`
+}

+ 21 - 0
services/ecs/struct_supply_infos.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.
+
+// SupplyInfos is a nested struct in ecs response
+type SupplyInfos struct {
+	SupplyInfo []SupplyInfo `json:"SupplyInfo" xml:"SupplyInfo"`
+}

+ 6 - 5
services/ecs/struct_supported_resource.go

@@ -17,9 +17,10 @@ package ecs
 
 // SupportedResource is a nested struct in ecs response
 type SupportedResource struct {
-	Value  string `json:"Value" xml:"Value"`
-	Max    int    `json:"Max" xml:"Max"`
-	Unit   string `json:"Unit" xml:"Unit"`
-	Status string `json:"Status" xml:"Status"`
-	Min    int    `json:"Min" xml:"Min"`
+	Value          string `json:"Value" xml:"Value"`
+	Max            int    `json:"Max" xml:"Max"`
+	Unit           string `json:"Unit" xml:"Unit"`
+	StatusCategory string `json:"StatusCategory" xml:"StatusCategory"`
+	Status         string `json:"Status" xml:"Status"`
+	Min            int    `json:"Min" xml:"Min"`
 }

+ 1 - 0
services/ecs/struct_value_item.go

@@ -18,6 +18,7 @@ package ecs
 // ValueItem is a nested struct in ecs response
 type ValueItem struct {
 	Value              string `json:"Value" xml:"Value"`
+	ExpiredTime        string `json:"ExpiredTime" xml:"ExpiredTime"`
 	ZoneId             string `json:"ZoneId" xml:"ZoneId"`
 	InstanceChargeType string `json:"InstanceChargeType" xml:"InstanceChargeType"`
 	InstanceType       string `json:"InstanceType" xml:"InstanceType"`