eips

package
v0.0.0-...-a0f4175 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2025 License: Apache-2.0 Imports: 3 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GetResult

type GetResult struct {
	golangsdk.Result
}

func Get

func Get(client *golangsdk.ServiceClient, id string) (r GetResult)

Get is a method by which can get the detailed information of public ip

func (GetResult) Extract

func (r GetResult) Extract() (PublicIp, error)

type ListOpts

type ListOpts struct {
	// Specifies the resource ID of pagination query. If the parameter
	// is left blank, only resources on the first page are queried.
	Marker string `q:"marker"`

	// Specifies the number of records returned on each page. The
	// value ranges from 0 to [2000], of which [2000] is the site difference item.
	// The specific value is determined by the site.
	Limit int `q:"limit"`

	// Specifies the query field you want.
	Fields []string `q:"fields"`

	// Sort key, valid values are id, public_ip_address, public_ipv6_address,
	// ip_version, created_at, updated_at and public_border_group.
	SortKey string `q:"sort_key"`

	// Sorting direction, valid values are asc and desc.
	SortDir string `q:"sort_dir"`

	Id []string `q:"id"`

	// Value range: 4, 6
	IPVersion int `q:"ip_version"`

	// EIP name
	Alias []string `q:"alias"`

	PublicIp   []string `q:"public_ip_address"`
	PublicIpv6 []string `q:"public_ipv6_address"`

	// Private IP address
	PrivateIp []string `q:"vnic.private_ip_address"`

	// Associated port id
	PortId []string `q:"vnic.port_id"`

	EnterpriseProjectId string `q:"enterprise_project_id"`

	// Type, valid values are EIP and DUALSTACK.
	Type []string `q:"type"`

	// Network Type, valid values are 5_telcom, 5_union, 5_bgp, 5_sbgp, 5_ipv6 and 5_graybgp
	NetworkType []string `q:"network_type"`

	// Public Pool Name
	PublicPoolName []string `q:"public_pool_name"`

	// Status, valid values are FREEZED、DOWN、ACTIVE、ERROR.
	Status []string `q:"status"`

	// Device ID
	DeviceID []string `q:"vnic.device_id"`

	// Device owner
	DeviceOwner []string `q:"vnic.device_owner"`

	VPCID []string `q:"vnic.vpc_id"`

	// Instance type the port associated with
	InstanceType []string `q:"vnic.instance_type"`

	// Instance ID the port associated with
	InstanceID []string `q:"vnic.instance_id"`

	// Associated instance type
	AssociateInstanceType []string `q:"associate_instance_type"`

	// Associated instance ID
	AssociateInstanceID []string `q:"associate_instance_id"`

	BandwidthID         []string `q:"bandwidth.id"`
	BandwidthName       []string `q:"bandwidth.name"`
	BandwidthSize       []string `q:"bandwidth.size"`
	BandwidthShareType  []string `q:"bandwidth.share_type"`
	BandwidthChargeMode []string `q:"bandwidth.charge_mode"`

	// Public border group
	PublicBorderGroup []string `q:"public_border_group"`

	AllowShareBandwidthTypeAny []string `q:"allow_share_bandwidth_type_any"`
}

type PublicIPPage

type PublicIPPage struct {
	pagination.MarkerPageBase
}

func (PublicIPPage) IsEmpty

func (r PublicIPPage) IsEmpty() (bool, error)

IsEmpty checks whether a NetworkPage struct is empty.

func (PublicIPPage) LastMarker

func (p PublicIPPage) LastMarker() (string, error)

LastMarker method returns the last public ip ID in a public ip page.

type PublicIp

type PublicIp struct {
	ID                  string   `json:"id"`
	Status              string   `json:"status"`
	Type                string   `json:"publicip_pool_name"`
	PublicAddress       string   `json:"public_ip_address"`
	PublicIpv6Address   string   `json:"public_ipv6_address"`
	EnterpriseProjectID string   `json:"enterprise_project_id"`
	IpVersion           int      `json:"ip_version"`
	Alias               string   `json:"alias"`
	BillingInfo         string   `json:"billing_info"`
	CreatedAt           string   `json:"created_at"`
	UpdatedAt           string   `json:"updated_at"`
	Tags                []string `json:"tags"`

	AssociateInstanceType string `json:"associate_instance_type"`
	AssociateInstanceID   string `json:"associate_instance_id"`

	Bandwidth bandwidths.BandWidth `json:"bandwidth"`

	// Vnic return the port info if EIP associate to an instance with port
	Vnic Vnic `json:"vnic"`
}

func ExtractPublicIPs

func ExtractPublicIPs(r pagination.Page) ([]PublicIp, error)

func List

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

List is a method used to query the public ips with given parameters.

type Vnic

type Vnic struct {
	PrivateAddress string `json:"private_ip_address"`
	PortID         string `json:"port_id"`
	IntsanceID     string `json:"instance_id"`
	IntsanceType   string `json:"instance_type"`
}

Jump to

Keyboard shortcuts

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