bbc

package
v0.0.1-alpha Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2021 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package bbc defines the BBC services of BCE. The supported APIs are all defined in sub-package

Package bbc defines all APIs supported by the BBC service of BCE.

Package defines all APIs supported by the BBC service of BCE.

Package bbc defines all APIs supported by the BBC service of BCE.

Package bbc defines all APIs supported by the BBC service of BCE.

Package bbc defines all APIs supported by the BBC service of BCE.

Package bbc defines all APIs supported by the BBC service of BCE.

  • Copyright (C) 2020 Baidu, Inc. All Rights Reserved.

Package bbc defines all APIs supported by the BBC service of BCE.

util.go - define the utilities for api package of BBC service

Index

Constants

View Source
const (
	URI_PREFIX_V1 = bce.URI_PREFIX + "v1"
	URI_PREFIX_V2 = bce.URI_PREFIX + "v2"

	REQUEST_INSTANCE_URI     = "/instance"
	REQUEST_BATCH_DELETE_URI = "/batchDelete"
	REQUEST_RECYCLE_URI      = "/recycle"
	REQUEST_RECOVERY_URI     = "/recovery"
	REQUEST_SUBNET_URI       = "/vpcSubnet"
	REQUEST_VPC_URI          = "/vpc"
	SECURITY_GROUP_URI       = "/securitygroup"

	REQUEST_IMAGE_URI                        = "/image"
	REQUEST_BATCHADDIP_URI                   = "/batchAddIp"
	REQUEST_BATCHADDIPCROSSSUBNET_URI        = "/batchAddIpCrossSubnet"
	REQUEST_BATCHDELIP_URI                   = "/batchDelIp"
	REQUEST_BATCH_CREATE_AUTORENEW_RULES_URI = "/batchCreateAutoRenewRules"
	REQUEST_BATCH_Delete_AUTORENEW_RULES_URI = "/batchDeleteAutoRenewRules"
	REQUEST_BATCH_REBUILD_INSTANCE_URI       = "/batchRebuild"

	REQUEST_FLAVOR_URI       = "/flavor"
	REQUEST_FLAVOR_RAID_URI  = "/flavorRaid"
	REQUEST_COMMON_IMAGE_URI = "/flavor/image"
	REQUEST_CUSTOM_IMAGE_URI = "/customFlavor/image"

	REQUEST_FLAVOR_ZONE_URI = "/order/flavorZone"
	REQUEST_FLAVORS_URI     = "/order/flavor"

	REQUEST_OPERATION_LOG_URI = "/operationLog"

	REQUEST_DEPLOY_SET_URI    = "/deployset"
	REQUEST_INSTANCE_PORT_URI = "/vpcPort"

	REQUEST_REPAIR_TASK_URI        = "/task"
	REQUEST_REPAIR_CLOSED_TASK_URI = "/closedTask"

	REQUEST_RULE_URI    = "/rule"
	REQUEST_CREATE_URI  = "/create"
	REQUEST_DELETE_URI  = "/delete"
	REQUEST_DISABLE_URI = "/disable"
	REQUEST_ENABLE_URI  = "/enable"
	REQUEST_VOLUME_URI  = "/volume"
)
View Source
const DEFAULT_SERVICE_DOMAIN = "bbc." + bce.DEFAULT_REGION + ".baidubce.com"

Variables

This section is empty.

Functions

func Aes128EncryptUseSecreteKey

func Aes128EncryptUseSecreteKey(sk string, data string) (string, error)

func AuthorizeRepairTask

func AuthorizeRepairTask(cli bce.Client, reqBody *bce.Body) error

func BatchCreateAutoRenewRules

func BatchCreateAutoRenewRules(cli bce.Client, reqBody *bce.Body) error

BatchCreateAutoRenewRules - Batch Create AutoRenew Rules

PARAMS:

  • cli: the client agent which can perform sending request
  • reqBody: http request body

RETURNS:

  • error: nil if success otherwise the specific error

func BatchDelIp

func BatchDelIp(cli bce.Client, args *BatchDelIpArgs, reqBody *bce.Body) error

BatchDelIp - Delete ips of instance

PARAMS:

  • cli: the client agent which can perform sending request
  • reqBody: http request body

RETURNS:

  • error: nil if success otherwise the specific error

func BatchDeleteAutoRenewRules

func BatchDeleteAutoRenewRules(cli bce.Client, reqBody *bce.Body) error

BatchDeleteAutoRenewRules - Batch Delete AutoRenew Rules

PARAMS:

  • cli: the client agent which can perform sending request
  • reqBody: http request body

RETURNS:

  • error: nil if success otherwise the specific error

func BindSecurityGroups

func BindSecurityGroups(cli bce.Client, reqBody *bce.Body) error

BindSecurityGroups - Bind Security Groups

PARAMS:

  • cli: the client agent which can perform sending request
  • reqBody: http request body

RETURNS:

  • error: nil if success otherwise the specific error

func BindTags

func BindTags(cli bce.Client, instanceId string, reqBody *bce.Body) error

bindTags - bind a bbc instance tags

PARAMS:

  • cli: the client agent which can perform sending request
  • instanceId: the id of the instance
  • reqBody: http request body

RETURNS:

  • error: nil if success otherwise the specific error

func ConfirmRepairTask

func ConfirmRepairTask(cli bce.Client, reqBody *bce.Body) error

func DeleteDeploySet

func DeleteDeploySet(cli bce.Client, deploySetId string) error

DeleteDeploySet - delete a deploy set

PARAMS:

  • cli: the client agent which can perform sending request
  • deploySetId: the id of the deploy set

RETURNS:

  • error: nil if success otherwise the specific error

func DeleteImage

func DeleteImage(cli bce.Client, imageId string) error

DeleteImage - delete an image

PARAMS:

  • cli: the client agent which can perform sending request
  • imageId: the specific image ID

RETURNS:

  • error: nil if success otherwise the specific error

func DeleteInstance

func DeleteInstance(cli bce.Client, instanceId string) error

DeleteInstance - delete a bbc instance

PARAMS:

  • cli: the client agent which can perform sending request
  • instanceId: the id of the instance

RETURNS:

  • error: nil if success otherwise the specific error

func DeleteInstances

func DeleteInstances(cli bce.Client, reqBody *bce.Body) error

DeleteInstance - delete a bbc instance

PARAMS:

  • cli: the client agent which can perform sending request
  • instanceId: the id of the instance

RETURNS:

  • error: nil if success otherwise the specific error

func DeleteRecycledInstance

func DeleteRecycledInstance(cli bce.Client, instanceId string) error

DeleteRecycledInstance - delete a recycled bbc instance

PARAMS:

  • cli: the client agent which can perform sending request
  • instanceId: the id of the instance

RETURNS:

  • error: nil if success otherwise the specific error

func DeleteRule

func DeleteRule(cli bce.Client, reqBody *bce.Body) error

DeleteRule - delete the repair plat rule

PARAMS:

  • cli: the client agent which can perform sending request
  • reqBody: http request body

RETURNS:

  • error: nil if success otherwise the specific error

func DisConfirmRepairTask

func DisConfirmRepairTask(cli bce.Client, reqBody *bce.Body) error

func DisableRule

func DisableRule(cli bce.Client, reqBody *bce.Body) error

DisableRule - disable the repair plat rule

PARAMS:

  • cli: the client agent which can perform sending request
  • reqBody: http request body

RETURNS:

  • error: nil if success otherwise the specific error

func EnableRule

func EnableRule(cli bce.Client, reqBody *bce.Body) error

EnableRule - enable the repair plat rule

PARAMS:

  • cli: the client agent which can perform sending request
  • reqBody: http request body

RETURNS:

  • error: nil if success otherwise the specific error

func InstanceChangeSubnet

func InstanceChangeSubnet(cli bce.Client, reqBody *bce.Body) error

InstanceChangeVpc - change the subnet to which the instance belongs

PARAMS:

  • cli: the client agent which can perform sending request
  • reqBody: request body to change subnet of instance

RETURNS:

  • error: nil if success otherwise the specific error

func InstanceChangeVpc

func InstanceChangeVpc(cli bce.Client, reqBody *bce.Body) error

InstanceChangeVpc - change the vpc to which the instance belongs

PARAMS:

  • cli: the client agent which can perform sending request
  • reqBody: request body to change vpc of instance

RETURNS:

  • error: nil if success otherwise the specific error

func InstancePurchaseReserved

func InstancePurchaseReserved(cli bce.Client, instanceId string, clientToken string, reqBody *bce.Body) error

InstancePurchaseReserved - renew a specified instance

PARAMS:

  • cli: the client agent which can perform sending request
  • instanceId: id of the instance to be renewed
  • reqBody: the request body to renew instance

RETURNS:

  • error: nil if success otherwise the specific error

func ModifyInstanceDesc

func ModifyInstanceDesc(cli bce.Client, instanceId string, clientToken string, reqBody *bce.Body) error

ModifyInstanceDesc - modify a bbc instance desc

PARAMS:

  • cli: the client agent which can perform sending request
  • instanceId: the id of the instance
  • reqBody: http request body

RETURNS:

  • error: nil if success otherwise the specific error

func ModifyInstanceName

func ModifyInstanceName(cli bce.Client, instanceId string, reqBody *bce.Body) error

ModifyInstanceName - modify a bbc instance name

PARAMS:

  • cli: the client agent which can perform sending request
  • instanceId: the id of the instance
  • reqBody: http request body

RETURNS:

  • error: nil if success otherwise the specific error

func ModifyInstancePassword

func ModifyInstancePassword(cli bce.Client, instanceId string, reqBody *bce.Body) error

ModifyInstancePassword - modify a bbc instance password

PARAMS:

  • cli: the client agent which can perform sending request
  • instanceId: the id of the instance
  • reqBody: http request body

RETURNS:

  • error: nil if success otherwise the specific error

func RebootInstance

func RebootInstance(cli bce.Client, instanceId string, reqBody *bce.Body) error

