Documentation ¶
Index ¶
- Constants
- type Client
- func (c *Client) AttachAutoSnapshotPolicy(aspId string, args *api.AttachASPArgs) error
- func (c *Client) AttachCDSVolume(volumeId string, args *api.AttachVolumeArgs) (*api.AttachVolumeResult, error)
- func (c *Client) AttachKeypair(args *api.AttackKeypairArgs) error
- func (c *Client) AuthorizeSecurityGroupRule(securityGroupId string, args *api.AuthorizeSecurityGroupArgs) error
- func (c *Client) AutoRenewCDSVolume(args *api.AutoRenewCDSVolumeArgs) error
- func (c *Client) BatchAddIP(args *api.BatchAddIpArgs) (*api.BatchAddIpResponse, error)
- func (c *Client) BatchCreateAutoRenewRules(args *api.BccCreateAutoRenewArgs) error
- func (c *Client) BatchDelIP(args *api.BatchDelIpArgs) error
- func (c *Client) BatchDeleteAutoRenewRules(args *api.BccDeleteAutoRenewArgs) error
- func (c *Client) BatchRebuildInstances(args *api.RebuildBatchInstanceArgs) error
- func (c *Client) BindInstanceToTags(instanceId string, args *api.BindTagsRequest) error
- func (c *Client) BindSecurityGroup(instanceId string, securityGroupId string) error
- func (c *Client) CancelAutoRenewCDSVolume(args *api.CancelAutoRenewCDSVolumeArgs) error
- func (c *Client) CancelBidOrder(args *api.CancelBidOrderRequest) (*api.CreateBidInstanceResult, error)
- func (c *Client) CancelRemoteCopyImage(imageId string) error
- func (c *Client) ChangeInstancePass(instanceId string, args *api.ChangeInstancePassArgs) error
- func (c *Client) ChangeToPrepaid(instanceId string, args *api.ChangeToPrepaidRequest) (*api.ChangeToPrepaidResponse, error)
- func (c *Client) CreateAutoSnapshotPolicy(args *api.CreateASPArgs) (*api.CreateASPResult, error)
- func (c *Client) CreateBidInstance(args *api.CreateInstanceArgs) (*api.CreateInstanceResult, error)
- func (c *Client) CreateCDSVolume(args *api.CreateCDSVolumeArgs) (*api.CreateCDSVolumeResult, error)
- func (c *Client) CreateCDSVolumeV3(args *api.CreateCDSVolumeV3Args) (*api.CreateCDSVolumeResult, error)
- func (c *Client) CreateDeploySet(args *api.CreateDeploySetArgs) (*api.CreateDeploySetResult, error)
- func (c *Client) CreateImage(args *api.CreateImageArgs) (*api.CreateImageResult, error)
- func (c *Client) CreateInstance(args *api.CreateInstanceArgs) (*api.CreateInstanceResult, error)
- func (c *Client) CreateInstanceBySpec(args *api.CreateInstanceBySpecArgs) (*api.CreateInstanceBySpecResult, error)
- func (c *Client) CreateInstanceV3(args *api.CreateInstanceV3Args) (*api.CreateInstanceV3Result, error)
- func (c *Client) CreateKeypair(args *api.CreateKeypairArgs) (*api.KeypairResult, error)
- func (c *Client) CreateSecurityGroup(args *api.CreateSecurityGroupArgs) (*api.CreateSecurityGroupResult, error)
- func (c *Client) CreateSnapshot(args *api.CreateSnapshotArgs) (*api.CreateSnapshotResult, error)
- func (c *Client) DeleteAutoSnapshotPolicy(aspId string) error
- func (c *Client) DeleteCDSVolume(volumeId string) error
- func (c *Client) DeleteCDSVolumeNew(volumeId string, args *api.DeleteCDSVolumeArgs) error
- func (c *Client) DeleteDeploySet(deploySetId string) error
- func (c *Client) DeleteImage(imageId string) error
- func (c *Client) DeleteInstance(instanceId string) error
- func (c *Client) DeleteInstanceIngorePayment(args *api.DeleteInstanceIngorePaymentArgs) (*api.DeleteInstanceResult, error)
- func (c *Client) DeleteInstanceWithRelateResource(instanceId string, args *api.DeleteInstanceWithRelateResourceArgs) error
- func (c *Client) DeleteKeypair(args *api.DeleteKeypairArgs) error
- func (c *Client) DeleteSecurityGroup(securityGroupId string) error
- func (c *Client) DeleteSnapshot(snapshotId string) error
- func (c *Client) DetachAutoSnapshotPolicy(aspId string, args *api.DetachASPArgs) error
- func (c *Client) DetachCDSVolume(volumeId string, args *api.DetachVolumeArgs) error
- func (c *Client) DetachKeypair(args *api.DetachKeypairArgs) error
- func (c *Client) GetAllStocks() (*api.GetAllStocksResult, error)
- func (c *Client) GetAutoSnapshotPolicy(aspId string) (*api.GetASPDetailResult, error)
- func (c *Client) GetAvailableDiskInfo(zoneName string) (*api.GetAvailableDiskInfoResult, error)
- func (c *Client) GetBidInstancePrice(args *api.GetBidInstancePriceArgs) (*api.GetBidInstancePriceResult, error)
- func (c *Client) GetCDSVolumeDetail(volumeId string) (*api.GetVolumeDetailResult, error)
- func (c *Client) GetCDSVolumeDetailV3(volumeId string) (*api.GetVolumeDetailResultV3, error)
- func (c *Client) GetDeploySet(deploySetId string) (*api.DeploySetResult, error)
- func (c *Client) GetImageDetail(imageId string) (*api.GetImageDetailResult, error)
- func (c *Client) GetImageOS(args *api.GetImageOsArgs) (*api.GetImageOsResult, error)
- func (c *Client) GetImageSharedUser(imageId string) (*api.GetImageSharedUserResult, error)
- func (c *Client) GetInstanceCreateStock(args *api.CreateInstanceStockArgs) (*api.InstanceStockResult, error)
- func (c *Client) GetInstanceDetail(instanceId string) (*api.GetInstanceDetailResult, error)
- func (c *Client) GetInstanceDetailWithDeploySet(instanceId string, isDeploySet bool) (*api.GetInstanceDetailResult, error)
- func (c *Client) GetInstanceDetailWithDeploySetAndFailed(instanceId string, isDeploySet bool, containsFailed bool) (*api.GetInstanceDetailResult, error)
- func (c *Client) GetInstanceNoChargeList(args *api.ListInstanceArgs) (*api.ListInstanceResult, error)
- func (c *Client) GetInstanceResizeStock(args *api.ResizeInstanceStockArgs) (*api.InstanceStockResult, error)
- func (c *Client) GetInstanceVNC(instanceId string) (*api.GetInstanceVNCResult, error)
- func (c *Client) GetKeypairDetail(keypairId string) (*api.KeypairResult, error)
- func (c *Client) GetPriceBySpec(args *api.GetPriceBySpecArgs) (*api.GetPriceBySpecResult, error)
- func (c *Client) GetSnapshotDetail(snapshotId string) (*api.GetSnapshotDetailResult, error)
- func (c *Client) ImportKeypair(args *api.ImportKeypairArgs) (*api.KeypairResult, error)
- func (c *Client) InstanceChangeSubnet(args *api.InstanceChangeSubnetArgs) error
- func (c *Client) InstanceChangeVpc(args *api.InstanceChangeVpcArgs) error
- func (c *Client) InstancePurchaseReserved(instanceId string, args *api.PurchaseReservedArgs) error
- func (c *Client) ListAutoSnapshotPolicy(args *api.ListASPArgs) (*api.ListASPResult, error)
- func (c *Client) ListBidFlavor() (*api.ListBidFlavorResult, error)
- func (c *Client) ListCDSVolume(queryArgs *api.ListCDSVolumeArgs) (*api.ListCDSVolumeResult, error)
- func (c *Client) ListCDSVolumeV3(queryArgs *api.ListCDSVolumeArgs) (*api.ListCDSVolumeResultV3, error)
- func (c *Client) ListDeploySets() (*api.ListDeploySetsResult, error)
- func (c *Client) ListFlavorSpec(args *api.ListFlavorSpecArgs) (*api.ListFlavorSpecResult, error)
- func (c *Client) ListImage(queryArgs *api.ListImageArgs) (*api.ListImageResult, error)
- func (c *Client) ListInstanceEnis(instanceId string) (*api.ListInstanceEniResult, error)
- func (c *Client) ListInstances(args *api.ListInstanceArgs) (*api.ListInstanceResult, error)
- func (c *Client) ListKeypairs(args *api.ListKeypairArgs) (*api.ListKeypairResult, error)
- func (c *Client) ListRecycleInstances(args *api.ListRecycleInstanceArgs) (*api.ListRecycleInstanceResult, error)
- func (c *Client) ListSecurityGroup(queryArgs *api.ListSecurityGroupArgs) (*api.ListSecurityGroupResult, error)
- func (c *Client) ListSnapshot(args *api.ListSnapshotArgs) (*api.ListSnapshotResult, error)
- func (c *Client) ListSnapshotChain(args *api.ListSnapshotChainArgs) (*api.ListSnapshotChainResult, error)
- func (c *Client) ListSpec() (*api.ListSpecResult, error)
- func (c *Client) ListTypeZones(args *api.ListTypeZonesArgs) (*api.ListTypeZonesResult, error)
- func (c *Client) ListZone() (*api.ListZoneResult, error)
- func (c *Client) ModifyCDSVolume(volumeId string, args *api.ModifyCSDVolumeArgs) error
- func (c *Client) ModifyChargeTypeCDSVolume(volumeId string, args *api.ModifyChargeTypeCSDVolumeArgs) error
- func (c *Client) ModifyDeploySet(deploySetId string, args *api.ModifyDeploySetArgs) (error, error)
- func (c *Client) ModifyInstanceAttribute(instanceId string, args *api.ModifyInstanceAttributeArgs) error
- func (c *Client) ModifyInstanceDesc(instanceId string, args *api.ModifyInstanceDescArgs) error
- func (c *Client) ModifyInstanceHostname(instanceId string, args *api.ModifyInstanceHostnameArgs) error
- func (c *Client) PurchaseReservedCDSVolume(volumeId string, args *api.PurchaseReservedCSDVolumeArgs) error
- func (c *Client) RebootInstance(instanceId string, forceStop bool) error
- func (c *Client) RebuildInstance(instanceId string, args *api.RebuildInstanceArgs) error
- func (c *Client) RecoveryInstance(args *api.RecoveryInstanceArgs) error
- func (c *Client) RemoteCopyImage(imageId string, args *api.RemoteCopyImageArgs) error
- func (c *Client) RenameCDSVolume(volumeId string, args *api.RenameCSDVolumeArgs) error
- func (c *Client) RenameKeypair(args *api.RenameKeypairArgs) error
- func (c *Client) ResizeCDSVolume(volumeId string, args *api.ResizeCSDVolumeArgs) error
- func (c *Client) ResizeInstance(instanceId string, args *api.ResizeInstanceArgs) error
- func (c *Client) ResizeInstanceBySpec(instanceId string, args *api.ResizeInstanceArgs) error
- func (c *Client) RevokeSecurityGroupRule(securityGroupId string, args *api.RevokeSecurityGroupArgs) error
- func (c *Client) RollbackCDSVolume(volumeId string, args *api.RollbackCSDVolumeArgs) error
- func (c *Client) ShareImage(imageId string, args *api.SharedUser) error
- func (c *Client) StartInstance(instanceId string) error
- func (c *Client) StopInstance(instanceId string, forceStop bool) error
- func (c *Client) StopInstanceWithNoCharge(instanceId string, forceStop bool, stopWithNoCharge bool) error
- func (c *Client) UnBindInstanceToTags(instanceId string, args *api.UnBindTagsRequest) error
- func (c *Client) UnBindSecurityGroup(instanceId string, securityGroupId string) error
- func (c *Client) UnShareImage(imageId string, args *api.SharedUser) error
- func (c *Client) UpdateAutoSnapshotPolicy(args *api.UpdateASPArgs) error
- func (c *Client) UpdateKeypairDescription(args *api.KeypairUpdateDescArgs) error
Constants ¶
const DEFAULT_SERVICE_DOMAIN = "bcc." + bce.DEFAULT_REGION + ".baidubce.com"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
Client of BCC service is a kind of BceClient, so derived from BceClient
func NewClient ¶
NewClient make the BCC service client with default configuration. Use `cli.Config.xxx` to access the config or change it to non-default value.
func (*Client) 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) 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) 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) 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) 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) BindSecurityGroup ¶
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 ¶
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) 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) 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) 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) 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) DeleteAutoSnapshotPolicy ¶
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 ¶
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
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 ¶
DeleteImage - delete an image
PARAMS:
- imageId: the specific image ID
RETURNS:
- error: nil if success otherwise the specific error
func (*Client) DeleteInstance ¶
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) DeleteKeypair ¶ added in v0.9.18
func (c *Client) DeleteKeypair(args *api.DeleteKeypairArgs) error
func (*Client) DeleteSecurityGroup ¶
DeleteSecurityGroup - delete a security group
PARAMS:
- securityGroupId: the specific securityGroup ID
RETURNS:
- error: nil if success otherwise the specific error
func (*Client) DeleteSnapshot ¶
DeleteSnapshot - delete a snapshot
PARAMS:
- snapshotId: the specific snapshot ID
RETURNS:
- 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) 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) GetInstanceCreateStock ¶ added in v0.9.18
func (c *Client) GetInstanceCreateStock(args *api.CreateInstanceStockArgs) (*api.InstanceStockResult, 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 (*Client) GetInstanceDetailWithDeploySetAndFailed ¶ added in v0.9.34
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) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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) ModifyDeploySet ¶ added in v0.9.11
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) 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) 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 ¶
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) RecoveryInstance ¶ added in v0.9.29
func (c *Client) RecoveryInstance(args *api.RecoveryInstanceArgs) 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) 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) RenameKeypair ¶ added in v0.9.18
func (c *Client) RenameKeypair(args *api.RenameKeypairArgs) error
func (*Client) ResizeCDSVolume ¶
func (c *Client) ResizeCDSVolume(volumeId string, args *api.ResizeCSDVolumeArgs) 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) 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 ¶
StartInstance - start an instance
PARAMS:
- instanceId: the specific instance ID
RETURNS:
- error: nil if success otherwise the specific error
func (*Client) StopInstance ¶
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) 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 ¶
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) 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) UpdateKeypairDescription ¶ added in v0.9.18
func (c *Client) UpdateKeypairDescription(args *api.KeypairUpdateDescArgs) error