api

package
v0.9.171 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2024 License: Apache-2.0 Imports: 10 Imported by: 27

Documentation

Overview

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

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

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

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

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

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

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

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

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

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

Index

Constants

View Source
const (
	RelatedRenewFlagCDS       string = "CDS"
	RelatedRenewFlagEIP       string = "EIP"
	RelatedRenewFlagMKT       string = "MKT"
	RelatedRenewFlagCDSEIP    string = "CDS_EIP"
	RelatedRenewFlagCDSMKT    string = "CDS_MKT"
	RelatedRenewFlagEIPMKT    string = "EIP_MKT"
	RelatedRenewFlagCDSEIPMKT string = "CDS_EIP_MKT"
)
View Source
const (
	URI_PREFIXV3 = bce.URI_PREFIX + "v3"
	URI_PREFIXV2 = bce.URI_PREFIX + "v2"
	URI_PREFIXV1 = bce.URI_PREFIX + "v1"

	REQUEST_ASP_URI              = "/asp"
	REQUEST_BATCHADDIP_URI       = "/batchAddIp"
	REQUEST_BATCHDELIP_URI       = "/batchDelIp"
	REQUEST_CREATE_URI           = "/create"
	REQUEST_DELETE_URI           = "/delete"
	REQUEST_UPDATE_URI           = "/updateRelation"
	REQUEST_DEL_URI              = "/delRelation"
	REQUEST_DEPLOYSET_URI        = "/deployset"
	REQUEST_IMAGE_URI            = "/image"
	REQUEST_IMAGE_SHAREDUSER_URI = "/sharedUsers"
	REQUEST_IMAGE_OS_URI         = "/os"
	REQUEST_INSTANCE_URI         = "/instance"
	REQUEST_INSTANCE_LABEL_URI   = "/instanceByLabel"
	REQUEST_LIST_URI             = "/list"
	REQUEST_SECURITYGROUP_URI    = "/securityGroup"
	REQUEST_SNAPSHOT_URI         = "/snapshot"
	REQUEST_CHAIN_URI            = "/chain"
	REQUEST_SPEC_URI             = "/instance/spec"
	REQUEST_SUBNET_URI           = "/subnet"
	REQUEST_VPC_URI              = "/vpc"
	REQUEST_VNC_SUFFIX           = "/vnc"
	REQUEST_VOLUME_URI           = "/volume"
	REQUEST_ZONE_URI             = "/zone"
	REQUEST_RECYCLE              = "/recycle"
	REQUEST_DELETEPREPAY         = "/volume/deletePrepay"
	//
	REQUEST_FLAVOR_SPEC_URI       = "/instance/flavorSpec"
	REQUEST_PRICE_URI             = "/price"
	REQUEST_AUTO_RENEW_URI        = "/autoRenew"
	REQUEST_CANCEL_AUTO_RENEW_URI = "/cancelAutoRenew"
	REQUEST_BID_PRICE_URI         = "/bidPrice"
	REQUEST_BID_FLAVOR_URI        = "/bidFlavor"
	//
	REQUEST_INSTANCE_PRICE_URI               = "/instance/price"
	REQUEST_INSTANCE_BY_SPEC_URI             = "/instanceBySpec"
	REQUEST_VOLUME_DISK_URI                  = "/volume/disk"
	REQUEST_TYPE_ZONE_URI                    = "/instance/flavorZones"
	REQUEST_ENI_URI                          = "/eni"
	REQUEST_KEYPAIR_URI                      = "/keypair"
	REQUEST_REBUILD_URI                      = "/rebuild"
	REQUEST_TAG_URI                          = "/tag"
	REQUEST_NOCHARGE_URI                     = "/noCharge"
	REQUEST_BID_URI                          = "/bid"
	REQUEST_RECOVERY_URI                     = "/recovery"
	REQUEST_CANCEL_BIDORDER_URI              = "/cancelBidOrder"
	REQUEST_BATCH_CREATE_AUTORENEW_RULES_URI = "/batchCreateAutoRenewRules"
	REQUEST_BATCH_Delete_AUTORENEW_RULES_URI = "/batchDeleteAutoRenewRules"
	REQUEST_GET_ALL_STOCKS                   = "/getAllStocks"
	REQUEST_GET_STOCK_WITH_DEPLOYSET         = "/getStockWithDeploySet"
	REQUEST_GET_STOCK_WITH_SPEC              = "/getStockWithSpec"
	REQUEST_DELETION_PROTECTION              = "/deletionProtection"
)

Variables

This section is empty.

Functions

func Aes128EncryptUseSecreteKey

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

func AttachAutoSnapshotPolicy

func AttachAutoSnapshotPolicy(cli bce.Client, aspId string, args *AttachASPArgs) error

AttachAutoSnapshotPolicy - attach an automatic snapshot policy to specified volumes

PARAMS:

  • cli: the client agent which can perform sending request
  • aspId: the id of the automatic snapshot policy
  • args: the arguments to attach automatic snapshot policy

RETURNS:

  • error: nil if success otherwise the specific error

func AttachKeypair added in v0.9.18

func AttachKeypair(cli bce.Client, args *AttackKeypairArgs) error

func AuthorizeSecurityGroupRule

func AuthorizeSecurityGroupRule(cli bce.Client, securityGroupId string, args *AuthorizeSecurityGroupArgs) error

AuthorizeSecurityGroupRule - authorize a rule of security group

PARAMS:

  • cli: the client agent which can perform sending request
  • securityGroupId: id of the security group
  • args: arguments to authorize security group rule

RETURNS:

  • error: nil if success otherwise the specific error

func AutoReleaseInstance added in v0.9.66

func AutoReleaseInstance(cli bce.Client, instanceId string, args *AutoReleaseArgs) error

AutoReleaseInstance - set releaseTime of a postpay instance

PARAMS:

  • cli: the client agent which can perform sending request
  • instanceId: the specific instance ID
  • args: the arguments to auto release instance

RETURNS:

  • error: nil if success otherwise the specific error

func AutoRenewCDSVolume added in v0.9.18

func AutoRenewCDSVolume(cli bce.Client, args *AutoRenewCDSVolumeArgs) error

AutoRenewCDSVolume - auto renew the specified cds volume

PARAMS:

  • cli: the client agent which can perform sending request
  • args: the arguments to auto renew the cds volume

RETURNS:

  • error: nil if success otherwise the specific error

func BatchCreateAutoRenewRules added in v0.9.21

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

BatchCreateAutoRenewRules - Batch Create AutoRenew Rules

PARAMS:

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

RETURNS:

  • error: nil if success otherwise the specific error

func BatchDelIp added in v0.9.8

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

BatchDelIp - Delete ips of instance

PARAMS:

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

RETURNS:

  • error: nil if success otherwise the specific error

func BatchDeleteAutoRenewRules added in v0.9.21

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

BatchDeleteAutoRenewRules - Batch Delete AutoRenew Rules

PARAMS:

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

RETURNS:

  • error: nil if success otherwise the specific error

func BatchDeleteInstanceWithRelatedResource added in v0.9.133

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

BatchDeleteInstanceWithRelatedResource - delete instance with related resources

PARAMS:

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

RETURNS:

  • error: nil if success otherwise the specific error

func BatchRebuildInstances added in v0.9.15

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

BatchRebuildInstances - batch rebuild instances

PARAMS:

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

RETURNS:

  • error: nil if success otherwise the specific error

func BatchStartInstance added in v0.9.133

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

BatchStartInstance - batch start specified instance

PARAMS:

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

RETURNS:

  • error: nil if success otherwise the specific error

func BatchStopInstance added in v0.9.133

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

BatchStopInstance - batch stop specified instance

PARAMS:

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

RETURNS:

  • error: nil if success otherwise the specific error

func BindImageToTags added in v0.9.147

func BindImageToTags(cli bce.Client, imageId string, reqBody *bce.Body) error

func BindInstanceToTags added in v0.9.15

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

bindInstanceToTags - bind instance to tags

PARAMS:

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

RETURNS:

  • error: nil if success otherwise the specific error

func BindSecurityGroup

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

BindSecurityGroup - bind security group for a specified instance

PARAMS:

  • cli: the client agent which can perform sending request
  • instanceId: id of the instance
  • reqBody: the request body to bind security group associate to the instance

RETURNS:

  • error: nil if success otherwise the specific error

func CancelAutoRenewCDSVolume added in v0.9.18

func CancelAutoRenewCDSVolume(cli bce.Client, args *CancelAutoRenewCDSVolumeArgs) error

CancelAutoRenewCDSVolume - cancel auto renew the specified cds volume

PARAMS:

  • cli: the client agent which can perform sending request
  • args: the arguments to cancel auto renew the cds volume

RETURNS:

  • error: nil if success otherwise the specific error

func CancelRemoteCopyImage

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

CancelRemoteCopyImage - cancel the image copy across regions

PARAMS:

  • cli: the client agent which can perform sending request
  • imageId: id of the image

RETURNS:

  • error: nil if success otherwise the specific error

func ChangeInstancePass

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

ChangeInstancePass - change password of specified instance

PARAMS:

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

RETURNS:

  • error: nil if success otherwise the specific error

func DelInstanceDeploy added in v0.9.66

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

func DeleteAutoSnapshotPolicy

func DeleteAutoSnapshotPolicy(cli bce.Client, aspId string) error

DeleteAutoSnapshotPolicy - delete an automatic snapshot policy

PARAMS:

  • cli: the client agent which can perform sending request
  • aspId: the id of the automatic snapshot policy

RETURNS:

  • error: nil if success otherwise the specific error

func DeleteCDSVolume

func DeleteCDSVolume(cli bce.Client, volumeId string) error

DeleteCDSVolume - delete a specified cds volume

PARAMS:

  • cli: the client agent which can perform sending request
  • volumeId: id of the cds volume to be deleted
  • :

RETURNS:

  • error: nil if success otherwise the specific error

func DeleteCDSVolumeNew

func DeleteCDSVolumeNew(cli bce.Client, volumeId string, args *DeleteCDSVolumeArgs) error

DeleteCDSVolumeNew - delete a specified cds volume, the difference from the above api is that \ can control whether to delete the snapshot associated with the volume

PARAMS:

  • cli: the client agent which can perform sending request
  • volumeId: id of the cds volume to be deleted
  • args: the arguments to delete cds volume

RETURNS:

  • error: nil if success otherwise the specific error

func DeleteDeploySet added in v0.9.11

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

DeleteDeploySet - delete a deploy set

PARAMS:

  • cli: the client agent which can perform sending request
  • deploySetId: the id of the deploy set
  • clientToken: idempotent token, an ASCII string no longer than 64 bits

RETURNS:

  • error: nil if success otherwise the specific error

func DeleteImage

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

DeleteImage - delete a specified image

PARAMS:

  • cli: the client agent which can perform sending request
  • imageId: id of image to be deleted

RETURNS:

  • error: nil if success otherwise the specific error

func DeleteInstance

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

DeleteInstance - delete a specified instance

PARAMS:

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

RETURNS:

  • error: nil if success otherwise the specific error

func DeleteInstanceWithRelatedResource

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

DeleteInstanceWithRelatedResource - delete an instance with related resources

PARAMS:

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

RETURNS:

  • error: nil if success otherwise the specific error

func DeleteIpv6 added in v0.9.147

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

func DeleteKeypair added in v0.9.18

func DeleteKeypair(cli bce.Client, args *DeleteKeypairArgs) error

func DeleteRecycledInstance added in v0.9.90

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

DeleteRecycledInstance - delete a recycled bcc instance

PARAMS:

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

RETURNS:

  • error: nil if success otherwise the specific error

func DeleteSecurityGroup

func DeleteSecurityGroup(cli bce.Client, securityGroupId string) error

DeleteSecurityGroup - delete a security group

PARAMS:

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

RETURNS:

  • error: nil if success otherwise the specific error

func DeleteSecurityGroupRule added in v0.9.134

