瀏覽代碼

ESS SDK Auto Released By wujin.lhr,Version:1.25.4

Signed-off-by: yixiong.jxy <yixiong.jxy@alibaba-inc.com>
yixiong.jxy 7 年之前
父節點
當前提交
51f95ee4af

+ 4 - 0
ChangeLog.txt

@@ -1,3 +1,7 @@
+2018-08-16 Version: 1.25.4
+1, ModifyScalingConfiguration add imageName.
+2, CreateScalingConfiguration add imageName.
+
 2018-08-15 Version: 1.25.3
 1, Fix bug in GetMaterials API.
 2, GetVerifyToken added a new param VerifyConfigs

+ 124 - 0
services/ess/create_alarm.go

@@ -0,0 +1,124 @@
+package ess
+
+//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"
+)
+
+// CreateAlarm invokes the ess.CreateAlarm API synchronously
+// api document: https://help.aliyun.com/api/ess/createalarm.html
+func (client *Client) CreateAlarm(request *CreateAlarmRequest) (response *CreateAlarmResponse, err error) {
+	response = CreateCreateAlarmResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// CreateAlarmWithChan invokes the ess.CreateAlarm API asynchronously
+// api document: https://help.aliyun.com/api/ess/createalarm.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) CreateAlarmWithChan(request *CreateAlarmRequest) (<-chan *CreateAlarmResponse, <-chan error) {
+	responseChan := make(chan *CreateAlarmResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.CreateAlarm(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// CreateAlarmWithCallback invokes the ess.CreateAlarm API asynchronously
+// api document: https://help.aliyun.com/api/ess/createalarm.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) CreateAlarmWithCallback(request *CreateAlarmRequest, callback func(response *CreateAlarmResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *CreateAlarmResponse
+		var err error
+		defer close(result)
+		response, err = client.CreateAlarm(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// CreateAlarmRequest is the request struct for api CreateAlarm
+type CreateAlarmRequest struct {
+	*requests.RpcRequest
+	MetricType           string                  `position:"Query" name:"MetricType"`
+	Period               requests.Integer        `position:"Query" name:"Period"`
+	ResourceOwnerAccount string                  `position:"Query" name:"ResourceOwnerAccount"`
+	ScalingGroupId       string                  `position:"Query" name:"ScalingGroupId"`
+	GroupId              string                  `position:"Query" name:"GroupId"`
+	Description          string                  `position:"Query" name:"Description"`
+	AlarmAction          *[]string               `position:"Query" name:"AlarmAction"  type:"Repeated"`
+	Threshold            requests.Float          `position:"Query" name:"Threshold"`
+	OwnerId              requests.Integer        `position:"Query" name:"OwnerId"`
+	ComparisionOperator  string                  `position:"Query" name:"ComparisionOperator"`
+	Name                 string                  `position:"Query" name:"Name"`
+	EvaluationCount      requests.Integer        `position:"Query" name:"EvaluationCount"`
+	MetricName           string                  `position:"Query" name:"MetricName"`
+	Dimension            *[]CreateAlarmDimension `position:"Query" name:"Dimension"  type:"Repeated"`
+	Statistics           string                  `position:"Query" name:"Statistics"`
+}
+
+// CreateAlarmDimension is a repeated param struct in CreateAlarmRequest
+type CreateAlarmDimension struct {
+	DimensionValue string `name:"DimensionValue"`
+	DimensionKey   string `name:"DimensionKey"`
+}
+
+// CreateAlarmResponse is the response struct for api CreateAlarm
+type CreateAlarmResponse struct {
+	*responses.BaseResponse
+	RequestId   string `json:"RequestId" xml:"RequestId"`
+	AlarmTaskId string `json:"AlarmTaskId" xml:"AlarmTaskId"`
+}
+
+// CreateCreateAlarmRequest creates a request to invoke CreateAlarm API
+func CreateCreateAlarmRequest() (request *CreateAlarmRequest) {
+	request = &CreateAlarmRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("Ess", "2014-08-28", "CreateAlarm", "ess", "openAPI")
+	return
+}
+
+// CreateCreateAlarmResponse creates a response to parse from CreateAlarm response
+func CreateCreateAlarmResponse() (response *CreateAlarmResponse) {
+	response = &CreateAlarmResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 3 - 3
services/ess/create_lifecycle_hook.go

@@ -91,12 +91,12 @@ type CreateLifecycleHookRequest struct {
 
 // CreateLifecycleHookLifecycleHook is a repeated param struct in CreateLifecycleHookRequest
 type CreateLifecycleHookLifecycleHook struct {
-	LifecycleHookName    string `name:"LifecycleHookName"`
-	LifecycleTransition  string `name:"LifecycleTransition"`
 	DefaultResult        string `name:"DefaultResult"`
+	LifecycleHookName    string `name:"LifecycleHookName"`
 	HeartbeatTimeout     string `name:"HeartbeatTimeout"`
-	NotificationMetadata string `name:"NotificationMetadata"`
 	NotificationArn      string `name:"NotificationArn"`
+	NotificationMetadata string `name:"NotificationMetadata"`
+	LifecycleTransition  string `name:"LifecycleTransition"`
 }
 
 // CreateLifecycleHookResponse is the response struct for api CreateLifecycleHook

+ 11 - 20
services/ess/create_scaling_configuration.go

@@ -76,13 +76,8 @@ func (client *Client) CreateScalingConfigurationWithCallback(request *CreateScal
 // CreateScalingConfigurationRequest is the request struct for api CreateScalingConfiguration
 type CreateScalingConfigurationRequest struct {
 	*requests.RpcRequest
-	DataDisk3Size               requests.Integer                            `position:"Query" name:"DataDisk.3.Size"`
 	ImageId                     string                                      `position:"Query" name:"ImageId"`
-	DataDisk1SnapshotId         string                                      `position:"Query" name:"DataDisk.1.SnapshotId"`
-	DataDisk3Category           string                                      `position:"Query" name:"DataDisk.3.Category"`
-	DataDisk1Device             string                                      `position:"Query" name:"DataDisk.1.Device"`
 	ScalingGroupId              string                                      `position:"Query" name:"ScalingGroupId"`
-	DataDisk2Device             string                                      `position:"Query" name:"DataDisk.2.Device"`
 	InstanceTypes               *[]string                                   `position:"Query" name:"InstanceTypes"  type:"Repeated"`
 	IoOptimized                 string                                      `position:"Query" name:"IoOptimized"`
 	SecurityGroupId             string                                      `position:"Query" name:"SecurityGroupId"`
@@ -92,36 +87,23 @@ type CreateScalingConfigurationRequest struct {
 	SpotPriceLimit              *[]CreateScalingConfigurationSpotPriceLimit `position:"Query" name:"SpotPriceLimit"  type:"Repeated"`
 	SystemDiskCategory          string                                      `position:"Query" name:"SystemDisk.Category"`
 	UserData                    string                                      `position:"Query" name:"UserData"`
-	DataDisk4Category           string                                      `position:"Query" name:"DataDisk.4.Category"`
 	HostName                    string                                      `position:"Query" name:"HostName"`
-	DataDisk2SnapshotId         string                                      `position:"Query" name:"DataDisk.2.SnapshotId"`
 	PasswordInherit             requests.Boolean                            `position:"Query" name:"PasswordInherit"`
-	DataDisk4Size               requests.Integer                            `position:"Query" name:"DataDisk.4.Size"`
+	ImageName                   string                                      `position:"Query" name:"ImageName"`
 	InstanceType                string                                      `position:"Query" name:"InstanceType"`
-	DataDisk2Category           string                                      `position:"Query" name:"DataDisk.2.Category"`
-	DataDisk1Size               requests.Integer                            `position:"Query" name:"DataDisk.1.Size"`
-	DataDisk3SnapshotId         string                                      `position:"Query" name:"DataDisk.3.SnapshotId"`
 	ResourceOwnerAccount        string                                      `position:"Query" name:"ResourceOwnerAccount"`
 	OwnerAccount                string                                      `position:"Query" name:"OwnerAccount"`
-	DataDisk2Size               requests.Integer                            `position:"Query" name:"DataDisk.2.Size"`
 	RamRoleName                 string                                      `position:"Query" name:"RamRoleName"`
 	OwnerId                     requests.Integer                            `position:"Query" name:"OwnerId"`
+	DataDisk                    *[]CreateScalingConfigurationDataDisk       `position:"Query" name:"DataDisk"  type:"Repeated"`
 	ScalingConfigurationName    string                                      `position:"Query" name:"ScalingConfigurationName"`
 	Tags                        string                                      `position:"Query" name:"Tags"`
-	DataDisk2DeleteWithInstance string                                      `position:"Query" name:"DataDisk.2.DeleteWithInstance"`
 	SpotStrategy                string                                      `position:"Query" name:"SpotStrategy"`
-	DataDisk1Category           string                                      `position:"Query" name:"DataDisk.1.Category"`
-	DataDisk3DeleteWithInstance string                                      `position:"Query" name:"DataDisk.3.DeleteWithInstance"`
 	LoadBalancerWeight          requests.Integer                            `position:"Query" name:"LoadBalancerWeight"`
 	InstanceName                string                                      `position:"Query" name:"InstanceName"`
 	SystemDiskSize              requests.Integer                            `position:"Query" name:"SystemDisk.Size"`
-	DataDisk4SnapshotId         string                                      `position:"Query" name:"DataDisk.4.SnapshotId"`
-	DataDisk4Device             string                                      `position:"Query" name:"DataDisk.4.Device"`
 	InternetChargeType          string                                      `position:"Query" name:"InternetChargeType"`
-	DataDisk3Device             string                                      `position:"Query" name:"DataDisk.3.Device"`
-	DataDisk4DeleteWithInstance string                                      `position:"Query" name:"DataDisk.4.DeleteWithInstance"`
 	InternetMaxBandwidthIn      requests.Integer                            `position:"Query" name:"InternetMaxBandwidthIn"`
-	DataDisk1DeleteWithInstance string                                      `position:"Query" name:"DataDisk.1.DeleteWithInstance"`
 }
 
 // CreateScalingConfigurationSpotPriceLimit is a repeated param struct in CreateScalingConfigurationRequest
@@ -130,6 +112,15 @@ type CreateScalingConfigurationSpotPriceLimit struct {
 	PriceLimit   string `name:"PriceLimit"`
 }
 
+// CreateScalingConfigurationDataDisk is a repeated param struct in CreateScalingConfigurationRequest
+type CreateScalingConfigurationDataDisk struct {
+	SnapshotId         string `name:"SnapshotId"`
+	Size               string `name:"Size"`
+	Category           string `name:"Category"`
+	Device             string `name:"Device"`
+	DeleteWithInstance string `name:"DeleteWithInstance"`
+}
+
 // CreateScalingConfigurationResponse is the response struct for api CreateScalingConfiguration
 type CreateScalingConfigurationResponse struct {
 	*responses.BaseResponse

+ 3 - 3
services/ess/create_scaling_group.go

@@ -96,12 +96,12 @@ type CreateScalingGroupRequest struct {
 
 // CreateScalingGroupLifecycleHook is a repeated param struct in CreateScalingGroupRequest
 type CreateScalingGroupLifecycleHook struct {
-	LifecycleHookName    string `name:"LifecycleHookName"`
-	LifecycleTransition  string `name:"LifecycleTransition"`
 	DefaultResult        string `name:"DefaultResult"`
+	LifecycleHookName    string `name:"LifecycleHookName"`
 	HeartbeatTimeout     string `name:"HeartbeatTimeout"`
-	NotificationMetadata string `name:"NotificationMetadata"`
 	NotificationArn      string `name:"NotificationArn"`
+	NotificationMetadata string `name:"NotificationMetadata"`
+	LifecycleTransition  string `name:"LifecycleTransition"`
 }
 
 // CreateScalingGroupResponse is the response struct for api CreateScalingGroup

+ 106 - 0
services/ess/delete_alarm.go

@@ -0,0 +1,106 @@
+package ess
+
+//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"
+)
+
+// DeleteAlarm invokes the ess.DeleteAlarm API synchronously
+// api document: https://help.aliyun.com/api/ess/deletealarm.html
+func (client *Client) DeleteAlarm(request *DeleteAlarmRequest) (response *DeleteAlarmResponse, err error) {
+	response = CreateDeleteAlarmResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// DeleteAlarmWithChan invokes the ess.DeleteAlarm API asynchronously
+// api document: https://help.aliyun.com/api/ess/deletealarm.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) DeleteAlarmWithChan(request *DeleteAlarmRequest) (<-chan *DeleteAlarmResponse, <-chan error) {
+	responseChan := make(chan *DeleteAlarmResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.DeleteAlarm(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// DeleteAlarmWithCallback invokes the ess.DeleteAlarm API asynchronously
+// api document: https://help.aliyun.com/api/ess/deletealarm.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) DeleteAlarmWithCallback(request *DeleteAlarmRequest, callback func(response *DeleteAlarmResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *DeleteAlarmResponse
+		var err error
+		defer close(result)
+		response, err = client.DeleteAlarm(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// DeleteAlarmRequest is the request struct for api DeleteAlarm
+type DeleteAlarmRequest struct {
+	*requests.RpcRequest
+	ResourceOwnerAccount string           `position:"Query" name:"ResourceOwnerAccount"`
+	OwnerId              requests.Integer `position:"Query" name:"OwnerId"`
+	AlarmTaskId          string           `position:"Query" name:"AlarmTaskId"`
+}
+
+// DeleteAlarmResponse is the response struct for api DeleteAlarm
+type DeleteAlarmResponse struct {
+	*responses.BaseResponse
+	RequestId   string `json:"RequestId" xml:"RequestId"`
+	AlarmTaskId string `json:"AlarmTaskId" xml:"AlarmTaskId"`
+}
+
+// CreateDeleteAlarmRequest creates a request to invoke DeleteAlarm API
+func CreateDeleteAlarmRequest() (request *DeleteAlarmRequest) {
+	request = &DeleteAlarmRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("Ess", "2014-08-28", "DeleteAlarm", "ess", "openAPI")
+	return
+}
+
+// CreateDeleteAlarmResponse creates a response to parse from DeleteAlarm response
+func CreateDeleteAlarmResponse() (response *DeleteAlarmResponse) {
+	response = &DeleteAlarmResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 115 - 0
services/ess/describe_alarms.go

@@ -0,0 +1,115 @@
+package ess
+
+//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"
+)
+
+// DescribeAlarms invokes the ess.DescribeAlarms API synchronously
+// api document: https://help.aliyun.com/api/ess/describealarms.html
+func (client *Client) DescribeAlarms(request *DescribeAlarmsRequest) (response *DescribeAlarmsResponse, err error) {
+	response = CreateDescribeAlarmsResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// DescribeAlarmsWithChan invokes the ess.DescribeAlarms API asynchronously
+// api document: https://help.aliyun.com/api/ess/describealarms.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) DescribeAlarmsWithChan(request *DescribeAlarmsRequest) (<-chan *DescribeAlarmsResponse, <-chan error) {
+	responseChan := make(chan *DescribeAlarmsResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.DescribeAlarms(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// DescribeAlarmsWithCallback invokes the ess.DescribeAlarms API asynchronously
+// api document: https://help.aliyun.com/api/ess/describealarms.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) DescribeAlarmsWithCallback(request *DescribeAlarmsRequest, callback func(response *DescribeAlarmsResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *DescribeAlarmsResponse
+		var err error
+		defer close(result)
+		response, err = client.DescribeAlarms(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// DescribeAlarmsRequest is the request struct for api DescribeAlarms
+type DescribeAlarmsRequest struct {
+	*requests.RpcRequest
+	IsEnable             requests.Boolean `position:"Query" name:"IsEnable"`
+	MetricType           string           `position:"Query" name:"MetricType"`
+	ResourceOwnerAccount string           `position:"Query" name:"ResourceOwnerAccount"`
+	ScalingGroupId       string           `position:"Query" name:"ScalingGroupId"`
+	PageSize             requests.Integer `position:"Query" name:"PageSize"`
+	State                string           `position:"Query" name:"State"`
+	OwnerId              requests.Integer `position:"Query" name:"OwnerId"`
+	AlarmTaskId          string           `position:"Query" name:"AlarmTaskId"`
+	PageNumber           requests.Integer `position:"Query" name:"PageNumber"`
+}
+
+// DescribeAlarmsResponse is the response struct for api DescribeAlarms
+type DescribeAlarmsResponse 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"`
+	AlarmList  AlarmList `json:"AlarmList" xml:"AlarmList"`
+}
+
+// CreateDescribeAlarmsRequest creates a request to invoke DescribeAlarms API
+func CreateDescribeAlarmsRequest() (request *DescribeAlarmsRequest) {
+	request = &DescribeAlarmsRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("Ess", "2014-08-28", "DescribeAlarms", "ess", "openAPI")
+	return
+}
+
+// CreateDescribeAlarmsResponse creates a response to parse from DescribeAlarms response
+func CreateDescribeAlarmsResponse() (response *DescribeAlarmsResponse) {
+	response = &DescribeAlarmsResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 105 - 0
services/ess/disable_alarm.go

@@ -0,0 +1,105 @@
+package ess
+
+//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"
+)
+
+// DisableAlarm invokes the ess.DisableAlarm API synchronously
+// api document: https://help.aliyun.com/api/ess/disablealarm.html
+func (client *Client) DisableAlarm(request *DisableAlarmRequest) (response *DisableAlarmResponse, err error) {
+	response = CreateDisableAlarmResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// DisableAlarmWithChan invokes the ess.DisableAlarm API asynchronously
+// api document: https://help.aliyun.com/api/ess/disablealarm.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) DisableAlarmWithChan(request *DisableAlarmRequest) (<-chan *DisableAlarmResponse, <-chan error) {
+	responseChan := make(chan *DisableAlarmResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.DisableAlarm(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// DisableAlarmWithCallback invokes the ess.DisableAlarm API asynchronously
+// api document: https://help.aliyun.com/api/ess/disablealarm.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) DisableAlarmWithCallback(request *DisableAlarmRequest, callback func(response *DisableAlarmResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *DisableAlarmResponse
+		var err error
+		defer close(result)
+		response, err = client.DisableAlarm(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// DisableAlarmRequest is the request struct for api DisableAlarm
+type DisableAlarmRequest struct {
+	*requests.RpcRequest
+	ResourceOwnerAccount string           `position:"Query" name:"ResourceOwnerAccount"`
+	OwnerId              requests.Integer `position:"Query" name:"OwnerId"`
+	AlarmTaskId          string           `position:"Query" name:"AlarmTaskId"`
+}
+
+// DisableAlarmResponse is the response struct for api DisableAlarm
+type DisableAlarmResponse struct {
+	*responses.BaseResponse
+	RequestId string `json:"RequestId" xml:"RequestId"`
+}
+
+// CreateDisableAlarmRequest creates a request to invoke DisableAlarm API
+func CreateDisableAlarmRequest() (request *DisableAlarmRequest) {
+	request = &DisableAlarmRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("Ess", "2014-08-28", "DisableAlarm", "ess", "openAPI")
+	return
+}
+
+// CreateDisableAlarmResponse creates a response to parse from DisableAlarm response
+func CreateDisableAlarmResponse() (response *DisableAlarmResponse) {
+	response = &DisableAlarmResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 105 - 0
services/ess/enable_alarm.go

@@ -0,0 +1,105 @@
+package ess
+
+//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"
+)
+
+// EnableAlarm invokes the ess.EnableAlarm API synchronously
+// api document: https://help.aliyun.com/api/ess/enablealarm.html
+func (client *Client) EnableAlarm(request *EnableAlarmRequest) (response *EnableAlarmResponse, err error) {
+	response = CreateEnableAlarmResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// EnableAlarmWithChan invokes the ess.EnableAlarm API asynchronously
+// api document: https://help.aliyun.com/api/ess/enablealarm.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) EnableAlarmWithChan(request *EnableAlarmRequest) (<-chan *EnableAlarmResponse, <-chan error) {
+	responseChan := make(chan *EnableAlarmResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.EnableAlarm(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// EnableAlarmWithCallback invokes the ess.EnableAlarm API asynchronously
+// api document: https://help.aliyun.com/api/ess/enablealarm.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) EnableAlarmWithCallback(request *EnableAlarmRequest, callback func(response *EnableAlarmResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *EnableAlarmResponse
+		var err error
+		defer close(result)
+		response, err = client.EnableAlarm(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// EnableAlarmRequest is the request struct for api EnableAlarm
+type EnableAlarmRequest struct {
+	*requests.RpcRequest
+	ResourceOwnerAccount string           `position:"Query" name:"ResourceOwnerAccount"`
+	OwnerId              requests.Integer `position:"Query" name:"OwnerId"`
+	AlarmTaskId          string           `position:"Query" name:"AlarmTaskId"`
+}
+
+// EnableAlarmResponse is the response struct for api EnableAlarm
+type EnableAlarmResponse struct {
+	*responses.BaseResponse
+	RequestId string `json:"RequestId" xml:"RequestId"`
+}
+
+// CreateEnableAlarmRequest creates a request to invoke EnableAlarm API
+func CreateEnableAlarmRequest() (request *EnableAlarmRequest) {
+	request = &EnableAlarmRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("Ess", "2014-08-28", "EnableAlarm", "ess", "openAPI")
+	return
+}
+
+// CreateEnableAlarmResponse creates a response to parse from EnableAlarm response
+func CreateEnableAlarmResponse() (response *EnableAlarmResponse) {
+	response = &EnableAlarmResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 109 - 0
services/ess/modify_alarm.go

@@ -0,0 +1,109 @@
+package ess
+
+//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"
+)
+
+// ModifyAlarm invokes the ess.ModifyAlarm API synchronously
+// api document: https://help.aliyun.com/api/ess/modifyalarm.html
+func (client *Client) ModifyAlarm(request *ModifyAlarmRequest) (response *ModifyAlarmResponse, err error) {
+	response = CreateModifyAlarmResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// ModifyAlarmWithChan invokes the ess.ModifyAlarm API asynchronously
+// api document: https://help.aliyun.com/api/ess/modifyalarm.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) ModifyAlarmWithChan(request *ModifyAlarmRequest) (<-chan *ModifyAlarmResponse, <-chan error) {
+	responseChan := make(chan *ModifyAlarmResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.ModifyAlarm(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// ModifyAlarmWithCallback invokes the ess.ModifyAlarm API asynchronously
+// api document: https://help.aliyun.com/api/ess/modifyalarm.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) ModifyAlarmWithCallback(request *ModifyAlarmRequest, callback func(response *ModifyAlarmResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *ModifyAlarmResponse
+		var err error
+		defer close(result)
+		response, err = client.ModifyAlarm(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// ModifyAlarmRequest is the request struct for api ModifyAlarm
+type ModifyAlarmRequest struct {
+	*requests.RpcRequest
+	ResourceOwnerAccount string           `position:"Query" name:"ResourceOwnerAccount"`
+	Name                 string           `position:"Query" name:"Name"`
+	Description          string           `position:"Query" name:"Description"`
+	AlarmAction          *[]string        `position:"Query" name:"AlarmAction"  type:"Repeated"`
+	OwnerId              requests.Integer `position:"Query" name:"OwnerId"`
+	AlarmTaskId          string           `position:"Query" name:"AlarmTaskId"`
+}
+
+// ModifyAlarmResponse is the response struct for api ModifyAlarm
+type ModifyAlarmResponse struct {
+	*responses.BaseResponse
+	RequestId   string `json:"RequestId" xml:"RequestId"`
+	AlarmTaskId string `json:"AlarmTaskId" xml:"AlarmTaskId"`
+}
+
+// CreateModifyAlarmRequest creates a request to invoke ModifyAlarm API
+func CreateModifyAlarmRequest() (request *ModifyAlarmRequest) {
+	request = &ModifyAlarmRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("Ess", "2014-08-28", "ModifyAlarm", "ess", "openAPI")
+	return
+}
+
+// CreateModifyAlarmResponse creates a response to parse from ModifyAlarm response
+func CreateModifyAlarmResponse() (response *ModifyAlarmResponse) {
+	response = &ModifyAlarmResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 39 - 19
services/ess/modify_scaling_configuration.go

@@ -76,25 +76,45 @@ func (client *Client) ModifyScalingConfigurationWithCallback(request *ModifyScal
 // ModifyScalingConfigurationRequest is the request struct for api ModifyScalingConfiguration
 type ModifyScalingConfigurationRequest struct {
 	*requests.RpcRequest
-	ImageId                  string           `position:"Query" name:"ImageId"`
-	ResourceOwnerAccount     string           `position:"Query" name:"ResourceOwnerAccount"`
-	OwnerAccount             string           `position:"Query" name:"OwnerAccount"`
-	InstanceTypes            *[]string        `position:"Query" name:"InstanceTypes"  type:"Repeated"`
-	InternetMaxBandwidthOut  requests.Integer `position:"Query" name:"InternetMaxBandwidthOut"`
-	RamRoleName              string           `position:"Query" name:"RamRoleName"`
-	KeyPairName              string           `position:"Query" name:"KeyPairName"`
-	OwnerId                  requests.Integer `position:"Query" name:"OwnerId"`
-	SystemDiskCategory       string           `position:"Query" name:"SystemDisk.Category"`
-	ScalingConfigurationName string           `position:"Query" name:"ScalingConfigurationName"`
-	Tags                     string           `position:"Query" name:"Tags"`
-	ScalingConfigurationId   string           `position:"Query" name:"ScalingConfigurationId"`
-	UserData                 string           `position:"Query" name:"UserData"`
-	HostName                 string           `position:"Query" name:"HostName"`
-	InstanceName             string           `position:"Query" name:"InstanceName"`
-	LoadBalancerWeight       requests.Integer `position:"Query" name:"LoadBalancerWeight"`
-	PasswordInherit          requests.Boolean `position:"Query" name:"PasswordInherit"`
-	SystemDiskSize           requests.Integer `position:"Query" name:"SystemDisk.Size"`
-	InternetChargeType       string           `position:"Query" name:"InternetChargeType"`
+	ImageId                  string                                      `position:"Query" name:"ImageId"`
+	IoOptimized              string                                      `position:"Query" name:"IoOptimized"`
+	InstanceTypes            *[]string                                   `position:"Query" name:"InstanceTypes"  type:"Repeated"`
+	InternetMaxBandwidthOut  requests.Integer                            `position:"Query" name:"InternetMaxBandwidthOut"`
+	KeyPairName              string                                      `position:"Query" name:"KeyPairName"`
+	SpotPriceLimit           *[]ModifyScalingConfigurationSpotPriceLimit `position:"Query" name:"SpotPriceLimit"  type:"Repeated"`
+	SystemDiskCategory       string                                      `position:"Query" name:"SystemDisk.Category"`
+	UserData                 string                                      `position:"Query" name:"UserData"`
+	HostName                 string                                      `position:"Query" name:"HostName"`
+	PasswordInherit          requests.Boolean                            `position:"Query" name:"PasswordInherit"`
+	ImageName                string                                      `position:"Query" name:"ImageName"`
+	ResourceOwnerAccount     string                                      `position:"Query" name:"ResourceOwnerAccount"`
+	OwnerAccount             string                                      `position:"Query" name:"OwnerAccount"`
+	RamRoleName              string                                      `position:"Query" name:"RamRoleName"`
+	OwnerId                  requests.Integer                            `position:"Query" name:"OwnerId"`
+	DataDisk                 *[]ModifyScalingConfigurationDataDisk       `position:"Query" name:"DataDisk"  type:"Repeated"`
+	ScalingConfigurationName string                                      `position:"Query" name:"ScalingConfigurationName"`
+	Tags                     string                                      `position:"Query" name:"Tags"`
+	ScalingConfigurationId   string                                      `position:"Query" name:"ScalingConfigurationId"`
+	SpotStrategy             string                                      `position:"Query" name:"SpotStrategy"`
+	InstanceName             string                                      `position:"Query" name:"InstanceName"`
+	LoadBalancerWeight       requests.Integer                            `position:"Query" name:"LoadBalancerWeight"`
+	SystemDiskSize           requests.Integer                            `position:"Query" name:"SystemDisk.Size"`
+	InternetChargeType       string                                      `position:"Query" name:"InternetChargeType"`
+}
+
+// ModifyScalingConfigurationSpotPriceLimit is a repeated param struct in ModifyScalingConfigurationRequest
+type ModifyScalingConfigurationSpotPriceLimit struct {
+	InstanceType string `name:"InstanceType"`
+	PriceLimit   string `name:"PriceLimit"`
+}
+
+// ModifyScalingConfigurationDataDisk is a repeated param struct in ModifyScalingConfigurationRequest
+type ModifyScalingConfigurationDataDisk struct {
+	SnapshotId         string `name:"SnapshotId"`
+	Size               string `name:"Size"`
+	Category           string `name:"Category"`
+	Device             string `name:"Device"`
+	DeleteWithInstance string `name:"DeleteWithInstance"`
 }
 
 // ModifyScalingConfigurationResponse is the response struct for api ModifyScalingConfiguration

+ 35 - 0
services/ess/struct_alarm.go

@@ -0,0 +1,35 @@
+package ess
+
+//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.
+
+// Alarm is a nested struct in ess response
+type Alarm struct {
+	AlarmTaskId        string       `json:"AlarmTaskId" xml:"AlarmTaskId"`
+	Name               string       `json:"Name" xml:"Name"`
+	Description        string       `json:"Description" xml:"Description"`
+	MetricType         string       `json:"MetricType" xml:"MetricType"`
+	MetricName         string       `json:"MetricName" xml:"MetricName"`
+	Dimensions         string       `json:"Dimensions" xml:"Dimensions"`
+	Period             int          `json:"Period" xml:"Period"`
+	Statistics         string       `json:"Statistics" xml:"Statistics"`
+	ComparisonOperator string       `json:"ComparisonOperator" xml:"ComparisonOperator"`
+	Threshold          float64      `json:"Threshold" xml:"Threshold"`
+	EvaluationCount    int          `json:"EvaluationCount" xml:"EvaluationCount"`
+	State              string       `json:"State" xml:"State"`
+	ScalingGroupId     string       `json:"ScalingGroupId" xml:"ScalingGroupId"`
+	Enable             bool         `json:"Enable" xml:"Enable"`
+	AlarmActions       AlarmActions `json:"alarmActions" xml:"alarmActions"`
+}

+ 21 - 0
services/ess/struct_alarm_actions.go

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

+ 21 - 0
services/ess/struct_alarm_list.go

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

+ 5 - 4
services/ess/struct_data_disk.go

@@ -17,8 +17,9 @@ package ess
 
 // DataDisk is a nested struct in ess response
 type DataDisk struct {
-	Size       int    `json:"Size" xml:"Size"`
-	Category   string `json:"Category" xml:"Category"`
-	SnapshotId string `json:"SnapshotId" xml:"SnapshotId"`
-	Device     string `json:"Device" xml:"Device"`
+	Size               int    `json:"Size" xml:"Size"`
+	Category           string `json:"Category" xml:"Category"`
+	SnapshotId         string `json:"SnapshotId" xml:"SnapshotId"`
+	Device             string `json:"Device" xml:"Device"`
+	DeleteWithInstance bool   `json:"DeleteWithInstance" xml:"DeleteWithInstance"`
 }

+ 1 - 0
services/ess/struct_scaling_configuration.go

@@ -22,6 +22,7 @@ type ScalingConfiguration struct {
 	ScalingGroupId              string         `json:"ScalingGroupId" xml:"ScalingGroupId"`
 	InstanceName                string         `json:"InstanceName" xml:"InstanceName"`
 	ImageId                     string         `json:"ImageId" xml:"ImageId"`
+	ImageName                   string         `json:"ImageName" xml:"ImageName"`
 	HostName                    string         `json:"HostName" xml:"HostName"`
 	InstanceType                string         `json:"InstanceType" xml:"InstanceType"`
 	InstanceGeneration          string         `json:"InstanceGeneration" xml:"InstanceGeneration"`