Versions in this module Expand all Collapse all v0 v0.9.22 Sep 16, 2020 Changes in this version + const REQUEST_BATCHADDIP_URI + const REQUEST_BATCHDELIP_URI + const REQUEST_BATCH_CREATE_AUTORENEW_RULES_URI + const REQUEST_BATCH_Delete_AUTORENEW_RULES_URI + const REQUEST_COMMON_IMAGE_URI + const REQUEST_CREATE_URI + const REQUEST_CUSTOM_IMAGE_URI + const REQUEST_DELETE_URI + const REQUEST_DEPLOY_SET_URI + const REQUEST_DISABLE_URI + const REQUEST_ENABLE_URI + const REQUEST_FLAVORS_URI + const REQUEST_FLAVOR_RAID_URI + const REQUEST_FLAVOR_URI + const REQUEST_FLAVOR_ZONE_URI + const REQUEST_IMAGE_URI + const REQUEST_INSTANCE_PORT_URI + const REQUEST_INSTANCE_URI + const REQUEST_OPERATION_LOG_URI + const REQUEST_REPAIR_CLOSED_TASK_URI + const REQUEST_REPAIR_TASK_URI + const REQUEST_RULE_URI + const REQUEST_SUBNET_URI + const SECURITY_GROUP_URI + const URI_PREFIX_V1 + const URI_PREFIX_V2 + func Aes128EncryptUseSecreteKey(sk string, data string) (string, error) + func AuthorizeRepairTask(cli bce.Client, reqBody *bce.Body) error + func BatchCreateAutoRenewRules(cli bce.Client, reqBody *bce.Body) error + func BatchDelIp(cli bce.Client, reqBody *bce.Body) error + func BatchDeleteAutoRenewRules(cli bce.Client, reqBody *bce.Body) error + func BindSecurityGroups(cli bce.Client, reqBody *bce.Body) error + func BindTags(cli bce.Client, instanceId string, reqBody *bce.Body) error + func ConfirmRepairTask(cli bce.Client, reqBody *bce.Body) error + func DeleteDeploySet(cli bce.Client, deploySetId string) error + func DeleteImage(cli bce.Client, imageId string) error + func DeleteInstance(cli bce.Client, instanceId string) error + func DeleteRule(cli bce.Client, reqBody *bce.Body) error + func DisConfirmRepairTask(cli bce.Client, reqBody *bce.Body) error + func DisableRule(cli bce.Client, reqBody *bce.Body) error + func EnableRule(cli bce.Client, reqBody *bce.Body) error + func ModifyInstanceDesc(cli bce.Client, instanceId string, reqBody *bce.Body) error + func ModifyInstanceName(cli bce.Client, instanceId string, reqBody *bce.Body) error + func ModifyInstancePassword(cli bce.Client, instanceId string, reqBody *bce.Body) error + func RebootInstance(cli bce.Client, instanceId string, reqBody *bce.Body) error + func RebuildInstance(cli bce.Client, instanceId string, reqBody *bce.Body) error + func StartInstance(cli bce.Client, instanceId string) error + func StopInstance(cli bce.Client, instanceId string, reqBody *bce.Body) error + func UnAuthorizeRepairTask(cli bce.Client, reqBody *bce.Body) error + func UnBindSecurityGroups(cli bce.Client, reqBody *bce.Body) error + func UnbindTags(cli bce.Client, instanceId string, reqBody *bce.Body) error + type AzIntstanceStatis struct + Count int + Total int + ZoneName string + type AzIntstanceStatisDetail struct + Count int + InstanceIds []string + Total int + ZoneName string + type BatchAddIpArgs struct + InstanceId string + PrivateIps []string + SecondaryPrivateIpAddressCount int + type BatchAddIpResponse struct + PrivateIps []string + func BatchAddIp(cli bce.Client, reqBody *bce.Body) (*BatchAddIpResponse, error) + type BatchDelIpArgs struct + InstanceId string + PrivateIps []string + type BbcCreateAutoRenewArgs struct + InstanceId string + RenewTime int + RenewTimeUnit string + type BbcDeleteAutoRenewArgs struct + InstanceId string + type BbcFlavorInfo struct + Count int + Cpu int + CpuGhz string + DiskInfos map[string]DiskInfo + FlavorId string + Memory int + SataInfo string + StorageType string + type BbcNetworkModel struct + BbcId string + Subnet SubnetModel + Vpc VpcModel + type Billing struct + PaymentTiming PaymentTimingType + Reservation Reservation + type BindSecurityGroupsArgs struct + InstanceIds []string + SecurityGroupIds []string + type BindTagsArgs struct + ChangeTags []model.TagModel type Client + func (c *Client) AuthorizeRepairTask(args *TaskIdArgs) error + func (c *Client) BatchAddIP(args *BatchAddIpArgs) (*BatchAddIpResponse, error) + func (c *Client) BatchCreateAutoRenewRules(args *BbcCreateAutoRenewArgs) error + func (c *Client) BatchDelIP(args *BatchDelIpArgs) error + func (c *Client) BatchDeleteAutoRenewRules(args *BbcDeleteAutoRenewArgs) error + func (c *Client) BindSecurityGroups(args *BindSecurityGroupsArgs) error + func (c *Client) BindTags(instanceId string, args *BindTagsArgs) error + func (c *Client) ConfirmRepairTask(args *TaskIdArgs) error + func (c *Client) CreateRule(args *CreateRuleArgs) (*CreateRuleResult, error) + func (c *Client) DeleteInstance(instanceId string) error + func (c *Client) DeleteInstanceIngorePayment(args *DeleteInstanceIngorePaymentArgs) (*DeleteInstanceResult, error) + func (c *Client) DeleteRule(args *DeleteRuleArgs) error + func (c *Client) DisConfirmRepairTask(args *DisconfirmTaskArgs) error + func (c *Client) DisableRule(args *DisableRuleArgs) error + func (c *Client) EnableRule(args *EnableRuleArgs) error + func (c *Client) GetCommonImage(args *GetFlavorImageArgs) (*GetImagesResult, error) + func (c *Client) GetCustomImage(args *GetFlavorImageArgs) (*GetImagesResult, error) + func (c *Client) GetInstanceCreateStock(args *CreateInstanceStockArgs) (*InstanceStockResult, error) + func (c *Client) GetInstanceDetailWithDeploySet(instanceId string, isDeploySet bool) (*InstanceModel, error) + func (c *Client) GetInstanceEni(instanceId string) (*GetInstanceEniResult, error) + func (c *Client) GetInstancePirce(args *InstancePirceArgs) (*InstancePirceResult, error) + func (c *Client) GetRepairTaskDetail(taskId string) (*GetRepairTaskResult, error) + func (c *Client) GetRepairTaskRecord(args *TaskIdArgs) (*GetRepairRecords, error) + func (c *Client) GetRuleDetail(ruleId string) (*Rule, error) + func (c *Client) GetSimpleFlavor(args *GetSimpleFlavorArgs) (*SimpleFlavorResult, error) + func (c *Client) ListClosedRepairTasks(args *ListClosedRepairTaskArgs) (*ListClosedRepairTaskResult, error) + func (c *Client) ListFlavorZones(args *ListFlavorZonesArgs) (*ListZonesResult, error) + func (c *Client) ListRepairTasks(args *ListRepairTaskArgs) (*ListRepairTaskResult, error) + func (c *Client) ListRule(args *ListRuleArgs) (*ListRuleResult, error) + func (c *Client) ListZoneFlavors(args *ListZoneFlavorsArgs) (*ListFlavorInfosResult, error) + func (c *Client) UnAuthorizeRepairTask(args *TaskIdArgs) error + func (c *Client) UnBindSecurityGroups(args *UnBindSecurityGroupsArgs) error + type ClosedRepairTask struct + CreateTime string + EndTime string + ErrResult string + InstanceId string + TaskId string + type CreateDeploySetArgs struct + ClientToken string + Concurrency int + Desc string + Name string + Strategy string + type CreateDeploySetResult struct + DeploySetId string + func CreateDeploySet(cli bce.Client, clientToken string, reqBody *bce.Body) (*CreateDeploySetResult, error) + type CreateImageArgs struct + ClientToken string + ImageName string + InstanceId string + type CreateImageResult struct + ImageId string + func CreateImageFromInstanceId(cli bce.Client, clientToken string, reqBody *bce.Body) (*CreateImageResult, error) + type CreateInstanceArgs struct + AdminPass string + AutoRenewTime int + AutoRenewTimeUnit string + Billing Billing + ClientToken string + DeploySetId string + EnableNuma bool + FlavorId string + ImageId string + InternalIps []string + Name string + PurchaseCount int + RaidId string + RequestToken string + RootDiskSizeInGb int + SecurityGroupId string + SubnetId string + Tags []model.TagModel + ZoneName string + type CreateInstanceResult struct + InstanceIds []string + func CreateInstance(cli bce.Client, args *CreateInstanceArgs, reqBody *bce.Body) (*CreateInstanceResult, error) + type CreateInstanceStockArgs struct + FlaovrId string + ZoneName string + type CreateRuleArgs struct + Enabled int + Extra string + Limit int + RuleName string + TagStr string + type CreateRuleResult struct + RuleId string + func CreateRule(cli bce.Client, reqBody *bce.Body) (*CreateRuleResult, error) + type DeleteInstanceIngorePaymentArgs struct + DeleteCdsSnapshotFlag bool + DeleteRelatedEnisFlag bool + InstanceId string + RelatedReleaseFlag bool + type DeleteInstanceModel struct + Eip string + InstanceId string + type DeleteInstanceResult struct + FailResources *DeleteInstanceModel + SuccessResources *DeleteInstanceModel + func DeleteBbcIngorePayment(cli bce.Client, args *DeleteInstanceIngorePaymentArgs) (*DeleteInstanceResult, error) + type DeleteRuleArgs struct + RuleId string + type DeploySetModel struct + AzIntstanceStatisList []AzIntstanceStatis + Concurrency int + DeploySetId string + Desc string + Name string + Strategy string + type DeploySetResult struct + Concurrency int + DeploySetId string + Desc string + InstanceList []AzIntstanceStatisDetail + Name string + Strategy string + func GetDeploySet(cli bce.Client, deploySetId string) (*DeploySetResult, error) + type DisableRuleArgs struct + RuleId string + type DisconfirmTaskArgs struct + NewErrResult string + TaskId string + type DiskInfo struct + DataDiskName string + DataDiskSize float64 + Description string + Raid string + RaidDisplay string + RaidId string + SysAndHomeSize float64 + type EnableRuleArgs struct + RuleId string + type FlavorImageModel struct + FlavorId string + Images []ImageModel + type FlavorModel struct + CpuCount int + CpuType string + Disk string + FlavorId string + MemoryCapacityInGB int + NetworkCard string + Others string + type GetDeploySetResult struct + type GetFlavorDetailResult struct + func GetFlavorDetail(cli bce.Client, flavorId string) (*GetFlavorDetailResult, error) + type GetFlavorImageArgs struct + ClientToken string + FlavorIds []string + type GetFlavorRaidResult struct + FlavorId string + Raids []RaidModel + func GetFlavorRaid(cli bce.Client, flavorId string) (*GetFlavorRaidResult, error) + type GetImageDetailResult struct + Result *ImageModel + func GetImageDetail(cli bce.Client, imageId string) (*GetImageDetailResult, error) + type GetImagesResult struct + Result []FlavorImageModel + func GetCommonImage(cli bce.Client, reqBody *bce.Body) (*GetImagesResult, error) + func GetCustomImage(cli bce.Client, reqBody *bce.Body) (*GetImagesResult, error) + type GetInstanceEniResult struct + Description string + Id string + InstanceId string + MacAddress string + Name string + PrivateIpSet []PrivateIP + Status string + SubnetId string + VpcId string + ZoneName string + func GetInstanceEni(cli bce.Client, instanceId string) (*GetInstanceEniResult, error) + type GetOperationLogArgs struct + EndTime string + Marker string + MaxKeys int + StartTime string + type GetOperationLogResult struct + IsTruncated bool + Marker string + MaxKeys int + NextMarker string + OperationLogs []OperationLogModel + func GetOperationLog(cli bce.Client, args *GetOperationLogArgs) (*GetOperationLogResult, error) + type GetRepairRecords struct + RepairRecords []RepairRecord + func GetRepairTaskReocrd(cli bce.Client, reqBody *bce.Body) (*GetRepairRecords, error) + type GetRepairTaskResult struct + ErrResult string + FloatingIp string + InstanceId string + InstanceName string + InternalIp string + Region string + ServerStatus string + Status string + TaskId string + func GetTaskDetail(cli bce.Client, instanceId string) (*GetRepairTaskResult, error) + type GetSimpleFlavorArgs struct + InstanceIds []string + type GetVpcSubnetArgs struct + BbcIds []string + type GetVpcSubnetResult struct + NetworkInfo []BbcNetworkModel + func GetVpcSubnet(cli bce.Client, reqBody *bce.Body) (*GetVpcSubnetResult, error) + type ImageModel struct + CreateTime string + Desc string + Id string + Name string + OsArch string + OsBuild string + OsName string + OsType string + OsVersion string + SpecialVersion string + Status ImageStatus + Type ImageType + type ImageStatus string + const ImageStatusAvailable + const ImageStatusCreateFailed + const ImageStatusCreating + const ImageStatusError + const ImageStatusNotAvailable + type ImageType string + const ImageTypeCustom + const ImageTypeIntegration + const ImageTypeSystem + type InstanceModel struct + CreateTime string + Desc string + ExpireTime string + FlavorId string + HostId string + Id string + ImageId string + InternalIp string + Name string + NetworkCapacityInMbps int + PaymentTiming string + PublicIp string + RackId string + Region string + Status InstanceStatus + SwitchId string + Tags []model.TagModel + Uuid string + Zone string + func GetInstanceDetail(cli bce.Client, instanceId string) (*InstanceModel, error) + func GetInstanceDetailWithDeploySet(cli bce.Client, instanceId string, isDeploySet bool) (*InstanceModel, error) + type InstancePirceArgs struct + Billing Billing + FlaovrId string + PurchaseCount int + type InstancePirceResult struct + Pirce string + func GetInstancePirce(cli bce.Client, args *InstancePirceArgs) (*InstancePirceResult, error) + type InstanceStatus string + const InstanceStatusDeleted + const InstanceStatusError + const InstanceStatusExpired + const InstanceStatusImageProcessing + const InstanceStatusRunning + const InstanceStatusStarting + const InstanceStatusStopped + const InstanceStatusStopping + type InstanceStockResult struct + Count int + FlaovrId string + func GetInstanceCreateStock(cli bce.Client, args *CreateInstanceStockArgs) (*InstanceStockResult, error) + type ListClosedRepairTaskArgs struct + EndTime string + ErrResult string + InstanceId string + Marker string + MaxKeys int + StartTime string + TaskId string + type ListClosedRepairTaskResult struct + IsTruncated bool + Marker string + MaxKeys int + NextMarker string + RepairTasks []ClosedRepairTask + func ListClosedRepairTasks(cli bce.Client, args *ListClosedRepairTaskArgs) (*ListClosedRepairTaskResult, error) + type ListDeploySetsResult struct + DeploySetList []DeploySetModel + func ListDeploySets(cli bce.Client) (*ListDeploySetsResult, error) + type ListFlavorInfosResult struct + BbcFlavorInfoList []BbcFlavorInfo + func ListZoneFlavors(cli bce.Client, reqBody *bce.Body) (*ListFlavorInfosResult, error) + type ListFlavorZonesArgs struct + FlavorId string + ProductType PaymentTimingType + type ListFlavorsResult struct + Flavors []FlavorModel + func ListFlavors(cli bce.Client) (*ListFlavorsResult, error) + type ListImageArgs struct + ImageType string + Marker string + MaxKeys int + type ListImageResult struct + Images []ImageModel + IsTruncated bool + Marker string + MaxKeys int + NextMarker string + func ListImage(cli bce.Client, queryArgs *ListImageArgs) (*ListImageResult, error) + type ListInstancesArgs struct + InternalIp string + Marker string + MaxKeys int + VpcId string + type ListInstancesResult struct + Instances []InstanceModel + IsTruncated bool + Marker string + MaxKeys int + NextMarker string + func ListInstances(cli bce.Client, args *ListInstancesArgs) (*ListInstancesResult, error) + type ListRepairTaskArgs struct + ErrResult string + InstanceId string + Marker string + MaxKeys int + type ListRepairTaskResult struct + IsTruncated bool + Marker string + MaxKeys int + NextMarker string + RepairTasks []RepairTask + func ListRepairTasks(cli bce.Client, args *ListRepairTaskArgs) (*ListRepairTaskResult, error) + type ListRuleArgs struct + Marker string + MaxKeys int + RuleId string + RuleName string + type ListRuleResult struct + IsTruncated bool + Marker string + MaxKeys int + NextMarker string + RuleList []Rule + func ListRule(cli bce.Client, reqBody *bce.Body) (*ListRuleResult, error) + type ListZoneFlavorsArgs struct + ProductType PaymentTimingType + ZoneName string + type ListZonesResult struct + ZoneNames []string + func ListFlavorZones(cli bce.Client, reqBody *bce.Body) (*ListZonesResult, error) + type ModifyInstanceDescArgs struct + Description string + type ModifyInstanceNameArgs struct + Name string + type ModifyInstancePasswordArgs struct + AdminPass string + type OperationLogModel struct + OperationDesc string + OperationIp string + OperationStatus bool + OperationTime string + type PaymentTimingType string + const PaymentTimingPostPaid + const PaymentTimingPrePaid + type PrivateIP struct + Ipv6Address string + Primary bool + PrivateIpAddress string + PublicIpAddress string + type RaidModel struct + DataDiskSize float64 + Raid string + RaidId string + SysDiskSize int + SysHomeSize int + SysRootSize int + SysSwapSize int + type RebuildInstanceArgs struct + AdminPass string + ImageId string + IsPreserveData bool + RaidId string + SysRootSize int + type RepairRecord struct + Name string + OperateTime string + Operator string + type RepairTask struct + ErrResult string + InstanceId string + Status string + TaskId string + type Reservation struct + Length int + TimeUnit string + type Rule struct + AssociateBbcList []string + AssociateBbcNum int + ErrResult string + ErrorBbcNum int + Limit int + RuleId string + RuleName string + Status string + TagCount int + Tags []model.TagModel + func GetRuleDetail(cli bce.Client, ruleId string) (*Rule, error) + type SimpleFlavorModel struct + CpuDescription string + DiskDescription string + GpuCard string + InstanceId string + MemDescription string + NicDescription string + RaidDescription string + RamRate string + RamType string + type SimpleFlavorResult struct + SimpleFlavorModel []SimpleFlavorModel + func GetSimpleFlavor(cli bce.Client, args *GetSimpleFlavorArgs) (*SimpleFlavorResult, error) + type StopInstanceArgs struct + ForceStop bool + type SubnetModel struct + Cidr string + Name string + SubnetId string + SubnetType string + VpcId string + ZoneName string + type TaskIdArgs struct + TaskId string + type UnBindSecurityGroupsArgs struct + InstanceId string + SecurityGroupId string + type UnbindTagsArgs struct + ChangeTags []model.TagModel + type VpcModel struct + Cidr string + Description string + IsDefault bool + Name string + VpcId string v0.9.7 Mar 18, 2020 Changes in this version + const DEFAULT_SERVICE_DOMAIN + type Client struct + func NewClient(ak, sk, endPoint string) (*Client, error) + func (c *Client) CreateDeploySet(args *api.CreateDeploySetArgs) (*api.CreateDeploySetResult, error) + func (c *Client) CreateImageFromInstanceId(args *api.CreateImageArgs) (*api.CreateImageResult, error) + func (c *Client) CreateInstance(args *api.CreateInstanceArgs) (*api.CreateInstanceResult, error) + func (c *Client) DeleteDeploySet(deploySetId string) error + func (c *Client) DeleteImage(imageId string) error + func (c *Client) GetDeploySet(deploySetId string) (*api.GetDeploySetResult, error) + func (c *Client) GetFlavorDetail(flavorId string) (*api.GetFlavorDetailResult, error) + func (c *Client) GetFlavorRaid(flavorId string) (*api.GetFlavorRaidResult, error) + func (c *Client) GetImageDetail(imageId string) (*api.GetImageDetailResult, error) + func (c *Client) GetInstanceDetail(instanceId string) (*api.InstanceModel, error) + func (c *Client) GetOperationLog(args *api.GetOperationLogArgs) (*api.GetOperationLogResult, error) + func (c *Client) GetVpcSubnet(args *api.GetVpcSubnetArgs) (*api.GetVpcSubnetResult, error) + func (c *Client) ListDeploySets() (*api.ListDeploySetsResult, error) + func (c *Client) ListFlavors() (*api.ListFlavorsResult, error) + func (c *Client) ListImage(args *api.ListImageArgs) (*api.ListImageResult, error) + func (c *Client) ListInstances(args *api.ListInstanceArgs) (*api.ListInstanceResult, error) + func (c *Client) ModifyInstanceDesc(instanceId string, args *api.ModifyInstanceDescArgs) error + func (c *Client) ModifyInstanceName(instanceId string, args *api.ModifyInstanceNameArgs) error + func (c *Client) ModifyInstancePassword(instanceId string, args *api.ModifyInstancePasswordArgs) error + func (c *Client) RebootInstance(instanceId string, forceStop bool) error + func (c *Client) RebuildInstance(instanceId string, isPreserveData bool, args *api.RebuildInstanceArgs) error + func (c *Client) ReleaseInstance(instanceId string) error + func (c *Client) StartInstance(instanceId string) error + func (c *Client) StopInstance(instanceId string, forceStop bool) error + func (c *Client) UnbindTags(instanceId string, args *api.UnbindTagsArgs) error