RebootInstance - reboot a bbc instance

PARAMS:

  • cli: the client agent which can perform sending request
  • instanceId: the id of the instance
  • reqBody: http request body

RETURNS:

  • error: nil if success otherwise the specific error

func RebuildInstance

func RebuildInstance(cli bce.Client, instanceId string, reqBody *bce.Body) error

RebuildInstance - rebuild a bbc instance

PARAMS:

  • cli: the client agent which can perform sending request
  • instanceId: the id of the instance
  • reqBody: http request body

RETURNS:

  • error: nil if success otherwise the specific error

func RecoveryInstances

func RecoveryInstances(cli bce.Client, reqBody *bce.Body) error

func ShareImage

func ShareImage(cli bce.Client, imageId string, args *SharedUser) error

ShareImage - share a specified custom image

PARAMS:

  • cli: the client agent which can perform sending request
  • imageId: id of the image to be shared
  • args: the arguments to share image

RETURNS:

  • error: nil if success otherwise the specific error

func StartInstance

func StartInstance(cli bce.Client, instanceId string) error

StartInstance - start a bbc instance

PARAMS:

  • cli: the client agent which can perform sending request
  • instanceId: the id of the instance

RETURNS:

  • error: nil if success otherwise the specific error

func StopInstance

func StopInstance(cli bce.Client, instanceId string, reqBody *bce.Body) error

StopInstance - stop a bbc instance

PARAMS:

  • cli: the client agent which can perform sending request
  • instanceId: the id of the instance
  • reqBody: http request body

RETURNS:

  • error: nil if success otherwise the specific error

func UnAuthorizeRepairTask

func UnAuthorizeRepairTask(cli bce.Client, reqBody *bce.Body) error

func UnBindSecurityGroups

func UnBindSecurityGroups(cli bce.Client, reqBody *bce.Body) error

UnBindSecurityGroups - UnBind Security Groups

PARAMS:

  • cli: the client agent which can perform sending request
  • reqBody: http request body

RETURNS:

  • error: nil if success otherwise the specific error

func UnShareImage

func UnShareImage(cli bce.Client, imageId string, args *SharedUser) error

UnShareImage - unshare a specified image

PARAMS:

  • cli: the client agent which can perform sending request
  • imageId: id of the image to be unshared
  • args: the arguments to unshare image

RETURNS:

  • error: nil if success otherwise the specific error

func UnbindTags

func UnbindTags(cli bce.Client, instanceId string, reqBody *bce.Body) error

UnbindTags - unbind a bbc instance tags

PARAMS:

  • cli: the client agent which can perform sending request
  • instanceId: the id of the instance
  • reqBody: http request body

RETURNS:

  • error: nil if success otherwise the specific error

Types

type AutoSnapshotPolicyModel

type AutoSnapshotPolicyModel struct {
	CreatedTime     string `json:"createdTime"`
	Id              string `json:"id"`
	Status          string `json:"status"`
	RetentionDays   int    `json:"retentionDays"`
	UpdatedTime     string `json:"updatedTime"`
	DeletedTime     string `json:"deletedTime"`
	LastExecuteTime string `json:"lastExecuteTime"`
	VolumeCount     int    `json:"volumeCount"`
	Name            string `json:"name"`
	TimePoints      []int  `json:"timePoints"`
	RepeatWeekdays  []int  `json:"repeatWeekdays"`
}

type AzIntstanceStatis

type AzIntstanceStatis struct {
	ZoneName string `json:"zoneName"`
	Count    int    `json:"instanceCount"`
	BbcCount int    `json:"bbcInstanceCnt"`
	BccCount int    `json:"bccInstanceCnt"`
	Total    int    `json:"instanceTotal"`
}

type AzIntstanceStatisDetail

type AzIntstanceStatisDetail struct {
	ZoneName       string   `json:"zoneName"`
	Count          int      `json:"instanceCount"`
	BccCount       int      `json:"bccInstanceCnt"`
	BbcCount       int      `json:"bbcInstanceCnt"`
	Total          int      `json:"instanceTotal"`
	InstanceIds    []string `json:"instanceIds"`
	BccInstanceIds []string `json:"bccInstanceIds"`
	BbcInstanceIds []string `json:"bbcInstanceIds"`
}

type BatchAddIpArgs

type BatchAddIpArgs struct {
	InstanceId                     string   `json:"instanceId"`
	PrivateIps                     []string `json:"privateIps"`
	SecondaryPrivateIpAddressCount int      `json:"secondaryPrivateIpAddressCount"`
	ClientToken                    string   `json:"-"`
}

type BatchAddIpCrossSubnetArgs

type BatchAddIpCrossSubnetArgs struct {
	InstanceId            string                 `json:"instanceId"`
	SingleEniAndSubentIps []SingleEniAndSubentIp `json:"singleEniAndSubentIps"`
	ClientToken           string                 `json:"-"`
}

type BatchAddIpResponse

type BatchAddIpResponse struct {
	PrivateIps []string `json:"privateIps"`
}

func BatchAddIp

func BatchAddIp(cli bce.Client, args *BatchAddIpArgs, reqBody *bce.Body) (*BatchAddIpResponse, error)

BatchAddIp - Add ips to instance

PARAMS:

  • cli: the client agent which can perform sending request
  • reqBody: http request body

RETURNS:

  • error: nil if success otherwise the specific error

func BatchAddIpCrossSubnet

func BatchAddIpCrossSubnet(cli bce.Client, args *BatchAddIpCrossSubnetArgs, reqBody *bce.Body) (*BatchAddIpResponse,
	error)

BatchAddIp - Add ips to instance

PARAMS:

  • cli: the client agent which can perform sending request
  • reqBody: http request body

RETURNS:

  • error: nil if success otherwise the specific error

type BatchDelIpArgs

type BatchDelIpArgs struct {
	InstanceId  string   `json:"instanceId"`
	PrivateIps  []string `json:"privateIps"`
	ClientToken string   `json:"-"`
}

type BatchRebuild

type BatchRebuild struct {
	InstanceIds []string `json:"instanceIds"`
	ErrMsp      string   `json:"errMsg"`
	Code        string   `json:"code"`
}

type BatchRebuildResponse

type BatchRebuildResponse struct {
	Result []BatchRebuild `json:"result"`
}

func BatchRebuildInstances

func BatchRebuildInstances(cli bce.Client, reqBody *bce.Body) (*BatchRebuildResponse, error)

BatchRebuildInstances - batch rebuild instances

PARAMS:

  • cli: the client agent which can perform sending request
  • reqBody: the request body to rebuild instance

RETURNS:

  • *BatchRebuildResponse: result of batch rebuild instances
  • error: nil if success otherwise the specific error

type BbcCreateAutoRenewArgs

type BbcCreateAutoRenewArgs struct {
	InstanceId    string `json:"instanceId"`
	RenewTimeUnit string `json:"renewTimeUnit"`
	RenewTime     int    `json:"renewTime"`
}

type BbcDeleteAutoRenewArgs

type BbcDeleteAutoRenewArgs struct {
	InstanceId string `json:"instanceId"`
}

type BbcFlavorInfo

type BbcFlavorInfo struct {
	Count       int                 `json:"count"`
	SataInfo    string              `json:"sataInfo"`
	Cpu         int                 `json:"cpu"`
	CpuGhz      string              `json:"cpuGhz"`
	Memory      int                 `json:"memory"`
	StorageType string              `json:"type"`
	FlavorId    string              `json:"id"`
	DiskInfos   map[string]DiskInfo `json:"diskInfos"`
}

type BbcNetworkModel

type BbcNetworkModel struct {
	BbcId  string      `json:"bbcId"`
	Vpc    VpcModel    `json:"vpc"`
	Subnet SubnetModel `json:"subnet"`
}

type BbcStock

type BbcStock struct {
	FlavorId          string `json:"flavorId"`
	InventoryQuantity int    `json:"inventoryQuantity"`
	UpdatedTime       string `json:"updatedTime"`
	CollectionTime    string `json:"collectionTime"`
	ZoneName          string `json:"logicalZone"`
}

type Billing

type Billing struct {
	PaymentTiming PaymentTimingType `json:"paymentTiming,omitempty"`
	Reservation   Reservation       `json:"reservation,omitempty"`
}

type BindSecurityGroupsArgs

type BindSecurityGroupsArgs struct {
	InstanceIds      []string `json:"instanceIds"`
	SecurityGroupIds []string `json:"securityGroups"`
}

type BindTagsArgs

type BindTagsArgs struct {
	ChangeTags []model.TagModel `json:"changeTags"`
}

type Client

type Client struct {
	*bce.BceClient
}

Client of BBC service is a kind of BceClient, so derived from BceClient

func NewClient

func NewClient(ak, sk, endPoint string) (*Client, error)

NewClient make the BBC service client with default configuration. Use `cli.Config.xxx` to access the config or change it to non-default value.

func (*Client) AuthorizeRepairTask

func (c *Client) AuthorizeRepairTask(args *TaskIdArgs) error

func (*Client) BatchAddIP

func (c *Client) BatchAddIP(args *BatchAddIpArgs) (*BatchAddIpResponse, error)

BatchAddIP - Add ips to instance

PARAMS:

  • args: the arguments to add ips to bbc instance

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) BatchAddIPCrossSubnet

func (c *Client) BatchAddIPCrossSubnet(args *BatchAddIpCrossSubnetArgs) (*BatchAddIpResponse, error)

BatchAddIPCrossSubnet - Add ips to instance cross subnet

PARAMS:

  • args: the arguments to add ips to bbc instance

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) BatchCreateAutoRenewRules

func (c *Client) BatchCreateAutoRenewRules(args *BbcCreateAutoRenewArgs) error

BatchCreateAutoRenewRules - Batch Create AutoRenew Rules

PARAMS:

  • args: the arguments to batch create autorenew rules

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) BatchDelIP

func (c *Client) BatchDelIP(args *BatchDelIpArgs) error

