com.baidubce.services.bcc.model.image
Class CreateImageRequest

java.lang.Object
  extended by com.baidubce.model.AbstractBceRequest
      extended by com.baidubce.services.bcc.model.image.CreateImageRequest

public class CreateImageRequest
extends AbstractBceRequest

The request for creating new image.


Constructor Summary
CreateImageRequest()
           
 
Method Summary
 String getClientToken()
           
 String getImageName()
           
 String getInstanceId()
           
 String getSnapshotId()
           
 void setClientToken(String clientToken)
           
 void setImageName(String imageName)
           
 void setInstanceId(String instanceId)
           
 void setSnapshotId(String snapshotId)
           
 CreateImageRequest withClientToken(String clientToken)
          Configure optional client token for the request.
 CreateImageRequest withImageName(String imageName)
          Configure imageName for the request.
 CreateImageRequest withInstanceId(String instanceId)
          Configure instanceId for the request.
 CreateImageRequest withRequestCredentials(BceCredentials credentials)
          Configure request credential for the request.
 CreateImageRequest withSnapshotId(String snapshotId)
          Configure snapshotId for the request.
 
Methods inherited from class com.baidubce.model.AbstractBceRequest
getRequestCredentials, setRequestCredentials
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CreateImageRequest

public CreateImageRequest()
Method Detail

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.

Parameters:
clientToken - An ASCII string whose length is less than 64. See more detail at BCE API doc
Returns:
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.

Parameters:
imageName - The name for the image that will be created. The name length from 1 to 65,only contains letters,digital and underline.
Returns:
CreateImageRequest with imageName.

getInstanceId

public String getInstanceId()

setInstanceId

public void setInstanceId(String instanceId)

withInstanceId

public CreateImageRequest withInstanceId(String instanceId)
Configure instanceId for the request.

Parameters:
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.
Returns:
CreateImageRequest with instanceId.

getSnapshotId

public String getSnapshotId()

setSnapshotId

public void setSnapshotId(String snapshotId)

withSnapshotId

public CreateImageRequest withSnapshotId(String snapshotId)
Configure snapshotId for the request.

Parameters:
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.
Returns:
CreateImageRequest with snapshotId.

withRequestCredentials

public CreateImageRequest withRequestCredentials(BceCredentials credentials)
Configure request credential for the request.

Specified by:
withRequestCredentials in class AbstractBceRequest
Parameters:
credentials - a valid instance of BceCredentials.
Returns:
CreateImageRequest with credentials.


Copyright © 2018. All rights reserved.