类 BccClient


  • public class BccClient
    extends AbstractBceClient
    Provides the client for accessing the Baidu Cloud Compute Service(bcc).
    • 构造器详细资料

      • BccClient

        public BccClient()
        Constructs a new client to invoke service methods on bcc.
      • BccClient

        public BccClient​(BceClientConfiguration clientConfiguration)
        Constructs a new bcc client using the client configuration to access bcc.
        参数:
        clientConfiguration - The bcc client configuration options controlling how this client connects to bcc (e.g. proxy settings, retry counts, etc).
    • 方法详细资料

      • getPriceBySpec

        public BccPriceResponse getPriceBySpec​(BccPriceRequest request)
        Get the price information of specified instance.
        参数:
        request - The request containing all options for get specified bcc price.
        返回:
        specified bcc price model.
      • listInstances

        public ListInstancesResponse listInstances()
        Return a list of instances owned by the authenticated user.
        返回:
        The response containing a list of instances owned by the authenticated user.
      • listInstances

        public ListInstancesResponse listInstances​(ListInstancesRequest request)
        Return a list of instances owned by the authenticated user.
        参数:
        request - The request containing all options for listing own's bcc Instance.
        返回:
        The response containing a list of instances owned by the authenticated user.
      • listFlavorSpec

        public ListBccFlavorSpecResponse listFlavorSpec​(ListFlavorSpecRequest request)
        Return a list of flavorSpec owned by the authenticated user.
        参数:
        request - The request containing all options for listing own's flavor spec.
        返回:
        The response containing a list of flavor spec owned by the authenticated user.
      • listBidFlavor

        public ListBccBidFlavorResponse listBidFlavor()
        Return a list of bidFlavor owned by the authenticated user.
        返回:
        The bidding instance flavor.
      • cancelBidOrder

        public CancelBidOrderResponse cancelBidOrder​(String oderId)
        Cancel the bidding instance order.
        参数:
        oderId - The id of the order.
        返回:
        The request containing the orderId which is canceled by the user.
      • cancelBidOrder

        public CancelBidOrderResponse cancelBidOrder​(CancelBidOrderRequest request)
        Cancel the bidding instance order.
        参数:
        request - The request containing the orderId which is the user wants to cancel.
        返回:
        The request containing the orderId which is canceled by the user.
      • getInstanceNoChargeList

        public ListInstancesResponse getInstanceNoChargeList​(ListGetInstanceNoChargeRequest request)
        Return a list of noCharge instances owned by the authenticated user.
        参数:
        request - The request containing all options for listing own's bcc noCharge Instance.
        返回:
        The response containing a list of noCharge instances owned by the authenticated user.
      • getInstance

        public GetInstanceResponse getInstance​(String instanceId)
        Get the detail information of specified instance.
        参数:
        instanceId - The id of the instance.
        返回:
        A instance detail model for the instanceId.
      • getInstance

        public GetInstanceResponse getInstance​(GetInstanceRequest request)
        Get the detail information of specified instance.
        参数:
        request - The request containing all options for getting the instance info.
        返回:
        A instance detail model for the instanceId.
      • changeToPrepaid

        public ChangeToPrepaidResponse changeToPrepaid​(ChangeToPrepaidRequest request)
        Change the instance payment method to prepaid.
        参数:
        request - The request containing all options for changing the instance payment method to prepaid.
        返回:
        The id of the order.
      • startInstance

        public void startInstance​(String instanceId)
        Starting the instance owned by the user. You can start the instance only when the instance is Stopped, otherwise,it's will get 409 errorCode. This is an asynchronous interface, you can get the latest status by invoke getInstance(GetInstanceRequest)
        参数:
        instanceId - The id of the instance.
      • startInstance

        public void startInstance​(StartInstanceRequest request)
        Starting the instance owned by the user. You can start the instance only when the instance is Stopped, otherwise,it's will get 409 errorCode. This is an asynchronous interface, you can get the latest status by invoke getInstance(GetInstanceRequest)
        参数:
        request - The request containing all options for starting the instance.
      • stopInstance

        public void stopInstance​(String instanceId)
        Stopping the instance owned by the user. You can stop the instance only when the instance is Running, otherwise,it's will get 409 errorCode. This is an asynchronous interface, you can get the latest status by invoke getInstance(GetInstanceRequest)
        参数:
        instanceId - The id of the instance.
      • stopInstance

        public void stopInstance​(String instanceId,
                                 boolean forceStop)
        Stopping the instance owned by the user. You can stop the instance only when the instance is Running, otherwise,it's will get 409 errorCode. This is an asynchronous interface, you can get the latest status by invoke getInstance(GetInstanceRequest)
        参数:
        instanceId - The id of the instance.
        forceStop - The optional parameter to stop the instance forcibly.If true, it will stop the instance just like power off immediately and it may result in losing important data which have not been written to disk.
      • stopInstance

        public void stopInstance​(String instanceId,
                                 boolean forceStop,
                                 boolean stopWithNoCharge)
        Stopping the instance owned by the user. You can stop the instance only when the instance is Running, otherwise,it's will get 409 errorCode. This is an asynchronous interface, you can get the latest status by invoke getInstance(GetInstanceRequest)
        参数:
        instanceId - The id of the instance.
        forceStop - The optional parameter to stop the instance forcibly.If true, it will stop the instance just like power off immediately and it may result in losing important data which have not been written to disk.
        stopWithNoCharge - The optional parameter to indicate that whether the instance can be stopped with no charge or not, default value is false. If true, it means the instance can be stopped with no charge.
      • stopInstance

        public void stopInstance​(StopInstanceRequest request)
        Stopping the instance owned by the user. You can stop the instance only when the instance is Running, otherwise,it's will get 409 errorCode. This is an asynchronous interface, you can get the latest status by invoke getInstance(GetInstanceRequest)
        参数:
        request - The request containing all options for stopping the instance.
      • rebootInstance

        public void rebootInstance​(String instanceId)
        Rebooting the instance owned by the user. You can reboot the instance only when the instance is Running, otherwise,it's will get 409 errorCode. This is an asynchronous interface, you can get the latest status by invoke getInstance(GetInstanceRequest)
        参数:
        instanceId - The id of the instance.
      • rebootInstance

        public void rebootInstance​(String instanceId,
                                   boolean forceStop)
        Rebooting the instance owned by the user. You can reboot the instance only when the instance is Running, otherwise,it's will get 409 errorCode. This is an asynchronous interface, you can get the latest status by invoke getInstance(GetInstanceRequest)
        参数:
        instanceId - The id of the instance.
        forceStop - The option param to stop the instance forcibly.If true, it will stop the instance just like power off immediately and it may result int losing important data which have not written to disk.
      • rebootInstance

        public void rebootInstance​(RebootInstanceRequest request)
        Rebooting the instance owned by the user. You can reboot the instance only when the instance is Running, otherwise,it's will get 409 errorCode. This is an asynchronous interface, you can get the latest status by invoke getInstance(GetInstanceRequest)
        参数:
        request - The request containing all options for rebooting the instance.
      • modifyInstancePassword

        public void modifyInstancePassword​(String instanceId,
                                           String adminPass)
                                    throws BceClientException
        Modifying the password of the instance. You can change the instance password only when the instance is Running or Stopped , otherwise,it's will get 409 errorCode. This is an asynchronous interface, you can get the latest status by invoke getInstance(GetInstanceRequest)
        参数:
        instanceId - The id of the instance.
        adminPass - The new password to update. The adminPass will be encrypted in AES-128 algorithm with the substring of the former 16 characters of user SecretKey.
        抛出:
        BceClientException
      • modifyInstancePassword

        public void modifyInstancePassword​(ModifyInstancePasswordRequest request)
                                    throws BceClientException
        Modifying the password of the instance. You can reboot the instance only when the instance is Running or Stopped , otherwise,it's will get 409 errorCode. This is an asynchronous interface, you can get the latest status by invoke getInstance(GetInstanceRequest)
        参数:
        request - The request containing all options for modifying the instance password.
        抛出:
        BceClientException
      • modifyInstanceAttributes

        public void modifyInstanceAttributes​(ModifyInstanceAttributesRequest request)
        Modifying the special attribute to new value of the instance. You can reboot the instance only when the instance is Running or Stopped , otherwise,it's will get 409 errorCode.
        参数:
        request - The request containing all options for modifying the instance attribute.
      • modifyInstanceDesc

        public void modifyInstanceDesc​(ModifyInstanceDescRequest request)
        Modifying the special describe to new value of the instance.
        参数:
        request - The request containing all options for modifying the instance desc.
      • rebuildInstance

        public void rebuildInstance​(String instanceId,
                                    String imageId,
                                    String adminPass)
                             throws BceClientException
        Rebuilding the instance owned by the user. After rebuilding the instance, all of snapshots created from original instance system disk will be deleted, all of customized images will be saved for using in the future. This is an asynchronous interface, you can get the latest status by invoke getInstance(GetInstanceRequest)
        参数:
        instanceId - The id of the instance.
        imageId - The id of the image which is used to rebuild the instance.
        adminPass - The admin password to login the instance. The admin password will be encrypted in AES-128 algorithm with the substring of the former 16 characters of user SecretKey. See more detail on BCE API doc
        抛出:
        BceClientException
      • rebuildInstance

        public void rebuildInstance​(String instanceId,
                                    String imageId,
                                    String adminPass,
                                    String keypairId)
                             throws BceClientException
        Rebuilding the instance owned by the user. After rebuilding the instance, all of snapshots created from original instance system disk will be deleted, all of customized images will be saved for using in the future. This is an asynchronous interface, you can get the latest status by invoke getInstance(GetInstanceRequest)
        参数:
        instanceId - The id of the instance.
        imageId - The id of the image which is used to rebuild the instance.
        adminPass - The admin password to login the instance. The admin password will be encrypted in AES-128 algorithm with the substring of the former 16 characters of user SecretKey. See more detail on BCE API doc
        keypairId - The id of the keypair.
        抛出:
        BceClientException
      • rebuildInstance

        public void rebuildInstance​(RebuildInstanceRequest request)
                             throws BceClientException
        Rebuilding the instance owned by the user. After rebuilding the instance, all of snapshots created from original instance system disk will be deleted, all of customized images created from original instance system disk will be saved. This is an asynchronous interface, you can get the latest status by invoke getInstance(GetInstanceRequest)
        参数:
        request - The request containing all options for rebuilding the instance.
        抛出:
        BceClientException
      • rebuildBatchInstance

        public void rebuildBatchInstance​(List<String> instanceIds,
                                         String imageId,
                                         String adminPass)
                                  throws BceClientException
        Rebuilding the instance owned by the user by batch.

        After rebuilding the instance, all of snapshots created from original instance system disk will be deleted, all of customized images will be saved for using in the future.

        This is an asynchronous interface, you can get the latest status by invoke getInstance(GetInstanceRequest)

        参数:
        instanceIds - The ids of the instance.
        imageId - The id of the image which is used to rebuild the instance.
        adminPass - The admin password to login the instance. The admin password will be encrypted in AES-128 algorithm with the substring of the former 16 characters of user SecretKey. See more detail on BCE API doc
        抛出:
        BceClientException
      • rebuildBatchInstance

        public void rebuildBatchInstance​(List<String> instanceIds,
                                         String imageId,
                                         String adminPass,
                                         String keypairId)
                                  throws BceClientException
        Rebuilding the instance owned by the user by batch.

        After rebuilding the instance, all of snapshots created from original instance system disk will be deleted, all of customized images will be saved for using in the future.

        This is an asynchronous interface, you can get the latest status by invoke getInstance(GetInstanceRequest)

        参数:
        instanceIds - The ids of the instance.
        imageId - The id of the image which is used to rebuild the instance.
        adminPass - The admin password to login the instance. The admin password will be encrypted in AES-128 algorithm with the substring of the former 16 characters of user SecretKey. See more detail on BCE API doc
        keypairId - The id of the keypair.
        抛出:
        BceClientException
      • rebuildBatchInstance

        public void rebuildBatchInstance​(RebuildBatchInstanceRequest request)
                                  throws BceClientException
        Rebuilding the instance owned by the user.

        After rebuilding the instance, all of snapshots created from original instance system disk will be deleted, all of customized images created from original instance system disk will be saved.

        This is an asynchronous interface, you can get the latest status by invoke getInstance(GetInstanceRequest)

        参数:
        request - The request containing all options for rebuilding the instance.
        抛出:
        BceClientException
      • releaseInstance

        public void releaseInstance​(String instanceId)
        Releasing the instance owned by the user. Only the Postpaid instance or Prepaid which is expired can be released. After releasing the instance, all of the data will be deleted. all of volumes attached will be auto detached, but the volume snapshots will be saved. all of snapshots created from original instance system disk will be deleted, all of customized images created from original instance system disk will be reserved.
        参数:
        instanceId - The id of the instance.
      • releaseInstance

        public void releaseInstance​(ReleaseInstanceRequest request)
        Releasing the instance owned by the user. Only the Postpaid instance or Prepaid which is expired can be released. After releasing the instance, all of the data will be deleted. all of volumes attached will be detached,but the volume snapshots will be saved. all of snapshots created from original instance system disk will be deleted, all of customized images created from original instance system disk will be reserved.
        参数:
        request - The request containing all options for releasing the instance.
      • releaseInstanceByPost

        public void releaseInstanceByPost​(String instanceId,
                                          boolean relatedReleaseFlag,
                                          boolean deleteCdsSnapshotFlag)
        Releasing the instance owned by the user by POST.

        Only the Postpaid instance or Prepaid which is expired can be released.

        After releasing the instance, all of the data will be deleted. all of volumes attached will be auto detached, but the volume snapshots will be saved. all of snapshots created from original instance system disk will be deleted, all of customized images created from original instance system disk will be reserved.

        参数:
        instanceId - The id of the instance.
        relatedReleaseFlag - Whether to release the EIP and the data disk attached to the instance at the current time in the same time. Iftrue, it means release, and the parameters deleteCdsSnapshotFlag works. Iffalse, it means not to release, and the parameters deleteCdsSnapshotFlag does not works.
        deleteCdsSnapshotFlag - Whether to delete the CDS Snapshot. Iftrue, it means delete.
      • releaseInstanceByPost

        public void releaseInstanceByPost​(ReleaseInstanceByPostRequest request)
        Releasing the instance owned by the user.

        Only the Postpaid instance or Prepaid which is expired can be released. After releasing the instance, all of the data will be deleted. all of volumes attached will be detached,but the volume snapshots will be saved. all of snapshots created from original instance system disk will be deleted, all of customized images created from original instance system disk will be reserved.

        参数:
        request - The request containing all options for releasing the instance.
      • updateInstanceSubnet

        public void updateInstanceSubnet​(String instanceId,
                                         String subnetId,
                                         boolean reboot)
        Changing the subnetId of the instance owned by the user.
        参数:
        instanceId - The id of instance.
        subnetId - The id of subnet after changed.
        reboot - Whether to reboot automatically or not. If true, it means reboot automatically.
      • updateInstanceSubnet

        public void updateInstanceSubnet​(ChangeInstanceSubnetRequest request)
        Changing the subnetId of the instance owned by the user.
        参数:
        request - The request containing all options for changing the subnetId of the instance.
      • resizeInstance

        public void resizeInstance​(ResizeInstanceRequest request)
        Resizing the instance owned by the user. The Prepaid instance can not be downgrade. Only the Running/Stopped instance can be resized,otherwise,it's will get 409 errorCode. After resizing the instance,it will be reboot once. This is an asynchronous interface, you can get the latest status by invoke getInstance(GetInstanceRequest)
        参数:
        request - The request containing all options for resizing the instance.
      • resizeInstanceBySpec

        public void resizeInstanceBySpec​(ResizeInstanceRequest request)
        Through spec Resizing the instance through the spec owned by the user. The Prepaid instance can not be downgrade. Only the Running/Stopped instance can be resized,otherwise,it's will get 409 errorCode. After resizing the instance,it will be reboot once. This is an asynchronous interface, you can get the latest status by invoke getInstance(GetInstanceRequest)
        参数:
        request - The request containing all options for resizing the instance.
      • bindInstanceToSecurityGroup

        public void bindInstanceToSecurityGroup​(String instanceId,
                                                String securityGroupId)
        Binding the instance to specified securitygroup.
        参数:
        instanceId - The id of the instance.
        securityGroupId - The id of the securitygroup.
      • bindInstanceToSecurityGroup

        public void bindInstanceToSecurityGroup​(BindSecurityGroupRequest request)
        Binding the instance to specified securitygroup.
        参数:
        request - The request containing all options for binding the instance to specified securitygroup.
      • unbindInstanceFromSecurityGroup

        public void unbindInstanceFromSecurityGroup​(String instanceId,
                                                    String securityGroupId)
        Unbinding the instance from securitygroup.
        参数:
        instanceId - The id of the instance.
        securityGroupId - The id of the securitygroup.
      • unbindInstanceFromSecurityGroup

        public void unbindInstanceFromSecurityGroup​(UnbindSecurityGroupRequest request)
        Unbinding the instance from securitygroup.
        参数:
        request - The request containing all options for unbinding the instance from securitygroup.
      • bindInstanceToTags

        public void bindInstanceToTags​(String instanceId,
                                       List<TagModel> changeTags)
        Binding the instance to specified list of tags.
        参数:
        instanceId - The id of the instance.
        changeTags - The list of tags.
      • bindInstanceToTags

        public void bindInstanceToTags​(BindTagsRequest request)
        Binding the instance to specified list of tags.
        参数:
        request - The request containing all options for binding the instance to specified list of tags.
      • unbindInstanceFromTags

        public void unbindInstanceFromTags​(String instanceId,
                                           List<TagModel> changeTags)
        Unbinding the instance to specified list of tags.
        参数:
        instanceId - The id of the instance.
        changeTags - The list of tags to be unbound.
      • unbindInstanceFromTags

        public void unbindInstanceFromTags​(UnbindTagsRequest request)
        Unbinding the instance to specified list of tags.
        参数:
        request - The request containing all options for unbinding the instance to specified list of tags.
      • getInstanceVnc

        public GetInstanceVncResponse getInstanceVnc​(String instanceId)
        Getting the vnc url to access the instance. The vnc url can be used once.
        参数:
        instanceId - The id of the instance.
      • getInstanceVnc

        public GetInstanceVncResponse getInstanceVnc​(GetInstanceVncRequest request)
        Getting the vnc url to access the instance. The vnc url can be used once.
        参数:
        request - The request containing all options for getting the vnc url.
      • purchaseReservedInstance

        public void purchaseReservedInstance​(String instanceId,
                                             int reservationLength,
                                             String reservationTimeUnit)
        PurchaseReserved the instance with fixed duration. You can not purchaseReserved the instance which is resizing. This is an asynchronous interface, you can get the latest status by invoke getInstance(GetInstanceRequest)
        参数:
        instanceId - The id of the instance.
        reservationLength - The fixed duration to purchaseReserved,available is [1,2,3,4,5,6,7,8,9,12,24,36]
        reservationTimeUnit - The timeUnit to renew the instance,only support "month" now.
      • purchaseReservedInstance

        public void purchaseReservedInstance​(String instanceId,
                                             int reservationLength,
                                             String reservationTimeUnit,
                                             String relatedRenewFlagType)
        PurchaseReserved the instance with fixed duration. You can not purchaseReserved the instance which is resizing. This is an asynchronous interface, you can get the latest status by invoke getInstance(GetInstanceRequest)
        参数:
        instanceId - The id of the instance.
        reservationLength - The fixed duration to purchaseReserved,available is [1,2,3,4,5,6,7,8,9,12,24,36]
        reservationTimeUnit - The timeUnit to renew the instance,only support "month" now.
        relatedRenewFlagType - The flag of instance related renew. see all of supported flag type in RelatedRenewFlagType
      • purchaseReservedInstance

        public void purchaseReservedInstance​(PurchaseReservedInstanceRequeset request)
        Renewing the instance with fixed duration. You can not renew the instance which is resizing. This is an asynchronous interface, you can get the latest status by invoke getInstance(GetInstanceRequest)
        参数:
        request - The request containing all options for renewing the instance with fixed duration.
      • listInstanceSpecs

        @Deprecated
        public ListInstanceSpecsResponse listInstanceSpecs()
        已过时。
        The interface will be deprecated in the future, we suggest to use triad (instanceType,cpuCount,memoryCapacityInGB) to specified the instance configuration. Listing all of specification for instance resource to buy. See more detail on BCE API doc
        返回:
        List of specification for instance resource to buy.
      • listInstanceSpecs

        @Deprecated
        public ListInstanceSpecsResponse listInstanceSpecs​(ListInstanceSpecsRequest request)
        已过时。
        The interface will be deprecated in the future, we suggest to use triad (instanceType,cpuCount,memoryCapacityInGB) to specified the instance configuration. Listing all of specification for instance resource to buy. See more detail on BCE API doc
        参数:
        request - The request containing all options for Listing all of specification for instance resource.
        返回:
        List of specification for instance resource to buy.
      • createVolume

        public CreateVolumeResponse createVolume​(CreateVolumeRequest request)
        Create a volume with the specified options. You can use this method to create a new empty volume by specified options or you can create a new volume from customized volume snapshot but not system disk snapshot. By using the cdsSizeInGB parameter you can create a newly empty volume. By using snapshotId parameter to create a volume form specific snapshot.
        参数:
        request - The request containing all options for creating a volume.
        返回:
        The response with list of id of volumes newly created.
      • syncCreateVolume

        public CreateVolumeResponse syncCreateVolume​(CreateVolumeRequest request)
        Sync create volume with the specified options. syncCreateVolume does not support snapshotId and Prepay You can use this method to create a new empty volume by specified options
        参数:
        request - The request containing all options for creating a volume.
        返回:
        The response with list of id of volumes newly created.
      • listVolumes

        public ListVolumesResponse listVolumes()
        Listing volumes owned by the authenticated user.
        返回:
        The response containing a list of volume owned by the authenticated user.
      • listVolumes

        public ListVolumesResponse listVolumes​(ListVolumesRequest request)
        Listing volumes owned by the authenticated user.
        参数:
        request - The request containing all options for listing volumes owned by the authenticated user.
        返回:
        The response containing a list of volume owned by the authenticated user.
      • getVolume

        public GetVolumeResponse getVolume​(String volumeId)
        Get the detail information of specified volume.
        参数:
        volumeId - The id of the volume.
        返回:
        The response containing the detail information of specified volume.
      • getVolume

        public GetVolumeResponse getVolume​(GetVolumeRequest request)
        Get the detail information of specified volume.
        参数:
        request - The request containing all options for getting the detail information of specified volume.
        返回:
        The response containing the detail information of specified volume.
      • attachVolume

        public AttachVolumeResponse attachVolume​(String volumeId,
                                                 String instanceId)
        Attaching the specified volume to a specified instance. You can attach the specified volume to a specified instance only when the volume is Available and the instance is Running or Stopped , otherwise,it's will get 409 errorCode.
        参数:
        volumeId - The id of the volume which will be attached to specified instance.
        instanceId - The id of the instance which will be attached with a volume.
        返回:
        The response containing the volume-instance attach relation.
      • attachVolume

        public AttachVolumeResponse attachVolume​(AttachVolumeRequest request)
        Attaching the specified volume to a specified instance. You can attach the specified volume to a specified instance only when the volume is Available and the instance is Running or Stopped , otherwise,it's will get 409 errorCode.
        参数:
        request - The request containing all options for attaching the specified volume to a specified instance.
        返回:
        The response containing the volume-instance attach relation.
      • detachVolume

        public void detachVolume​(String volumeId,
                                 String instanceId)
        Detaching the specified volume from a specified instance. You can detach the specified volume from a specified instance only when the instance is Running or Stopped , otherwise,it's will get 409 errorCode.
        参数:
        volumeId - The id of the volume which has been attached to specified instance.
        instanceId - The id of the instance which will be detached a volume.
      • detachVolume

        public void detachVolume​(DetachVolumeRequest request)
        Detaching the specified volume from a specified instance. You can detach the specified volume from a specified instance only when the instance is Running or Stopped , otherwise,it's will get 409 errorCode.
        参数:
        request - The request containing all options for detaching the specified volume from a specified instance.
      • releaseVolume

        public void releaseVolume​(String volumeId)
        Releasing the specified volume owned by the user. You can release the specified volume only when the instance is among state of Available/Expired/Error, otherwise,it's will get 409 errorCode.
        参数:
        volumeId - The id of the volume which will be released.
      • releaseVolume

        public void releaseVolume​(ReleaseVolumeRequest request)
        Releasing the specified volume owned by the user. You can release the specified volume only when the volume is Available/Expired/Error, otherwise,it's will get 409 errorCode.
        参数:
        request - The request containing all options for releasing the specified volume.
      • modifyVolumeChargeType

        public void modifyVolumeChargeType​(ModifyVolumeChargeRequest request)
        Change the volume's billing method. billingMethod can be set to 'prepay' or 'postpay'. when 'prepay' is used, reservationLength must be set to a positive integer which denotes how many month to buy this volume.
        参数:
        request - The request containing all options for modifying the billing method of the specified volume.
      • modifyVolumeChargeType

        public void modifyVolumeChargeType​(ModifyVolumeChargeTypeRequest request)
        Change the volume's billing method. billingMethod can be set to 'prepay' or 'postpay'. when 'prepay' is used, reservationLength must be set to a positive integer which denotes how many month to buy this volume.
        参数:
        request -
      • resizeVolume

        public void resizeVolume​(String volumeId,
                                 int newCdsSizeInGB)
        Resizing the specified volume with newly size. You can resize the specified volume only when the volume is Available, otherwise,it's will get 409 errorCode. The prepaid volume can not be downgrade. This is an asynchronous interface, you can get the latest status by invoke getVolume(String)
        参数:
        volumeId - The id of volume which you want to resize.
        newCdsSizeInGB - The new volume size you want to resize in GB.
      • resizeVolume

        public void resizeVolume​(ResizeVolumeRequest request)
        Resizing the specified volume with newly size. You can resize the specified volume only when the volume is Available, otherwise,it's will get 409 errorCode. The prepaid volume can not be downgrade. This is an asynchronous interface, you can get the latest status by invoke getVolume(String)
        参数:
        request - The request containing all options for resize the specified volume.
      • rollbackVolume

        public void rollbackVolume​(String volumeId,
                                   String snapshotId)
        Rollback the volume with the specified volume snapshot. You can rollback the specified volume only when the volume is Available, otherwise,it's will get 409 errorCode. The snapshot used to rollback must be created by the volume, otherwise,it's will get 404 errorCode. If rolling back the system volume,the instance must be Running or Stopped, otherwise,it's will get 409 errorCode.After rolling back the volume,all the system disk data will erase.
        参数:
        volumeId - The id of volume which will be rollback.
        snapshotId - The id of snapshot which will be used to rollback the volume.
      • rollbackVolume

        public void rollbackVolume​(RollbackVolumeRequest request)
        Rollback the volume with the specified volume snapshot. You can rollback the specified volume only when the volume is Available, otherwise,it's will get 409 errorCode. The snapshot used to rollback must be created by the volume, otherwise,it's will get 404 errorCode. If rolling back the system volume,the instance must be Running or Stopped, otherwise,it's will get 409 errorCode.After rolling back the volume,all the system disk data will erase.
        参数:
        request - The request containing all options for rolling back the specified volume.
      • purchaseReservedVolume

        public void purchaseReservedVolume​(String volumeId,
                                           int reservationLength,
                                           String reservationTimeUnit)
        PurchaseReserved the instance with fixed duration. You can not purchaseReserved the instance which is resizing. This is an asynchronous interface, you can get the latest status by invoke getVolume(String)
        参数:
        volumeId - The id of volume which will be renew.
        reservationLength - The fixed duration to renew,available is [1,2,3,4,5,6,7,8,9,12,24,36]
        reservationTimeUnit - The timeUnit to renew the instance,only support "month" now.
      • purchaseReservedVolume

        public void purchaseReservedVolume​(PurchaseReservedVolumeRequest request)
        PurchaseReserved the instance with fixed duration. You can not purchaseReserved the instance which is resizing. This is an asynchronous interface, you can get the latest status by invoke getVolume(String)
        参数:
        request - The request containing all options for renew the specified volume.
      • autoRenewVolume

        public void autoRenewVolume​(String volumeId,
                                    String renewTimeUnit,
                                    int renewTime)
      • autoRenewVolume

        public void autoRenewVolume​(AutoRenewVolumeRequest request)
        Enable auto renewal the specified volume
        参数:
        request - The request containing all options for renew the specified volume.
      • cancelAutoRenewVolume

        public void cancelAutoRenewVolume​(CancelAutoRenewVolumeRequest request)
        Disable auto renewal the volume
        参数:
        request - The request containing all options for disable auto renew the specified volume.
      • renameVolume

        public void renameVolume​(RenameVolumeRequest request)
        Rename the volume
        参数:
        request - The request containing all options for rename the specified volume.
      • modifyCdsAttribute

        public void modifyCdsAttribute​(ModifyCdsAttrRequest modifyCdsAttrRequest)
        change cds volume's attribute。 this interface is used to change cds's attribute, currently Name/Desc attribute is supported.
        参数:
        modifyCdsAttrRequest -
      • createImageFromInstance

        public CreateImageResponse createImageFromInstance​(String imageName,
                                                           String instanceId)
        Creating a customized image from the instance.. While creating an image from an instance,the instance must be Running or Stopped, otherwise,it's will get 409 errorCode. This is an asynchronous interface, you can get the latest status by invoke getImage(GetImageRequest)
        参数:
        imageName - The name of image that will be created.
        instanceId - The id of instance which will be used to create image.
        返回:
        The response with id of image newly created.
      • createImageFromInstanceWithRelateCds

        public CreateImageResponse createImageFromInstanceWithRelateCds​(String imageName,
                                                                        String instanceId,
                                                                        boolean relateCds)
        Creating a customized image from the instance.. While creating an image from an instance,the instance must be Running or Stopped, otherwise,it's will get 409 errorCode. This is an asynchronous interface, you can get the latest status by invoke getImage(GetImageRequest)
        参数:
        imageName - The name of image that will be created.
        instanceId - The id of instance which will be used to create image.
        relateCds - Whether the image is related with cds. If true, it means the image is related with cds.
        返回:
        The response with id of image newly created.
      • createImageFromSnapshot

        public CreateImageResponse createImageFromSnapshot​(String imageName,
                                                           String snapshotId)
        Creating a customized image from specified snapshot. You can create the image only from system snapshot. While creating an image from a system snapshot,the snapshot must be Available, otherwise,it's will get 409 errorCode. This is an asynchronous interface, you can get the latest status by invoke getImage(GetImageRequest)
        参数:
        imageName - The name of image that will be created.
        snapshotId - The id of snapshot which will be used to create image.
        返回:
        The response with id of image newly created.
      • createImage

        public CreateImageResponse createImage​(CreateImageRequest request)
        Creating a customized image which can be used for creating instance in the future. You can create an image from an instance or you can create from an snapshot. The parameters of instanceId and snapshotId can no be null simultaneously. when both instanceId and snapshotId are assigned,only instanceId will be used. While creating an image from an instance,the instance must be Running or Stopped, otherwise,it's will get 409 errorCode. You can create the image only from system snapshot. While creating an image from a system snapshot,the snapshot must be Available, otherwise,it's will get 409 errorCode. This is an asynchronous interface, you can get the latest status by invoke getImage(GetImageRequest)
        参数:
        request - The request containing all options for creating a new image.
        返回:
        The response with id of image newly created.
      • listImages

        public ListImagesResponse listImages()
        Listing images owned by the authenticated user.
        返回:
        The response with list of images.
      • listImages

        public ListImagesResponse listImages​(ListImagesRequest request)
        Listing images owned by the authenticated user.
        参数:
        request - The request containing all options for listing images owned by user.
        返回:
        The response with list of images.
      • getImage

        public GetImageResponse getImage​(String imageId)
        Get the detail information of specified image.
        参数:
        imageId - The id of image.
        返回:
        The response with the image detail information.
      • getImage

        public GetImageResponse getImage​(GetImageRequest request)
        Get the detail information of specified image.
        参数:
        request - The request containing all options for getting the detail information of specified image.
        返回:
        The response with the image detail information.
      • deleteImage

        public void deleteImage​(String imageId)
        Deleting the specified image. Only the customized image can be deleted, otherwise,it's will get 403 errorCode.
        参数:
        imageId - The id of image.
      • deleteImage

        public void deleteImage​(DeleteImageRequest request)
        Deleting the specified image. Only the customized image can be deleted, otherwise,it's will get 403 errorCode.
        参数:
        request - The request containing all options for deleting the specified image.
      • shareImage

        public void shareImage​(ShareImageRequest request)
        Sharing the specified image. Only the customized image can be shared, otherwise,it's will get 403 errorCode.
        参数:
        request - The request containing all options for sharing the specified image.
      • unShareImage

        public void unShareImage​(UnShareImageRequest request)
        UnSharing the specified image. Only the customized and shared image can be unshared, otherwise,it's will get 403 errorCode.
        参数:
        request - The request containing all options for unsharing the specified image.
      • listSharedUser

        public ListSharedUserResponse listSharedUser​(String imageId)
        Listing sharedUsers by the authenticated imageId.
        返回:
        The response with list of sharedUsers.
      • listSharedUser

        public ListSharedUserResponse listSharedUser​(ListSharedUserRequest request)
        Listing sharedUsers by the authenticated imageId.
        参数:
        request - The request containing all options for Listing sharedUsers.
        返回:
        The response with list of sharedUsers.
      • remoteCopyImage

        public void remoteCopyImage​(RemoteCopyImageRequest request)
        Remote copy image.
        参数:
        request - The request containing all options for remote copy image.
      • cancelRemoteCopyImage

        public void cancelRemoteCopyImage​(String imageId)
        Cancel remote copy image.
        参数:
        imageId - The id of image.
      • cancelRemoteCopyImage

        public void cancelRemoteCopyImage​(CancelRemoteCopyImageRequest request)
        Cancel remote copy image.
        参数:
        request - The request containing all options for cancel remote copy image.
      • listOs

        public ListOsResponse listOs​(ListOsRequest request)
        list os by instanceIds.
        参数:
        request - The request containing instanceIds which to query.
        返回:
        response ListOsResponse
      • createSnapshot

        public CreateSnapshotResponse createSnapshot​(String volumeId,
                                                     String snapshotName)
        Creating snapshot from specified volume. You can create snapshot from system volume and CDS volume. While creating snapshot from system volume,the instance must be Running or Stopped, otherwise,it's will get 409 errorCode. While creating snapshot from CDS volume,,the volume must be InUse or Available, otherwise,it's will get 409 errorCode. This is an asynchronous interface, you can get the latest status by invoke getSnapshot(GetSnapshotRequest)
        参数:
        volumeId - The id of volume which will be used to create snapshot.
        snapshotName - The name of snapshot will be created.
        返回:
        The response with the id of snapshot created.
      • createSnapshot

        public CreateSnapshotResponse createSnapshot​(String volumeId,
                                                     String snapshotName,
                                                     String desc)
        Creating snapshot from specified volume. You can create snapshot from system volume and CDS volume. While creating snapshot from system volume,the instance must be Running or Stopped, otherwise,it's will get 409 errorCode. While creating snapshot from CDS volume,,the volume must be InUs or Available, otherwise,it's will get 409 errorCode. This is an asynchronous interface, you can get the latest status by invoke getSnapshot(GetSnapshotRequest)
        参数:
        volumeId - The id of volume which will be used to create snapshot.
        snapshotName - The name of snapshot will be created.
        desc - The optional parameter to describe the newly created snapshot.
        返回:
        The response with the id of snapshot created.
      • createSnapshot

        public CreateSnapshotResponse createSnapshot​(CreateSnapshotRequest request)
        Creating snapshot from specified volume. You can create snapshot from system volume and CDS volume. While creating snapshot from system volume,the instance must be Running or Stopped, otherwise,it's will get 409 errorCode. While creating snapshot from CDS volume,,the volume must be InUs or Available, otherwise,it's will get 409 errorCode. This is an asynchronous interface, you can get the latest status by invoke getSnapshot(GetSnapshotRequest)
        参数:
        request - The request containing all options for creating a new snapshot.
        返回:
        The response with the id of snapshot created.
      • listSnapshots

        public ListSnapshotsResponse listSnapshots​(ListSnapshotsRequest request)
        Listing snapshots owned by the authenticated user.
        参数:
        request - The request containing all options for listing snapshot.
        返回:
        The response contains a list of snapshots owned by the user.
      • getSnapshot

        public GetSnapshotResponse getSnapshot​(String snapshotId)
        Get the detail information of specified snapshot.
        参数:
        snapshotId - The id of snapshot.
        返回:
        The response with the snapshot detail information.
      • getSnapshot

        public GetSnapshotResponse getSnapshot​(GetSnapshotRequest request)
        Getting the detail information of specified snapshot.
        参数:
        request - The request containing all options for getting the detail information of specified snapshot.
        返回:
        The response with the snapshot detail information.
      • deleteSnapshot

        public void deleteSnapshot​(String snapshotId)
        Deleting the specified snapshot. Only when the snapshot is CreatedFailed or Available,the specified snapshot can be deleted. otherwise,it's will get 403 errorCode.
        参数:
        snapshotId - The id of snapshot.
      • deleteSnapshot

        public void deleteSnapshot​(DeleteSnapshotRequest request)
        Deleting the specified snapshot. Only when the snapshot is CreatedFailed or Available,the specified snapshot can be deleted. otherwise,it's will get 403 errorCode.
        参数:
        request - The request containing all options for deleting the specified snapshot.
      • listSnapchain

        public ListSnapchainResponse listSnapchain​(ListSnapchainRequest request)
        Query the list of user's snapshot chain information.
        参数:
        request - The request containing all options for querying the specified snapshot chain.
        返回:
        Snapchain information, a collection of SnapchainModel
      • createAsp

        public CreateAspResponse createAsp​(CreateAspRequest request)
        Creating autoSnapshotPolicy
        参数:
        request - contains params for creating a new asp
        返回:
        response contains the id of new asp
      • deleteAsp

        public void deleteAsp​(DeleteAspRequest request)
        Deleting autoSnapshotPolicy
        参数:
        request - contains the id of asp for deleting
      • deleteAsp

        public void deleteAsp​(String aspId)
        Deleting autoSnapshotPolicy
        参数:
        aspId - for deleting
      • attachAsp

        public void attachAsp​(AttachAspRequest request)
        Attaching the specified asp to volumes.
        参数:
        request - The request containing all options for attaching the specified asp to specified volumes.
      • detachAsp

        public void detachAsp​(DetachAspRequest request)
        Detaching the specified asp to volumes.
        参数:
        request - The request containing all options for detaching the specified asp to specified volumes.
      • listAsps

        public ListAspsResponse listAsps​(ListAspsRequest request)
        Listing asps owned by the authenticated user.
        参数:
        request - The request containing all options for listing asps owned by user.
        返回:
        The response with list of asps.
      • getAsp

        public GetAspResponse getAsp​(GetAspRequest request)
        Getting the detail information of specified asp.
        参数:
        request - The request containing all options for getting the detail information of specified asp.
        返回:
        The response with the asp detail information.
      • getAsp

        public GetAspResponse getAsp​(String aspId)
        Get the detail information of specified asp.
        参数:
        aspId - The id of asp.
        返回:
        The response with the asp detail information.
      • updateAsp

        public void updateAsp​(UpdateAspRequest request)
        Updating autoSnapshotPolicy
        参数:
        request - contains params for creating a new asp
      • listSecurityGroups

        public ListSecurityGroupsResponse listSecurityGroups​(ListSecurityGroupsRequest request)
        Listing SecurityGroup owned by the authenticated user.
        参数:
        request - The request containing all options for listing SecurityGroup owned by user.
        返回:
        The response with list of SecurityGroup which contains SecurityGroup rules owned by user.
      • createSecurityGroup

        public CreateSecurityGroupResponse createSecurityGroup​(CreateSecurityGroupRequest request)
        Creating a newly SecurityGroup with specified rules.
        参数:
        request - The request containing all options for creating a new SecurityGroup.
        返回:
        The response with the id of SecurityGroup that was created newly.
      • authorizeSecurityGroupRule

        public void authorizeSecurityGroupRule​(SecurityGroupRuleOperateRequest request)
        authorizing a security group rule to a specified security group
        参数:
        request - The request containing all options for authorizing security group rule
      • revokeSecurityGroupRule

        public void revokeSecurityGroupRule​(SecurityGroupRuleOperateRequest request)
        revoking a security group rule from the specified security group
        参数:
        request - The request containing all options for revoking security group rule
      • deleteSecurityGroup

        public void deleteSecurityGroup​(String securityGroupId)
        Deleting the specified SecurityGroup.
        参数:
        securityGroupId - The id of SecurityGroup that will be deleted.
      • deleteSecurityGroup

        public void deleteSecurityGroup​(DeleteSecurityGroupRequest request)
        Deleting the specified SecurityGroup.
        参数:
        request - The request containing all options for deleting the specified SecurityGroup owned by user.
      • listZones

        public ListZonesResponse listZones()
        listing zones within current region
        返回:
        The response with list of zones
      • listZones

        public ListZonesResponse listZones​(AbstractBceRequest request)
        listing zones within current region
        参数:
        request - use withRequestCredentials
        返回:
        The response with list of zones
      • createKeypair

        public KeypairModel createKeypair​(KeypairCreateRequest request)
        create an keypair.
        参数:
        request - you can specify name and description in the request
        返回:
        KeypairModel
      • importKeypair

        public KeypairModel importKeypair​(KeypairImportRequest request)
        Import an keypair. User can import an keypair which is created manually. The imported keypair must support one of the following encrypt method: rsa/dsa/ssh-rsa/ssh-dss/ecdsa
        参数:
        request - KeypairImportRequest
      • attachKeypair

        public void attachKeypair​(KeypairAttachRequest request)
        Attach an keypair to one or more instances.
        参数:
        request - KeypairAttachRequest
      • detachKeypair

        public void detachKeypair​(KeypairDetachRequest request)
        Detach the keypair from one or more instances. if the keypair has not been attached to one instance, the operation will be ignored.
        参数:
        request - KeypairDetachRequest
      • deleteKeypair

        public void deleteKeypair​(KeypairDeleteRequest request)
        Delete keypair. If the keypair is attached to one or more instances, then it can not be deleted.
        参数:
        request - KeypairDeleteRequest
      • keypairDetail

        public KeypairModel keypairDetail​(KeypairDetailRequest request)
        Query keypair's detail information.
        参数:
        request - KeypairDetailRequest
      • listKeypair

        public KeypairListResponse listKeypair​(KeypairListRequest request)
        Query keypair's information from specifics range.
        参数:
        request - The request containing all options for querying the keypair list.
      • renameKeypair

        public void renameKeypair​(KeypairRenameRequest request)
        Rename an keypair to instance.
        参数:
        request - The request containing all options for renaming the specified keypair.
      • updateKeypairDescription

        public void updateKeypairDescription​(KeypairUpdateDescRequest request)
        update the description of the keypair to instance.
        参数:
        request - The request containing all options for updating the description of the keypair.
      • listDeploySet

        public ListDeploySetResponse listDeploySet()
        Query the user's deploy set list
        返回:
        List of deployment set info
      • createDeploySet

        public CreateDeploySetResponse createDeploySet​(CreateDeploySetRequest request)
        Create a deploy set
        参数:
        request - The request containing all options for creating a deploy set.
        返回:
        List of deploy set ids
      • deleteDeploySet

        public void deleteDeploySet​(DeleteDeploySetRequest request)
        Delete a deploy set with deployId
        参数:
        request - The request containing all options for deleting the specified deploy set.
      • updateDeploySet

        public void updateDeploySet​(UpdateDeploySetRequest request)
        Update deploy set
        参数:
        request - The request containing all options for updating the specified deploy set.
      • deleteSecurityGroupRule

        public void deleteSecurityGroupRule​(String securityGroupRuleId)
        Delete the specific security group rule by the corresponding rule id.
        参数:
        securityGroupRuleId - the security group rule id to be deleted
      • deleteSecurityGroupRule

        public void deleteSecurityGroupRule​(DeleteSecurityGroupRuleRequest request)
        Delete the specific security group rule via params in the deleteSecurityGroupRuleRequest
        参数:
        request - the request for deleteSecurityGroupRule
      • updateSecurityGroupRule

        public void updateSecurityGroupRule​(UpdateSecurityGroupRuleRequest request)
        Update the specific security group rule via params in the updateSecurityGroupRuleRequest
        参数:
        request - the request for updateSecurityGroupRule
      • createVolumeCluster

        public CreateVolumeClusterResponse createVolumeCluster​(CreateVolumeClusterRequest request)
        Create a volume Cluster with the specified options.
        参数:
        request - The request containing all options for creating a volume cluster.
        返回:
        The response with list of id of volumes newly created.
      • listVolumeClusters

        public ListVolumeClustersResponse listVolumeClusters()
        Listing volumes owned by the authenticated user.
        返回:
        The response containing a list of volume owned by the authenticated user.
      • listVolumeClusters

        public ListVolumeClustersResponse listVolumeClusters​(ListVolumeClustersRequest request)
        Listing Cluster owned by the authenticated user.
        参数:
        request - The request containing all options for listing Clusters owned by the authenticated user.
        返回:
        The response containing a list of Cluster owned by the authenticated user.
      • getVolumeCluster

        public GetVolumeClusterResponse getVolumeCluster​(String clusterId)
        Get the detail information of specified cluster.
        参数:
        clusterId - The id of the volume.
        返回:
        The response containing the detail information of specified volume.
      • getVolumeCluster

        public GetVolumeClusterResponse getVolumeCluster​(GetVolumeClusterRequest request)
        Get the detail information of specified cluster.
        参数:
        request - The request containing all options for getting the detail information of specified cluster.
        返回:
        The response containing the detail information of specified cluster.
      • resizeVolumeCluster

        public void resizeVolumeCluster​(String clusterId,
                                        int newClusterSizeInGB)
        Resizing the specified cluster with newly size.
        参数:
        clusterId - The id of cluster which you want to resize.
        newClusterSizeInGB - The new cluster size you want to resize in GB.
      • resizeVolumeCluster

        public void resizeVolumeCluster​(ResizeVolumeClusterRequest request)
        Resizing the specified cluster with newly size.
        参数:
        request - The request containing all options for resize the specified cluster.
      • purchaseReservedVolumeCluster

        public void purchaseReservedVolumeCluster​(String clusterId,
                                                  int reservationLength,
                                                  String reservationTimeUnit)
        PurchaseReserved the cluster with fixed duration.
        参数:
        clusterId - The id of cluster which will be renew.
        reservationLength - The fixed duration to renew,available is [6,12,24,36,60]
        reservationTimeUnit - The timeUnit to renew the instance, support "month" now.
      • purchaseReservedVolumeCluster

        public void purchaseReservedVolumeCluster​(PurchaseReservedVolumeClusterRequest request)
        PurchaseReserved the cluster with fixed duration. You can not purchaseReserved the cluster which is resizing.
        参数:
        request - The request containing all options for renew the specified cluster.
      • autoRenewVolumeCluster

        public void autoRenewVolumeCluster​(String clusterId,
                                           int renewTime,
                                           String renewTimeUnit)
      • autoRenewVolumeCluster

        public void autoRenewVolumeCluster​(AutoRenewVolumeClusterRequest request)
        Enable auto renewal the specified cluster
        参数:
        request - The request containing all options for renew the specified cluster.
      • cancelAutoRenewVolumeCluster

        public void cancelAutoRenewVolumeCluster​(CancelAutoRenewVolumeClusterRequest request)
        Disable auto renewal the cluster
        参数:
        request - The request containing all options for disable auto renew the specified cluster.
      • refundVolumeCluster

        public void refundVolumeCluster​(String clusterId)
        The cluster can be unsubscribed after six months of use.
        参数:
        clusterId - The id of the volume.