github.com/morlay/goqcloud@v0.0.0-20181123023149-b00e0b0b9afc/clients/clb/register_targets.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/30676
     9  
    10  type RegisterTargetsRequest 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"`
    23  	// 目标规则的URL,提供LocationId参数时本参数不生效
    24  	Url *string `name:"Url,omitempty"`
    25  }
    26  
    27  func (req *RegisterTargetsRequest) Invoke(client github_com_morlay_goqcloud.Client) (*RegisterTargetsResponse, error) {
    28  	resp := &RegisterTargetsResponse{}
    29  	err := client.Request("clb", "RegisterTargets", "2018-03-17").Do(req, resp)
    30  	return resp, err
    31  }
    32  
    33  type RegisterTargetsResponse struct {
    34  	github_com_morlay_goqcloud.TencentCloudBaseResponse
    35  }