Documentation ¶
Index ¶
- func BatchPostURL(c *golangsdk.ServiceClient) string
- func DeleteURL(c *golangsdk.ServiceClient, ID string) string
- func InsertURL(c *golangsdk.ServiceClient, ID string) string
- func PostURL(c *golangsdk.ServiceClient) string
- func RemoveURL(c *golangsdk.ServiceClient, ID string) string
- func Update(c *golangsdk.ServiceClient, bandwidthID string, opts UpdateOpts) (interface{}, error)
- func UpdateURL(c *golangsdk.ServiceClient, ID string) string
- type BandWidth
- type BandWidthInsertOpts
- type BandWidthInsertOptsBuilder
- type BandWidthRemoveOpts
- type BandWidthRemoveOptsBuilder
- type Bandwidth
- type BatchCreateOpts
- type BatchCreateOptsBuilder
- type BatchCreateResult
- type CreateOpts
- type CreateOptsBuilder
- type CreateResult
- type DeleteResult
- type ExtendParam
- type PostPaid
- type PrePaid
- type PublicIpInfoID
- type PublicIpinfo
- type PublicipInfo
- type UpdateOpts
- type UpdateResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BatchPostURL ¶
func BatchPostURL(c *golangsdk.ServiceClient) string
func Update ¶
func Update(c *golangsdk.ServiceClient, bandwidthID string, opts UpdateOpts) (interface{}, error)
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"` // Status Status string `json:"status"` }
type BandWidthInsertOpts ¶
type BandWidthInsertOpts struct {
PublicipInfo []PublicIpInfoID `json:"publicip_info" required:"true"`
}
func (BandWidthInsertOpts) ToBandWidthInsertMap ¶
func (opts BandWidthInsertOpts) ToBandWidthInsertMap() (map[string]interface{}, error)
type BandWidthRemoveOpts ¶
type BandWidthRemoveOpts struct { ChargeMode string `json:"charge_mode" required:"true"` Size *int `json:"size" required:"true"` PublicipInfo []PublicIpInfoID `json:"publicip_info" required:"true"` }
func (BandWidthRemoveOpts) ToBandWidthBatchRemoveMap ¶
func (opts BandWidthRemoveOpts) ToBandWidthBatchRemoveMap() (map[string]interface{}, error)
type BatchCreateOpts ¶
type BatchCreateOpts struct { Name string `json:"name" required:"true"` Size *int `json:"size" required:"true"` Count *int `json:"count" required:"true"` }
func (BatchCreateOpts) ToBandWidthBatchCreateMap ¶
func (opts BatchCreateOpts) ToBandWidthBatchCreateMap() (map[string]interface{}, error)
type BatchCreateOptsBuilder ¶
type BatchCreateResult ¶
type BatchCreateResult struct {
golangsdk.Result
}
func BatchCreate ¶
func BatchCreate(client *golangsdk.ServiceClient, opts BatchCreateOptsBuilder) (r BatchCreateResult)
func (BatchCreateResult) Extract ¶
func (r BatchCreateResult) Extract() (*[]BandWidth, error)
type CreateOpts ¶
type CreateOpts struct { Name string `json:"name" required:"true"` Size *int `json:"size" required:"true"` EnterpriseProjectId string `json:"enterprise_project_id,omitempty"` }
func (CreateOpts) ToBandWidthCreateMap ¶
func (opts CreateOpts) ToBandWidthCreateMap() (map[string]interface{}, error)
type CreateOptsBuilder ¶
type CreateResult ¶
type CreateResult struct {
golangsdk.Result
}
func Create ¶
func Create(client *golangsdk.ServiceClient, opts CreateOptsBuilder) (r CreateResult)
func Insert ¶
func Insert(client *golangsdk.ServiceClient, bandwidthID string, opts BandWidthInsertOptsBuilder) (r CreateResult)
func (CreateResult) Extract ¶
func (r CreateResult) Extract() (*BandWidth, error)
type DeleteResult ¶
type DeleteResult struct {
golangsdk.ErrResult
}
func Delete ¶
func Delete(client *golangsdk.ServiceClient, bandwidthID string) (r DeleteResult)
func Remove ¶
func Remove(client *golangsdk.ServiceClient, bandwidthID string, opts BandWidthRemoveOptsBuilder) (r DeleteResult)
type ExtendParam ¶
type ExtendParam struct {
IsAutoPay string `json:"is_auto_pay,omitempty"`
}
type PostPaid ¶
type PostPaid struct { Name string `json:"name"` Size int `json:"size"` ID string `json:"id"` ChargeMode string `json:"charge_mode"` BandwidthType string `json:"bandwidth_type"` TenantID string `json:"tenant_id"` PublicipInfo []PublicipInfo `json:"publicip_info"` EnterpriseProjectID string `json:"enterprise_project_id"` }
type PublicIpInfoID ¶
type PublicIpInfoID struct {
PublicIPID string `json:"publicip_id" required:"true"`
}
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 PublicipInfo ¶
type UpdateOpts ¶
type UpdateOpts struct { Bandwidth Bandwidth `json:"bandwidth" required:"true"` ExtendParam *ExtendParam `json:"extendParam,omitempty"` }
func (UpdateOpts) ToBandWidthUpdateMap ¶
func (opts UpdateOpts) ToBandWidthUpdateMap() (map[string]interface{}, error)
type UpdateResult ¶
type UpdateResult struct {
golangsdk.Result
}
func (UpdateResult) Extract ¶
func (r UpdateResult) Extract() (PostPaid, error)
func (UpdateResult) ExtractOrderID ¶
func (r UpdateResult) ExtractOrderID() (PrePaid, error)
Click to show internal directories.
Click to hide internal directories.