virtual_gateway

package
v0.9.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 15, 2025 License: Apache-2.0 Imports: 5 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Delete

func Delete(c *golangsdk.ServiceClient, id string) (err error)

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 List

func List(client *golangsdk.ServiceClient, opts ListOpts) ([]VirtualGateway, error)

List is used to obtain the virtual gateway list

func Update

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL