github.com/morlay/goqcloud@v0.0.0-20181123023149-b00e0b0b9afc/clients/vpc/create_ha_vip.go (about)

     1  package vpc
     2  
     3  import (
     4  	github_com_morlay_goqcloud "github.com/morlay/goqcloud"
     5  )
     6  
     7  // 创建HAVIP
     8  // https://cloud.tencent.com/document/api/215/30652
     9  
    10  type CreateHaVipRequest struct {
    11  	// HAVIP名称。
    12  	HaVipName string `name:"HaVipName"`
    13  	// 区域
    14  	Region string `name:"Region"`
    15  	// HAVIP所在子网ID。
    16  	SubnetId string `name:"SubnetId"`
    17  	// 指定虚拟IP地址,必须在VPC网段内且未被占用。不指定则自动分配。
    18  	Vip *string `name:"Vip,omitempty"`
    19  	// HAVIP所在私有网络ID。
    20  	VpcId string `name:"VpcId"`
    21  }
    22  
    23  func (req *CreateHaVipRequest) Invoke(client github_com_morlay_goqcloud.Client) (*CreateHaVipResponse, error) {
    24  	resp := &CreateHaVipResponse{}
    25  	err := client.Request("vpc", "CreateHaVip", "2017-03-12").Do(req, resp)
    26  	return resp, err
    27  }
    28  
    29  type CreateHaVipResponse struct {
    30  	github_com_morlay_goqcloud.TencentCloudBaseResponse
    31  	// HAVIP对象。
    32  	HaVip HaVip `json:"HaVip"`
    33  }