bcc

package
v0.9.209 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2024 License: Apache-2.0 Imports: 5 Imported by: 16

Documentation

Index

Constants

View Source
const DEFAULT_SERVICE_DOMAIN = "bcc." + bce.DEFAULT_REGION + ".baidubce.com"

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	*bce.BceClient
}

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

func NewClient

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

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

func (*Client) AcceptTransferReservedInstanceOrder added in v0.9.176

func (c *Client) AcceptTransferReservedInstanceOrder(args *api.AcceptTransferReservedInstanceRequest) error

AcceptTransferReservedInstanceOrder - Accept a transfer reserved instance order

PARAMS:

  • args: transfer record id for operation

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) AddIpv6 added in v0.9.147

func (c *Client) AddIpv6(args *api.AddIpv6Args) (*api.AddIpv6Result, error)

func (*Client) AttachAutoSnapshotPolicy

func (c *Client) AttachAutoSnapshotPolicy(aspId string, args *api.AttachASPArgs) error

AttachAutoSnapshotPolicy - attach an ASP to volumes

PARAMS:

  • aspId: the specific auto snapshot policy ID
  • args: the arguments to attach an ASP

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) AttachCDSVolume

func (c *Client) AttachCDSVolume(volumeId string, args *api.AttachVolumeArgs) (*api.AttachVolumeResult, error)

AttachCDSVolume - attach a CDS volume to an instance

PARAMS:

  • volumeId: the specific CDS volume ID
  • args: the arguments to attach a CDS volume

RETURNS:

  • *api.AttachVolumeResult: the result of attach a CDS volume
  • error: nil if success otherwise the specific error

func (*Client) AttachKeypair added in v0.9.18

func (c *Client) AttachKeypair(args *api.AttackKeypairArgs) error

func (*Client) AuthorizeSecurityGroupRule

func (c *Client) AuthorizeSecurityGroupRule(securityGroupId string, args *api.AuthorizeSecurityGroupArgs) error

AuthorizeSecurityGroupRule - authorize a security group rule

PARAMS:

  • securityGroupId: the specific securityGroup ID
  • args: the arguments to authorize a security group rule

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) AutoReleaseInstance added in v0.9.66

func (c *Client) AutoReleaseInstance(instanceId string, releaseTime string) error

AutoReleaseInstance - set releaseTime of a postpay instance

PARAMS:

  • instanceId: the specific instance ID
  • releaseTime: an UTC string,eg:"2021-05-01T07:58:09Z"

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) AutoRenewCDSVolume added in v0.9.18

func (c *Client) AutoRenewCDSVolume(args *api.AutoRenewCDSVolumeArgs) error

AutoRenewCDSVolume - auto renew the specified cds volume

PARAMS:

  • args: the arguments to auto renew the cds volume

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) BatchAddIP added in v0.9.8

func (c *Client) BatchAddIP(args *api.BatchAddIpArgs) (*api.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) BatchChangeInstanceToPostpay added in v0.9.147

func (c *Client) BatchChangeInstanceToPostpay(args *api.BatchChangeInstanceToPostpayArgs) (
	*api.BatchChangeInstanceBillingMethodResult, error)

func (*Client) BatchChangeInstanceToPrepay added in v0.9.147

func (*Client) BatchCreateAutoRenewRules added in v0.9.21

func (c *Client) BatchCreateAutoRenewRules(args *api.BccCreateAutoRenewArgs) 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 added in v0.9.8

func (c *Client) BatchDelIP(args *api.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 added in v0.9.21

func (c *Client) BatchDeleteAutoRenewRules(args *api.BccDeleteAutoRenewArgs) 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) BatchDeleteInstanceWithRelateResource added in v0.9.133

func (c *Client) BatchDeleteInstanceWithRelateResource(args *api.BatchDeleteInstanceWithRelateResourceArgs) error

BatchDeleteInstanceWithRelateResource - batch delete instance and all eip/cds relate it

PARAMS:

  • args: the arguments to batch delete instance and its relate resource

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) BatchRebuildInstances added in v0.9.15

func (c *Client) BatchRebuildInstances(args *api.RebuildBatchInstanceArgs) error

RebuildBatchInstance - batch rebuild instances

PARAMS:

  • args: the arguments to batch rebuild instances

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) BatchRebuildInstancesV2 added in v0.9.159

func (c *Client) BatchRebuildInstancesV2(argsV2 *api.RebuildBatchInstanceArgsV2) error

RebuildBatchInstancesV2 - batch rebuild instances

PARAMS:

  • args: the arguments to batch rebuild instances

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) BatchRefundResource added in v0.9.172

func (c *Client) BatchRefundResource(arg *api.BatchRefundResourceArg) (*api.BatchRefundResourceResult,
	error)

func (*Client) BatchResizeInstance added in v0.9.133

func (c *Client) BatchResizeInstance(args *api.BatchResizeInstanceArgs) (*api.BatchResizeInstanceResults, error)

BatchResizeInstance - batch resize a specific instance

PARAMS:

  • args: the arguments to resize a specific instance

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) BatchStartInstance added in v0.9.133

func (c *Client) BatchStartInstance(args *api.BatchStartInstanceArgs) error

BatchStartInstance - batch start instance

PARAMS:

  • args: the arguments to batch start instance

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) BatchStopInstance added in v0.9.133

func (c *Client) BatchStopInstance(args *api.BatchStopInstanceArgs) error

BatchStopInstance - batch stop instance

PARAMS:

  • args: the arguments to batch stop instance

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) BindImageToTags added in v0.9.147

func (c *Client) BindImageToTags(imageId string, args *api.BindTagsRequest) error

func (*Client) BindInstanceRole added in v0.9.147

func (c *Client) BindInstanceRole(args *api.BindInstanceRoleArgs) (*api.BindInstanceRoleResult, error)

func (*Client) BindInstanceToTags added in v0.9.15

func (c *Client) BindInstanceToTags(instanceId string, args *api.BindTagsRequest) error

BindInstanceToTags - bind instance to tags

PARAMS:

  • instanceId: instanceId
  • args: the arguments to BindInstanceToTags

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) BindInstanceToTagsByResourceType added in v0.9.174