BatchDelIP - Delete ips of instance

PARAMS:

  • args: the arguments to add ips to bbc instance

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) BatchDeleteAutoRenewRules

func (c *Client) BatchDeleteAutoRenewRules(args *BbcDeleteAutoRenewArgs) error

BatchDeleteAutoRenewRules - Batch Delete AutoRenew Rules

PARAMS:

  • args: the arguments to batch delete autorenew rules

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) BatchRebuildInstances

func (c *Client) BatchRebuildInstances(args *RebuildBatchInstanceArgs) (*BatchRebuildResponse, error)

RebuildBatchInstance - batch rebuild instances

PARAMS:

  • args: the arguments to batch rebuild instances

RETURNS:

  • *BatchRebuildResponse: the result of batch rebuild the instances
  • error: nil if success otherwise the specific error

func (*Client) BindSecurityGroups

func (c *Client) BindSecurityGroups(args *BindSecurityGroupsArgs) error

BindSecurityGroups - Bind Security Groups

PARAMS:

  • args: the arguments of bind security groups

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) BindTags

func (c *Client) BindTags(instanceId string, args *BindTagsArgs) error

BindTags - bind an instance tags

PARAMS:

  • instanceId: the id of the instance
  • args: tags of an instance to bind

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) ConfirmRepairTask

func (c *Client) ConfirmRepairTask(args *TaskIdArgs) error

func (*Client) CreateDeploySet

func (c *Client) CreateDeploySet(args *CreateDeploySetArgs) (*CreateDeploySetResult, error)

CreateDeploySet - create a deploy set

PARAMS:

  • args: the arguments to create a deploy set

RETURNS:

  • *CreateDeploySetResult: results of creating a deploy set
  • error: nil if success otherwise the specific error

func (*Client) CreateImageFromInstanceId

func (c *Client) CreateImageFromInstanceId(args *CreateImageArgs) (*CreateImageResult, error)

CreateImageFromInstanceId - create image from specified instance

PARAMS:

  • args: the arguments to create image

RETURNS:

  • *CreateImageResult: the result of create Image
  • error: nil if success otherwise the specific error

func (*Client) CreateInstance

func (c *Client) CreateInstance(args *CreateInstanceArgs) (*CreateInstanceResult, error)

CreateInstance - create an instance with the specific parameters

PARAMS:

  • args: the arguments to create instance

RETURNS:

  • *CreateInstanceResult: the result of create Instance, contains new Instance ID
  • error: nil if success otherwise the specific error

func (*Client) CreateRule

func (c *Client) CreateRule(args *CreateRuleArgs) (*CreateRuleResult, error)

CreateRule - create the repair plat rule

PARAMS:

  • args: the arguments of creating the repair plat rule

RETURNS:

  • *CreateRuleResult: results of the id of the repair plat rule which is created
  • error: nil if success otherwise the specific error

func (*Client) DeleteDeploySet

func (c *Client) DeleteDeploySet(deploySetId string) error

DeleteDeploySet - delete a deploy set

PARAMS:

  • deploySetId: the id of the deploy set

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) DeleteImage

func (c *Client) DeleteImage(imageId string) error

DeleteImage - delete an image

PARAMS:

  • imageId: the specific image ID

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) DeleteInstance

func (c *Client) DeleteInstance(instanceId string) error

DeleteInstance - delete an instance

PARAMS:

  • instanceId: the specific instance ID

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) DeleteInstanceIngorePayment

func (c *Client) DeleteInstanceIngorePayment(args *DeleteInstanceIngorePaymentArgs) (*DeleteInstanceResult, error)

func (*Client) DeleteInstances

func (c *Client) DeleteInstances(args *DeleteInstanceArgs) error

DeleteInstance - delete an instance

PARAMS:

  • instanceId: the specific instance ID

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) DeleteRecycledInstance

func (c *Client) DeleteRecycledInstance(instanceId string) error

DeleteRecycledInstance - delete an recycled instance

PARAMS:

  • instanceId: the specific instance ID

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) DeleteRule

func (c *Client) DeleteRule(args *DeleteRuleArgs) error

DeleteRule - delete the repair plat rule

PARAMS:

  • args: the arguments of deleting the repair plat rule

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) DisConfirmRepairTask

func (c *Client) DisConfirmRepairTask(args *DisconfirmTaskArgs) error

func (*Client) DisableRule

func (c *Client) DisableRule(args *DisableRuleArgs) error

DisableRule - disable the repair plat rule

PARAMS:

  • args: the arguments of disabling the repair plat rule

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) EnableRule

func (c *Client) EnableRule(args *EnableRuleArgs) error

EnableRule - enable the repair plat rule

PARAMS:

  • args: the arguments of enabling the repair plat rule

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) GetBbcStockWithDeploySet

func (c *Client) GetBbcStockWithDeploySet(args *GetBbcStockArgs) (*GetBbcStocksResult, error)

GetBbcStockWithDeploySet - get the bbc's stock with deploySet

RETURNS:

  • *GetBbcStocksResult: the result of the bbc's stock
  • error: nil if success otherwise the specific error

func (*Client) GetCommonImage

func (c *Client) GetCommonImage(args *GetFlavorImageArgs) (*GetImagesResult, error)

GetCommonImage - get common flavor image list

PARAMS:

  • cli: the client agent which can perform sending request
  • flavorIds: the specific flavorIds, can be nil

RETURNS:

  • *GetImageDetailResult: the result of get image's detail
  • error: nil if success otherwise the specific error

func (*Client) GetCustomImage

func (c *Client) GetCustomImage(args *GetFlavorImageArgs) (*GetImagesResult, error)

GetCustomImage - get user onwer flavor image list

PARAMS:

  • cli: the client agent which can perform sending request
  • flavorIds: the specific flavorIds, can be nil

RETURNS:

  • *GetImageDetailResult: the result of get image's detail
  • error: nil if success otherwise the specific error

func (*Client) GetDeploySet

func (c *Client) GetDeploySet(deploySetId string) (*DeploySetResult, error)

GetDeploySet - get details of the deploy set

PARAMS:

  • deploySetId: the id of the deploy set

RETURNS:

  • *GetDeploySetResult: the detail of the deploy set
  • error: nil if success otherwise the specific error

func (*Client) GetFlavorDetail

func (c *Client) GetFlavorDetail(flavorId string) (*GetFlavorDetailResult, error)

GetFlavorDetail - get details of the specified flavor

PARAMS:

  • flavorId: the id of the flavor

RETURNS:

  • *GetFlavorDetailResult: the detail of the specified flavor
  • error: nil if success otherwise the specific error

func (*Client) GetFlavorRaid

func (c *Client) GetFlavorRaid(flavorId string) (*GetFlavorRaidResult, error)

GetFlavorRaid - get the RAID detail and disk size of the specified flavor

PARAMS:

  • flavorId: the id of the flavor

RETURNS:

  • *GetFlavorRaidResult: the detail of the raid of the specified flavor
  • error: nil if success otherwise the specific error

func (*Client) GetImageDetail

func (c *Client) GetImageDetail(imageId string) (*GetImageDetailResult, error)

GetImageDetail - get an image's detail info

PARAMS:

  • imageId: the specific image ID

RETURNS:

  • *GetImageDetailResult: the result of get image's detail
  • error: nil if success otherwise the specific error

func (*Client) GetInstanceCreateStock

func (c *Client) GetInstanceCreateStock(args *CreateInstanceStockArgs) (*InstanceStockResult, error)

func (*Client) GetInstanceDetail

func (c *Client) GetInstanceDetail(instanceId string) (*InstanceModel, error)

GetInstanceDetail - get a specific instance detail info

PARAMS:

  • instanceId: the specific instance ID

RETURNS:

  • *GetInstanceDetailResult: the result of get instance detail info
  • error: nil if success otherwise the specific error

func (*Client) GetInstanceDetailWithDeploySet

func (c *Client) GetInstanceDetailWithDeploySet(instanceId string, isDeploySet bool) (*InstanceModel, error)

func (*Client) GetInstanceDetailWithDeploySetAndFailed

func (c *Client) GetInstanceDetailWithDeploySetAndFailed(instanceId string,
	isDeploySet bool, containsFailed bool) (*InstanceModel, error)

func (*Client) GetInstanceEni

func (c *Client) GetInstanceEni(instanceId string) (*GetInstanceEniResult, error)

func (*Client) GetInstancePirce

func (c *Client) GetInstancePirce(args *InstancePirceArgs) (*InstancePirceResult, error)

func (*Client) GetInstanceVNC

func (c *Client) GetInstanceVNC(instanceId string) (*GetInstanceVNCResult, error)

GetInstanceVNC - get an instance's VNC url

PARAMS:

  • instanceId: the specific instance ID

RETURNS:

  • *api.GetInstanceVNCResult: the result of get instance's VNC url
  • error: nil if success otherwise the specific error

func (*Client) GetOperationLog

func (c *Client) GetOperationLog(args *GetOperationLogArgs) (*GetOperationLogResult, error)

GetOperationLog - get operation log

PARAMS:

  • args: the arguments to get operation log

RETURNS:

  • *GetOperationLogResult: results of getting operation log
  • error: nil if success otherwise the specific error

func (*Client) GetRepairTaskDetail

func (c *Client) GetRepairTaskDetail(taskId string) (*GetRepairTaskResult, error)

func (*Client) GetRepairTaskRecord

func (c *Client) GetRepairTaskRecord(args *TaskIdArgs) (*GetRepairRecords, error)

func (*Client) GetRuleDetail

func (c *Client) GetRuleDetail(ruleId string) (*Rule, error)

GetRuleDetail - list the repair plat rules

PARAMS:

  • ruleId: the specified rule id

RETURNS:

  • *Rule: results of the specified repair plat rule
  • error: nil if success otherwise the specific error

func (*Client) GetSimpleFlavor

func (c *Client) GetSimpleFlavor(args *GetSimpleFlavorArgs) (*SimpleFlavorResult, error)

