github.com/morlay/goqcloud@v0.0.0-20181123023149-b00e0b0b9afc/clients/vpc/create_direct_connect_gateway.go (about) 1 package vpc 2 3 import ( 4 github_com_morlay_goqcloud "github.com/morlay/goqcloud" 5 ) 6 7 // 创建专线网关 8 // https://cloud.tencent.com/document/api/215/19192 9 10 type CreateDirectConnectGatewayRequest struct { 11 // 专线网关名称 12 DirectConnectGatewayName string `name:"DirectConnectGatewayName"` 13 // 网关类型,可选值:NORMAL - (默认)标准型,注:云联网只支持标准型NAT - NAT型NAT类型支持网络地址转换配置,类型确定后不能修改;一个私有网络可以创建一个NAT类型的专线网关和一个非NAT类型的专线网关 14 GatewayType *string `name:"GatewayType,omitempty"` 15 // NetworkType 为 VPC 时,这里传值为私有网络实例IDNetworkType 为 NAT 时,这里传值为云联网实例ID 16 NetworkInstanceId string `name:"NetworkInstanceId"` 17 // 关联网络类型,可选值:VPC - 私有网络CCN - 云联网 18 NetworkType string `name:"NetworkType"` 19 // 区域 20 Region string `name:"Region"` 21 } 22 23 func (req *CreateDirectConnectGatewayRequest) Invoke(client github_com_morlay_goqcloud.Client) (*CreateDirectConnectGatewayResponse, error) { 24 resp := &CreateDirectConnectGatewayResponse{} 25 err := client.Request("vpc", "CreateDirectConnectGateway", "2017-03-12").Do(req, resp) 26 return resp, err 27 } 28 29 type CreateDirectConnectGatewayResponse struct { 30 github_com_morlay_goqcloud.TencentCloudBaseResponse 31 // 专线网关对象。 32 DirectConnectGateway DirectConnectGateway `json:"DirectConnectGateway"` 33 }