func DeleteSecurityGroupRule(cli bce.Client, args *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 DeleteSnapshot

func DeleteSnapshot(cli bce.Client, snapshotId string) error

DeleteSnapshot - delete a snapshot

PARAMS:

  • cli: the client agent which can perform sending request
  • snapshotId: id of the snapshot to be deleted

RETURNS:

  • error: nil if success otherwise the specific error

func DetachAutoSnapshotPolicy

func DetachAutoSnapshotPolicy(cli bce.Client, aspId string, args *DetachASPArgs) error

DetachAutoSnapshotPolicy - detach an automatic snapshot policy for specified volumes

PARAMS:

  • cli: the client agent which can perform sending request
  • aspId: the id of the automatic snapshot policy
  • args: the arguments to detach automatic snapshot policy

RETURNS:

  • error: nil if success otherwise the specific error

func DetachCDSVolume

func DetachCDSVolume(cli bce.Client, volumeId string, args *DetachVolumeArgs) error

DetachCDSVolume - detach an cds volume for a specified instance

PARAMS:

  • cli: the client agent which can perform sending request
  • volumeId: id of the cds volume
  • args: the arguments of instance id detached from

RETURNS:

  • error: nil if success otherwise the specific error

func DetachKeypair added in v0.9.18

func DetachKeypair(cli bce.Client, args *DetachKeypairArgs) error

func GetCancelBidOrderUri added in v0.9.15

func GetCancelBidOrderUri() string

func GetCreateBidInstanceUri added in v0.9.15

func GetCreateBidInstanceUri() string

func GetInstanceDeleteProgress added in v0.9.146

func GetInstanceDeleteProgress(cli bce.Client, reqBody *bce.Body) (map[string]interface{}, error)

func GetInstanceNoChargeListUri added in v0.9.15

func GetInstanceNoChargeListUri() string

func InstanceChangeSubnet

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

InstanceChangeSubnet - change the subnet to which the instance belongs

PARAMS:

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

RETURNS:

  • error: nil if success otherwise the specific error

func InstanceChangeVpc added in v0.9.58

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

InstanceChangeVpc - change the vpc to which the instance belongs

PARAMS:

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

RETURNS:

  • error: nil if success otherwise the specific error

func ModifyCDSVolume

func ModifyCDSVolume(cli bce.Client, volumeId string, args *ModifyCSDVolumeArgs) error

ModifyCDSVolume - modify attributes of the specified cds volume

PARAMS:

  • cli: the client agent which can perform sending request
  • volumeId: id of the volume to be modified
  • args: arguments to modify volume

RETURNS:

  • error: nil if success otherwise the specific error

func ModifyChargeTypeCDSVolume

func ModifyChargeTypeCDSVolume(cli bce.Client, volumeId string, args *ModifyChargeTypeCSDVolumeArgs) error

ModifyChargeTypeCDSVolume - modify the volume billing method, only support Postpaid to Prepaid and Prepaid to Postpaid

PARAMS:

  • cli: the client agent which can perform sending request
  • volumeId: id of the volume to be modified
  • args: the arguments to modify volume billing method

RETURNS:

  • error: nil if success otherwise the specific error

func ModifyDeletionProtection added in v0.9.81

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

ModifyDeletionProtection - Modify deletion protection of specified instance

PARAMS:

  • cli: the client agent which can perform sending request
  • instanceId: id of the instance
  • reqBody: the request body to set an instance, default 0 for deletable and 1 for deletion protection

RETURNS:

  • error: nil if success otherwise the specific error

func ModifyDeploySet added in v0.9.11

func ModifyDeploySet(cli bce.Client, deploySetId string, clientToken string, reqBody *bce.Body) error

ModifyDeploySet - modify the deploy set atrribute

PARAMS:

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

RETURNS:

  • error: nil if success otherwise the specific error

func ModifyInstanceAttribute

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

ModifyInstanceAttribute - modify attribute of a specified instance

PARAMS:

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

RETURNS:

  • error: nil if success otherwise the specific error

func ModifyInstanceDesc

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

ModifyInstanceDesc - modify desc of a specified instance

PARAMS:

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

RETURNS:

  • error: nil if success otherwise the specific error

func ModifyInstanceHostname added in v0.9.34

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

ModifyInstanceHostname - modify hostname of a specified instance

PARAMS:

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

RETURNS:

  • error: nil if success otherwise the specific error

func PurchaseReservedCDSVolume

func PurchaseReservedCDSVolume(cli bce.Client, volumeId string, args *PurchaseReservedCSDVolumeArgs) error

PurchaseReservedCDSVolume - renew a specified volume to extend expiration time.

PARAMS:

  • cli: the client agent which can perform sending request
  • volumeId: id of the volume to be renewed
  • args: the arguments to renew cds volume

RETURNS:

  • error: nil if success otherwise the specific error

func RebootInstance

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

RebootInstance - reboot a specified instance

PARAMS:

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

RETURNS:

  • error: nil if success otherwise the specific error

func RebuildInstance

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

RebuildInstance - rebuild a specified instance

PARAMS:

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

RETURNS:

  • error: nil if success otherwise the specific error

func RecoveryInstance added in v0.9.29

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

func RemoteCopyImage

func RemoteCopyImage(cli bce.Client, imageId string, args *RemoteCopyImageArgs) error

RemoteCopyImage - copy custom images across regions, only custom images supported, the system \ and service integration images cannot be copied.

PARAMS:

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

RETURNS:

  • error: nil if success otherwise the specific error

func RenameCDSVolume

func RenameCDSVolume(cli bce.Client, volumeId string, args *RenameCSDVolumeArgs) error

RenameCDSVolume - rename a specified cds volume

PARAMS:

  • cli: the client agent which can perform sending request
  • volumeId: id of the volume to be renamed
  • args: the arguments to rename volume

RETURNS:

  • error: nil if success otherwise the specific error

func RenameKeypair added in v0.9.18

func RenameKeypair(cli bce.Client, args *RenameKeypairArgs) error

func ResizeCDSVolume

func ResizeCDSVolume(cli bce.Client, volumeId string, args *ResizeCSDVolumeArgs) error

ResizeCDSVolume - resize a specified cds volume

PARAMS:

  • cli: the client agent which can perform sending request
  • volumeId: id of the cds volume to be resized
  • args: the arguments to resize cds volume

RETURNS:

  • error: nil if success otherwise the specific error

func ResizeInstance

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

ResizeInstance - resize a specified instance

PARAMS:

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

RETURNS:

  • error: nil if success otherwise the specific error

func ResizeInstanceBySpec added in v0.9.15

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

ResizeInstanceBySpec - resize a specified instance

PARAMS:

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

RETURNS:

  • error: nil if success otherwise the specific error

func RevokeSecurityGroupRule

func RevokeSecurityGroupRule(cli bce.Client, securityGroupId string, args *RevokeSecurityGroupArgs) error

RevokeSecurityGroupRule - revoke a rule of security group

PARAMS:

  • cli: the client agent which can perform sending request
  • securityGroupId: id of the security group
  • args: arguments to revoke security group rule

RETURNS:

  • error: nil if success otherwise the specific error

func RollbackCDSVolume

func RollbackCDSVolume(cli bce.Client, volumeId string, args *RollbackCSDVolumeArgs) error

RollbackCDSVolume - roll back a specified cds volume

PARAMS:

  • cli: the client agent which can perform sending request
  • volumeId: id of the cds volume to be rolled back
  • args: the arguments to roll back the cds volume

RETURNS:

  • error: nil if success otherwise the specific error

func ShareImage

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

ShareImage - share a specified custom image

PARAMS:

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

RETURNS:

  • error: nil if success otherwise the specific error

func StartInstance

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

StartInstance - start a specified instance

PARAMS:

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

RETURNS:

  • error: nil if success otherwise the specific error

func StopInstance

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

StopInstance - stop a specified instance

PARAMS:

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

RETURNS:

  • error: nil if success otherwise the specific error

func TagSnapshotChain added in v0.9.147

func TagSnapshotChain(cli bce.Client, chainId string, args *TagVolumeArgs) error

func TagVolume added in v0.9.147

func TagVolume(cli bce.Client, volumeId string, args *TagVolumeArgs) error

func UnBindImageToTags added in v0.9.147

func UnBindImageToTags(cli bce.Client, imageId string, reqBody *bce.Body) error

func UnBindInstanceToTags added in v0.9.15

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

UnBindInstanceToTags - unbind instance to tags

PARAMS:

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

RETURNS:

  • error: nil if success otherwise the specific error

func UnBindSecurityGroup

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

UnBindSecurityGroup - unbind security group for a specified instance

PARAMS:

  • cli: the client agent which can perform sending request
  • instanceId: id of the instance
  • reqBody: the request body to unbind security group associate to the instance

RETURNS:

  • error: nil if success otherwise the specific error

func UnShareImage

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

UnShareImage - unshare a specified image

PARAMS:

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

RETURNS:

  • error: nil if success otherwise the specific error

func UntagSnapshotChain added in v0.9.147

func UntagSnapshotChain(cli bce.Client, chainId string, args *TagVolumeArgs) error

func UntagVolume added in v0.9.147

func UntagVolume(cli bce.Client, volumeId string, args *TagVolumeArgs) error

func UpdateAutoSnapshotPolicy

func UpdateAutoSnapshotPolicy(cli bce.Client, args *UpdateASPArgs) error

UpdateAutoSnapshotPolicy - update an automatic snapshot policy

PARAMS:

  • cli: the client agent which can perform sending request
  • args: the arguments to update automatic snapshot policy

RETURNS:

  • error: nil if success otherwise the specific error

func UpdateInstanceDeploy added in v0.9.66

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

func UpdateKeypairDescription added in v0.9.18

func UpdateKeypairDescription(cli bce.Client, args *KeypairUpdateDescArgs) error

func UpdateSecurityGroupRule added in v0.9.134

func UpdateSecurityGroupRule(cli bce.Client, args *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

Types

type AddIpv6Args added in v0.9.147

type AddIpv6Args struct {
	InstanceId  string `json:"instanceId"`
	Ipv6Address string `json:"ipv6Address"`
	Reboot      bool   `json:"reboot"`
}

type AddIpv6Result added in v0.9.147

type AddIpv6Result struct {
	Ipv6Address string `json:"ipv6Address"`
}

func AddIpv6 added in v0.9.147

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

type AttachASPArgs

type AttachASPArgs struct {
	VolumeIds []string `json:"volumeIds"`
}

type AttachVolumeArgs

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

type AttachVolumeResult

type AttachVolumeResult struct {
	VolumeAttachment *VolumeAttachmentModel `json:"volumeAttachment"`
}

func AttachCDSVolume

func AttachCDSVolume(cli bce.Client, volumeId string, args *AttachVolumeArgs) (*AttachVolumeResult, error)

AttachCDSVolume - attach an cds volume to a specified instance

PARAMS:

  • cli: the client agent which can perform sending request
  • volumeId: id of the cds volume
  • args: the arguments of instance id

RETURNS:

  • *AttachVolumeResult: the result of the attachment
  • error: nil if success otherwise the specific error

type AttackKeypairArgs added in v0.9.18

type AttackKeypairArgs struct {
	KeypairId   string   `json:"keypairId"`
	InstanceIds []string `json:"instanceIds"`
}

type AuthorizeSecurityGroupArgs

type AuthorizeSecurityGroupArgs struct {
	ClientToken string                  `json:"-"`
	Rule        *SecurityGroupRuleModel `json:"rule"`
}

type AutoReleaseArgs added in v0.9.66

type AutoReleaseArgs struct {
	ReleaseTime string `json:"releaseTime"`
}

type AutoRenewCDSVolumeArgs added in v0.9.18

type AutoRenewCDSVolumeArgs struct {
	VolumeId      string `json:"volumeId"`
	RenewTimeUnit string `json:"renewTimeUnit"`
	RenewTime     int    `json:"renewTime"`
	ClientToken   string `json:"-"`
}

type AutoSnapshotPolicy added in v0.9.147

type AutoSnapshotPolicy struct {
	AutoSnapshotPolicyId string `json:"autoSnapshotPolicyId"`
}

type AutoSnapshotPolicyModel

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

type AzIntstanceStatis added in v0.9.11

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

type AzIntstanceStatisDetail added in v0.9.18

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

type BatchAddIpArgs added in v0.9.8

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

type BatchAddIpResponse added in v0.9.18

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

func BatchAddIp added in v0.9.8

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

BatchAddIp - Add ips to instance

PARAMS:

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

RETURNS:

  • error: nil if success otherwise the specific error

type BatchChangeInstanceBillingMethodResult added in v0.9.147

type BatchChangeInstanceBillingMethodResult struct {
	OrderId string `json:"orderId"`
}

func BatchChangeInstanceToPostpay added in v0.9.147

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

func BatchChangeInstanceToPrepay added in v0.9.147

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

type BatchChangeInstanceToPostpayArgs added in v0.9.147

type BatchChangeInstanceToPostpayArgs struct {
	Config []PostpayConfig `json:"config"`
}

type BatchChangeInstanceToPrepayArgs added in v0.9.147

type BatchChangeInstanceToPrepayArgs struct {
	Config []PrepayConfig `json:"config"`
}

type BatchDelIpArgs added in v0.9.8

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

type BatchDeleteInstanceWithRelateResourceArgs added in v0.9.133

type BatchDeleteInstanceWithRelateResourceArgs struct {
	RelatedReleaseFlag    bool     `json:"relatedReleaseFlag"`
	DeleteCdsSnapshotFlag bool     `json:"deleteCdsSnapshotFlag"`
	BccRecycleFlag        bool     `json:"bccRecycleFlag"`
	DeleteRelatedEnisFlag bool     `json:"deleteRelatedEnisFlag"`
	InstanceIds           []string `json:"instanceIds"`
}

type BatchResizeInstanceArgs added in v0.9.133

type BatchResizeInstanceArgs struct {
	Spec           string   `json:"spec"`
	InstanceIdList []string `json:"instanceIdList"`
}

type BatchResizeInstanceResults added in v0.9.133

type BatchResizeInstanceResults struct {
	OrderUuidResults []string `json:"orderUuidResults"`
}

func BatchResizeInstance added in v0.9.133

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

BatchResizeInstance - batch resize a specified instance

PARAMS:

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

RETURNS:

  • error: nil if success otherwise the specific error

type BatchStartInstanceArgs added in v0.9.133

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

type BatchStopInstanceArgs added in v0.9.133

type BatchStopInstanceArgs struct {
	ForceStop        bool     `json:"forceStop"`
	StopWithNoCharge bool     `json:"stopWithNoCharge"`
	InstanceIds      []string `json:"instanceIds"`
}

type BbcStock added in v0.9.38

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

type BccCreateAutoRenewArgs added in v0.9.21

type BccCreateAutoRenewArgs struct {
	InstanceId    string `json:"instanceId"`
	RenewTimeUnit string `json:"renewTimeUnit"`
	RenewTime     int    `json:"renewTime"`
	RenewCds      bool   `json:"renewCds"`
	RenewEip      bool   `json:"renewEip"`
}

type BccDeleteAutoRenewArgs added in v0.9.21

type BccDeleteAutoRenewArgs struct {
	InstanceId string `json:"instanceId"`
	RenewCds   bool   `json:"renewCds"`
	RenewEip   bool   `json:"renewEip"`
}

type BccFlavor added in v0.9.18

type BccFlavor struct {
	CpuCount            int    `json:"cpuCount"`
	MemoryCapacityInGB  int    `json:"memoryCapacityInGB"`
	EphemeralDiskInGb   int    `json:"ephemeralDiskInGb"`
	EphemeralDiskCount  int    `json:"ephemeralDiskCount"`
	EphemeralDiskType   string `json:"ephemeralDiskType"`
	GpuCardType         string `json:"gpuCardType"`
	GpuCardCount        int    `json:"gpuCardCount"`
	FpgaCardType        string `json:"fpgaCardType"`
	FpgaCardCount       int    `json:"fpgaCardCount"`
	ProductType         string `json:"productType"`
	Spec                string `json:"spec"`
	SpecId              string `json:"specId"`
	CpuModel            string `json:"cpuModel"`
	CpuGHz              string `json:"cpuGHz"`
	NetworkBandwidth    string `json:"networkBandwidth"`
	NetworkPackage      string `json:"networkPackage"`
	NetEthQueueCount    string `json:"netEthQueueCount"`
	NetEthMaxQueueCount string `json:"netEthMaxQueueCount"`
}

type BccResource added in v0.9.18

type BccResource struct {
	InstanceType InstanceType `json:"instanceType"`
	Flavors      []Flavor     `json:"flavors"`
}

type BccResources added in v0.9.18

type BccResources struct {
	FlavorGroups []FlavorGroup `json:"flavorGroups"`
}

type BccStock added in v0.9.38

type BccStock struct {
	Spec              string `json:"spec"`
	SpecId            string `json:"specId"`
	InventoryQuantity int    `json:"inventoryQuantity"`
	RootOnLocal       bool   `json:"rootOnLocal"`
	UpdatedTime       string `json:"updatedTime"`
	CollectionTime    string `json:"collectionTime"`
	ZoneName          string `json:"logicalZone"`
}

type Billing

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

type BindInstanceRoleArgs added in v0.9.147

type BindInstanceRoleArgs struct {
	RoleName  string      `json:"roleName"`
	Instances []Instances `json:"instances"`
}

type BindInstanceRoleResult added in v0.9.147

type BindInstanceRoleResult struct {
	FailInstances            []FailInstances            `json:"failInstances"`
	InstanceRoleAssociations []InstanceRoleAssociations `json:"instanceRoleAssociations"`
}

func BindInstanceRole added in v0.9.147

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

type BindSecurityGroupArgs

type BindSecurityGroupArgs struct {
	SecurityGroupId string `json:"securityGroupId"`
}

type BindTagsRequest added in v0.9.15

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

type CancelAutoRenewCDSVolumeArgs added in v0.9.18

type CancelAutoRenewCDSVolumeArgs struct {
	VolumeId    string `json:"volumeId"`
	ClientToken string `json:"-"`
}

type CancelBidOrderRequest added in v0.9.15

type CancelBidOrderRequest struct {
	OrderId     string `json:"orderId"`
	ClientToken string `json:"-"`
}

type ChangeInstancePassArgs

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

type ChangeToPrepaidRequest added in v0.9.15

type ChangeToPrepaidRequest struct {
	Duration    int  `json:"duration"`
	RelationCds bool `json:"relationCds"`
}

type ChangeToPrepaidResponse added in v0.9.15

type ChangeToPrepaidResponse struct {
	OrderId string `json:"orderId"`
}

func ChangeToPrepaid added in v0.9.15

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

ChangeToPrepaid - to prepaid

PARAMS:

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

RETURNS:

  • error: nil if success otherwise the specific error

type CreateASPArgs

type CreateASPArgs struct {
	ClientToken    string   `json:"-"`
	Name           string   `json:"name"`
	TimePoints     []string `json:"timePoints"`
	RepeatWeekdays []string `json:"repeatWeekdays"`
	RetentionDays  string   `json:"retentionDays"`
}

type CreateASPResult

type CreateASPResult struct {
	AspId string `json:"aspId"`
}

func CreateAutoSnapshotPolicy

func CreateAutoSnapshotPolicy(cli bce.Client, args *CreateASPArgs) (*CreateASPResult, error)

CreateAutoSnapshotPolicy - create an automatic snapshot policy

PARAMS:

  • cli: the client agent which can perform sending request
  • args: the arguments to create automatic snapshot policy

RETURNS:

  • *CreateASPResult: the ID of the automatic snapshot policy newly created
  • error: nil if success otherwise the specific error

type CreateBidInstanceResult added in v0.9.15

type CreateBidInstanceResult struct {
	OrderId string `json:"orderId"`
}

func CancelBidOrder added in v0.9.15

func CancelBidOrder(cli bce.Client, clientToken string, reqBody *bce.Body) (*CreateBidInstanceResult, error)

CancelBidOrder - Cancel the bidding instance order.

PARAMS:

  • cli: the client agent which can perform sending request
  • reqBody: the request body to cancel bid order

RETURNS:

  • error: nil if success otherwise the specific error

type CreateCDSVolumeArgs

type CreateCDSVolumeArgs struct {
	Name               string               `json:"name,omitempty"`
	Description        string               `json:"description,omitempty"`
	SnapshotId         string               `json:"snapshotId,omitempty"`
	ZoneName           string               `json:"zoneName,omitempty"`
	PurchaseCount      int                  `json:"purchaseCount,omitempty"`
	CdsSizeInGB        int                  `json:"cdsSizeInGB,omitempty"`
	StorageType        StorageType          `json:"storageType,omitempty"`
	Billing            *Billing             `json:"billing"`
	EncryptKey         string               `json:"encryptKey"`
	RenewTimeUnit      string               `json:"renewTimeUnit"`
	RenewTime          int                  `json:"renewTime"`
	InstanceId         string               `json:"instanceId"`
	ClusterId          string               `json:"clusterId"`
	Tags               []model.TagModel     `json:"tags"`
	AutoSnapshotPolicy []AutoSnapshotPolicy `json:"autoSnapshotPolicy"`
	ClientToken        string               `json:"-"`
}

type CreateCDSVolumeResult

type CreateCDSVolumeResult struct {
	VolumeIds []string `json:"volumeIds"`
}

func CreateCDSVolume

func CreateCDSVolume(cli bce.Client, args *CreateCDSVolumeArgs) (*CreateCDSVolumeResult, error)

CreateCDSVolume - create a specified count of cds volumes

PARAMS:

  • cli: the client agent which can perform sending request
  • args: the arguments to create cds volumes

RETURNS:

  • *CreateCDSVolumeResult: the result of volume ids newly created
  • error: nil if success otherwise the specific error

func CreateCDSVolumeV3 added in v0.9.36

func CreateCDSVolumeV3(cli bce.Client, args *CreateCDSVolumeV3Args) (*CreateCDSVolumeResult, error)

CreateCDSVolumeV3 - create a specified count of cds volumes

PARAMS:

  • cli: the client agent which can perform sending request
  • args: the arguments to create cds volumes

RETURNS:

  • *CreateCDSVolumeResult: the result of volume ids newly created
  • error: nil if success otherwise the specific error

type CreateCDSVolumeV3Args added in v0.9.36

type CreateCDSVolumeV3Args struct {
	VolumeName           string        `json:"volumeName,omitempty"`
	Description          string        `json:"description,omitempty"`
	SnapshotId           string        `json:"snapshotId,omitempty"`
	ZoneName             string        `json:"zoneName,omitempty"`
	PurchaseCount        int           `json:"purchaseCount,omitempty"`
	VolumeSize           int           `json:"volumeSizeInGB,omitempty"`
	StorageType          StorageTypeV3 `json:"storageType,omitempty"`
	Billing              *Billing      `json:"billing"`
	EncryptKey           string        `json:"encryptKey"`
	AutoSnapshotPolicyId string        `json:"autoSnapshotPolicyId"`
	InstanceId           string        `json:"instanceId"`
	RenewTimeUnit        string        `json:"renewTimeUnit"`
	RenewTime            int           `json:"renewTime"`
	ClientToken          string        `json:"-"`
}

type CreateCdsModel

type CreateCdsModel struct {
	CdsSizeInGB int         `json:"cdsSizeInGB"`
	StorageType StorageType `json:"storageType"`
	SnapShotId  string      `json:"snapshotId,omitempty"`
}

type CreateCdsModelV3 added in v0.9.55

type CreateCdsModelV3 struct {
	CdsSizeInGB int           `json:"cdsSizeInGB"`
	StorageType StorageTypeV3 `json:"storageType"`
	SnapShotId  string        `json:"snapshotId,omitempty"`
}

type CreateDeploySetArgs added in v0.9.11

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

type CreateDeploySetResp added in v0.9.18

type CreateDeploySetResp struct {
	DeploySetIds []string `json:"deploySetIds"`
}

type CreateDeploySetResult added in v0.9.11

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

func CreateDeploySet added in v0.9.11

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

CreateDeploySet - create a deploy set

PARAMS:

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

RETURNS:

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

type CreateImageArgs

type CreateImageArgs struct {
	InstanceId  string `json:"instanceId,omitempty"`
	SnapshotId  string `json:"snapshotId,omitempty"`
	ImageName   string `json:"imageName"`
	IsRelateCds bool   `json:"relateCds"`
	EncryptKey  string `json:"encryptKey"`
	ClientToken string `json:"-"`
}

type CreateImageResult

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

func CreateImage

func CreateImage(cli bce.Client, args *CreateImageArgs) (*CreateImageResult, error)

CreateImage - create an image

PARAMS:

  • cli: the client agent which can perform sending request
  • args: the arguments to create image

RETURNS:

  • *CreateImageResult: the result of the image newly created
  • error: nil if success otherwise the specific error

type CreateInstanceArgs

type CreateInstanceArgs struct {
	ImageId                    string            `json:"imageId"`
	Billing                    Billing           `json:"billing"`
	InstanceType               InstanceType      `json:"instanceType,omitempty"`
	CpuCount                   int               `json:"cpuCount"`
	MemoryCapacityInGB         int               `json:"memoryCapacityInGB"`
	RootDiskSizeInGb           int               `json:"rootDiskSizeInGb,omitempty"`
	RootDiskStorageType        StorageType       `json:"rootDiskStorageType,omitempty"`
	LocalDiskSizeInGB          int               `json:"localDiskSizeInGB,omitempty"`
	EphemeralDisks             []EphemeralDisk   `json:"ephemeralDisks,omitempty"`
	CreateCdsList              []CreateCdsModel  `json:"createCdsList,omitempty"`
	NetWorkCapacityInMbps      int               `json:"networkCapacityInMbps,omitempty"`
	EipName                    string            `json:"eipName,omitempty"`
	DedicateHostId             string            `json:"dedicatedHostId,omitempty"`
	PurchaseCount              int               `json:"purchaseCount,omitempty"`
	Name                       string            `json:"name,omitempty"`
	Hostname                   string            `json:"hostname,omitempty"`
	IsOpenHostnameDomain       bool              `json:"isOpenHostnameDomain,omitempty"`
	AutoSeqSuffix              bool              `json:"autoSeqSuffix,omitempty"`
	AdminPass                  string            `json:"adminPass,omitempty"`
	ZoneName                   string            `json:"zoneName,omitempty"`
	SubnetId                   string            `json:"subnetId,omitempty"`
	SecurityGroupId            string            `json:"securityGroupId,omitempty"`
	EnterpriseSecurityGroupId  string            `json:"enterpriseSecurityGroupId,omitempty"`
	SecurityGroupIds           []string          `json:"securityGroupIds,omitempty"`
	EnterpriseSecurityGroupIds []string          `json:"enterpriseSecurityGroupIds,omitempty"`
	GpuCard                    string            `json:"gpuCard,omitempty"`
	FpgaCard                   string            `json:"fpgaCard,omitempty"`
	KunlunCard                 string            `json:"kunlunCard,omitempty"`
	IsomerismCard              string            `json:"isomerismCard,omitempty"`
	CardCount                  string            `json:"cardCount,omitempty"`
	AutoRenewTimeUnit          string            `json:"autoRenewTimeUnit"`
	AutoRenewTime              int               `json:"autoRenewTime"`
	CdsAutoRenew               bool              `json:"cdsAutoRenew"`
	RelationTag                bool              `json:"relationTag,omitempty"`
	IsOpenIpv6                 bool              `json:"isOpenIpv6,omitempty"`
	Tags                       []model.TagModel  `json:"tags,omitempty"`
	DeployId                   string            `json:"deployId,omitempty"`
	BidModel                   string            `json:"bidModel,omitempty"`
	BidPrice                   string            `json:"bidPrice,omitempty"`
	KeypairId                  string            `json:"keypairId,omitempty"`
	AspId                      string            `json:"aspId,omitempty"`
	InternetChargeType         string            `json:"internetChargeType,omitempty"`
	UserData                   string            `json:"userData,omitempty"`
	InternalIps                []string          `json:"internalIps,omitempty"`
	ClientToken                string            `json:"-"`
	RequestToken               string            `json:"requestToken"`
	DeployIdList               []string          `json:"deployIdList"`
	DetetionProtection         int               `json:"deletionProtection"`
	FileSystems                []FileSystemModel `json:"fileSystems,omitempty"`
	IsOpenHostEye              bool              `json:"isOpenHostEye,omitempty"`
	ResGroupId                 string            `json:"resGroupId,omitempty"`
}

type CreateInstanceArgsV2 added in v0.9.159

type CreateInstanceArgsV2 struct {
	ImageId                    string            `json:"imageId"`
	Billing                    Billing           `json:"billing"`
	InstanceType               InstanceType      `json:"instanceType,omitempty"`
	CpuCount                   int               `json:"cpuCount"`
	MemoryCapacityInGB         int               `json:"memoryCapacityInGB"`
	RootDiskSizeInGb           int               `json:"rootDiskSizeInGb,omitempty"`
	RootDiskStorageType        StorageType       `json:"rootDiskStorageType,omitempty"`
	LocalDiskSizeInGB          int               `json:"localDiskSizeInGB,omitempty"`
	EphemeralDisks             []EphemeralDisk   `json:"ephemeralDisks,omitempty"`
	CreateCdsList              []CreateCdsModel  `json:"createCdsList,omitempty"`
	NetWorkCapacityInMbps      int               `json:"networkCapacityInMbps,omitempty"`
	EipName                    string            `json:"eipName,omitempty"`
	DedicateHostId             string            `json:"dedicatedHostId,omitempty"`
	PurchaseCount              int               `json:"purchaseCount,omitempty"`
	Name                       string            `json:"name,omitempty"`
	Hostname                   string            `json:"hostname,omitempty"`
	IsOpenHostnameDomain       *bool             `json:"isOpenHostnameDomain"`
	AutoSeqSuffix              *bool             `json:"autoSeqSuffix"`
	AdminPass                  string            `json:"adminPass,omitempty"`
	ZoneName                   string            `json:"zoneName,omitempty"`
	SubnetId                   string            `json:"subnetId,omitempty"`
	SecurityGroupId            string            `json:"securityGroupId,omitempty"`
	EnterpriseSecurityGroupId  string            `json:"enterpriseSecurityGroupId,omitempty"`
	SecurityGroupIds           []string          `json:"securityGroupIds,omitempty"`
	EnterpriseSecurityGroupIds []string          `json:"enterpriseSecurityGroupIds,omitempty"`
	GpuCard                    string            `json:"gpuCard,omitempty"`
	FpgaCard                   string            `json:"fpgaCard,omitempty"`
	KunlunCard                 string            `json:"kunlunCard,omitempty"`
	IsomerismCard              string            `json:"isomerismCard,omitempty"`
	CardCount                  string            `json:"cardCount,omitempty"`
	AutoRenewTimeUnit          string            `json:"autoRenewTimeUnit"`
	AutoRenewTime              int               `json:"autoRenewTime"`
	CdsAutoRenew               *bool             `json:"cdsAutoRenew"`
	RelationTag                *bool             `json:"relationTag"`
	IsOpenIpv6                 *bool             `json:"isOpenIpv6"`
	Tags                       []model.TagModel  `json:"tags,omitempty"`
	DeployId                   string            `json:"deployId,omitempty"`
	BidModel                   string            `json:"bidModel,omitempty"`
	BidPrice                   string            `json:"bidPrice,omitempty"`
	KeypairId                  string            `json:"keypairId,omitempty"`
	AspId                      string            `json:"aspId,omitempty"`
	InternetChargeType         string            `json:"internetChargeType,omitempty"`
	UserData                   string            `json:"userData,omitempty"`
	InternalIps                []string          `json:"internalIps,omitempty"`
	ClientToken                string            `json:"-"`
	RequestToken               string            `json:"requestToken"`
	DeployIdList               []string          `json:"deployIdList"`
	DetetionProtection         int               `json:"deletionProtection"`
	FileSystems                []FileSystemModel `json:"fileSystems,omitempty"`
	IsOpenHostEye              *bool             `json:"isOpenHostEye"`
	ResGroupId                 string            `json:"resGroupId,omitempty"`
}

type CreateInstanceBySpecArgs added in v0.9.10

type CreateInstanceBySpecArgs struct {
	ImageId                    string           `json:"imageId"`
	Spec                       string           `json:"spec"`
	RootDiskSizeInGb           int              `json:"rootDiskSizeInGb,omitempty"`
	RootDiskStorageType        StorageType      `json:"rootDiskStorageType,omitempty"`
	EphemeralDisks             []EphemeralDisk  `json:"ephemeralDisks,omitempty"`
	CreateCdsList              []CreateCdsModel `json:"createCdsList,omitempty"`
	NetWorkCapacityInMbps      int              `json:"networkCapacityInMbps,omitempty"`
	EipName                    string           `json:"eipName,omitempty"`
	InternetChargeType         string           `json:"internetChargeType,omitempty"`
	PurchaseCount              int              `json:"purchaseCount,omitempty"`
	PurchaseMinCount           int              `json:"purchaseMinCount,omitempty"`
	Name                       string           `json:"name,omitempty"`
	Hostname                   string           `json:"hostname,omitempty"`
	IsOpenHostnameDomain       bool             `json:"isOpenHostnameDomain,omitempty"`
	AutoSeqSuffix              bool             `json:"autoSeqSuffix,omitempty"`
	AdminPass                  string           `json:"adminPass,omitempty"`
	Billing                    Billing          `json:"billing"`
	ZoneName                   string           `json:"zoneName,omitempty"`
	SubnetId                   string           `json:"subnetId,omitempty"`
	SecurityGroupId            string           `json:"securityGroupId,omitempty"`
	EnterpriseSecurityGroupId  string           `json:"enterpriseSecurityGroupId,omitempty"`
	SecurityGroupIds           []string         `json:"securityGroupIds,omitempty"`
	EnterpriseSecurityGroupIds []string         `json:"enterpriseSecurityGroupIds,omitempty"`
	RelationTag                bool             `json:"relationTag,omitempty"`
	Tags                       []model.TagModel `json:"tags,omitempty"`
	KeypairId                  string           `json:"keypairId"`
	AutoRenewTimeUnit          string           `json:"autoRenewTimeUnit"`
	AutoRenewTime              int              `json:"autoRenewTime"`
	RaidId                     string           `json:"raidId,omitempty"`
	EnableNuma                 bool             `json:"enableNuma,omitempty"`
	DataPartitionType          string           `json:"dataPartitionType,omitempty"`
	RootPartitionType          string           `json:"rootPartitionType,omitempty"`
	CdsAutoRenew               bool             `json:"cdsAutoRenew"`
	AspId                      string           `json:"aspId"`
	InternalIps                []string         `json:"internalIps,omitempty"`
	DeployId                   string           `json:"deployId,omitempty"`
	UserData                   string           `json:"userData,omitempty"`
	ClientToken                string           `json:"-"`
	RequestToken               string           `json:"requestToken"`
	DeployIdList               []string         `json:"deployIdList"`
	DetetionProtection         int              `json:"deletionProtection"`
	IsOpenIpv6                 bool             `json:"isOpenIpv6,omitempty"`
	SpecId                     string           `json:"specId,omitempty"`
	IsOpenHostEye              bool             `json:"isOpenHostEye,omitempty"`
	BidModel                   string           `json:"bidModel,omitempty"`
	BidPrice                   string           `json:"bidPrice,omitempty"`
	ResGroupId                 string           `json:"resGroupId,omitempty"`
}

type CreateInstanceBySpecArgsV2 added in v0.9.159

type CreateInstanceBySpecArgsV2 struct {
	ImageId                    string           `json:"imageId"`
	Spec                       string           `json:"spec"`
	RootDiskSizeInGb           int              `json:"rootDiskSizeInGb,omitempty"`
	RootDiskStorageType        StorageType      `json:"rootDiskStorageType,omitempty"`
	EphemeralDisks             []EphemeralDisk  `json:"ephemeralDisks,omitempty"`
	CreateCdsList              []CreateCdsModel `json:"createCdsList,omitempty"`
	NetWorkCapacityInMbps      int              `json:"networkCapacityInMbps,omitempty"`
	EipName                    string           `json:"eipName,omitempty"`
	InternetChargeType         string           `json:"internetChargeType,omitempty"`
	PurchaseCount              int              `json:"purchaseCount,omitempty"`
	PurchaseMinCount           int              `json:"purchaseMinCount,omitempty"`
	Name                       string           `json:"name,omitempty"`
	Hostname                   string           `json:"hostname,omitempty"`
	IsOpenHostnameDomain       *bool            `json:"isOpenHostnameDomain"`
	AutoSeqSuffix              *bool            `json:"autoSeqSuffix"`
	AdminPass                  string           `json:"adminPass,omitempty"`
	Billing                    Billing          `json:"billing"`
	ZoneName                   string           `json:"zoneName,omitempty"`
	SubnetId                   string           `json:"subnetId,omitempty"`
	SecurityGroupId            string           `json:"securityGroupId,omitempty"`
	EnterpriseSecurityGroupId  string           `json:"enterpriseSecurityGroupId,omitempty"`
	SecurityGroupIds           []string         `json:"securityGroupIds,omitempty"`
	EnterpriseSecurityGroupIds []string         `json:"enterpriseSecurityGroupIds,omitempty"`
	RelationTag                *bool            `json:"relationTag"`
	Tags                       []model.TagModel `json:"tags,omitempty"`
	KeypairId                  string           `json:"keypairId"`
	AutoRenewTimeUnit          string           `json:"autoRenewTimeUnit"`
	AutoRenewTime              int              `json:"autoRenewTime"`
	RaidId                     string           `json:"raidId,omitempty"`
	EnableNuma                 *bool            `json:"enableNuma"`
	DataPartitionType          string           `json:"dataPartitionType,omitempty"`
	RootPartitionType          string           `json:"rootPartitionType,omitempty"`
	CdsAutoRenew               *bool            `json:"cdsAutoRenew"`
	AspId                      string           `json:"aspId"`
	InternalIps                []string         `json:"internalIps,omitempty"`
	DeployId                   string           `json:"deployId,omitempty"`
	UserData                   string           `json:"userData,omitempty"`
	ClientToken                string           `json:"-"`
	RequestToken               string           `json:"requestToken"`
	DeployIdList               []string         `json:"deployIdList"`
	DetetionProtection         int              `json:"deletionProtection"`
	IsOpenIpv6                 *bool            `json:"isOpenIpv6"`
	SpecId                     string           `json:"specId,omitempty"`
	IsOpenHostEye              *bool            `json:"isOpenHostEye"`
	BidModel                   string           `json:"bidModel,omitempty"`
	BidPrice                   string           `json:"bidPrice,omitempty"`
	ResGroupId                 string           `json:"resGroupId,omitempty"`
	EnableHt                   *bool            `json:"enableHt"`
}

type CreateInstanceBySpecResult added in v0.9.10

type CreateInstanceBySpecResult struct {
	InstanceIds []string `json:"instanceIds"`
	OrderId     string   `json:"orderId,omitempty"`
}

func CreateInstanceBySpec added in v0.9.10

func CreateInstanceBySpec(cli bce.Client, args *CreateInstanceBySpecArgs, reqBody *bce.Body) (
	*CreateInstanceBySpecResult, error)

CreateInstanceBySpec - create an instance with specified spec.

PARAMS:

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

RETURNS:

  • *CreateInstanceBySpecResult: result of the instance ids newly created
  • error: nil if success otherwise the specific error

type CreateInstanceResult

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

func CreateBidInstance added in v0.9.15

func CreateBidInstance(cli bce.Client, clientToken string, reqBody *bce.Body) (*CreateInstanceResult, error)

createBidInstance - create an instance with specified parameters

PARAMS:

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

RETURNS:

  • *CreateInstanceResult: result of the instance ids newly created
  • error: nil if success otherwise the specific error

func CreateInstance

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

CreateInstance - create an instance with specified parameters

PARAMS:

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

RETURNS:

  • *CreateInstanceResult: result of the instance ids newly created
  • error: nil if success otherwise the specific error

func CreateInstanceByLabel added in v0.9.109

func CreateInstanceByLabel(cli bce.Client, args *CreateSpecialInstanceBySpecArgs, reqBody *bce.Body) (*CreateInstanceResult,
	error)

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

PARAMS:

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

RETURNS:

  • *CreateInstanceResult: result of the instance ids newly created
  • error: nil if success otherwise the specific error

type CreateInstanceStockArgs added in v0.9.18

type CreateInstanceStockArgs struct {
	EphemeralDisks     []EphemeralDisk `json:"ephemeralDisks,omitempty"`
	ZoneName           string          `json:"zoneName,omitempty"`
	CardCount          string          `json:"cardCount"`
	InstanceType       InstanceType    `json:"instanceType"`
	CpuCount           int             `json:"cpuCount"`
	MemoryCapacityInGB int             `json:"memoryCapacityInGB"`
	GpuCard            string          `json:"gpuCard"`
}

type CreateInstanceV3Args added in v0.9.55

type CreateInstanceV3Args struct {
	InstanceSpec          string                `json:"instanceSpec,omitempty"`
	SystemVolume          SystemVolume          `json:"systemVolume,omitempty"`
	DataVolumes           []DataVolume          `json:"dataVolumes,omitempty"`
	PurchaseCount         int                   `json:"purchaseCount,omitempty"`
	InstanceName          string                `json:"instanceName,omitempty"`
	HostName              string                `json:"hostName,omitempty"`
	AutoSeqSuffix         bool                  `json:"autoSeqSuffix,omitempty"`
	HostNameDomain        bool                  `json:"hostNameDomain,omitempty"`
	Password              string                `json:"password,omitempty"`
	Billing               Billing               `json:"billing"`
	ZoneName              string                `json:"zoneName,omitempty"`
	SubnetId              string                `json:"subnetId,omitempty"`
	SecurityGroupIds      []string              `json:"securityGroupIds,omitempty"`
	AssociatedResourceTag bool                  `json:"associatedResourceTag,omitempty"`
	Tags                  []model.TagModel      `json:"tags,omitempty"`
	KeypairId             string                `json:"keypairId,omitempty"`
	AutoRenewTime         int                   `json:"autoRenewTime,omitempty"`
	CdsAutoRenew          bool                  `json:"cdsAutoRenew,omitempty"`
	AutoSnapshotPolicyId  string                `json:"autoSnapshotPolicyId,omitempty"`
	PrivateIpAddresses    []string              `json:"privateIpAddresses,omitempty"`
	DeploymentSetId       string                `json:"deploymentSetId,omitempty"`
	DeployIdList          []string              `json:"deployIdList"`
	ImageId               string                `json:"imageId,omitempty"`
	UserData              string                `json:"userData,omitempty"`
	InstanceMarketOptions InstanceMarketOptions `json:"instanceMarketOptions,omitempty"`
	Ipv6                  bool                  `json:"ipv6,omitempty"`
	DedicatedHostId       string                `json:"dedicatedHostId,omitempty"`
	InternetAccessible    InternetAccessible    `json:"internetAccessible,omitempty"`
	ClientToken           string                `json:"-"`
	RequestToken          string                `json:"requestToken"`
	ResGroupId            string                `json:"resGroupId,omitempty"`
}

type CreateInstanceV3Result added in v0.9.55

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

func CreateInstanceV3 added in v0.9.55

func CreateInstanceV3(cli bce.Client, args *CreateInstanceV3Args, reqBody *bce.Body) (
	*CreateInstanceV3Result, error)

CreateInstanceV3 - create an instance with specified spec.

PARAMS:

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

RETURNS:

  • *CreateInstanceV3Result: result of the instance ids newly created
  • error: nil if success otherwise the specific error

type CreateKeypairArgs added in v0.9.18

type CreateKeypairArgs struct {
	ClientToken string `json:"-"`
	Name        string `json:"name"`
	Description string `json:"description"`
}

type CreateSecurityGroupArgs

type CreateSecurityGroupArgs struct {
	ClientToken string                   `json:"-"`
	Name        string                   `json:"name"`
	Desc        string                   `json:"desc,omitempty"`
	VpcId       string                   `json:"vpcId,omitempty"`
	Rules       []SecurityGroupRuleModel `json:"rules"`
	Tags        []model.TagModel         `json:"tags,omitempty"`
}

type CreateSecurityGroupResult

type CreateSecurityGroupResult struct {
	SecurityGroupId string `json:"securityGroupId"`
}

func CreateSecurityGroup

func CreateSecurityGroup(cli bce.Client, args *CreateSecurityGroupArgs) (*CreateSecurityGroupResult, error)

CreateSecurityGroup - create a security group and related rules

PARAMS:

  • cli: the client agent which can perform sending request
  • args: the arguments to create security group
  • :

RETURNS:

  • *CreateSecurityGroupResult: result of the security group id
  • error: nil if success otherwise the specific error

type CreateSnapshotArgs

type CreateSnapshotArgs struct {
	ClientToken  string           `json:"-"`
	VolumeId     string           `json:"volumeId"`
	SnapshotName string           `json:"snapshotName"`
	Description  string           `json:"desc,omitempty"`
	Tags         []model.TagModel `json:"tags"`
}

type CreateSnapshotResult

type CreateSnapshotResult struct {
	SnapshotId string `json:"snapshotId"`
}

func CreateSnapshot

func CreateSnapshot(cli bce.Client, args *CreateSnapshotArgs) (*CreateSnapshotResult, error)

CreateSnapshot - create a snapshot for specified volume

PARAMS:

  • cli: the client agent which can perform sending request
  • args: the arguments to create snapshot

RETURNS:

  • *CreateSnapshotResult: result of the snapshot id newly created
  • error: nil if success otherwise the specific error

type CreateSpecialInstanceBySpecArgs added in v0.9.109

type CreateSpecialInstanceBySpecArgs struct {
	ImageId                    string           `json:"imageId"`
	Spec                       string           `json:"spec"`
	RootDiskSizeInGb           int              `json:"rootDiskSizeInGb,omitempty"`
	RootDiskStorageType        StorageType      `json:"rootDiskStorageType,omitempty"`
	EphemeralDisks             []EphemeralDisk  `json:"ephemeralDisks,omitempty"`
	CreateCdsList              []CreateCdsModel `json:"createCdsList,omitempty"`
	NetWorkCapacityInMbps      int              `json:"networkCapacityInMbps,omitempty"`
	InternetChargeType         string           `json:"internetChargeType,omitempty"`
	PurchaseCount              int              `json:"purchaseCount,omitempty"`
	Name                       string           `json:"name,omitempty"`
	Hostname                   string           `json:"hostname,omitempty"`
	IsOpenHostnameDomain       bool             `json:"isOpenHostnameDomain,omitempty"`
	UserData                   string           `json:"userData,omitempty"`
	AutoSeqSuffix              bool             `json:"autoSeqSuffix,omitempty"`
	AdminPass                  string           `json:"adminPass,omitempty"`
	Billing                    Billing          `json:"billing"`
	ZoneName                   string           `json:"zoneName,omitempty"`
	SubnetId                   string           `json:"subnetId,omitempty"`
	SecurityGroupId            string           `json:"securityGroupId,omitempty"`
	EnterpriseSecurityGroupId  string           `json:"enterpriseSecurityGroupId,omitempty"`
	SecurityGroupIds           []string         `json:"securityGroupIds,omitempty"`
	EnterpriseSecurityGroupIds []string         `json:"enterpriseSecurityGroupIds,omitempty"`
	RelationTag                bool             `json:"relationTag,omitempty"`
	Tags                       []model.TagModel `json:"tags,omitempty"`
	KeypairId                  string           `json:"keypairId"`
	AutoRenewTimeUnit          string           `json:"autoRenewTimeUnit"`
	AutoRenewTime              int              `json:"autoRenewTime"`
	CdsAutoRenew               bool             `json:"cdsAutoRenew"`
	AspId                      string           `json:"aspId"`
	InternalIps                []string         `json:"internalIps,omitempty"`
	DeployId                   string           `json:"deployId,omitempty"`
	ClientToken                string           `json:"-"`
	RequestToken               string           `json:"requestToken"`
	DeployIdList               []string         `json:"deployIdList"`
	DetetionProtection         int              `json:"deletionProtection"`

	// CreateInstanceBySpecArgs 的基础上增加的参数
	LabelConstraints []LabelConstraint `json:"labelConstraints,omitempty"`
	ResGroupId       string            `json:"resGroupId,omitempty"`
}

type CreateSpecialInstanceBySpecResult added in v0.9.109

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

type DataVolume added in v0.9.55

type DataVolume struct {
	StorageType StorageTypeV3 `json:"storageType,omitempty"`
	VolumeSize  int           `json:"volumeSize,omitempty"`
	SnapshotId  string        `json:"snapshotId,omitempty"`
	EncryptKey  string        `json:"encryptKey,omitempty"`
}

type DataVolumeV3 added in v0.9.75

type DataVolumeV3 struct {
	VolumeId       string `json:"volumeId"`
	VolumeType     string `json:"volumeType"`
	VolumeSizeInGb int    `json:"volumeSizeInGb"`
	StorageType    string `json:"storageType"`
	SnapshotId     string `json:"snapshotId"`
	EncryptKey     string `json:"encryptKey"`
}

type DelInstanceDeployArgs added in v0.9.56

type DelInstanceDeployArgs struct {
	ClientToken string   `json:"-"`
	InstanceIds []string `json:"instanceIdList,omitempty"`
	DeploySetId string   `json:"deployId,omitempty"`
}

type DeleteCDSVolumeArgs

type DeleteCDSVolumeArgs struct {
	ManualSnapshot string `json:"manualSnapshot,omitempty"`
	AutoSnapshot   string `json:"autoSnapshot,omitempty"`
	Recycle        string `json:"recycle,omitempty"`
}

type DeleteInstanceIngorePaymentArgs added in v0.9.21

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

type DeleteInstanceModel added in v0.9.21

type DeleteInstanceModel struct {
	InstanceId  string   `json:"instanceId"`
	Eip         string   `json:"eip"`
	InsnapIds   []string `json:"insnapIds"`
	SnapshotIds []string `json:"snapshotIds"`
	VolumeIds   []string `json:"volumeIds"`
}

type DeleteInstanceResult added in v0.9.21

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

func DeleteInstanceIngorePayment added in v0.9.21

func DeleteInstanceIngorePayment(cli bce.Client, args *DeleteInstanceIngorePaymentArgs) (*DeleteInstanceResult, error)

type DeleteInstanceWithRelateResourceArgs

type DeleteInstanceWithRelateResourceArgs struct {
	RelatedReleaseFlag    bool `json:"relatedReleaseFlag"`
	DeleteCdsSnapshotFlag bool `json:"deleteCdsSnapshotFlag"`
	BccRecycleFlag        bool `json:"bccRecycleFlag"`
	DeleteRelatedEnisFlag bool `json:"deleteRelatedEnisFlag"`
	DeleteImmediate       bool `json:"deleteImmediate"`
}

type DeleteIpv6Args added in v0.9.147

type DeleteIpv6Args struct {
	InstanceId string `json:"instanceId"`
	Reboot     bool   `json:"reboot"`
}

type DeleteKeypairArgs added in v0.9.18

type DeleteKeypairArgs struct {
	KeypairId string `json:"keypairId"`
}

type DeletePrepaidInstanceWithRelateResourceArgs added in v0.9.166

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

type DeleteSecurityGroupRuleArgs added in v0.9.134

type DeleteSecurityGroupRuleArgs struct {
	SgVersion           int64  `json:"sgVersion,omitempty"`
	SecurityGroupRuleId string `json:"securityGroupRuleId"`
}

DeleteSecurityGroupRuleArgs defines the structure of input parameters for the DeleteSecurityGroupRule api

type DeletionProtectionArgs added in v0.9.81

type DeletionProtectionArgs struct {
	DeletionProtection int `json:"deletionProtection"`
}

type DeploySetModel added in v0.9.11

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

type DeploySetResult added in v0.9.18

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

func GetDeploySet added in v0.9.18

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

GetDeploySet - get details of the deploy set

PARAMS:

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

RETURNS:

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

type DeploySetSimpleModel added in v0.9.56

type DeploySetSimpleModel struct {
	Strategy    string `json:"strategy"`
	Name        string `json:"name"`
	Desc        string `json:"desc"`
	DeploySetId string `json:"deploysetId"`
	Concurrency int    `json:"concurrency"`
}

type DestRegionInfo added in v0.9.147

type DestRegionInfo struct {
	Name       string `json:"name"`
	DestRegion string `json:"destRegion"`
}

type DetachASPArgs

type DetachASPArgs struct {
	VolumeIds []string `json:"volumeIds"`
}

type DetachKeypairArgs added in v0.9.18

type DetachKeypairArgs struct {
	KeypairId   string   `json:"keypairId"`
	InstanceIds []string `json:"instanceIds"`
}

type DetachVolumeArgs

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

type DiskInfo added in v0.9.18

type DiskInfo struct {
	StorageType StorageType `json:"storageType"`
	MinDiskSize int         `json:"minDiskSize"`
	MaxDiskSize int         `json:"maxDiskSize"`
}

type DiskZoneResource added in v0.9.18

type DiskZoneResource struct {
	ZoneName  string     `json:"zoneName"`
	DiskInfos []DiskInfo `json:"diskInfos"`
}

type EbcFlavor added in v0.9.147

type EbcFlavor struct {
	CpuCount           int    `json:"cpuCount"`
	MemoryCapacityInGB int    `json:"memoryCapacityInGB"`
	EphemeralDiskInGb  int    `json:"ephemeralDiskInGb"`
	EphemeralDiskCount string `json:"ephemeralDiskCount"`
	EphemeralDiskType  string `json:"ephemeralDiskType"`
	GpuCardType        string `json:"gpuCardType"`
	GpuCardCount       string `json:"gpuCardCount"`
	FpgaCardType       string `json:"fpgaCardType"`
	FpgaCardCount      string `json:"fpgaCardCount"`
	ProductType        string `json:"productType"`
	Spec               string `json:"spec"`
	SpecId             string `json:"specId"`
	CpuModel           string `json:"cpuModel"`
	CpuGHz             string `json:"cpuGHz"`
	NetworkBandwidth   string `json:"networkBandwidth"`
	NetworkPackage     string `json:"networkPackage"`
}

type EbcFlavorGroup added in v0.9.147

type EbcFlavorGroup struct {
	GroupId string      `json:"groupId"`
	Flavors []EbcFlavor `json:"flavors"`
}

type EbcResources added in v0.9.147

type EbcResources struct {
	FlavorGroups []EbcFlavorGroup `json:"flavorGroups"`
}

type Eni added in v0.9.18

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

type EphemeralDisk

type EphemeralDisk struct {
	StorageType  StorageType `json:"storageType"`
	SizeInGB     int         `json:"sizeInGB"`
	FreeSizeInGB int         `json:"freeSizeInGB"`
}

type EphemeralDiskV3 added in v0.9.55

type EphemeralDiskV3 struct {
	StorageType  StorageTypeV3 `json:"storageType"`
	SizeInGB     int           `json:"sizeInGB"`
	FreeSizeInGB int           `json:"freeSizeInGB"`
}

type FailInstances added in v0.9.147

type FailInstances struct {
	InstanceId  string `json:"instanceId"`
	FailMessage string `json:"failMessage"`
}

type FileSystemModel added in v0.9.147

type FileSystemModel struct {
	FsID     string `json:"fsId"`
	MountAds string `json:"mountAds"`
	Path     string `json:"path"`
	Protocol string `json:"protocol"`
}

type Flavor added in v0.9.18

type Flavor struct {
	SpecId             string `json:"specId"`
	CpuCount           int    `json:"cpuCount"`
	MemoryCapacityInGB int    `json:"memoryCapacityInGB"`
	ProductType        string `json:"productType"`
	Spec               string `json:"spec"`
}

type FlavorGroup added in v0.9.18

type FlavorGroup struct {
	GroupId string      `json:"groupId"`
	Flavors []BccFlavor `json:"flavors"`
}

type GetASPDetailResult

type GetASPDetailResult struct {
	AutoSnapshotPolicy AutoSnapshotPolicyModel `json:"autoSnapshotPolicy"`
}

func GetAutoSnapshotPolicyDetail

func GetAutoSnapshotPolicyDetail(cli bce.Client, aspId string) (*GetASPDetailResult, error)

GetAutoSnapshotPolicyDetail - get details of the specified automatic snapshot policy

PARAMS:

  • cli: the client agent which can perform sending request
  • aspId: the id of the automatic snapshot policy

RETURNS:

  • *GetASPDetailResult: the result of the given automatic snapshot policy
  • error: nil if success otherwise the specific error

type GetAllStocksResult added in v0.9.38

type GetAllStocksResult struct {
	BccStocks []BccStock `json:"bccStocks"`
	BbcStocks []BbcStock `json:"bbcStocks"`
}

func GetAllStocks added in v0.9.38

func GetAllStocks(cli bce.Client) (*GetAllStocksResult, error)

GetAllStocks - get the bcc and bbc's stock

PARAMS:

  • cli: the client agent which can perform sending request

RETURNS:

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

type GetAvailableDiskInfoResult added in v0.9.18

type GetAvailableDiskInfoResult struct {
	CdsUsedCapacityGB  string             `json:"cdsUsedCapacityGB"`
	CdsCreated         string             `json:"cdsCreated"`
	CdsTotalCapacityGB string             `json:"cdsTotalCapacityGB"`
	CdsTotal           string             `json:"cdsTotal"`
	CdsRatio           string             `json:"cdsRatio"`
	DiskZoneResources  []DiskZoneResource `json:"diskZoneResources"`
}

func GetAvailableDiskInfo added in v0.9.18

func GetAvailableDiskInfo(cli bce.Client, zoneName string) (*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

type GetAvailableImagesBySpecArg added in v0.9.159

type GetAvailableImagesBySpecArg struct {
	Marker  string `json:"marker"`
	MaxKeys int    `json:"maxKeys"`
	Spec    string `json:"spec"`
	OsName  string `json:"osName"`
}

type GetAvailableImagesBySpecResult added in v0.9.159

type GetAvailableImagesBySpecResult struct {
	IsTruncated bool     `json:"isTruncated"`
	Marker      string   `json:"marker"`
	MaxKeys     int      `json:"maxKeys"`
	NextMarker  string   `json:"nextMarker"`
	Images      ImageArg `json:"images"`
}

func GetAvailableImagesBySpec added in v0.9.159

func GetAvailableImagesBySpec(cli bce.Client, args *GetAvailableImagesBySpecArg) (*GetAvailableImagesBySpecResult, error)

type GetBidInstancePriceArgs added in v0.9.18

type GetBidInstancePriceArgs struct {
	InstanceType          InstanceType     `json:"instanceType"`
	CpuCount              int              `json:"cpuCount"`
	MemoryCapacityInGB    int              `json:"memoryCapacityInGB"`
	RootDiskSizeInGb      int              `json:"rootDiskSizeInGb,omitempty"`
	RootDiskStorageType   StorageType      `json:"rootDiskStorageType,omitempty"`
	CreateCdsList         []CreateCdsModel `json:"createCdsList,omitempty"`
	PurchaseCount         int              `json:"purchaseCount,omitempty"`
	Name                  string           `json:"name,omitempty"`
	AdminPass             string           `json:"adminPass,omitempty"`
	KeypairId             string           `json:"keypairId,omitempty"`
	AspId                 string           `json:"aspId,omitempty"`
	ImageId               string           `json:"imageId,omitempty"`
	BidModel              string           `json:"bidModel,omitempty"`
	BidPrice              string           `json:"bidPrice,omitempty"`
	NetWorkCapacityInMbps int              `json:"networkCapacityInMbps,omitempty"`
	RelationTag           bool             `json:"relationTag,omitempty"`
	Tags                  []model.TagModel `json:"tags,omitempty"`
	SecurityGroupId       string           `json:"securityGroupId,omitempty"`
	SubnetId              string           `json:"subnetId,omitempty"`
	ZoneName              string           `json:"zoneName,omitempty"`
	InternetChargeType    string           `json:"internetChargeType,omitempty"`
	ClientToken           string           `json:"-"`
}

type GetBidInstancePriceResult added in v0.9.18

type GetBidInstancePriceResult struct {
	Money    string `json:"money"`
	Count    string `json:"count"`
	PerMoney string `json:"perMoney"`
}

func GetBidInstancePrice added in v0.9.18

func GetBidInstancePrice(cli bce.Client, clientToken string, reqBody *bce.Body) (*GetBidInstancePriceResult, error)

GetBidInstancePrice - get the market price of the specified bidding instance

PARAMS:

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

RETURNS:

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

type GetDeploySetResult added in v0.9.11

type GetDeploySetResult struct {
	DeploySetModel
}

type GetImageDetailResult

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

func GetImageDetail

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

GetImageDetail - get details of the specified image

PARAMS:

  • cli: the client agent which can perform sending request
  • imageId: id of the image

RETURNS:

  • *GetImageDetailResult: result of image details
  • error: nil if success otherwise the specific error

type GetImageOsArgs

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

type GetImageOsResult

type GetImageOsResult struct {
	OsInfo []OsModel `json:"osInfo"`
}

func GetImageOS

func GetImageOS(cli bce.Client, args *GetImageOsArgs) (*GetImageOsResult, error)

GetImageOS - get the operating system information of the instance in batches according to the instance ids

PARAMS:

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

RETURNS:

  • *GetImageOsResult: result of the operating system information
  • error: nil if success otherwise the specific error

type GetImageSharedUserResult

type GetImageSharedUserResult struct {
	Users []SharedUser `json:"users"`
}

func GetImageSharedUser

func GetImageSharedUser(cli bce.Client, imageId string) (*GetImageSharedUserResult, error)

GetImageSharedUser - get the list of users that the image has been shared with

PARAMS:

  • cli: the client agent which can perform sending request
  • imageId: id of the image

RETURNS:

  • *GetImageSharedUserResult: result of the shared users
  • error: nil if success otherwise the specific error

type GetInstanceDeleteProgressArgs added in v0.9.146

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

type GetInstanceDetailResult

type GetInstanceDetailResult struct {
	Instance InstanceModel `json:"instance"`
}

func GetInstanceDetail

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

GetInstanceDetail - get details of the specified instance

PARAMS:

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

RETURNS:

  • *GetInstanceDetailResult: result of the instance details
  • error: nil if success otherwise the specific error

func GetInstanceDetailWithDeploySet added in v0.9.18

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

func GetInstanceDetailWithDeploySetAndFailed added in v0.9.34

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

type GetInstanceVNCResult

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

func GetInstanceVNC

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

GetInstanceVNC - get VNC address of the specified instance

PARAMS:

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

RETURNS:

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

type GetPriceBySpecArgs added in v0.9.18

type GetPriceBySpecArgs struct {
	SpecId         string `json:"specId"`
	Spec           string `json:"spec"`
	PaymentTiming  string `json:"paymentTiming"`
	ZoneName       string `json:"zoneName"`
	PurchaseCount  int    `json:"purchaseCount,omitempty"`
	PurchaseLength int    `json:"purchaseLength"`
}

type GetPriceBySpecResult added in v0.9.18

type GetPriceBySpecResult struct {
	Price []SpecIdPrices `json:"price"`
}

func GetPriceBySpec added in v0.9.18

func GetPriceBySpec(cli bce.Client, args *GetPriceBySpecArgs) (*GetPriceBySpecResult, error)

GetPriceBySpec - get the price information of specified instance.

PARAMS:

  • cli: the client agent which can perform sending request
  • args: the arguments to get the price information of specified instance.

RETURNS:

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

type GetSnapshotDetailResult

type GetSnapshotDetailResult struct {
	Snapshot SnapshotModel `json:"snapshot"`
}

func GetSnapshotDetail

func GetSnapshotDetail(cli bce.Client, snapshotId string) (*GetSnapshotDetailResult, error)

GetSnapshotDetail - get details of the specified snapshot

PARAMS:

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

RETURNS:

  • *GetSnapshotDetailResult: result of snapshot details
  • error: nil if success otherwise the specific error

type GetStockWithDeploySetArgs added in v0.9.65

type GetStockWithDeploySetArgs struct {
	Spec         string   `json:"spec"`
	DeploySetIds []string `json:"deploySetIds"`
}

type GetStockWithDeploySetResults added in v0.9.65

type GetStockWithDeploySetResults struct {
	BccStocks []BccStock `json:"bccStocks"`
}

func GetStockWithDeploySet added in v0.9.65

func GetStockWithDeploySet(cli bce.Client, args *GetStockWithDeploySetArgs) (*GetStockWithDeploySetResults, error)

GetStockWithDeploySet - get the bcc's stock with deploySet

PARAMS:

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

RETURNS:

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

type GetStockWithSpecArgs added in v0.9.100

type GetStockWithSpecArgs struct {
	Spec         string   `json:"spec"`
	DeploySetIds []string `json:"deploySetIds"`
}

type GetStockWithSpecResults added in v0.9.100

type GetStockWithSpecResults struct {
	BccStocks []BccStock `json:"bccStocks"`
}

func GetStockWithSpec added in v0.9.100

func GetStockWithSpec(cli bce.Client, args *GetStockWithSpecArgs) (*GetStockWithSpecResults, error)

GetStockWithSpec - get the bcc's stock with spec

PARAMS:

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

RETURNS:

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

type GetVolumeDetailResult

type GetVolumeDetailResult struct {
	Volume *VolumeModel `json:"volume"`
}

func GetCDSVolumeDetail

func GetCDSVolumeDetail(cli bce.Client, volumeId string) (*GetVolumeDetailResult, error)

GetCDSVolumeDetail - get details of the specified cds volume

PARAMS:

  • cli: the client agent which can perform sending request
  • volumeId: id of the cds volume

RETURNS:

  • *GetVolumeDetailResult: the result of the specified cds volume details
  • error: nil if success otherwise the specific error

type GetVolumeDetailResultV3 added in v0.9.36

type GetVolumeDetailResultV3 struct {
	Volume *VolumeModelV3 `json:"volume"`
}

func GetCDSVolumeDetailV3 added in v0.9.36

func GetCDSVolumeDetailV3(cli bce.Client, volumeId string) (*GetVolumeDetailResultV3, error)

GetCDSVolumeDetail - get details of the specified cds volume

PARAMS:

  • cli: the client agent which can perform sending request
  • volumeId: id of the cds volume

RETURNS:

  • *GetVolumeDetailResultV3: the result of the specified cds volume details
  • error: nil if success otherwise the specific error

type IdMapping added in v0.9.133

type IdMapping struct {
	Uuid string `json:"uuid"`
	Id   string `json:"id"`
}

type ImageArg added in v0.9.159

type ImageArg []struct {
	ImageID      string `json:"imageId"`
	ImageName    string `json:"imageName"`
	OsType       string `json:"osType"`
	OsVersion    string `json:"osVersion"`
	OsArch       string `json:"osArch"`
	OsName       string `json:"osName"`
	OsLang       string `json:"osLang"`
	MinSizeInGiB int    `json:"minSizeInGiB"`
}

type ImageModel

type ImageModel struct {
	OsVersion      string          `json:"osVersion"`
	OsArch         string          `json:"osArch"`
	OsLang         string          `json:"osLang"`
	Status         ImageStatus     `json:"status"`
	Desc           string          `json:"desc"`
	Id             string          `json:"id"`
	Name           string          `json:"name"`
	OsName         string          `json:"osName"`
	OsBuild        string          `json:"osBuild"`
	CreateTime     string          `json:"createTime"`
	Type           ImageType       `json:"type"`
	OsType         string          `json:"osType"`
	SpecialVersion string          `json:"specialVersion"`
	Package        bool            `json:"package"`
	Encrypted      bool            `json:"encrypted"`
	MinDiskGb      int             `json:"minDiskGb"`
	DiskSize       int             `json:"diskSize"`
	Snapshots      []SnapshotModel `json:"snapshots"`
}

type ImageStatus

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

type ImageType

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

	// ImageTypeAll 所有镜像类型
	ImageTypeAll ImageType = "All"

	// ImageTypeSharing 共享镜像
	ImageTypeSharing ImageType = "Sharing"

	// ImageTypeGPUSystem gpu公有
	ImageTypeGPUSystem ImageType = "GpuBccSystem"

	// ImageTypeGPUCustom gpu 自定义
	ImageTypeGPUCustom ImageType = "GpuBccCustom"

	// ImageTypeBBCSystem BBC 公有
	ImageTypeBBCSystem ImageType = "BbcSystem"

	// ImageTypeBBCCustom BBC 自定义
	ImageTypeBBCCustom ImageType = "BbcCustom"
)

type ImportCustomImageArgs added in v0.9.147

type ImportCustomImageArgs struct {
	OsName    string `json:"osName"`
	OsArch    string `json:"osArch"`
	OsType    string `json:"osType"`
	OsVersion string `json:"osVersion"`
	Name      string `json:"name"`
	BosURL    string `json:"bosUrl"`
}

type ImportCustomImageResult added in v0.9.147

type ImportCustomImageResult struct {
	Id string `json:"id"`
}

func ImportCustomImage added in v0.9.147

func ImportCustomImage(cli bce.Client, args *ImportCustomImageArgs) (*ImportCustomImageResult, error)

type ImportKeypairArgs added in v0.9.18

type ImportKeypairArgs struct {
	ClientToken string `json:"-"`
	Name        string `json:"name"`
	Description string `json:"description"`
	PublicKey   string `json:"publicKey"`
}

type InstanceChangeSubnetArgs

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

type InstanceChangeVpcArgs added in v0.9.58

type InstanceChangeVpcArgs struct {
	InstanceId                 string   `json:"instanceId"`
	SubnetId                   string   `json:"subnetId"`
	InternalIp                 string   `json:"internalIp"`
	Reboot                     bool     `json:"reboot"`
	SecurityGroupIds           []string `json:"securityGroupIds"`
	EnterpriseSecurityGroupIds []string `json:"enterpriseSecurityGroupIds"`
}

type InstanceDeleteResultModel added in v0.9.166

type InstanceDeleteResultModel struct {
	InstanceId  string   `json:"instanceId"`
	Eip         string   `json:"eip"`
	InsnapIds   []string `json:"insnapIds"`
	SnapshotIds []string `json:"snapshotIds"`
	VolumeIds   []string `json:"volumeIds"`
}

type InstanceMarketOptions added in v0.9.55

type InstanceMarketOptions struct {
	SpotOption string `json:"spotOption,omitempty"`
	SpotPrice  string `json:"spotPrice,omitempty"`
}

type InstanceModel

type InstanceModel struct {
	InstanceId            string                 `json:"id"`
	SerialNumber          string                 `json:"serialNumber"`
	InstanceName          string                 `json:"name"`
	Hostname              string                 `json:"hostname"`
	InstanceType          InstanceType           `json:"instanceType"`
	Spec                  string                 `json:"spec"`
	Description           string                 `json:"desc"`
	Status                InstanceStatus         `json:"status"`
	PaymentTiming         string                 `json:"paymentTiming"`
	CreationTime          string                 `json:"createTime"`
	ExpireTime            string                 `json:"expireTime"`
	ReleaseTime           string                 `json:"releaseTime"`
	PublicIP              string                 `json:"publicIp"`
	InternalIP            string                 `json:"internalIp"`
	CpuCount              int                    `json:"cpuCount"`
	IsomerismCard         string                 `json:"isomerismCard"`
	NpuVideoMemory        string                 `json:"npuVideoMemory"`
	GpuCard               string                 `json:"gpuCard"`
	FpgaCard              string                 `json:"fpgaCard"`
	CardCount             string                 `json:"cardCount"`
	MemoryCapacityInGB    int                    `json:"memoryCapacityInGB"`
	LocalDiskSizeInGB     int                    `json:"localDiskSizeInGB"`
	ImageId               string                 `json:"imageId"`
	NetworkCapacityInMbps int                    `json:"networkCapacityInMbps"`
	PlacementPolicy       string                 `json:"placementPolicy"`
	ZoneName              string                 `json:"zoneName"`
	SubnetId              string                 `json:"subnetId"`
	VpcId                 string                 `json:"vpcId"`
	AutoRenew             bool                   `json:"autoRenew"`
	KeypairId             string                 `json:"keypairId"`
	KeypairName           string                 `json:"keypairName"`
	DedicatedHostId       string                 `json:"dedicatedHostId"`
	Tags                  []model.TagModel       `json:"tags"`
	Ipv6                  string                 `json:"ipv6"`
	EniQuota              int                    `json:"eniQuota"`
	EriQuota              int                    `json:"eriQuota"`
	RdmaTypeApi           string                 `json:"rdmaTypeApi"`
	SwitchId              string                 `json:"switchId"`
	HostId                string                 `json:"hostId"`
	DeploysetId           string                 `json:"deploysetId"`
	RackId                string                 `json:"rackId"`
	NicInfo               NicInfo                `json:"nicInfo"`
	EniNum                string                 `json:"eniNum"`
	DeploySetList         []DeploySetSimpleModel `json:"deploysetList"`
	DeletionProtection    int                    `json:"deletionProtection"`
	NetEthQueueCount      string                 `json:"netEthQueueCount"`
	Volumes               []VolumeModel          `json:"volumes"`
}

Instance define instance model

type InstanceModelV3 added in v0.9.75

type InstanceModelV3 struct {
	InstanceId            string             `json:"instanceId"`
	InstanceName          string             `json:"instanceName"`
	HostId                string             `json:"hostId"`
	HostName              string             `json:"hostName"`
	InstanceSpec          string             `json:"instanceSpec"`
	Status                InstanceStatus     `json:"status"`
	Description           string             `json:"description"`
	PaymentTiming         string             `json:"paymentTiming"`
	CreateTime            string             `json:"createTime"`
	ExpireTime            string             `json:"expireTime"`
	ReleaseTime           string             `json:"releaseTime"`
	PrivateIpAddress      string             `json:"privateIpAddress"`
	PublicIpAddress       string             `json:"publicIpAddress"`
	Cpu                   int                `json:"cpu"`
	Memory                int                `json:"memory"`
	GpuCard               string             `json:"gpuCard"`
	FpgaCard              string             `json:"fpgaCard"`
	CardCount             int                `json:"cardCount"`
	DataVolumes           []DataVolumeV3     `json:"dataVolumes"`
	ImageId               string             `json:"imageId"`
	NetworkCapacityInMbps InternetAccessible `json:"networkCapacityInMbps"`
	ZoneName              string             `json:"zoneName"`
	SubnetId              string             `json:"subnetId"`
	VpcId                 string             `json:"vpcId"`
	AutoRenew             bool               `json:"autoRenew"`
	KeypairId             string             `json:"keypairId"`
	KeypairName           string             `json:"keypairName"`
	HypervisorDedicatedId string             `json:"hypervisorDedicatedId"`
	Ipv6                  string             `json:"ipv6"`
	Tags                  []model.TagModel   `json:"tags"`
	DeployId              []string           `json:"deployId"`
	SerialNumber          string             `json:"serialNumber"`
	SwitchId              string             `json:"switchId"`
	RackId                string             `json:"rackId"`
	NicInfo               NicInfoV3          `json:"nicInfo"`
	OsName                string             `json:"osName"`
	OsType                string             `json:"osType"`
}

type InstancePurchaseReservedResult added in v0.9.161

type InstancePurchaseReservedResult struct {
	OrderId string `json:"orderId"`
}

func InstancePurchaseReserved

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

InstancePurchaseReserved - renew a specified instance

PARAMS:

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

RETURNS:

  • *api.InstancePurchaseReservedResult: the result of renew a specified instance
  • error: nil if success otherwise the specific error

type InstanceRoleAssociations added in v0.9.147

type InstanceRoleAssociations struct {
	InstanceID string `json:"instanceId"`
}

type InstanceStatus

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

type InstanceStockResult added in v0.9.18

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

func GetInstanceCreateStock added in v0.9.18

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

func GetInstanceResizeStock added in v0.9.18

func GetInstanceResizeStock(cli bce.Client, args *ResizeInstanceStockArgs) (*InstanceStockResult, error)

type InstanceType

type InstanceType string
const (
	InstanceTypeN1 InstanceType = "N1"
	InstanceTypeN2 InstanceType = "N2"
	InstanceTypeN3 InstanceType = "N3"
	InstanceTypeC1 InstanceType = "C1"
	InstanceTypeC2 InstanceType = "C2"
	InstanceTypeS1 InstanceType = "S1"
	InstanceTypeG1 InstanceType = "G1"
	InstanceTypeF1 InstanceType = "F1"

	// InstanceTypeN4 网络增强型 BCC 实例: 通用网络增强型g3ne、计算网络增强型c3ne、内存网络增强型m3ne
	InstanceTypeN4 InstanceType = "N4"

	// InstanceTypeN5 普通型Ⅳ BCC实例: 通用型g4、密集计算型ic4、计算型c4、内存型m4
	InstanceTypeN5 InstanceType = "N5"
)

type InstanceTypeModel

type InstanceTypeModel struct {
	Type              string `json:"type"`
	Name              string `json:"name"`
	CpuCount          int    `json:"cpuCount"`
	MemorySizeInGB    int    `json:"memorySizeInGB"`
	LocalDiskSizeInGB int    `json:"localDiskSizeInGB"`
}

type Instances added in v0.9.147

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

type InternetAccessible added in v0.9.55

type InternetAccessible struct {
	InternetMaxBandwidthOut int                `json:"internetMaxBandwidthOut,omitempty"`
	InternetChargeType      InternetChargeType `json:"internetChargeType,omitempty"`
}

type InternetChargeType added in v0.9.55

type InternetChargeType string
const (
	BandwidthPrepaid        InternetChargeType = "BANDWIDTH_PREPAID"
	TrafficPostpaidByHour   InternetChargeType = "TRAFFIC_POSTPAID_BY_HOUR"
	BandwidthPostpaidByHour InternetChargeType = "BANDWIDTH_POSTPAID_BY_HOUR"
)

type IpModel added in v0.9.28

type IpModel struct {
	Eip             string `json:"eip"`
	EipStatus       string `json:"eipStatus"`
	EipSize         string `json:"eipSize"`
	EipId           string `json:"eipId"`
	Primary         string `json:"primary"`
	PrivateIp       string `json:"privateIp"`
	EipAllocationId string `json:"eipAllocationId"`
	EipType         string `json:"eipType"`
	EipGroupId      string `json:"eipGroupId"`
}

type IpModelV3 added in v0.9.75

type IpModelV3 struct {
	Primary   bool   `json:"primary"`
	PrivateIp string `json:"privateIp"`
}

type KeypairModel added in v0.9.18

type KeypairModel struct {
	KeypairId     string `json:"keypairId"`
	Name          string `json:"name"`
	Description   string `json:"description"`
	PublicKey     string `json:"publicKey"`
	RegionId      string `json:"regionId"`
	FingerPrint   string `json:"fingerPrint"`
	PrivateKey    string `json:"privateKey"`
	InstanceCount int    `json:"instanceCount"`
	CreatedTime   string `json:"createdTime"`
}

type KeypairResult added in v0.9.18

type KeypairResult struct {
	Keypair KeypairModel `json:"keypair"`
}

func CreateKeypair added in v0.9.18

func CreateKeypair(cli bce.Client, args *CreateKeypairArgs) (*KeypairResult, error)

func GetKeypairDetail added in v0.9.18

func GetKeypairDetail(cli bce.Client, keypairId string) (*KeypairResult, error)

func ImportKeypair added in v0.9.18

func ImportKeypair(cli bce.Client, args *ImportKeypairArgs) (*KeypairResult, error)

type KeypairUpdateDescArgs added in v0.9.18

type KeypairUpdateDescArgs struct {
	Description string `json:"description"`
	KeypairId   string `json:"keypairId"`
}

type LabelConstraint added in v0.9.109

type LabelConstraint struct {
	Key      string        `json:"labelKey,omitempty"`
	Value    string        `json:"labelValue,omitempty"`
	Operator LabelOperator `json:"operatorName,omitempty"`
}

type LabelOperator added in v0.9.109

type LabelOperator string
const (
	LabelOperatorEqual    LabelOperator = "equal"
	LabelOperatorNotEqual LabelOperator = "not_equal"
	LabelOperatorExist    LabelOperator = "exist"
	LabelOperatorNotExist LabelOperator = "not_exist"
)

type ListASPArgs

type ListASPArgs struct {
	Marker     string
	MaxKeys    int
	AspName    string
	VolumeName string
}

type ListASPResult

type ListASPResult struct {
	Marker              string                    `json:"marker"`
	IsTruncated         bool                      `json:"isTruncated"`
	NextMarker          string                    `json:"nextMarker"`
	MaxKeys             int                       `json:"maxKeys"`
	AutoSnapshotPolicys []AutoSnapshotPolicyModel `json:"autoSnapshotPolicys"`
}

func ListAutoSnapshotPolicy

func ListAutoSnapshotPolicy(cli bce.Client, queryArgs *ListASPArgs) (*ListASPResult, error)

ListAutoSnapshotPolicy - list all automatic snapshot policies with the specified parameters

PARAMS:

  • cli: the client agent which can perform sending request
  • queryArgs: the arguments to list automatic snapshot policies
  • :

RETURNS:

  • *ListASPResult: the result of the automatic snapshot policies
  • error: nil if success otherwise the specific error

type ListAvailableResizeSpecResults added in v0.9.147

type ListAvailableResizeSpecResults struct {
	SpecList []string `json:"specList"`
}

func ListAvailableResizeSpecs added in v0.9.147

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

type ListAvailableResizeSpecsArgs added in v0.9.147

type ListAvailableResizeSpecsArgs struct {
	Spec           string   `json:"spec"`
	SpecId         string   `json:"specId"`
	Zone           string   `json:"zone"`
	InstanceIdList []string `json:"instanceIdList"`
}

type ListBidFlavorResult added in v0.9.18

type ListBidFlavorResult struct {
	ZoneResources []ZoneResource `json:"zoneResources"`
}

func ListBidFlavor added in v0.9.18

func ListBidFlavor(cli bce.Client) (*ListBidFlavorResult, error)

ListBidFlavor - list all flavors of the bidding instance

PARAMS:

  • cli: the client agent which can perform sending request

RETURNS:

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

type ListCDSVolumeArgs

type ListCDSVolumeArgs struct {
	MaxKeys      int    `json:"maxKeys"`
	InstanceId   string `json:"instanceId"`
	ZoneName     string `json:"zoneName"`
	Marker       string `json:"marker"`
	ClusterId    string `json:"clusterId"`
	ChargeFilter string `json:"chargeFilter"`
	UsageFilter  string `json:"usageFilter"`
	Name         string `json:"name"`
}

type ListCDSVolumeResult

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

func ListCDSVolume

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

ListCDSVolume - list all cds volumes with the given parameters

PARAMS:

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

RETURNS:

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

type ListCDSVolumeResultV3 added in v0.9.36

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

func ListCDSVolumeV3 added in v0.9.36

func ListCDSVolumeV3(cli bce.Client, queryArgs *ListCDSVolumeArgs) (*ListCDSVolumeResultV3, error)

ListCDSVolumeV3 - list all cds volumes with the given parameters

PARAMS:

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

RETURNS:

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

type ListDeploySetsResult added in v0.9.11

type ListDeploySetsResult struct {
	DeploySetList []DeploySetModel `json:"deploySets"`
}

func ListDeploySets added in v0.9.11

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

ListDeploySets - list all deploy sets PARAMS:

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

RETURNS:

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

type ListFlavorSpecArgs added in v0.9.18

type ListFlavorSpecArgs struct {
	ZoneName string `json:"zoneName,omitempty"`
}

type ListFlavorSpecResult added in v0.9.18

type ListFlavorSpecResult struct {
	ZoneResources []ZoneResourceDetailSpec `json:"zoneResources"`
}

func ListFlavorSpec added in v0.9.18

func ListFlavorSpec(cli bce.Client, args *ListFlavorSpecArgs) (*ListFlavorSpecResult, error)

ListFlavorSpec - get the specified flavor list

PARAMS:

  • cli: the client agent which can perform sending request
  • args: the arguments to list the specified flavor

RETURNS:

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

type ListIdMappingArgs added in v0.9.133

type ListIdMappingArgs struct {
	IdType      string   `json:"idType"`
	ObjectType  string   `json:"objectType"`
	InstanceIds []string `json:"instanceIds"`
}

type ListIdMappingResults added in v0.9.133

type ListIdMappingResults struct {
	IdMapping []IdMapping `json:"mappings"`
}

func ListIdMappings added in v0.9.133

func ListIdMappings(cli bce.Client, args *ListIdMappingArgs) (*ListIdMappingResults, error)

ListIdMappings - Long and short ID conversion parameters

PARAMS:

  • cli: the client agent which can perform sending request
  • args: the arguments to Long and short ID conversion

RETURNS:

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

type ListImageArgs

type ListImageArgs struct {
	Marker    string
	MaxKeys   int
	ImageType string
	ImageName string
}

type ListImageResult

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

func ListImage

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

ListImage - list all images with the specified parameters

PARAMS:

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

RETURNS:

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

type ListInstanceArgs

type ListInstanceArgs struct {
	Marker           string
	MaxKeys          int
	InternalIp       string
	DedicatedHostId  string
	ZoneName         string
	KeypairId        string
	AutoRenew        bool
	InstanceIds      string
	InstanceNames    string
	CdsIds           string
	DeploySetIds     string
	SecurityGroupIds string
	PaymentTiming    string
	Status           string
	Tags             string
	VpcId            string
	PrivateIps       string
}

type ListInstanceByInstanceIdArgs added in v0.9.67

type ListInstanceByInstanceIdArgs struct {
	Marker      string
	MaxKeys     int
	InstanceIds []string `json:"instanceIds"`
}

type ListInstanceEniResult added in v0.9.18

type ListInstanceEniResult struct {
	EniList []Eni `json:"enis"`
}

func ListInstanceEnis added in v0.9.18

func ListInstanceEnis(cli bce.Client, instanceId string) (*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

type ListInstanceResult

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

func GetInstanceNoChargeList added in v0.9.15

func GetInstanceNoChargeList(cli bce.Client, args *ListInstanceArgs) (*ListInstanceResult, error)

GetInstanceNoChargeList - get instance with nocharge list

PARAMS:

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

RETURNS:

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

func ListInstances

func ListInstances(cli bce.Client, args *ListInstanceArgs) (*ListInstanceResult, error)

ListInstances - list all instances with the specified parameters

PARAMS:

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

RETURNS:

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

type ListInstanceRolesResult added in v0.9.147

type ListInstanceRolesResult struct {
	Roles []Role `json:"roles"`
}

func ListInstanceRoles added in v0.9.147

func ListInstanceRoles(cli bce.Client) (*ListInstanceRolesResult, error)

type ListInstanceTypeArgs added in v0.9.133

type ListInstanceTypeArgs struct {
	ZoneName string `json:"zoneName"`
}

type ListInstanceTypeResults added in v0.9.133

type ListInstanceTypeResults struct {
	ZoneInstanceTypes []ZoneInstanceTypes `json:"zoneInstanceTypes"`
}

func ListInstanceTypes added in v0.9.133

func ListInstanceTypes(cli bce.Client, args *ListInstanceTypeArgs) (*ListInstanceTypeResults, error)

ListInstanceTypes - list all instances type with the specified parameters

PARAMS:

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

RETURNS:

  • *ListInstanceTypeResults: result of the instance type list
  • error: nil if success otherwise the specific error

type ListInstancesResult added in v0.9.67

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

func ListInstanceByInstanceIds added in v0.9.67

func ListInstanceByInstanceIds(cli bce.Client, args *ListInstanceByInstanceIdArgs) (*ListInstancesResult, error)

ListInstanceByInstanceIds - list instance by instanceId

PARAMS:

  • cli: the client agent which can perform sending request

RETURNS:

  • *ListInstancesResult: result of the instance list
  • error: nil if success otherwise the specific error

type ListKeypairArgs added in v0.9.18

type ListKeypairArgs struct {
	Marker  string `json:"marker"`
	MaxKeys int    `json:"maxKeys"`
	Name    string `json:"name,omitempty"`
}

type ListKeypairResult added in v0.9.18

type ListKeypairResult struct {
	Marker      string         `json:"marker"`
	IsTruncated bool           `json:"isTruncated"`
	NextMarker  string         `json:"nextMarker"`
	MaxKeys     int            `json:"maxKeys"`
	Keypairs    []KeypairModel `json:"keypairs"`
}

func ListKeypairs added in v0.9.18

func ListKeypairs(cli bce.Client, queryArgs *ListKeypairArgs) (*ListKeypairResult, error)

type ListRecycleInstanceArgs added in v0.9.34

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

type ListRecycleInstanceResult added in v0.9.34

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

func ListRecycleInstances added in v0.9.34

func ListRecycleInstances(cli bce.Client, args *ListRecycleInstanceArgs) (*ListRecycleInstanceResult, error)

ListRecycleInstances - list all instances in the recycle bin with the specified parameters

PARAMS:

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

RETURNS:

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

type ListSecurityGroupArgs

type ListSecurityGroupArgs struct {
	Marker     string
	MaxKeys    int
	InstanceId string
	VpcId      string
}

type ListSecurityGroupResult

type ListSecurityGroupResult struct {
	Marker         string               `json:"marker"`
	IsTruncated    bool                 `json:"isTruncated"`
	NextMarker     string               `json:"nextMarker"`
	MaxKeys        int                  `json:"maxKeys"`
	SecurityGroups []SecurityGroupModel `json:"securityGroups"`
}

func ListSecurityGroup

func ListSecurityGroup(cli bce.Client, queryArgs *ListSecurityGroupArgs) (*ListSecurityGroupResult, error)

ListSecurityGroup - list all security groups with the specified parameters

PARAMS:

  • cli: the client agent which can perform sending request
  • queryArgs: the arguments to list security groups

RETURNS:

  • *ListSecurityGroupResult: result of the security group list
  • error: nil if success otherwise the specific error

type ListServerRequestV3Args added in v0.9.75

type ListServerRequestV3Args struct {
	Marker            string         `json:"marker,omitempty"`
	MaxKeys           int            `json:"maxKeys,omitempty"`
	InstanceId        string         `json:"instanceId,omitempty"`
	InstanceName      string         `json:"instanceName,omitempty"`
	PrivateIpAddress  string         `json:"privateIpAddress,omitempty"`
	PublicIpAddress   string         `json:"publicIpAddress,omitempty"`
	VpcName           string         `json:"vpcName,omitempty"`
	SubnetName        string         `json:"subnetName,omitempty"`
	SubnetId          string         `json:"subnetId,omitempty"`
	DedicatedHostId   string         `json:"dedicatedHostId,omitempty"`
	ZoneName          string         `json:"zoneName,omitempty"`
	AutoRenew         bool           `json:"autoRenew,omitempty"`
	KeypairId         string         `json:"keypairId,omitempty"`
	KeypairName       string         `json:"keypairName,omitempty"`
	DeploymentSetId   string         `json:"deploymentSetId,omitempty"`
	DeploymentSetName string         `json:"deploymentSetName,omitempty"`
	ResGroupId        string         `json:"resGroupId,omitempty"`
	Tag               model.TagModel `json:"tag,omitempty"`
}

type ListSnapshotArgs

type ListSnapshotArgs struct {
	Marker   string
	MaxKeys  int
	VolumeId string
}

type ListSnapshotChainArgs added in v0.9.18

type ListSnapshotChainArgs struct {
	OrderBy  string `json:"orderBy,omitempty"`
	Order    string `json:"order,omitempty"`
	PageSize int    `json:"pageSize,omitempty"`
	PageNo   int    `json:"pageNo,omitempty"`
	VolumeId string `json:"volumeId,omitempty"`
}

type ListSnapshotChainResult added in v0.9.18

type ListSnapshotChainResult struct {
	OrderBy     string           `json:"orderBy"`
	TotalCount  int              `json:"totalCount"`
	PageSize    int              `json:"pageSize"`
	PageNo      int              `json:"pageNo"`
	IsTruncated bool             `json:"isTruncated"`
	VolumeId    string           `json:"volumeId"`
	Snapchains  []SnapchainModel `json:"snapchains"`
}

func ListSnapshotChain added in v0.9.18

func ListSnapshotChain(cli bce.Client, queryArgs *ListSnapshotChainArgs) (*ListSnapshotChainResult, error)

ListSnapshotChain - list all snapshot chains with the specified parameters

PARAMS:

  • cli: the client agent which can perform sending request
  • queryArgs: arguments to list snapshot chains

RETURNS:

  • *ListSnapshotChainResult: result of the snapshot chain list
  • error: nil if success otherwise the specific error

type ListSnapshotResult

type ListSnapshotResult struct {
	Marker      string          `json:"marker"`
	IsTruncated bool            `json:"isTruncated"`
	NextMarker  string          `json:"nextMarker"`
	MaxKeys     int             `json:"maxKeys"`
	Snapshots   []SnapshotModel `json:"snapshots"`
}

func ListSnapshot

func ListSnapshot(cli bce.Client, queryArgs *ListSnapshotArgs) (*ListSnapshotResult, error)

ListSnapshot - list all snapshots with the specified parameters

PARAMS:

  • cli: the client agent which can perform sending request
  • queryArgs: arguments to list snapshots

RETURNS:

  • *ListSnapshotResult: result of the snapshot list
  • error: nil if success otherwise the specific error

type ListSpecResult

type ListSpecResult struct {
	InstanceTypes []InstanceTypeModel `json:"instanceTypes"`
}

func ListSpec

func ListSpec(cli bce.Client) (*ListSpecResult, error)

ListSpec - get specification list information of the instance

PARAMS:

  • cli: the client agent which can perform sending request

RETURNS:

  • *ListSpecResult: result of the specifications
  • error: nil if success otherwise the specific error

type ListTypeZonesArgs added in v0.9.18

type ListTypeZonesArgs struct {
	InstanceType string `json:"instanceType"`
	ProductType  string `json:"productType"`
	Spec         string `json:"spec"`
	SpecId       string `json:"specId"`
}

type ListTypeZonesResult added in v0.9.18

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

func ListTypeZones added in v0.9.18

func ListTypeZones(cli bce.Client, args *ListTypeZonesArgs) (*ListTypeZonesResult, error)

ListTypeZones - get the available zone list in the current region

PARAMS:

  • cli: the client agent which can perform sending request

RETURNS:

  • *ListZoneResult: result of the available zones
  • error: nil if success otherwise the specific error

type ListZoneResult

type ListZoneResult struct {
	Zones []ZoneModel `json:"zones"`
}

func ListZone

func ListZone(cli bce.Client) (*ListZoneResult, error)

ListZone - get the available zone list in the current region

PARAMS:

  • cli: the client agent which can perform sending request

RETURNS:

  • *ListZoneResult: result of the available zones
  • error: nil if success otherwise the specific error

type LogicMarkerResultResponseV3 added in v0.9.75

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

func ListServersByMarkerV3 added in v0.9.75

func ListServersByMarkerV3(cli bce.Client, args *ListServerRequestV3Args) (*LogicMarkerResultResponseV3, error)

listServersByMarkerV3 - list all instances with the specified parameters

PARAMS:

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

RETURNS:

  • *LogicMarkerResultResponseV3: result of the instance
  • error: nil if success otherwise the specific error

type ModifyCSDVolumeArgs

type ModifyCSDVolumeArgs struct {
	CdsName string `json:"cdsName,omitempty"`
	Desc    string `json:"desc,omitempty"`
}

type ModifyChargeTypeCSDVolumeArgs

type ModifyChargeTypeCSDVolumeArgs struct {
	Billing *Billing `json:"billing"`
}

type ModifyDeploySetArgs added in v0.9.11

type ModifyDeploySetArgs struct {
	Name        string `json:"name,omitempty"`
	Desc        string `json:"desc,omitempty"`
	ClientToken string `json:"-"`
}

type ModifyInstanceAttributeArgs

type ModifyInstanceAttributeArgs struct {
	Name             string `json:"name"`
	NetEthQueueCount string `json:"netEthQueueCount"`
}

type ModifyInstanceDescArgs

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

type ModifyInstanceHostnameArgs added in v0.9.34

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

type NicInfo added in v0.9.28

type NicInfo struct {
	Status         string    `json:"status"`
	MacAddress     string    `json:"macAddress"`
	DeviceId       string    `json:"deviceId"`
	VpcId          string    `json:"vpcId"`
	EniId          string    `json:"eniId"`
	Name           string    `json:"name"`
	Type           string    `json:"type"`
	CreatedTime    string    `json:"createdTime"`
	SubnetType     string    `json:"subnetType"`
	SubnetId       string    `json:"subnetId"`
	EniNum         int       `json:"eniNum"`
	Az             string    `json:"az"`
	EniUuid        string    `json:"eniUuid"`
	Description    string    `json:"description"`
	Ips            []IpModel `json:"ips"`
	SecurityGroups []string  `json:"securityGroups"`
}

type NicInfoV3 added in v0.9.75

type NicInfoV3 struct {
	MacAddress     string      `json:"macAddress"`
	EniId          string      `json:"eniId"`
	Type           string      `json:"type"`
	Ips            []IpModelV3 `json:"ips"`
	SecurityGroups []string    `json:"securityGroups"`
}

type OsModel

type OsModel struct {
	OsVersion      string `json:"osVersion"`
	OsType         string `json:"osType"`
	InstanceId     string `json:"instanceId"`
	OsArch         string `json:"osArch"`
	OsName         string `json:"osName"`
	OsLang         string `json:"osLang"`
	SpecialVersion string `json:"specialVersion"`
}

type PaymentTimingType

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

	// v3
	PaymentTimingSpotPaid PaymentTimingType = "Spotpaid"
	PaymentTimingBidding  PaymentTimingType = "bidding"
)

type PostpayConfig added in v0.9.147

type PostpayConfig struct {
	InstanceId  string   `json:"instanceId"`
	RelationCds bool     `json:"relationCds"`
	CdsList     []string `json:"cdsList"`
}

type PrepayConfig added in v0.9.147

type PrepayConfig struct {
	InstanceId  string   `json:"instanceId"`
	Duration    int      `json:"duration"`
	RelationCds bool     `json:"relationCds"`
	CdsList     []string `json:"cdsList"`
	AutoPay     bool     `json:"autoPay"`
}

type PrivateIP added in v0.9.18

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

type PurchaseReservedArgs

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

type PurchaseReservedCSDVolumeArgs

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

type RebuildBatchInstanceArgs added in v0.9.15

type RebuildBatchInstanceArgs struct {
	ImageId           string   `json:"imageId"`
	AdminPass         string   `json:"adminPass"`
	KeypairId         string   `json:"keypairId"`
	InstanceIds       []string `json:"instanceIds"`
	IsOpenHostEye     bool     `json:"isOpenHostEye"`
	IsPreserveData    bool     `json:"isPreserveData"`
	RaidId            string   `json:"raidId,omitempty"`
	SysRootSize       int      `json:"sysRootSize,omitempty"`
	RootPartitionType string   `json:"rootPartitionType,omitempty"`
	DataPartitionType string   `json:"dataPartitionType,omitempty"`
}

type RebuildBatchInstanceArgsV2 added in v0.9.159

type RebuildBatchInstanceArgsV2 struct {
	ImageId           string   `json:"imageId"`
	AdminPass         string   `json:"adminPass"`
	KeypairId         string   `json:"keypairId"`
	InstanceIds       []string `json:"instanceIds"`
	IsOpenHostEye     *bool    `json:"isOpenHostEye"`
	IsPreserveData    *bool    `json:"isPreserveData"`
	RaidId            string   `json:"raidId,omitempty"`
	SysRootSize       int      `json:"sysRootSize,omitempty"`
	RootPartitionType string   `json:"rootPartitionType,omitempty"`
	DataPartitionType string   `json:"dataPartitionType,omitempty"`
}

type RebuildInstanceArgs

type RebuildInstanceArgs struct {
	ImageId           string `json:"imageId"`
	AdminPass         string `json:"adminPass"`
	KeypairId         string `json:"keypairId"`
	IsOpenHostEye     bool   `json:"isOpenHostEye"`
	IsPreserveData    bool   `json:"isPreserveData"`
	RaidId            string `json:"raidId,omitempty"`
	SysRootSize       int    `json:"sysRootSize,omitempty"`
	RootPartitionType string `json:"rootPartitionType,omitempty"`
	DataPartitionType string `json:"dataPartitionType,omitempty"`
}

type RebuildInstanceArgsV2 added in v0.9.159

type RebuildInstanceArgsV2 struct {
	ImageId           string `json:"imageId"`
	AdminPass         string `json:"adminPass"`
	KeypairId         string `json:"keypairId"`
	IsOpenHostEye     *bool  `json:"isOpenHostEye"`
	IsPreserveData    *bool  `json:"isPreserveData"`
	RaidId            string `json:"raidId,omitempty"`
	SysRootSize       int    `json:"sysRootSize,omitempty"`
	RootPartitionType string `json:"rootPartitionType,omitempty"`
	DataPartitionType string `json:"dataPartitionType,omitempty"`
}

type RecoveryInstanceArgs added in v0.9.29

type RecoveryInstanceArgs struct {
	InstanceIds []RecoveryInstanceModel `json:"instanceIds"`
}

type RecoveryInstanceModel added in v0.9.29

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

type RecycleInstanceModel added in v0.9.34

type RecycleInstanceModel struct {
	InstanceId    string                         `json:"id"`
	SerialNumber  string                         `json:"serialNumber"`
	InstanceName  string                         `json:"name"`
	RecycleTime   string                         `json:"recycleTime"`
	DeleteTime    string                         `json:"deleteTime"`
	PaymentTiming string                         `json:"paymentTiming"`
	ServiceName   string                         `json:"serviceName"`
	ServiceType   string                         `json:"serviceType"`
	ConfigItems   []string                       `json:"configItems"`
	ConfigItem    RecycleInstanceModelConfigItem `json:"configItem"`
}

type RecycleInstanceModelConfigItem added in v0.9.104

type RecycleInstanceModelConfigItem struct {
	Cpu      int    `json:"cpu"`
	Memory   int    `json:"memory"`
	Type     string `json:"type"`
	SpecId   string `json:"specId"`
	Spec     string `json:"spec"`
	ZoneName string `json:"zoneName"`
}

type ReleasePrepaidInstanceResponse added in v0.9.166

type ReleasePrepaidInstanceResponse struct {
	SuccessResources   InstanceDeleteResultModel `json:"successResources"`
	FailResources      InstanceDeleteResultModel `json:"failResources"`
	InstanceRefundFlag bool                      `json:"instanceRefundFlag"`
}

func DeletePrepaidInstanceWithRelatedResource added in v0.9.166

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

DeletePrepaidInstanceWithRelatedResource - delete an prepaid instance with related resources

PARAMS:

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

RETURNS:

  • error: nil if success otherwise the specific error

type RemoteCopyImageArgs

type RemoteCopyImageArgs struct {
	Name       string   `json:"name,omitempty"`
	DestRegion []string `json:"destRegion"`
}

type RemoteCopyImageModel added in v0.9.73

type RemoteCopyImageModel struct {
	Region  string `json:"region"`
	ImageId string `json:"imageId"`
	ErrMsg  string `json:"errMsg"`
	Code    string `json:"code"`
}

type RemoteCopyImageResult added in v0.9.73

type RemoteCopyImageResult struct {
	RemoteCopyImages []RemoteCopyImageModel `json:"result"`
}

func RemoteCopyImageReturnImageIds added in v0.9.73

func RemoteCopyImageReturnImageIds(cli bce.Client, imageId string, args *RemoteCopyImageArgs) (*RemoteCopyImageResult, error)

RemoteCopyImageReturnImageIds - copy custom images across regions, only custom images supported, the system \ and service integration images cannot be copied.

PARAMS:

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

RETURNS:

  • imageIds of destination region if success otherwise the specific error

type RemoteCopySnapshotArgs added in v0.9.147

type RemoteCopySnapshotArgs struct {
	ClientToken     string           `json:"-"`
	DestRegionInfos []DestRegionInfo `json:"destRegionInfos"`
}

type RemoteCopySnapshotResult added in v0.9.147

type RemoteCopySnapshotResult struct {
	Result []RemoteCopySnapshotResultItem `json:"result"`
}

func CreateRemoteCopySnapshot added in v0.9.147

func CreateRemoteCopySnapshot(cli bce.Client, snapshotId string, args *RemoteCopySnapshotArgs) (
	*RemoteCopySnapshotResult, error)

type RemoteCopySnapshotResultItem added in v0.9.147

type RemoteCopySnapshotResultItem struct {
	Region     string `json:"region"`
	SnapshotID string `json:"snapshotId"`
}

type RenameCSDVolumeArgs

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

type RenameKeypairArgs added in v0.9.18

type RenameKeypairArgs struct {
	Name      string `json:"name"`
	KeypairId string `json:"keypairId"`
}

type Reservation

type Reservation struct {
	ReservationLength   int    `json:"reservationLength"`
	ReservationTimeUnit string `json:"reservationTimeUnit"`
}

type ResizeCSDVolumeArgs

type ResizeCSDVolumeArgs struct {
	NewCdsSizeInGB int         `json:"newCdsSizeInGB,omitempty"`
	NewVolumeType  StorageType `json:"newVolumeType,omitempty"`
	ClientToken    string      `json:"-"`
}

type ResizeInstanceArgs

type ResizeInstanceArgs struct {
	CpuCount           int             `json:"cpuCount"`
	GpuCardCount       int             `json:"gpuCardCount"`
	MemoryCapacityInGB int             `json:"memoryCapacityInGB"`
	EphemeralDisks     []EphemeralDisk `json:"ephemeralDisks,omitempty"`
	Spec               string          `json:"spec"`
	LiveResize         bool            `json:"liveResize"`
	ClientToken        string          `json:"-"`
}

type ResizeInstanceStockArgs added in v0.9.18

type ResizeInstanceStockArgs struct {
	EphemeralDisks     []EphemeralDisk `json:"ephemeralDisks,omitempty"`
	CpuCount           int             `json:"cpuCount"`
	MemoryCapacityInGB int             `json:"memoryCapacityInGB"`
	InstanceId         string          `json:"instanceId"`
}

type RevokeSecurityGroupArgs

type RevokeSecurityGroupArgs struct {
	Rule *SecurityGroupRuleModel `json:"rule"`
}

type Role added in v0.9.161

type Role struct {
	RoleName string `json:"roleName"`
}

type RollbackCSDVolumeArgs

type RollbackCSDVolumeArgs struct {
	SnapshotId string `json:"snapshotId"`
}

type SecurityGroupModel

type SecurityGroupModel struct {
	Id    string                   `json:"id"`
	Name  string                   `json:"name"`
	Desc  string                   `json:"desc"`
	VpcId string                   `json:"vpcId"`
	Rules []SecurityGroupRuleModel `json:"rules"`
	Tags  []model.TagModel         `json:"tags"`
}

type SecurityGroupRuleModel

type SecurityGroupRuleModel struct {
	SourceIp        string `json:"sourceIp,omitempty"`
	DestIp          string `json:"destIp,omitempty"`
	Protocol        string `json:"protocol,omitempty"`
	SourceGroupId   string `json:"sourceGroupId,omitempty"`
	Ethertype       string `json:"ethertype,omitempty"`
	PortRange       string `json:"portRange,omitempty"`
	DestGroupId     string `json:"destGroupId,omitempty"`
	SecurityGroupId string `json:"securityGroupId,omitempty"`
	Remark          string `json:"remark,omitempty"`
	Direction       string `json:"direction"`
}

type SharedUser

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

type SnapchainModel added in v0.9.18

type SnapchainModel struct {
	Status          string `json:"status"`
	ChainSize       string `json:"chainSize"`
	ChainId         string `json:"chainId"`
	InstanceId      string `json:"instanceId"`
	UserId          string `json:"userId"`
	VolumeId        string `json:"volumeId"`
	VolumeSize      int    `json:"volumeSize"`
	ManualSnapCount int    `json:"manualSnapCount"`
	AutoSnapCount   int    `json:"autoSnapCount"`
	CreateTime      string `json:"createTime"`
}

type SnapshotModel

type SnapshotModel struct {
	Id           string         `json:"id"`
	Name         string         `json:"name"`
	SizeInGB     int            `json:"sizeInGB"`
	CreateTime   string         `json:"createTime"`
	Status       SnapshotStatus `json:"status"`
	CreateMethod string         `json:"createMethod"`
	VolumeId     string         `json:"volumeId"`
	Description  string         `json:"desc"`
	ExpireTime   string         `json:"expireTime"`
	Package      bool           `json:"package"`
	TemplateId   string         `json:"templateId"`
	InsnapId     string         `json:"insnapId"`
	Encrypted    bool           `json:"encrypted"`
}

type SnapshotStatus

type SnapshotStatus string
const (
	SnapshotStatusCreating      SnapshotStatus = "Creating"
	SnapshotStatusCreatedFailed SnapshotStatus = "CreatedFailed"
	SnapshotStatusAvailable     SnapshotStatus = "Available"
	SnapshotStatusNotAvailable  SnapshotStatus = "NotAvailable"
)

type SpecIdPrices added in v0.9.18

type SpecIdPrices struct {
	SpecId     string       `json:"specId"`
	SpecPrices []SpecPrices `json:"specPrices"`
}

type SpecPrices added in v0.9.18

type SpecPrices struct {
	Spec      string `json:"spec"`
	Status    string `json:"status"`
	SpecPrice string `json:"specPrice"`
}

type StopInstanceArgs

type StopInstanceArgs struct {
	ForceStop        bool `json:"forceStop"`
	StopWithNoCharge bool `json:"stopWithNoCharge"`
}

type StorageType

type StorageType string
const (
	StorageTypeStd1          StorageType = "std1"
	StorageTypeHP1           StorageType = "hp1"
	StorageTypeCloudHP1      StorageType = "cloud_hp1"
	StorageTypeLocal         StorageType = "local"
	StorageTypeSATA          StorageType = "sata"
	StorageTypeSSD           StorageType = "ssd"
	StorageTypeHDDThroughput StorageType = "HDD_Throughput"
	StorageTypeHdd           StorageType = "hdd"
	StorageTypeLocalSSD      StorageType = "local-ssd"
	StorageTypeLocalHDD      StorageType = "local-hdd"
	StorageTypeLocalNVME     StorageType = "local-nvme"
	StorageTypeEnhancedPl1   StorageType = "enhanced_ssd_pl1"
	StorageTypeEnhancedPl2   StorageType = "enhanced_ssd_pl2"
)

type StorageTypeV3 added in v0.9.36

type StorageTypeV3 string
const (
	StorageTypeV3CloudSATA          StorageTypeV3 = "Cloud_Sata"
	StorageTypeV3CloudHDDGeneral    StorageTypeV3 = "Cloud_HDD_General"
	StorageTypeV3CloudHDDThroughput StorageTypeV3 = "Cloud_HDD_Throughput"
	StorageTypeV3CloudPremium       StorageTypeV3 = "Cloud_Premium"
	StorageTypeV3CloudSSDGeneral    StorageTypeV3 = "Cloud_SSD_General"
	StorageTypeV3CloudSSDEnhanced   StorageTypeV3 = "Cloud_SSD_Enhanced"
	StorageTypeV3LocalHDD           StorageTypeV3 = "Local_HDD"
	StorageTypeV3LocalSSD           StorageTypeV3 = "Local_SSD"
	StorageTypeV3LocalNVME          StorageTypeV3 = "Local_NVME"
	StorageTypeV3LocalPVHDD         StorageTypeV3 = "Local_PV_HDD"
	StorageTypeV3LocalPVSSD         StorageTypeV3 = "Local_PV_SSD"
	StorageTypeV3LocalPVNVME        StorageTypeV3 = "Local_PV_NVME"
	StorageTypeV3EnhancedPl2        StorageTypeV3 = "enhanced_ssd_pl2"
)

type SystemVolume added in v0.9.55

type SystemVolume struct {
	StorageType StorageTypeV3 `json:"storageType,omitempty"`
	VolumeSize  int           `json:"volumeSize,omitempty"`
}

type Tag added in v0.9.147

type Tag struct {
	TagKey   string `json:"tagKey"`
	TagValue string `json:"tagValue"`
}

type TagVolumeArgs added in v0.9.147

type TagVolumeArgs struct {
	ChangeTags  []Tag `json:"changeTags"`
	RelationTag bool  `json:"relationTag"`
}

type UnBindInstanceRoleArgs added in v0.9.147

type UnBindInstanceRoleArgs struct {
	RoleName  string      `json:"roleName"`
	Instances []Instances `json:"instances"`
}

type UnBindInstanceRoleResult added in v0.9.147

type UnBindInstanceRoleResult struct {
	FailInstances            []FailInstances            `json:"failInstances"`
	InstanceRoleAssociations []InstanceRoleAssociations `json:"instanceRoleAssociations"`
}

func UnBindInstanceRole added in v0.9.147

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

type UnBindTagsRequest added in v0.9.15

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

type UpdateASPArgs

type UpdateASPArgs struct {
	Name           string   `json:"name"`
	TimePoints     []string `json:"timePoints"`
	RepeatWeekdays []string `json:"repeatWeekdays"`
	RetentionDays  string   `json:"retentionDays"`
	AspId          string   `json:"aspId"`
}

type UpdateInstanceDeployArgs added in v0.9.56

type UpdateInstanceDeployArgs struct {
	ClientToken  string   `json:"-"`
	InstanceId   string   `json:"instanceId,omitempty"`
	DeploySetIds []string `json:"deploysetIdList,omitempty"`
}

type UpdateSecurityGroupRuleArgs added in v0.9.134

type UpdateSecurityGroupRuleArgs struct {
	SgVersion           int64   `json:"sgVersion,omitempty"`
	SecurityGroupRuleId string  `json:"securityGroupRuleId"`
	Remark              *string `json:"remark,omitempty"`
	PortRange           *string `json:"portRange,omitempty"`
	SourceIp            *string `json:"sourceIp,omitempty"`
	SourceGroupId       *string `json:"sourceGroupId,omitempty"`
	DestIp              *string `json:"destIp,omitempty"`
	DestGroupId         *string `json:"destGroupId,omitempty"`
	Protocol            *string `json:"protocol,omitempty"`
}

UpdateSecurityGroupRuleArgs defines the structure of input parameters for the UpdateSecurityGroupRule api

type Volume added in v0.9.147

type Volume struct {
	VolumeId string `json:"volumeId"`
	SizeInGB int    `json:"sizeInGb"`
}

type VolumeAttachmentModel

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

type VolumeAttachmentsModel added in v0.9.36

type VolumeAttachmentsModel struct {
	InstanceId string `json:"instanceId"`
	Device     string `json:"device"`
	AttachTime string `json:"attachTime"`
}

type VolumeDeleteResultModel added in v0.9.75

type VolumeDeleteResultModel struct {
	VolumeIds []string `json:"volumeIds"`
}

type VolumeDeleteResultResponse added in v0.9.75

type VolumeDeleteResultResponse struct {
	SuccessResources VolumeDeleteResultModel `json:"successResources"`
	FailResources    VolumeDeleteResultModel `json:"failResources"`
}

func DeletePrepayVolume added in v0.9.75

func DeletePrepayVolume(cli bce.Client, args *VolumePrepayDeleteRequestArgs) (*VolumeDeleteResultResponse, error)

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

type VolumeModel

type VolumeModel struct {
	Type               VolumeType               `json:"type"`
	StorageType        StorageType              `json:"storageType"`
	Id                 string                   `json:"id"`
	Name               string                   `json:"name"`
	DiskSizeInGB       int                      `json:"diskSizeInGB"`
	PaymentTiming      string                   `json:"paymentTiming"`
	ExpireTime         string                   `json:"expireTime"`
	Status             VolumeStatus             `json:"status"`
	EbcDiskSize        int                      `json:"ebcDiskSize"`
	Desc               string                   `json:"desc"`
	Attachments        []VolumeAttachmentModel  `json:"attachments"`
	ZoneName           string                   `json:"zoneName"`
	AutoSnapshotPolicy *AutoSnapshotPolicyModel `json:"autoSnapshotPolicy"`
	CreateTime         string                   `json:"createTime"`
	IsSystemVolume     bool                     `json:"isSystemVolume"`
	RegionId           string                   `json:"regionId"`
	SourceSnapshotId   string                   `json:"sourceSnapshotId"`
	SnapshotNum        string                   `json:"snapshotNum"`
	Tags               []model.TagModel         `json:"tags"`
	EnableAutoRenew    bool                     `json:"enableAutoRenew"`
	AutoRenewTime      int                      `json:"autoRenewTime"`
	Encrypted          bool                     `json:"encrypted"`
	ClusterId          string                   `json:"clusterId"`
	RoleName           string                   `json:"roleName"`
	CreatedFrom        string                   `json:"createdFrom"`
	ReleaseTime        string                   `json:"releaseTime"`
	VolumeId           string                   `json:"volumeId"`
}

type VolumeModelV3 added in v0.9.36

type VolumeModelV3 struct {
	Id                   string                   `json:"volumeId"`
	Name                 string                   `json:"volumeName"`
	VolumeSize           int                      `json:"volumeSizeInGB"`
	VolumeStatus         VolumeStatusV3           `json:"volumeStatus"`
	VolumeType           VolumeTypeV3             `json:"volumeType"`
	StorageType          StorageTypeV3            `json:"storageType"`
	CreateTime           string                   `json:"createTime"`
	ExpireTime           string                   `json:"expireTime"`
	Desc                 string                   `json:"description"`
	PaymentTiming        string                   `json:"paymentTiming"`
	EnableAutoRenew      bool                     `json:"enableAutoRenew"`
	AutoRenewTime        int                      `json:"autoRenewTime"`
	ZoneName             string                   `json:"zoneName"`
	SourceSnapshotId     string                   `json:"sourceSnapshotId"`
	Region               string                   `json:"region"`
	SnapshotCount        int                      `json:"snapshotCount"`
	AutoSnapshotPolicyId string                   `json:"autoSnapshotPolicyId"`
	Encrypted            bool                     `json:"encrypted"`
	Tags                 []model.TagModel         `json:"tags"`
	Attachments          []VolumeAttachmentsModel `json:"volumeAttachments"`
}

type VolumePrepayDeleteRequestArgs added in v0.9.75

type VolumePrepayDeleteRequestArgs struct {
	VolumeId           string `json:"volumeId"`
	RelatedReleaseFlag bool   `json:"relatedReleaseFlag"`
	DeleteImmediate    bool   `json:"deleteImmediate"`
}

type VolumeStatus

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

type VolumeStatusV3 added in v0.9.36

type VolumeStatusV3 string
const (
	VolumeStatusV3AVAILABLE          VolumeStatusV3 = "Available"
	VolumeStatusV3INUSE              VolumeStatusV3 = "InUse"
	VolumeStatusV3SNAPSHOTPROCESSING VolumeStatusV3 = "SnapshotProcessing"
	VolumeStatusV3RECHARGING         VolumeStatusV3 = "Recharging"
	VolumeStatusV3DETACHING          VolumeStatusV3 = "Detaching"
	VolumeStatusV3DELETING           VolumeStatusV3 = "Deleting"
	VolumeStatusV3EXPIRED            VolumeStatusV3 = "Expired"
	VolumeStatusV3NOTAVAILABLE       VolumeStatusV3 = "NotAvailable"
	VolumeStatusV3DELETED            VolumeStatusV3 = "Deleted"
	VolumeStatusV3SCALING            VolumeStatusV3 = "Scaling"
	VolumeStatusV3IMAGEPROCESSING    VolumeStatusV3 = "ImageProcessing"
	VolumeStatusV3CREATING           VolumeStatusV3 = "Creating"
	VolumeStatusV3ATTACHING          VolumeStatusV3 = "Attaching"
	VolumeStatusV3ERROR              VolumeStatusV3 = "Error"
	VolumeStatusV3Recycled           VolumeStatusV3 = "Recycled"
)

type VolumeType

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

type VolumeTypeV3 added in v0.9.36

type VolumeTypeV3 string
const (
	VolumeTypeV3SYSTEM VolumeTypeV3 = "SYSTEM"
	VolumeTypeV3DATA   VolumeTypeV3 = "DATA"
)

type ZoneInstanceTypes added in v0.9.133

type ZoneInstanceTypes struct {
	ZoneName      string   `json:"zoneName"`
	InstanceTypes []string `json:"instanceTypes"`
}

type ZoneModel

type ZoneModel struct {
	ZoneName string `json:"zoneName"`
}

type ZoneResource added in v0.9.18

type ZoneResource struct {
	ZoneName     string        `json:"zoneName"`
	BccResources []BccResource `json:"bccResources"`
}

type ZoneResourceDetailSpec added in v0.9.18

type ZoneResourceDetailSpec struct {
	ZoneName     string       `json:"zoneName"`
	BccResources BccResources `json:"bccResources"`
	EbcResources EbcResources `json:"ebcResources"`
}

Jump to

Keyboard shortcuts

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