github.com/morlay/goqcloud@v0.0.0-20181123023149-b00e0b0b9afc/clients/tia/create_model.go (about) 1 package tia 2 3 import ( 4 github_com_morlay_goqcloud "github.com/morlay/goqcloud" 5 ) 6 7 // 创建Model 8 // https://cloud.tencent.com/document/api/851/18315 9 10 type CreateModelRequest struct { 11 // 指定集群的名称(集群模式下必填) 12 Cluster *string `name:"Cluster,omitempty"` 13 // 关于模型的描述 14 Description *string `name:"Description,omitempty"` 15 // 暴露外网或内网,默认暴露外网(集群模式下选填) 16 Expose *string `name:"Expose,omitempty"` 17 // 要部署模型的路径名 18 Model string `name:"Model"` 19 // 模型名称 20 Name string `name:"Name"` 21 // 区域 22 Region string `name:"Region"` 23 // 要部署的模型副本数目(集群模式下选填) 24 Replicas *int64 `name:"Replicas,omitempty"` 25 // 部署模型的其他配置信息 26 RuntimeConf []*string `name:"RuntimeConf,omitempty"` 27 // 运行环境镜像的标签 28 RuntimeVersion *string `name:"RuntimeVersion,omitempty"` 29 // 部署模式(无服务器函数模式/集群模式) 30 ServType *string `name:"ServType,omitempty"` 31 } 32 33 func (req *CreateModelRequest) Invoke(client github_com_morlay_goqcloud.Client) (*CreateModelResponse, error) { 34 resp := &CreateModelResponse{} 35 err := client.Request("tia", "CreateModel", "2018-02-26").Do(req, resp) 36 return resp, err 37 } 38 39 type CreateModelResponse struct { 40 github_com_morlay_goqcloud.TencentCloudBaseResponse 41 // 模型的详细信息 42 Model Model `json:"Model"` 43 }