Parcourir la source

Generated 2017-06-13 for elasticsearch.

sdk-team il y a 5 ans
Parent
commit
518ae273ff

+ 4 - 0
ChangeLog.txt

@@ -1,3 +1,7 @@
+2020-02-24 Version: v1.60.391
+- Generated 2017-06-13 for `elasticsearch`.
+- Add tag of list instance parameters.
+
 2020-02-24 Version: v1.60.390
 - Generated 2018-06-12 for `VoiceNavigator`.
 

+ 2 - 2
services/elasticsearch/describe_connectable_clusters.go

@@ -83,8 +83,8 @@ type DescribeConnectableClustersRequest struct {
 // DescribeConnectableClustersResponse is the response struct for api DescribeConnectableClusters
 type DescribeConnectableClustersResponse struct {
 	*responses.BaseResponse
-	RequestId string                              `json:"RequestId" xml:"RequestId"`
-	Result    ResultInDescribeConnectableClusters `json:"Result" xml:"Result"`
+	RequestId string                    `json:"RequestId" xml:"RequestId"`
+	Result    []ConnectableClustersInfo `json:"Result" xml:"Result"`
 }
 
 // CreateDescribeConnectableClustersRequest creates a request to invoke DescribeConnectableClusters API

+ 12 - 7
services/elasticsearch/list_instance.go

@@ -76,13 +76,18 @@ func (client *Client) ListInstanceWithCallback(request *ListInstanceRequest, cal
 // ListInstanceRequest is the request struct for api ListInstance
 type ListInstanceRequest struct {
 	*requests.RoaRequest
-	ResourceGroupId string           `position:"Query" name:"resourceGroupId"`
-	InstanceId      string           `position:"Query" name:"instanceId"`
-	Size            requests.Integer `position:"Query" name:"size"`
-	EsVersion       string           `position:"Query" name:"esVersion"`
-	Description     string           `position:"Query" name:"description"`
-	Page            requests.Integer `position:"Query" name:"page"`
-	OwnerId         string           `position:"Query" name:"ownerId"`
+	Description      string           `position:"Query" name:"description"`
+	InstanceCategory string           `position:"Query" name:"instanceCategory"`
+	OwnerId          string           `position:"Query" name:"ownerId"`
+	Tags             string           `position:"Query" name:"tags"`
+	ResourceGroupId  string           `position:"Query" name:"resourceGroupId"`
+	InstanceId       string           `position:"Query" name:"instanceId"`
+	Size             requests.Integer `position:"Query" name:"size"`
+	EsVersion        string           `position:"Query" name:"esVersion"`
+	VpcId            string           `position:"Query" name:"vpcId"`
+	ZoneId           string           `position:"Query" name:"zoneId"`
+	Page             requests.Integer `position:"Query" name:"page"`
+	PaymentType      string           `position:"Query" name:"paymentType"`
 }
 
 // ListInstanceResponse is the response struct for api ListInstance

+ 1 - 1
services/elasticsearch/move_resource_group.go

@@ -93,7 +93,7 @@ func CreateMoveResourceGroupRequest() (request *MoveResourceGroupRequest) {
 		RoaRequest: &requests.RoaRequest{},
 	}
 	request.InitWithApiInfo("elasticsearch", "2017-06-13", "MoveResourceGroup", "/openapi/instances/[InstanceId]/resourcegroup", "elasticsearch", "openAPI")
-	request.Method = requests.POST
+	request.Method = requests.PATCH
 	return
 }
 

+ 1 - 0
services/elasticsearch/struct_instance.go

@@ -32,4 +32,5 @@ type Instance struct {
 	MasterConfiguration    MasterConfiguration `json:"masterConfiguration" xml:"masterConfiguration"`
 	NodeSpec               NodeSpec            `json:"nodeSpec" xml:"nodeSpec"`
 	KibanaConfiguration    KibanaConfiguration `json:"kibanaConfiguration" xml:"kibanaConfiguration"`
+	Tags                   []Tag               `json:"tags" xml:"tags"`
 }

+ 3 - 0
services/elasticsearch/struct_result.go

@@ -18,6 +18,7 @@ package elasticsearch
 // Result is a nested struct in elasticsearch response
 type Result struct {
 	Config                    map[string]interface{}     `json:"config" xml:"config"`
+	ValidateType              string                     `json:"validateType" xml:"validateType"`
 	KibanaPort                int                        `json:"kibanaPort" xml:"kibanaPort"`
 	VpcInstanceId             string                     `json:"vpcInstanceId" xml:"vpcInstanceId"`
 	UserName                  string                     `json:"userName" xml:"userName"`
@@ -74,6 +75,7 @@ type Result struct {
 	NetworkConfig             NetworkConfig              `json:"networkConfig" xml:"networkConfig"`
 	MasterConfiguration       MasterConfiguration        `json:"masterConfiguration" xml:"masterConfiguration"`
 	KibanaNodeProperties      KibanaNodeProperties       `json:"kibanaNodeProperties" xml:"kibanaNodeProperties"`
+	ValidateResult            ValidateResult             `json:"validateResult" xml:"validateResult"`
 	ClientNodeAmountRange     ClientNodeAmountRange      `json:"clientNodeAmountRange" xml:"clientNodeAmountRange"`
 	SupportVersions           []CategoryEntity           `json:"supportVersions" xml:"supportVersions"`
 	ZoneInfos                 []ZoneInfo                 `json:"zoneInfos" xml:"zoneInfos"`
@@ -84,6 +86,7 @@ type Result struct {
 	ClientNodeDiskList        []Disk                     `json:"clientNodeDiskList" xml:"clientNodeDiskList"`
 	DataDiskList              []DataDiskListItem         `json:"dataDiskList" xml:"dataDiskList"`
 	SynonymsDicts             []SynonymsDicts            `json:"synonymsDicts" xml:"synonymsDicts"`
+	Tags                      []Tag                      `json:"tags" xml:"tags"`
 	AliwsDicts                []Dict                     `json:"aliwsDicts" xml:"aliwsDicts"`
 	DictList                  []DictList                 `json:"dictList" xml:"dictList"`
 }

+ 22 - 0
services/elasticsearch/struct_tag.go

@@ -0,0 +1,22 @@
+package elasticsearch
+
+//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.
+
+// Tag is a nested struct in elasticsearch response
+type Tag struct {
+	TagValue string `json:"tagValue" xml:"tagValue"`
+	TagKey   string `json:"tagKey" xml:"tagKey"`
+}

+ 21 - 0
services/elasticsearch/struct_tags_in_describe_instance.go

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

+ 21 - 0
services/elasticsearch/struct_tags_in_list_instance.go

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

+ 23 - 0
services/elasticsearch/struct_validate_result.go

@@ -0,0 +1,23 @@
+package elasticsearch
+
+//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.
+
+// ValidateResult is a nested struct in elasticsearch response
+type ValidateResult struct {
+	ErrorType string `json:"errorType" xml:"errorType"`
+	ErrorCode string `json:"errorCode" xml:"errorCode"`
+	ErrorMsg  string `json:"errorMsg" xml:"errorMsg"`
+}

+ 1 - 1
services/elasticsearch/tag_resources.go

@@ -90,7 +90,7 @@ func CreateTagResourcesRequest() (request *TagResourcesRequest) {
 		RoaRequest: &requests.RoaRequest{},
 	}
 	request.InitWithApiInfo("elasticsearch", "2017-06-13", "TagResources", "/openapi/tags", "elasticsearch", "openAPI")
-	request.Method = requests.POST
+	request.Method = requests.PATCH
 	return
 }
 

+ 1 - 1
services/elasticsearch/update_admin_password.go

@@ -92,7 +92,7 @@ func CreateUpdateAdminPasswordRequest() (request *UpdateAdminPasswordRequest) {
 		RoaRequest: &requests.RoaRequest{},
 	}
 	request.InitWithApiInfo("elasticsearch", "2017-06-13", "UpdateAdminPassword", "/openapi/instances/[InstanceId]/admin-pwd", "elasticsearch", "openAPI")
-	request.Method = requests.POST
+	request.Method = requests.PATCH
 	return
 }
 

+ 1 - 1
services/elasticsearch/update_advanced_setting.go

@@ -93,7 +93,7 @@ func CreateUpdateAdvancedSettingRequest() (request *UpdateAdvancedSettingRequest
 		RoaRequest: &requests.RoaRequest{},
 	}
 	request.InitWithApiInfo("elasticsearch", "2017-06-13", "UpdateAdvancedSetting", "/openapi/instances/[InstanceId]/actions/update-advanced-setting", "elasticsearch", "openAPI")
-	request.Method = requests.PUT
+	request.Method = requests.POST
 	return
 }
 

