package emr //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" ) func (client *Client) ModifyExecutionPlan(request *ModifyExecutionPlanRequest) (response *ModifyExecutionPlanResponse, err error) { response = CreateModifyExecutionPlanResponse() err = client.DoAction(request, response) return } func (client *Client) ModifyExecutionPlanWithChan(request *ModifyExecutionPlanRequest) (<-chan *ModifyExecutionPlanResponse, <-chan error) { responseChan := make(chan *ModifyExecutionPlanResponse, 1) errChan := make(chan error, 1) err := client.AddAsyncTask(func() { defer close(responseChan) defer close(errChan) response, err := client.ModifyExecutionPlan(request) responseChan <- response errChan <- err }) if err != nil { errChan <- err close(responseChan) close(errChan) } return responseChan, errChan } func (client *Client) ModifyExecutionPlanWithCallback(request *ModifyExecutionPlanRequest, callback func(response *ModifyExecutionPlanResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { var response *ModifyExecutionPlanResponse var err error defer close(result) response, err = client.ModifyExecutionPlan(request) callback(response, err) result <- 1 }) if err != nil { defer close(result) callback(nil, err) result <- 0 } return result } type ModifyExecutionPlanRequest struct { *requests.RpcRequest TimeInterval string `position:"Query" name:"TimeInterval"` ZoneId string `position:"Query" name:"ZoneId"` ClusterId string `position:"Query" name:"ClusterId"` IsOpenPublicIp string `position:"Query" name:"IsOpenPublicIp"` InstanceGeneration string `position:"Query" name:"InstanceGeneration"` OptionSoftWareList *[]string `position:"Query" name:"OptionSoftWareList" type:"Repeated"` Id string `position:"Query" name:"Id"` LogEnable string `position:"Query" name:"LogEnable"` UseLocalMetaDb string `position:"Query" name:"UseLocalMetaDb"` EcsOrder *[]ModifyExecutionPlanEcsOrder `position:"Query" name:"EcsOrder" type:"Repeated"` TimeUnit string `position:"Query" name:"TimeUnit"` NetType string `position:"Query" name:"NetType"` Name string `position:"Query" name:"Name"` DayOfWeek string `position:"Query" name:"DayOfWeek"` ResourceOwnerId string `position:"Query" name:"ResourceOwnerId"` JobIdList *[]string `position:"Query" name:"JobIdList" type:"Repeated"` HighAvailabilityEnable string `position:"Query" name:"HighAvailabilityEnable"` BootstrapAction *[]ModifyExecutionPlanBootstrapAction `position:"Query" name:"BootstrapAction" type:"Repeated"` VSwitchId string `position:"Query" name:"VSwitchId"` DayOfMonth string `position:"Query" name:"DayOfMonth"` StartTime string `position:"Query" name:"StartTime"` SecurityGroupId string `position:"Query" name:"SecurityGroupId"` ExecutionPlanVersion string `position:"Query" name:"ExecutionPlanVersion"` ClusterName string `position:"Query" name:"ClusterName"` Strategy string `position:"Query" name:"Strategy"` LogPath string `position:"Query" name:"LogPath"` IoOptimized string `position:"Query" name:"IoOptimized"` ClusterType string `position:"Query" name:"ClusterType"` EasEnable string `position:"Query" name:"EasEnable"` UserDefinedEmrEcsRole string `position:"Query" name:"UserDefinedEmrEcsRole"` EmrVer string `position:"Query" name:"EmrVer"` Configurations string `position:"Query" name:"Configurations"` CreateClusterOnDemand string `position:"Query" name:"CreateClusterOnDemand"` VpcId string `position:"Query" name:"VpcId"` } type ModifyExecutionPlanEcsOrder struct { Index string `name:"Index"` NodeCount string `name:"NodeCount"` InstanceType string `name:"InstanceType"` DiskType string `name:"DiskType"` DiskCapacity string `name:"DiskCapacity"` NodeType string `name:"NodeType"` DiskCount string `name:"DiskCount"` } type ModifyExecutionPlanBootstrapAction struct { Name string `name:"Name"` Path string `name:"Path"` Arg string `name:"Arg"` } type ModifyExecutionPlanResponse struct { *responses.BaseResponse RequestId string `json:"RequestId" xml:"RequestId"` } func CreateModifyExecutionPlanRequest() (request *ModifyExecutionPlanRequest) { request = &ModifyExecutionPlanRequest{ RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Emr", "2016-04-08", "ModifyExecutionPlan", "", "") return } func CreateModifyExecutionPlanResponse() (response *ModifyExecutionPlanResponse) { response = &ModifyExecutionPlanResponse{ BaseResponse: &responses.BaseResponse{}, } return }