github.com/morlay/goqcloud@v0.0.0-20181123023149-b00e0b0b9afc/clients/clb/modify_target_weight.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/30677 9 10 type ModifyTargetWeightRequest struct { 11 // 目标规则的域名,提供LocationId参数时本参数不生效 12 Domain *string `name:"Domain,omitempty"` 13 // 负载均衡监听器 ID 14 ListenerId string `name:"ListenerId"` 15 // 负载均衡实例 ID 16 LoadBalancerId string `name:"LoadBalancerId"` 17 // 转发规则的ID,当绑定机器到七层转发规则时,必须提供此参数或Domain+Url两者之一 18 LocationId *string `name:"LocationId,omitempty"` 19 // 区域 20 Region string `name:"Region"` 21 // 要修改权重的后端机器列表 22 Targets []*Target `name:"Targets,omitempty"` 23 // 目标规则的URL,提供LocationId参数时本参数不生效 24 Url *string `name:"Url,omitempty"` 25 // 后端云服务器新的转发权重,取值范围:0~100。 26 Weight int64 `name:"Weight"` 27 } 28 29 func (req *ModifyTargetWeightRequest) Invoke(client github_com_morlay_goqcloud.Client) (*ModifyTargetWeightResponse, error) { 30 resp := &ModifyTargetWeightResponse{} 31 err := client.Request("clb", "ModifyTargetWeight", "2018-03-17").Do(req, resp) 32 return resp, err 33 } 34 35 type ModifyTargetWeightResponse struct { 36 github_com_morlay_goqcloud.TencentCloudBaseResponse 37 }