publicips

package
v1.0.20 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2019 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateURL

func CreateURL(c *gophercloud.ServiceClient) string

func DeleteURL

func DeleteURL(c *gophercloud.ServiceClient, publicipId string) string

func GetURL

func GetURL(c *gophercloud.ServiceClient, publicipId string) string

func ListURL

func ListURL(c *gophercloud.ServiceClient) string

func UpdateURL

func UpdateURL(c *gophercloud.ServiceClient, publicipId string) string

Types

type BandWidth

type BandWidth struct {
	// Specifies the bandwidth name. The value is a string of 1 to 64
	// characters that can contain letters, digits, underscores (_), and hyphens (-). This
	// parameter is mandatory when share_type is set to PER and is optional when share_type
	// is set to WHOLE with an ID specified.
	Name string `json:"name,omitempty"`

	// Specifies the bandwidth size. The value ranges from 1 Mbit/s to
	// 300 Mbit/s. This parameter is mandatory when share_type is set to PER and is optional
	// when share_type is set to WHOLE with an ID specified.
	Size int `json:"size,omitempty"`

	// Specifies the ID of the bandwidth. You can specify an earlier
	// shared bandwidth when applying for an elastic IP address for the bandwidth whose type
	// is set to WHOLE. The bandwidth whose type is set to WHOLE exclusively uses its own
	// ID. The value can be the ID of the bandwidth whose type is set to WHOLE.
	ID string `json:"id,omitempty"`

	// Specifies whether the bandwidth is shared or exclusive. The
	// value can be PER or WHOLE.
	ShareType string `json:"share_type" required:"true"`

	// Specifies the charging mode (by traffic or by bandwidth). The
	// value can be bandwidth or traffic. If the value is an empty character string or no
	// value is specified, default value bandwidth is used.
	ChargeMode string `json:"charge_mode,omitempty"`
}

type CreateOpts

type CreateOpts struct {
	// Specifies the elastic IP address objects.
	Publicip PublicIPRequest `json:"publicip" required:"true"`

	// Specifies the bandwidth objects.
	Bandwidth BandWidth `json:"bandwidth" required:"true"`
	//	Enterprise project ID. The maximum length is 36 bytes, with the U-ID format of the hyphen "-", or the string "0".
	//When creating an elastic public IP address, bind the enterprise project ID to the elastic public network IP.
	EnterpriseProjectId string `json:"enterprise_project_id,omitempty"`
}

func (CreateOpts) ToCreatePublicIPMap

func (opts CreateOpts) ToCreatePublicIPMap() (map[string]interface{}, error)

type CreateOptsBuilder

type CreateOptsBuilder interface {
	ToCreatePublicIPMap() (map[string]interface{}, error)
}

type CreateResult

type CreateResult struct {
	// contains filtered or unexported fields
}

func Create

func Create(client *gophercloud.ServiceClient, opts CreateOptsBuilder) (r CreateResult)

func (CreateResult) Extract

func (r CreateResult) Extract() (*PublicIPCreateResp, error)

type DeleteResult

type DeleteResult struct {
	gophercloud.ErrResult
}

func Delete

func Delete(client *gophercloud.ServiceClient, publicipId string) (r DeleteResult)

type GetResult

type GetResult struct {
	// contains filtered or unexported fields
}

func Get

func Get(client *gophercloud.ServiceClient, publicipId string) (r GetResult)

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 intmax.
	Limit int `q:"limit"`

	//Value range: 4, 6, respectively, to create ipv4 and ipv6, when not created ipv4 by default
	IPVersion int `q:"ip_version"`

	// enterprise_project_id
	// You can use this field to filter the elastic public IP under an enterprise project.
	EnterpriseProjectId string `q:"enterprise_project_id"`
}

func (ListOpts) ToListPublicIPQuery

func (opts ListOpts) ToListPublicIPQuery() (string, error)

type ListOptsBuilder

type ListOptsBuilder interface {
	ToListPublicIPQuery() (string, error)
}

type Profile

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

type PublicIP

type PublicIP struct {
	// Specifies the ID of the elastic IP address, which uniquely
	// identifies the elastic IP address.
	ID string `json:"id"`

	// Specifies the status of the elastic IP address.
	Status string `json:"status"`

	// ext data for order info
	Profile Profile `json:"profile"`

	// Specifies the type of the elastic IP address.
	Type string `json:"type"`

	// Specifies the obtained elastic IP address.
	PublicIpAddress string `json:"public_ip_address"`

	// Specifies the obtained elastic IPv6 address.
	PublicIpV6Address string `json:"public_ipv6_address"`

	//Value range: 4, 6, respectively, to create ipv4 and ipv6, when not created ipv4 by default
	IPVersion int `json:"ip_version"`

	// Specifies the private IP address bound to the elastic IP
	// address.
	PrivateIpAddress string `json:"private_ip_address,omitempty"`

	// Specifies the port ID.
	PortId string `json:"port_id,omitempty"`

	// Specifies the tenant ID of the operator.
	TenantId string `json:"tenant_id"`

	// Specifies the time for applying for the elastic IP address.
	CreateTime string `json:"create_time"`

	// Specifies the bandwidth ID of the elastic IP address.
	BandwidthId string `json:"bandwidth_id"`

	// Specifies the bandwidth size.
	BandwidthSize int `json:"bandwidth_size"`

	// Specifies whether the bandwidth is shared or exclusive.
	BandwidthShareType string `json:"bandwidth_share_type"`
	//
	// Specifies the bandwidth name.
	BandwidthName string `json:"bandwidth_name"`

	//	Enterprise project ID. The maximum length is 36 bytes, with the U-ID format of the hyphen "-", or the string "0".
	//When creating an elastic public IP address, bind the enterprise project ID to the elastic public network IP.
	EnterpriseProjectId string `json:"enterprise_project_id,omitempty"`
}