func (c *Client) BindInstanceToTagsByResourceType(args *api.TagsOperationRequest) error

func (*Client) BindReservedInstanceToTags added in v0.9.174

func (c *Client) BindReservedInstanceToTags(args *api.ReservedTagsRequest) error

func (*Client) BindSecurityGroup

func (c *Client) BindSecurityGroup(instanceId string, securityGroupId string) error

BindSecurityGroup - bind a security group to an instance

PARAMS:

  • instanceId: the specific instance ID
  • securityGroupId: the security group ID which need to bind

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) CancelAutoRenewCDSVolume added in v0.9.18

func (c *Client) CancelAutoRenewCDSVolume(args *api.CancelAutoRenewCDSVolumeArgs) error

CancelAutoRenewCDSVolume - cancel auto renew the specified cds volume

PARAMS:

  • args: the arguments to cancel auto renew the cds volume

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) CancelBidOrder added in v0.9.15

func (c *Client) CancelBidOrder(args *api.CancelBidOrderRequest) (*api.CreateBidInstanceResult, error)

CancelBidOrder - Cancel the bidding instance order.

PARAMS:

  • args: the arguments to cancel bid order

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) CancelRemoteCopyImage

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

CancelRemoteCopyImage - cancel a copy image from other region operation

PARAMS:

  • imageId: the specific image ID

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) ChangeInstancePass

func (c *Client) ChangeInstancePass(instanceId string, args *api.ChangeInstancePassArgs) error

ChangeInstancePass - change an instance's password

PARAMS:

  • instanceId: the specific instance ID
  • args: the arguments to change password

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) ChangeToPrepaid added in v0.9.15

func (c *Client) ChangeToPrepaid(instanceId string, args *api.ChangeToPrepaidRequest) (*api.ChangeToPrepaidResponse,
	error)

ChangeToPrepaid - to prepaid

PARAMS:

  • instanceId: instanceId
  • args: the arguments to ChangeToPrepaid

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) CreateAutoSnapshotPolicy

func (c *Client) CreateAutoSnapshotPolicy(args *api.CreateASPArgs) (*api.CreateASPResult, error)

CreateAutoSnapshotPolicy - create an auto snapshot policy

PARAMS:

  • args: the arguments to create an auto snapshot policy

RETURNS:

  • *api.CreateASPResult: the result of create an auto snapshot policy
  • error: nil if success otherwise the specific error

func (*Client) CreateBidInstance added in v0.9.15

func (c *Client) CreateBidInstance(args *api.CreateInstanceArgs) (*api.CreateInstanceResult, error)

CreateBidInstance - create an instance with the specific parameters

PARAMS:

  • args: the arguments to create instance

RETURNS:

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

func (*Client) CreateCDSVolume

func (c *Client) CreateCDSVolume(args *api.CreateCDSVolumeArgs) (*api.CreateCDSVolumeResult, error)

cds sdk CreateCDSVolume - create a CDS volume

PARAMS:

  • args: the arguments to create CDS

RETURNS:

  • *api.CreateCDSVolumeResult: the result of create CDS volume, contains new volume ID
  • error: nil if success otherwise the specific error

func (*Client) CreateCDSVolumeV3 added in v0.9.36

func (c *Client) CreateCDSVolumeV3(args *api.CreateCDSVolumeV3Args) (*api.CreateCDSVolumeResult, error)

cds sdk CreateCDSVolumeV3 - create a CDS volume

PARAMS:

  • args: the arguments to create CDS

RETURNS:

  • *api.CreateCDSVolumeResult: the result of create CDS volume, contains new volume ID
  • error: nil if success otherwise the specific error

func (*Client) CreateDeploySet added in v0.9.11

func (c *Client) CreateDeploySet(args *api.CreateDeploySetArgs) (*api.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) CreateEhcCluster added in v0.9.184

func (c *Client) CreateEhcCluster(args *api.CreateEhcClusterArg) (*api.CreateEhcClusterResponse, error)

CreateEhcCluster - create an ehcCluster

PARAMS:

  • cli: the client agent which can perform sending request
  • args: the arguments to search transfer out reserved instance orders

RETURNS:

  • error: nil if success otherwise the specific error
  • CreateEhcClusterResponse: result of the ehcCluster id newly created

func (*Client) CreateImage

func (c *Client) CreateImage(args *api.CreateImageArgs) (*api.CreateImageResult, error)

image sdk CreateImage - create an image

PARAMS:

  • args: the arguments to create image

RETURNS:

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

func (*Client) CreateInstance

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

CreateInstance - create an instance with the specific parameters

PARAMS:

  • args: the arguments to create instance

RETURNS:

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

func (*Client) CreateInstanceByLabel added in v0.9.109

func (c *Client) CreateInstanceByLabel(args *api.CreateSpecialInstanceBySpecArgs) (*api.CreateInstanceResult, error)

CreateInstance - create an instance with the specific parameters and support the passing in of label

PARAMS:

  • args: the arguments to create instance

RETURNS:

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

func (*Client) CreateInstanceBySpec added in v0.9.10

func (c *Client) CreateInstanceBySpec(args *api.CreateInstanceBySpecArgs) (*api.CreateInstanceBySpecResult, error)

CreateInstanceBySpec - create an instance with the specific parameters

PARAMS:

  • args: the arguments to create instance

RETURNS:

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

func (*Client) CreateInstanceBySpecV2 added in v0.9.159

func (c *Client) CreateInstanceBySpecV2(argsV2 *api.CreateInstanceBySpecArgsV2) (*api.CreateInstanceBySpecResult, error)

CreateInstanceBySpecV2 - create an instance with the specific parameters

PARAMS:

  • args: the arguments to create instance

RETURNS:

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

func (*Client) CreateInstanceV2 added in v0.9.159

func (c *Client) CreateInstanceV2(argsV2 *api.CreateInstanceArgsV2) (*api.CreateInstanceResult, error)

CreateInstanceV2 - create an instance with the specific parameters

PARAMS:

  • args: the arguments to create instance

RETURNS:

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