func (*Client) GetVpcSubnet

func (c *Client) GetVpcSubnet(args *GetVpcSubnetArgs) (*GetVpcSubnetResult, error)

GetVpcSubnet - get multi instances vpc and subnet

PARAMS:

  • args: the instanceId of bbc instances

RETURNS:

  • *GetVpcSubnetResult: result of vpc and subnet
  • error: nil if success otherwise the specific error

func (*Client) InstanceChangeSubnet

func (c *Client) InstanceChangeSubnet(args *InstanceChangeSubnetArgs) error

InstanceChangeSubnet - change an instance's subnet

PARAMS:

  • args: the arguments to change an instance's subnet

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) InstanceChangeVpc

func (c *Client) InstanceChangeVpc(args *InstanceChangeVpcArgs) error

InstanceChangeVpc - change an instance's vpc

PARAMS:

  • args: the arguments to change an instance's vpc

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) InstancePurchaseReserved

func (c *Client) InstancePurchaseReserved(instanceId string, args *PurchaseReservedArgs) error

InstancePurchaseReserved - purchase reserve an instance

PARAMS:

  • instanceId: the specific instance ID
  • args: the arguments to purchase reserved an instance

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) ListCDSVolume

func (c *Client) ListCDSVolume(queryArgs *ListCDSVolumeArgs) (*ListCDSVolumeResult, error)

ListCDSVolume - list all cds volume with the specific parameters

PARAMS:

  • args: the arguments to list all cds

RETURNS:

  • *api.ListCDSVolumeResult: the result of list all CDS volume
  • error: nil if success otherwise the specific error

func (*Client) ListClosedRepairTasks

func (c *Client) ListClosedRepairTasks(args *ListClosedRepairTaskArgs) (*ListClosedRepairTaskResult, error)

func (*Client) ListDeploySets

func (c *Client) ListDeploySets() (*ListDeploySetsResult, error)

ListDeploySets - list all deploy sets

RETURNS:

  • *ListDeploySetsResult: the result of list all deploy sets
  • error: nil if success otherwise the specific error

func (*Client) ListDeploySetsPage

func (c *Client) ListDeploySetsPage(args *ListDeploySetsArgs) (*ListDeploySetsResult, error)

ListDeploySets - list all deploy sets PARAMS:

  • args: the arguments to filter

RETURNS:

  • *ListDeploySetsResult: the result of list all deploy sets
  • error: nil if success otherwise the specific error

func (*Client) ListFlavorZones

func (c *Client) ListFlavorZones(args *ListFlavorZonesArgs) (*ListZonesResult, error)

ListFlavorZones - get the zone list of the specified flavor which can buy

PARAMS:

  • cli: the client agent which can perform sending request
  • flavorId: the id of the flavor

RETURNS:

  • *ListZonesResult: the list of zone names
  • error: nil if success otherwise the specific error

func (*Client) ListFlavors

func (c *Client) ListFlavors() (*ListFlavorsResult, error)

ListFlavors - list all available flavors

RETURNS:

  • *ListFlavorsResult: the result of list all flavors
  • error: nil if success otherwise the specific error

func (*Client) ListImage

func (c *Client) ListImage(args *ListImageArgs) (*ListImageResult, error)

ListImage - list all images

PARAMS:

  • args: the arguments to list all images

RETURNS:

  • *ListImageResult: the result of list all images
  • error: nil if success otherwise the specific error

func (*Client) ListInstances

func (c *Client) ListInstances(args *ListInstancesArgs) (*ListInstancesResult, error)

ListInstances - list all instance with the specific parameters

PARAMS:

  • args: the arguments to list all instance

RETURNS:

  • *ListInstanceResult: the result of list Instance
  • error: nil if success otherwise the specific error

func (*Client) ListRecycledInstances

func (c *Client) ListRecycledInstances(args *ListRecycledInstancesArgs) (*ListRecycledInstancesResult, error)

ListInstances - list all instance with the specific parameters

PARAMS:

  • args: the arguments to list all instance

RETURNS:

  • *ListInstanceResult: the result of list Instance
  • error: nil if success otherwise the specific error

func (*Client) ListRepairTasks

func (c *Client) ListRepairTasks(args *ListRepairTaskArgs) (*ListRepairTaskResult, error)

func (*Client) ListRule

func (c *Client) ListRule(args *ListRuleArgs) (*ListRuleResult, error)

ListRule - list the repair plat rules

PARAMS:

  • args: the arguments of listing the repair plat rules

RETURNS:

  • *ListRuleResult: results of listing the repair plat rules
  • error: nil if success otherwise the specific error

func (*Client) ListZoneFlavors

func (c *Client) ListZoneFlavors(args *ListZoneFlavorsArgs) (*ListFlavorInfosResult, error)

ListZoneFlavors - get the flavor detail of the specific zone

PARAMS:

  • cli: the client agent which can perform sending request
  • zoneName: the zone name

RETURNS:

  • *ListZoneResult: flavor detail of the specific zone
  • error: nil if success otherwise the specific error

func (*Client) ModifyInstanceDesc

func (c *Client) ModifyInstanceDesc(instanceId string, args *ModifyInstanceDescArgs) error

ModifyInstanceDesc - modify an instance's description

PARAMS:

  • instanceId: the specific instance ID
  • args: the arguments of now instance's description

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) ModifyInstanceName

func (c *Client) ModifyInstanceName(instanceId string, args *ModifyInstanceNameArgs) error

ModifyInstanceName - modify an instance's name

PARAMS:

  • instanceId: the specific instance ID
  • args: the arguments of now instance's name

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) ModifyInstancePassword

func (c *Client) ModifyInstancePassword(instanceId string, args *ModifyInstancePasswordArgs) error

ModifyInstancePassword - modify an instance's password

PARAMS:

  • instanceId: the specific instance ID
  • args: the arguments of now instance's password

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) RebootInstance

func (c *Client) RebootInstance(instanceId string, forceStop bool) error

RebootInstance - restart an instance

PARAMS:

  • instanceId: the specific instance ID
  • forceStop: choose to force stop an instance or not

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) RebuildInstance

func (c *Client) RebuildInstance(instanceId string, isPreserveData bool, args *RebuildInstanceArgs) error

RebuildInstance - rebuild an instance

PARAMS:

  • instanceId: the specific instance ID
  • isPreserveData: choose to preserve data or not
  • args: the arguments to rebuild an instance

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) RecoveryInstances

func (c *Client) RecoveryInstances(args *RecoveryInstancesArgs) error

ListInstances - list all instance with the specific parameters

PARAMS:

  • args: the arguments to list all instance

RETURNS:

  • *ListInstanceResult: the result of list Instance
  • error: nil if success otherwise the specific error

func (*Client) ShareImage

func (c *Client) ShareImage(imageId string, args *SharedUser) error

ShareImage - share an image

PARAMS:

  • imageId: the specific image ID
  • args: the arguments to share an image

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) StartInstance

func (c *Client) StartInstance(instanceId string) error

StartInstance - start an instance

PARAMS:

  • instanceId: the specific instance ID

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) StopInstance

func (c *Client) StopInstance(instanceId string, forceStop bool) error

StopInstance - stop an instance

PARAMS:

  • instanceId: the specific instance ID
  • forceStop: choose to force stop an instance or not

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) UnAuthorizeRepairTask

func (c *Client) UnAuthorizeRepairTask(args *TaskIdArgs) error

func (*Client) UnBindSecurityGroups

func (c *Client) UnBindSecurityGroups(args *UnBindSecurityGroupsArgs) error

UnBindSecurityGroups - UnBind Security Groups

PARAMS:

  • args: the arguments of bind security groups

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) UnShareImage

func (c *Client) UnShareImage(imageId string, args *SharedUser) error

UnShareImage - cancel share an image

PARAMS:

  • imageId: the specific image ID
  • args: the arguments to cancel share an image

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) UnbindTags

func (c *Client) UnbindTags(instanceId string, args *UnbindTagsArgs) error

UnbindTags - unbind an instance tags

PARAMS:

  • instanceId: the id of the instance
  • args: tags of an instance to unbind

RETURNS:

  • error: nil if success otherwise the specific error

type ClosedRepairTask

type ClosedRepairTask struct {
	TaskId     string `json:"taskId"`
	InstanceId string `json:"instanceId"`
	ErrResult  string `json:"errResult"`
	CreateTime string `json:"createTime"`
	EndTime    string `json:"endTime"`
}

type CreateDeploySetArgs

type CreateDeploySetArgs struct {
	Strategy    string `json:"strategy"`
	Concurrency int    `json:"concurrency"`
	Name        string `json:"name,omitempty"`
	Desc        string `json:"desc,omitempty"`
	ClientToken string `json:"-"`
}

type CreateDeploySetResult

type CreateDeploySetResult struct {
	DeploySetId string `json:"deploySetId"`
}

func CreateDeploySet

func CreateDeploySet(cli bce.Client, clientToken string, reqBody *bce.Body) (*CreateDeploySetResult, error)

CreateDeploySet - create a deploy set

PARAMS:

  • cli: the client agent which can perform sending request
  • clientToken: idempotent token, an ASCII string no longer than 64 bits
  • reqBody: http request body

RETURNS:

  • *CreateDeploySetResult: results of creating a deploy set
  • error: nil if success otherwise the specific error

type CreateImageArgs

type CreateImageArgs struct {
	ImageName   string `json:"imageName"`
	InstanceId  string `json:"instanceId"`
	ClientToken string `json:"-"`
}

type CreateImageResult

type CreateImageResult struct {
	ImageId string `json:"imageId"`
}

func CreateImageFromInstanceId

func CreateImageFromInstanceId(cli bce.Client, clientToken string, reqBody *bce.Body) (*CreateImageResult, error)

CreateImageFromInstanceId - create image from specified instance

PARAMS:

  • cli: the client agent which can perform sending request
  • clientToken: idempotent token, an ASCII string no longer than 64 bits
  • reqBody: http request body

