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(c *golangsdk.ServiceClient, gatewayId string) error

Delete is a method to remove the specified private NAT gateway using its ID.

Types

type CreateOpts

type CreateOpts struct {
	// The name of the private NAT gateway.
	// The valid length is limited from `1` to `64`, only letters, digits, hyphens (-) and underscores (_) are allowed.
	Name string `json:"name" required:"true"`
	// The subnet configuration of the private NAT gateway.
	DownLinkVpcs []DownLinkVpc `json:"downlink_vpcs" required:"true"`
	// The description of the private NAT gateway, which contain maximum of `255` characters, and
	// angle brackets (<) and (>) are not allowed.
	Description string `json:"description,omitempty"`
	// The specification of the private NAT gateway.
	// The valid values are as follows:
	// + **Small**: Small type, which supports up to `20` rules, `200 Mbit/s` bandwidth, `20,000` PPS and `2,000` SNAT
	//   connections.
	// + **Medium**: Medium type, which supports up to `50` rules, `500 Mbit/s` bandwidth, `50,000` PPS and `5,000` SNAT
	//   connections.
	// + **Large**: Large type, which supports up to `200` rules, `2 Gbit/s` bandwidth, `200,000` PPS and `20,000` SNAT
	//   connections.
	// + **Extra-Large**: Extra-large type, which supports up to `500` rules, `5 Gbit/s` bandwidth, `500,000` PPS and
	//   `50,000` SNAT connections.
	Spec string `json:"spec,omitempty"`
	// The enterprise project ID to which the private NAT gateway belongs.
	EnterpriseProjectId string `json:"enterprise_project_id,omitempty"`
	// The key/value pairs to associate with the NAT geteway.
	Tags []tags.ResourceTag `json:"tags,omitempty"`
}

CreateOpts is the structure used to create a new private NAT gateway.

type DownLinkVpc

type DownLinkVpc struct {
	SubnetId string `json:"virsubnet_id" required:"true"`
}

DownLinkVpc is an object that represents the subnet configuration to which private NAT gateway belongs.

type Gateway

type Gateway struct {
	// The ID of the private NAT gateway.
	ID string `json:"id"`
	// The project ID to which the private NAT gateway belongs.
	ProjectId string `json:"project_id"`
	// The name of the private NAT gateway.
	// The valid length is limited from `1` to `64`, only letters, digits, hyphens (-) and underscores (_) are allowed.
	Name string `json:"name"`
	// The description of the private NAT gateway, which contain maximum of `255` characters, and
	// angle brackets (<) and (>) are not allowed.
	Description string `json:"description"`
	// The specification of the private NAT gateway.
	// The valid values are as follows:
	// + **Small**: Small type, which supports up to `20` rules, `200 Mbit/s` bandwidth, `20,000` PPS and `2,000` SNAT
	//   connections.
	// + **Medium**: Medium type, which supports up to `50` rules, `500 Mbit/s` bandwidth, `50,000` PPS and `5,000` SNAT
	//   connections.
	// + **Large**: Large type, which supports up to `200` rules, `2 Gbit/s` bandwidth, `200,000` PPS and `20,000` SNAT
	//   connections.
	// + **Extra-Large**: Extra-large type, which supports up to `500` rules, `5 Gbit/s` bandwidth, `500,000` PPS and
	//   `50,000` SNAT connections.
	Spec string `json:"spec"`
	// The current status of the private NAT gateway.
	Status string `json:"status"`
	// The creation time of the private NAT gateway.
	CreatedAt string `json:"created_at"`
	// The latest update time of the private NAT gateway.
	UpdatedAt string `json:"updated_at"`
	// The subnet configuration of the private NAT gateway.
	DownLinkVpcs []DownLinkVpc `json:"downlink_vpcs"`
	// The key/value pairs to associate with the NAT geteway.
	Tags []tags.ResourceTag `json:"tags"`
	// The enterprise project ID to which the private NAT gateway belongs.
	EnterpriseProjectId string `json:"enterprise_project_id"`
}

Gateway is the structure represents the private NAT gateway details.

func Create

func Create(c *golangsdk.ServiceClient, opts CreateOpts) (*Gateway, error)

Create is a method used to create a new private NAT gateway using given parameters.

func Get

func Get(c *golangsdk.ServiceClient, gatewayId string) (*Gateway, error)

Get is a method used to obtain the private NAT gateway detail by its ID.

func Update

func Update(c *golangsdk.ServiceClient, gatewayId string, opts UpdateOpts) (*Gateway, error)

Update is a method used to modify an existing private NAT gateway using given parameters.

type UpdateOpts

type UpdateOpts struct {
	// The name of the private NAT gateway.
	// The valid length is limited from `1` to `64`, only letters, digits, hyphens (-) and underscores (_) are allowed.
	Name string `json:"name,omitempty"`
	// The description of the private NAT gateway, which contain maximum of `255` characters, and
	// angle brackets (<) and (>) are not allowed.
	Description *string `json:"description,omitempty"`
	// The specification of the private NAT gateway.
	// The valid values are as follows:
	// + **Small**: Small type, which supports up to `20` rules, `200 Mbit/s` bandwidth, `20,000` PPS and `2,000` SNAT
	//   connections.
	// + **Medium**: Medium type, which supports up to `50` rules, `500 Mbit/s` bandwidth, `50,000` PPS and `5,000` SNAT
	//   connections.
	// + **Large**: Large type, which supports up to `200` rules, `2 Gbit/s` bandwidth, `200,000` PPS and `20,000` SNAT
	//   connections.
	// + **Extra-Large**: Extra-large type, which supports up to `500` rules, `5 Gbit/s` bandwidth, `500,000` PPS and
	//   `50,000` SNAT connections.
	Spec string `json:"spec,omitempty"`
}

UpdateOpts is the structure used to modify an existing private NAT gateway.

Jump to

Keyboard shortcuts

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