com.baidubce.services.bcc.model.snapshot
Class CreateSnapshotRequest

java.lang.Object
  extended by com.baidubce.model.AbstractBceRequest
      extended by com.baidubce.services.bcc.model.snapshot.CreateSnapshotRequest

public class CreateSnapshotRequest
extends AbstractBceRequest

The request for creating a new snapshot.


Constructor Summary
CreateSnapshotRequest()
           
 
Method Summary
 String getClientToken()
           
 String getDesc()
           
 String getSnapshotName()
           
 String getVolumeId()
           
 void setClientToken(String clientToken)
           
 void setDesc(String desc)
           
 void setSnapshotName(String snapshotName)
           
 void setVolumeId(String volumeId)
           
 CreateSnapshotRequest withClientToken(String clientToken)
          Configure optional client token for the request.
 CreateSnapshotRequest withDesc(String desc)
          Configure desc for the request.
 CreateSnapshotRequest withRequestCredentials(BceCredentials credentials)
          Configure request credential for the request.
 CreateSnapshotRequest withSnapshotName(String snapshotName)
          Configure snapshotName for the request.
 CreateSnapshotRequest withVolumeId(String volumeId)
          Configure volumeId 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

CreateSnapshotRequest

public CreateSnapshotRequest()
Method Detail

getClientToken

public String getClientToken()

setClientToken

public void setClientToken(String clientToken)

withClientToken

public CreateSnapshotRequest 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:
CreateSnapshotRequest with specific clientToken

getVolumeId

public String getVolumeId()

setVolumeId

public void setVolumeId(String volumeId)

withVolumeId

public CreateSnapshotRequest withVolumeId(String volumeId)
Configure volumeId for the request.

Parameters:
volumeId - The id which specify where the snapshot will be created from. If you want to create an snapshot from a customized volume,a id of the volume will be set. If you want to create an snapshot from a system volume,a id of the instance will be set.
Returns:
CreateSnapshotRequest with volumeId.

getSnapshotName

public String getSnapshotName()

setSnapshotName

public void setSnapshotName(String snapshotName)

withSnapshotName

public CreateSnapshotRequest withSnapshotName(String snapshotName)
Configure snapshotName for the request.

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

getDesc

public String getDesc()

setDesc

public void setDesc(String desc)

withDesc

public CreateSnapshotRequest withDesc(String desc)
Configure desc for the request.

Parameters:
desc - The optional parameter to describe the information of the new snapshot.
Returns:
CreateSnapshotRequest with desc.

withRequestCredentials

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

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


Copyright © 2018. All rights reserved.