gateways

package
v0.0.0-...-63319d1 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2024 License: MPL-2.0, Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Delete

func Delete(client *golangsdk.ServiceClient, gatewayId string) error

Delete is a method used to remove an existing virtual gateway using its ID.

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.

Jump to

Keyboard shortcuts

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