RETURNS:

  • *CreateImageResult: the result of create Image
  • error: nil if success otherwise the specific error

type CreateInstanceArgs

type CreateInstanceArgs struct {
	FlavorId          string           `json:"flavorId"`
	ImageId           string           `json:"imageId"`
	RaidId            string           `json:"raidId"`
	RootDiskSizeInGb  int              `json:"rootDiskSizeInGb"`
	PurchaseCount     int              `json:"purchaseCount"`
	ZoneName          string           `json:"zoneName"`
	SubnetId          string           `json:"subnetId"`
	AutoRenewTimeUnit string           `json:"autoRenewTimeUnit,omitempty"`
	AutoRenewTime     int              `json:"autoRenewTime,omitempty"`
	Billing           Billing          `json:"billing"`
	Name              string           `json:"name,omitempty"`
	Hostname          string           `json:"hostname,omitempty"`
	AdminPass         string           `json:"adminPass,omitempty"`
	DeploySetId       string           `json:"deploySetId,omitempty"`
	ClientToken       string           `json:"-"`
	SecurityGroupId   string           `json:"securityGroupId,omitempty"`
	Tags              []model.TagModel `json:"tags,omitempty"`
	InternalIps       []string         `json:"internalIps,omitempty"`
	RequestToken      string           `json:"requestToken"`
	EnableNuma        bool             `json:"enableNuma"`
	RootPartitionType string           `json:"rootPartitionType,omitempty"`
	DataPartitionType string           `json:"dataPartitionType,omitempty"`
}

type CreateInstanceResult

type CreateInstanceResult struct {
	InstanceIds []string `json:"instanceIds"`
}

func CreateInstance

func CreateInstance(cli bce.Client, args *CreateInstanceArgs, reqBody *bce.Body) (*CreateInstanceResult,
	error)

CreateInstance - create a bbc instance

PARAMS:

  • cli: the client agent which can perform sending request
  • clientToken: idempotent token, an ASCII string no longer than 64 bits
  • reqBody: http request body

RETURNS:

  • *CreateInstanceResult: results of creating a bbc instance
  • error: nil if success otherwise the specific error

type CreateInstanceStockArgs

type CreateInstanceStockArgs struct {
	FlavorId string `json:"flavorId"`
	ZoneName string `json:"zoneName,omitempty"`
}

type CreateRuleArgs

type CreateRuleArgs struct {
	RuleName string `json:"ruleName"`
	Limit    int    `json:"limit"`
	Enabled  int    `json:"enabled"`
	TagStr   string `json:"tagStr"`
	Extra    string `json:"extra"`
}

type CreateRuleResult

type CreateRuleResult struct {
	RuleId string `json:"ruleId"`
}

func CreateRule

func CreateRule(cli bce.Client, reqBody *bce.Body) (*CreateRuleResult, error)

CreateRule - create the repair plat rule

PARAMS:

  • cli: the client agent which can perform sending request
  • reqBody: http request body

RETURNS:

  • *CreateRuleResult: results of the id of the repair plat rule which is created
  • error: nil if success otherwise the specific error

type DeleteInstanceArgs

type DeleteInstanceArgs struct {
	BbcRecycleFlag bool     `json:"bbcRecycleFlag"`
	InstanceIds    []string `json:"instanceIds"`
}

type DeleteInstanceIngorePaymentArgs

type DeleteInstanceIngorePaymentArgs struct {
	InstanceId            string `json:"instanceId"`
	RelatedReleaseFlag    bool   `json:"relatedReleaseFlag"`
	DeleteCdsSnapshotFlag bool   `json:"deleteCdsSnapshotFlag"`
	DeleteRelatedEnisFlag bool   `json:"deleteRelatedEnisFlag"`
	DeleteImmediate       bool   `json:"deleteImmediate"`
}

type DeleteInstanceModel

type DeleteInstanceModel struct {
	InstanceId string `json:"instanceId"`
	Eip        string `json:"eip"`
}

type DeleteInstanceResult

type DeleteInstanceResult struct {
	SuccessResources *DeleteInstanceModel `json:"successResources"`
	FailResources    *DeleteInstanceModel `json:"failResources"`
}

type DeleteRuleArgs

type DeleteRuleArgs struct {
	RuleId string `json:"ruleId"`
}

type DeploySetModel

type DeploySetModel struct {
	Strategy              string              `json:"strategy"`
	AzIntstanceStatisList []AzIntstanceStatis `json:"azIntstanceStatisList"`
	Name                  string              `json:"name"`
	Desc                  string              `json:"desc"`
	DeploySetId           string              `json:"deploysetId"`
	Concurrency           int                 `json:"concurrency"`
}

type DeploySetResult

type DeploySetResult struct {
	Strategy     string                    `json:"strategy"`
	Name         string                    `json:"name"`
	Desc         string                    `json:"desc"`
	DeploySetId  string                    `json:"deploySetId"`
	InstanceList []AzIntstanceStatisDetail `json:"azIntstanceStatisList"`
	Concurrency  int                       `json:"concurrency"`
}

func GetDeploySet

func GetDeploySet(cli bce.Client, deploySetId string) (*DeploySetResult, error)

GetDeploySet - get details of the deploy set

PARAMS:

  • cli: the client agent which can perform sending request
  • deploySetId: the id of the deploy set

RETURNS:

  • *GetDeploySetResult: the detail of the deploy set
  • error: nil if success otherwise the specific error

type DisableRuleArgs

type DisableRuleArgs struct {
	RuleId string `json:"ruleId"`
}

type DisconfirmTaskArgs

type DisconfirmTaskArgs struct {
	TaskId       string `json:"taskId"`
	NewErrResult string `json:"newErrResult"`
}

type DiskInfo

type DiskInfo struct {
	Raid           string  `json:"raid"`
	Description    string  `json:"description"`
	DataDiskName   string  `json:"dataDiskName"`
	RaidDisplay    string  `json:"raidDisplay"`
	SysAndHomeSize float64 `json:"sysAndHomeSize"`
	DataDiskSize   float64 `json:"dataDiskSize"`
	RaidId         string  `json:"raidId"`
}

type EnableRuleArgs

type EnableRuleArgs struct {
	RuleId string `json:"ruleId"`
}

type FlavorImageModel

type FlavorImageModel struct {
	FlavorId string       `json:"flavorId"`
	Images   []ImageModel `json:"images"`
}

type FlavorModel

type FlavorModel struct {
	FlavorId           string `json:"flavorID"`
	CpuCount           int    `json:"cpuCount"`
	CpuType            string `json:"cpuType"`
	MemoryCapacityInGB int    `json:"memoryCapacityInGb"`
	Disk               string `json:"disk"`
	NetworkCard        string `json:"networkCard"`
	Others             string `json:"others"`
}

type GetBbcStockArgs

type GetBbcStockArgs struct {
	Flavor       string   `json:"flavor"`
	DeploySetIds []string `json:"deploySetIds"`
}

type GetBbcStocksResult

type GetBbcStocksResult struct {
	BbcStocks []BbcStock `json:"bbcStocks"`
}

func GetStockWithDeploySet

func GetStockWithDeploySet(cli bce.Client, args *GetBbcStockArgs) (*GetBbcStocksResult, error)

GetStockWithDeploySet - get the bbc's stock with deploySet

PARAMS:

  • cli: the client agent which can perform sending request
  • args: the arguments to get the bbc's stock with deploySet

RETURNS:

  • *GetBbcStocksResult: the result of the bbc's stock
  • error: nil if success otherwise the specific error

type GetDeploySetResult

type GetDeploySetResult struct {
	DeploySetModel
}

type GetFlavorDetailResult

type GetFlavorDetailResult struct {
	FlavorModel
}

func GetFlavorDetail

func GetFlavorDetail(cli bce.Client, flavorId string) (*GetFlavorDetailResult, error)

GetFlavorDetail - get details of the specified flavor

PARAMS:

  • cli: the client agent which can perform sending request
  • flavorId: the id of the flavor

RETURNS:

  • *GetFlavorDetailResult: the detail of the specified flavor
  • error: nil if success otherwise the specific error

type GetFlavorImageArgs

type GetFlavorImageArgs struct {
	FlavorIds   []string `json:"flavorIds"`
	ClientToken string   `json:"-"`
}

type GetFlavorRaidResult

type GetFlavorRaidResult struct {
	FlavorId string      `json:"flavorId"`
	Raids    []RaidModel `json:"raids"`
}

func GetFlavorRaid

func GetFlavorRaid(cli bce.Client, flavorId string) (*GetFlavorRaidResult, error)

GetFlavorRaid - get the RAID detail and disk size of the specified flavor

PARAMS:

  • cli: the client agent which can perform sending request
  • flavorId: the id of the flavor

RETURNS:

  • *GetFlavorRaidResult: the detail of the raid of the specified flavor
  • error: nil if success otherwise the specific error

type GetImageDetailResult

type GetImageDetailResult struct {
	Result *ImageModel `json:"image"`
}

func GetImageDetail

func GetImageDetail(cli bce.Client, imageId string) (*GetImageDetailResult, error)

GetImageDetail - get an image's detail info

PARAMS:

  • cli: the client agent which can perform sending request
  • imageId: the specific image ID

RETURNS:

  • *GetImageDetailResult: the result of get image's detail
  • error: nil if success otherwise the specific error

type GetImagesResult

type GetImagesResult struct {
	Result []FlavorImageModel `json:"result"`
}

func GetCommonImage

func GetCommonImage(cli bce.Client, reqBody *bce.Body) (*GetImagesResult, error)

GetCommonImage - get common flavor image list

PARAMS:

  • cli: the client agent which can perform sending request
  • flavorIds: the specific flavorIds, can be nil

RETURNS:

  • *GetImageDetailResult: the result of get image's detail
  • error: nil if success otherwise the specific error

func GetCustomImage

func GetCustomImage(cli bce.Client, reqBody *bce.Body) (*GetImagesResult, error)