+ 1 - 1
services/elasticsearch/update_black_ips.go

@@ -93,7 +93,7 @@ func CreateUpdateBlackIpsRequest() (request *UpdateBlackIpsRequest) {
 		RoaRequest: &requests.RoaRequest{},
 	}
 	request.InitWithApiInfo("elasticsearch", "2017-06-13", "UpdateBlackIps", "/openapi/instances/[InstanceId]/black-ips", "elasticsearch", "openAPI")
-	request.Method = requests.POST
+	request.Method = requests.PATCH
 	return
 }
 

+ 1 - 1
services/elasticsearch/update_description.go

@@ -93,7 +93,7 @@ func CreateUpdateDescriptionRequest() (request *UpdateDescriptionRequest) {
 		RoaRequest: &requests.RoaRequest{},
 	}
 	request.InitWithApiInfo("elasticsearch", "2017-06-13", "UpdateDescription", "/openapi/instances/[InstanceId]/description", "elasticsearch", "openAPI")
-	request.Method = requests.POST
+	request.Method = requests.PATCH
 	return
 }
 

+ 1 - 1
services/elasticsearch/update_instance_settings.go

@@ -92,7 +92,7 @@ func CreateUpdateInstanceSettingsRequest() (request *UpdateInstanceSettingsReque
 		RoaRequest: &requests.RoaRequest{},
 	}
 	request.InitWithApiInfo("elasticsearch", "2017-06-13", "UpdateInstanceSettings", "/openapi/instances/[InstanceId]/instance-settings", "elasticsearch", "openAPI")
