类 CreateVolumeRequest
- java.lang.Object
-
- com.baidubce.model.AbstractBceRequest
-
- com.baidubce.services.bcc.model.volume.CreateVolumeRequest
-
public class CreateVolumeRequest extends AbstractBceRequest
The request for creating a new volume.
-
-
构造器概要
构造器 构造器 说明 CreateVolumeRequest()
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 BillinggetBilling()intgetCdsSizeInGB()StringgetClientToken()intgetPurchaseCount()StringgetSnapshotId()StringgetStorageType()StringgetZoneName()voidsetBilling(Billing billing)voidsetCdsSizeInGB(int cdsSizeInGB)voidsetClientToken(String clientToken)voidsetPurchaseCount(int purchaseCount)voidsetSnapshotId(String snapshotId)voidsetStorageType(String storageType)voidsetZoneName(String zoneName)CreateVolumeRequestwithBilling(Billing billing)Configure billing for the request.CreateVolumeRequestwithCdsSizeInGB(int cdsSizeInGB)Configure cdsSizeInGB for the request.CreateVolumeRequestwithClientToken(String clientToken)Configure optional client token for the request.CreateVolumeRequestwithPurchaseCount(int purchaseCount)Configure purchaseCount for the request.CreateVolumeRequestwithRequestCredentials(BceCredentials credentials)Configure request credential for the request.CreateVolumeRequestwithSnapshotId(String snapshotId)Configure snapshotId for the request.CreateVolumeRequestwithStorageType(String storageType)Configure storageType for the request.CreateVolumeRequestwithZoneName(String zoneName)-
从类继承的方法 com.baidubce.model.AbstractBceRequest
getRequestCredentials, setRequestCredentials
-
-
-
-
方法详细资料
-
getClientToken
public String getClientToken()
-
setClientToken
public void setClientToken(String clientToken)
-
withClientToken
public CreateVolumeRequest withClientToken(String clientToken)
Configure optional client token for the request. The request will be idempotent if client token is provided.- 参数:
clientToken- An ASCII string whose length is less than 64. See more detail at BCE API doc- 返回:
- CreateVolumeRequest with specific clientToken
-
getPurchaseCount
public int getPurchaseCount()
-
setPurchaseCount
public void setPurchaseCount(int purchaseCount)
-
withPurchaseCount
public CreateVolumeRequest withPurchaseCount(int purchaseCount)
Configure purchaseCount for the request.- 参数:
purchaseCount- The number of volume to buy, the default value is 1.- 返回:
- CreateVolumeRequest with specific purchaseCount
-
getCdsSizeInGB
public int getCdsSizeInGB()
-
setCdsSizeInGB
public void setCdsSizeInGB(int cdsSizeInGB)
-
withCdsSizeInGB
public CreateVolumeRequest withCdsSizeInGB(int cdsSizeInGB)
Configure cdsSizeInGB for the request.- 参数:
cdsSizeInGB- The size of volume to create in GB. By specifying the snapshotId, it will create volume from the specified snapshot and the parameter cdsSizeInGB will be ignored.- 返回:
- CreateVolumeRequest with cdsSizeInGB.
-
getStorageType
public String getStorageType()
-
setStorageType
public void setStorageType(String storageType)
-
withStorageType
public CreateVolumeRequest withStorageType(String storageType)
Configure storageType for the request.- 参数:
storageType- The storage type of volume, see more detail in BCE API doc- 返回:
- CreateVolumeRequest with storageType.
-
getBilling
public Billing getBilling()
-
setBilling
public void setBilling(Billing billing)
-
withBilling
public CreateVolumeRequest withBilling(Billing billing)
Configure billing for the request.- 参数:
billing- The detail model to specify the billing.- 返回:
- CreateVolumeRequest with specific billing
-
getSnapshotId
public String getSnapshotId()
-
setSnapshotId
public void setSnapshotId(String snapshotId)
-
withSnapshotId
public CreateVolumeRequest withSnapshotId(String snapshotId)
Configure snapshotId for the request.- 参数:
snapshotId- The id of snapshot.By specifying the snapshotId, it will create volume from the specified snapshot and the parameter cdsSizeInGB will be ignored.- 返回:
- CreateVolumeRequest with snapshotId.
-
getZoneName
public String getZoneName()
-
setZoneName
public void setZoneName(String zoneName)
-
withZoneName
public CreateVolumeRequest withZoneName(String zoneName)
-
withRequestCredentials
public CreateVolumeRequest withRequestCredentials(BceCredentials credentials)
Configure request credential for the request.- 指定者:
withRequestCredentials在类中AbstractBceRequest- 参数:
credentials- a valid instance of BceCredentials.- 返回:
- CreateVolumeRequest with credentials.
-
-