func (*Client) CreateInstanceV3 added in v0.9.55

func (c *Client) CreateInstanceV3(args *api.CreateInstanceV3Args) (*api.CreateInstanceV3Result, error)

CreateInstanceV3 - create an instance with the specific parameters

PARAMS:

  • args: the arguments to create instance

RETURNS:

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

func (*Client) CreateKeypair added in v0.9.18

func (c *Client) CreateKeypair(args *api.CreateKeypairArgs) (*api.KeypairResult, error)

func (*Client) CreateRemoteCopySnapshot added in v0.9.147

func (c *Client) CreateRemoteCopySnapshot(snapshotId string, args *api.RemoteCopySnapshotArgs) (*api.RemoteCopySnapshotResult,
	error)

func (*Client) CreateReservedInstance added in v0.9.184

func (c *Client) CreateReservedInstance(args *api.CreateReservedInstanceArgs) (*api.CreateReservedInstanceResponse, error)

func (*Client) CreateSecurityGroup

func (c *Client) CreateSecurityGroup(args *api.CreateSecurityGroupArgs) (*api.CreateSecurityGroupResult, error)

securityGroup sdk CreateSecurityGroup - create a security group

PARAMS:

  • args: the arguments to create security group

RETURNS:

  • *api.CreateSecurityGroupResult: the result of create security group
  • error: nil if success otherwise the specific error

func (*Client) CreateSnapshot

func (c *Client) CreateSnapshot(args *api.CreateSnapshotArgs) (*api.CreateSnapshotResult, error)

CreateSnapshot - create a snapshot

PARAMS:

  • args: the arguments to create a snapshot

RETURNS:

  • *api.CreateSnapshotResult: the result of create snapshot
  • error: nil if success otherwise the specific error

func (*Client) DelInstanceDeploySet added in v0.9.66

func (c *Client) DelInstanceDeploySet(args *api.DelInstanceDeployArgs) (error, error)

DelInstanceDeploySet - delete deployset and instance relation

PARAMS:

  • args: the arguments to delete deployset and instance relation

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) DeleteAutoSnapshotPolicy

func (c *Client) DeleteAutoSnapshotPolicy(aspId string) error

DeleteAutoSnapshotPolicy - delete an auto snapshot policy

PARAMS:

  • aspId: the specific auto snapshot policy ID

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) DeleteCDSVolume

func (c *Client) DeleteCDSVolume(volumeId string) error

DeleteCDSVolume - delete a CDS volume

PARAMS:

  • volumeId: the specific CDS volume ID

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) DeleteCDSVolumeNew

func (c *Client) DeleteCDSVolumeNew(volumeId string, args *api.DeleteCDSVolumeArgs) error

DeleteCDSVolumeNew - delete a CDS volume and snapshot

PARAMS:

  • volumeId: the specific CDS volume ID
  • args: the arguments to delete a CDS volume

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) DeleteDeploySet added in v0.9.11

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) DeleteEhcCluster added in v0.9.184

func (c *Client) DeleteEhcCluster(args *api.DeleteEhcClusterArg) error

DeleteEhcCluster - delete ehcCluster

PARAMS:

  • cli: the client agent which can perform sending request
  • args: the arguments of method

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 a specific instance

PARAMS:

  • instanceId: the specific instance ID

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) DeleteInstanceIngorePayment added in v0.9.21

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

func (*Client) DeleteInstanceWithRelateResource

func (c *Client) DeleteInstanceWithRelateResource(instanceId string, args *api.DeleteInstanceWithRelateResourceArgs) error

DeleteInstanceWithRelateResource - delete an instance and all eip/cds relate it

PARAMS:

  • instanceId: the specific instance ID
  • args: the arguments to delete instance and its relate resource

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) DeleteIpv6 added in v0.9.147

func (c *Client) DeleteIpv6(args *api.DeleteIpv6Args) error

func (*Client) DeleteKeypair added in v0.9.18

func (c *Client) DeleteKeypair(args *api.DeleteKeypairArgs) error

func (*Client) DeletePrepaidInstanceWithRelateResource added in v0.9.166

func (c *Client) DeletePrepaidInstanceWithRelateResource(args *api.DeletePrepaidInstanceWithRelateResourceArgs) (*api.ReleasePrepaidInstanceResponse, error)

DeletePrepaidInstanceWithRelateResource - delete an prepaid instance and all eip/cds relate it

PARAMS:

  • instanceId: the specific instance ID
  • args: the arguments to delete instance and its relate resource

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) DeletePrepayVolume added in v0.9.75

DeletePrepayVolume - delete the volumes for prepay

PARAMS:

  • cli: the client agent which can perform sending request
  • args: the arguments of method

RETURNS:

  • *VolumeDeleteResultResponse: the result of deleting volumes
  • error: nil if success otherwise the specific error

func (*Client) DeleteRecycledInstance added in v0.9.90

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

DeleteRecycledInstance - delete a recycled instance

PARAMS:

  • instanceId: the specific instance ID

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) DeleteSecurityGroup

func (c *Client) DeleteSecurityGroup(securityGroupId string) error

DeleteSecurityGroup - delete a security group

PARAMS:

  • securityGroupId: the specific securityGroup ID

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) DeleteSecurityGroupRule added in v0.9.134

func (c *Client) DeleteSecurityGroupRule(args *api.DeleteSecurityGroupRuleArgs) error

DeleteSecurityGroupRule - delete a security group rule

PARAMS:

  • securityGroupRuleId: the id of the specific security group rule

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) DeleteSnapshot

func (c *Client) DeleteSnapshot(snapshotId string) error

DeleteSnapshot - delete a snapshot

PARAMS:

  • snapshotId: the specific snapshot ID

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) DescribeRegions added in v0.9.183

func (c *Client) DescribeRegions(args *api.DescribeRegionsArgs) (*api.DescribeRegionsResult, error)

DescribeRegions - list all region's endpoint information with the specific parameters.

use global endpoint bcc.baidubce.com to get BCC,CDS and ReservedInstance's endpoint.

PARAMS:

  • args: the arguments to list all region's endpoint information

