github.com/morlay/goqcloud@v0.0.0-20181123023149-b00e0b0b9afc/clients/clb/create_rule.go (about) 1 package clb 2 3 import ( 4 github_com_morlay_goqcloud "github.com/morlay/goqcloud" 5 ) 6 7 // 创建负载均衡七层监听器转发规则 8 // https://cloud.tencent.com/document/api/214/30691 9 10 type CreateRuleRequest struct { 11 // 监听器 ID 12 ListenerId string `name:"ListenerId"` 13 // 负载均衡实例 ID 14 LoadBalancerId string `name:"LoadBalancerId"` 15 // 区域 16 Region string `name:"Region"` 17 // 新建转发规则的信息 18 Rules []*RuleInput `name:"Rules"` 19 } 20 21 func (req *CreateRuleRequest) Invoke(client github_com_morlay_goqcloud.Client) (*CreateRuleResponse, error) { 22 resp := &CreateRuleResponse{} 23 err := client.Request("clb", "CreateRule", "2018-03-17").Do(req, resp) 24 return resp, err 25 } 26 27 type CreateRuleResponse struct { 28 github_com_morlay_goqcloud.TencentCloudBaseResponse 29 }