-	request.Method = requests.POST
+	request.Method = requests.PATCH
 	return
 }
 

+ 1 - 1
services/elasticsearch/update_kibana_settings.go

@@ -93,7 +93,7 @@ func CreateUpdateKibanaSettingsRequest() (request *UpdateKibanaSettingsRequest)
 		RoaRequest: &requests.RoaRequest{},
 	}
 	request.InitWithApiInfo("elasticsearch", "2017-06-13", "UpdateKibanaSettings", "/openapi/instances/[InstanceId]/actions/update-kibana-settings", "elasticsearch", "openAPI")
-	request.Method = requests.POST
+	request.Method = requests.PATCH
 	return
 }
 

+ 1 - 1
services/elasticsearch/update_kibana_white_ips.go

@@ -93,7 +93,7 @@ func CreateUpdateKibanaWhiteIpsRequest() (request *UpdateKibanaWhiteIpsRequest)
 		RoaRequest: &requests.RoaRequest{},
 	}
 	request.InitWithApiInfo("elasticsearch", "2017-06-13", "UpdateKibanaWhiteIps", "/openapi/instances/[InstanceId]/kibana-white-ips", "elasticsearch", "openAPI")
-	request.Method = requests.POST
+	request.Method = requests.PATCH
 	return
 }
 

+ 1 - 1
services/elasticsearch/update_logstash.go

@@ -93,7 +93,7 @@ func CreateUpdateLogstashRequest() (request *UpdateLogstashRequest) {
 		RoaRequest: &requests.RoaRequest{},
 	}
 	request.InitWithApiInfo("elasticsearch", "2017-06-13", "UpdateLogstash", "/openapi/logstashes/[InstanceId]", "elasticsearch", "openAPI")
-	request.Method = requests.PUT
+	request.Method = requests.PATCH
 	return
 }
 

+ 1 - 1
services/elasticsearch/update_logstash_description.go

@@ -93,7 +93,7 @@ func CreateUpdateLogstashDescriptionRequest() (request *UpdateLogstashDescriptio
 		RoaRequest: &requests.RoaRequest{},
 	}
 	request.InitWithApiInfo("elasticsearch", "2017-06-13", "UpdateLogstashDescription", "/openapi/logstashes/[InstanceId]/description", "elasticsearch", "openAPI")