RETURNS:

  • *DescribeRegionsResult: the result of list all region's endpoint information
  • error: nil if success otherwise the specific error

func (*Client) DetachAutoSnapshotPolicy

func (c *Client) DetachAutoSnapshotPolicy(aspId string, args *api.DetachASPArgs) error

DetachAutoSnapshotPolicy - detach an ASP

PARAMS:

  • aspId: the specific auto snapshot policy ID
  • args: the arguments to detach an ASP

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) DetachCDSVolume

func (c *Client) DetachCDSVolume(volumeId string, args *api.DetachVolumeArgs) error

DetachCDSVolume - detach a CDS volume

PARAMS:

  • volumeId: the specific CDS volume ID
  • args: the arguments to detach a CDS volume

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) DetachKeypair added in v0.9.18

func (c *Client) DetachKeypair(args *api.DetachKeypairArgs) error

func (*Client) GetAllStocks added in v0.9.38

func (c *Client) GetAllStocks() (*api.GetAllStocksResult, error)

GetAllStocks - get the bcc and bbc's stock

RETURNS:

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

func (*Client) GetAutoSnapshotPolicy

func (c *Client) GetAutoSnapshotPolicy(aspId string) (*api.GetASPDetailResult, error)

GetAutoSnapshotPolicy - get an auto snapshot policy's meta

PARAMS:

  • aspId: the specific auto snapshot policy ID

RETURNS:

  • *api.GetASPDetailResult: the result of get an auto snapshot policy's meta
  • error: nil if success otherwise the specific error

func (*Client) GetAvailableDiskInfo added in v0.9.18

func (c *Client) GetAvailableDiskInfo(zoneName string) (*api.GetAvailableDiskInfoResult, error)

GetAvailableDiskInfo - get available diskInfos of the specified zone

PARAMS:

  • cli: the client agent which can perform sending request
  • zoneName: the zone name eg:cn-bj-a

RETURNS:

  • *GetAvailableDiskInfoResult: the result of the specified zone diskInfos
  • error: nil if success otherwise the specific error

func (*Client) GetAvailableImagesBySpec added in v0.9.159

func (c *Client) GetAvailableImagesBySpec(args *api.GetAvailableImagesBySpecArg) (*api.GetAvailableImagesBySpecResult, error)

func (*Client) GetAvailableStockWithSpec added in v0.9.175

func (c *Client) GetAvailableStockWithSpec(args *api.GetAvailableStockWithSpecArgs) (*api.GetAvailableStockWithSpecResults, error)

func (*Client) GetBidInstancePrice added in v0.9.18

func (c *Client) GetBidInstancePrice(args *api.GetBidInstancePriceArgs) (*api.GetBidInstancePriceResult, error)

GetBidInstancePrice - get the market price of the specified bidding instance

PARAMS:

  • args: the arguments to get the bidding instance market price

RETURNS:

  • *GetBidInstancePriceResult: result of the market price of the specified bidding instance
  • error: nil if success otherwise the specific error

func (*Client) GetCDSVolumeDetail

func (c *Client) GetCDSVolumeDetail(volumeId string) (*api.GetVolumeDetailResult, error)

GetCDSVolumeDetail - get a CDS volume's detail info

PARAMS:

  • volumeId: the specific CDS volume ID

RETURNS:

  • *api.GetVolumeDetailResult: the result of get a specific CDS volume's info
  • error: nil if success otherwise the specific error

func (*Client) GetCDSVolumeDetailV3 added in v0.9.36

func (c *Client) GetCDSVolumeDetailV3(volumeId string) (*api.GetVolumeDetailResultV3, error)

GetCDSVolumeDetailV3 - get a CDS volume's detail info

PARAMS:

  • volumeId: the specific CDS volume ID

RETURNS:

  • *api.GetVolumeDetailResultV3: the result of get a specific CDS volume's info
  • error: nil if success otherwise the specific error

func (*Client) GetDeploySet added in v0.9.18

func (c *Client) GetDeploySet(deploySetId string) (*api.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) GetImageDetail

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

GetImageDetail - get an image's detail info

PARAMS:

  • imageId: the specific image ID

RETURNS:

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

func (*Client) GetImageOS

func (c *Client) GetImageOS(args *api.GetImageOsArgs) (*api.GetImageOsResult, error)

GetImageOS - get image OS

PARAMS:

  • args: the arguments to get OS info

RETURNS:

  • *api.GetImageOsResult: the result of get image OS info
  • error: nil if success otherwise the specific error

func (*Client) GetImageSharedUser

func (c *Client) GetImageSharedUser(imageId string) (*api.GetImageSharedUserResult, error)

GetImageSharedUser - get user list use this image

PARAMS:

  • imageId: the specific image ID

RETURNS:

  • *api.GetImageSharedUserResult: the result of user list
  • error: nil if success otherwise the specific error

func (*Client) GetInstOccupyStocksOfVm added in v0.9.209

func (c *Client) GetInstOccupyStocksOfVm(args *api.GetInstOccupyStocksOfVmArgs) (*api.GetInstOccupyStocksOfVmResults, error)

GetInstOccupyStocksOfVm - get the bcc's occupy stock with spec, logicalZone, rootOnLocal

RETURNS:

  • *GetInstOccupyStocksOfVmResults: the result of the bcc's occupy stock
  • error: nil if success otherwise the specific error

func (*Client) GetInstanceCreateStock added in v0.9.18

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

func (*Client) GetInstanceDeleteProgress added in v0.9.146

func (c *Client) GetInstanceDeleteProgress(args *api.GetInstanceDeleteProgressArgs) (map[string]interface{}, error)

func (*Client) GetInstanceDetail

func (c *Client) GetInstanceDetail(instanceId string) (*api.GetInstanceDetailResult, error)

GetInstanceDetail - get a specific instance detail info

PARAMS:

  • instanceId: the specific instance ID

RETURNS:

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

func (*Client) GetInstanceDetailWithDeploySet added in v0.9.18

func (c *Client) GetInstanceDetailWithDeploySet(instanceId string, isDeploySet bool) (*api.GetInstanceDetailResult,
	error)