GetCustomImage - get user onwer flavor image list

PARAMS:

  • cli: the client agent which can perform sending request
  • flavorIds: the specific flavorIds, can be nil

RETURNS:

  • *GetImageDetailResult: the result of get image's detail
  • error: nil if success otherwise the specific error

type GetInstanceEniResult

type GetInstanceEniResult struct {
	Id           string      `json:"eniId"`
	Name         string      `json:"name"`
	ZoneName     string      `json:"zoneName"`
	Description  string      `json:"description"`
	InstanceId   string      `json:"instanceId"`
	MacAddress   string      `json:"macAddress"`
	VpcId        string      `json:"vpcId"`
	SubnetId     string      `json:"subnetId"`
	Status       string      `json:"status"`
	PrivateIpSet []PrivateIP `json:"privateIpSet"`
}

func GetInstanceEni

func GetInstanceEni(cli bce.Client, instanceId string) (*GetInstanceEniResult, error)

GetInstanceEni - get the eni of the bbc instance

PARAMS:

  • cli: the client agent which can perform sending request
  • instanceId: the bbc instance id

RETURNS:

  • error: nil if success otherwise the specific error

type GetInstanceVNCResult

type GetInstanceVNCResult struct {
	VNCUrl string `json:"vncUrl"`
}

func GetInstanceVNC

func GetInstanceVNC(cli bce.Client, instanceId string) (*GetInstanceVNCResult, error)

GetInstanceVNC - get VNC address of the specified instance

PARAMS:

  • cli: the client agent which can perform sending request
  • instanceId: id of the instance

RETURNS:

  • *GetInstanceVNCResult: result of the VNC address of the instance
  • error: nil if success otherwise the specific error

type GetOperationLogArgs

type GetOperationLogArgs struct {
	Marker    string
	MaxKeys   int
	StartTime string
	EndTime   string
}

type GetOperationLogResult

type GetOperationLogResult struct {
	Marker        string              `json:"marker"`
	IsTruncated   bool                `json:"isTruncated"`
	NextMarker    string              `json:"nextMarker"`
	MaxKeys       int                 `json:"maxKeys"`
	OperationLogs []OperationLogModel `json:"operationLogs"`
}

func GetOperationLog

func GetOperationLog(cli bce.Client, args *GetOperationLogArgs) (*GetOperationLogResult, error)

GetOperationLog - get operation log

PARAMS:

  • cli: the client agent which can perform sending request
  • args: the arguments to get operation log

RETURNS:

  • *GetOperationLogResult: results of getting operation log
  • error: nil if success otherwise the specific error

type GetRepairRecords

type GetRepairRecords struct {
	RepairRecords []RepairRecord `json:"RepairRecord"`
}

func GetRepairTaskReocrd

func GetRepairTaskReocrd(cli bce.Client, reqBody *bce.Body) (*GetRepairRecords, error)

type GetRepairTaskResult

type GetRepairTaskResult struct {
	TaskId       string `json:"taskId"`
	InstanceId   string `json:"instanceId"`
	InstanceName string `json:"instanceName"`
	ErrResult    string `json:"errResult"`
	Status       string `json:"status"`
	ServerStatus string `json:"serverStatus"`
	Region       string `json:"region"`
	InternalIp   string `json:"internalIp"`
	FloatingIp   string `json:"floatingIp"`
}

func GetTaskDetail

func GetTaskDetail(cli bce.Client, instanceId string) (*GetRepairTaskResult, error)

type GetSimpleFlavorArgs

type GetSimpleFlavorArgs struct {
	InstanceIds []string `json:"instanceIds"`
}

type GetVpcSubnetArgs

type GetVpcSubnetArgs struct {
	BbcIds []string `json:"bbcIds"`
}

type GetVpcSubnetResult

type GetVpcSubnetResult struct {
	NetworkInfo []BbcNetworkModel `json:"networkInfo"`
}

func GetVpcSubnet

func GetVpcSubnet(cli bce.Client, reqBody *bce.Body) (*GetVpcSubnetResult, error)

GetVpcSubnet - get multi instances vpc and subnet

PARAMS:

  • cli: the client agent which can perform sending request
  • reqBody: http request body

RETURNS:

  • *GetVpcSubnetResult: result of vpc and subnet
  • error: nil if success otherwise the specific error

type ImageModel

type ImageModel struct {
	OsVersion      string      `json:"osVersion"`
	OsArch         string      `json:"osArch"`
	Status         ImageStatus `json:"status"`
	Desc           string      `json:"desc"`
	Id             string      `json:"id"`
	Name           string      `json:"name"`
	OsName         string      `json:"osName"`
	OsBuild        string      `json:"osBuild"`
	CreateTime     string      `json:"createTime"`
	Type           ImageType   `json:"type"`
	OsType         string      `json:"osType"`
	SpecialVersion string      `json:"specialVersion"`
}

type ImageStatus

type ImageStatus string
const (
	ImageStatusCreating     ImageStatus = "Creating"
	ImageStatusCreateFailed ImageStatus = "CreateFailed"
	ImageStatusAvailable    ImageStatus = "Available"
	ImageStatusNotAvailable ImageStatus = "NotAvailable"
	ImageStatusError        ImageStatus = "Error"
)

type ImageType

type ImageType string
const (
	ImageTypeIntegration ImageType = "Integration"
	ImageTypeSystem      ImageType = "System"
	ImageTypeCustom      ImageType = "Custom"
)

type InstanceChangeSubnetArgs

type InstanceChangeSubnetArgs struct {
	InstanceId string `json:"instanceId"`
	SubnetId   string `json:"subnetId"`
	InternalIp string `json:"internalIp"`
	Reboot     bool   `json:"reboot"`
}

type InstanceChangeVpcArgs

type InstanceChangeVpcArgs struct {
	InstanceId string `json:"instanceId"`
	SubnetId   string `json:"subnetId"`
	InternalIp string `json:"internalIp"`
	Reboot     bool   `json:"reboot"`
}

type InstanceModel

type InstanceModel struct {
	Id                    string           `json:"id"`
	Name                  string           `json:"name"`
	Hostname              string           `json:"hostname"`
	Uuid                  string           `json:"uuid"`
	Desc                  string           `json:"desc"`
	Status                InstanceStatus   `json:"status"`
	PaymentTiming         string           `json:"paymentTiming"`
	CreateTime            string           `json:"createTime"`
	ExpireTime            string           `json:"expireTime"`
	PublicIp              string           `json:"publicIp"`
	InternalIp            string           `json:"internalIp"`
	RdmaIp                string           `json:"rdmaIp"`
	ImageId               string           `json:"imageId"`
	FlavorId              string           `json:"flavorId"`
	Zone                  string           `json:"zone"`
	Region                string           `json:"region"`
	HasAlive              int              `json:"hasAlive"`
	Tags                  []model.TagModel `json:"tags"`
	SwitchId              string           `json:"switchId"`
	HostId                string           `json:"hostId"`
	DeploysetId           string           `json:"deploysetId"`
	NetworkCapacityInMbps int              `json:"networkCapacityInMbps"`
	RackId                string           `json:"rackId"`
}

func GetInstanceDetail

func GetInstanceDetail(cli bce.Client, instanceId string) (*InstanceModel, error)

func GetInstanceDetailWithDeploySet

func GetInstanceDetailWithDeploySet(cli bce.Client, instanceId string, isDeploySet bool) (*InstanceModel, error)

GetInstanceDetail - get a bbc instance detail msg

PARAMS:

  • cli: the client agent which can perform sending request
  • instanceId: the id of the instance

RETURNS:

  • *InstanceModel: instance detail msg
  • error: nil if success otherwise the specific error

func GetInstanceDetailWithDeploySetAndFailed

func GetInstanceDetailWithDeploySetAndFailed(cli bce.Client, instanceId string,
	isDeploySet bool, containsFailed bool) (*InstanceModel, error)

GetInstanceDetail - get a bbc instance detail msg

PARAMS:

  • cli: the client agent which can perform sending request
  • instanceId: the id of the instance

RETURNS:

  • *InstanceModel: instance detail msg
  • error: nil if success otherwise the specific error

type InstancePirceArgs

type InstancePirceArgs struct {
	FlaovrId      string  `json:"flavorId"`
	PurchaseCount int     `json:"purchaseCount"`
	Billing       Billing `json:"billing"`
}

type InstancePirceResult

type InstancePirceResult struct {
	Pirce string `json:"price"`
}

func GetInstancePirce

func GetInstancePirce(cli bce.Client, args *InstancePirceArgs) (*InstancePirceResult, error)

type InstanceStatus

type InstanceStatus string
const (
	InstanceStatusRunning             InstanceStatus = "Running"
	InstanceStatusStarting            InstanceStatus = "Starting"
	InstanceStatusStopping            InstanceStatus = "Stopping"
	InstanceStatusStopped             InstanceStatus = "Stopped"
	InstanceStatusDeleted             InstanceStatus = "Deleted"
	InstanceStatusExpired             InstanceStatus = "Expired"
	InstanceStatusError               InstanceStatus = "Error"
	InstanceStatusImageProcessing     InstanceStatus = "ImageProcessing"
	InstanceStatusChangeVpcProcessing InstanceStatus = "ChangeVpc"
	InstanceStatusRecycled            InstanceStatus = "Recycled"
	InstanceStatusRecharging          InstanceStatus = "Recharging"
)

type InstanceStockResult

type InstanceStockResult struct {
	FlaovrId string `json:"flavorId"`
	Count    int    `json:"Count"`
}

func GetInstanceCreateStock

func GetInstanceCreateStock(cli bce.Client, args *CreateInstanceStockArgs) (*InstanceStockResult, error)

type IpAndSubnet

type IpAndSubnet struct {
	PrivateIp string `json:"privateIp"`
	SubnetId  string `json:"subnetId"`
}

type ListCDSVolumeArgs

