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) CreateExecutionPlan(request *CreateExecutionPlanRequest) (response *CreateExecutionPlanResponse, err error) { response = CreateCreateExecutionPlanResponse() err = client.DoAction(request, response) return } func (client *Client) CreateExecutionPlanWithChan(request *CreateExecutionPlanRequest) (<-chan *CreateExecutionPlanResponse, <-chan error) { responseChan := make(chan *CreateExecutionPlanResponse, 1) errChan := make(chan error, 1) err := client.AddAsyncTask(func() { defer close(responseChan) defer close(errChan) response, err := client.CreateExecutionPlan(request) responseChan <- response errChan <- err }) if err != nil { errChan <- err close(responseChan) close(errChan) } return responseChan, errChan } func (client *Client) CreateExecutionPlanWithCallback(request *CreateExecutionPlanRequest, callback func(response *CreateExecutionPlanResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { var response *CreateExecutionPlanResponse var err error defer close(result) response, err = client.CreateExecutionPlan(request) callback(response, err) result <- 1 }) if err != nil { defer close(result) callback(nil, err) result <- 0 } return result } type CreateExecutionPlanRequest struct { *requests.RpcRequest TimeInterval string `position:"Query" name:"TimeInterval"` ZoneId string `position:"Query" name:"ZoneId"` ClusterId string `position:"Query" name:"ClusterId"` InstanceGeneration string `position:"Query" name:"InstanceGeneration"` IsOpenPublicIp string `position:"Query" name:"IsOpenPublicIp"` OptionSoftWareList *[]string `position:"Query" name:"OptionSoftWareList" type:"Repeated"` LogEnable string `position:"Query" name:"LogEnable"` UseLocalMetaDb string `position:"Query" name:"UseLocalMetaDb"` EcsOrder *[]CreateExecutionPlanEcsOrder `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 *[]CreateExecutionPlanBootstrapAction `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"` ClusterName string `position:"Query" name:"ClusterName"` Strategy string `position:"Query" name:"Strategy"` IoOptimized string `position:"Query" name:"IoOptimized"` LogPath string `position:"Query" name:"LogPath"` 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 CreateExecutionPlanEcsOrder struct { Index string `name:"Index"` NodeCount string `name:"NodeCount"` NodeType string `name:"NodeType"` InstanceType string `name:"InstanceType"` DiskType string `name:"DiskType"` DiskCapacity string `name:"DiskCapacity"` DiskCount string `name:"DiskCount"` } type CreateExecutionPlanBootstrapAction struct { Name string `name:"Name"` Path string `name:"Path"` Arg string `name:"Arg"` } type CreateExecutionPlanResponse struct { *responses.BaseResponse RequestId string `json:"RequestId" xml:"RequestId"` Id string `json:"Id" xml:"Id"` } func CreateCreateExecutionPlanRequest() (request *CreateExecutionPlanRequest) { request = &CreateExecutionPlanRequest{ RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Emr", "2016-04-08", "CreateExecutionPlan", "", "") return } func CreateCreateExecutionPlanResponse() (response *CreateExecutionPlanResponse) { response = &CreateExecutionPlanResponse{ BaseResponse: &responses.BaseResponse{}, } return }