func (*Client) GetInstanceDetailWithDeploySetAndFailed added in v0.9.34

func (c *Client) GetInstanceDetailWithDeploySetAndFailed(instanceId string,
	isDeploySet bool, containsFailed bool) (*api.GetInstanceDetailResult,
	error)

func (*Client) GetInstanceNoChargeList added in v0.9.15

func (c *Client) GetInstanceNoChargeList(args *api.ListInstanceArgs) (*api.ListInstanceResult, error)

GetInstanceNoChargeList - get instance with nocharge list

PARAMS:

  • args: the arguments to list all nocharge instance

RETURNS:

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

func (*Client) GetInstanceResizeStock added in v0.9.18

func (c *Client) GetInstanceResizeStock(args *api.ResizeInstanceStockArgs) (*api.InstanceStockResult, error)

func (*Client) GetInstanceVNC

func (c *Client) GetInstanceVNC(instanceId string) (*api.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) GetKeypairDetail added in v0.9.18

func (c *Client) GetKeypairDetail(keypairId string) (*api.KeypairResult, error)

func (*Client) GetPriceBySpec added in v0.9.18

func (c *Client) GetPriceBySpec(args *api.GetPriceBySpecArgs) (*api.GetPriceBySpecResult, error)

GetPriceBySpec - get the price information of specified instance.

PARAMS:

  • args: the arguments to get the price information of specified instance.

RETURNS:

  • *api.GetPriceBySpecResult: result of the specified instance's price information
  • error: nil if success otherwise the specific error

func (*Client) GetSecurityGroupDetail added in v0.9.194

func (c *Client) GetSecurityGroupDetail(securityGroupId string) (*api.GetSecurityGroupDetailResult, error)

GetSecurityGroupDetail - get security group detail

PARAMS:

  • cli: the client agent which can perform sending request
  • securityGroupId: the id of security group

RETURNS:

  • *GetSecurityGroupDetailResult: the result of get security group detail

func (*Client) GetSnapshotDetail

func (c *Client) GetSnapshotDetail(snapshotId string) (*api.GetSnapshotDetailResult, error)

GetSnapshotDetail - get a snapshot's detail info

PARAMS:

  • snapshotId: the specific snapshot ID

RETURNS:

  • *api.GetSnapshotDetailResult: the result of get snapshot's detail info
  • error: nil if success otherwise the specific error

func (*Client) GetSortedInstFlavors added in v0.9.209

func (c *Client) GetSortedInstFlavors() (*api.GetSortedInstFlavorsResults, error)

GetSortedInstFlavors - get the sorted instance flavors

RETURNS:

  • *GetSortedInstFlavorsResults: the result of the sorted instance flavors
  • error: nil if success otherwise the specific error

func (*Client) GetStockWithDeploySet added in v0.9.65

func (c *Client) GetStockWithDeploySet(args *api.GetStockWithDeploySetArgs) (*api.GetStockWithDeploySetResults, error)

GetStockWithDeploySet - get the bcc's stock with deploySet

RETURNS:

  • *GetStockWithDeploySetResults: the result of the bcc's stock
  • error: nil if success otherwise the specific error

func (*Client) GetStockWithSpec added in v0.9.100

func (c *Client) GetStockWithSpec(args *api.GetStockWithSpecArgs) (*api.GetStockWithSpecResults, error)

GetStockWithSpec - get the bcc's stock with spec

RETURNS:

  • *GetStockWithSpecResults: the result of the bcc's stock
  • error: nil if success otherwise the specific error

func (*Client) ImportCustomImage added in v0.9.147

func (c *Client) ImportCustomImage(args *api.ImportCustomImageArgs) (*api.ImportCustomImageResult,
	error)

func (*Client) ImportKeypair added in v0.9.18

func (c *Client) ImportKeypair(args *api.ImportKeypairArgs) (*api.KeypairResult, error)

func (*Client) InstanceChangeSubnet

func (c *Client) InstanceChangeSubnet(args *api.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 added in v0.9.58

func (c *Client) InstanceChangeVpc(args *api.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 *api.PurchaseReservedArgs) (*api.InstancePurchaseReservedResult, error)

InstancePurchaseReserved - purchase reserve an instance

PARAMS:

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

RETURNS:

  • *api.InstancePurchaseReservedResult: the result of purchase reserve an instance
  • error: nil if success otherwise the specific error

func (*Client) ListAutoSnapshotPolicy

func (c *Client) ListAutoSnapshotPolicy(args *api.ListASPArgs) (*api.ListASPResult, error)

ListAutoSnapshotPolicy - list all auto snapshot policies

PARAMS:

  • args: the arguments to create instance

RETURNS:

  • *api.ListASPResult: the result of list all auto snapshot policies
  • error: nil if success otherwise the specific error

func (*Client) ListAvailableResizeSpecs added in v0.9.147

func (c *Client) ListAvailableResizeSpecs(args *api.ListAvailableResizeSpecsArgs) (
	*api.ListAvailableResizeSpecResults, error)

func (*Client) ListBidFlavor added in v0.9.18

func (c *Client) ListBidFlavor() (*api.ListBidFlavorResult, error)

ListBidFlavor - list all flavors of the bidding instance

RETURNS:

  • *ListBidFlavorResult: result of the flavor list
  • error: nil if success otherwise the specific error

func (*Client) ListCDSVolume

func (c *Client) ListCDSVolume(queryArgs *api.ListCDSVolumeArgs) (*api.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) ListCDSVolumeV3 added in v0.9.36

func (c *Client) ListCDSVolumeV3(queryArgs *api.ListCDSVolumeArgs) (*api.ListCDSVolumeResultV3, error)

ListCDSVolumeV3 - list all cds volume with the specific parameters

PARAMS:

  • args: the arguments to list all cds

RETURNS:

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

func (*Client) ListDeploySets added in v0.9.11

func (c *Client) ListDeploySets() (*api.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) ListEhcCluster added in v0.9.184

func (*Client) ListFlavorSpec added in v0.9.18

func (c *Client) ListFlavorSpec(args *api.ListFlavorSpecArgs) (*api.ListFlavorSpecResult, error)

ListFlavorSpec - get the specified flavor list

PARAMS:

  • args: the arguments to list the specified flavor

RETURNS:

  • *api.ListFlavorSpecResult: result of the specified flavor list
  • error: nil if success otherwise the specific error

func (*Client) ListIdMappings added in v0.9.133

func (c *Client) ListIdMappings(args *api.ListIdMappingArgs) (*api.ListIdMappingResults, error)

ListIdMappings - Long and short ID conversion parameters

PARAMS:

  • args: the arguments to Long and short ID conversion

RETURNS:

  • *api.ListIdMappingResults: result of the Long short mapping
  • error: nil if success otherwise the specific error

func (*Client) ListImage

func (c *Client) ListImage(queryArgs *api.ListImageArgs) (*api.ListImageResult, error)

ListImage - list all images

PARAMS:

  • args: the arguments to list all images

RETURNS:

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

func (*Client) ListInstanceByInstanceIds added in v0.9.67

func (c *Client) ListInstanceByInstanceIds(args *api.ListInstanceByInstanceIdArgs) (*api.ListInstancesResult, error)

func (*Client) ListInstanceEnis added in v0.9.18

func (c *Client) ListInstanceEnis(instanceId string) (*api.ListInstanceEniResult, error)

ListInstanceEni - get the eni list of the bcc instance

PARAMS:

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

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) ListInstanceRoles added in v0.9.147

