类 BbcClient
- java.lang.Object
-
- com.baidubce.AbstractBceClient
-
- com.baidubce.services.bbc.BbcClient
-
public class BbcClient extends AbstractBceClient
Created by fulinhua on 2019-02-18
-
-
字段概要
-
从类继承的字段 com.baidubce.AbstractBceClient
config, DEFAULT_CONTENT_TYPE, DEFAULT_ENCODING, DEFAULT_SERVICE_DOMAIN, URL_PREFIX
-
-
构造器概要
构造器 构造器 说明 BbcClient()Constructs a new client to invoke service methods on bbc.BbcClient(BceClientConfiguration clientConfiguration)Constructs a new bbc client using the client configuration to access bbc.BbcClient(BceClientConfiguration config, HttpResponseHandler[] responseHandlers)BbcClient(BceClientConfiguration config, HttpResponseHandler[] responseHandlers, boolean isHttpAsyncPutEnabled)
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 voidbindInstanceTag(BindBbcTagsRequest request)Binding the bbc instance to specified list of tags.CreateBbcImageResponsecreateBbcImage(CreateBbcImageRequest request)Creating a customized image which can be used for creating instance in the future.CreateBbcInstanceResponsecreateInstance(CreateBbcInstanceRequest request)Create a bcc Instance with the specified options, see all the supported instance inInstanceTypeYou must fill the field of clientToken,which is especially for keeping idempotent.voiddeleteImage(DeleteImageRequest request)Deleting the specified image.GetBbcFlavorResponsegetBbcFlavor(GetBbcFlavorRequest request)Geting the flavor information of a flavorGetBbcFlavorRaidResponsegetBbcFlavorRaid(GetBbcFlavorRequest request)Geting the flavor raid information of a raidGetImageResponsegetImage(GetImageRequest request)Get the detail information of specified image.GetBbcInstanceResponsegetInstance(GetInstanceRequest request)Get the detail information of specified bbc instance.GetInstanceVpcResponsegetInstanceVpcsubnet(GetInstanceVpcRequest request)Get the Vpc/Subnet information of specified bbc instance.ListBbcFlavorResponselistBbcFlavors(ListBbcFlavorsRequest request)Listing all the flavors of the bbc instanceListBbcInstancesResponselistBbcInstances(ListBbcInstancesRequest request)Return a list of instances owned by the authenticated user.ListOperationLogResponselistBbcOperationLog(ListOperationLogRequest request)Listing the operation log of the bbc.ListImagesResponselistImages(ListImagesRequest request)Listing bbc images owned by the authenticated user.voidmodifyBbcPassword(ModifyInstancePasswordRequest request)Modifying the password of the bbc instance.voidmodifyInstanceDesc(ModifyInstanceDescRequest request)Modifying the special describe to new value of the instance.voidrebootInstance(RebootInstanceRequest request)Rebooting the bbc instance owned by the user.voidrebuildBbcInstance(RebuildBbcInstanceRequest request)Rebuilding the bbc instance owned by the user.voidreleaseBbcInstance(ReleaseInstanceRequest request)Releasing the instance owned by the user.voidrenameBbcInstance(RenameBbcInstanceRequest request)Modifying the special attribute to new value of the instance.voidstartInstance(StartInstanceRequest request)Starting the bbc instance owned by the user.voidstopInstance(StopInstanceRequest request)Stopping the bbc instance owned by the user.voidunBindInstanceTag(BindBbcTagsRequest request)Unbinding the bbc instance to specified list of tags.-
从类继承的方法 com.baidubce.AbstractBceClient
computeBktVirEndpoint, computeServiceId, getBktVirEndpoint, getClient, getEndpoint, getServiceId, invokeHttpClient, isRegionSupported, setClient, shutdown
-
-
-
-
构造器详细资料
-
BbcClient
public BbcClient(BceClientConfiguration clientConfiguration)
Constructs a new bbc client using the client configuration to access bbc.- 参数:
clientConfiguration- The bcc client configuration options controlling how this client connects to bbc (e.g. proxy settings, retry counts, etc).
-
BbcClient
public BbcClient(BceClientConfiguration config, HttpResponseHandler[] responseHandlers, boolean isHttpAsyncPutEnabled)
-
BbcClient
public BbcClient(BceClientConfiguration config, HttpResponseHandler[] responseHandlers)
-
BbcClient
public BbcClient()
Constructs a new client to invoke service methods on bbc.
-
-
方法详细资料
-
bindInstanceTag
public void bindInstanceTag(BindBbcTagsRequest request)
Binding the bbc instance to specified list of tags.- 参数:
request- The request containing all options for binding the instance to specified list of tags.
-
unBindInstanceTag
public void unBindInstanceTag(BindBbcTagsRequest request)
Unbinding the bbc instance to specified list of tags.- 参数:
request- The request containing all options for unbinding the instance to specified list of tags.
-
modifyBbcPassword
public void modifyBbcPassword(ModifyInstancePasswordRequest request) throws BceClientException
Modifying the password of the bbc instance.You can reboot the instance only when the instance is Running or Stopped , otherwise,it's will get
409errorCode.- 参数:
request- The request containing all options for modifying the bbc instance password.- 抛出:
BceClientException
-
getInstanceVpcsubnet
public GetInstanceVpcResponse getInstanceVpcsubnet(GetInstanceVpcRequest request) throws BceClientException
Get the Vpc/Subnet information of specified bbc instance.- 参数:
request- The request containing all options for getting the Vpc/Subnet information- 返回:
- A List of Vpc/Subnet information
- 抛出:
BceClientException
-
listBbcInstances
public ListBbcInstancesResponse listBbcInstances(ListBbcInstancesRequest 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.
-
getInstance
public GetBbcInstanceResponse getInstance(GetInstanceRequest request)
Get the detail information of specified bbc instance.- 参数:
request- The request containing all options for getting the instance info.- 返回:
- A instance detail model for the instanceId.
-
startInstance
public void startInstance(StartInstanceRequest request)
Starting the bbc instance owned by the user.You can start the instance only when the instance is Stopped, otherwise,it's will get
409errorCode.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(StopInstanceRequest request)
Stopping the bbc instance owned by the user.You can stop the instance only when the instance is Running, otherwise,it's will get
409errorCode.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(RebootInstanceRequest request)
Rebooting the bbc instance owned by the user.You can reboot the instance only when the instance is Running, otherwise,it's will get
409errorCode.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.
-
renameBbcInstance
public void renameBbcInstance(RenameBbcInstanceRequest 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
409errorCode.- 参数:
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.
-
rebuildBbcInstance
public void rebuildBbcInstance(RebuildBbcInstanceRequest request) throws BceClientException
Rebuilding the bbc 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
-
releaseBbcInstance
public void releaseBbcInstance(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.
-
listBbcFlavors
public ListBbcFlavorResponse listBbcFlavors(ListBbcFlavorsRequest request)
Listing all the flavors of the bbc instance- 参数:
request-- 返回:
-
getBbcFlavor
public GetBbcFlavorResponse getBbcFlavor(GetBbcFlavorRequest request)
Geting the flavor information of a flavor- 参数:
request- The request containing all options for releasing the instance.- 返回:
-
getBbcFlavorRaid
public GetBbcFlavorRaidResponse getBbcFlavorRaid(GetBbcFlavorRequest request)
Geting the flavor raid information of a raid- 参数:
request- The request containing all options for releasing the instance.- 返回:
-
createBbcImage
public CreateBbcImageResponse createBbcImage(CreateBbcImageRequest 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
409errorCode.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
409errorCode.- 参数:
request- The request containing all options for creating a new image.- 返回:
- The response with id of image newly created.
-
listImages
public ListImagesResponse listImages(ListImagesRequest request)
Listing bbc 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(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(DeleteImageRequest request)
Deleting the specified image.Only the customized image can be deleted, otherwise,it's will get
403errorCode.- 参数:
request- The request containing all options for deleting the specified image.
-
listBbcOperationLog
public ListOperationLogResponse listBbcOperationLog(ListOperationLogRequest request)
Listing the operation log of the bbc. The startTime and endTime means the time quantum that the log had taken. If the starTime or the endTime is empty,it means searching the operation log of today.- 参数:
request-- 返回:
-
createInstance
public CreateBbcInstanceResponse createInstance(CreateBbcInstanceRequest request) throws BceClientException
Create a bcc Instance with the specified options, see all the supported instance inInstanceTypeYou must fill the field of clientToken,which is especially for keeping idempotent.This is an asynchronous interface, you can get the latest status by invoke
getInstance(GetInstanceRequest)- 参数:
request- The request containing all options for creating a bcc Instance.- 返回:
- List of instanceId newly created
- 抛出:
BceClientException
-
-