type ListCDSVolumeArgs struct {
	MaxKeys    int
	InstanceId string
	ZoneName   string
	Marker     string
}

type ListCDSVolumeResult

type ListCDSVolumeResult struct {
	Marker      string        `json:"marker"`
	IsTruncated bool          `json:"isTruncated"`
	NextMarker  string        `json:"nextMarker"`
	MaxKeys     int           `json:"maxKeys"`
	Volumes     []VolumeModel `json:"volumes"`
}

func ListCDSVolume

func ListCDSVolume(cli bce.Client, queryArgs *ListCDSVolumeArgs) (*ListCDSVolumeResult, error)

ListCDSVolume - list all cds volumes with the given parameters

PARAMS:

  • cli: the client agent which can perform sending request
  • queryArgs: the optional arguments to list cds volumes

RETURNS:

  • *ListCDSVolumeResult: the result of cds volume list
  • error: nil if success otherwise the specific error

type ListClosedRepairTaskArgs

type ListClosedRepairTaskArgs struct {
	Marker     string `json:"marker"`
	MaxKeys    int    `json:"MaxKeys"`
	ErrResult  string `json:"errResult"`
	InstanceId string `json:"instanceId"`
	TaskId     string `json:"taskId"`
	StartTime  string `json:"startTime"`
	EndTime    string `json:"endTime"`
}

type ListClosedRepairTaskResult

type ListClosedRepairTaskResult struct {
	Marker      string             `json:"marker"`
	IsTruncated bool               `json:"isTruncated"`
	NextMarker  string             `json:"nextMarker"`
	MaxKeys     int                `json:"maxKeys"`
	RepairTasks []ClosedRepairTask `json:"RepairTask"`
}

type ListDeploySetsArgs

type ListDeploySetsArgs struct {
	Marker   string `json:"marker"`
	MaxKeys  int    `json:"MaxKeys"`
	Strategy string `json:"strategy"`
}

type ListDeploySetsResult

type ListDeploySetsResult struct {
	Marker        string           `json:"marker"`
	IsTruncated   bool             `json:"isTruncated"`
	NextMarker    string           `json:"nextMarker"`
	MaxKeys       int              `json:"maxKeys"`
	DeploySetList []DeploySetModel `json:"deploySetList"`
}

func ListDeploySets

func ListDeploySets(cli bce.Client) (*ListDeploySetsResult, error)

ListDeploySets - list all deploy sets PARAMS:

  • cli: the client agent which can perform sending request

RETURNS:

  • *ListDeploySetsResult: the result of list all deploy sets
  • error: nil if success otherwise the specific error

func ListDeploySetsPage

func ListDeploySetsPage(cli bce.Client, args *ListDeploySetsArgs) (*ListDeploySetsResult, error)

ListDeploySets - list all deploy sets PARAMS:

  • cli: the client agent which can perform sending request
  • args: the filter of deployset

RETURNS:

  • *ListDeploySetsResult: the result of list all deploy sets
  • error: nil if success otherwise the specific error

type ListFlavorInfosResult

type ListFlavorInfosResult struct {
	BbcFlavorInfoList []BbcFlavorInfo `json:"bbcFlavorInfoList"`
}

func ListZoneFlavors

func ListZoneFlavors(cli bce.Client, reqBody *bce.Body) (*ListFlavorInfosResult, error)

ListZoneFlavors - get the flavor detail of the specific zone

PARAMS:

  • cli: the client agent which can perform sending request
  • zoneName: the zone name

RETURNS:

  • *ListZoneResult: flavor detail of the specific zone
  • error: nil if success otherwise the specific error

type ListFlavorZonesArgs

type ListFlavorZonesArgs struct {
	FlavorId    string            `json:"flavorId"`
	ProductType PaymentTimingType `json:"productType"`
}

type ListFlavorsResult

type ListFlavorsResult struct {
	Flavors []FlavorModel `json:"flavors"`
}

func ListFlavors

func ListFlavors(cli bce.Client) (*ListFlavorsResult, error)

ListFlavors - list all available flavors

PARAMS:

  • cli: the client agent which can perform sending request

RETURNS:

  • *ListFlavorsResult: the result of list all flavors
  • error: nil if success otherwise the specific error

type ListImageArgs

type ListImageArgs struct {
	Marker    string
	MaxKeys   int
	ImageType string
}

type ListImageResult

type ListImageResult struct {
	Marker      string       `json:"marker"`
	IsTruncated bool         `json:"isTruncated"`
	NextMarker  string       `json:"nextMarker"`
	MaxKeys     int          `json:"maxKeys"`
	Images      []ImageModel `json:"images"`
}

func ListImage

func ListImage(cli bce.Client, queryArgs *ListImageArgs) (*ListImageResult, error)

ListImage - list all images

PARAMS:

  • cli: the client agent which can perform sending request
  • args: the arguments to list all images

RETURNS:

  • *ListImageResult: the result of list all images
  • error: nil if success otherwise the specific error

type ListInstancesArgs

type ListInstancesArgs struct {
	Marker     string
	MaxKeys    int
	InternalIp string
	VpcId      string `json:"vpcId"`
}

type ListInstancesResult

type ListInstancesResult struct {
	Marker      string          `json:"marker"`
	IsTruncated bool            `json:"isTruncated"`
	NextMarker  string          `json:"nextMarker"`
	MaxKeys     int             `json:"maxKeys"`
	Instances   []InstanceModel `json:"instances"`
}

func ListInstances

func ListInstances(cli bce.Client, args *ListInstancesArgs) (*ListInstancesResult, error)

ListInstances - list all bbc instances

PARAMS:

  • cli: the client agent which can perform sending request
  • args: the arguments to list bbc instances

RETURNS:

  • *ListInstanceResult: results of list bbc instances
  • error: nil if success otherwise the specific error

type ListRecycledInstancesArgs

type ListRecycledInstancesArgs struct {
	Marker        string `json:"marker,omitempty"`
	MaxKeys       int    `json:"maxKeys,omitempty"`
	InstanceId    string `json:"instanceId,omitempty"`
	Name          string `json:"name,omitempty"`
	PaymentTiming string `json:"paymentTiming,omitempty"`
	RecycleBegin  string `json:"recycleBegin,omitempty"`
	RecycleEnd    string `json:"recycleEnd,omitempty"`
}

type ListRecycledInstancesResult

type ListRecycledInstancesResult struct {
	Marker            string                   `json:"marker"`
	IsTruncated       bool                     `json:"isTruncated"`
	NextMarker        string                   `json:"nextMarker"`
	MaxKeys           int                      `json:"maxKeys"`
	RecycledInstances []RecycledInstancesModel `json:"instances"`
}

func ListRecycledInstances

func ListRecycledInstances(cli bce.Client, reqBody *bce.Body) (*ListRecycledInstancesResult, error)

ListInstances - list all bbc instances

PARAMS:

  • cli: the client agent which can perform sending request
  • args: the arguments to list bbc instances

RETURNS:

  • *ListInstanceResult: results of list bbc instances
  • error: nil if success otherwise the specific error

type ListRepairTaskArgs

type ListRepairTaskArgs struct {
	Marker     string `json:"marker"`
	MaxKeys    int    `json:"MaxKeys"`
	ErrResult  string `json:"errResult"`
	InstanceId string `json:"instanceId"`
}

type ListRepairTaskResult

type ListRepairTaskResult struct {
	Marker      string       `json:"marker"`
	IsTruncated bool         `json:"isTruncated"`
	NextMarker  string       `json:"nextMarker"`
	MaxKeys     int          `json:"maxKeys"`
	RepairTasks []RepairTask `json:"RepairTask"`
}

func ListRepairTasks

func ListRepairTasks(cli bce.Client, args *ListRepairTaskArgs) (*ListRepairTaskResult, error)

type ListRuleArgs

type ListRuleArgs struct {
	Marker   string `json:"marker"`
	MaxKeys  int    `json:"maxKeys"`
	RuleName string `json:"ruleName"`
	RuleId   string `json:"ruleId"`
}

type ListRuleResult

type ListRuleResult struct {
	Marker      string `json:"marker"`
	IsTruncated bool   `json:"isTruncated"`
	NextMarker  string `json:"nextMarker"`
	MaxKeys     int    `json:"maxKeys"`
	RuleList    []Rule `json:"RuleList"`
}

func ListRule

func ListRule(cli bce.Client, reqBody *bce.Body) (*ListRuleResult, error)

ListRule - list the repair plat rules

PARAMS:

  • cli: the client agent which can perform sending request
  • reqBody: http request body

RETURNS:

  • *ListRuleResult: results of listing the repair plat rules
  • error: nil if success otherwise the specific error

type ListZoneFlavorsArgs

type ListZoneFlavorsArgs struct {
	ZoneName    string            `json:"zoneName"`
	ProductType PaymentTimingType `json:"productType"`
}

type ListZonesResult

type ListZonesResult struct {
	ZoneNames []string `json:"zoneNames"`
}

func ListFlavorZones

func ListFlavorZones(cli bce.Client, reqBody *bce.Body) (*ListZonesResult, error)

ListFlavorZones - get the zone list of the specified flavor which can buy

PARAMS:

  • cli: the client agent which can perform sending request
  • flavorId: the id of the flavor

RETURNS:

  • *ListZonesResult: the list of zone names
  • error: nil if success otherwise the specific error

type ModifyInstanceDescArgs

type ModifyInstanceDescArgs struct {
	Description string `json:"desc"`
	ClientToken string `json:"clientToken"`
}

type ModifyInstanceHostnameArgs

type ModifyInstanceHostnameArgs struct {
	Hostname string `json:"hostname"`
	Reboot   bool   `json:"reboot"`
}

type ModifyInstanceNameArgs

type ModifyInstanceNameArgs struct {
	Name string `json:"name"`
}

type ModifyInstancePasswordArgs

type ModifyInstancePasswordArgs struct {
	AdminPass string `json:"adminPass"`
}

type OperationLogModel