func (c *Client) ListInstanceRoles() (*api.ListInstanceRolesResult, error)

func (*Client) ListInstanceTypes added in v0.9.133

func (c *Client) ListInstanceTypes(args *api.ListInstanceTypeArgs) (*api.ListInstanceTypeResults, error)

ListInstanceTypes - list all instance type with the specific parameters

PARAMS:

  • args: the arguments to list all instance type

RETURNS:

  • *api.ListInstanceTypeResults: the result of list Instance type
  • error: nil if success otherwise the specific error

func (*Client) ListInstances

func (c *Client) ListInstances(args *api.ListInstanceArgs) (*api.ListInstanceResult, error)

ListInstances - list all instance with the specific parameters

PARAMS:

  • args: the arguments to list all instance

RETURNS:

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

func (*Client) ListKeypairs added in v0.9.18

func (c *Client) ListKeypairs(args *api.ListKeypairArgs) (*api.ListKeypairResult, error)

func (*Client) ListRecycleInstances added in v0.9.34

func (c *Client) ListRecycleInstances(args *api.ListRecycleInstanceArgs) (*api.ListRecycleInstanceResult, error)

ListRecycleInstances - list all instance in the recycle bin with the specific parameters

PARAMS:

  • args: the arguments to list all instance in the recycle bin

RETURNS:

  • *api.ListRecycleInstanceResult: the result of list Instance in the recycle bin
  • error: nil if success otherwise the specific error

func (*Client) ListReservedInstances added in v0.9.197

func (c *Client) ListReservedInstances(args *api.ListReservedInstanceArgs) (*api.ListReservedInstanceResult, error)

func (*Client) ListSecurityGroup

func (c *Client) ListSecurityGroup(queryArgs *api.ListSecurityGroupArgs) (*api.ListSecurityGroupResult, error)

ListSecurityGroup - list all security group

PARAMS:

  • args: the arguments to list all security group

RETURNS:

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

func (*Client) ListServersByMarkerV3 added in v0.9.75

func (c *Client) ListServersByMarkerV3(args *api.ListServerRequestV3Args) (*api.LogicMarkerResultResponseV3, error)

ListServersByMarkerV3 - list all instance with the specific parameters

PARAMS:

  • args: the arguments to list all instance

RETURNS:

  • *api.LogicMarkerResultResponseV3: the result of list Instance
  • error: nil if success otherwise the specific error

func (*Client) ListSnapshot

func (c *Client) ListSnapshot(args *api.ListSnapshotArgs) (*api.ListSnapshotResult, error)

ListSnapshot - list all snapshots

PARAMS:

  • args: the arguments to list all snapshots

RETURNS:

  • *api.ListSnapshotResult: the result of list all snapshots
  • error: nil if success otherwise the specific error

func (*Client) ListSnapshotChain added in v0.9.18

func (c *Client) ListSnapshotChain(args *api.ListSnapshotChainArgs) (*api.ListSnapshotChainResult, error)

ListSnapshotChain - list all snapshot chains

PARAMS:

  • args: the arguments to list all snapshot chains

RETURNS:

  • *api.ListSnapshotChainResult: the result of list all snapshot chains
  • error: nil if success otherwise the specific error

func (*Client) ListSpec

func (c *Client) ListSpec() (*api.ListSpecResult, error)

ListSpec - list all spec

RETURNS:

  • *api.ListSpecResult: the result of all spec
  • error: nil if success otherwise the specific error

func (*Client) ListTypeZones added in v0.9.18

func (c *Client) ListTypeZones(args *api.ListTypeZonesArgs) (*api.ListTypeZonesResult, error)

ListTypeZones - list instanceType zones PARAMS:

  • cli: the client agent which can perform sending request
  • instanceType: the instanceType like "N1"

RETURNS:

  • *api.ListTypeZonesResult: the result of list instanceType zones
  • error: nil if success otherwise the specific error

func (*Client) ListZone

func (c *Client) ListZone() (*api.ListZoneResult, error)

ListZone - list all zones

RETURNS:

  • *api.ListZoneResult: the result of list all zones
  • error: nil if success otherwise the specific error

func (*Client) ModifyCDSVolume

func (c *Client) ModifyCDSVolume(volumeId string, args *api.ModifyCSDVolumeArgs) error

ModifyCDSVolume - modify a CDS volume

PARAMS:

  • volumeId: the specific CDS volume ID
  • args: the arguments to modify a CDS volume

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) ModifyChargeTypeCDSVolume

func (c *Client) ModifyChargeTypeCDSVolume(volumeId string, args *api.ModifyChargeTypeCSDVolumeArgs) error

ModifyChargeTypeCDSVolume - modify a CDS volume's charge type