func ExtractPublicIPs

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

type PublicIPCreateResp

type PublicIPCreateResp struct {
	// Specifies the ID of the elastic IP address, which uniquely
	// identifies the elastic IP address.
	ID string `json:"id"`

	// Specifies the status of the elastic IP address.
	Status string `json:"status"`

	// Specifies the type of the elastic IP address.
	Type string `json:"type"`

	// Specifies the obtained elastic IP address.
	PublicIpAddress string `json:"public_ip_address"`

	// Specifies the obtained elastic IPv6 address.
	PublicIpV6Address string `json:"public_ipv6_address"`

	//Value range: 4, 6, respectively, to create ipv4 and ipv6, when not created ipv4 by default
	IPVersion int `json:"ip_version"`

	// Specifies the tenant ID of the operator.
	TenantId string `json:"tenant_id"`

	// Specifies the time for applying for the elastic IP address.
	CreateTime string `json:"create_time"`

	// Specifies the bandwidth size.
	BandwidthSize int `json:"bandwidth_size"`

	//	Enterprise project ID. The maximum length is 36 bytes, with the U-ID format of the hyphen "-", or the string "0".
	//When creating an elastic public IP address, bind the enterprise project ID to the elastic public network IP.
	EnterpriseProjectId string `json:"enterprise_project_id,omitempty"`
}

type PublicIPPage

type PublicIPPage struct {
	pagination.LinkedPageBase
}

func (PublicIPPage) IsEmpty

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

IsEmpty checks whether a NetworkPage struct is empty.

func (PublicIPPage) NextPageURL

func (r PublicIPPage) NextPageURL() (string, error)

type PublicIPRequest

type PublicIPRequest struct {
	// Specifies the type of the elastic IP address. The value can the
	// 5_telcom, 5_union, 5_bgp, or 5_sbgp. China Northeast: 5_telcom and 5_union China
	// South: 5_sbgp China East: 5_sbgp China North: 5_bgp and 5_sbgp The value must be a
	// type supported by the system. The value can be 5_telcom, 5_union, or 5_bgp.
	Type string `json:"type" required:"true"`

	// Specifies the elastic IP address to be obtained. The value must
	// be a valid IP address in the available IP address segment.
	IpAddress string `json:"ip_address,omitempty"`

	//Value range: 4, 6, respectively, to create ipv4 and ipv6, when not created ipv4 by default
	IPVersion int `json:"ip_version,omitempty"`
}

type PublicIPUpdateResp

type PublicIPUpdateResp struct {
	// Specifies the ID of the elastic IP address, which uniquely
	// identifies the elastic IP address.
	ID string `json:"id"`

	// Specifies the status of the elastic IP address.
	Status string `json:"status"`

	// Specifies the type of the elastic IP address.
	Type string `json:"type"`

	// Specifies the obtained elastic IP address.
	PublicIpAddress string `json:"public_ip_address"`

	// Specifies the private IP address bound to the elastic IP address.
	PrivateIpAddress string `json:"private_ip_address"`

	// Specifies the obtained elastic IPv6 address.
	PublicIpV6Address string `json:"public_ipv6_address"`

	//Value range: 4, 6, respectively, to create ipv4 and ipv6, when not created ipv4 by default
	IPVersion int `json:"ip_version"`

	// Specifies the port ID.
	PortId string `json:"port_id,omitempty"`

	// Specifies the tenant ID of the operator.
	TenantId string `json:"tenant_id"`

	// Specifies the time for applying for the elastic IP address.
	CreateTime string `json:"create_time"`

	// Specifies the bandwidth size.
	BandwidthSize int `json:"bandwidth_size"`

	// Specifies the bandwidth ID of the elastic IP address.
	BandwidthId string `json:"bandwidth_id"`

	// Specifies whether the bandwidth is shared or exclusive.
	BandwidthShareType string `json:"bandwidth_share_type"`

	// Specifies the bandwidth name.
	BandwidthName string `json:"bandwidth_name"`

	//	Enterprise project ID. The maximum length is 36 bytes, with the U-ID format of the hyphen "-", or the string "0".
	//When creating an elastic public IP address, bind the enterprise project ID to the elastic public network IP.
	EnterpriseProjectId string `json:"enterprise_project_id"`
}

type UpdateOpts

type UpdateOpts struct {
	// Specifies the port ID.
	PortId string `json:"port_id,omitempty"`

	//Value range: 4, 6, respectively, to create ipv4 and ipv6, when not created ipv4 by default
	IPVersion int `json:"ip_version,omitempty"`
}

func (UpdateOpts) ToUpdatePublicIPMap

func (opts UpdateOpts) ToUpdatePublicIPMap() (map[string]interface{}, error)

type UpdateOptsBuilder

type UpdateOptsBuilder interface {
	ToUpdatePublicIPMap() (map[string]interface{}, error)
}

type UpdateResult

type UpdateResult struct {
	// contains filtered or unexported fields
}

func Update

func Update(client *gophercloud.ServiceClient, publicipId string, opts UpdateOptsBuilder) (r UpdateResult)

func (UpdateResult) Extract

func (r UpdateResult) Extract() (*PublicIPUpdateResp, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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