type OperationLogModel struct {
	OperationStatus bool   `json:"operationStatus"`
	OperationTime   string `json:"operationTime"`
	OperationDesc   string `json:"operationDesc"`
	OperationIp     string `json:"operationIp"`
}

type PaymentTimingType

type PaymentTimingType string
const (
	PaymentTimingPrePaid  PaymentTimingType = "Prepaid"
	PaymentTimingPostPaid PaymentTimingType = "Postpaid"
)

type PrivateIP

type PrivateIP struct {
	PublicIpAddress  string `json:"publicIpAddress"`
	Primary          bool   `json:"primary"`
	PrivateIpAddress string `json:"privateIpAddress"`
	Ipv6Address      string `json:"ipv6Address"`
	SubnetId         string `json:"subnetId"`
}

type PurchaseReservedArgs

type PurchaseReservedArgs struct {
	Billing     Billing `json:"billing"`
	ClientToken string  `json:"-"`
}

type RaidModel

type RaidModel struct {
	RaidId       string  `json:"raidId"`
	Raid         string  `json:"raid"`
	SysSwapSize  int     `json:"sysSwapSize"`
	SysRootSize  int     `json:"sysRootSize"`
	SysHomeSize  int     `json:"sysHomeSize"`
	SysDiskSize  int     `json:"sysDiskSize"`
	DataDiskSize float64 `json:"dataDiskSize"`
}

type RebuildBatchInstanceArgs

type RebuildBatchInstanceArgs struct {
	InstanceIds    []string `json:"instanceIds"`
	ImageId        string   `json:"imageId"`
	AdminPass      string   `json:"adminPass"`
	IsPreserveData bool     `json:"isPreserveData"`
	RaidId         string   `json:"raidId,omitempty"`
	SysRootSize    int      `json:"sysRootSize,omitempty"`
}

type RebuildInstanceArgs

type RebuildInstanceArgs struct {
	ImageId        string `json:"imageId"`
	AdminPass      string `json:"adminPass"`
	IsPreserveData bool   `json:"isPreserveData"`
	RaidId         string `json:"raidId,omitempty"`
	SysRootSize    int    `json:"sysRootSize,omitempty"`
}

type RecoveryInstancesArgs

type RecoveryInstancesArgs struct {
	InstanceIds []string `json:"instanceIds"`
}

type RecycledInstancesModel

type RecycledInstancesModel struct {
	ServiceType   string   `json:"serviceType"`
	ServiceName   string   `json:"serviceName"`
	Name          string   `json:"name"`
	Id            string   `json:"id"`
	SerialNumber  string   `json:"serialNumber"`
	RecycleTime   string   `json:"recycleTime"`
	DeleteTime    string   `json:"deleteTime"`
	PaymentTiming string   `json:"paymentTiming"`
	ConfigItems   []string `json:"configItems"`
}

type RepairRecord

type RepairRecord struct {
	Name        string `json:"name"`
	Operator    string `json:"operator"`
	OperateTime string `json:"operateTime"`
}

type RepairTask

type RepairTask struct {
	TaskId     string `json:"taskId"`
	InstanceId string `json:"instanceId"`
	ErrResult  string `json:"errResult"`
	Status     string `json:"status"`
}

type Reservation

type Reservation struct {
	Length   int    `json:"reservationLength"`
	TimeUnit string `json:"reservationTimeUnit"`
}

type Rule

type Rule struct {
	RuleId           string           `json:"ruleId"`
	RuleName         string           `json:"ruleName"`
	TagCount         int              `json:"tagCount"`
	AssociateBbcNum  int              `json:"associateBbcNum"`
	ErrorBbcNum      int              `json:"errorBbcNum"`
	ErrResult        string           `json:"errResult"`
	Limit            int              `json:"limit"`
	Status           string           `json:"status"`
	AssociateBbcList []string         `json:"associateBbcList"`
	Tags             []model.TagModel `json:"tags"`
}

func GetRuleDetail

func GetRuleDetail(cli bce.Client, ruleId string) (*Rule, error)

GetRuleDetail - get the repair plat rule detail

PARAMS:

  • cli: the client agent which can perform sending request
  • ruleId: the specified rule id

RETURNS:

  • *Rule: results of listing the repair plat rules
  • error: nil if success otherwise the specific error

type SharedUser

type SharedUser struct {
	AccountId string `json:"accountId,omitempty"`
	Account   string `json:"account,omitempty"`
}

type SimpleFlavorModel

type SimpleFlavorModel struct {
	GpuCard         string `json:"gpuCard"`
	DiskDescription string `json:"diskDescription"`
	InstanceId      string `json:"instanceId"`
	MemDescription  string `json:"memDescription"`
	NicDescription  string `json:"nicDescription"`
	RamType         string `json:"ramType"`
	RamRate         string `json:"ramRate"`
	CpuDescription  string `json:"cpuDescription"`
	RaidDescription string `json:"raidDescription"`
}

type SimpleFlavorResult

type SimpleFlavorResult struct {
	SimpleFlavorModel []SimpleFlavorModel `json:"flavorInfo"`
}

func GetSimpleFlavor

func GetSimpleFlavor(cli bce.Client, args *GetSimpleFlavorArgs) (*SimpleFlavorResult, error)

type SingleEniAndSubentIp

type SingleEniAndSubentIp struct {
	EniId                          string        `json:"eniId"`
	SubnetId                       string        `json:"subnetId"`
	SecondaryPrivateIpAddressCount int           `json:"secondaryPrivateIpAddressCount"`
	IpAndSubnets                   []IpAndSubnet `json:"ipAndSubnets"`
}

type StopInstanceArgs

type StopInstanceArgs struct {
	ForceStop bool `json:"forceStop,omitempty"`
}

type StorageType

type StorageType string
const (
	StorageTypeStd1          StorageType = "std1"
	StorageTypeHP1           StorageType = "hp1"
	StorageTypeCloudHP1      StorageType = "cloud_hp1"
	StorageTypeLocal         StorageType = "local"
	StorageTypeSATA          StorageType = "sata"
	StorageTypeSSD           StorageType = "ssd"
	StorageTypeHDDThroughput StorageType = "HDD_Throughput"
	StorageTypeHdd           StorageType = "hdd"
)

type SubnetModel

type SubnetModel struct {
	VpcId      string `json:"vpcId"`
	Name       string `json:"name"`
	SubnetType string `json:"subnetType"`
	SubnetId   string `json:"subnetId"`
	Cidr       string `json:"cidr"`
	ZoneName   string `json:"zoneName"`
}

type TaskIdArgs

type TaskIdArgs struct {
	TaskId string `json:"taskId"`
}

type UnBindSecurityGroupsArgs

type UnBindSecurityGroupsArgs struct {
	InstanceId      string `json:"instanceId"`
	SecurityGroupId string `json:"securityGroupId"`
}

type UnbindTagsArgs

type UnbindTagsArgs struct {
	ChangeTags []model.TagModel `json:"changeTags"`
}

type VolumeAttachmentModel

type VolumeAttachmentModel struct {
	VolumeId   string `json:"volumeId"`
	InstanceId string `json:"instanceId"`
	Device     string `json:"device"`
	Serial     string `json:"serial"`
}

type VolumeModel

type VolumeModel struct {
	Type               VolumeType               `json:"type"`
	StorageType        StorageType              `json:"storageType"`
	Id                 string                   `json:"id"`
	Name               string                   `json:"name"`
	DiskSizeInGB       int                      `json:"diskSizeInGB"`
	PaymentTiming      string                   `json:"paymentTiming"`
	ExpireTime         string                   `json:"expireTime"`
	Status             VolumeStatus             `json:"status"`
	Desc               string                   `json:"desc"`
	Attachments        []VolumeAttachmentModel  `json:"attachments"`
	ZoneName           string                   `json:"zoneName"`
	AutoSnapshotPolicy *AutoSnapshotPolicyModel `json:"autoSnapshotPolicy"`
	CreateTime         string                   `json:"createTime"`
	IsSystemVolume     bool                     `json:"isSystemVolume"`
	RegionId           string                   `json:"regionId"`
	SourceSnapshotId   string                   `json:"sourceSnapshotId"`
	SnapshotNum        string                   `json:"snapshotNum"`
	Tags               []model.TagModel         `json:"tags"`
	Encrypted          bool                     `json:"encrypted"`
}

type VolumeStatus

type VolumeStatus string
const (
	VolumeStatusAVAILABLE          VolumeStatus = "Available"
	VolumeStatusINUSE              VolumeStatus = "InUse"
	VolumeStatusSNAPSHOTPROCESSING VolumeStatus = "SnapshotProcessing"
	VolumeStatusRECHARGING         VolumeStatus = "Recharging"
	VolumeStatusDETACHING          VolumeStatus = "Detaching"
	VolumeStatusDELETING           VolumeStatus = "Deleting"
	VolumeStatusEXPIRED            VolumeStatus = "Expired"
	VolumeStatusNOTAVAILABLE       VolumeStatus = "NotAvailable"
	VolumeStatusDELETED            VolumeStatus = "Deleted"
	VolumeStatusSCALING            VolumeStatus = "Scaling"
	VolumeStatusIMAGEPROCESSING    VolumeStatus = "ImageProcessing"
	VolumeStatusCREATING           VolumeStatus = "Creating"
	VolumeStatusATTACHING          VolumeStatus = "Attaching"
	VolumeStatusERROR              VolumeStatus = "Error"
)

type VolumeType

type VolumeType string
const (
	VolumeTypeSYSTEM    VolumeType = "System"
	VolumeTypeEPHEMERAL VolumeType = "Ephemeral"
	VolumeTypeCDS       VolumeType = "Cds"
)

type VpcModel

type VpcModel struct {
	VpcId       string `json:"vpcId"`
	Cidr        string `json:"cidr"`
	Name        string `json:"name"`
	IsDefault   bool   `json:"isDefault"`
	Description string `json:"description"`
}

Jump to

Keyboard shortcuts

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