PARAMS:

  • volumeId: the specific CDS volume ID
  • args: the arguments to create instance

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) ModifyDeletionProtection added in v0.9.81

func (c *Client) ModifyDeletionProtection(instanceId string, args *api.DeletionProtectionArgs) error

ModifyDeletionProtection - Modify deletion protection of specified instance

PARAMS:

  • instanceId: id of the instance
  • args: the arguments to modify deletion protection, default 0 for deletable and 1 for deletion protection

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) ModifyDeploySet added in v0.9.11

func (c *Client) ModifyDeploySet(deploySetId string, args *api.ModifyDeploySetArgs) (error, error)

ModifyDeploySet - modify the deploy set

PARAMS:

  • deploySetId: the id of the deploy set

RETURNS:

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

func (*Client) ModifyEhcCluster added in v0.9.184

func (c *Client) ModifyEhcCluster(args *api.ModifyEhcClusterArg) error

ModifyEhcCluster - modify ehcCluster

PARAMS:

  • cli: the client agent which can perform sending request
  • args: the arguments of method

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) ModifyInstanceAttribute

func (c *Client) ModifyInstanceAttribute(instanceId string, args *api.ModifyInstanceAttributeArgs) error

ModifyInstanceAttribute - modify an instance's attribute

PARAMS:

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

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) ModifyInstanceDesc

func (c *Client) ModifyInstanceDesc(instanceId string, args *api.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) ModifyInstanceHostname added in v0.9.34

func (c *Client) ModifyInstanceHostname(instanceId string, args *api.ModifyInstanceHostnameArgs) error

ModifyInstanceHostname - modify an instance's hostname

PARAMS:

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

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) ModifyRelatedDeletePolicy added in v0.9.180

func (c *Client) ModifyRelatedDeletePolicy(instanceId string, args *api.RelatedDeletePolicy) error

ModifyRelatedDeletePolicy - Modify RelatedDeletePolicy of specified instance

PARAMS:

  • instanceId: id of the instance
  • args: the arguments to ModifyRelatedDeletePolicy

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) ModifyReservedInstances added in v0.9.184

func (c *Client) ModifyReservedInstances(args *api.ModifyReservedInstancesArgs) (*api.ModifyReservedInstancesResponse, error)

func (*Client) ModifySnapshotAttribute added in v0.9.202

func (c *Client) ModifySnapshotAttribute(snapshotId string, args *api.ModifySnapshotAttributeArgs) error

ModifySnapshotAttribute - modify snapshot attribute

PARAMS:

  • cli: the client agent which can perform sending request
  • snapshotId: the id of snapshot
  • args: the arguments of method

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) PurchaseReservedCDSVolume

func (c *Client) PurchaseReservedCDSVolume(volumeId string, args *api.PurchaseReservedCSDVolumeArgs) error

PurchaseReservedCDSVolume - purchase reserve a CDS volume

PARAMS:

  • volumeId: the specific CDS volume ID
  • args: the arguments to purchase reserve a CDS volume

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, args *api.RebuildInstanceArgs) error

RebuildInstance - rebuild an instance

PARAMS:

  • instanceId: the specific instance ID
  • args: the arguments to rebuild an instance

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) RebuildInstanceV2 added in v0.9.159

func (c *Client) RebuildInstanceV2(instanceId string, argsV2 *api.RebuildInstanceArgsV2) error

func (*Client) RecoveryInstance added in v0.9.29

func (c *Client) RecoveryInstance(args *api.RecoveryInstanceArgs) error

func (*Client) RefuseTransferReservedInstanceOrder added in v0.9.176

func (c *Client) RefuseTransferReservedInstanceOrder(args *api.TransferReservedInstanceOperateRequest) error

RefuseTransferReservedInstanceOrder - Batch refuse transfer reserved instance orders

PARAMS:

  • args: transfer record ids for operation

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) RemoteCopyImage

func (c *Client) RemoteCopyImage(imageId string, args *api.RemoteCopyImageArgs) error

RemoteCopyImage - copy an image from other region

PARAMS:

  • imageId: the specific image ID
  • args: the arguments to remote copy an image

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) RemoteCopyImageReturnImageIds added in v0.9.73

func (c *Client) RemoteCopyImageReturnImageIds(imageId string, args *api.RemoteCopyImageArgs) (*api.RemoteCopyImageResult, error)

RemoteCopyImageReturnImageIds - copy an image from other region

PARAMS:

  • imageId: the specific image ID
  • args: the arguments to remote copy an image

RETURNS:

  • imageIds of destination region if success otherwise the specific error

func (*Client) RenameCDSVolume

func (c *Client) RenameCDSVolume(volumeId string, args *api.RenameCSDVolumeArgs) error

RenameCDSVolume - rename a CDS volume

PARAMS:

  • volumeId: the specific CDS volume ID
  • args: the arguments to rename a CDS volume

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) RenameImage added in v0.9.206

func (c *Client) RenameImage(args *api.RenameImageArgs) error

RenameImage - rename image

PARAMS:

  • args: the arguments to rename image

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) RenameKeypair added in v0.9.18

func (c *Client) RenameKeypair(args *api.RenameKeypairArgs) error

func (*Client) RenewReservedInstances added in v0.9.197

func (c *Client) RenewReservedInstances(args *api.RenewReservedInstancesArgs) (*api.RenewReservedInstancesResponse, error)

func (*Client) ResizeCDSVolume

func (c *Client) ResizeCDSVolume(volumeId string, args *api.ResizeCSDVolumeArgs) (*api.ResizeCDSVolumeResult, error)

ResizeCDSVolume - resize a CDS volume

PARAMS:

  • volumeId: the specific CDS volume ID
  • args: the arguments to resize CDS volume

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) ResizeInstance

func (c *Client) ResizeInstance(instanceId string, args *api.ResizeInstanceArgs) error

ResizeInstance - resize a specific instance

PARAMS:

  • instanceId: the specific instance ID
  • args: the arguments to resize a specific instance

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) ResizeInstanceBySpec added in v0.9.15

func (c *Client) ResizeInstanceBySpec(instanceId string, args *api.ResizeInstanceArgs) error

