Documentation ¶
Overview ¶
util.go - define the utilities for api package of BBC service
Index ¶
- Constants
- func AutoRenewVolumeCluster(cli bce.Client, args *AutoRenewVolumeClusterArgs) error
- func CancelAutoRenewVolumeCluster(cli bce.Client, args *CancelAutoRenewVolumeClusterArgs) error
- func PurchaseReservedVolumeCluster(cli bce.Client, clusterId string, args *PurchaseReservedVolumeClusterArgs) error
- func ResizeVolumeCluster(cli bce.Client, clusterId string, args *ResizeVolumeClusterArgs) error
- type AutoRenewVolumeClusterArgs
- type Billing
- type CancelAutoRenewVolumeClusterArgs
- type Client
- func (c *Client) AutoRenewVolumeCluster(args *AutoRenewVolumeClusterArgs) error
- func (c *Client) CancelAutoRenewVolumeCluster(args *CancelAutoRenewVolumeClusterArgs) error
- func (c *Client) CreateVolumeCluster(args *CreateVolumeClusterArgs) (*CreateVolumeClusterResult, error)
- func (c *Client) GetVolumeClusterDetail(clusterId string) (*VolumeClusterDetail, error)
- func (c *Client) ListVolumeCluster(queryArgs *ListVolumeClusterArgs) (*ListVolumeClusterResult, error)
- func (c *Client) PurchaseReservedVolumeCluster(clusterId string, args *PurchaseReservedVolumeClusterArgs) error
- func (c *Client) ResizeVolumeCluster(clusterId string, args *ResizeVolumeClusterArgs) error
- type CreateVolumeClusterArgs
- type CreateVolumeClusterResult
- type ListVolumeClusterArgs
- type ListVolumeClusterResult
- type PaymentTimingType
- type PurchaseReservedVolumeClusterArgs
- type Reservation
- type ResizeVolumeClusterArgs
- type StorageType
- type VolumeClusterDetail
- type VolumeClusterModel
Constants ¶
View Source
const ( URI_PREFIX_V2 = bce.URI_PREFIX + "v2" REQUEST_VOLUME_URI = "/volume" REQUEST_CREATE_URI = "/cluster" REQUEST_AUTO_RENEW_URI = "/cluster/autoRenew" REQUEST_CANCEL_AUTO_RENEW_URI = "/cluster/cancelAutoRenew" )
View Source
const DEFAULT_SERVICE_DOMAIN = "bcc." + bce.DEFAULT_REGION + ".baidubce.com"
Variables ¶
This section is empty.
Functions ¶
func AutoRenewVolumeCluster ¶
func AutoRenewVolumeCluster(cli bce.Client, args *AutoRenewVolumeClusterArgs) error
func CancelAutoRenewVolumeCluster ¶
func CancelAutoRenewVolumeCluster(cli bce.Client, args *CancelAutoRenewVolumeClusterArgs) error
func PurchaseReservedVolumeCluster ¶
func PurchaseReservedVolumeCluster(cli bce.Client, clusterId string, args *PurchaseReservedVolumeClusterArgs) error
func ResizeVolumeCluster ¶
func ResizeVolumeCluster(cli bce.Client, clusterId string, args *ResizeVolumeClusterArgs) error
Types ¶
type Billing ¶
type Billing struct { PaymentTiming PaymentTimingType `json:"paymentTiming,omitempty"` Reservation *Reservation `json:"reservation,omitempty"` }
type CancelAutoRenewVolumeClusterArgs ¶
type CancelAutoRenewVolumeClusterArgs struct {
ClusterId string `json:"clusterId"`
}
type Client ¶
Client of BCC service is a kind of BceClient, so derived from BceClient
func NewClient ¶
NewClient make the BCC service client with default configuration. Use `cli.Config.xxx` to access the config or change it to non-default value.
func (*Client) AutoRenewVolumeCluster ¶
func (c *Client) AutoRenewVolumeCluster(args *AutoRenewVolumeClusterArgs) error
func (*Client) CancelAutoRenewVolumeCluster ¶
func (c *Client) CancelAutoRenewVolumeCluster(args *CancelAutoRenewVolumeClusterArgs) error
func (*Client) CreateVolumeCluster ¶
func (c *Client) CreateVolumeCluster(args *CreateVolumeClusterArgs) (*CreateVolumeClusterResult, error)
func (*Client) GetVolumeClusterDetail ¶
func (c *Client) GetVolumeClusterDetail(clusterId string) (*VolumeClusterDetail, error)
func (*Client) ListVolumeCluster ¶
func (c *Client) ListVolumeCluster(queryArgs *ListVolumeClusterArgs) (*ListVolumeClusterResult, error)
func (*Client) PurchaseReservedVolumeCluster ¶
func (c *Client) PurchaseReservedVolumeCluster(clusterId string, args *PurchaseReservedVolumeClusterArgs) error
func (*Client) ResizeVolumeCluster ¶
func (c *Client) ResizeVolumeCluster(clusterId string, args *ResizeVolumeClusterArgs) error
type CreateVolumeClusterArgs ¶
type CreateVolumeClusterArgs struct { ZoneName string `json:"zoneName,omitempty"` ClusterName string `json:"clusterName,omitempty"` StorageType StorageType `json:"storageType,omitempty"` ClusterSizeInGB int `json:"clusterSizeInGB,omitempty"` PurchaseCount int `json:"purchaseCount,omitempty"` Billing *Billing `json:"billing"` RenewTimeUnit string `json:"renewTimeUnit"` RenewTime int `json:"renewTime"` UuidFlag string `json:"uuidFlag"` }
type CreateVolumeClusterResult ¶
type CreateVolumeClusterResult struct { ClusterIds []string `json:"clusterIds"` ClusterUuids []string `json:"clusterUuids"` }
func CreateVolumeCluster ¶
func CreateVolumeCluster(cli bce.Client, args *CreateVolumeClusterArgs) (*CreateVolumeClusterResult, error)
type ListVolumeClusterArgs ¶
type ListVolumeClusterResult ¶
type ListVolumeClusterResult struct { Marker string `json:"marker"` IsTruncated bool `json:"isTruncated"` NextMarker string `json:"nextMarker"` MaxKeys int `json:"maxKeys"` Result []VolumeClusterModel `json:"result"` }
func ListVolumeCluster ¶
func ListVolumeCluster(cli bce.Client, queryArgs *ListVolumeClusterArgs) (*ListVolumeClusterResult, error)
type PaymentTimingType ¶
type PaymentTimingType string
const ( PaymentTimingPrePaid PaymentTimingType = "Prepaid" PaymentTimingPostPaid PaymentTimingType = "Postpaid" )
type PurchaseReservedVolumeClusterArgs ¶
type PurchaseReservedVolumeClusterArgs struct {
Billing *Billing `json:"billing"`
}
type Reservation ¶
type ResizeVolumeClusterArgs ¶
type ResizeVolumeClusterArgs struct {
NewClusterSizeInGB int `json:"newClusterSizeInGB"`
}
type StorageType ¶
type StorageType string
const ( StorageTypeHP1 StorageType = "hp1" StorageTypeHdd StorageType = "hdd" )
type VolumeClusterDetail ¶
type VolumeClusterDetail struct { ClusterId string `json:"clusterId"` ClusterName string `json:"clusterName"` CreatedTime string `json:"createdTime"` ExpiredTime string `json:"expiredTime"` Status string `json:"status"` ZoneName string `json:"logicalZone"` ProductType string `json:"productType"` ClusterType string `json:"clusterType"` TotalCapacity int `json:"totalCapacity"` UsedCapacity int `json:"usedCapacity"` AvailableCapacity int `json:"availableCapacity"` ExpandingCapacity int `json:"expandingCapacity"` CreatedVolumeNum int `json:"createdVolumeNum"` AffiliatedCDSNumber []string `json:"affiliatedCDSNumber"` EnableAutoRenew bool `json:"enableAutoRenew"` RenewTimeUnit string `json:"renewTimeUnit"` RenewTime int `json:"renewTime"` }
func GetVolumeClusterDetail ¶
func GetVolumeClusterDetail(cli bce.Client, clusterId string) (*VolumeClusterDetail, error)
type VolumeClusterModel ¶
type VolumeClusterModel struct { ClusterId string `json:"clusterId"` ClusterName string `json:"clusterName"` CreatedTime string `json:"createdTime"` ExpiredTime string `json:"expiredTime"` Status string `json:"status"` ZoneName string `json:"logicalZone"` ProductType string `json:"productType"` ClusterType string `json:"clusterType"` TotalCapacity int `json:"totalCapacity"` UsedCapacity int `json:"usedCapacity"` AvailableCapacity int `json:"availableCapacity"` ExpandingCapacity int `json:"expandingCapacity"` CreatedVolumeNum int `json:"createdVolumeNum"` EnableAutoRenew bool `json:"enableAutoRenew"` RenewTimeUnit string `json:"renewTimeUnit"` RenewTime int `json:"renewTime"` }
Click to show internal directories.
Click to hide internal directories.