-	request.Method = requests.POST
+	request.Method = requests.PATCH
 	return
 }
 

+ 1 - 1
services/elasticsearch/update_logstash_settings.go

@@ -92,7 +92,7 @@ func CreateUpdateLogstashSettingsRequest() (request *UpdateLogstashSettingsReque
 		RoaRequest: &requests.RoaRequest{},
 	}
 	request.InitWithApiInfo("elasticsearch", "2017-06-13", "UpdateLogstashSettings", "/openapi/logstashes/[InstanceId]/instance-settings", "elasticsearch", "openAPI")
-	request.Method = requests.POST
+	request.Method = requests.PATCH
 	return
 }
 

+ 107 - 0
services/elasticsearch/update_pipelines.go

@@ -0,0 +1,107 @@
+package elasticsearch
+
+//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"
+)
+
+// UpdatePipelines invokes the elasticsearch.UpdatePipelines API synchronously
+// api document: https://help.aliyun.com/api/elasticsearch/updatepipelines.html
+func (client *Client) UpdatePipelines(request *UpdatePipelinesRequest) (response *UpdatePipelinesResponse, err error) {
+	response = CreateUpdatePipelinesResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// UpdatePipelinesWithChan invokes the elasticsearch.UpdatePipelines API asynchronously
+// api document: https://help.aliyun.com/api/elasticsearch/updatepipelines.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) UpdatePipelinesWithChan(request *UpdatePipelinesRequest) (<-chan *UpdatePipelinesResponse, <-chan error) {
+	responseChan := make(chan *UpdatePipelinesResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.UpdatePipelines(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// UpdatePipelinesWithCallback invokes the elasticsearch.UpdatePipelines API asynchronously
+// api document: https://help.aliyun.com/api/elasticsearch/updatepipelines.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) UpdatePipelinesWithCallback(request *UpdatePipelinesRequest, callback func(response *UpdatePipelinesResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *UpdatePipelinesResponse
+		var err error
+		defer close(result)
+		response, err = client.UpdatePipelines(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// UpdatePipelinesRequest is the request struct for api UpdatePipelines
+type UpdatePipelinesRequest struct {
+	*requests.RoaRequest
+	InstanceId  string           `position:"Path" name:"InstanceId"`
+	ClientToken string           `position:"Query" name:"clientToken"`
+	Trigger     requests.Boolean `position:"Query" name:"trigger"`
+}
+
+// UpdatePipelinesResponse is the response struct for api UpdatePipelines
+type UpdatePipelinesResponse struct {
+	*responses.BaseResponse
+	RequestId string `json:"RequestId" xml:"RequestId"`
+	Result    bool   `json:"Result" xml:"Result"`
+}
+
+// CreateUpdatePipelinesRequest creates a request to invoke UpdatePipelines API
+func CreateUpdatePipelinesRequest() (request *UpdatePipelinesRequest) {
+	request = &UpdatePipelinesRequest{
+		RoaRequest: &requests.RoaRequest{},
+	}
+	request.InitWithApiInfo("elasticsearch", "2017-06-13", "UpdatePipelines", "/openapi/logstashes/[InstanceId]/pipelines", "elasticsearch", "openAPI")
+	request.Method = requests.PUT
+	return
+}
+
+// CreateUpdatePipelinesResponse creates a response to parse from UpdatePipelines response
+func CreateUpdatePipelinesResponse() (response *UpdatePipelinesResponse) {
+	response = &UpdatePipelinesResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 1 - 1
services/elasticsearch/update_public_network.go

@@ -93,7 +93,7 @@ func CreateUpdatePublicNetworkRequest() (request *UpdatePublicNetworkRequest) {
 		RoaRequest: &requests.RoaRequest{},
 	}
 	request.InitWithApiInfo("elasticsearch", "2017-06-13", "UpdatePublicNetwork", "/openapi/instances/[InstanceId]/public-network", "elasticsearch", "openAPI")
-	request.Method = requests.POST
+	request.Method = requests.PATCH
 	return
 }
 

+ 1 - 1
services/elasticsearch/update_public_white_ips.go

@@ -93,7 +93,7 @@ func CreateUpdatePublicWhiteIpsRequest() (request *UpdatePublicWhiteIpsRequest)
 		RoaRequest: &requests.RoaRequest{},
 	}
 	request.InitWithApiInfo("elasticsearch", "2017-06-13", "UpdatePublicWhiteIps", "/openapi/instances/[InstanceId]/public-white-ips", "elasticsearch", "openAPI")
-	request.Method = requests.POST
+	request.Method = requests.PATCH
 	return
 }
 

+ 1 - 1
services/elasticsearch/update_white_ips.go

@@ -93,7 +93,7 @@ func CreateUpdateWhiteIpsRequest() (request *UpdateWhiteIpsRequest) {
 		RoaRequest: &requests.RoaRequest{},
 	}
 	request.InitWithApiInfo("elasticsearch", "2017-06-13", "UpdateWhiteIps", "/openapi/instances/[InstanceId]/white-ips", "elasticsearch", "openAPI")
-	request.Method = requests.POST
+	request.Method = requests.PATCH
 	return
 }
 

+ 107 - 0
services/elasticsearch/upgrade_engine_version.go

@@ -0,0 +1,107 @@
+package elasticsearch
+
+//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"
+)
+
+// UpgradeEngineVersion invokes the elasticsearch.UpgradeEngineVersion API synchronously
+// api document: https://help.aliyun.com/api/elasticsearch/upgradeengineversion.html
+func (client *Client) UpgradeEngineVersion(request *UpgradeEngineVersionRequest) (response *UpgradeEngineVersionResponse, err error) {
+	response = CreateUpgradeEngineVersionResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// UpgradeEngineVersionWithChan invokes the elasticsearch.UpgradeEngineVersion API asynchronously
+// api document: https://help.aliyun.com/api/elasticsearch/upgradeengineversion.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) UpgradeEngineVersionWithChan(request *UpgradeEngineVersionRequest) (<-chan *UpgradeEngineVersionResponse, <-chan error) {
+	responseChan := make(chan *UpgradeEngineVersionResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.UpgradeEngineVersion(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// UpgradeEngineVersionWithCallback invokes the elasticsearch.UpgradeEngineVersion API asynchronously
+// api document: https://help.aliyun.com/api/elasticsearch/upgradeengineversion.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) UpgradeEngineVersionWithCallback(request *UpgradeEngineVersionRequest, callback func(response *UpgradeEngineVersionResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *UpgradeEngineVersionResponse
+		var err error
+		defer close(result)
+		response, err = client.UpgradeEngineVersion(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// UpgradeEngineVersionRequest is the request struct for api UpgradeEngineVersion
+type UpgradeEngineVersionRequest struct {
+	*requests.RoaRequest
+	InstanceId  string           `position:"Path" name:"InstanceId"`
+	DryRun      requests.Boolean `position:"Query" name:"dryRun"`
+	ClientToken string           `position:"Query" name:"clientToken"`
+}
+
+// UpgradeEngineVersionResponse is the response struct for api UpgradeEngineVersion
+type UpgradeEngineVersionResponse struct {
+	*responses.BaseResponse
+	RequestId string `json:"RequestId" xml:"RequestId"`
+	Result    Result `json:"Result" xml:"Result"`
+}
+
+// CreateUpgradeEngineVersionRequest creates a request to invoke UpgradeEngineVersion API
+func CreateUpgradeEngineVersionRequest() (request *UpgradeEngineVersionRequest) {
+	request = &UpgradeEngineVersionRequest{
+		RoaRequest: &requests.RoaRequest{},
+	}
+	request.InitWithApiInfo("elasticsearch", "2017-06-13", "UpgradeEngineVersion", "/openapi/instances/[InstanceId]/actions/upgrade-version", "elasticsearch", "openAPI")
+	request.Method = requests.POST
+	return
+}
+
+// CreateUpgradeEngineVersionResponse creates a response to parse from UpgradeEngineVersion response
+func CreateUpgradeEngineVersionResponse() (response *UpgradeEngineVersionResponse) {
+	response = &UpgradeEngineVersionResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}