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 ¶
- func GetURL(c *gophercloud.ServiceClient, bandwidthId string) string
- func List(client *gophercloud.ServiceClient, opts ListOptsBuilder) pagination.Pager
- func ListURL(c *gophercloud.ServiceClient) string
- func UpdateURL(c *gophercloud.ServiceClient, bandwidthId string) string
- type BandWidth
- type BandWidthPage
- type GetResult
- type ListOpts
- type ListOptsBuilder
- type ListResult
- type PublicIpinfo
- type UpdateOpts
- type UpdateOptsBuilder
- type UpdateResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetURL ¶
func GetURL(c *gophercloud.ServiceClient, bandwidthId string) string
func List ¶
func List(client *gophercloud.ServiceClient, opts ListOptsBuilder) pagination.Pager
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"` // 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)
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"` }
func (ListOpts) ToListQuery ¶
type ListOptsBuilder ¶
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 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)
Click to show internal directories.
Click to hide internal directories.