ResizeInstanceBySpec - resize a specific instance

PARAMS:

  • instanceId: the specific instance ID
  • args: the arguments to resize a specific instance

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) RevokeSecurityGroupRule

func (c *Client) RevokeSecurityGroupRule(securityGroupId string, args *api.RevokeSecurityGroupArgs) error

RevokeSecurityGroupRule - revoke a security group rule

PARAMS:

  • securityGroupId: the specific securityGroup ID
  • args: the arguments to revoke security group rule

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) RevokeTransferReservedInstanceOrder added in v0.9.176

func (c *Client) RevokeTransferReservedInstanceOrder(args *api.TransferReservedInstanceOperateRequest) error

RevokeTransferReservedInstanceOrder - Batch revoke transfer reserved instance orders

PARAMS:

  • args: transfer record ids for operation

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) RollbackCDSVolume

func (c *Client) RollbackCDSVolume(volumeId string, args *api.RollbackCSDVolumeArgs) error

RollbackCDSVolume - rollback a CDS volume

PARAMS:

  • volumeId: the specific CDS volume ID
  • args: the arguments to rollback a CDS volume

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) ShareImage

func (c *Client) ShareImage(imageId string, args *api.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) StopInstanceWithNoCharge added in v0.9.15

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

StopInstance - stop an instance

PARAMS:

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

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) TagSnapshotChain added in v0.9.147

func (c *Client) TagSnapshotChain(chainId string, args *api.TagVolumeArgs) error

func (*Client) TagVolume added in v0.9.147

func (c *Client) TagVolume(volumeId string, args *api.TagVolumeArgs) error

func (*Client) TransferInReservedInstanceOrders added in v0.9.176

func (c *Client) TransferInReservedInstanceOrders(args *api.DescribeTransferReservedInstancesRequest) (*api.DescribeTransferInRecordsResponse, error)

TransferInReservedInstanceOrders - Search transfer in reserved instance orders

PARAMS:

  • args: the arguments to search transfer in reserved instance orders

RETURNS:

  • error: nil if success otherwise the specific error
  • DescribeTransferInRecordsResponse: search result

func (*Client) TransferOutReservedInstanceOrders added in v0.9.176

func (c *Client) TransferOutReservedInstanceOrders(args *api.DescribeTransferReservedInstancesRequest) (*api.DescribeTransferOutRecordsResponse, error)

TransferOutReservedInstanceOrders - Search transfer out reserved instance orders

PARAMS:

  • args: the arguments to search transfer out reserved instance orders

RETURNS:

  • error: nil if success otherwise the specific error
  • DescribeTransferOutRecordsResponse: search result

func (*Client) TransferReservedInstanceOrder added in v0.9.176

func (c *Client) TransferReservedInstanceOrder(args *api.TransferReservedInstanceRequest) (*[]string, error)

TransferReservedInstanceOrder - Batch transfer reserved instance orders to designated users

PARAMS:

  • args: the arguments to initiate transfer reserved instance order

RETURNS:

  • error: nil if success otherwise the specific error
  • []string: transfer record ids

func (*Client) UnBindImageToTags added in v0.9.147

func (c *Client) UnBindImageToTags(imageId string, args *api.UnBindTagsRequest) error

func (*Client) UnBindInstanceRole added in v0.9.147

func (c *Client) UnBindInstanceRole(args *api.UnBindInstanceRoleArgs) (*api.UnBindInstanceRoleResult, error)

func (*Client) UnBindInstanceToTags added in v0.9.15

func (c *Client) UnBindInstanceToTags(instanceId string, args *api.UnBindTagsRequest) error

UnBindInstanceToTags - unbind instance to tags

PARAMS:

  • instanceId: instanceId
  • args: the arguments to unBindInstanceToTags

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) UnBindSecurityGroup

func (c *Client) UnBindSecurityGroup(instanceId string, securityGroupId string) error

UnBindSecurityGroup - unbind a security group ID from instance

PARAMS:

  • instanceId: the specific instance ID
  • securityGroupId: the security group ID which need to unbind

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) UnShareImage

func (c *Client) UnShareImage(imageId string, args *api.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) UnbindInstanceToTagsByResourceType added in v0.9.174

func (c *Client) UnbindInstanceToTagsByResourceType(args *api.TagsOperationRequest) error

func (*Client) UnbindReservedInstanceFromTags added in v0.9.174

func (c *Client) UnbindReservedInstanceFromTags(args *api.ReservedTagsRequest) error

func (*Client) UntagSnapshotChain added in v0.9.147

func (c *Client) UntagSnapshotChain(chainId string, args *api.TagVolumeArgs) error

func (*Client) UntagVolume added in v0.9.147

func (c *Client) UntagVolume(volumeId string, args *api.TagVolumeArgs) error

func (*Client) UpdateAutoSnapshotPolicy

func (c *Client) UpdateAutoSnapshotPolicy(args *api.UpdateASPArgs) error

UpdateAutoSnapshotPolicy - update an auto snapshot policy

PARAMS:

  • args: the arguments to update an auto snapshot policy

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) UpdateInstanceDeploySet added in v0.9.66

func (c *Client) UpdateInstanceDeploySet(args *api.UpdateInstanceDeployArgs) (error, error)

UpdateInstanceDeploySet - update deployset and instance relation

PARAMS:

  • args: the arguments to update deployset and instance relation

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) UpdateKeypairDescription added in v0.9.18

func (c *Client) UpdateKeypairDescription(args *api.KeypairUpdateDescArgs) error

func (*Client) UpdateSecurityGroupRule added in v0.9.134

func (c *Client) UpdateSecurityGroupRule(args *api.UpdateSecurityGroupRuleArgs) error

UpdateSecurityGroupRule - update security group rule with the specific parameters

PARAMS:

  • args: the arguments to update the specific security group rule

RETURNS:

  • error: nil if success otherwise the specific error

Directories

Path Synopsis
Package api defines all APIs supported by the BCC service of BCE.
Package api defines all APIs supported by the BCC service of BCE.

Jump to

Keyboard shortcuts

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