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

     1  package vpc
     2  
     3  import (
     4  	github_com_morlay_goqcloud "github.com/morlay/goqcloud"
     5  )
     6  
     7  // 创建VPN网关
     8  // https://cloud.tencent.com/document/api/215/17521
     9  
    10  type CreateVpnGatewayRequest struct {
    11  	// 预付费模式,即包年包月相关参数设置。通过该参数可以指定包年包月实例的购买时长、是否设置自动续费等属性。若指定实例的付费模式为预付费则该参数必传。
    12  	InstanceChargePrepaid *InstanceChargePrepaid `name:"InstanceChargePrepaid,omitempty"`
    13  	// VPN网关计费模式,PREPAID:表示预付费,即包年包月,POSTPAID_BY_HOUR:表示后付费,即按量计费。默认:POSTPAID_BY_HOUR,如果指定预付费模式,参数InstanceChargePrepaid必填。
    14  	InstanceChargeType *string `name:"InstanceChargeType,omitempty"`
    15  	// 公网带宽设置。可选带宽规格:5, 10, 20, 50, 100;单位:Mbps
    16  	InternetMaxBandwidthOut int64 `name:"InternetMaxBandwidthOut"`
    17  	// 区域
    18  	Region string `name:"Region"`
    19  	// VPC实例ID。可通过DescribeVpcs接口返回值中的VpcId获取。
    20  	VpcId string `name:"VpcId"`
    21  	// VPN网关名称,最大长度不能超过60个字节。
    22  	VpnGatewayName string `name:"VpnGatewayName"`
    23  	// 可用区,如:ap-guangzhou-2。
    24  	Zone *string `name:"Zone,omitempty"`
    25  }
    26  
    27  func (req *CreateVpnGatewayRequest) Invoke(client github_com_morlay_goqcloud.Client) (*CreateVpnGatewayResponse, error) {
    28  	resp := &CreateVpnGatewayResponse{}
    29  	err := client.Request("vpc", "CreateVpnGateway", "2017-03-12").Do(req, resp)
    30  	return resp, err
    31  }
    32  
    33  type CreateVpnGatewayResponse struct {
    34  	github_com_morlay_goqcloud.TencentCloudBaseResponse
    35  	// VPN网关对象
    36  	VpnGateway VpnGateway `json:"VpnGateway"`
    37  }