Documentation
¶
Index ¶
- func Delete(c *golangsdk.ServiceClient, id string) (err error)
- type CreateOpts
- type ListOpts
- type UpdateOpts
- type VirtualGateway
- func Create(c *golangsdk.ServiceClient, opts CreateOpts) (*VirtualGateway, error)
- func Get(c *golangsdk.ServiceClient, id string) (*VirtualGateway, error)
- func List(client *golangsdk.ServiceClient, opts ListOpts) ([]VirtualGateway, error)
- func Update(c *golangsdk.ServiceClient, id string, opts UpdateOpts) (*VirtualGateway, error)
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 key/value pairs to associate with the virtual gateway.
Tags []tags.ResourceTag `json:"tags,omitempty"`
}
type ListOpts ¶
type ListOpts struct {
// virtual gateway by ID
ID string `q:"id,omitempty"`
// Specifies the number of records returned on each page. Value range: 1-2000
Limit int `q:"limit,omitempty"`
// Specifies the ID of the last resource record on the previous page. If this parameter is left blank, the first page is queried.
// This parameter must be used together with limit.
Marker string `q:"marker,omitempty"`
// Specifies the list of fields to be displayed.
Fields []interface{} `q:"fields,omitempty"`
// Specifies the sorting order of returned results. The value can be asc (default) or desc.
SortDir string `q:"sort_dir,omitempty"`
// Specifies the field for sorting.
SortKey string `q:"sort_key,omitempty"`
// Specifies the VPC ID by which virtual gateways are queried.
VpcId string `q:"vpc_id,omitempty"`
}
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,omitempty"`
// 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"`
}
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 key/value pairs to associate with the virtual gateway.
Tags []tags.ResourceTag `json:"tags"`
}
func Create ¶
func Create(c *golangsdk.ServiceClient, opts CreateOpts) (*VirtualGateway, error)
func Get ¶
func Get(c *golangsdk.ServiceClient, id string) (*VirtualGateway, error)
func List ¶
func List(client *golangsdk.ServiceClient, opts ListOpts) ([]VirtualGateway, error)
List is used to obtain the virtual gateway list
func Update ¶
func Update(c *golangsdk.ServiceClient, id string, opts UpdateOpts) (*VirtualGateway, error)
Click to show internal directories.
Click to hide internal directories.