bandwidths

package
v1.0.22 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2020 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

You can allocate bandwidth when assigning an EIP so that the ECS bound with the EIP can use the bandwidth to access the Internet. he bandwidth displays network resource usage and can be used for service metering.

Sample Code, This interface is used to update information about a bandwidth.

Sample Code, This interface is used to query details about a bandwidth.

Sample Code, This interface is used to query bandwidths using search criteria and to display the bandwidths in a list.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetURL

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

func ListURL

func ListURL(c *gophercloud.ServiceClient) string

func UpdateURL

func UpdateURL(c *gophercloud.ServiceClient, bandwidthId 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 (-).
	Name string `json:"name"`

	// Specifies the bandwidth size. The value ranges from 1 Mbit/s to
	// 300 Mbit/s.
	Size int `json:"size"`

	// Specifies the bandwidth ID, which uniquely identifies the
	// bandwidth.
	ID string `json:"id"`

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

	// Specifies the elastic IP address of the bandwidth.  The
	// bandwidth, whose type is set to WHOLE, supports up to 20 elastic IP addresses. The
	// bandwidth, whose type is set to PER, supports only one elastic IP address.
	PublicipInfo []PublicIpinfo `json:"publicip_info"`

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

	// Specifies the bandwidth type.
	BandwidthType string `json:"bandwidth_type"`

	// Specifies the charging mode (by traffic or by bandwidth).
	ChargeMode string `json:"charge_mode"`

	// Specifies the billing information.
	BillingInfo string `json:"billing_info"`

	// Enterprise project id
	EnterpriseProjectID string `json:"enterprise_project_id"`

	// Specifies the status of bandwidth
	Status string `json:"status"`
}

func ExtractBandWidths

func ExtractBandWidths(r pagination.Page) ([]BandWidth, error)

type BandWidthPage

type BandWidthPage struct {
	pagination.LinkedPageBase
}

func (BandWidthPage) IsEmpty

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

func (BandWidthPage) NextPageURL

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

type GetResult

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

func Get

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

func (GetResult) Extract

func (r GetResult) Extract() (*BandWidth, 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.
	Limit int `q:"limit"`

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

func (ListOpts) ToListQuery

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

type ListOptsBuilder

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

type ListResult

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

func (ListResult) Extract

func (r ListResult) Extract() (*[]BandWidth, error)

type PublicIpinfo

type PublicIpinfo struct {
	// Specifies the tenant ID of the user.
	PublicipId string `json:"publicip_id"`

	// Specifies the elastic IP address.
	PublicipAddress string `json:"publicip_address"`

	// Specifies the elastic IP v6 address.
	Publicipv6Address string `json:"publicipv6_address"`

	// Specifies the elastic IP version.
	IPVersion int `json:"ip_version"`

	// Specifies the elastic IP address type. The value can be
	// 5_telcom, 5_union, or 5_bgp.
	PublicipType string `json:"publicip_type"`
}

type UpdateOpts

type UpdateOpts struct {
	// Specifies the bandwidth name. The value is a string of 1 to 64
	// characters that can contain letters, digits, underscores (_), and hyphens (-).
	Name string `json:"name,omitempty"`

	// Specifies the bandwidth size. The value ranges from 1 Mbit/s to
	// 300 Mbit/s.
	Size int `json:"size,omitempty"`
}

func (UpdateOpts) ToBandwidthsUpdateMap

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

type UpdateOptsBuilder

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

type UpdateResult

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

func Update

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

func (UpdateResult) Extract

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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