Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CreateOpts ¶
type CreateOpts struct { // The ID of the VPC connected to the virtual gateway. VpcId string `json:"vpc_id" required:"true"` // The list of IPv4 subnets from the virtual gateway to access cloud services, which is usually the CIDR block of // the VPC. LocalEpGroup []string `json:"local_ep_group" required:"true"` // The list of IPv6 subnets from the virtual gateway to access cloud services, which is usually the CIDR block of // the VPC. LocalEpGroupIpv6 []string `json:"local_ep_group_ipv6,omitempty"` // Specifies the name of the virtual gateway. // The valid length is limited from 0 to 64, only chinese and english letters, digits, hyphens (-), underscores (_) // and dots (.) are allowed. // The name must start with a chinese or english letter, and the Chinese characters must be in **UTF-8** or // **Unicode** format. Name string `json:"name,omitempty"` // Specifies the description of the virtual gateway. // The description contain a maximum of 64 characters and the angle brackets (< and >) are not allowed. // Chinese characters must be in **UTF-8** or **Unicode** format. Description string `json:"description,omitempty"` // The local BGP ASN of the virtual gateway. BgpAsn int `json:"bgp_asn,omitempty"` // The enterprise project ID to which the virtual gateway belongs. EnterpriseProjectId string `json:"enterprise_project_id,omitempty"` // The key/value pairs to associate with the virtual gateway. Tags []tags.ResourceTag `json:"tags,omitempty"` }
CreateOpts is the structure used to create a virtual gateway.
type UpdateOpts ¶
type UpdateOpts struct { // The list of IPv4 subnets from the virtual gateway to access cloud services, which is usually the CIDR block of // the VPC. LocalEpGroup []string `json:"local_ep_group" required:"true"` // The list of IPv6 subnets from the virtual gateway to access cloud services, which is usually the CIDR block of // the VPC. LocalEpGroupIpv6 []string `json:"local_ep_group_ipv6,omitempty"` // Specifies the name of the virtual gateway. // The valid length is limited from 0 to 64, only chinese and english letters, digits, hyphens (-), underscores (_) // and dots (.) are allowed. // The name must start with a chinese or english letter, and the Chinese characters must be in **UTF-8** or // **Unicode** format. Name string `json:"name,omitempty"` // Specifies the description of the virtual gateway. // The description contain a maximum of 64 characters and the angle brackets (< and >) are not allowed. // Chinese characters must be in **UTF-8** or **Unicode** format. Description *string `json:"description,omitempty"` }
UpdateOpts is the structure used to update the configuration of the virtual gateway.
type VirtualGateway ¶
type VirtualGateway struct { // The ID of the virtual gateway. ID string `json:"id"` // The ID of the VPC connected to the virtual gateway. VpcId string `json:"vpc_id"` // The project ID to which the virtual gateway belongs. TenantId string `json:"tenant_id"` // Specifies the name of the virtual gateway. // The valid length is limited from 0 to 64, only chinese and english letters, digits, hyphens (-), underscores (_) // and dots (.) are allowed. // The name must start with a chinese or english letter, and the Chinese characters must be in **UTF-8** or // **Unicode** format. Name string `json:"name"` // Specifies the description of the virtual gateway. // The description contain a maximum of 64 characters and the angle brackets (< and >) are not allowed. // Chinese characters must be in **UTF-8** or **Unicode** format. Description string `json:"description"` // The type of virtual gateway. Type string `json:"type"` // The list of IPv4 subnets from the virtual gateway to access cloud services, which is usually the CIDR block of // the VPC. LocalEpGroup []string `json:"local_ep_group"` // The list of IPv6 subnets from the virtual gateway to access cloud services, which is usually the CIDR block of // the VPC. LocalEpGroupIpv6 []string `json:"local_ep_group_ipv6"` // The current status of the virtual gateway. Status string `json:"status"` // The local BGP ASN of the virtual gateway. BgpAsn int `json:"bgp_asn"` // The enterprise project ID to which the virtual gateway belongs. EnterpriseProjectId string `json:"enterprise_project_id"` // The key/value pairs to associate with the virtual gateway. Tags []tags.ResourceTag `json:"tags"` }
VirtualGateway is the structure that represents the details of the virtual gateway.
func Create ¶
func Create(client *golangsdk.ServiceClient, opts CreateOpts) (*VirtualGateway, error)
Create is a method used to create a virtual gateway using given parameters.
func Get ¶
func Get(client *golangsdk.ServiceClient, gatewayId string) (*VirtualGateway, error)
Get is a method used to obtain the details of the virtual gateway using its ID.
func Update ¶
func Update(client *golangsdk.ServiceClient, gatewayId string, opts UpdateOpts) (*VirtualGateway, error)
Update is a method used to update the specified virtual gateway using given parameters.
Click to show internal directories.
Click to hide internal directories.