github.com/morlay/goqcloud@v0.0.0-20181123023149-b00e0b0b9afc/clients/batch/create_compute_env.go (about) 1 package batch 2 3 import ( 4 github_com_morlay_goqcloud "github.com/morlay/goqcloud" 5 ) 6 7 // 创建计算环境 8 // https://cloud.tencent.com/document/api/599/15891 9 10 type CreateComputeEnvRequest struct { 11 // 用于保证请求幂等性的字符串。该字符串由用户生成,需保证不同请求之间唯一,最大值不超过64个ASCII字符。若不指定该参数,则无法保证请求的幂等性。 12 ClientToken *string `name:"ClientToken,omitempty"` 13 // 计算环境信息 14 ComputeEnv NamedComputeEnv `name:"ComputeEnv"` 15 // 位置信息 16 Placement Placement `name:"Placement"` 17 // 区域 18 Region string `name:"Region"` 19 } 20 21 func (req *CreateComputeEnvRequest) Invoke(client github_com_morlay_goqcloud.Client) (*CreateComputeEnvResponse, error) { 22 resp := &CreateComputeEnvResponse{} 23 err := client.Request("batch", "CreateComputeEnv", "2017-03-12").Do(req, resp) 24 return resp, err 25 } 26 27 type CreateComputeEnvResponse struct { 28 github_com_morlay_goqcloud.TencentCloudBaseResponse 29 // 计算环境ID 30 EnvId string `json:"EnvId"` 31 }