Documentation ¶
Overview ¶
Package vpn defines the vpn services of BCE. The supported APIs are all defined in different files.
Index ¶
- Constants
- type BatchCreateSslVpnUserArgs
- type BatchCreateSslVpnUserResult
- type Billing
- type BindEipArgs
- type Client
- func (c *Client) BatchCreateSslVpnUser(args *BatchCreateSslVpnUserArgs) (*BatchCreateSslVpnUserResult, error)
- func (c *Client) BindEip(vpnId string, args *BindEipArgs) error
- func (c *Client) CreateSslVpnServer(args *CreateSslVpnServerArgs) (*CreateSslVpnServerResult, error)
- func (c *Client) CreateVpnConn(args *CreateVpnConnArgs) (*CreateVpnConnResult, error)
- func (c *Client) CreateVpnGateway(args *CreateVpnGatewayArgs) (*CreateVpnGatewayResult, error)
- func (c *Client) DeleteSslVpnServer(vpnId, sslVpnServerId, clientToken string) error
- func (c *Client) DeleteSslVpnUser(vpnId, userId, clientToken string) error
- func (c *Client) DeleteVpn(vpnId, clientToken string) error
- func (c *Client) DeleteVpnConn(vpnConnId, clientToken string) error
- func (c *Client) DeleteVpnGateway(vpcId, clientToken string) error
- func (c *Client) GetSslVpnServer(vpnId, clientToken string) (*SslVpnServer, error)
- func (c *Client) GetVpnGatewayDetail(vpnId string) (*VPN, error)
- func (c *Client) ListSslVpnUser(args *ListSslVpnUserArgs) (*ListSslVpnUserResult, error)
- func (c *Client) ListVpnConn(vpnId string) (*ListVpnConnResult, error)
- func (c *Client) ListVpnGateway(args *ListVpnGatewayArgs) (*ListVpnGatewayResult, error)
- func (c *Client) RenewVpnGateway(vpnId string, args *RenewVpnGatewayArgs) error
- func (c *Client) UnBindEip(vpnId, clientToken string) error
- func (c *Client) UpdateSslVpnServer(args *UpdateSslVpnServerArgs) error
- func (c *Client) UpdateSslVpnUser(args *UpdateSslVpnUserArgs) error
- func (c *Client) UpdateVpnConn(args *UpdateVpnConnArgs) error
- func (c *Client) UpdateVpnGateway(vpnId string, args *UpdateVpnGatewayArgs) error
- type CreateIkeConfig
- type CreateIpsecConfig
- type CreateSslVpnServerArgs
- type CreateSslVpnServerResult
- type CreateVpnConnArgs
- type CreateVpnConnResult
- type CreateVpnGatewayArgs
- type CreateVpnGatewayResult
- type IkeConfig
- type IpsecConfig
- type ListSslVpnServerResult
- type ListSslVpnUserArgs
- type ListSslVpnUserResult
- type ListVpnConnResult
- type ListVpnGatewayArgs
- type ListVpnGatewayResult
- type PaymentTimingType
- type PeerConnRoleType
- type RenewVpnGatewayArgs
- type Reservation
- type SelectSslVpnUser
- type SslVpnServer
- type SslVpnUser
- type UpdateSslVpnServer
- type UpdateSslVpnServerArgs
- type UpdateSslVpnUser
- type UpdateSslVpnUserArgs
- type UpdateVpnConnArgs
- type UpdateVpnGatewayArgs
- type VPN
- type VpnConn
- type VpnStatusType
Constants ¶
const ( URI_PREFIX = bce.URI_PREFIX + "v1" DEFAULT_ENDPOINT = "bcc." + bce.DEFAULT_REGION + ".baidubce.com" REQUEST_VPN_URL = "/vpn" )
const ( PAYMENT_TIMING_PREPAID PaymentTimingType = "Prepaid" PAYMENT_TIMING_POSTPAID PaymentTimingType = "Postpaid" VPN_STATUS_BUILDING VpnStatusType = "building" VPN_STATUS_UNCONFIGURED VpnStatusType = "unconfigured" VPN_STATUS_CONFIGURING VpnStatusType = "configuring" VPN_STATUS_ACTIVE VpnStatusType = "active" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BatchCreateSslVpnUserArgs ¶ added in v0.9.134
type BatchCreateSslVpnUserArgs struct { ClientToken string `json:"-"` VpnId string `json:"vpnId"` SslVpnUsers []SslVpnUser `json:"sslVpnUsers"` }
BatchCreateSslVpnUserArgs defines the structure of the input parameters for the CreateSslVpnUser api
type BatchCreateSslVpnUserResult ¶ added in v0.9.134
type BatchCreateSslVpnUserResult struct {
SslVpnUserIds []string `json:"sslVpnUserIds"`
}
BatchCreateSslVpnUserResult defines the structure of the output parameters for the BatchCreateSslVpnUser api
type Billing ¶
type Billing struct { PaymentTiming PaymentTimingType `json:"paymentTiming,omitempty"` Reservation *Reservation `json:"reservation,omitempty"` }
type BindEipArgs ¶
BindEipArgs defines the structure of the input parameters for the BindEip api
type Client ¶
Client of VPC service is a kind of BceClient, so derived from BceClient
func (*Client) BatchCreateSslVpnUser ¶ added in v0.9.134
func (c *Client) BatchCreateSslVpnUser(args *BatchCreateSslVpnUserArgs) (*BatchCreateSslVpnUserResult, error)
BatchCreateSslVpnUser - batch create ssl-vpn user with the specific parameters
PARAMS:
- args: the arguments to create ssl-vpn users
RETURNS:
- error: nil if success otherwise the specific error
func (*Client) BindEip ¶
func (c *Client) BindEip(vpnId string, args *BindEipArgs) error
BindEip - bind eip for the specific vpn gateway
PARAMS:
- vpnId: the id of the specific vpn gateway
- args: the arguments to bind eip
RETURNS:
- error: nil if success otherwise the specific error
func (*Client) CreateSslVpnServer ¶ added in v0.9.134
func (c *Client) CreateSslVpnServer(args *CreateSslVpnServerArgs) (*CreateSslVpnServerResult, error)
CreateSslVpnServer - create ssl-vpn server with the specific parameters
PARAMS:
- args: the arguments to create ssl-vpn server
RETURNS:
- error: nil if success otherwise the specific error
func (*Client) CreateVpnConn ¶
func (c *Client) CreateVpnConn(args *CreateVpnConnArgs) (*CreateVpnConnResult, error)
CreateVpnConn - create vpnconn with the specific parameters
PARAMS:
- vpnId: the id of the specific vpn gateway
- args: the arguments to create vpnconn
RETURNS:
- error: nil if success otherwise the specific error
func (*Client) CreateVpnGateway ¶
func (c *Client) CreateVpnGateway(args *CreateVpnGatewayArgs) (*CreateVpnGatewayResult, error)
func (*Client) DeleteSslVpnServer ¶ added in v0.9.134
DeleteSslVpnServer - delete ssl-vpn server with the specific vpnId
PARAMS:
- vpnId: the id of the specific vpn gateway
- sslVpnServerId: the id of the specific ssl-vpn server
- clientToken: the idempotent token
RETURNS:
- error: nil if success otherwise the specific error
func (*Client) DeleteSslVpnUser ¶ added in v0.9.134
DeleteSslVpnUser - delete ssl-vpn user with the specific vpnId and userId
PARAMS:
- vpnId: the id of the specific vpn gateway
- userId: the id of the specific ssl-vpn user
- clientToken: the idempotent token
RETURNS:
- error: nil if success otherwise the specific error
func (*Client) DeleteVpnConn ¶
DeleteVpnConn - delete the specific vpnconn
PARAMS:
- vpnConnId: the id of the specific vpnconn
- clientToken: the idempotent token
RETURNS:
- error: nil if success otherwise the specific error
func (*Client) DeleteVpnGateway ¶
DeleteVpnGateway - delete the specific vpn gateway
PARAMS:
- vpnId: the id of the specific vpn gateway
- clientToken: the idempotent token
RETURNS:
- error: nil if success otherwise the specific error
func (*Client) GetSslVpnServer ¶ added in v0.9.134
func (c *Client) GetSslVpnServer(vpnId, clientToken string) (*SslVpnServer, error)
GetSslVpnServer - get details of the specific ssl-vpn server
PARAMS:
- vpnId: the id of the specified vpn
RETURNS:
- *SslVpnServer: the result of the specific ssl-vpn server details
- error: nil if success otherwise the specific error
func (*Client) GetVpnGatewayDetail ¶
GetVpnGatewayDetail - get details of the specific vpn gateway
PARAMS:
- vpnId: the id of the specified vpn
RETURNS:
- *VPN: the result of the specific vpn gateway details
- error: nil if success otherwise the specific error
func (*Client) ListSslVpnUser ¶ added in v0.9.134
func (c *Client) ListSslVpnUser(args *ListSslVpnUserArgs) (*ListSslVpnUserResult, error)
ListSslVpnUser - list ssl-vpn user with the specific vpnId
PARAMS:
- args: the arguments to list ssl-vpn users
RETURNS:
- *ListSslVpnUserResult: the result of vpn ssl-vpn user list contains page infos
- error: nil if success otherwise the specific error
func (*Client) ListVpnConn ¶
func (c *Client) ListVpnConn(vpnId string) (*ListVpnConnResult, error)
ListVpnConn - list vpnconn with the specific vpnId
PARAMS:
- vpnId:the id you want to list vpnconn
RETURNS:
- *ListVpnConnResult: the result of vpn gateway'conn list
- error: nil if success otherwise the specific error
func (*Client) ListVpnGateway ¶
func (c *Client) ListVpnGateway(args *ListVpnGatewayArgs) (*ListVpnGatewayResult, error)
func (*Client) RenewVpnGateway ¶
func (c *Client) RenewVpnGateway(vpnId string, args *RenewVpnGatewayArgs) error
RenewVpnGateway - renew vpn gateway with the specific parameters
PARAMS:
- vpnId: the id of the specific vpn gateway
- args: the arguments to renew vpn gateway
RETURNS:
- error: nil if success otherwise the specific error
func (*Client) UnBindEip ¶
UnBindEips - unbind eip for the specific vpn gateway
PARAMS:
- vpnId: the id of the specific vpn gateway
RETURNS:
- error: nil if success otherwise the specific error
func (*Client) UpdateSslVpnServer ¶ added in v0.9.134
func (c *Client) UpdateSslVpnServer(args *UpdateSslVpnServerArgs) error
UpdateSslVpnServer - update ssl-vpn server with the specific parameters
PARAMS:
- args: the arguments to update ssl ssl-vpn server
RETURNS:
- error: nil if success otherwise the specific error
func (*Client) UpdateSslVpnUser ¶ added in v0.9.134
func (c *Client) UpdateSslVpnUser(args *UpdateSslVpnUserArgs) error
UpdateSslVpnUser - update ssl-vpn user with the specific parameters
PARAMS:
- args: the arguments to update the specific ssl-vpn user
RETURNS:
- error: nil if success otherwise the specific error
func (*Client) UpdateVpnConn ¶
func (c *Client) UpdateVpnConn(args *UpdateVpnConnArgs) error
UpdateVpnConn - create vpnconn with the specific parameters
PARAMS:
- args: the arguments to update vpnconn
RETURNS:
- error: nil if success otherwise the specific error
func (*Client) UpdateVpnGateway ¶
func (c *Client) UpdateVpnGateway(vpnId string, args *UpdateVpnGatewayArgs) error
UpdateVpnGateway - update the specified vpn gateway
PARAMS:
- vpnId: the id of the specific vpn gateway
- args: the arguments to update vpn gateway
RETURNS:
- error: nil if success otherwise the specific error
type CreateIkeConfig ¶
type CreateIpsecConfig ¶
type CreateSslVpnServerArgs ¶ added in v0.9.134
type CreateSslVpnServerArgs struct { ClientToken string `json:"-"` VpnId string `json:"vpnId"` SslVpnServerName string `json:"sslVpnServerName"` InterfaceType *string `json:"interfaceType,omitempty"` LocalSubnets []string `json:"localSubnets"` RemoteSubnet string `json:"remoteSubnet"` ClientDns *string `json:"clientDns,omitempty"` }
CreateSslVpnServerArgs defines the structure of the input parameters for the CreateSslVpnServer api
type CreateSslVpnServerResult ¶ added in v0.9.134
type CreateSslVpnServerResult struct {
SslVpnServerId string `json:"sslVpnServerId"`
}
CreateSslVpnServerResult defines the structure of the output parameters for the CreateSslVpnServer api
type CreateVpnConnArgs ¶
type CreateVpnConnArgs struct { ClientToken string `json:"-"` VpnId string `json:"vpnId"` VpnConnName string `json:"vpnConnName"` LocalIp string `json:"localIp"` SecretKey string `json:"secretKey"` LocalSubnets []string `json:"localSubnets"` RemoteIp string `json:"remoteIp"` RemoteSubnets []string `json:"remoteSubnets"` Description string `json:"description,omitempty"` CreateIkeConfig *CreateIkeConfig `json:"ikeConfig"` CreateIpsecConfig *CreateIpsecConfig `json:"ipsecConfig"` }
CreateVpnConnArgs defines the structure of the input parameters for the CreateVpnGatewayConn api
type CreateVpnConnResult ¶
type CreateVpnConnResult struct {
VpnConnId string `json:"vpnConnId"`
}
CreateVpnConnResult defines the structure of the output parameters for the CreateVpnConn api
type CreateVpnGatewayArgs ¶
type CreateVpnGatewayArgs struct { ClientToken string `json:"-"` VpnName string `json:"vpnName"` VpcId string `json:"vpcId"` Description string `json:"description,omitempty"` Eip string `json:"eip,omitempty"` Billing *Billing `json:"billing"` }
CreateVpnGatewayArgs defines the structure of the input parameters for the CreateVpnGateway api
type CreateVpnGatewayResult ¶
type CreateVpnGatewayResult struct {
VpnId string `json:"vpnId"`
}
CreateVpnGatewayResult defines the structure of the output parameters for the CreateVpnGateway api
type IpsecConfig ¶
type ListSslVpnServerResult ¶ added in v0.9.134
type ListSslVpnServerResult struct {
SslVpnServers []SslVpnServer `json:"sslVpnServers"`
}
ListSslVpnServerResult defines the structure of output parameters for the ListSslVpnServer api
type ListSslVpnUserArgs ¶ added in v0.9.134
type ListSslVpnUserArgs struct { Marker string `json:"marker"` MaxKeys int `json:"maxKeys"` VpnId string `json:"vpnId"` UserName string `json:"username"` }
ListSslVpnUserArgs defines the structure of input parameters for the ListSslVpnUser api
type ListSslVpnUserResult ¶ added in v0.9.134
type ListSslVpnUserResult struct { Marker string `json:"marker"` IsTruncated bool `json:"isTruncated"` NextMarker string `json:"nextMarker"` MaxKeys int `json:"maxKeys"` SslVpnUsers []SelectSslVpnUser `json:"sslVpnUsers"` }
ListSslVpnUserResult defines the structure of output parameters for the ListSslVpnUser api
type ListVpnConnResult ¶
type ListVpnConnResult struct {
VpnConns []VpnConn `json:"vpnConns"`
}
ListVpnConnResult defines the structure of output parameters for the ListVpnConn api
type ListVpnGatewayArgs ¶
ListVpnGatewayArgs defines the structure of the input parameters for the ListVpnGateway api
type ListVpnGatewayResult ¶
type ListVpnGatewayResult struct { Vpns []VPN `json:"vpns"` Marker string `json:"marker"` IsTruncated bool `json:"isTruncated"` NextMarker string `json:"nextMarker"` MaxKeys int `json:"maxKeys"` }
ListVpnGatewayResult defines the structure of the output parameters for the ListVpnGateway api
type PaymentTimingType ¶
type PaymentTimingType string
type PeerConnRoleType ¶
type PeerConnRoleType string
type RenewVpnGatewayArgs ¶
RenewVpnGatewayArgs defines the structure of the input parameters for the RenewVpnGateway api
type Reservation ¶
type SelectSslVpnUser ¶ added in v0.9.134
type SslVpnServer ¶ added in v0.9.134
type SslVpnServer struct { VpnId string `json:"vpnId"` SslVpnServerId string `json:"sslVpnServerId"` SslVpnServerName string `json:"sslVpnServerName"` InterfaceType string `json:"interfaceType"` Status string `json:"status"` LocalSubnets []string `json:"localSubnets"` RemoteSubnet string `json:"remoteSubnet"` ClientDns string `json:"clientDns"` MaxConnection int `json:"maxConnection"` }
SslVpnServer defines the structure of the output parameters for the GetSslVpnServer api
type SslVpnUser ¶ added in v0.9.134
type UpdateSslVpnServer ¶ added in v0.9.134
type UpdateSslVpnServer struct { SslVpnServerName string `json:"sslVpnServerName,omitempty"` LocalSubnets []string `json:"localSubnets,omitempty"` RemoteSubnet string `json:"remoteSubnet,omitempty"` ClientDns *string `json:"clientDns,omitempty"` }
UpdateSslVpnServer defines part of the structure of the input parameters for the UpdateSslVpnServer api
type UpdateSslVpnServerArgs ¶ added in v0.9.134
type UpdateSslVpnServerArgs struct { ClientToken string `json:"-"` VpnId string `json:"VpnId"` SslVpnServerId string `json:"sslVpnServerId"` UpdateSslVpnServer *UpdateSslVpnServer `json:"updateSslVpnServer"` }
UpdateSslVpnServerArgs defines the structure of input parameters for the UpdateSslVpnServer api
type UpdateSslVpnUser ¶ added in v0.9.134
type UpdateSslVpnUserArgs ¶ added in v0.9.134
type UpdateSslVpnUserArgs struct { ClientToken string `json:"-"` VpnId string `json:"vpnId"` UserId string `json:"userId"` SslVpnUser *UpdateSslVpnUser `json:"sslVpnUser"` }
UpdateSslVpnUserArgs defines the structure of input parameters for the UpdateSslVpnUser api
type UpdateVpnConnArgs ¶
type UpdateVpnConnArgs struct { VpnConnId string `json:"vpnConnId"` UpdateVpnconn *CreateVpnConnArgs `json:"updateVpnconn"` }
UpdateVpnConnArgs defines the structure of input parameters for the UpdateVpnConn api
type UpdateVpnGatewayArgs ¶
UpdateVpnGatewayArgs defines the structure of the input parameters for the UpdateVpnGateway api
type VPN ¶
type VPN struct { Status VpnStatusType `json:"status"` Eip string `json:"eip"` VpnId string `json:"vpnId"` VpcId string `json:"vpcId"` Description string `json:"description"` ExpiredTime string `json:"expiredTime"` ProductType string `json:"paymentTiming"` VpnConnNum int `json:"vpnConnNum"` BandwidthInMbps int `json:"bandwidthInMbps"` VpnConns []VpnConn `json:"vpnConns"` Name string `json:"vpnName"` }
VPN is the result for getVpnDetail api.
type VpnConn ¶
type VpnConn struct { VpnId string `json:"vpnId"` VpnConnId string `json:"vpnConnId"` VpnConnName string `json:"vpnConnName"` LocalIp string `json:"localIp"` SecretKey string `json:"secretKey"` LocalSubnets []string `json:"localSubnets"` RemoteIp string `json:"remoteIp"` RemoteSubnets []string `json:"remoteSubnets"` Description string `json:"description"` Status string `json:"status"` CreatedTime string `json:"createdTime"` HealthStatus string `json:"healthStatus"` IkeConfig IkeConfig `json:"ikeConfig"` IpsecConfig IpsecConfig `json:"ipsecConfig"` }
type VpnStatusType ¶
type VpnStatusType string