publicips

package
v0.9.9 Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package publicips manages EIPs (elastic IP addresses) through the VPC v1 API.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Delete

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

Types

type BandWidth

type BandWidth struct {
	Name       string `json:"name" required:"true"`
	Size       int    `json:"size" required:"true"`
	ID         string `json:"id,omitempty"`
	ShareType  string `json:"share_type" required:"true"`
	ChargeMode string `json:"charge_mode,omitempty"`
}

type CreateOpts

type CreateOpts struct {
	Publicip  PublicIPRequest `json:"publicip" required:"true"`
	Bandwidth BandWidth       `json:"bandwidth" required:"true"`
	// EnterpriseProjectId is not documented as a create request parameter in
	// the reviewed OTC documentation.
	EnterpriseProjectId string `json:"enterprise_project_id,omitempty"`
}

type ListOpts

type ListOpts struct {
	Marker string `q:"marker,omitempty"`
	Limit  int    `q:"limit,omitempty"`
	// IPVersion is not documented as a list query parameter in the reviewed
	// OTC documentation.
	IPVersion           int    `q:"ip_version,omitempty"`
	EnterpriseProjectId string `q:"enterprise_project_id,omitempty"`
}

type Profile

type Profile struct {
	OrderID   string `json:"order_id"`
	ProductID string `json:"product_id"`
	RegionID  string `json:"region_id"`
	UserID    string `json:"user_id"`
}

type PublicIP

type PublicIP struct {
	ID              string  `json:"id"`
	Status          string  `json:"status"`
	Profile         Profile `json:"profile"`
	Type            string  `json:"type"`
	PublicIpAddress string  `json:"public_ip_address"`
	// PublicIpV6Address is not documented in the reviewed OTC documentation.
	PublicIpV6Address        string   `json:"public_ipv6_address"`
	IPVersion                int      `json:"ip_version"`
	PrivateIpAddress         string   `json:"private_ip_address"`
	PortId                   string   `json:"port_id"`
	TenantId                 string   `json:"tenant_id"`
	CreateTime               string   `json:"create_time"`
	BandwidthId              string   `json:"bandwidth_id"`
	BandwidthSize            int      `json:"bandwidth_size"`
	BandwidthShareType       string   `json:"bandwidth_share_type"`
	BandwidthName            string   `json:"bandwidth_name"`
	Alias                    string   `json:"alias"`
	EnterpriseProjectId      string   `json:"enterprise_project_id"`
	PublicBorderGroup        string   `json:"public_border_group"`
	AllowShareBandwidthTypes []string `json:"allow_share_bandwidth_types"`
	Tags                     []string `json:"tags"`
}

func ExtractPublicIPs

func ExtractPublicIPs(page pagination.NewPage) ([]PublicIP, error)

func Get

func Get(client *golangsdk.ServiceClient, id string) (*PublicIP, error)

func List

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

type PublicIPCreateResp

type PublicIPCreateResp = PublicIP

func Create

func Create(client *golangsdk.ServiceClient, opts CreateOpts) (*PublicIPCreateResp, error)

type PublicIPPage

type PublicIPPage struct {
	pagination.NewPageResult
}

func (PublicIPPage) NewIsEmpty added in v0.9.9

func (p PublicIPPage) NewIsEmpty() (bool, error)

func (PublicIPPage) NewNextPageURL added in v0.9.9

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

type PublicIPRequest

type PublicIPRequest struct {
	Type string `json:"type" required:"true"`
	// IpAddress is not documented in the reviewed OTC documentation.
	IpAddress string `json:"ip_address,omitempty"`
	IPVersion int    `json:"ip_version,omitempty"`
	Alias     string `json:"alias,omitempty"`
}

type PublicIPUpdateResp

type PublicIPUpdateResp = PublicIP

func Update

func Update(client *golangsdk.ServiceClient, id string, opts UpdateOpts) (*PublicIPUpdateResp, error)

type UpdateOpts

type UpdateOpts struct {
	PortId string `json:"port_id,omitempty"`
	// IPVersion is not documented as an update request parameter in the
	// reviewed OTC documentation.
	IPVersion int    `json:"ip_version,omitempty"`
	Alias     string `json:"alias,omitempty"`
}

Jump to

Keyboard shortcuts

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