类 CreateImageRequest
- java.lang.Object
-
- com.baidubce.model.AbstractBceRequest
-
- com.baidubce.services.bcc.model.image.CreateImageRequest
-
public class CreateImageRequest extends AbstractBceRequest
The request for creating new image.
-
-
构造器概要
构造器 构造器 说明 CreateImageRequest()
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 StringgetClientToken()StringgetImageName()StringgetInstanceId()StringgetSnapshotId()booleanisRelateCds()voidsetClientToken(String clientToken)voidsetImageName(String imageName)voidsetInstanceId(String instanceId)voidsetRelateCds(boolean relateCds)voidsetSnapshotId(String snapshotId)CreateImageRequestwithClientToken(String clientToken)Configure optional client token for the request.CreateImageRequestwithImageName(String imageName)Configure imageName for the request.CreateImageRequestwithInstanceId(String instanceId)Configure instanceId for the request.CreateImageRequestwithRelateCds(boolean relateCds)Configure relateCds for the request.CreateImageRequestwithRequestCredentials(BceCredentials credentials)Configure request credential for the request.CreateImageRequestwithSnapshotId(String snapshotId)Configure snapshotId for the request.-
从类继承的方法 com.baidubce.model.AbstractBceRequest
getRequestCredentials, setRequestCredentials
-
-
-
-
方法详细资料
-
getClientToken
public String getClientToken()
-
setClientToken
public void setClientToken(String clientToken)
-
withClientToken
public CreateImageRequest withClientToken(String clientToken)
Configure optional client token for the request. The request will be idempotent if client token is provided. If the clientToken is not specified by the user, a random String generated by default algorithm will be used.- 参数:
clientToken- An ASCII string whose length is less than 64. See more detail at BCE API doc- 返回:
- CreateImageRequest with specific clientToken
-
getImageName
public String getImageName()
-
setImageName
public void setImageName(String imageName)
-
withImageName
public CreateImageRequest withImageName(String imageName)
Configure imageName for the request.- 参数:
imageName- The name for the image that will be created. The name length from 1 to 65,only contains letters,digital and underline.- 返回:
- CreateImageRequest with imageName.
-
getInstanceId
public String getInstanceId()
-
setInstanceId
public void setInstanceId(String instanceId)
-
withInstanceId
public CreateImageRequest withInstanceId(String instanceId)
Configure instanceId for the request.- 参数:
instanceId- The optional parameter specify the id of the instance which will be used to create the new image. When instanceId and snapshotId are specified ,only instanceId will be used.- 返回:
- CreateImageRequest with instanceId.
-
getSnapshotId
public String getSnapshotId()
-
setSnapshotId
public void setSnapshotId(String snapshotId)
-
withSnapshotId
public CreateImageRequest withSnapshotId(String snapshotId)
Configure snapshotId for the request.- 参数:
snapshotId- The optional parameter specify the id of the snapshot which will be used to create the new image. When instanceId and snapshotId are specified ,only instanceId will be used.- 返回:
- CreateImageRequest with snapshotId.
-
isRelateCds
public boolean isRelateCds()
-
setRelateCds
public void setRelateCds(boolean relateCds)
-
withRelateCds
public CreateImageRequest withRelateCds(boolean relateCds)
Configure relateCds for the request.- 参数:
relateCds- Whether is related with CDS. Iftrue, it means the image is related with CDS.- 返回:
- CreateImageRequest with relateCds.
-
withRequestCredentials
public CreateImageRequest withRequestCredentials(BceCredentials credentials)
Configure request credential for the request.- 指定者:
withRequestCredentials在类中AbstractBceRequest- 参数:
credentials- a valid instance of BceCredentials.- 返回:
- CreateImageRequest with credentials.
-
-